Merge pull request #1066 from esdrubal/bug19313
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 4 Aug 2014 16:29:43 +0000 (12:29 -0400)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 4 Aug 2014 16:29:43 +0000 (12:29 -0400)
Changed DeflateStream to stop reading base_stream sooner. Fixes #19313.

1053 files changed:
.gitattributes
.gitignore
CONTRIBUTING.md
Makefile.am
README.md
acinclude.m4
autogen.sh
build-mingw32.sh
configure.ac [new file with mode: 0644]
configure.in [deleted file]
data/config.in
eglib/Makefile.am
eglib/acinclude.m4
eglib/configure.ac
eglib/src/Makefile.am
eglib/src/gerror.c
eglib/src/glib.h
eglib/src/goutput.c
eglib/src/gspawn.c
eglib/src/gstr.c
eglib/src/sort.frag.h
eglib/src/vasprintf.h [new file with mode: 0644]
eglib/test/file.c
ikvm-native/jni.c
ikvm-native/os.c
libgc/Makefile.am
libgc/Makefile.direct
libgc/README.Mono
libgc/acinclude.m4
libgc/autogen.sh
libgc/configure.ac [new file with mode: 0644]
libgc/configure.in [deleted file]
libgc/doc/README
libgc/doc/README.changes
libgc/dyn_load.c
libgc/finalize.c
libgc/include/gc.h
libgc/include/private/gcconfig.h
libgc/mark_rts.c
libgc/version.h
man/mono.1
man/mprof-report.1
mcs/Makefile
mcs/build/profiles/basic.make
mcs/build/tests.make
mcs/class/Accessibility/Accessibility-net_4_5.csproj
mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng-net_4_5.csproj
mcs/class/Cscompmgd/Cscompmgd-net_4_5.csproj
mcs/class/CustomMarshalers/CustomMarshalers-net_4_5.csproj
mcs/class/EntityFramework.SqlServer/EntityFramework.SqlServer-net_4_5.csproj
mcs/class/EntityFramework/EntityFramework-net_4_5.csproj
mcs/class/Facades/Makefile
mcs/class/Facades/System.Collections.Concurrent/System.Collections.Concurrent-net_4_5.csproj
mcs/class/Facades/System.Collections/System.Collections-net_4_5.csproj
mcs/class/Facades/System.ComponentModel.Annotations/System.ComponentModel.Annotations-net_4_5.csproj
mcs/class/Facades/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync-net_4_5.csproj
mcs/class/Facades/System.ComponentModel/System.ComponentModel-net_4_5.csproj
mcs/class/Facades/System.Diagnostics.Contracts/System.Diagnostics.Contracts-net_4_5.csproj
mcs/class/Facades/System.Diagnostics.Debug/System.Diagnostics.Debug-net_4_5.csproj
mcs/class/Facades/System.Diagnostics.Tools/System.Diagnostics.Tools-net_4_5.csproj
mcs/class/Facades/System.Diagnostics.Tracing/System.Diagnostics.Tracing-net_4_5.csproj
mcs/class/Facades/System.Dynamic.Runtime/System.Dynamic.Runtime-net_4_5.csproj
mcs/class/Facades/System.Globalization/System.Globalization-net_4_5.csproj
mcs/class/Facades/System.IO/System.IO-net_4_5.csproj
mcs/class/Facades/System.Linq.Expressions/System.Linq.Expressions-net_4_5.csproj
mcs/class/Facades/System.Linq.Parallel/System.Linq.Parallel-net_4_5.csproj
mcs/class/Facades/System.Linq.Queryable/System.Linq.Queryable-net_4_5.csproj
mcs/class/Facades/System.Linq/System.Linq-net_4_5.csproj
mcs/class/Facades/System.Net.NetworkInformation/System.Net.NetworkInformation-net_4_5.csproj
mcs/class/Facades/System.Net.Primitives/System.Net.Primitives-net_4_5.csproj
mcs/class/Facades/System.Net.Requests/System.Net.Requests-net_4_5.csproj
mcs/class/Facades/System.ObjectModel/System.ObjectModel-net_4_5.csproj
mcs/class/Facades/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration-net_4_5.csproj
mcs/class/Facades/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight-net_4_5.csproj
mcs/class/Facades/System.Reflection.Emit/System.Reflection.Emit-net_4_5.csproj
mcs/class/Facades/System.Reflection.Extensions/System.Reflection.Extensions-net_4_5.csproj
mcs/class/Facades/System.Reflection.Primitives/System.Reflection.Primitives-net_4_5.csproj
mcs/class/Facades/System.Reflection/System.Reflection-net_4_5.csproj
mcs/class/Facades/System.Resources.ResourceManager/System.Resources.ResourceManager-net_4_5.csproj
mcs/class/Facades/System.Runtime.Extensions/System.Runtime.Extensions-net_4_5.csproj
mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/System.Runtime.InteropServices.WindowsRuntime-net_4_5.csproj
mcs/class/Facades/System.Runtime.InteropServices/System.Runtime.InteropServices-net_4_5.csproj
mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs
mcs/class/Facades/System.Runtime.Numerics/System.Runtime.Numerics-net_4_5.csproj
mcs/class/Facades/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json-net_4_5.csproj
mcs/class/Facades/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives-net_4_5.csproj
mcs/class/Facades/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml-net_4_5.csproj
mcs/class/Facades/System.Runtime/System.Runtime-net_4_5.csproj
mcs/class/Facades/System.Security.Principal/System.Security.Principal-net_4_5.csproj
mcs/class/Facades/System.ServiceModel.Http/System.ServiceModel.Http-net_4_5.csproj
mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives-net_4_5.csproj
mcs/class/Facades/System.ServiceModel.Security/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Security/Makefile [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Security/System.ServiceModel.Security.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions-net_4_5.csproj
mcs/class/Facades/System.Text.Encoding/System.Text.Encoding-net_4_5.csproj
mcs/class/Facades/System.Text.RegularExpressions/System.Text.RegularExpressions-net_4_5.csproj
mcs/class/Facades/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel-net_4_5.csproj
mcs/class/Facades/System.Threading.Tasks/System.Threading.Tasks-net_4_5.csproj
mcs/class/Facades/System.Threading.Timer/System.Threading.Timer-net_4_5.csproj
mcs/class/Facades/System.Threading/System.Threading-net_4_5.csproj
mcs/class/Facades/System.Xml.ReaderWriter/System.Xml.ReaderWriter-net_4_5.csproj
mcs/class/Facades/System.Xml.XDocument/System.Xml.XDocument-net_4_5.csproj
mcs/class/Facades/System.Xml.XmlSerializer/System.Xml.XmlSerializer-net_4_5.csproj
mcs/class/I18N/CJK/I18N.CJK-net_4_5.csproj
mcs/class/I18N/Common/I18N-net_4_5.csproj
mcs/class/I18N/MidEast/I18N.MidEast-net_4_5.csproj
mcs/class/I18N/Other/I18N.Other-net_4_5.csproj
mcs/class/I18N/Rare/I18N.Rare-net_4_5.csproj
mcs/class/I18N/West/I18N.West-net_4_5.csproj
mcs/class/IBM.Data.DB2/IBM.Data.DB2-net_4_5.csproj
mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib-net_4_5.csproj
mcs/class/Makefile
mcs/class/Managed.Windows.Forms/.gitignore [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Makefile
mcs/class/Managed.Windows.Forms/System.Windows.Forms-net_4_5.csproj
mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/X11Display.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingSource.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericUpDown.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11GTK.cs
mcs/class/Managed.Windows.Forms/Test/DummyAssembly/AnotherSerializable.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Convertable.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Properties/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs
mcs/class/Managed.Windows.Forms/resources/keyboards.resx
mcs/class/Managed.Windows.Forms/resx.resx [deleted file]
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Expression.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/MemberInvocationReference.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln [deleted file]
mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_5.csproj
mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj [deleted file]
mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln [deleted file]
mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj [deleted file]
mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp [deleted file]
mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds [deleted file]
mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs
mcs/class/Microsoft.Build.Engine/Test/various/Items.cs
mcs/class/Microsoft.Build.Engine/Test/various/Properties.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework-net_4_5.csproj
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks-net_4_5.csproj
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ALTest.cs
mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities-net_4_5.csproj
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources
mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolLocationHelperTest.cs [new file with mode: 0644]
mcs/class/Microsoft.Build/Microsoft.Build-net_4_5.csproj
mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectRootElement.cs
mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs
mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs
mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionConstructs.cs
mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionEvaluator.cs
mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionParserManual.cs
mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs
mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs
mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs
mcs/class/Microsoft.Build/Test/Microsoft.Build.Internal/ExpressionParserTest.cs
mcs/class/Microsoft.CSharp/Microsoft.CSharp-net_4_5.csproj
mcs/class/Microsoft.VisualC/Microsoft.VisualC-net_4_5.csproj
mcs/class/Microsoft.Web.Infrastructure/Microsoft.Web.Infrastructure-net_4_5.csproj
mcs/class/Mono.C5/Mono.C5-net_4_5.csproj
mcs/class/Mono.CSharp/Mono.CSharp-net_4_5.csproj
mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs
mcs/class/Mono.Cairo/Mono.Cairo-net_4_5.csproj
mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs
mcs/class/Mono.Cecil.Mdb/Mono.Cecil.Mdb-net_4_5.csproj
mcs/class/Mono.Cecil/Mono.Cecil-net_4_5.csproj
mcs/class/Mono.CodeContracts/Mono.CodeContracts-net_4_5.csproj
mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter-net_4_5.csproj
mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite-net_4_5.csproj
mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs
mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs
mcs/class/Mono.Data.Sqlite/Test/SqliteFunctionTests.cs
mcs/class/Mono.Data.Tds/Mono.Data.Tds-net_4_5.csproj
mcs/class/Mono.Debugger.Soft/Makefile
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft-net_4_5.csproj
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInterpreter.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
mcs/class/Mono.Debugger.Soft/Test/dtest.cs
mcs/class/Mono.Http/Mono.Http-net_4_5.csproj
mcs/class/Mono.Management/Mono.Management-net_4_5.csproj
mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ-net_4_5.csproj
mcs/class/Mono.Messaging/Mono.Messaging-net_4_5.csproj
mcs/class/Mono.Options/Mono.Options-net_4_5.csproj
mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/IMonoTaskScheduler.xml [deleted file]
mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/MonoTaskExtensions.xml [deleted file]
mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/ThreadWorker.xml [deleted file]
mcs/class/Mono.Parallel/Documentation/en/index.xml
mcs/class/Mono.Parallel/Mono.Parallel-net_4_0.csproj
mcs/class/Mono.Parallel/Mono.Parallel-net_4_5.csproj
mcs/class/Mono.Parallel/Mono.Parallel-tests-net_4_0.csproj
mcs/class/Mono.Parallel/Mono.Parallel-tests-net_4_5.csproj
mcs/class/Mono.Parallel/Mono.Parallel.dll.sources
mcs/class/Mono.Parallel/Mono.Parallel_test.dll.sources
mcs/class/Mono.Parallel/Mono.Threading.Tasks/FixedTaskScheduler.cs [deleted file]
mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskExtensions.cs [deleted file]
mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskScheduler.cs [deleted file]
mcs/class/Mono.Parallel/Mono.Threading.Tasks/ThreadWorker.cs [deleted file]
mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskExtensionsTests.cs [deleted file]
mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskSchedulerTests.cs [deleted file]
mcs/class/Mono.Posix/Mono.Posix-net_4_5.csproj
mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs
mcs/class/Mono.Security.Win32/Mono.Security.Win32-net_4_5.csproj
mcs/class/Mono.Security/Mono.Security-net_4_5.csproj
mcs/class/Mono.Security/Mono.Security-tests-net_2_0.csproj
mcs/class/Mono.Security/Mono.Security-tests-net_4_0.csproj
mcs/class/Mono.Security/Mono.Security-tests-net_4_5.csproj
mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs
mcs/class/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs
mcs/class/Mono.Security/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtension.cs
mcs/class/Mono.Security/Mono.Security.X509.Extensions/SubjectKeyIdentifierExtension.cs
mcs/class/Mono.Security/Mono.Security_test.dll.sources
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs
mcs/class/Mono.Security/Test/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtensionTest.cs [new file with mode: 0644]
mcs/class/Mono.Security/Test/Mono.Security.X509.Extensions/SubjectKeyIdentifierExtensionTest.cs [new file with mode: 0644]
mcs/class/Mono.Simd/Mono.Simd-net_4_5.csproj
mcs/class/Mono.Tasklets/Mono.Tasklets-net_4_5.csproj
mcs/class/Mono.WebBrowser/Mono.WebBrowser-net_4_5.csproj
mcs/class/Mono.XBuild.Tasks/Mono.XBuild.Tasks-net_4_5.csproj
mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap-net_4_5.csproj
mcs/class/Npgsql/Npgsql-net_4_5.csproj
mcs/class/PEAPI/PEAPI-net_4_5.csproj
mcs/class/RabbitMQ.Client/src/apigen/RabbitMQ.Client.Apigen-net_4_5.csproj
mcs/class/RabbitMQ.Client/src/client/RabbitMQ.Client-net_4_5.csproj
mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources
mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs [deleted file]
mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs [deleted file]
mcs/class/System.ComponentModel.Composition/System.ComponentModel.Composition-net_4_5.csproj
mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_5.csproj
mcs/class/System.Configuration.Install/System.Configuration.Install-net_4_5.csproj
mcs/class/System.Configuration/Makefile
mcs/class/System.Configuration/System.Configuration-net_4_5.csproj
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
mcs/class/System.Core/System.Core-net_4_5.csproj
mcs/class/System.Core/System.Core-plaincore-net_4_5.csproj
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs
mcs/class/System.Core/Test/System.IO.MemoryMappedFiles/MemoryMappedFileTest.cs
mcs/class/System.Core/mobile_System.Core.dll.sources
mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions-net_4_5.csproj
mcs/class/System.Data.Linq/System.Data.Linq-net_4_5.csproj
mcs/class/System.Data.OracleClient/System.Data.OracleClient-net_4_5.csproj
mcs/class/System.Data.Services.Client/System.Data.Services.Client-net_4_5.csproj
mcs/class/System.Data.Services/System.Data.Services-net_4_5.csproj
mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs
mcs/class/System.Data/System.Data-net_4_5.csproj
mcs/class/System.Data/System.Data/DataColumn.cs
mcs/class/System.Data/System.Data/DataRow.cs
mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs
mcs/class/System.Data/Test/System.Data/DataRowTest2.cs
mcs/class/System.Design/System.Design-net_4_5.csproj
mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols-net_4_5.csproj
mcs/class/System.DirectoryServices/System.DirectoryServices-net_4_5.csproj
mcs/class/System.Drawing.Design/System.Drawing.Design-net_4_5.csproj
mcs/class/System.Drawing/System.Drawing-net_4_5.csproj
mcs/class/System.Drawing/System.Drawing/Graphics.cs
mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs
mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs
mcs/class/System.Dynamic/System.Dynamic-net_4_5.csproj
mcs/class/System.EnterpriseServices/System.EnterpriseServices-net_4_5.csproj
mcs/class/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem-net_4_5.csproj
mcs/class/System.IO.Compression/System.IO.Compression-net_4_5.csproj
mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs
mcs/class/System.IO.Compression/ZipArchiveEntry.cs
mcs/class/System.IdentityModel.Selectors/System.IdentityModel.Selectors-net_4_5.csproj
mcs/class/System.IdentityModel/System.IdentityModel-net_4_5.csproj
mcs/class/System.Json.Microsoft/System.Json.Microsoft-net_4_5.csproj
mcs/class/System.Json/System.Json-net_4_5.csproj
mcs/class/System.Json/System.Json/JsonPrimitive.cs
mcs/class/System.Json/System.Json/JsonValue.cs
mcs/class/System.Json/Test/System.Json/JsonValueTest.cs
mcs/class/System.Management/System.Management-net_4_5.csproj
mcs/class/System.Messaging/System.Messaging-net_4_5.csproj
mcs/class/System.Net.Http.Formatting/System.Net.Http.Formatting-net_4_5.csproj
mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest-net_4_5.csproj
mcs/class/System.Net.Http/System.Net.Http-net_4_5.csproj
mcs/class/System.Net.Http/System.Net.Http/DelegatingHandler.cs
mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
mcs/class/System.Net.Http/System.Net.Http_test.dll.sources
mcs/class/System.Net.Http/Test/System.Net.Http/DelegatingHandlerTest.cs [new file with mode: 0644]
mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
mcs/class/System.Net/System.Net-net_4_5.csproj
mcs/class/System.Numerics/System.Numerics-net_4_5.csproj
mcs/class/System.Numerics/System.Numerics/BigInteger.cs
mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs
mcs/class/System.Reactive.Core/System.Reactive.Core-net_4_5.csproj
mcs/class/System.Reactive.Debugger/System.Reactive.Debugger-net_4_5.csproj
mcs/class/System.Reactive.Experimental/System.Reactive.Experimental-net_4_5.csproj
mcs/class/System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj
mcs/class/System.Reactive.Linq/System.Reactive.Linq-net_4_5.csproj
mcs/class/System.Reactive.Observable.Aliases/System.Reactive.Observable.Aliases-net_4_5.csproj
mcs/class/System.Reactive.PlatformServices/System.Reactive.PlatformServices-net_4_5.csproj
mcs/class/System.Reactive.Providers/System.Reactive.Providers-net_4_5.csproj
mcs/class/System.Reactive.Runtime.Remoting/System.Reactive.Runtime.Remoting-net_4_5.csproj
mcs/class/System.Reactive.Windows.Forms/System.Reactive.Windows.Forms-net_4_5.csproj
mcs/class/System.Reactive.Windows.Threading/System.Reactive.Windows.Threading-net_4_5.csproj
mcs/class/System.Runtime.Caching/System.Runtime.Caching-net_4_5.csproj
mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs
mcs/class/System.Runtime.DurableInstancing/System.Runtime.DurableInstancing-net_4_5.csproj
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting-net_4_5.csproj
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/RemotingThreadPool.cs
mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap-net_4_5.csproj
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
mcs/class/System.Security/System.Security-net_4_5.csproj
mcs/class/System.ServiceModel.Activation/System.ServiceModel.Activation-net_4_5.csproj
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery-net_4_5.csproj
mcs/class/System.ServiceModel.Routing/System.ServiceModel.Routing-net_4_5.csproj
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationWriter.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Web-net_4_5.csproj
mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs
mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs
mcs/class/System.ServiceModel/System.ServiceModel-net_4_5.csproj
mcs/class/System.ServiceModel/System.ServiceModel-plainservice-net_4_5.csproj
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataExchangeBindingsTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs
mcs/class/System.ServiceProcess/System.ServiceProcess-net_4_5.csproj
mcs/class/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow-net_4_5.csproj
mcs/class/System.Transactions/System.Transactions-net_4_5.csproj
mcs/class/System.Web.Abstractions/System.Web.Abstractions-net_4_5.csproj
mcs/class/System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_5.csproj
mcs/class/System.Web.DynamicData/System.Web.DynamicData-net_4_5.csproj
mcs/class/System.Web.Extensions.Design/System.Web.Extensions.Design-net_4_5.csproj
mcs/class/System.Web.Extensions/System.Web.Extensions-net_4_5.csproj
mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs
mcs/class/System.Web.Http.SelfHost/System.Web.Http.SelfHost-net_4_5.csproj
mcs/class/System.Web.Http.WebHost/System.Web.Http.WebHost-net_4_5.csproj
mcs/class/System.Web.Http/System.Web.Http-net_4_5.csproj
mcs/class/System.Web.Mvc2/System.Web.Mvc2-net_4_5.csproj
mcs/class/System.Web.Mvc3/System.Web.Mvc3-net_4_5.csproj
mcs/class/System.Web.Razor/System.Web.Razor-net_4_5.csproj
mcs/class/System.Web.Routing/System.Web.Routing-net_4_5.csproj
mcs/class/System.Web.Services/System.Web.Services-net_4_5.csproj
mcs/class/System.Web.WebPages.Deployment/System.Web.WebPages.Deployment-net_4_5.csproj
mcs/class/System.Web.WebPages.Razor/System.Web.WebPages.Razor-net_4_5.csproj
mcs/class/System.Web.WebPages/System.Web.WebPages-net_4_5.csproj
mcs/class/System.Web/System.Web-net_4_5.csproj
mcs/class/System.Web/System.Web-plainweb-net_4_5.csproj
mcs/class/System.Web/System.Web/HttpResponse.cs
mcs/class/System.Web/System.Web/MimeTypes.cs
mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs
mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs
mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs
mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization-net_4_5.csproj
mcs/class/System.Windows/System.Windows-net_4_5.csproj
mcs/class/System.XML/Makefile
mcs/class/System.XML/System.Xml-bare-net_4_5.csproj
mcs/class/System.XML/System.Xml-net_4_5.csproj
mcs/class/System.XML/System.Xml.XPath/.gitignore
mcs/class/System.XML/System.Xml/XmlReader.cs
mcs/class/System.Xaml/Makefile
mcs/class/System.Xaml/System.Windows.Markup/AmbientAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/ArrayExtension.cs
mcs/class/System.Xaml/System.Windows.Markup/ConstructorArgumentAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/ContentPropertyAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/DateTimeValueSerializer.cs
mcs/class/System.Xaml/System.Windows.Markup/DependsOnAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/IComponentConnector.cs
mcs/class/System.Xaml/System.Windows.Markup/INameScope.cs
mcs/class/System.Xaml/System.Windows.Markup/IProvideValueTarget.cs
mcs/class/System.Xaml/System.Windows.Markup/IUriContext.cs
mcs/class/System.Xaml/System.Windows.Markup/IValueSerializerContext.cs
mcs/class/System.Xaml/System.Windows.Markup/IXamlTypeResolver.cs
mcs/class/System.Xaml/System.Windows.Markup/MarkupExtension.cs
mcs/class/System.Xaml/System.Windows.Markup/NameScopePropertyAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/NullExtension.cs
mcs/class/System.Xaml/System.Windows.Markup/RootNamespaceAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/RuntimeNamePropertyAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/StaticExtension.cs
mcs/class/System.Xaml/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/TypeExtension.cs
mcs/class/System.Xaml/System.Windows.Markup/UidPropertyAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/ValueSerializer.cs
mcs/class/System.Xaml/System.Windows.Markup/ValueSerializerAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/XmlLangPropertyAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/XmlnsDefinitionAttribute.cs
mcs/class/System.Xaml/System.Windows.Markup/XmlnsPrefixAttribute.cs
mcs/class/System.Xaml/System.Xaml-net_4_5.csproj
mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs
mcs/class/System.Xaml/System.Xaml/XamlException.cs
mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs
mcs/class/System.Xaml/System.Xaml/XamlMember.cs
mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs
mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs
mcs/class/System.Xaml/System.Xaml/XamlObjectWriterSettings.cs
mcs/class/System.Xaml/System.Xaml/XamlParseException.cs
mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs
mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs
mcs/class/System.Xaml/System.Xaml/XamlServices.cs
mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs
mcs/class/System.Xml.Linq/System.Xml.Linq-net_4_5.csproj
mcs/class/System.Xml.Serialization/System.Xml.Serialization-net_4_5.csproj
mcs/class/System/System-bare-net_4_5.csproj
mcs/class/System/System-net_4_5.csproj
mcs/class/System/System-secxml-net_4_5.csproj
mcs/class/System/System.ComponentModel/BindingList.cs
mcs/class/System/System.Net.Mail/SmtpClient.cs
mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs
mcs/class/System/System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs
mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
mcs/class/System/System.Net.Sockets/Socket_2_1.cs
mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
mcs/class/System/System.Net/ChunkStream.cs
mcs/class/System/System.Net/DigestClient.cs
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Net/MacProxy.cs
mcs/class/System/System.Net/ServicePointManager.cs
mcs/class/System/System.Net/SimpleAsyncResult.cs
mcs/class/System/System.Net/WebClient.cs
mcs/class/System/System.Net/WebConnection.cs
mcs/class/System/System.Net/WebConnectionData.cs
mcs/class/System/System.Net/WebConnectionGroup.cs
mcs/class/System/System.Net/WebConnectionStream.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/OSX509Certificates.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
mcs/class/System/System/AndroidPlatform.cs
mcs/class/System/System_test.dll.sources
mcs/class/System/Test/System.ComponentModel/BindingListTest.cs
mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs [new file with mode: 0644]
mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs
mcs/class/System/Test/System.Net/HttpListener2Test.cs
mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
mcs/class/System/Test/System.Net/WebClientTest.cs
mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs
mcs/class/SystemWebTestShim/SystemWebTestShim-net_4_5.csproj
mcs/class/WebMatrix.Data/WebMatrix.Data-net_4_5.csproj
mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs
mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs
mcs/class/WindowsBase/WindowsBase-net_4_5.csproj
mcs/class/corlib/Makefile
mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs
mcs/class/corlib/System.Collections.Generic/Dictionary.cs
mcs/class/corlib/System.IO/FileInfo.cs
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
mcs/class/corlib/System.Security.Claims/ClaimTypes.cs
mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs
mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs
mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs
mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs
mcs/class/corlib/System.Text/DecoderReplacementFallbackBuffer.cs
mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs
mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs
mcs/class/corlib/System/AggregateException.cs
mcs/class/corlib/System/AndroidPlatform.cs
mcs/class/corlib/System/Array.cs
mcs/class/corlib/System/Console.iOS.cs
mcs/class/corlib/System/DateTime.cs
mcs/class/corlib/System/Delegate.cs
mcs/class/corlib/System/DelegateSerializationHolder.cs
mcs/class/corlib/System/Enum.cs
mcs/class/corlib/System/Environment.cs
mcs/class/corlib/System/Int32.cs
mcs/class/corlib/System/TimeZone.cs
mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentDictionaryTests.cs
mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentQueueTests.cs
mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs
mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs
mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs
mcs/class/corlib/Test/System/DateTimeTest.cs
mcs/class/corlib/Test/System/DelegateTest.cs
mcs/class/corlib/Test/System/EnumTest.cs
mcs/class/corlib/Test/System/LazyTest.cs
mcs/class/corlib/corlib-net_4_5.csproj
mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs
mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs
mcs/class/monodoc/Test/Monodoc.Generators/AvoidCDataTextReaderTests.cs [deleted file]
mcs/class/monodoc/monodoc-net_4_5.csproj
mcs/class/monodoc/monodoc_test.dll.sources
mcs/errors/CS0012-23-lib.il [new file with mode: 0644]
mcs/errors/CS1607-3-lib.cs [deleted file]
mcs/errors/CS8009-lib.cs [new file with mode: 0644]
mcs/errors/Makefile
mcs/errors/cs0012-23.cs [new file with mode: 0644]
mcs/errors/cs0023-20.cs [new file with mode: 0644]
mcs/errors/cs0023-21.cs [new file with mode: 0644]
mcs/errors/cs0023-22.cs [new file with mode: 0644]
mcs/errors/cs0023-23.cs [new file with mode: 0644]
mcs/errors/cs0070-2.cs [new file with mode: 0644]
mcs/errors/cs0100-8.cs [new file with mode: 0644]
mcs/errors/cs0102-99.cs [deleted file]
mcs/errors/cs0103-13.cs [new file with mode: 0644]
mcs/errors/cs0103-14.cs [new file with mode: 0644]
mcs/errors/cs0121-25.cs [new file with mode: 0644]
mcs/errors/cs0127-2.cs [deleted file]
mcs/errors/cs0127-3.cs [deleted file]
mcs/errors/cs0127-4.cs [deleted file]
mcs/errors/cs0133-6.cs [new file with mode: 0644]
mcs/errors/cs0133-7.cs [new file with mode: 0644]
mcs/errors/cs0136-18.cs [new file with mode: 0644]
mcs/errors/cs0136-19.cs [new file with mode: 0644]
mcs/errors/cs0138.cs
mcs/errors/cs0151-3.cs [new file with mode: 0644]
mcs/errors/cs0151-4.cs [new file with mode: 0644]
mcs/errors/cs0151-5.cs [new file with mode: 0644]
mcs/errors/cs0181-2.cs [new file with mode: 0644]
mcs/errors/cs0181-3.cs [new file with mode: 0644]
mcs/errors/cs0181-4.cs [new file with mode: 0644]
mcs/errors/cs0181.cs [new file with mode: 0644]
mcs/errors/cs0182-10.cs [deleted file]
mcs/errors/cs0182-12.cs [deleted file]
mcs/errors/cs0182-13.cs [deleted file]
mcs/errors/cs0182-2.cs [deleted file]
mcs/errors/cs0253-3.cs [new file with mode: 0644]
mcs/errors/cs0429-5.cs [new file with mode: 0644]
mcs/errors/cs0457-4.cs [new file with mode: 0644]
mcs/errors/cs0545-2.cs [new file with mode: 0644]
mcs/errors/cs0546-2.cs [new file with mode: 0644]
mcs/errors/cs0573-2.cs [deleted file]
mcs/errors/cs0573.cs [deleted file]
mcs/errors/cs0579-9.cs [new file with mode: 0644]
mcs/errors/cs0591-2.cs [new file with mode: 0644]
mcs/errors/cs0591-3.cs [new file with mode: 0644]
mcs/errors/cs0591-4.cs [new file with mode: 0644]
mcs/errors/cs0591-5.cs [new file with mode: 0644]
mcs/errors/cs0591-6.cs [new file with mode: 0644]
mcs/errors/cs0591.cs
mcs/errors/cs0647-10.cs [deleted file]
mcs/errors/cs0647-11.cs [deleted file]
mcs/errors/cs0647-12.cs [deleted file]
mcs/errors/cs0647-13.cs [deleted file]
mcs/errors/cs0647-15.cs [deleted file]
mcs/errors/cs0647-16.cs [deleted file]
mcs/errors/cs0647-17.cs [deleted file]
mcs/errors/cs0647-18.cs [deleted file]
mcs/errors/cs0647-19.cs [deleted file]
mcs/errors/cs0647-2.cs [deleted file]
mcs/errors/cs0647-20.cs [deleted file]
mcs/errors/cs0647-3.cs [deleted file]
mcs/errors/cs0647-4.cs [deleted file]
mcs/errors/cs0647-5.cs [deleted file]
mcs/errors/cs0647-6.cs [deleted file]
mcs/errors/cs0647-7.cs [deleted file]
mcs/errors/cs0647-9.cs [deleted file]
mcs/errors/cs0647.cs [deleted file]
mcs/errors/cs0657-23.cs [new file with mode: 0644]
mcs/errors/cs0837-2.cs
mcs/errors/cs0837-3.cs [new file with mode: 0644]
mcs/errors/cs0837-4.cs [new file with mode: 0644]
mcs/errors/cs0837.cs
mcs/errors/cs0840.cs [deleted file]
mcs/errors/cs1061-15.cs [new file with mode: 0644]
mcs/errors/cs1501-16.cs [new file with mode: 0644]
mcs/errors/cs1501-17.cs [new file with mode: 0644]
mcs/errors/cs1525-42.cs
mcs/errors/cs1593-5.cs [new file with mode: 0644]
mcs/errors/cs1607-2.cs [deleted file]
mcs/errors/cs1607-3.cs [deleted file]
mcs/errors/cs1617.cs
mcs/errors/cs1644-19.cs
mcs/errors/cs1644-35.cs [new file with mode: 0644]
mcs/errors/cs1644-36.cs [new file with mode: 0644]
mcs/errors/cs1644-37.cs [new file with mode: 0644]
mcs/errors/cs1644-38.cs [new file with mode: 0644]
mcs/errors/cs1644-39.cs [new file with mode: 0644]
mcs/errors/cs1644-40.cs [new file with mode: 0644]
mcs/errors/cs1644-41.cs [new file with mode: 0644]
mcs/errors/cs1644-42.cs [new file with mode: 0644]
mcs/errors/cs1650-3.cs [new file with mode: 0644]
mcs/errors/cs1700.cs
mcs/errors/cs1953.cs [deleted file]
mcs/errors/cs1984.cs [deleted file]
mcs/errors/cs1985-2.cs [deleted file]
mcs/errors/cs1985.cs [deleted file]
mcs/errors/cs1997-2.cs [deleted file]
mcs/errors/cs4017.cs
mcs/errors/cs4024.cs [new file with mode: 0644]
mcs/errors/cs4025.cs [new file with mode: 0644]
mcs/errors/cs4026.cs [new file with mode: 0644]
mcs/errors/cs4029.cs [new file with mode: 0644]
mcs/errors/cs7007.cs [new file with mode: 0644]
mcs/errors/cs7023-2.cs [new file with mode: 0644]
mcs/errors/cs7023.cs [new file with mode: 0644]
mcs/errors/cs7025.cs [new file with mode: 0644]
mcs/errors/cs7030.cs [new file with mode: 0644]
mcs/errors/cs7034-2.cs [new file with mode: 0644]
mcs/errors/cs7034-3.cs [new file with mode: 0644]
mcs/errors/cs7034.cs [new file with mode: 0644]
mcs/errors/cs7035.cs [new file with mode: 0644]
mcs/errors/cs7042-2.cs [new file with mode: 0644]
mcs/errors/cs7042.cs [new file with mode: 0644]
mcs/errors/cs7049.cs [new file with mode: 0644]
mcs/errors/cs7050.cs [new file with mode: 0644]
mcs/errors/cs7051.cs [new file with mode: 0644]
mcs/errors/cs7055-2.cs [new file with mode: 0644]
mcs/errors/cs7055.cs [new file with mode: 0644]
mcs/errors/cs7059.cs [new file with mode: 0644]
mcs/errors/cs7070-2.cs [new file with mode: 0644]
mcs/errors/cs7070-3.cs [new file with mode: 0644]
mcs/errors/cs7070-4.cs [new file with mode: 0644]
mcs/errors/cs7070.cs [new file with mode: 0644]
mcs/errors/cs7080.cs [new file with mode: 0644]
mcs/errors/cs7081.cs [new file with mode: 0644]
mcs/errors/cs7082.cs [new file with mode: 0644]
mcs/errors/cs7083-2.cs [new file with mode: 0644]
mcs/errors/cs7083.cs [new file with mode: 0644]
mcs/errors/cs7094.cs [new file with mode: 0644]
mcs/errors/cs8009.cs [new file with mode: 0644]
mcs/errors/cs8030-2.cs [new file with mode: 0644]
mcs/errors/cs8030-3.cs [new file with mode: 0644]
mcs/errors/cs8030.cs [new file with mode: 0644]
mcs/errors/cs8031.cs [new file with mode: 0644]
mcs/errors/cs8036.cs [new file with mode: 0644]
mcs/errors/cs8037.cs [new file with mode: 0644]
mcs/errors/cs8038.cs [new file with mode: 0644]
mcs/errors/cs8039.cs [new file with mode: 0644]
mcs/errors/cs8041.cs [new file with mode: 0644]
mcs/errors/cs8043.cs [new file with mode: 0644]
mcs/errors/cs8049.cs [new file with mode: 0644]
mcs/errors/cs8050.cs [new file with mode: 0644]
mcs/errors/cs8051.cs [new file with mode: 0644]
mcs/errors/cs8052.cs [new file with mode: 0644]
mcs/errors/cs8053.cs [new file with mode: 0644]
mcs/errors/cs8054-2.cs [new file with mode: 0644]
mcs/errors/cs8054-3.cs [new file with mode: 0644]
mcs/errors/cs8054.cs [new file with mode: 0644]
mcs/errors/cs8072-2.cs [new file with mode: 0644]
mcs/errors/cs8072.cs [new file with mode: 0644]
mcs/errors/cs9001.cs [deleted file]
mcs/errors/cs9002.cs [deleted file]
mcs/errors/cs9003.cs [deleted file]
mcs/errors/cs9004.cs [deleted file]
mcs/errors/cs9005.cs [deleted file]
mcs/errors/cs9006.cs [deleted file]
mcs/errors/cs9007.cs [deleted file]
mcs/jay/main.c
mcs/mcs/anonymous.cs
mcs/mcs/argument.cs
mcs/mcs/assembly.cs
mcs/mcs/assign.cs
mcs/mcs/async.cs
mcs/mcs/attribute.cs
mcs/mcs/cfold.cs
mcs/mcs/class.cs
mcs/mcs/codegen.cs
mcs/mcs/constant.cs
mcs/mcs/context.cs
mcs/mcs/convert.cs
mcs/mcs/cs-parser.jay
mcs/mcs/cs-tokenizer.cs
mcs/mcs/delegate.cs
mcs/mcs/ecore.cs
mcs/mcs/eval.cs
mcs/mcs/expression.cs
mcs/mcs/field.cs
mcs/mcs/flowanalysis.cs
mcs/mcs/generic.cs
mcs/mcs/import.cs
mcs/mcs/iterators.cs
mcs/mcs/mcs-net_4_5.csproj
mcs/mcs/membercache.cs
mcs/mcs/method.cs
mcs/mcs/namespace.cs
mcs/mcs/nullable.cs
mcs/mcs/parameter.cs
mcs/mcs/property.cs
mcs/mcs/report.cs
mcs/mcs/settings.cs
mcs/mcs/statement.cs
mcs/mcs/typemanager.cs
mcs/mcs/typespec.cs
mcs/tests/Makefile
mcs/tests/dtest-056.cs
mcs/tests/gtest-311.cs [deleted file]
mcs/tests/gtest-391.cs
mcs/tests/gtest-409.cs
mcs/tests/gtest-502.cs
mcs/tests/gtest-614.cs [new file with mode: 0644]
mcs/tests/gtest-615.cs [new file with mode: 0644]
mcs/tests/gtest-616.cs [new file with mode: 0644]
mcs/tests/gtest-617.cs [new file with mode: 0644]
mcs/tests/gtest-618.cs [new file with mode: 0644]
mcs/tests/gtest-619.cs [new file with mode: 0644]
mcs/tests/gtest-620.cs [new file with mode: 0644]
mcs/tests/gtest-autoproperty-09.cs [new file with mode: 0644]
mcs/tests/gtest-collectioninit-04.cs [new file with mode: 0644]
mcs/tests/gtest-etree-01.cs
mcs/tests/gtest-initialize-13.cs [new file with mode: 0644]
mcs/tests/gtest-lambda-35.cs [new file with mode: 0644]
mcs/tests/gtest-named-05.cs [new file with mode: 0644]
mcs/tests/gtest-optional-31.cs [new file with mode: 0644]
mcs/tests/gtest-optional-32.cs [new file with mode: 0644]
mcs/tests/gtest-optional-33.cs [new file with mode: 0644]
mcs/tests/test-640.cs
mcs/tests/test-671.cs
mcs/tests/test-77.cs
mcs/tests/test-833.cs
mcs/tests/test-859.cs [new file with mode: 0644]
mcs/tests/test-892.cs [new file with mode: 0644]
mcs/tests/test-893.cs [new file with mode: 0644]
mcs/tests/test-894.cs [new file with mode: 0644]
mcs/tests/test-895.cs [new file with mode: 0644]
mcs/tests/test-896.cs [new file with mode: 0644]
mcs/tests/test-897.cs [new file with mode: 0644]
mcs/tests/test-898.cs [new file with mode: 0644]
mcs/tests/test-899.cs [new file with mode: 0644]
mcs/tests/test-900.cs [new file with mode: 0644]
mcs/tests/test-901.cs [new file with mode: 0644]
mcs/tests/test-902.cs [new file with mode: 0644]
mcs/tests/test-903.cs [new file with mode: 0644]
mcs/tests/test-async-13.cs
mcs/tests/test-async-15.cs
mcs/tests/test-async-22.cs
mcs/tests/test-async-35.cs
mcs/tests/test-async-63.cs [new file with mode: 0644]
mcs/tests/test-async-64.cs [new file with mode: 0644]
mcs/tests/test-async-65.cs [new file with mode: 0644]
mcs/tests/test-async-66.cs [new file with mode: 0644]
mcs/tests/test-async-67.cs [new file with mode: 0644]
mcs/tests/test-async-69.cs [new file with mode: 0644]
mcs/tests/test-async-70.cs [new file with mode: 0644]
mcs/tests/test-async-71.cs [new file with mode: 0644]
mcs/tests/test-async-72.cs [new file with mode: 0644]
mcs/tests/test-async-73.cs [new file with mode: 0644]
mcs/tests/test-async-74.cs [new file with mode: 0644]
mcs/tests/test-ex-filter-03.cs [new file with mode: 0644]
mcs/tests/test-ex-filter-04.cs [new file with mode: 0644]
mcs/tests/test-ex-filter-05.cs [new file with mode: 0644]
mcs/tests/test-ex-filter-06.cs [new file with mode: 0644]
mcs/tests/test-expression-bodied-01.cs [new file with mode: 0644]
mcs/tests/test-null-operator-01.cs [new file with mode: 0644]
mcs/tests/test-null-operator-02.cs [new file with mode: 0644]
mcs/tests/test-null-operator-03.cs [new file with mode: 0644]
mcs/tests/test-null-operator-04.cs [new file with mode: 0644]
mcs/tests/test-null-operator-05.cs [new file with mode: 0644]
mcs/tests/test-partial-26.cs
mcs/tests/test-primary-ctor-01.cs
mcs/tests/test-primary-ctor-02.cs
mcs/tests/test-primary-ctor-03.cs
mcs/tests/test-primary-ctor-05.cs
mcs/tests/test-primary-ctor-06.cs [new file with mode: 0644]
mcs/tests/test-primary-ctor-07.cs [new file with mode: 0644]
mcs/tests/test-primary-ctor-08.cs [new file with mode: 0644]
mcs/tests/test-primary-ctor-09.cs [new file with mode: 0644]
mcs/tests/test-static-using-01.cs [new file with mode: 0644]
mcs/tests/test-static-using-02.cs [new file with mode: 0644]
mcs/tests/test-static-using-03.cs [new file with mode: 0644]
mcs/tests/test-static-using-04.cs [new file with mode: 0644]
mcs/tests/test-static-using-05.cs [new file with mode: 0644]
mcs/tests/test-static-using-06.cs [new file with mode: 0644]
mcs/tests/test-xml-063-ref.xml
mcs/tests/test-xml-063.cs
mcs/tests/ver-il-net_4_5.xml
mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
mcs/tools/linker/Mono.Linker.csproj
mcs/tools/linker/Mono.Linker/LinkContext.cs
mcs/tools/mdoc/.gitignore [new file with mode: 0644]
mcs/tools/mono-shlib-cop/Makefile
mcs/tools/mono-shlib-cop/test.cs
mcs/tools/mono-shlib-cop/test.dll.config
mcs/tools/mono-shlib-cop/test.dll.out
mcs/tools/msbuild/Main.cs
mcs/tools/msbuild/Makefile
mcs/tools/msbuild/SolutionParser.cs
mcs/tools/msbuild/data/msbuild.rsp [new file with mode: 0644]
mcs/tools/xbuild/Makefile
mcs/tools/xbuild/SolutionParser.cs
mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets
mcs/tools/xbuild/data/12.0/Microsoft.Common.targets
mcs/tools/xbuild/data/4.0/Microsoft.CSharp.targets
mcs/tools/xbuild/frameworks/net_4.5.1.xml [new file with mode: 0644]
mono-core.spec.in
mono/arch/s390x/s390x-codegen.h
mono/dis/util.c
mono/io-layer/io.c
mono/io-layer/misc-private.h
mono/io-layer/processes.c
mono/io-layer/security.c
mono/io-layer/wapi_glob.c
mono/metadata/Makefile.am.in
mono/metadata/abi-details.h [new file with mode: 0644]
mono/metadata/appdomain.c
mono/metadata/appdomain.h
mono/metadata/assembly.c
mono/metadata/attach.c
mono/metadata/attach.h
mono/metadata/boehm-gc.c
mono/metadata/char-conversions.h
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/cominterop.c
mono/metadata/console-io.h
mono/metadata/console-unix.c
mono/metadata/coree.c
mono/metadata/coree.h
mono/metadata/culture-info.h
mono/metadata/debug-helpers.c
mono/metadata/decimal.h
mono/metadata/domain-internals.h
mono/metadata/domain.c
mono/metadata/file-mmap-posix.c [new file with mode: 0644]
mono/metadata/file-mmap-windows.c [new file with mode: 0644]
mono/metadata/file-mmap.h [new file with mode: 0644]
mono/metadata/filewatcher.h
mono/metadata/gc-internal.h
mono/metadata/gc.c
mono/metadata/icall-def.h
mono/metadata/icall.c
mono/metadata/image.c
mono/metadata/loader.c
mono/metadata/locales.h
mono/metadata/marshal.c
mono/metadata/marshal.h
mono/metadata/metadata-cross-helpers.c [new file with mode: 0644]
mono/metadata/metadata-internals.h
mono/metadata/metadata.c
mono/metadata/metadata.h
mono/metadata/method-builder.c
mono/metadata/monitor.c
mono/metadata/monitor.h
mono/metadata/mono-basic-block.h
mono/metadata/mono-debug.c
mono/metadata/mono-hash.c
mono/metadata/null-gc.c
mono/metadata/object-internals.h
mono/metadata/object-offsets.h [new file with mode: 0644]
mono/metadata/object.c
mono/metadata/object.h
mono/metadata/process.c
mono/metadata/process.h
mono/metadata/rand.c
mono/metadata/rand.h
mono/metadata/reflection.c
mono/metadata/reflection.h
mono/metadata/runtime.h
mono/metadata/security-core-clr.h
mono/metadata/security.h
mono/metadata/sgen-alloc.c
mono/metadata/sgen-bridge.c
mono/metadata/sgen-bridge.h
mono/metadata/sgen-cardtable.c
mono/metadata/sgen-conf.h
mono/metadata/sgen-debug.c
mono/metadata/sgen-descriptor.c
mono/metadata/sgen-descriptor.h
mono/metadata/sgen-fin-weak-hash.c
mono/metadata/sgen-gc.c
mono/metadata/sgen-gc.h
mono/metadata/sgen-gray.c
mono/metadata/sgen-gray.h
mono/metadata/sgen-los.c
mono/metadata/sgen-marksweep.c
mono/metadata/sgen-memory-governor.c
mono/metadata/sgen-memory-governor.h
mono/metadata/sgen-new-bridge.c
mono/metadata/sgen-nursery-allocator.c
mono/metadata/sgen-old-bridge.c
mono/metadata/sgen-os-posix.c
mono/metadata/sgen-pinning.c
mono/metadata/sgen-pinning.h
mono/metadata/sgen-protocol.c
mono/metadata/sgen-protocol.h
mono/metadata/sgen-simple-nursery.c
mono/metadata/sgen-split-nursery.c
mono/metadata/sgen-tarjan-bridge.c
mono/metadata/sgen-workers.c
mono/metadata/sgen-workers.h
mono/metadata/socket-io.c
mono/metadata/socket-io.h
mono/metadata/string-icalls.h
mono/metadata/threadpool-internals.h
mono/metadata/threads-types.h
mono/metadata/threads.c
mono/metadata/verify-internals.h
mono/metadata/verify.c
mono/mini/Makefile.am.in
mono/mini/alias-analysis.c
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/basic-calls.cs
mono/mini/basic-long.cs
mono/mini/cpu-amd64.md
mono/mini/cpu-arm.md
mono/mini/cpu-arm64.md
mono/mini/cpu-ia64.md
mono/mini/cpu-ppc.md
mono/mini/cpu-ppc64.md
mono/mini/cpu-s390x.md
mono/mini/cpu-x86.md
mono/mini/debug-mini.c
mono/mini/debugger-agent.c
mono/mini/decompose.c
mono/mini/driver.c
mono/mini/exceptions-amd64.c
mono/mini/exceptions-arm.c
mono/mini/exceptions-mips.c
mono/mini/exceptions-ppc.c
mono/mini/exceptions-s390x.c
mono/mini/exceptions-sparc.c
mono/mini/exceptions-x86.c
mono/mini/gshared.cs
mono/mini/helpers.c
mono/mini/image-writer.c
mono/mini/ir-emit.h
mono/mini/main.c
mono/mini/method-to-ir.c
mono/mini/mini-amd64.c
mono/mini/mini-amd64.h
mono/mini/mini-arm.c
mono/mini/mini-arm.h
mono/mini/mini-codegen.c
mono/mini/mini-cross-helpers.c [new file with mode: 0644]
mono/mini/mini-exceptions.c
mono/mini/mini-gc.c
mono/mini/mini-generic-sharing.c
mono/mini/mini-ia64.c
mono/mini/mini-ia64.h
mono/mini/mini-llvm-cpp.cpp
mono/mini/mini-llvm.c
mono/mini/mini-mips.c
mono/mini/mini-mips.h
mono/mini/mini-ops.h
mono/mini/mini-posix.c
mono/mini/mini-ppc.c
mono/mini/mini-ppc.h
mono/mini/mini-s390x.c
mono/mini/mini-s390x.h
mono/mini/mini-sparc.c
mono/mini/mini-sparc.h
mono/mini/mini-trampolines.c
mono/mini/mini-unwind.h
mono/mini/mini-windows.c
mono/mini/mini-x86.c
mono/mini/mini-x86.h
mono/mini/mini.c
mono/mini/mini.h
mono/mini/objects.cs
mono/mini/simd-intrinsics.c
mono/mini/ssa.c
mono/mini/ssapre.c
mono/mini/support-s390x.h [new file with mode: 0644]
mono/mini/tasklets.c
mono/mini/tramp-amd64.c
mono/mini/tramp-arm.c
mono/mini/tramp-mips.c
mono/mini/tramp-ppc.c
mono/mini/tramp-s390x.c
mono/mini/tramp-x86.c
mono/mini/unwind.c
mono/profiler/decode.c
mono/profiler/proflog.c
mono/profiler/utils.c
mono/tests/.gitignore
mono/tests/Makefile.am
mono/tests/finalizer-exception.cs
mono/tests/finalizer-wait.cs
mono/tests/gc-descriptors/Makefile.am
mono/tests/gc-graystack-stress.cs [new file with mode: 0644]
mono/tests/marshal2.cs
mono/tests/marshal7.cs
mono/tests/reflection-load-with-context-lib.cs [new file with mode: 0644]
mono/tests/reflection-load-with-context-second-lib.cs [new file with mode: 0644]
mono/tests/reflection-load-with-context.cs [new file with mode: 0644]
mono/tests/stress-runner.pl
mono/unit-tests/.gitignore
mono/unit-tests/Makefile.am
mono/unit-tests/test-conc-hashtable.c [new file with mode: 0644]
mono/unit-tests/test-gc-memfuncs.c
mono/utils/Makefile.am
mono/utils/atomic.c
mono/utils/atomic.h
mono/utils/gc_wrapper.h
mono/utils/lock-free-alloc.c
mono/utils/mono-codeman.c
mono/utils/mono-compiler.h
mono/utils/mono-conc-hashtable.c [new file with mode: 0644]
mono/utils/mono-conc-hashtable.h [new file with mode: 0644]
mono/utils/mono-context.h
mono/utils/mono-counters.c
mono/utils/mono-error.h
mono/utils/mono-hwcap-s390x.c
mono/utils/mono-hwcap-s390x.h
mono/utils/mono-linked-list-set.c
mono/utils/mono-mmap.c
mono/utils/mono-poll.h
mono/utils/mono-semaphore.c
mono/utils/mono-sigcontext.h
mono/utils/mono-threads-mach-helper.c
mono/utils/mono-threads-posix.c
mono/utils/mono-threads-windows.c
mono/utils/mono-threads.c
mono/utils/mono-threads.h
mono/utils/strtod.c
mono/utils/win64.asm [new file with mode: 0644]
msvc/libmono.vcxproj
msvc/libmonoruntime.vcxproj
msvc/libmonoutils.vcxproj
msvc/mono.def
msvc/mono.props
msvc/monosgen.def
msvc/monosgen64.def [new file with mode: 0644]
msvc/scripts/csproj.tmpl
msvc/scripts/genproj.cs
runtime/Makefile.am
support/grp.c
support/macros.c
support/minizip/zip.c
support/nl.c
support/old-map.c
support/serial.c
support/stdio.c
support/supportw.c
support/sys-statvfs.c
support/sys-time.c
support/syslog.c
support/x-struct-str.c
support/zlib-helper.c
tools/sgen/sgen-grep-binprot.c
winconfig.h

index c7e0c474a2dcaab7cec15a4004a7f66ffa893f44..5c4cb01ff15ecaa8cc8e61dd4101ee6985956522 100644 (file)
@@ -1,5 +1,5 @@
 # ensure LF endings on all checkouts
-configure.in crlf=input
+configure.ac crlf=input
 
 # ensure native line endings on checkout
 *.c    crlf
index c5dbc5d7ad8a117f0145cba3a405a2ebe4eca3b0..ea48a9e7fb97074a8d4e78730d00394afbf64e44 100644 (file)
@@ -79,6 +79,7 @@ releases
 stamp-h
 stamp-h1
 stamp-h.in
+/test-driver
 *~
 *.swp
 *.o
index 66dd3bd69520c210a51ec86cbeb73228e56daf7f..c56d15a99a006239e87eda8edb4bbd51323d59df 100644 (file)
@@ -69,3 +69,16 @@ a maintainer will likely merge it. Otherwise, you can amend your pull
 request to fix build breakage and Jenkins will test it again.
 
 [2] http://monojenkins.cloudapp.net
+
+# Inactivity
+
+Occasionally, a pull request sits for several months without any
+response from the author. This isn't necessarily an issue, but we may
+sometimes decide to close pull requests that have not seen any
+progress for a long time. This is in interest of keeping the pull
+request list clean so that other pull requests don't get lost in the
+clutter.
+
+If we do close your pull request due to inactivity, you're more than
+welcome to submit it anew after you address any comments or issues that
+were brought up on the original pull request.
index 30f8cdef0f477fde761d3e515ed5b9faf9aa343e..c44c4b93c09690f1949a64b77994b52215b39cb4 100644 (file)
@@ -1,5 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 
+AM_CFLAGS = $(WERROR_CFLAGS)
+
 MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
 
 if CROSS_COMPILING
@@ -48,7 +50,11 @@ GIT_DIR ?= $(srcdir)/.git
 dist-hook:
        test -d $(distdir)/mcs || mkdir $(distdir)/mcs
        d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
-       rm -rf `find $(top_distdir)/external -path '*\.git' -and -type d`
+       rm -rf `find $(top_distdir)/external -path '*\.git'`
+       rm -f `find $(top_distdir)/external -path '*\.exe'`
+       rm -f `find $(top_distdir)/external -path '*\.dll'`
+       cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
+       cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
 # Disable this for now because it is very slow and causes wrench to timeout:
 #      test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
 
@@ -160,9 +166,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 in configure.ac 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."
+       REV=`$(LLVM_DIR)/bin/llvm-config --version` && sed -e "s,expected_llvm_version=.*,expected_llvm_version=\"$$REV\"," < configure.ac > tmp && mv tmp configure.ac && echo "Version set to $$REV."
 
 
index 07c950004d70bc09294b11f4656a3964d4534ca0..d600ce4ad172f638313959ad71f1251861e78f61 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
 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.
 
+[![Build Status](http://monojenkins.cloudapp.net/job/Mono/badge/icon)](http://monojenkins.cloudapp.net/job/Mono/)
+
 1. [Installation](#compilation-and-installation)
 2. [Using Mono](#using-mono)
 3. [Directory Roadmap](#directory-roadmap)
@@ -34,6 +36,10 @@ a. Build Requirements
   * libzlib - This library and the development headers are required for compression
 file support in the 2.0 profile.
 
+ 4. Mono is required to build Mono. Use a system package or monolite (explained further below)
+ 5. If you have a system Mono (not monolite), you will need to read this: http://mono-project.com/Parallel_Mono_Environments#Setting_up_a_Build_Environment
+
 b. Building the Software
 ------------------------
 
index 16fecf7f8608938102a35d90aadc6319ada10d17..5216cd14a5ef88245107fe9f27c1821914e14025 100644 (file)
@@ -22,7 +22,7 @@ if test x$GCC != xyes; then
     dolt_supported=no
 fi
 case $host in
-i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
+i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
 |amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
     pic_options='-fPIC'
     ;;
@@ -158,7 +158,7 @@ modeok=false
 tagok=false
 for arg in "$[]@"; do
     case "$arg" in
-        --silent) ;;    
+        --silent) ;;
         --mode=compile) modeok=true ;;
         --tag=CC|--tag=CXX) tagok=true ;;
         --quiet) ;;
index a576ed6672afab5a9697e610ce8b6a9e0265b208..5213ecffd3c8f41d5c323cbbb2104d1a4663380f 100755 (executable)
@@ -37,7 +37,7 @@ if [ -z "$LIBTOOL" ]; then
   fi
 fi
 
-(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
+(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
   ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
     echo
     echo "**Error**: You must have \`libtool' installed to compile Mono."
@@ -47,8 +47,8 @@ fi
   }
 }
 
-grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
-  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
+  grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
   (gettext --version) < /dev/null > /dev/null 2>&1 || {
     echo
     echo "**Error**: You must have \`gettext' installed to compile Mono."
@@ -95,7 +95,7 @@ xlc )
 esac
 
 
-if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
+if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
   if test -z "$NO_LIBTOOLIZE" ; then 
     echo "Running libtoolize..."
     ${LIBTOOL}ize --force --copy
@@ -138,7 +138,7 @@ aclocal -Wnone -I m4 -I . $ACLOCAL_FLAGS || {
   exit 1
 }
 
-if grep "^AC_CONFIG_HEADERS" configure.in >/dev/null; then
+if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
   echo "Running autoheader..."
   autoheader || { echo "**Error**: autoheader failed."; exit 1; }
 fi
index 8bcb5ff973c1eb516b0550121872b754aef841ee..4c8ed8c1dc4f6e04ae258737d01c76442172c609 100755 (executable)
@@ -57,7 +57,7 @@ function setup ()
     CROSS_DLL_DIR="$CROSS_DIR/bin"
     PATH=$CROSS_BIN_DIR:$PATH
 
-    MONO_VERSION=`grep AC_INIT configure.in | cut -d ',' -f 2|tr -d '\[ \]'`
+    MONO_VERSION=`grep AC_INIT configure.ac | cut -d ',' -f 2|tr -d '\[ \]'`
     
     if [ -d ./.git ]; then
        MONO_GIT_COMMIT="`git log -1 --format=format:%t`"
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..6ef510e
--- /dev/null
@@ -0,0 +1,3797 @@
+# Process this file with autoconf to produce a configure script.
+#AC_PREREQ([2.62])
+
+AC_INIT(mono, [3.8.1],
+        [http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
+
+AC_CONFIG_SRCDIR([README.md])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
+
+# Gross hack to enable 'make dist' on automake 1.9+tar 1.14.
+# 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 subdir-objects])
+AC_CONFIG_HEADERS([config.h])
+AM_MAINTAINER_MODE
+
+API_VER=2.0
+AC_SUBST(API_VER)
+
+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
+*cygwin* ) LN_S='cp -p';;
+esac
+
+#
+# libgc defaults
+#
+libgc_configure_args=
+
+if test -d $srcdir/libgc ; then
+  libgc_default=included
+else
+  libgc_default=boehm
+fi
+
+# These variables are the CPPFLAGS/CFLAGS passed to libgc's configure
+# libgc should inherit the original CFLAGS/CPPFLAGS passed to configure, i.e. -O0
+CPPFLAGS_FOR_LIBGC=$CPPFLAGS
+CFLAGS_FOR_LIBGC=$CFLAGS
+CPPFLAGS_FOR_EGLIB=$CPPFLAGS
+CFLAGS_FOR_EGLIB=$CFLAGS
+
+# libgc uses some deprecated APIs
+CFLAGS_FOR_LIBGC="$CFLAGS -Wno-deprecated-declarations"
+
+#
+# These are the flags that need to be stored in the mono.pc file for 
+# compiling code that will embed Mono
+#
+libmono_cflags=""
+libmono_ldflags=""
+AC_SUBST(libmono_cflags)
+AC_SUBST(libmono_ldflags)
+
+# Variable to have relocatable .pc files (lib, or lib64)
+reloc_libdir=`basename ${libdir}`
+AC_SUBST(reloc_libdir)
+
+dnl if linker handles the version script
+no_version_script=no
+
+# Set to yes if Unix sockets cannot be created in an anonymous namespace
+need_link_unlink=no
+
+#Set to extra linker flags to be passed to the runtime binaries (mono /mono-sgen)
+extra_runtime_ldflags=""
+
+# Thread configuration inspired by sleepycat's db
+AC_MSG_CHECKING([host platform characteristics])
+libgc_threads=no
+has_dtrace=no
+parallel_mark=yes
+ikvm_native=yes
+
+case "$host" in
+       powerpc*-*-linux*)
+               # https://bugzilla.novell.com/show_bug.cgi?id=504411
+               disable_munmap=yes
+       ;;
+esac
+
+host_win32=no
+target_win32=no
+platform_android=no
+platform_darwin=no
+case "$host" in
+       *-mingw*|*-*-cygwin*)
+               AC_DEFINE(HOST_WIN32,1,[Host Platform is Win32])
+               AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
+               AC_DEFINE(PLATFORM_NO_SYMLINKS,1,[This platform does not support symlinks])
+               host_win32=yes
+               mono_cv_clang=no
+               if test "x$cross_compiling" = "xno"; then
+                       target_win32=yes
+                       if test "x$host" == "x$build" -a "x$host" == "x$target"; then
+                               AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
+                       fi
+               else
+                       target_win32=yes
+                       AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
+                       AC_DEFINE(MINGW_CROSS_COMPILE,1,[Cross-compiling using MinGW])
+               fi
+               HOST_CC="gcc"
+               # Windows 2000 is required that includes Internet Explorer 5.01
+               CPPFLAGS="$CPPFLAGS -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 -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="-mms-bitfields -mwindows"
+               libmono_ldflags="-mms-bitfields -mwindows"
+               libdl=
+               libgc_threads=win32
+               libgc_default=included
+               with_sigaltstack=no
+               with_tls=pthread
+               LN_S=cp
+               # This forces libgc to use the DllMain based thread registration code on win32
+               libgc_configure_args="$libgc_configure_args --enable-win32-dllmain=yes"
+               ;;
+       *-*-*netbsd*)
+               host_win32=no
+               CPPFLAGS="$CPPFLAGS -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE"
+               libmono_cflags="-D_REENTRANT"
+               LDFLAGS="$LDFLAGS -pthread"
+               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
+               libmono_ldflags="-pthread"
+               need_link_unlink=yes
+               libdl="-ldl"
+               libgc_threads=pthreads
+               with_sigaltstack=no
+               use_sigposix=yes
+               ;;
+       *-*-kfreebsd*-gnu)
+               host_win32=no
+               CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP -DTHREAD_LOCAL_ALLOC -pthread"
+               libmono_cflags="-D_REENTRANT -DTHREAD_LOCAL_ALLOC -pthread"
+               libmono_ldflags="-lpthread -pthread"
+               libdl="-ldl"
+               libgc_threads=pthreads
+               need_link_unlink=yes
+               with_sigaltstack=no
+               use_sigposix=yes
+               ;;
+       *-*-*freebsd*)
+               host_win32=no
+               if test "x$PTHREAD_CFLAGS" = "x"; then
+                       CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
+                       libmono_cflags=
+               else
+                       CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
+                       libmono_cflags="$PTHREAD_CFLAGS"
+               fi
+               if test "x$PTHREAD_LIBS" = "x"; then
+                       LDFLAGS="$LDFLAGS -pthread -L/usr/local/lib"
+                       libmono_ldflags="-pthread"
+               else
+                       LDFLAGS="$LDFLAGS $PTHREAD_LIBS -L/usr/local/lib"
+                       libmono_ldflags="$PTHREAD_LIBS"
+               fi
+               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
+               need_link_unlink=yes
+               AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread is a pointer])
+               libdl=
+               libgc_threads=pthreads
+               use_sigposix=yes
+               has_dtrace=yes
+               ;;
+       *-*-*openbsd*)
+               host_win32=no
+               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DPLATFORM_BSD -D_REENTRANT -DUSE_MMAP"
+               if test "x$disable_munmap" != "xyes"; then
+               CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
+               fi
+               libmono_cflags="-D_THREAD_SAFE -D_REENTRANT"
+               LDFLAGS="$LDFLAGS -pthread"
+               need_link_unlink=yes
+               AC_DEFINE(PTHREAD_POINTER_ID)
+               libdl=
+               libgc_default=boehm
+               libgc_threads=pthreads
+               with_sigaltstack=no
+               use_sigposix=yes
+               ;;
+       *-*-linux-android*)
+               host_win32=no
+               platform_android=yes
+               AC_DEFINE(PLATFORM_ANDROID,1,[Targeting the Android platform])
+               AC_DEFINE(TARGET_ANDROID,1,[Targeting the Android platform])
+
+               CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
+               if test "x$disable_munmap" != "xyes"; then
+                       CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
+               fi
+               libmono_cflags="-D_REENTRANT"
+               libdl="-ldl"
+               libgc_threads=pthreads
+               use_sigposix=yes
+
+               with_tls=pthread
+               with_sigaltstack=no
+               with_static_mono=no
+
+               # Android doesn't support boehm, as it's missing <link.h>
+               support_boehm=no
+               with_gc=sgen
+
+               # isinf(3) requires -lm; see isinf check below
+               LDFLAGS="$LDFLAGS -lm"
+
+               # Bionic's <pthread.h> sets PTHREAD_STACK_MIN=2*PAGE_SIZE; doesn't define
+               # PAGE_SIZE; breaks mono/io-layer/collection.c
+               # Bionic doesn't provide S_IWRITE; breaks io-layer/io.c
+               CFLAGS="$CFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
+               CXXFLAGS="$CXXFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
+
+               # The configure check can't detect this
+               AC_DEFINE(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support])
+
+               # to bypass the underscore linker check, can't work when cross-compiling
+               mono_cv_uscore=yes
+               mono_cv_clang=no
+               ;;
+       *-*-linux*)
+               host_win32=no
+               CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
+               if test "x$disable_munmap" != "xyes"; then
+                       CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
+               fi
+               libmono_cflags="-D_REENTRANT"
+               libdl="-ldl"
+               libgc_threads=pthreads
+               use_sigposix=yes
+               if test "x$cross_compiling" != "xno"; then
+                       # to bypass the underscore linker check, not
+                       # available during cross-compilation
+                       mono_cv_uscore=no
+                fi
+               case "$host" in
+               aarch64-*)
+                       support_boehm=no
+                       with_gc=sgen
+                       ;;
+               esac
+               ;;
+       *-*-nacl*)
+               host_win32=no
+               CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
+               if test "x$disable_munmap" != "xyes"; then
+                       CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
+               fi
+               libmono_cflags="-D_REENTRANT"
+               libdl=
+               libgc_threads=pthreads
+               libgc_default=boehm
+               use_sigposix=yes
+               ikvm_native=no
+               AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
+               AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
+               ;;
+       *-*-hpux*)
+               host_win32=no
+               CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
+               # +ESdbgasm only valid on bundled cc on RISC
+               # silently ignored for ia64
+               if test $GCC != "yes"; then
+                       CFLAGS="$CFLAGS +ESdbgasm"
+                       # Arrange for run-time dereferencing of null
+                       # pointers to produce a SIGSEGV signal.
+                       LDFLAGS="$LDFLAGS -z"
+               fi
+               CFLAGS="$CFLAGS +ESdbgasm"
+               LDFLAGS="$LDFLAGS -z"
+               libmono_cflags="-D_REENTRANT"
+               libmono_ldflags="-lpthread"
+               libgc_threads=pthreads
+               need_link_unlink=yes
+               use_sigposix=yes
+               ;;
+       *-*-solaris*)
+               host_win32=no
+               CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DPLATFORM_SOLARIS"
+               need_link_unlink=yes
+               libmono_cflags="-D_REENTRANT"
+               libgc_threads=pthreads
+               # This doesn't seem to work on solaris/x86, but the configure test runs
+               with_tls=pthread
+               has_dtrace=yes
+               use_sigposix=yes
+               enable_solaris_tar_check=yes
+               ;;
+       *-*-darwin*)
+               parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
+               host_win32=no
+               platform_darwin=yes
+               target_mach=yes
+               CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
+               CPPFLAGS="$CPPFLAGS -DGetCurrentProcess=MonoGetCurrentProcess -DGetCurrentThread=MonoGetCurrentThread -DCreateEvent=MonoCreateEvent"
+               libmono_cflags="-D_THREAD_SAFE"
+               need_link_unlink=yes
+               AC_DEFINE(PTHREAD_POINTER_ID)
+               AC_DEFINE(USE_MACH_SEMA, 1, [...])
+               no_version_script=yes
+               libdl=
+               libgc_threads=pthreads
+               has_dtrace=yes
+               if test "x$cross_compiling" = "xyes"; then
+                       has_broken_apple_cpp=yes
+               fi
+               dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin*, but
+               dnl its gcc defaults to 64-bit mode.  They have also deprecated the usage of ucontext
+               dnl we need to set some flags to build our 32-bit binaries on 10.6 properly
+               case "$host" in
+                       dnl Snow Leopard and newer config.guess reports as this
+                       i*86-*-darwin*)
+                               BROKEN_DARWIN_FLAGS="-arch i386 -D_XOPEN_SOURCE"
+                               BROKEN_DARWIN_CPPFLAGS="-D_XOPEN_SOURCE"
+                               CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_CPPFLAGS"
+                               CFLAGS="$CFLAGS $BROKEN_DARWIN_FLAGS"
+                               CXXFLAGS="$CXXFLAGS $BROKEN_DARWIN_FLAGS"
+                               CCASFLAGS="$CCASFLAGS $BROKEN_DARWIN_FLAGS"
+                               CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC $BROKEN_DARWIN_CPPFLAGS"
+                               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"
+                               ;;
+                       x*64-*-darwin*)
+                               ;;
+                       arm*-darwin*)
+                               has_dtrace=no
+                               ;;                      
+               esac
+               ;;
+       *-*-haiku*)
+               host_win32=no
+               CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_THREAD_SAFE"
+               libmono_cflags="-D_REENTRANT -D_THREAD_SAFE"
+               libdl=
+               LIBS="$LIBS -lnetwork"
+               need_link_unlink=yes
+               AC_DEFINE(PTHREAD_POINTER_ID)
+               libgc_threads=pthreads
+               use_sigposix=yes
+               ;;
+       *)
+               AC_MSG_WARN([*** Please add $host to configure.ac checks!])
+               host_win32=no
+               libdl="-ldl"
+               ;;
+esac
+AC_MSG_RESULT(ok)
+
+if test x$need_link_unlink = xyes; then
+   AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
+fi
+
+AC_SUBST(extra_runtime_ldflags)
+AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes)
+AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
+AM_CONDITIONAL(PLATFORM_GNU, echo x$target_os | grep -q -- -gnu$)
+AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux)
+AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
+AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
+AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
+
+AC_CHECK_TOOL(CC, gcc, gcc)
+AC_PROG_CC
+AC_CHECK_TOOL(CXX, g++, g++)
+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.
+: ${CCASFLAGS='$(CFLAGS)'}
+AC_SUBST(CCAS)
+AC_SUBST(CCASFLAGS)
+
+# AC_PROG_CXX helpfully sets CXX to g++ even if no c++ compiler is found so check
+# GXX instead. See http://lists.gnu.org/archive/html/bug-autoconf/2002-04/msg00056.html
+if test "x$CXX" = "xg++"; then
+       if test "x$GXX" != "xyes"; then
+               # automake/libtool is so broken, it requires g++ even if the c++ sources
+               # are inside automake conditionals
+               AC_MSG_ERROR([You need to install g++])
+       fi
+fi
+
+dnl may require a specific autoconf version
+dnl AC_PROG_CC_FOR_BUILD
+dnl CC_FOR_BUILD not automatically detected
+CC_FOR_BUILD=$CC
+CFLAGS_FOR_BUILD=$CFLAGS
+BUILD_EXEEXT=
+if test "x$cross_compiling" = "xyes"; then
+       CC_FOR_BUILD=cc
+       CFLAGS_FOR_BUILD=
+       BUILD_EXEEXT=""
+fi
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CFLAGS_FOR_BUILD)
+AC_SUBST(HOST_CC)
+AC_SUBST(BUILD_EXEEXT)
+
+AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
+AM_CONDITIONAL(USE_BATCH_FILES, [test x$host_win32 = xyes -a x$cross_compiling = xyes])
+
+# Set STDC_HEADERS
+AC_HEADER_STDC
+AC_LIBTOOL_WIN32_DLL
+# This causes monodis to not link correctly
+#AC_DISABLE_FAST_INSTALL
+AM_PROG_LIBTOOL
+# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
+DOLT
+
+export_ldflags=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+AC_SUBST(export_ldflags)
+
+# Test whenever ld supports -version-script
+AC_PROG_LD
+AC_PROG_LD_GNU
+if test "x$lt_cv_prog_gnu_ld" = "xno"; then
+   no_version_script=yes
+fi
+
+AM_ICONV()
+
+AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
+
+AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h libproc.h)
+AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h)
+AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h],
+                  [], [], [#include <stddef.h>
+                 #include <sys/socket.h>
+                 #include <linux/socket.h>])
+
+AC_CHECK_HEADERS(sys/user.h, [], [],
+[
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+])
+
+AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
+if test x$have_zlib = xyes; then
+   AC_TRY_COMPILE([#include <zlib.h>], [
+   #if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230)
+   return 0;
+   #else
+   #error No good zlib found
+   #endif
+   ],[
+       AC_MSG_RESULT(Using system zlib)
+       zlib_msg="system zlib"
+       AC_DEFINE(HAVE_SYS_ZLIB,1,[Have system zlib])
+   ],[
+       AC_MSG_RESULT(Using embedded zlib)
+       have_zlib=no
+       zlib_msg="bundled zlib"
+   ])
+fi
+
+AM_CONDITIONAL(HAVE_ZLIB, test x$have_zlib = xyes)
+AC_DEFINE(HAVE_ZLIB,1,[Have system zlib])
+
+# for mono/metadata/debug-symfile.c
+AC_CHECK_HEADERS(elf.h)
+
+# for support
+AC_CHECK_HEADERS(poll.h)
+AC_CHECK_HEADERS(sys/poll.h)
+AC_CHECK_HEADERS(sys/wait.h)
+AC_CHECK_HEADERS(grp.h)
+AC_CHECK_HEADERS(syslog.h)
+
+# for mono/dis
+AC_CHECK_HEADERS(wchar.h)
+AC_CHECK_HEADERS(ieeefp.h)
+AC_MSG_CHECKING(for isinf)
+AC_TRY_LINK([#include <math.h>], [
+       int f = isinf (1.0);
+], [
+       AC_MSG_RESULT(yes)
+       AC_DEFINE(HAVE_ISINF, 1, [isinf available])
+], [
+       # 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)
+
+# not 64 bit clean in cross-compile
+AC_CHECK_SIZEOF(void *, 4)
+
+AC_CACHE_CHECK([for clang],
+       mono_cv_clang,[
+       AC_TRY_COMPILE([], [
+               #ifdef __clang__
+               #else
+               #error "FAILED"
+               #endif
+               return 0;
+       ],
+       [mono_cv_clang=yes],
+       [mono_cv_clang=no],
+       [])
+])
+
+WARN=''
+if test x"$GCC" = xyes; then
+        WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value'
+               # The runtime code does not respect ANSI C strict aliasing rules
+               CFLAGS="$CFLAGS -fno-strict-aliasing"
+
+               # We rely on signed overflow to behave
+               CFLAGS="$CFLAGS -fwrapv"
+
+               ORIG_CFLAGS=$CFLAGS
+               CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+               AC_MSG_CHECKING(for -Wdeclaration-after-statement option to gcc)
+               AC_TRY_COMPILE([],[
+                               return 0;
+               ], [
+                  AC_MSG_RESULT(yes)
+               ], [
+                  AC_MSG_RESULT(no)
+                  CFLAGS=$ORIG_CFLAGS
+               ])
+
+               ORIG_CFLAGS=$CFLAGS
+               # Check for the normal version, since gcc ignores unknown -Wno options
+               CFLAGS="$CFLAGS -Wunused-but-set-variable -Werror"
+               AC_MSG_CHECKING(for -Wno-unused-but-set-variable option to gcc)
+               AC_TRY_COMPILE([],[
+                               return 0;
+               ], [
+                  AC_MSG_RESULT(yes)
+                  CFLAGS="$ORIG_CFLAGS -Wno-unused-but-set-variable"
+               ], [
+                  AC_MSG_RESULT(no)
+                  CFLAGS=$ORIG_CFLAGS
+               ])
+
+               if test "x$mono_cv_clang" = "xyes"; then
+                  # https://bugzilla.samba.org/show_bug.cgi?id=8118
+                  WARN="$WARN -Qunused-arguments"
+                  WARN="$WARN -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign"
+               fi
+else
+       # The Sun Forte compiler complains about inline functions that access static variables
+       # so disable all inlining.
+       case "$host" in
+       *-*-solaris*)
+               CFLAGS="$CFLAGS -Dinline="
+               ;;
+       esac
+fi
+CFLAGS="$CFLAGS -g $WARN"
+CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -g"
+
+# Where's the 'mcs' source tree?
+if test -d $srcdir/mcs; then
+  mcsdir=mcs
+else
+  mcsdir=../mcs
+fi
+
+AC_ARG_WITH(mcs-path, [  --with-mcs-path=/path/to/mcs      Specify an alternate mcs source tree],
+       if test x$with_mcs_path != "x" -a -d $with_mcs_path ; then
+               mcsdir=$with_mcs_path
+       fi
+)
+
+AC_ARG_WITH(jumptables, [  --with-jumptables=yes,no      enable/disable support for jumptables (ARM-only for now) (defaults to no)],[],[with_jumptables=no])
+
+#
+# A sanity check to catch cases where the package was unpacked
+# with an ancient tar program (Solaris)
+#
+AC_ARG_ENABLE(solaris-tar-check,
+[  --disable-solaris-tar-check    disable solaris tar check],
+   do_solaris_tar_check=no, do_solaris_tar_check=yes)
+
+if test x"$do_solaris_tar_check" = xyes -a x"$enable_solaris_tar_check" = xyes; then
+       AC_MSG_CHECKING(integrity of package)
+       if test -f $mcsdir/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
+       then
+               AC_MSG_RESULT(ok)
+       else
+               errorm="Your mono distribution is incomplete;  if unpacking from a tar file, make sure you use GNU tar;  see http://www.mono-project.com/IncompletePackage for more details"
+               AC_MSG_ERROR([$errorm])
+       fi
+fi
+
+if test "x$with_mcs_path" != "x"; then
+mcs_topdir=$(cd "$mcsdir" && pwd)
+mcs_topdir_from_srcdir=$mcs_topdir
+else
+mcs_topdir=$(cd "$srcdir/$mcsdir" && pwd)
+mcs_topdir_from_srcdir='$(top_builddir)'/$mcsdir
+fi
+
+# Convert mcs_topdir* paths to Windows syntax.
+if test x$cross_compiling$host_win32 = xnoyes; then
+  mcs_topdir=$(cygpath -m $mcs_topdir)
+  case $mcs_topdir_from_srcdir in
+    /cygdrive/*)
+       mcs_topdir_from_srcdir=$(cygpath -m $mcs_topdir_from_srcdir)
+       ;;
+  esac
+fi
+
+AC_SUBST([mcs_topdir])
+AC_SUBST([mcs_topdir_from_srcdir])
+
+# Where's the 'olive' source tree?
+if test -d $srcdir/olive; then
+  olivedir=olive
+else
+  olivedir=../olive
+fi
+
+if test -d $srcdir/$olivedir; then
+olive_topdir='$(top_srcdir)/'$olivedir
+fi
+
+# gettext: prepare the translation directories. 
+# we do not configure the full gettext, as we consume it dynamically from C#
+AM_PO_SUBDIRS
+
+if test "x$USE_NLS" = "xyes"; then
+   AC_CHECK_PROG(HAVE_MSGFMT, msgfmt,yes,no)
+
+   if test "x$HAVE_MSGFMT" = "xno"; then
+         AC_MSG_ERROR([msgfmt not found. You need to install the 'gettext' package, or pass --enable-nls=no to configure.])
+   fi
+fi
+
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+pkg_config_path=
+AC_ARG_WITH(crosspkgdir, [  --with-crosspkgdir=/path/to/pkg-config/dir      Change pkg-config dir to custom dir],
+       if test x$with_crosspkgdir = "x"; then
+               if test -s $PKG_CONFIG_PATH; then
+                       pkg_config_path=$PKG_CONFIG_PATH
+               fi
+       else
+               pkg_config_path=$with_crosspkgdir
+               PKG_CONFIG_PATH=$pkg_config_path
+               export PKG_CONFIG_PATH
+       fi
+)
+
+AC_ARG_ENABLE(werror, [  --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no)
+if test x$werror_flag = xyes; then
+       WERROR_CFLAGS="-Werror"
+fi
+AC_SUBST([WERROR_CFLAGS])
+
+ac_configure_args="$ac_configure_args \"CPPFLAGS_FOR_EGLIB=$EGLIB_CPPFLAGS\" \"CFLAGS_FOR_EGLIB=$CFLAGS_FOR_EGLIB\""
+AC_CONFIG_SUBDIRS(eglib)
+
+GLIB_CFLAGS='-I$(top_srcdir)/eglib/src -I$(top_builddir)/eglib/src'
+GLIB_LIBS='-L$(top_builddir)/eglib/src -leglib -lm'
+BUILD_GLIB_CFLAGS="$GLIB_CFLAGS"
+BUILD_GLIB_LIBS="$GLIB_LIBS"
+GMODULE_CFLAGS="$GLIB_CFLAGS"
+GMODULE_LIBS="$GLIB_LIBS"
+  
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+AC_SUBST(GMODULE_CFLAGS)
+AC_SUBST(GMODULE_LIBS)
+AC_SUBST(BUILD_GLIB_CFLAGS)
+AC_SUBST(BUILD_GLIB_LIBS)
+
+# Enable support for fast thread-local storage
+# Some systems have broken support, so we allow to disable it.
+AC_ARG_WITH(tls, [  --with-tls=__thread,pthread    select Thread Local Storage implementation (defaults to __thread)],[],[with_tls=__thread])
+
+# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
+# This does not work on some platforms (bug #55253)
+AC_ARG_WITH(sigaltstack, [  --with-sigaltstack=yes,no      enable/disable support for sigaltstack (defaults to yes)],[],[with_sigaltstack=yes])
+
+AC_ARG_WITH(static_mono, [  --with-static_mono=yes,no      link mono statically to libmono (faster) (defaults to yes)],[],[with_static_mono=yes])
+AC_ARG_WITH(shared_mono, [  --with-shared_mono=yes,no      build a shared libmono library (defaults to yes)],[],[with_shared_mono=yes])
+# Same as --with-shared_mono=no
+AC_ARG_ENABLE(libraries, [  --disable-libraries disable the build of libmono], enable_libraries=$enableval, enable_libraries=yes)
+
+if test "x$enable_static" = "xno"; then
+   with_static_mono=no
+fi
+
+if test "x$enable_shared" = "xno"; then
+   with_shared_mono=no
+fi
+
+if test "x$enable_libraries" = "xno"; then
+   with_shared_mono=no
+fi
+
+AM_CONDITIONAL(DISABLE_LIBRARIES, test x$enable_libraries = xno)
+
+case $host in
+*nacl* ) with_shared_mono=yes;;
+esac
+
+if test "x$host_win32" = "xyes"; then
+   # Boehm GC requires the runtime to be in its own dll
+   with_static_mono=no
+fi
+
+AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
+AM_CONDITIONAL(SHARED_MONO, test x$with_shared_mono != xno)
+AC_ARG_ENABLE(mcs-build, [  --disable-mcs-build disable the build of the mcs directory], try_mcs_build=$enableval, enable_mcs_build=yes)
+
+AC_ARG_WITH(xen_opt,   [  --with-xen_opt=yes,no          Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes])
+if test "x$with_xen_opt" = "xyes" -a "x$mono_cv_clang" = "xno"; then
+       AC_DEFINE(MONO_XEN_OPT, 1, [Xen-specific behaviour])
+       ORIG_CFLAGS=$CFLAGS
+       CFLAGS="$CFLAGS -mno-tls-direct-seg-refs"
+       AC_MSG_CHECKING(for -mno-tls-direct-seg-refs option to gcc)
+       AC_TRY_COMPILE([], [
+               return 0;
+       ], [
+          AC_MSG_RESULT(yes)
+          # Pass it to libgc as well
+          CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -mno-tls-direct-seg-refs"
+       ], [
+          AC_MSG_RESULT(no)
+          CFLAGS=$ORIG_CFLAGS
+       ])
+fi
+
+AC_ARG_ENABLE(small-config, [  --enable-small-config Enable tweaks to reduce requirements (and capabilities)], enable_small_config=$enableval, enable_small_config=no)
+
+if test x$enable_small_config = xyes; then
+       AC_DEFINE(MONO_SMALL_CONFIG,1,[Reduce runtime requirements (and capabilities)])
+       CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DSMALL_CONFIG"
+fi
+
+AC_ARG_ENABLE(system-aot, [  --enable-system-aot  Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=default)
+
+DISABLED_FEATURES=none
+
+AC_ARG_ENABLE(minimal, [  --enable-minimal=LIST      drop support for LIST subsystems.
+     LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, 
+     reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters, remoting,
+        security, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
+[
+       for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
+               eval "mono_feature_disable_$feature='yes'"
+       done
+       DISABLED_FEATURES=$enable_minimal
+       disabled="Disabled:      $enable_minimal"
+],[])
+
+AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
+
+if test "x$mono_feature_disable_aot" = "xyes"; then
+       AC_DEFINE(DISABLE_AOT_COMPILER, 1, [Disable AOT Compiler])
+       AC_MSG_NOTICE([Disabled AOT compiler])
+fi
+
+if test "x$mono_feature_disable_profiler" = "xyes"; then
+       AC_DEFINE(DISABLE_PROFILER, 1, [Disable default profiler support])
+       AC_MSG_NOTICE([Disabled support for the profiler])
+fi
+AM_CONDITIONAL(DISABLE_PROFILER, test x$mono_feature_disable_profiler = xyes)
+
+if test "x$mono_feature_disable_decimal" = "xyes"; then
+       AC_DEFINE(DISABLE_DECIMAL, 1, [Disable System.Decimal support])
+       AC_MSG_NOTICE([Disabled support for decimal])
+fi
+
+if test "x$mono_feature_disable_pinvoke" = "xyes"; then
+       AC_DEFINE(DISABLE_PINVOKE, 1, [Disable P/Invoke support])
+       AC_MSG_NOTICE([Disabled support for P/Invoke])
+fi
+
+if test "x$mono_feature_disable_debug" = "xyes"; then
+       AC_DEFINE(DISABLE_DEBUG, 1, [Disable runtime debugging support])
+       AC_MSG_NOTICE([Disabled support for runtime debugging])
+fi
+
+if test "x$mono_feature_disable_reflection_emit" = "xyes"; then
+       AC_DEFINE(DISABLE_REFLECTION_EMIT, 1, [Disable reflection emit support])
+       mono_feature_disable_reflection_emit_save=yes
+       AC_MSG_NOTICE([Disabled support for Reflection.Emit])
+fi
+
+if test "x$mono_feature_disable_reflection_emit_save" = "xyes"; then
+       AC_DEFINE(DISABLE_REFLECTION_EMIT_SAVE, 1, [Disable assembly saving support in reflection emit])
+       AC_MSG_NOTICE([Disabled support for Reflection.Emit.Save])
+fi
+
+if test "x$mono_feature_disable_large_code" = "xyes"; then
+       AC_DEFINE(DISABLE_LARGE_CODE, 1, [Disable support for huge assemblies])
+       AC_MSG_NOTICE([Disabled support for large assemblies])
+fi
+
+if test "x$mono_feature_disable_logging" = "xyes"; then
+       AC_DEFINE(DISABLE_LOGGING, 1, [Disable support debug logging])
+       AC_MSG_NOTICE([Disabled support for logging])
+fi
+
+if test "x$mono_feature_disable_com" = "xyes"; then
+       AC_DEFINE(DISABLE_COM, 1, [Disable COM support])
+       AC_MSG_NOTICE([Disabled COM support])
+fi
+
+if test "x$mono_feature_disable_ssa" = "xyes"; then
+       AC_DEFINE(DISABLE_SSA, 1, [Disable advanced SSA JIT optimizations])
+       AC_MSG_NOTICE([Disabled SSA JIT optimizations])
+fi
+
+if test "x$mono_feature_disable_generics" = "xyes"; then
+       AC_DEFINE(DISABLE_GENERICS, 1, [Disable generics support])
+       AC_MSG_NOTICE([Disabled Generics Support])
+fi
+
+if test "x$mono_feature_disable_shadowcopy" = "xyes"; then
+       AC_DEFINE(DISABLE_SHADOW_COPY, 1, [Disable Shadow Copy for AppDomains])
+       AC_MSG_NOTICE([Disabled Shadow copy for AppDomains])
+fi
+
+if test "x$mono_feature_disable_portability" = "xyes"; then
+       AC_DEFINE(DISABLE_PORTABILITY, 1, [Disables the IO portability layer])
+       AC_MSG_NOTICE([Disabled IO Portability layer])
+fi
+
+if test "x$mono_feature_disable_attach" = "xyes"; then
+       AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
+       AC_MSG_NOTICE([Disabled agent attach])
+fi
+
+if test "x$mono_feature_disable_full_messages" = "xyes"; then
+       AC_DEFINE(DISABLE_FULL_MESSAGES, 1, [Disables building in the full table of WAPI messages])
+       AC_MSG_NOTICE([Disabled full messages for Win32 errors, only core message strings shipped])
+fi
+
+if test "x$mono_feature_disable_verifier" = "xyes"; then
+       AC_DEFINE(DISABLE_VERIFIER, 1, [Disables the verifier])
+       AC_MSG_NOTICE([Disabled the metadata and IL verifiers])
+fi
+
+if test "x$mono_feature_disable_jit" = "xyes"; then
+       AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode will be supported by the runtime.])
+       AC_MSG_NOTICE([Disabled the JIT engine, only full AOT will be supported])
+fi
+
+AM_CONDITIONAL(DISABLE_JIT, test x$mono_feature_disable_jit = xyes)
+
+if test "x$mono_feature_disable_simd" = "xyes"; then
+       AC_DEFINE(DISABLE_SIMD, 1, [Disable SIMD intrinsics related optimizations.])
+       AC_MSG_NOTICE([Disabled SIMD support])
+fi
+
+if test "x$mono_feature_disable_soft_debug" = "xyes"; then
+       AC_DEFINE(DISABLE_SOFT_DEBUG, 1, [Disable Soft Debugger Agent.])
+       AC_MSG_NOTICE([Disabled Soft Debugger.])
+fi
+
+if test "x$mono_feature_disable_perfcounters" = "xyes"; then
+       AC_DEFINE(DISABLE_PERFCOUNTERS, 1, [Disable Performance Counters.])
+       AC_MSG_NOTICE([Disabled Performance Counters.])
+fi
+if test "x$mono_feature_disable_normalization" = "xyes"; then
+       AC_DEFINE(DISABLE_NORMALIZATION, 1, [Disable String normalization support.])
+       AC_MSG_NOTICE([Disabled String normalization support.])
+fi
+
+if test "x$mono_feature_disable_assembly_remapping" = "xyes"; then
+       AC_DEFINE(DISABLE_ASSEMBLY_REMAPPING, 1, [Disable assembly remapping.])
+       AC_MSG_NOTICE([Disabled Assembly remapping.])
+fi
+
+if test "x$mono_feature_disable_shared_perfcounters" = "xyes"; then
+       AC_DEFINE(DISABLE_SHARED_PERFCOUNTERS, 1, [Disable shared perfcounters.])
+       AC_MSG_NOTICE([Disabled Shared perfcounters.])
+fi
+
+if test "x$mono_feature_disable_appdomains" = "xyes"; then
+       AC_DEFINE(DISABLE_APPDOMAINS, 1, [Disable support for multiple appdomains.])
+       AC_MSG_NOTICE([Disabled support for multiple appdomains.])
+fi
+
+if test "x$mono_feature_disable_remoting" = "xyes"; then
+       AC_DEFINE(DISABLE_REMOTING, 1, [Disable remoting support (This disables type proxies and make com non-functional)])
+       AC_MSG_NOTICE([Disabled remoting])
+fi
+
+if test "x$mono_feature_disable_security" = "xyes"; then
+       AC_DEFINE(DISABLE_SECURITY, 1, [Disable CAS/CoreCLR security])
+       AC_MSG_NOTICE([Disabled CAS/CoreCLR security manager (used e.g. for Moonlight)])
+fi
+
+if test "x$mono_feature_disable_sgen_remset" = "xyes"; then
+       AC_DEFINE(DISABLE_SGEN_REMSET, 1, [Disable wbarrier=remset support in SGEN.])
+       AC_MSG_NOTICE([Disabled wbarrier=remset support in SGEN.])
+fi
+
+if test "x$mono_feature_disable_sgen_marksweep_par" = "xyes"; then
+       AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_PAR, 1, [Disable major=marksweep-par support in SGEN.])
+       AC_MSG_NOTICE([Disabled major=marksweep-par support in SGEN.])
+fi
+
+if test "x$mono_feature_disable_sgen_marksweep_fixed" = "xyes"; then
+       AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_FIXED, 1, [Disable major=marksweep-fixed support in SGEN.])
+       AC_MSG_NOTICE([Disabled major=marksweep-fixed support in SGEN.])
+fi
+
+if test "x$mono_feature_disable_sgen_marksweep_fixed_par" = "xyes"; then
+       AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_FIXED_PAR, 1, [Disable major=marksweep-fixed-par support in SGEN.])
+       AC_MSG_NOTICE([Disabled major=marksweep-fixed-par support in SGEN.])
+fi
+
+if test "x$mono_feature_disable_sgen_copying" = "xyes"; then
+       AC_DEFINE(DISABLE_SGEN_MAJOR_COPYING, 1, [Disable major=copying support in SGEN.])
+       AC_MSG_NOTICE([Disabled major=copying support in SGEN.])
+fi
+
+AC_ARG_ENABLE(executables, [  --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
+AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)
+
+has_extension_module=no
+AC_ARG_ENABLE(extension-module, [  --enable-extension-module=LIST enable the core-extensions from LIST],
+[
+       for extension in `echo "$enable_extension_module" | sed -e "s/,/ /g"`; do
+               if test x$extension = xdefault ; then
+                       has_extension_module=yes;
+               fi
+       done
+       if test x$enable_extension_module = xyes; then
+               has_extension_module=yes;
+       fi
+], [])
+
+AM_CONDITIONAL([HAS_EXTENSION_MODULE], [test x$has_extension_module != xno])
+
+if test x$has_extension_module != xno ; then
+       AC_DEFINE([ENABLE_EXTENSION_MODULE], 1, [Extension module enabled])
+       AC_MSG_NOTICE([Enabling mono extension module.])
+fi
+
+AC_ARG_ENABLE(gsharing, [  --enable-gsharing Enable gsharing], enable_gsharing=$enableval, enable_gsharing=no)
+if test x$enable_gsharing = xyes; then
+       AC_DEFINE(ENABLE_GSHAREDVT,1,[Gsharing])
+fi
+
+AC_ARG_ENABLE(native-types, [  --enable-native-types Enable native types], enable_native_types=$enableval, enable_native_types=no)
+if test x$enable_native_types = xyes; then
+       AC_DEFINE(MONO_NATIVE_TYPES,1,[native types])
+fi
+
+AC_MSG_CHECKING(for visibility __attribute__)
+AC_COMPILE_IFELSE([
+       AC_LANG_SOURCE([[
+               void __attribute__ ((visibility ("hidden"))) doit (void) {}
+               int main () { doit (); return 0; }
+       ]])
+], [
+   have_visibility_hidden=yes
+   AC_MSG_RESULT(yes)
+], [
+   have_visibility_hidden=no
+   AC_MSG_RESULT(no)
+])
+
+AC_MSG_CHECKING(for deprecated __attribute__)
+AC_TRY_COMPILE([
+     int doit (void) __attribute__ ((deprecated));
+     int doit (void) { return 0; }
+], [
+       return 0;
+], [
+   have_deprecated=yes
+   AC_MSG_RESULT(yes)
+], [
+   have_deprecated=no
+   AC_MSG_RESULT(no)
+])
+
+dnl
+dnl Boehm GC configuration
+dnl
+
+AC_ARG_WITH(libgc,   [  --with-gc=boehm,included,none  Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=$libgc_default])
+
+AC_ARG_ENABLE(boehm, [  --disable-boehm            Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
+AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
+
+AC_ARG_ENABLE(parallel-mark, [  --enable-parallel-mark     Enables GC Parallel Marking], enable_parallel_mark=$enableval, enable_parallel_mark=$parallel_mark)
+if test x$enable_parallel_mark = xyes; then
+       libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
+fi
+
+gc_headers=no
+gc_msg=""
+use_included_gc=no
+LIBGC_CPPFLAGS=
+LIBGC_LIBS=
+LIBGC_STATIC_LIBS=
+libgc_dir=
+case "x$libgc" in
+       xboehm|xbohem|xyes)
+               AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
+               AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
+
+               if test "x$found_boehm" != "xyes"; then
+                       AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
+               fi
+               if test "x$gc_headers" != "xyes"; then
+                       AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
+               fi
+
+               LIBGC_LIBS="-lgc $libdl"
+               LIBGC_STATIC_LIBS="$LIBGC_LIBS"
+               libmono_ldflags="$libmono_ldflags -lgc"
+               BOEHM_DEFINES="-DHAVE_BOEHM_GC"
+
+               # AC_CHECK_FUNCS does not work for some reason...
+               AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
+               if test "x$found_gcj_malloc" = "xyes"; then
+                       BOEHM_DEFINES="-DHAVE_GC_GCJ_MALLOC $BOEHM_DEFINES"
+                       AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (with typed GC)", [GC description])
+                       gc_msg="System Boehm with typed GC"
+               else
+                       AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (no typed GC)", [GC description])
+                       gc_msg="System Boehm (without typed GC)"
+               fi
+               AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
+               if test "x$found_gc_enable" = "xyes"; then
+                       BOEHM_DEFINES="-DHAVE_GC_ENABLE $BOEHM_DEFINES"
+               fi
+
+               # check whether we need to explicitly allow
+               # thread registering
+               AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
+               if test "x$found_allow_register_threads" = "xyes"; then
+                  AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
+               fi
+               ;;
+
+       xincluded)
+               use_included_gc=yes
+               if test "x$support_boehm" = "xyes"; then
+                       libgc_dir=libgc
+               fi
+
+               LIBGC_CPPFLAGS='-I$(top_srcdir)/libgc/include'
+               LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
+               LIBGC_STATIC_LIBS='$(top_builddir)/libgc/libmonogc-static.la'
+
+               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="Included 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])
+                       gc_msg="$gc_msg and parallel mark"
+               else
+                       AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC)", [GC description])
+               fi
+               ;;
+
+       xsgen)
+               AC_MSG_WARN("Use --with-sgen instead, --with-gc= controls Boehm configuration")
+               ;;
+
+       xnone)
+               AC_MSG_WARN("Compiling mono without GC.")
+               AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "none", [GC description])
+               AC_DEFINE(HAVE_NULL_GC,1,[No GC support.])
+               gc_msg="none"
+               ;;
+       *)
+               AC_MSG_ERROR([Invalid argument to --with-gc.])
+               ;;
+esac
+
+AC_ARG_WITH(large-heap, [  --with-large-heap=yes,no       Enable support for GC heaps larger than 3GB (defaults to no)], [large_heap=$withval], [large_heap=no])
+if test "x$large_heap" = "xyes"; then
+   CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
+fi
+
+AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
+AC_SUBST(LIBGC_CPPFLAGS)
+AC_SUBST(LIBGC_LIBS)
+AC_SUBST(LIBGC_STATIC_LIBS)
+AC_SUBST(libgc_dir)
+AC_SUBST(BOEHM_DEFINES)
+
+dnl
+dnl End of Boehm GC Configuration
+dnl
+
+dnl *************************************
+dnl *** Checks for zero length arrays ***
+dnl *************************************
+AC_MSG_CHECKING(whether $CC supports zero length arrays)
+AC_TRY_COMPILE([
+       struct s {
+               int  length;
+               char data [0];
+       };
+], [], [
+       AC_MSG_RESULT(yes)
+       AC_DEFINE_UNQUOTED(MONO_ZERO_LEN_ARRAY, 0, [Length of zero length arrays])
+], [
+       AC_MSG_RESULT(no)
+       AC_DEFINE_UNQUOTED(MONO_ZERO_LEN_ARRAY, 1, [Length of zero length arrays])
+])
+
+AC_CHECK_HEADERS(nacl/nacl_dyncode.h)
+
+if test x$target_win32 = xno; then
+
+       dnl hires monotonic clock support
+       AC_SEARCH_LIBS(clock_gettime, rt)
+
+       dnl dynamic loader support
+       AC_CHECK_FUNC(dlopen, DL_LIB="",
+               AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", dl_support=no)
+       )
+       if test x$dl_support = xno; then
+               AC_MSG_WARN([No dynamic loading support available])
+       else
+               LIBS="$LIBS $DL_LIB"
+               AC_DEFINE(HAVE_DL_LOADER,1,[dlopen-based dynamic loader available])
+               dnl from glib's configure.ac
+               AC_CACHE_CHECK([for preceeding underscore in symbols],
+                       mono_cv_uscore,[
+                       AC_TRY_RUN([#include <dlfcn.h>
+                       int mono_underscore_test (void) { return 42; }
+                       int main() {
+                         void *f1 = (void*)0, *f2 = (void*)0, *handle;
+                         handle = dlopen ((void*)0, 0);
+                         if (handle) {
+                           f1 = dlsym (handle, "mono_underscore_test");
+                           f2 = dlsym (handle, "_mono_underscore_test");
+                         } return (!f2 || f1);
+                       }],
+                               [mono_cv_uscore=yes],
+                               [mono_cv_uscore=no],
+                       [])
+               ])
+               if test "x$mono_cv_uscore" = "xyes"; then
+                       MONO_DL_NEED_USCORE=1
+               else
+                       MONO_DL_NEED_USCORE=0
+               fi
+               AC_SUBST(MONO_DL_NEED_USCORE)
+               AC_CHECK_FUNC(dlerror)
+       fi
+
+       dnl ******************************************************************
+       dnl *** Checks for the IKVM JNI interface library                  ***
+       dnl ******************************************************************
+       AC_ARG_WITH(ikvm-native, [  --with-ikvm-native=yes,no      build the IKVM JNI interface library (defaults to yes)],[with_ikvm_native=$withval],[with_ikvm_native=$ikvm_native])
+
+       ikvm_native_dir=
+       if test x$with_ikvm_native = xyes; then
+               ikvm_native_dir=ikvm-native
+               jdk_headers_found="IKVM Native"
+       fi
+
+       AC_SUBST(ikvm_native_dir)
+
+       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)
+       AC_CHECK_FUNCS(getpwuid_r)
+       AC_CHECK_FUNCS(getresuid)
+       AC_CHECK_FUNCS(setresuid)
+       AC_CHECK_FUNCS(kqueue)
+       AC_CHECK_FUNCS(backtrace_symbols)
+       AC_CHECK_FUNCS(mkstemp)
+       AC_CHECK_FUNCS(mmap)
+       AC_CHECK_FUNCS(madvise)
+       AC_CHECK_FUNCS(getrusage)
+       AC_CHECK_FUNCS(getpriority)
+       AC_CHECK_FUNCS(setpriority)
+       AC_CHECK_FUNCS(dl_iterate_phdr)
+       AC_CHECK_FUNCS(dladdr)
+       AC_CHECK_FUNCS(sysconf)
+
+       AC_CHECK_FUNCS(sched_setaffinity)
+       AC_CHECK_FUNCS(sched_getcpu)
+
+       dnl ****************************************************************
+       dnl *** Check for sched_setaffinity from glibc versions before   ***
+       dnl *** 2.3.4. The older versions of the function only take 2    ***
+       dnl *** parameters, not 3.                                       ***
+       dnl ***                                                          ***
+       dnl *** Because the interface change was not made in a minor     ***
+       dnl *** version rev, the __GLIBC__ and __GLIBC_MINOR__ macros    ***
+       dnl *** won't always indicate the interface sched_affinity has.  ***
+       dnl ****************************************************************
+       AC_MSG_CHECKING(for sched_setaffinity from glibc < 2.3.4)
+       AC_TRY_COMPILE([#include <sched.h>], [
+            int mask = 1; 
+            sched_setaffinity(0, &mask);
+                       return 0;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY, 1, [Have GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY])
+       ], [
+               # We have the new, three-parameter version
+               AC_MSG_RESULT(no)
+       ])
+
+
+       dnl ******************************************************************
+       dnl *** Check for large file support                               ***
+       dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
+       dnl ******************************************************************
+       
+       # Check that off_t can represent 2**63 - 1 correctly, working around
+       # potential compiler bugs.  Defines LARGE_FILE_SUPPORT, adds $1 to
+       # CPPFLAGS and sets $large_offt to yes if the test succeeds
+       large_offt=no
+       AC_DEFUN([LARGE_FILES], [
+               large_CPPFLAGS=$CPPFLAGS
+               CPPFLAGS="$CPPFLAGS $1"
+               AC_TRY_COMPILE([
+                       #include <sys/types.h>
+                       #include <limits.h>
+               ], [
+                       /* Lifted this compile time assert method from: http://www.jaggersoft.com/pubs/CVu11_3.html */
+                       #define COMPILE_TIME_ASSERT(pred) \
+                               switch(0){case 0:case pred:;}
+                       COMPILE_TIME_ASSERT(sizeof(off_t) * CHAR_BIT == 64);
+               ], [
+                       AC_MSG_RESULT(ok)
+                       AC_DEFINE(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support])
+                       large_CPPFLAGS="$large_CPPFLAGS $1"
+                       large_offt=yes
+               ], [
+                       AC_MSG_RESULT(no)
+               ])
+               CPPFLAGS=$large_CPPFLAGS
+       ])
+
+       AC_MSG_CHECKING(if off_t is 64 bits wide)
+       LARGE_FILES("")
+       if test $large_offt = no; then
+               AC_MSG_CHECKING(if _FILE_OFFSET_BITS=64 gives 64 bit off_t)
+               LARGE_FILES("-D_FILE_OFFSET_BITS=64")
+       fi
+       if test $large_offt = no; then
+               AC_MSG_WARN([No 64 bit file size support available])
+       fi
+       
+       dnl *****************************
+       dnl *** Checks for libsocket  ***
+       dnl *****************************
+       AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
+
+       case "$host" in
+               *-*-*freebsd*)
+                       dnl *****************************
+                       dnl *** Checks for libinotify ***
+                       dnl *****************************
+                       AC_CHECK_LIB(inotify, inotify_init, LIBS="$LIBS -linotify")
+       esac
+
+       dnl *******************************
+       dnl *** Checks for MSG_NOSIGNAL ***
+       dnl *******************************
+       AC_MSG_CHECKING(for MSG_NOSIGNAL)
+       AC_TRY_COMPILE([#include <sys/socket.h>], [
+               int f = MSG_NOSIGNAL;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Have MSG_NOSIGNAL])
+       ], [
+               # We'll have to use signals
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *****************************
+       dnl *** Checks for IPPROTO_IP ***
+       dnl *****************************
+       AC_MSG_CHECKING(for IPPROTO_IP)
+       AC_TRY_COMPILE([#include <netinet/in.h>], [
+               int level = IPPROTO_IP;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IPPROTO_IP, 1, [Have IPPROTO_IP])
+       ], [
+               # We'll have to use getprotobyname
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *******************************
+       dnl *** Checks for IPPROTO_IPV6 ***
+       dnl *******************************
+       AC_MSG_CHECKING(for IPPROTO_IPV6)
+       AC_TRY_COMPILE([#include <netinet/in.h>], [
+               int level = IPPROTO_IPV6;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IPPROTO_IPV6, 1, [Have IPPROTO_IPV6])
+       ], [
+               # We'll have to use getprotobyname
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl ******************************
+       dnl *** Checks for IPPROTO_TCP ***
+       dnl ******************************
+       AC_MSG_CHECKING(for IPPROTO_TCP)
+       AC_TRY_COMPILE([#include <netinet/in.h>], [
+               int level = IPPROTO_TCP;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IPPROTO_TCP, 1, [Have IPPROTO_TCP])
+       ], [
+               # We'll have to use getprotobyname
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *****************************
+       dnl *** Checks for SOL_IP     ***
+       dnl *****************************
+       AC_MSG_CHECKING(for SOL_IP)
+       AC_TRY_COMPILE([#include <netdb.h>], [
+               int level = SOL_IP;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SOL_IP, 1, [Have SOL_IP])
+       ], [
+               # We'll have to use getprotobyname
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *****************************
+       dnl *** Checks for SOL_IPV6     ***
+       dnl *****************************
+       AC_MSG_CHECKING(for SOL_IPV6)
+       AC_TRY_COMPILE([#include <netdb.h>], [
+               int level = SOL_IPV6;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SOL_IPV6, 1, [Have SOL_IPV6])
+       ], [
+               # We'll have to use getprotobyname
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *****************************
+       dnl *** Checks for SOL_TCP    ***
+       dnl *****************************
+       AC_MSG_CHECKING(for SOL_TCP)
+       AC_TRY_COMPILE([#include <netdb.h>], [
+               int level = SOL_TCP;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SOL_TCP, 1, [Have SOL_TCP])
+       ], [
+               # We'll have to use getprotobyname
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *****************************
+       dnl *** Checks for IP_PKTINFO ***
+       dnl *****************************
+       AC_MSG_CHECKING(for IP_PKTINFO)
+       AC_TRY_COMPILE([#include <linux/in.h>], [
+               int level = IP_PKTINFO;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IP_PKTINFO, 1, [Have IP_PKTINFO])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *****************************
+       dnl *** Checks for IPV6_PKTINFO ***
+       dnl *****************************
+       AC_MSG_CHECKING(for IPV6_PKTINFO)
+       AC_TRY_COMPILE([#include <netdb.h>], [
+               int level = IPV6_PKTINFO;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IPV6_PKTINFO, 1, [Have IPV6_PKTINFO])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl **********************************
+       dnl *** Checks for IP_DONTFRAG     ***
+       dnl **********************************
+       AC_MSG_CHECKING(for IP_DONTFRAG)
+       AC_TRY_COMPILE([#include <netinet/in.h>], [
+               int level = IP_DONTFRAG;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IP_DONTFRAG, 1, [Have IP_DONTFRAG])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl **********************************
+       dnl *** Checks for IP_DONTFRAGMENT ***
+       dnl **********************************
+       AC_MSG_CHECKING(for IP_DONTFRAGMENT)
+       AC_TRY_COMPILE([#include <Ws2ipdef.h>], [
+               int level = IP_DONTFRAGMENT;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IP_DONTFRAGMENT, 1, [Have IP_DONTFRAGMENT])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl **********************************
+       dnl *** Checks for IP_MTU_DISCOVER ***
+       dnl **********************************
+       AC_MSG_CHECKING(for IP_MTU_DISCOVER)
+       AC_TRY_COMPILE([#include <linux/in.h>], [
+               int level = IP_MTU_DISCOVER;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IP_MTU_DISCOVER, 1, [Have IP_MTU_DISCOVER])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl **********************************
+       dnl *** Checks for  IP_PMTUDISC_DO ***
+       dnl **********************************
+       AC_MSG_CHECKING(for IP_PMTUDISC_DO)
+       AC_TRY_COMPILE([#include <linux/in.h>], [
+               int level = IP_PMTUDISC_DO;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IP_PMTUDISC_DO, 1, [Have IP_PMTUDISC_DO])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *********************************
+       dnl *** Check for struct ip_mreqn ***
+       dnl *********************************
+       AC_MSG_CHECKING(for struct ip_mreqn)
+       AC_TRY_COMPILE([#include <netinet/in.h>], [
+               struct ip_mreqn mreq;
+               mreq.imr_address.s_addr = 0;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_STRUCT_IP_MREQN, 1, [Have struct ip_mreqn])
+       ], [
+               # We'll just have to try and use struct ip_mreq
+               AC_MSG_RESULT(no)
+               AC_MSG_CHECKING(for struct ip_mreq)
+               AC_TRY_COMPILE([#include <netinet/in.h>], [
+                       struct ip_mreq mreq;
+                       mreq.imr_interface.s_addr = 0;
+               ], [
+                       # Yes, we have it...
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_STRUCT_IP_MREQ, 1, [Have struct ip_mreq])
+               ], [
+                       # No multicast support
+                       AC_MSG_RESULT(no)
+               ])
+       ])
+       
+       dnl **********************************
+       dnl *** Check for gethostbyname2_r ***
+       dnl **********************************
+       AC_MSG_CHECKING(for gethostbyname2_r)
+               AC_TRY_LINK([#include <netdb.h>], [
+               gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL);
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_GETHOSTBYNAME2_R, 1, [Have gethostbyname2_r])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *****************************
+       dnl *** Checks for libnsl     ***
+       dnl *****************************
+       AC_CHECK_FUNC(gethostbyaddr, , AC_CHECK_LIB(nsl, gethostbyaddr, LIBS="$LIBS -lnsl"))
+
+       AC_CHECK_FUNCS(inet_pton inet_aton)
+
+       dnl *****************************
+       dnl *** Checks for libxnet    ***
+       dnl *****************************
+       case "${host}" in
+               *solaris* )
+                       AC_MSG_CHECKING(for Solaris XPG4 support)
+                       if test -f /usr/lib/libxnet.so; then
+                               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+                               CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
+                               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
+                               LIBS="$LIBS -lxnet"
+                               AC_MSG_RESULT(yes)
+                       else
+                               AC_MSG_RESULT(no)
+                       fi
+
+                       if test "$GCC" = "yes"; then
+                               CFLAGS="$CFLAGS -Wno-char-subscripts"
+                       fi
+               ;;
+       esac
+
+       dnl *****************************
+       dnl *** Checks for libpthread ***
+       dnl *****************************
+# on FreeBSD -STABLE, the pthreads functions all reside in libc_r
+# and libpthread does not exist
+#
+       case "${host}" in
+               *-*-*freebsd*)
+                       AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
+               ;;
+               *-*-*openbsd*)
+                       AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
+               ;;
+               *)
+                       AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
+               ;;
+       esac
+       AC_CHECK_HEADERS(pthread.h)
+       AC_CHECK_HEADERS(pthread_np.h)
+       AC_CHECK_FUNCS(pthread_mutex_timedlock)
+       AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np)
+       AC_CHECK_FUNCS(pthread_kill)
+       AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
+       AC_TRY_COMPILE([ #include <pthread.h>], [
+               pthread_mutexattr_t attr;
+               pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+       ], [
+               AC_MSG_RESULT(ok)
+       ], [
+               AC_MSG_RESULT(no)
+               AC_ERROR(Posix system lacks support for recursive mutexes)
+       ])
+       AC_CHECK_FUNCS(pthread_attr_setstacksize)
+       AC_CHECK_FUNCS(pthread_attr_getstack pthread_attr_getstacksize)
+       AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
+
+       dnl ***********************************
+       dnl *** Checks for signals
+       dnl ***********************************
+       AC_CHECK_HEADERS(signal.h)
+       AC_CHECK_FUNCS(sigaction)
+
+       dnl ***********************************
+       dnl *** Checks for working __thread ***
+       dnl ***********************************
+       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;
+
+                       void thread_main (void *arg)
+                       {
+                               i = arg;
+                               sleep (1);
+                               if (arg == 1)
+                                       res1 = (i == arg);
+                               else
+                                       res2 = (i == arg);
+                       }
+
+                       int main () {
+                               pthread_t t1, t2;
+
+                               i = 5;
+
+                               pthread_create (&t1, NULL, thread_main, 1);
+                               pthread_create (&t2, NULL, thread_main, 2);
+
+                               pthread_join (t1, NULL);
+                               pthread_join (t2, NULL);
+
+                               return !(res1 + res2 == 2);
+                       }
+               ], [
+                               AC_MSG_RESULT(yes)
+               ], [
+                               AC_MSG_RESULT(no)
+                               with_tls=pthread
+               ])
+       fi
+
+       dnl **************************************
+       dnl *** Checks for working sigaltstack ***
+       dnl **************************************
+       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>
+                       #include <stdlib.h>
+                       #include <unistd.h>
+                       #include <signal.h>
+                       #include <pthread.h>
+                       #include <sys/wait.h>
+                       #if defined(__FreeBSD__) || defined(__NetBSD__)
+                       #define SA_STACK SA_ONSTACK
+                       #endif
+                       static void
+                       sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context)
+                       {
+                               exit (0);
+                       }
+
+                       volatile char*__ptr = NULL;
+                       static void *
+                       loop (void *ignored)
+                       {
+                               *__ptr = 0;
+                               return NULL;
+                       }
+
+                       static void
+                       child ()
+                       {
+                               struct sigaction sa;
+                       #ifdef __APPLE__
+                               stack_t sas;
+                       #else
+                               struct sigaltstack sas;
+                       #endif
+                               pthread_t id;
+                               pthread_attr_t attr;
+
+                               sa.sa_sigaction = sigsegv_signal_handler;
+                               sigemptyset (&sa.sa_mask);
+                               sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
+                               if (sigaction (SIGSEGV, &sa, NULL) == -1) {
+                                       perror ("sigaction");
+                                       return;
+                               }
+
+                               /* x86 darwin deliver segfaults using SIGBUS */
+                               if (sigaction (SIGBUS, &sa, NULL) == -1) {
+                                       perror ("sigaction");
+                                       return;
+                               }
+                               sas.ss_sp = malloc (SIGSTKSZ);
+                               sas.ss_size = SIGSTKSZ;
+                               sas.ss_flags = 0;
+                               if (sigaltstack (&sas, NULL) == -1) {
+                                       perror ("sigaltstack");
+                                       return;
+                               }
+
+                               pthread_attr_init (&attr);
+                               if (pthread_create(&id, &attr, loop, &attr) != 0) {
+                                       printf ("pthread_create\n");
+                                       return;
+                               }
+
+                               sleep (100);
+                       }
+
+                       int
+                       main ()
+                       {
+                               pid_t son;
+                               int status;
+                               int i;
+
+                               son = fork ();
+                               if (son == -1) {
+                                       return 1;
+                               }
+
+                               if (son == 0) {
+                                       child ();
+                                       return 0;
+                               }
+
+                               for (i = 0; i < 300; ++i) {
+                                       waitpid (son, &status, WNOHANG);
+                                       if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
+                                               return 0;
+                                       usleep (10000);
+                               }
+
+                               kill (son, SIGKILL);
+                               return 1;
+                       }
+
+               ], [
+                               AC_MSG_RESULT(yes)
+                               AC_DEFINE(HAVE_WORKING_SIGALTSTACK, 1, [Have a working sigaltstack])
+               ], [
+                               with_sigaltstack=no
+                               AC_MSG_RESULT(no)
+               ])
+       fi
+
+       dnl ********************************
+       dnl *** Checks for semaphore lib ***
+       dnl ********************************
+       # 'Real Time' functions on Solaris
+       # posix4 on Solaris 2.6
+       # pthread (first!) on Linux
+       AC_SEARCH_LIBS(sem_init, pthread rt posix4) 
+
+       AC_SEARCH_LIBS(shm_open, pthread rt posix4) 
+       AC_CHECK_FUNCS(shm_open)
+
+       dnl ********************************
+       dnl *** Checks for timezone stuff **
+       dnl ********************************
+       AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
+               AC_TRY_COMPILE([
+                       #include <time.h>
+                       ], [
+                       struct tm tm;
+                       tm.tm_gmtoff = 1;
+                       ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
+       if test $ac_cv_struct_tm_gmtoff = yes; then
+               AC_DEFINE(HAVE_TM_GMTOFF, 1, [Have tm_gmtoff])
+       else
+               AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
+                       AC_TRY_COMPILE([
+                               #include <time.h>
+                       ], [
+                               timezone = 1;
+                       ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
+               if test $ac_cv_var_timezone = yes; then
+                       AC_DEFINE(HAVE_TIMEZONE, 1, [Have timezone variable])
+               else
+                       AC_ERROR(unable to find a way to determine timezone)
+               fi
+       fi
+
+       dnl *********************************
+       dnl *** Checks for math functions ***
+       dnl *********************************
+       AC_SEARCH_LIBS(sqrtf, m)
+       if test "x$has_broken_apple_cpp" != "xyes"; then
+               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)))
+       fi
+        AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
+                AC_TRY_LINK([#include <math.h>], 
+                [ isfinite(0.0); ], 
+                AC_DEFINE(HAVE_ISFINITE, 1, [Have isfinite]) AC_MSG_RESULT(yes),
+                AC_MSG_RESULT(no)))
+
+       dnl ****************************************************************
+       dnl *** Checks for working poll() (macosx defines it but doesn't ***
+       dnl *** have it in the library (duh))                            ***
+       dnl ****************************************************************
+       AC_CHECK_FUNCS(poll)
+
+       dnl *************************
+       dnl *** Check for signbit ***
+       dnl *************************
+       AC_MSG_CHECKING(for signbit)
+       AC_TRY_LINK([#include <math.h>], [
+               int s = signbit(1.0);
+       ], [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SIGNBIT, 1, [Have signbit])
+       ], [
+               AC_MSG_RESULT(no)
+       ]) 
+
+       dnl **********************************
+       dnl *** epoll                      ***
+       dnl **********************************
+       if test "x$ac_cv_header_nacl_nacl_dyncode_h" = "xno"; then
+               AC_CHECK_HEADERS(sys/epoll.h)
+               haveepoll=no
+               AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
+               if test "x$haveepoll" = "xyes" -a "x$ac_cv_header_sys_epoll_h" = "xyes"; then
+                       AC_DEFINE(HAVE_EPOLL, 1, [epoll supported])
+               fi
+       fi
+
+       havekqueue=no
+
+       AC_CHECK_HEADERS(sys/event.h)
+       AC_CHECK_FUNCS(kqueue, [havekqueue=yes], )
+
+       dnl **************************************
+       dnl * Darwin has a race that prevents us from using reliably:
+       dnl * http://lists.apple.com/archives/darwin-dev/2011/Jun/msg00016.html
+       dnl * Since kqueue is mostly used for scaling large web servers, 
+       dnl * and very few folks run Mono on large web servers on OSX, falling
+       dnl * back 
+       dnl **************************************
+       if test "x$havekqueue" = "xyes" -a "x$ac_cv_header_sys_event_h" = "xyes"; then
+               if test "x$platform_darwin" = "xno"; then
+                       AC_DEFINE(USE_KQUEUE_FOR_THREADPOOL, 1, [Use kqueue for the threadpool])
+               fi
+       fi
+
+       dnl ******************************
+       dnl *** Checks for SIOCGIFCONF ***
+       dnl ******************************
+       AC_CHECK_HEADERS(sys/ioctl.h)
+       AC_CHECK_HEADERS(net/if.h, [], [],
+          [
+          #ifdef HAVE_SYS_TYPES_H
+          # include <sys/types.h>
+          #endif
+          #ifdef HAVE_SYS_SOCKET_H
+          # include <sys/socket.h>
+          #endif
+          ])
+       AC_MSG_CHECKING(for ifreq)
+       AC_TRY_COMPILE([
+               #include <stdio.h>
+               #include <sys/ioctl.h>
+               #include <net/if.h>
+               ], [
+               struct ifconf ifc;
+               struct ifreq *ifr;
+               void *x;
+               ifc.ifc_len = 0;
+               ifc.ifc_buf = NULL;
+               x = (void *) &ifr->ifr_addr;
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_SIOCGIFCONF, 1, [Can get interface list])
+               ], [
+                       AC_MSG_RESULT(no)
+               ])
+       dnl **********************************
+       dnl ***     Checks for sin_len     ***
+       dnl **********************************
+       AC_MSG_CHECKING(for sockaddr_in.sin_len)
+       AC_TRY_COMPILE([
+               #include <netinet/in.h>
+               ], [
+               struct sockaddr_in saddr;
+               saddr.sin_len = sizeof (saddr);
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [sockaddr_in has sin_len])
+               ], [
+                       AC_MSG_RESULT(no)
+               ])      
+       dnl **********************************
+       dnl ***    Checks for sin6_len     ***
+       dnl **********************************
+       AC_MSG_CHECKING(for sockaddr_in6.sin6_len)
+       AC_TRY_COMPILE([
+               #include <netinet/in.h>
+               ], [
+               struct sockaddr_in6 saddr6;
+               saddr6.sin6_len = sizeof (saddr6);
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_SOCKADDR_IN6_SIN_LEN, 1, [sockaddr_in6 has sin6_len])
+               ], [
+                       AC_MSG_RESULT(no)
+               ])
+       dnl **********************************
+       dnl *** Check for getifaddrs       ***
+       dnl **********************************
+       AC_MSG_CHECKING(for getifaddrs)
+               AC_TRY_LINK([
+               #include <stdio.h>
+               #include <sys/types.h>
+               #include <sys/socket.h>
+               #include <ifaddrs.h>
+       ], [
+               getifaddrs(NULL);
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_GETIFADDRS, 1, [Have getifaddrs])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+       dnl **********************************
+       dnl *** Check for if_nametoindex   ***
+       dnl **********************************
+       AC_MSG_CHECKING(for if_nametoindex)
+               AC_TRY_LINK([
+               #include <stdio.h>
+               #include <sys/types.h>
+               #include <sys/socket.h>
+               #include <net/if.h>
+       ], [
+               if_nametoindex(NULL);
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IF_NAMETOINDEX, 1, [Have if_nametoindex])
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+                       
+       dnl **********************************
+       dnl *** Checks for MonoPosixHelper ***
+       dnl **********************************
+       AC_CHECK_HEADERS(checklist.h)
+       AC_CHECK_HEADERS(pathconf.h)
+       AC_CHECK_HEADERS(fstab.h)
+       AC_CHECK_HEADERS(attr/xattr.h)
+       AC_CHECK_HEADERS(sys/extattr.h)
+       AC_CHECK_HEADERS(sys/sendfile.h)
+       AC_CHECK_HEADERS(sys/statvfs.h)
+       AC_CHECK_HEADERS(sys/statfs.h)
+       AC_CHECK_HEADERS(sys/vfstab.h)
+       AC_CHECK_HEADERS(sys/xattr.h)
+       AC_CHECK_HEADERS(sys/mman.h)
+       AC_CHECK_HEADERS(sys/param.h)
+       AC_CHECK_HEADERS(sys/mount.h, [], [],
+               [
+               #ifdef HAVE_SYS_PARAM_H
+               # include <sys/param.h>
+               #endif
+               ])
+       AC_CHECK_HEADERS(sys/mount.h)
+       AC_CHECK_FUNCS(confstr)
+       AC_CHECK_FUNCS(seekdir telldir)
+       AC_CHECK_FUNCS(getdomainname)
+       AC_CHECK_FUNCS(setdomainname)
+       AC_CHECK_FUNCS(endgrent getgrent fgetgrent setgrent)
+       AC_CHECK_FUNCS(setgroups)
+       AC_CHECK_FUNCS(endpwent getpwent fgetpwent setpwent)
+       AC_CHECK_FUNCS(getfsstat)
+       AC_CHECK_FUNCS(lutimes futimes)
+       AC_CHECK_FUNCS(mremap)
+       AC_CHECK_FUNCS(remap_file_pages)
+       AC_CHECK_FUNCS(posix_fadvise)
+       AC_CHECK_FUNCS(posix_fallocate)
+       AC_CHECK_FUNCS(posix_madvise)
+       AC_CHECK_FUNCS(vsnprintf)
+       AC_CHECK_FUNCS(sendfile)
+       AC_CHECK_FUNCS(gethostid sethostid)
+       AC_CHECK_FUNCS(sethostname)
+       AC_CHECK_FUNCS(statfs)
+       AC_CHECK_FUNCS(fstatfs)
+       AC_CHECK_FUNCS(statvfs)
+       AC_CHECK_FUNCS(fstatvfs)
+       AC_CHECK_FUNCS(stime)
+       AC_CHECK_FUNCS(strerror_r)
+       AC_CHECK_FUNCS(ttyname_r)
+       AC_CHECK_FUNCS(psignal)
+       AC_CHECK_FUNCS(getlogin_r)
+       AC_CHECK_FUNCS(lockf)
+       AC_CHECK_FUNCS(swab)
+       AC_CHECK_FUNCS(setusershell endusershell)
+       AC_CHECK_FUNCS(futimens utimensat)
+       AC_CHECK_FUNCS(fstatat mknodat readlinkat)
+       AC_CHECK_FUNCS(readv writev preadv pwritev)
+       AC_CHECK_FUNCS(setpgid)
+       AC_CHECK_SIZEOF(size_t)
+       AC_CHECK_TYPES([blksize_t], [AC_DEFINE(HAVE_BLKSIZE_T)], , 
+               [#include <sys/types.h>
+                #include <sys/stat.h>
+                #include <unistd.h>])
+       AC_CHECK_TYPES([blkcnt_t], [AC_DEFINE(HAVE_BLKCNT_T)], ,
+               [#include <sys/types.h>
+                #include <sys/stat.h>
+                #include <unistd.h>])
+       AC_CHECK_TYPES([suseconds_t], [AC_DEFINE(HAVE_SUSECONDS_T)], ,
+               [#include <sys/time.h>])
+       AC_CHECK_TYPES([struct flock], [AC_DEFINE(HAVE_STRUCT_FLOCK)], ,
+               [#include <unistd.h>
+                #include <fcntl.h>])
+       AC_CHECK_TYPES([struct iovec], [AC_DEFINE(HAVE_STRUCT_IOVEC)], ,
+               [#include <sys/uio.h>])
+       AC_CHECK_TYPES([struct pollfd], [AC_DEFINE(HAVE_STRUCT_POLLFD)], ,
+               [#include <sys/poll.h>])
+       AC_CHECK_TYPES([struct stat], [AC_DEFINE(HAVE_STRUCT_STAT)], ,
+               [#include <sys/types.h>
+                #include <sys/stat.h>
+                #include <unistd.h>])
+       AC_CHECK_TYPES([struct timespec], [AC_DEFINE(HAVE_STRUCT_TIMESPEC)], ,
+               [#include <time.h>])
+       AC_CHECK_TYPES([struct timeval], [AC_DEFINE(HAVE_STRUCT_TIMEVAL)], ,
+               [#include <sys/time.h>
+                #include <sys/types.h>
+                #include <utime.h>])
+       AC_CHECK_TYPES([struct timezone], [AC_DEFINE(HAVE_STRUCT_TIMEZONE)], ,
+               [#include <sys/time.h>])
+       AC_CHECK_TYPES([struct utimbuf], [AC_DEFINE(HAVE_STRUCT_UTIMBUF)], ,
+               [#include <sys/types.h>
+                #include <utime.h>])
+       AC_CHECK_MEMBERS(
+               [struct dirent.d_off, struct dirent.d_reclen, struct dirent.d_type],,, 
+               [#include <sys/types.h>
+                #include <dirent.h>])
+       AC_CHECK_MEMBERS(
+               [struct passwd.pw_gecos],,, 
+               [#include <sys/types.h>
+                #include <pwd.h>])
+       AC_CHECK_MEMBERS(
+               [struct statfs.f_flags],,, 
+               [#include <sys/types.h>
+                #include <sys/vfs.h>])
+       AC_CHECK_MEMBERS(
+               [struct stat.st_atim, struct stat.st_mtim, struct stat.st_ctim],,, 
+               [#include <sys/types.h>
+                #include <sys/stat.h>
+                #include <unistd.h>])
+
+       dnl Favour xattr through glibc, but use libattr if we have to
+       AC_CHECK_FUNC(lsetxattr, ,
+               AC_CHECK_LIB(attr, lsetxattr, XATTR_LIB="-lattr",)
+       )
+       AC_SUBST(XATTR_LIB)
+
+       dnl kinfo_proc.kp_proc works on darwin but fails on other simil-bsds
+       AC_CHECK_MEMBERS(
+               [struct kinfo_proc.kp_proc],,, 
+               [#include <sys/types.h>
+                #include <sys/param.h>
+                #include <sys/sysctl.h>
+                #include <sys/proc.h>
+                ])
+
+       dnl *********************************
+       dnl *** Checks for Windows compilation ***
+       dnl *********************************
+       AC_CHECK_HEADERS(sys/time.h)
+       AC_CHECK_HEADERS(sys/param.h)
+       AC_CHECK_HEADERS(dirent.h)
+
+       dnl ******************************************
+       dnl *** Checks for OSX and iOS compilation ***
+       dnl ******************************************
+       AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h)
+
+       dnl *********************************
+       dnl *** Check for Console 2.0 I/O ***
+       dnl *********************************
+       AC_CHECK_HEADERS([curses.h])
+       AC_CHECK_HEADERS([term.h], [], [],
+       [#if HAVE_CURSES_H
+        #include <curses.h>
+        #endif
+       ])
+       AC_CHECK_HEADERS([termios.h])
+
+       dnl * This is provided in io-layer, but on windows it's only available
+       dnl * on xp+
+       AC_DEFINE(HAVE_GETPROCESSID, 1, [Define if GetProcessId is available])
+else
+       dnl *********************************
+       dnl *** Checks for Windows compilation ***
+       dnl *********************************
+       AC_CHECK_HEADERS(winternl.h)
+
+       jdk_headers_found=no
+       AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
+       AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
+       AC_CHECK_LIB(ole32, main, LIBS="$LIBS -lole32", AC_ERROR(bad mingw install?))
+       AC_CHECK_LIB(winmm, main, LIBS="$LIBS -lwinmm", AC_ERROR(bad mingw install?))
+       AC_CHECK_LIB(oleaut32, main, LIBS="$LIBS -loleaut32", AC_ERROR(bad mingw install?))
+       AC_CHECK_LIB(advapi32, main, LIBS="$LIBS -ladvapi32", AC_ERROR(bad mingw install?))
+       AC_CHECK_LIB(version, main, LIBS="$LIBS -lversion", AC_ERROR(bad mingw install?))
+
+       dnl *********************************
+       dnl *** Check for struct ip_mreqn ***
+       dnl *********************************
+       AC_MSG_CHECKING(for struct ip_mreqn)
+       AC_TRY_COMPILE([#include <ws2tcpip.h>], [
+               struct ip_mreqn mreq;
+               mreq.imr_address.s_addr = 0;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_STRUCT_IP_MREQN)
+       ], [
+               # We'll just have to try and use struct ip_mreq
+               AC_MSG_RESULT(no)
+               AC_MSG_CHECKING(for struct ip_mreq)
+               AC_TRY_COMPILE([#include <ws2tcpip.h>], [
+                       struct ip_mreq mreq;
+                       mreq.imr_interface.s_addr = 0;
+               ], [
+                       # Yes, we have it...
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_STRUCT_IP_MREQ)
+               ], [
+                       # No multicast support
+                       AC_MSG_RESULT(no)
+               ])
+       ])
+       AC_CHECK_DECLS(InterlockedExchange64, [], [], [[#include <windows.h>]])
+       AC_CHECK_DECLS(InterlockedCompareExchange64, [], [], [[#include <windows.h>]])
+       AC_CHECK_DECLS(InterlockedDecrement64, [], [], [[#include <windows.h>]])
+       AC_CHECK_DECLS(InterlockedIncrement64, [], [], [[#include <windows.h>]])
+       AC_CHECK_DECLS(InterlockedAdd, [], [], [[#include <windows.h>]])
+       AC_CHECK_DECLS(InterlockedAdd64, [], [], [[#include <windows.h>]])
+       AC_CHECK_DECLS(__readfsdword, [], [], [[#include <windows.h>]])
+
+       AC_MSG_CHECKING(for GetProcessId)
+       AC_TRY_COMPILE([#include <windows.h>], [
+               GetProcessId (0);
+       ], [
+          AC_MSG_RESULT(yes)
+          AC_DEFINE(HAVE_GETPROCESSID)
+       ], [
+          AC_MSG_RESULT(no)
+       ])
+fi
+
+dnl socklen_t check
+AC_MSG_CHECKING(for socklen_t)
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+],[
+  socklen_t foo;
+],[
+ac_cv_c_socklen_t=yes
+       AC_DEFINE(HAVE_SOCKLEN_T, 1, [Have socklen_t])
+       AC_MSG_RESULT(yes)
+],[
+       AC_MSG_RESULT(no)
+])
+
+AC_MSG_CHECKING(for array element initializer support)
+AC_TRY_COMPILE([#include <sys/socket.h>], [
+       const int array[] = {[1] = 2,};
+], [
+       # Yes, we have it...
+       AC_MSG_RESULT(yes)
+       AC_DEFINE(HAVE_ARRAY_ELEM_INIT,1,[Supports C99 array initialization])
+], [
+       # We'll have to use signals
+       AC_MSG_RESULT(no)
+])
+
+AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
+       # Simply calling trunc (0.0) is no good since gcc will optimize the call away
+       AC_TRY_LINK([#include <math.h>], 
+       [ static void *p = &trunc; ],
+       [
+               AC_DEFINE(HAVE_TRUNC) 
+               AC_MSG_RESULT(yes)
+               ac_cv_trunc=yes
+       ],
+       AC_MSG_RESULT(no)))
+
+if test "x$ac_cv_truncl" != "xyes"; then
+   AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL, 1, [Has the 'aintl' function]) LIBS="$LIBS -lsunmath"])
+fi
+
+AC_CHECK_FUNCS(round)
+AC_CHECK_FUNCS(rint)
+AC_CHECK_FUNCS(execvp)
+
+dnl ****************************
+dnl *** Look for /dev/random ***
+dnl ****************************
+
+AC_MSG_CHECKING([if usage of random device is requested])
+AC_ARG_ENABLE(dev-random,
+[  --disable-dev-random    disable the use of the random device (enabled by default)],
+try_dev_random=$enableval, try_dev_random=yes)
+
+AC_MSG_RESULT($try_dev_random)
+
+case "{$build}" in
+    *-openbsd*)
+    NAME_DEV_RANDOM="/dev/srandom"
+    ;;
+
+dnl Win32 does not have /dev/random, they have their own method...
+
+    *-mingw*|*-*-cygwin*)
+    ac_cv_have_dev_random=no
+    ;;
+
+dnl Everywhere else, it's /dev/random
+
+    *)
+    NAME_DEV_RANDOM="/dev/random"
+    ;;
+esac
+
+AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM", [Name of /dev/random])
+
+dnl Now check if the device actually exists
+
+if test "x$try_dev_random" = "xyes"; then
+    AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
+    [if test -r "$NAME_DEV_RANDOM" ; then
+        ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
+    if test "x$ac_cv_have_dev_random" = "xyes"; then
+        AC_DEFINE(HAVE_CRYPT_RNG, 1, [Have /dev/random])
+    fi
+else
+    AC_MSG_CHECKING(for random device)
+    ac_cv_have_dev_random=no
+    AC_MSG_RESULT(has been disabled)
+fi
+
+if test "x$host_win32" = "xyes"; then
+    AC_DEFINE(HAVE_CRYPT_RNG)
+fi
+
+if test "x$ac_cv_have_dev_random" = "xno" \
+    && test "x$host_win32" = "xno"; then
+    AC_MSG_WARN([[
+***
+*** A system-provided entropy source was not found on this system.
+*** Because of this, the System.Security.Cryptography random number generator
+*** will throw a NotImplemented exception.
+***
+*** If you are seeing this message, and you know your system DOES have an
+*** entropy collection in place, please contact <crichton@gimp.org> and
+*** provide information about the system and how to access the random device.
+***
+*** Otherwise you can install either egd or prngd and set the environment
+*** variable MONO_EGD_SOCKET to point to the daemon's socket to use that.
+***]])
+fi
+AC_MSG_CHECKING([if inter-process shared handles are requested])
+AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
+AC_MSG_RESULT($try_shared_handles)
+if test "x$try_shared_handles" != "xyes"; then
+       AC_DEFINE(DISABLE_SHARED_HANDLES, 1, [Disable inter-process shared handles])
+       AC_SUBST(DISABLE_SHARED_HANDLES)
+fi
+
+AC_ARG_ENABLE(bcl-opt, [  --disable-bcl-opt    BCL is compiled with no optimizations (allows accurate BCL debugging)], test_bcl_opt=$enableval, test_bcl_opt=yes)
+
+AC_ARG_ENABLE(nunit-tests, [  --enable-nunit-tests     Run the nunit tests of the class library on 'make check'])
+AM_CONDITIONAL(ENABLE_NUNIT_TESTS, [test x$enable_nunit_tests = xyes])
+
+AC_MSG_CHECKING([if big-arrays are to be enabled])
+AC_ARG_ENABLE(big-arrays,  [  --enable-big-arrays      Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no)
+if test "x$enable_big_arrays" = "xyes" ; then
+    if  test "x$ac_cv_sizeof_void_p" = "x8"; then
+       AC_DEFINE(MONO_BIG_ARRAYS,1,[Enable the allocation and indexing of arrays greater than Int32.MaxValue])
+    else
+        AC_MSG_ERROR([The allocation and indexing of arrays greater than Int32.MaxValue is not supported on this platform.])
+    fi
+fi
+AC_MSG_RESULT($enable_big_arrays)
+
+dnl **************
+dnl *** DTRACE ***
+dnl **************
+
+AC_ARG_ENABLE(dtrace,[  --enable-dtrace        Enable DTrace probes], enable_dtrace=$enableval, enable_dtrace=$has_dtrace)
+
+if test "x$enable_dtrace" = "xyes"; then
+   if test "x$has_dtrace" = "xno"; then
+         AC_MSG_ERROR([DTrace probes are not supported on this platform.])
+   fi
+   AC_PATH_PROG(DTRACE, [dtrace], [no], [$PATH:/usr/sbin])
+   if test "x$DTRACE" = "xno"; then
+         AC_MSG_RESULT([dtrace utility not found, dtrace support disabled.])
+         enable_dtrace=no
+   elif ! $DTRACE -h -s $srcdir/data/mono.d > /dev/null 2>&1; then
+         AC_MSG_RESULT([dtrace doesn't support -h option, dtrace support disabled.])
+         enable_dtrace=no
+   fi
+fi
+
+dtrace_g=no
+if test "x$enable_dtrace" = "xyes"; then
+       AC_DEFINE(ENABLE_DTRACE, 1, [Enable DTrace probes])
+       DTRACEFLAGS=
+       if test "x$ac_cv_sizeof_void_p" = "x8"; then
+               case "$host" in
+                       powerpc-*-darwin*)
+                       DTRACEFLAGS="-arch ppc64"
+                       ;;
+                       i*86-*-darwin*)
+                       DTRACEFLAGS="-arch x86_64"
+                       ;;
+                       *)
+                       DTRACEFLAGS=-64
+                       ;;
+               esac
+       else
+               case "$host" in
+                       powerpc-*-darwin*)
+                       DTRACEFLAGS="-arch ppc"
+                       ;;
+                       i*86-*-darwin*)
+                       DTRACEFLAGS="-arch i386"
+                       ;;
+                       *)
+                       DTRACEFLAGS=-32
+                       ;;
+               esac
+       fi
+       AC_SUBST(DTRACEFLAGS)
+       case "$host" in
+               *-*-solaris*)
+               dtrace_g=yes
+               ;;
+       esac
+       AC_CHECK_HEADERS([sys/sdt.h])
+fi
+AM_CONDITIONAL(ENABLE_DTRACE, [test x$enable_dtrace = xyes])
+AM_CONDITIONAL(DTRACE_G_REQUIRED, [test x$dtrace_g = xyes])
+
+dnl **************
+dnl ***  NaCl  ***
+dnl **************
+
+AC_ARG_ENABLE(nacl_codegen, [  --enable-nacl-codegen      Enable Native Client code generation], enable_nacl_codegen=$enableval, enable_nacl_codegen=no)
+AC_ARG_ENABLE(nacl_gc, [  --enable-nacl-gc           Enable Native Client garbage collection], enable_nacl_gc=$enableval, enable_nacl_gc=no)
+
+AM_CONDITIONAL(NACL_CODEGEN, test x$enable_nacl_codegen != xno)
+
+dnl
+dnl Hack to use system mono for operations in build/install not allowed in NaCl.
+dnl
+nacl_self_host=""
+if test "x$ac_cv_header_nacl_nacl_dyncode_h" = "xyes"; then
+   nacl_self_host="nacl_self_host"
+fi
+AC_SUBST(nacl_self_host)
+
+if test "x$enable_nacl_codegen" = "xyes"; then
+   MONO_NACL_ALIGN_MASK_OFF=1
+   AC_DEFINE(TARGET_NACL, 1, [...])
+   AC_DEFINE(__native_client_codegen__, 1, [...])
+else
+   MONO_NACL_ALIGN_MASK_OFF=0
+   AC_DEFINE(__default_codegen__, 1, [...])
+fi
+if test "x$enable_nacl_gc" = "xyes"; then
+   if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
+      INSTRUMENT_CFLAG="-finstrument-for-thread-suspension"
+   else
+      # Not yet implemented
+      INSTRUMENT_CFLAG=""
+   fi
+   CPPFLAGS="$CPPFLAGS $INSTRUMENT_CFLAG -D__native_client_gc__"
+fi
+AC_SUBST(MONO_NACL_ALIGN_MASK_OFF)
+
+dnl **************
+dnl ***  LLVM  ***
+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
+   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"
+   case "$target" in
+   arm*)
+               llvm_codegen="armcodegen"
+               ;;
+   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`
+   # This might include empty lines
+   LLVM_SYSTEM_LIBS=`$LLVM_CONFIG --system-libs 2>/dev/null | grep -- -`
+   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_LIBS $LLVM_LDFLAGS $LLVM_SYSTEM_LIBS -lstdc++"
+
+   expected_llvm_version="3.4svn-mono-mono/e656cac"
+
+   # Should be something like '2.6' or '2.7svn'
+   llvm_version=`$LLVM_CONFIG --version`
+   major_version=`echo $llvm_version | cut -c 1`
+   minor_version=`echo $llvm_version | cut -c 3`
+   llvm_api_version=`$LLVM_CONFIG --mono-api-version 2>/dev/null`
+   AC_MSG_CHECKING(LLVM version)
+   AC_MSG_RESULT($llvm_version)
+   if echo $llvm_version | grep -q 'mono'; then
+         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
+         if test "x$llvm_api_version" = "x"; then
+               LLVM_CFLAGS="$LLVM_CFLAGS -DLLVM_API_VERSION=0"
+               LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=0"
+         else
+               LLVM_CFLAGS="$LLVM_CFLAGS -DLLVM_API_VERSION=$llvm_api_version"
+               LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=$llvm_api_version"
+         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
+
+   AC_DEFINE_UNQUOTED(LLVM_MAJOR_VERSION, $major_version, [Major version of LLVM libraries])
+   AC_DEFINE_UNQUOTED(LLVM_MINOR_VERSION, $minor_version, [Minor version of LLVM libraries])
+   AC_DEFINE_UNQUOTED(LLVM_VERSION, "$llvm_version", [Full version of LLVM libraties])
+
+   # Have to pass these on the command line since mini-llvm-cpp.h already includes
+   # llvm's config.h
+   LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_MAJOR_VERSION=$major_version -DLLVM_MINOR_VERSION=$minor_version"
+
+   AC_SUBST(LLVM_CFLAGS)
+   AC_SUBST(LLVM_CXXFLAGS)
+   AC_SUBST(LLVM_LIBS)
+   AC_SUBST(LLVM_LDFLAGS)
+   AC_DEFINE(ENABLE_LLVM, 1, [Enable the LLVM back end])
+fi
+
+AM_CONDITIONAL(ENABLE_LLVM, [test x$enable_llvm = xyes])
+if test "x$enable_loadedllvm" = "xyes"; then
+   AC_DEFINE(MONO_LLVM_LOADED, 1, [The LLVM back end is dynamically loaded])
+fi
+AM_CONDITIONAL(LOADED_LLVM, [test x$enable_loadedllvm = xyes])
+
+TARGET="unknown"
+ACCESS_UNALIGNED="yes"
+
+JIT_SUPPORTED=no
+INTERP_SUPPORTED=no
+LIBC="libc.so.6"
+INTL="libc.so.6"
+SQLITE="libsqlite.so.0"
+SQLITE3="libsqlite3.so.0"
+X11="libX11.so"
+GDKX11="libgdk-x11-2.0.so.0"
+GTKX11="libgtk-x11-2.0.so.0"
+XINERAMA="libXinerama.so.1"
+
+sizeof_register="SIZEOF_VOID_P"
+
+jit_wanted=true
+interp_wanted=false
+sgen_supported=false
+boehm_supported=true
+case "$host" in
+       mips*)
+               TARGET=MIPS;
+               arch_target=mips;
+               sgen_supported=true
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+
+               AC_MSG_CHECKING(for mips n32)
+               AC_TRY_COMPILE([],[
+               #if _MIPS_SIM != _ABIN32
+               #error Not mips n32
+               #endif
+               return 0;
+               ],[
+               AC_MSG_RESULT(yes)
+               sizeof_register=8
+               ],[
+               AC_MSG_RESULT(no)
+               ])
+               ;;
+       i*86-*-*)
+               TARGET=X86;
+               arch_target=x86;
+               JIT_SUPPORTED=yes
+               case $host_os in
+                 solaris*)
+                       LIBC="libc.so"
+                       INTL="libintl.so"
+                       if test "x$ac_cv_sizeof_void_p" = "x8"; then
+                               TARGET=AMD64
+                               arch_target=amd64
+                       fi
+
+                       # On solaris 10 x86, gcc prints a warning saying 'visibility attribute not supported on this configuration; ignored', but linking fails. A test case:
+                       # int astruct __attribute__ ((visibility ("hidden")));
+                       # void foo ()
+                       # {
+                       #       void *p = &astruct;
+                       # }
+                       # gcc -fPIC --shared -o libfoo.so foo.c
+                       # yields:
+                       # foo.c:6: warning: visibility attribute not supported in this configuration; ignored
+                       # ld: fatal: relocation error: R_386_GOTOFF: file /var/tmp//ccxYR96k.o: symbol astruct: relocation must bind locally
+                       have_visibility_hidden=no
+                       sgen_supported=true
+                       ;;
+                 mingw*|cygwin*)
+                       sgen_supported=true
+                       have_visibility_hidden=no                 
+                       ;;
+                 haiku*)
+                       LIBC=libroot.so
+                       ;;
+                 linux*)
+                       sgen_supported=true
+                       AOT_SUPPORTED="yes"
+                       ;;
+                 darwin*)
+                       sgen_supported=true
+                       AOT_SUPPORTED="yes"
+                       ;;
+                 openbsd*|freebsd*|kfreebsd-gnu*)
+                       sgen_supported=true
+                       ;;
+               esac
+               ;;
+       x86_64-*-* | amd64-*-*)
+               TARGET=AMD64;
+               arch_target=amd64;
+               JIT_SUPPORTED=yes
+               if test "x$ac_cv_sizeof_void_p" = "x4"; then
+                       AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
+                       sizeof_register=8
+               fi
+               case $host_os in
+                 linux*)
+                       sgen_supported=true
+                       AOT_SUPPORTED="yes"
+                       ;;
+                 darwin*)
+                       sgen_supported=true
+                       AOT_SUPPORTED="yes"
+                       ;;
+                 openbsd*|freebsd*|kfreebsd-gnu*)
+                       sgen_supported=true
+                       ;;
+                 mingw*)
+                       sgen_supported=true
+                       ;;
+               esac
+               case "$host" in
+                       x86_64-*-nacl*)
+                               AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
+                               sizeof_register=8
+                               ;;
+               esac
+               ;;
+       ia64-*-*)
+               TARGET=IA64
+               arch_target=ia64
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+               LIBC="libc.so.6.1"
+               INTL="libc.so.6.1"
+               AC_CHECK_LIB(unwind, _U_dyn_register, [], [AC_MSG_ERROR(library libunwind not found)])
+               libmono_ldflags="-lunwind"
+               ;;
+       sparc*-*-*)
+               if test "x$ac_cv_sizeof_void_p" = "x8"; then
+                  TARGET=SPARC64
+               else
+                       TARGET=SPARC
+               fi
+               arch_target=sparc;
+               JIT_SUPPORTED=yes
+               ACCESS_UNALIGNED="no"
+               case $host_os in
+                 linux*) ;;
+                 *)
+                       LIBC="libc.so"
+                       INTL="libintl.so"
+               esac
+               if test x"$GCC" = xyes; then
+                       # We don't support v8 cpus
+                       CFLAGS="$CFLAGS -Wno-cast-align -mcpu=v9"
+               fi
+               if test x"$AR" = xfalse; then
+                       AC_MSG_ERROR([The required utility 'ar' is not found in your PATH. Usually it can be found in /usr/ccs/bin.])
+               fi
+               sgen_supported=true
+               ;;
+       *-mingw*|*-*-cygwin*)
+               # When this is enabled, it leads to very strange crashes at runtime (gcc-3.4.4)
+               have_visibility_hidden=no
+               INTL="intl"
+               ;;
+       macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
+        powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc-*-freebsd* )
+               if test "x$ac_cv_sizeof_void_p" = "x8"; then
+                       TARGET=POWERPC64;
+                       CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
+                       CFLAGS="$CFLAGS -mminimal-toc"
+               else
+                       TARGET=POWERPC;
+                       CPPFLAGS="$CPPFLAGS -D__mono_ppc__"
+               fi
+               arch_target=ppc;
+               JIT_SUPPORTED=yes
+               case $host_os in
+                 linux*|darwin*)
+                       sgen_supported=true
+                       ;;
+               esac
+               ;;
+       arm*-darwin*)
+               TARGET=ARM;
+               arch_target=arm;
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+               CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
+               sgen_supported=true
+               ;;
+       arm*-linux*)
+               TARGET=ARM;
+               arch_target=arm;
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+               sgen_supported=true
+               AOT_SUPPORTED="yes"
+               CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
+               ;;
+# TODO: make proper support for NaCl host.
+#        arm*-*nacl)
+#              TARGET=ARM;
+#              arch_target=arm;
+#              ACCESS_UNALIGNED="no"
+#              JIT_SUPPORTED=yes
+#              sgen_supported=true
+#              AOT_SUPPORTED="no"
+#              ;;
+       aarch64-*)
+               # https://lkml.org/lkml/2012/7/15/133
+               TARGET=ARM64
+               arch_target=arm64
+               JIT_SUPPORTED=yes
+               sgen_supported=true
+               boehm_supported=false
+               ;;
+       s390x-*-linux*)
+               TARGET=S390X;
+               arch_target=s390x;
+               ACCESS_UNALIGNED="yes"
+               JIT_SUPPORTED=yes
+               sgen_supported=true
+               CFLAGS="$CFLAGS -mbackchain -D__USE_STRING_INLINES"
+               ;;
+esac
+
+HOST=$TARGET
+
+if test "x$host" != "x$target"; then
+   AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
+   enable_mcs_build=no
+   case "$target" in
+   arm*-darwin*)
+               TARGET=ARM;
+               arch_target=arm;
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+               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
+               with_tls=pthread
+               ;;
+   powerpc64-ps3-linux-gnu)
+               TARGET=POWERPC64
+               arch_target=powerpc64
+               AC_DEFINE(TARGET_PS3, 1, [...])
+               # It would be better to just use TARGET_POWERPC64, but lots of code already
+               # uses this define
+               AC_DEFINE(__mono_ppc64__, 1, [...])
+               AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
+               sizeof_register=8
+               target_byte_order=G_BIG_ENDIAN
+               ;;
+   powerpc64-xbox360-linux-gnu)
+               TARGET=POWERPC64
+               arch_target=powerpc64
+               AC_DEFINE(TARGET_XBOX360, 1, [...])
+               # It would be better to just use TARGET_POWERPC64, but lots of code already
+               # uses this define
+               sizeof_register=8
+               target_byte_order=G_BIG_ENDIAN
+               ;;
+   x86_64-*-nacl)
+               TARGET=AMD64
+               arch_target=amd64
+               AC_DEFINE(TARGET_AMD64, 1, [...])
+               AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
+               sizeof_register=8
+               ;;
+# TODO: make proper support for NaCl target.
+#   arm*-*nacl)
+#              TARGET=ARM
+#              arch_target=arm
+#              AC_DEFINE(TARGET_ARM, 1, [...])
+#              ACCESS_UNALIGNED="no"
+#              JIT_SUPPORTED=yes
+#              sizeof_register=4
+#               CPPFLAGS="$CPPFLAGS \
+#                    -D__ARM_EABI__ \
+#                    -D__arm__ \
+#                    -D__portable_native_client__ \
+#                    -Dtimezone=_timezone \
+#                    -DDISABLE_SOCKETS \
+#                    -DDISABLE_ATTACH \
+#                    -DUSE_NEWLIB"
+#              jit_wanted=true
+               # Can't use tls, since it depends on the runtime detection of tls offsets
+               # in mono-compiler.h
+#              with_tls=pthread
+#              ;;
+   i686-*-nacl)
+               TARGET=X86
+               arch_target=x86
+               AC_DEFINE(TARGET_X86, 1, [...])
+               sizeof_register=4
+               ;;
+   arm*-linux-*)
+               TARGET=ARM;
+               arch_target=arm;
+               AC_DEFINE(TARGET_ARM, 1, [...])
+               AC_DEFINE(TARGET_ANDROID, 1, [...])
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+               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
+               with_tls=pthread
+               target_mach=no
+               case "$target" in
+               armv7l-unknown-linux-gnueabi*)
+                       # TEGRA
+                       CPPFLAGS="$CPPFLAGS"
+                       ;;
+               armv5-*-linux-androideabi*)
+                       CPPFLAGS="$CPPFLAGS"
+                       ;;
+               esac
+               ;;
+       aarch64-*)
+               TARGET=ARM64
+               JIT_SUPPORTED=yes
+               jit_wanted=true
+               ;;
+       *)
+               AC_MSG_ERROR([Cross compiling is not supported for target $target])
+       esac
+fi
+
+case "$TARGET" in
+X86)
+       AC_DEFINE(TARGET_X86, 1, [...])
+       ;;
+AMD64)
+       AC_DEFINE(TARGET_AMD64, 1, [...])
+       ;;
+ARM)
+       AC_DEFINE(TARGET_ARM, 1, [...])
+       ;;
+ARM64)
+       AC_DEFINE(TARGET_ARM64, 1, [...])
+       ;;
+POWERPC)
+       AC_DEFINE(TARGET_POWERPC, 1, [...])
+       ;;
+POWERPC64)
+       AC_DEFINE(TARGET_POWERPC, 1, [...])
+       AC_DEFINE(TARGET_POWERPC64, 1, [...])
+       ;;
+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 | ARM64 | 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" -o "x$TARGET" = "xARM64"; then
+         AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
+         CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
+         CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
+   else
+       AC_TRY_COMPILE([#include "TargetConditionals.h"],[
+       #if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
+       #error fail this for ios
+       #endif
+       return 0;
+       ], [
+                 AC_DEFINE(TARGET_OSX,1,[The JIT/AOT targets OSX])
+          CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_OSX"
+          CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_OSX"
+       ], [
+          AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
+          CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
+          CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
+       ])
+       fi
+   AC_DEFINE(TARGET_MACH,1,[The JIT/AOT targets Apple platforms])
+fi
+
+if test "x$sizeof_register" = "x4"; then
+   AC_DEFINE(SIZEOF_REGISTER,4,[size of machine integer registers])
+elif test "x$sizeof_register" = "x8"; then
+   AC_DEFINE(SIZEOF_REGISTER,8,[size of machine integer registers])
+else
+   AC_DEFINE(SIZEOF_REGISTER,SIZEOF_VOID_P,[size of machine integer registers])
+fi
+
+if test "x$target_byte_order" = "xG_BIG_ENDIAN"; then
+   AC_DEFINE(TARGET_BYTE_ORDER,G_BIG_ENDIAN,[byte order of target])
+elif test "x$target_byte_order" = "xG_LITTLE_ENDIAN"; then
+   AC_DEFINE(TARGET_BYTE_ORDER,G_LITTLE_ENDIAN,[byte order of target])
+else
+   AC_DEFINE(TARGET_BYTE_ORDER,G_BYTE_ORDER,[byte order of target])
+fi
+
+if test "x$have_visibility_hidden" = "xyes"; then
+   AC_DEFINE(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility ("hidden") attribute])
+fi
+
+if test "x$have_deprecated" = "xyes"; then
+   AC_DEFINE(HAVE_DEPRECATED, 1, [Support for the deprecated attribute])
+fi
+
+dnl 
+dnl Simple Generational checks (sgen)
+dnl
+if $sgen_supported; then
+   build_sgen_default=yes
+else
+   build_sgen_default=no
+fi
+SGEN_DEFINES=
+AC_ARG_WITH(sgen, [  --with-sgen=yes,no             Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=$build_sgen_default])
+if test x$buildsgen = xyes; then
+   if $sgen_supported; then
+       SGEN_DEFINES="-DHAVE_SGEN_GC -DHAVE_MOVING_COLLECTOR"
+       gc_msg="sgen and $gc_msg"
+   else
+       buildsgen=no
+       AC_MSG_WARN("Sgen is not supported on this platform")
+   fi
+fi
+AC_SUBST(SGEN_DEFINES)
+AM_CONDITIONAL(SUPPORT_SGEN, test x$buildsgen = xyes)
+
+USEJIT=false
+if test x$JIT_SUPPORTED = xyes; then
+   if $jit_wanted; then
+      USEJIT=true
+      jit_status="Building and using the JIT"
+   else
+      if $interp_wanted; then
+         jit_status="Building the JIT, defaulting to the interpreter"
+      else
+         AC_ERROR(No JIT or interpreter support available or selected.)
+      fi
+   fi
+else
+   if test x$interp_wanted = xtrue; then
+      jit_status="interpreter"
+   else
+      AC_ERROR(No JIT or interpreter support available or selected.)
+   fi
+fi
+
+AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
+
+libsuffix=".so"
+
+case "$host" in
+     *-*-darwin*)
+       libsuffix=".dylib"
+       LIBC="libc.dylib"
+       INTL="libintl.dylib"
+       SQLITE="libsqlite.0.dylib"
+       SQLITE3="libsqlite3.0.dylib"
+       X11="libX11.dylib"
+       GDKX11="libgdk-x11-2.0.dylib"
+       GTKX11="libgtk-x11-2.0.dylib"
+       ;;
+     *-*-*netbsd*)
+       LIBC="libc.so.12"
+       INTL="libintl.so.0"
+       ;;
+     *-*-kfreebsd*-gnu)
+       LIBC="libc.so.0.1"
+       INTL="libc.so.0.1"
+       X11="libX11.so.6"
+       ;;
+    *-*-*freebsd*)
+       LIBC="libc.so"
+       INTL="libintl.so"
+       SQLITE="libsqlite.so"
+       SQLITE3="libsqlite3.so"
+       ;;
+    *-*-*openbsd*)
+       LIBC="libc.so"
+       INTL="libintl.so"
+        SQLITE="libsqlite.so"
+        SQLITE3="libsqlite3.so"
+       ;;
+    *-*-*linux*)
+       AC_PATH_X
+       dlsearch_path=`(libtool --config ; echo eval echo \\$sys_lib_dlsearch_path_spec) | sh`
+       AC_MSG_CHECKING(for the soname of libX11.so)
+       for i in $x_libraries $dlsearch_path; do
+               for r in 4 5 6; do
+                       if test -f $i/libX11.so.$r; then
+                               X11=libX11.so.$r
+                               AC_MSG_RESULT($X11)
+                       fi
+               done
+       done
+       
+       if test "x$X11" = "xlibX11.so"; then
+               AC_MSG_WARN([Could not find libX11.so. Do you have X.org or XFree86 installed? Assuming libX11.so.6...]);
+               X11=libX11.so.6
+       fi
+       ;;
+esac
+
+
+AC_SUBST(libsuffix)
+
+AC_ARG_WITH([libgdiplus],
+       [  --with-libgdiplus=installed|sibling|<path>   Override the libgdiplus used for System.Drawing tests (defaults to installed)],
+       [], [with_libgdiplus=installed])
+
+# default install location
+libgdiplus_install_loc=libgdiplus${libsuffix}
+case $with_libgdiplus in
+    no|installed)
+    libgdiplus_loc=
+    ;;
+
+    yes|sibling)
+    libgdiplus_loc=`cd ../libgdiplus && pwd`/src/libgdiplus.la
+    ;;
+
+    /*) # absolute path, assume it is an install location
+    libgdiplus_loc=$with_libgdiplus
+    libgdiplus_install_loc=$with_libgdiplus
+    ;;
+
+    *)
+    libgdiplus_loc=`pwd`/$with_libgdiplus
+    ;;
+esac
+AC_SUBST([libgdiplus_loc])
+AC_SUBST([libgdiplus_install_loc])
+
+AC_ARG_ENABLE(icall-symbol-map,[  --enable-icall-symbol-map Generate tables which map icall functions to their C symbols], icall_symbol_map=$enableval, icall_symbol_map=no)
+if test "x$icall_symbol_map" = "xyes"; then
+   AC_DEFINE(ENABLE_ICALL_SYMBOL_MAP, 1, [Icall symbol map enabled])
+fi
+
+AC_ARG_ENABLE(icall-export,[  --enable-icall-export Export icall functions], icall_export=$enableval, icall_export=no)
+if test "x$icall_export" = "xyes"; then
+   AC_DEFINE(ENABLE_ICALL_EXPORT, 1, [Icall export enabled])
+fi
+
+AC_ARG_ENABLE(icall-tables,[  --disable-icall-tables Disable the runtime lookup of icalls], icall_tables=$enableval, icall_tables=yes)
+if test "x$icall_tables" = "xno"; then
+   AC_DEFINE(DISABLE_ICALL_TABLES, 1, [Icall tables disabled])
+fi
+
+if test "x$with_tls" = "x__thread"; then
+       AC_DEFINE(HAVE_KW_THREAD, 1, [Have __thread keyword])
+       # Pass the information to libgc
+       CPPFLAGS="$CPPFLAGS -DUSE_COMPILER_TLS"
+       AC_MSG_CHECKING(if the tls_model attribute is supported)
+       AC_TRY_COMPILE([static __thread int foo __attribute__((tls_model("initial-exec")));], [
+               ], [
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_TLS_MODEL_ATTR, 1, [tls_model available])
+               ], [
+                       AC_MSG_RESULT(no)
+       ])
+fi
+
+if test ${TARGET} = ARM; then
+       dnl ******************************************
+       dnl *** Check to see what FPU is available ***
+       dnl ******************************************
+       AC_MSG_CHECKING(which FPU to use)
+
+       #
+       # This is a bit tricky:
+       #
+       # if (__ARM_PCS_VFP) {
+       #       /* mfloat-abi=hard == VFP with hard ABI */
+       # } elif (!__SOFTFP__) {
+       #       /* mfloat-abi=softfp == VFP with soft ABI */
+       # } else {
+       #       /* mfloat-abi=soft == no VFP */
+       # }
+       #
+       # The exception is iOS (w/ GCC) where none of the above
+       # are defined (but iOS always uses the 'softfp' ABI).
+       #
+       # No support for FPA.
+       #
+
+       fpu=NONE
+
+       # iOS GCC always uses the 'softfp' ABI.
+       if test x"$GCC" = xyes && test x$platform_darwin = xyes; then
+               fpu=VFP
+       fi
+
+       # Are we using the 'hard' ABI?
+       if test x$fpu = xNONE; then
+               AC_TRY_COMPILE([], [
+                       #ifndef __ARM_PCS_VFP
+                       #error "Float ABI is not 'hard'"
+                       #endif
+                       return 0;
+               ], [
+                       fpu=VFP_HARD
+               ], [
+                       fpu=NONE
+               ])
+       fi
+
+       # No 'hard' ABI. 'soft' or 'softfp'?
+       if test x$fpu = xNONE; then
+               AC_TRY_COMPILE([], [
+                       #ifdef __SOFTFP__
+                       #error "Float ABI is not 'softfp'"
+                       #endif
+                       return 0;
+               ], [
+                       fpu=VFP
+               ], [
+                       fpu=NONE
+               ])
+       fi
+
+       AC_MSG_RESULT($fpu)
+       CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu=1"
+       unset fpu
+
+       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
+
+               arm_ver=ARMv5
+       ], [])
+
+       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
+
+               arm_ver=ARMv6
+       ], [])
+
+       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
+
+               arm_ver=ARMv7
+       ], [])
+
+       AC_MSG_RESULT($arm_ver)
+
+       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
+
+if test ${TARGET} = ARM; then
+       if test "x${with_jumptables}" = "xyes"; then
+                AC_DEFINE(USE_JUMP_TABLES, 1, Use jump tables in JIT)
+        fi
+fi
+
+if test ${TARGET} = unknown; then
+       CPPFLAGS="$CPPFLAGS -DNO_PORT"
+       AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
+fi
+
+if test ${ACCESS_UNALIGNED} = no; then
+       CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
+fi
+
+case "x$libgc" in
+       xincluded)
+               # Pass CPPFLAGS to libgc configure
+               # We should use a separate variable for this to avoid passing useless and
+               # potentially problematic defines to libgc (like -D_FILE_OFFSET_BITS=64)
+               # This should be executed late so we pick up the final version of CPPFLAGS
+               # The problem with this approach, is that during a reconfigure, the main
+               # configure scripts gets invoked with these arguments, so we use separate
+               # variables understood by libgc's configure to pass CPPFLAGS and CFLAGS.
+               TMP_CPPFLAGS="$CPPFLAGS $CPPFLAGS_FOR_LIBGC"
+               if test x$TARGET = xSPARC -o x$TARGET = xSPARC64; then
+                       TMP_CPPFLAGS=`echo $TMP_CPPFLAGS | sed -e 's/-D_FILE_OFFSET_BITS=64//g'`
+               fi
+               # Don't pass -finstrument-for-thread-suspension in, 
+               # if these are instrumented it will be very bad news 
+               # (infinite recursion, undefined parking behavior, etc)
+               TMP_CPPFLAGS=`echo $TMP_CPPFLAGS | sed -e 's/-finstrument-for-thread-suspension//g'`
+               ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS_FOR_LIBGC=$TMP_CPPFLAGS\" \"CFLAGS_FOR_LIBGC=$CFLAGS_FOR_LIBGC\""
+               if test "x$support_boehm" = "xyes"; then
+                       AC_CONFIG_SUBDIRS(libgc)
+               fi
+               ;;
+esac
+
+AC_ARG_WITH(profile2,  [  --with-profile2=yes,no          If you want to install the 2.0/3.5 FX (defaults to yes)],            [], [with_profile2=yes])
+AC_ARG_WITH(profile4,  [  --with-profile4=yes,no          If you want to install the 4.0 FX (defaults to yes)],                [], [with_profile4=yes])
+AC_ARG_WITH(profile4_5,[  --with-profile4_5=yes,no        If you want to install the 4.5 FX (defaults to yes)],                [], [with_profile4_5=yes])
+AC_ARG_WITH(monodroid, [  --with-monodroid=yes,no         If you want to build the MonoDroid assemblies (defaults to no)],     [], [with_monodroid=no])
+AC_ARG_WITH(monotouch, [  --with-monotouch=yes,no,only    If you want to build the MonoTouch assemblies (defaults to no)],     [], [with_monotouch=no])
+AC_ARG_WITH(xammac,    [  --with-xammac=yes,no,only       If you want to build the Xamarin.Mac assemblies (defaults to no)],   [], [with_xammac=no])
+
+OPROFILE=no
+AC_ARG_WITH(oprofile,[  --with-oprofile=no,<oprofile install dir>   Enable oprofile support (defaults to no)],[
+       if test x$with_oprofile != xno; then
+           oprofile_include=$with_oprofile/include
+           if test ! -f $oprofile_include/opagent.h; then
+                 AC_MSG_ERROR([oprofile include file not found at $oprofile_include/opagent.h])
+               fi
+           OPROFILE=yes
+               OPROFILE_CFLAGS="-I$oprofile_include"
+           OPROFILE_LIBS="-L$with_oprofile/lib/oprofile -lopagent"
+           AC_DEFINE(HAVE_OPROFILE,1,[Have oprofile support])
+       fi
+])
+
+MALLOC_MEMPOOLS=no
+AC_ARG_WITH(malloc_mempools,[  --with-malloc-mempools=yes,no  Use malloc for each single mempool allocation (only for runtime debugging, defaults to no)],[
+       if test x$with_malloc_mempools = xyes; then
+               MALLOC_MEMPOOLS=yes
+               AC_DEFINE(USE_MALLOC_FOR_MEMPOOLS,1,[Use malloc for each single mempool allocation])
+       fi
+])
+
+
+DISABLE_MCS_DOCS=no
+AC_ARG_WITH(mcs_docs,[  --with-mcs-docs=yes,no         If you want to build the documentation under mcs (defaults to yes)],[
+       if test x$with_mcs_docs != xyes; then
+               DISABLE_MCS_DOCS=yes
+       fi
+])
+if test x$with_profile4 != xyes; then
+       DISABLE_MCS_DOCS=yes
+fi
+
+AC_ARG_WITH(lazy_gc_thread_creation, [  --with-lazy-gc-thread-creation=yes|no      Enable lazy runtime thread creation, embedding host must do it explicitly (defaults to no)],[
+       if test x$with_lazy_gc_thread_creation != xno ; then
+               AC_DEFINE(LAZY_GC_THREAD_CREATION,1,[Enable lazy gc thread creation by the embedding host.])
+       fi
+], [with_lazy_gc_thread_creation=no])
+
+AC_CHECK_HEADER([malloc.h], 
+               [AC_DEFINE([HAVE_USR_INCLUDE_MALLOC_H], [1], 
+                       [Define to 1 if you have /usr/include/malloc.h.])],,)
+
+if test x"$GCC" = xyes; then
+       # Implicit function declarations are not 64 bit safe
+       # Do this late, since this causes lots of configure tests to fail
+       CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
+       # jay has a lot of implicit declarations
+       JAY_CFLAGS="-Wno-implicit-function-declaration"
+fi
+
+# When --disable-shared is used, libtool transforms libmono-2.0.la into libmono-2.0.so
+# instead of libmono-static.a
+if test "x$enable_shared" = "xno" -a "x$enable_executables" = "xyes"; then
+   LIBMONO_LA=libmini-static.la
+else
+   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)
+
+dnl
+dnl Consistency settings
+dnl
+if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
+   DISABLE_MCS_DOCS=yes
+   with_profile2=no
+   with_profile4=no
+   with_profile4_5=no
+   with_monodroid=no
+   with_monotouch=no
+   with_xammac=no
+fi
+
+if test x$DISABLE_MCS_DOCS = xyes; then
+   docs_dir=""
+else
+   docs_dir=docs
+fi
+AC_SUBST(docs_dir)
+
+## Maybe should also disable if mcsdir is invalid.  Let's punt the issue for now.
+AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_build != xno])
+
+AM_CONDITIONAL(HAVE_OPROFILE, test x$OPROFILE = xyes)
+AC_SUBST(OPROFILE_CFLAGS)
+AC_SUBST(OPROFILE_LIBS)
+
+libmono_ldflags="$libmono_ldflags $LIBS"
+
+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])
+AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
+AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
+AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
+AM_CONDITIONAL(ONLY_MONOTOUCH, [test "x$with_monotouch" = "xonly"])
+AM_CONDITIONAL(ONLY_XAMMAC, [test "x$with_xammac" = "xonly"])
+
+AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
+AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
+AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
+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(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(ARM64, test x$TARGET = xARM64)
+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)
+AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
+AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
+
+AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
+AM_CONDITIONAL(INTERP_SUPPORTED, test x$interp_wanted = xtrue)
+AM_CONDITIONAL(INCLUDED_LIBGC, test x$libgc = xincluded)
+
+AC_SUBST(LIBC)
+AC_SUBST(INTL)
+AC_SUBST(SQLITE)
+AC_SUBST(SQLITE3)
+AC_SUBST(X11)
+AC_SUBST(GDKX11)
+AC_SUBST(GTKX11)
+AC_SUBST(XINERAMA)
+AC_DEFINE_UNQUOTED(ARCHITECTURE,"$arch_target",[The architecture this is running on])
+AC_SUBST(arch_target)
+AC_SUBST(CFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(LDFLAGS)
+
+mono_build_root=`pwd`
+AC_SUBST(mono_build_root)
+
+if test x$USEJIT = xtrue; then
+  mono_runtime=mono/mini/mono
+else
+  mono_runtime=mono/interpreter/mint
+fi
+AC_SUBST(mono_runtime)
+
+mono_cfg_root=$mono_build_root/runtime
+if test x$host_win32 = xyes; then
+  if test "x$cross_compiling" = "xno"; then
+    mono_cfg_dir=`cygpath -w -a $mono_cfg_root`\\etc
+  else
+    mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\'`\\etc
+  fi
+else
+  mono_cfg_dir=$mono_cfg_root/etc
+fi
+AC_SUBST(mono_cfg_dir)
+
+AC_CONFIG_FILES([po/mcs/Makefile.in])
+
+AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
+AC_CONFIG_FILES([runtime/monodis-wrapper],[chmod +x runtime/monodis-wrapper])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
+[   depth=../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/1.0
+    cd runtime/etc/mono/1.0
+    rm -f machine.config
+    $LN_S $reldir/data/net_1_1/machine.config machine.config
+    cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
+[   depth=../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/2.0
+    cd runtime/etc/mono/2.0
+    rm -f machine.config
+    $LN_S $reldir/data/net_2_0/machine.config machine.config
+    cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config],
+[   depth=../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/2.0
+    cd runtime/etc/mono/2.0
+    rm -f web.config
+    $LN_S $reldir/data/net_2_0/web.config web.config
+    cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
+[   depth=../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/
+    cd runtime/etc/mono/
+    rm -f browscap.ini
+    $LN_S $reldir/data/browscap.ini browscap.ini
+    cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/2.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/2.0/Browsers/
+    cd runtime/etc/mono/2.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.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'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config],
+[   depth=../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/4.0
+    cd runtime/etc/mono/4.0
+    rm -f machine.config
+    $LN_S $reldir/data/net_4_0/machine.config machine.config
+    cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config],
+[   depth=../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/4.0
+    cd runtime/etc/mono/4.0
+    rm -f web.config
+    $LN_S $reldir/data/net_4_0/web.config web.config
+    cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/machine.config],
+[   depth=../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/4.5
+    cd runtime/etc/mono/4.5
+    rm -f machine.config
+    $LN_S $reldir/data/net_4_5/machine.config machine.config
+    cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/web.config],
+[   depth=../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/4.5
+    cd runtime/etc/mono/4.5
+    rm -f web.config
+    $LN_S $reldir/data/net_4_5/web.config web.config
+    cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/echo "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
+
+AC_OUTPUT([
+Makefile
+mono-core.spec
+mono-uninstalled.pc
+scripts/mono-find-provides
+scripts/mono-find-requires
+mono/Makefile
+mono/utils/Makefile
+mono/metadata/Makefile
+mono/dis/Makefile
+mono/cil/Makefile
+mono/arch/Makefile
+mono/arch/x86/Makefile
+mono/arch/amd64/Makefile
+mono/arch/ppc/Makefile
+mono/arch/sparc/Makefile
+mono/arch/s390x/Makefile
+mono/arch/arm/Makefile
+mono/arch/arm64/Makefile
+mono/arch/ia64/Makefile
+mono/arch/mips/Makefile
+mono/interpreter/Makefile
+mono/tests/Makefile
+mono/tests/tests-config
+mono/tests/assemblyresolve/Makefile
+mono/tests/cas/Makefile
+mono/tests/cas/assembly/Makefile
+mono/tests/cas/demand/Makefile
+mono/tests/cas/inheritance/Makefile
+mono/tests/cas/linkdemand/Makefile
+mono/tests/cas/threads/Makefile
+mono/tests/gc-descriptors/Makefile
+mono/unit-tests/Makefile
+mono/benchmark/Makefile
+mono/monograph/Makefile
+mono/io-layer/Makefile
+mono/mini/Makefile
+mono/profiler/Makefile
+m4/Makefile
+ikvm-native/Makefile
+scripts/Makefile
+man/Makefile
+docs/Makefile
+data/Makefile
+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
+data/mono.pc
+data/mono-cairo.pc
+data/mono-nunit.pc
+data/mono-options.pc
+data/mono-lineeditor.pc
+data/monodoc.pc
+data/dotnet.pc
+data/dotnet35.pc
+data/wcf.pc
+data/cecil.pc
+data/system.web.extensions_1.0.pc
+data/system.web.extensions.design_1.0.pc
+data/system.web.mvc.pc
+data/system.web.mvc2.pc
+data/system.web.mvc3.pc
+data/aspnetwebstack.pc
+data/reactive.pc
+samples/Makefile
+support/Makefile
+data/config
+tools/Makefile
+tools/locale-builder/Makefile
+tools/sgen/Makefile
+runtime/Makefile
+msvc/Makefile
+po/Makefile
+])
+
+# Update all submodules recursively to ensure everything is checked out
+$srcdir/scripts/update_submodules
+
+if test x$host_win32 = xyes; then
+   # Get rid of 'cyg' prefixes in library names
+   sed -e "s/\/cyg\//\/\//" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
+   # libtool seems to inherit -mno-cygwin from our CFLAGS, and uses it to compile its executable
+   # wrapper scripts which use exec(). gcc has no problem compiling+linking this, but the resulting
+   # executable doesn't work...
+   sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
+fi
+
+if test x$platform_darwin = xyes; then
+   # This doesn't seem to be required and it slows down parallel builds
+   sed -e 's,lock_old_archive_extraction=yes,lock_old_archive_extraction=no,g' < libtool > libtool.new && mv libtool.new libtool && chmod +x libtool
+fi
+
+(
+  case $prefix in
+  NONE) prefix=$ac_default_prefix ;;
+  esac
+  case $exec_prefix in
+  NONE) exec_prefix='${prefix}' ;;
+  esac
+
+  #
+  # If we are cross compiling, we don't build in the mcs/ tree.  Let us not clobber
+  # any existing config.make.  This allows people to share the same source tree
+  # with different build directories, one native and one cross
+  #
+  if test x$cross_compiling = xno && test x$enable_mcs_build != xno; then
+
+    test -w $mcs_topdir/build || chmod +w $mcs_topdir/build
+
+    echo "prefix=$prefix" > $mcs_topdir/build/config.make
+    echo "exec_prefix=$exec_prefix" >> $mcs_topdir/build/config.make
+    echo "sysconfdir=$sysconfdir" >> $mcs_topdir/build/config.make
+    echo 'mono_libdir=${exec_prefix}/lib' >> $mcs_topdir/build/config.make
+    echo 'IL_FLAGS = /debug' >> $mcs_topdir/build/config.make
+    echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $mcs_topdir/build/config.make
+    echo "ILDISASM = $mono_build_root/runtime/monodis-wrapper" >> $mcs_topdir/build/config.make
+    echo "JAY_CFLAGS = $JAY_CFLAGS" >> $mcs_topdir/build/config.make
+
+    case $INSTALL in
+    [[\\/$]]* | ?:[[\\/]]* ) mcs_INSTALL=$INSTALL ;;
+    *) mcs_INSTALL=$mono_build_root/$INSTALL ;;
+    esac
+
+    echo "INSTALL = $mcs_INSTALL" >> $mcs_topdir/build/config.make
+
+    export VERSION
+    [myver=$($AWK 'BEGIN {
+      split (ENVIRON["VERSION"] ".0.0.0", vsplit, ".")
+      if(length(vsplit [1]) > 4) {
+        split (substr(ENVIRON["VERSION"], 0, 4) "." substr(ENVIRON["VERSION"], 5) ".0.0", vsplit, ".")
+      }
+      print vsplit [1] "." vsplit [2] "." vsplit [3] "." vsplit [4]
+    }')]
+
+    echo "MONO_VERSION = $myver" >> $mcs_topdir/build/config.make
+
+    if test x$platform_darwin = xyes; then
+      echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
+    fi
+
+       if test x$AOT_SUPPORTED = xyes -a x$enable_system_aot = xdefault; then
+          enable_system_aot=yes
+       fi
+
+    if test x$host_win32 = xno -a x$enable_system_aot = xyes; then
+      echo "ENABLE_AOT = 1" >> $mcs_topdir/build/config.make
+    fi
+
+    if test x$DISABLE_MCS_DOCS = xyes; then
+      echo "DISABLE_MCS_DOCS = yes" >> $mcs_topdir/build/config.make
+    fi
+
+    if test x$has_extension_module != xno; then
+        echo "EXTENSION_MODULE = 1" >> $srcdir/$mcsdir/build/config.make
+    fi
+
+       default_profile=net_2_0
+    if test -z "$INSTALL_4_0_TRUE"; then :
+               default_profile=net_4_0
+    fi
+    if test -z "$INSTALL_MONODROID_TRUE"; then :
+               default_profile=monodroid
+    fi
+    if test -z "$INSTALL_MONOTOUCH_TRUE"; then :
+               default_profile=monotouch
+    fi
+       if test -z "$INSTALL_XAMMAC_TRUE"; then :
+               default_profile=xammac
+       fi
+    if test -z "$INSTALL_4_5_TRUE"; then :
+               default_profile=net_4_5
+    fi
+    
+    echo "DEFAULT_PROFILE = $default_profile" >> $srcdir/$mcsdir/build/config.make
+    
+    if test "x$test_bcl_opt" = "xyes"; then    
+      echo "BCL_OPTIMIZE = 1" >> $srcdir/$mcsdir/build/config.make
+    fi
+
+  fi
+
+  # if we have an olive folder, override the default settings
+  if test -d $olivedir; then
+
+    if test x$cross_compiling = xno && test x$enable_olive_build != xno; then
+
+      test -w $srcdir/$olivedir/build || chmod +w $srcdir/$olivedir/build
+
+      echo "prefix=$prefix" > $srcdir/$olivedir/build/config.make
+      echo "exec_prefix=$exec_prefix" >> $srcdir/$olivedir/build/config.make
+      echo 'mono_libdir=${exec_prefix}/lib' >> $srcdir/$olivedir/build/config.make
+      echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$olivedir/build/config.make
+      echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$olivedir/build/config.make
+      echo "MONO_VERSION = $myver" >> $srcdir/$olivedir/build/config.make
+    fi
+  fi
+
+)
+
+libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
+
+echo "
+        mcs source:    $mcsdir
+
+   Engine:
+       Host:          $host
+       Target:        $target
+       GC:            $gc_msg 
+       TLS:           $with_tls
+       SIGALTSTACK:   $with_sigaltstack
+       Engine:        $jit_status
+       oprofile:      $OPROFILE
+       BigArrays:     $enable_big_arrays
+       DTrace:        $enable_dtrace
+       LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
+
+   Libraries:
+       .NET 2.0/3.5:  $with_profile2
+       .NET 4.0:      $with_profile4
+       .NET 4.5:      $with_profile4_5
+       MonoDroid:     $with_monodroid
+       MonoTouch:     $with_monotouch
+       Xamarin.Mac:   $with_xammac
+       JNI support:   $jdk_headers_found
+       libgdiplus:    $libgdiplus_msg
+       zlib:          $zlib_msg
+       $disabled
+"
+if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
+   AC_MSG_WARN(Turning off static Mono is a risk, you might run into unexpected bugs)
+fi
diff --git a/configure.in b/configure.in
deleted file mode 100644 (file)
index 32c3efe..0000000
+++ /dev/null
@@ -1,3791 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-#AC_PREREQ([2.62])
-
-AC_INIT(mono, [3.4.1],
-        [http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
-
-AC_CONFIG_SRCDIR([README.md])
-AC_CONFIG_MACRO_DIR([m4])
-AC_CANONICAL_SYSTEM
-AC_CANONICAL_HOST
-
-# Gross hack to enable 'make dist' on automake 1.9+tar 1.14.
-# 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 subdir-objects])
-AC_CONFIG_HEADERS([config.h])
-AM_MAINTAINER_MODE
-
-API_VER=2.0
-AC_SUBST(API_VER)
-
-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
-*cygwin* ) LN_S='cp -p';;
-esac
-
-dnl
-dnl libgc checks
-dnl
-
-gc_headers=no
-gc=included
-gc_msg="included Boehm"
-use_included_gc=no
-libgc_configure_args=
-
-if test -d $srcdir/libgc ; then
-  gc_default=included
-else
-  gc_default=boehm
-fi
-
-# These variables are the CPPFLAGS/CFLAGS passed to libgc's configure
-# libgc should inherit the original CFLAGS/CPPFLAGS passed to configure, i.e. -O0
-CPPFLAGS_FOR_LIBGC=$CPPFLAGS
-CFLAGS_FOR_LIBGC=$CFLAGS
-CPPFLAGS_FOR_EGLIB=$CPPFLAGS
-CFLAGS_FOR_EGLIB=$CFLAGS
-
-#
-# These are the flags that need to be stored in the mono.pc file for 
-# compiling code that will embed Mono
-#
-libmono_cflags=""
-libmono_ldflags=""
-AC_SUBST(libmono_cflags)
-AC_SUBST(libmono_ldflags)
-
-# Variable to have relocatable .pc files (lib, or lib64)
-reloc_libdir=`basename ${libdir}`
-AC_SUBST(reloc_libdir)
-
-dnl if linker handles the version script
-no_version_script=no
-
-# Set to yes if Unix sockets cannot be created in an anonymous namespace
-need_link_unlink=no
-
-#Set to extra linker flags to be passed to the runtime binaries (mono /mono-sgen)
-extra_runtime_ldflags=""
-
-# Thread configuration inspired by sleepycat's db
-AC_MSG_CHECKING([host platform characteristics])
-libgc_threads=no
-has_dtrace=no
-parallel_mark=yes
-ikvm_native=yes
-
-case "$host" in
-       powerpc*-*-linux*)
-               # https://bugzilla.novell.com/show_bug.cgi?id=504411
-               disable_munmap=yes
-       ;;
-esac
-
-host_win32=no
-target_win32=no
-platform_android=no
-platform_darwin=no
-case "$host" in
-       *-mingw*|*-*-cygwin*)
-               AC_DEFINE(HOST_WIN32,1,[Host Platform is Win32])
-               AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
-               AC_DEFINE(PLATFORM_NO_SYMLINKS,1,[This platform does not support symlinks])
-               host_win32=yes
-               mono_cv_clang=no
-               if test "x$cross_compiling" = "xno"; then
-                       target_win32=yes
-                       if test "x$host" == "x$build" -a "x$host" == "x$target"; then
-                               AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
-                       fi
-               else
-                       target_win32=yes
-                       AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
-                       AC_DEFINE(MINGW_CROSS_COMPILE,1,[Cross-compiling using MinGW])
-               fi
-               HOST_CC="gcc"
-               # 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="-mms-bitfields -mwindows"
-               libmono_ldflags="-mms-bitfields -mwindows"
-               libdl=
-               libgc_threads=win32
-               gc_default=included
-               with_sigaltstack=no
-               LN_S=cp
-               # This forces libgc to use the DllMain based thread registration code on win32
-               libgc_configure_args="$libgc_configure_args --enable-win32-dllmain=yes"
-               ;;
-       *-*-*netbsd*)
-               host_win32=no
-               CPPFLAGS="$CPPFLAGS -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE"
-               libmono_cflags="-D_REENTRANT"
-               LDFLAGS="$LDFLAGS -pthread"
-               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
-               libmono_ldflags="-pthread"
-               need_link_unlink=yes
-               libdl="-ldl"
-               libgc_threads=pthreads
-               with_sigaltstack=no
-               use_sigposix=yes
-               ;;
-       *-*-*freebsd*)
-               host_win32=no
-               if test "x$PTHREAD_CFLAGS" = "x"; then
-                       CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
-                       libmono_cflags=
-               else
-                       CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
-                       libmono_cflags="$PTHREAD_CFLAGS"
-               fi
-               if test "x$PTHREAD_LIBS" = "x"; then
-                       LDFLAGS="$LDFLAGS -pthread -L/usr/local/lib"
-                       libmono_ldflags="-pthread"
-               else
-                       LDFLAGS="$LDFLAGS $PTHREAD_LIBS -L/usr/local/lib"
-                       libmono_ldflags="$PTHREAD_LIBS"
-               fi
-               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
-               need_link_unlink=yes
-               AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread is a pointer])
-               libdl=
-               libgc_threads=pthreads
-               use_sigposix=yes
-               has_dtrace=yes
-               ;;
-       *-*-*openbsd*)
-               host_win32=no
-               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DPLATFORM_BSD -D_REENTRANT -DUSE_MMAP"
-               if test "x$disable_munmap" != "xyes"; then
-               CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
-               fi
-               libmono_cflags="-D_THREAD_SAFE -D_REENTRANT"
-               LDFLAGS="$LDFLAGS -pthread"
-               need_link_unlink=yes
-               AC_DEFINE(PTHREAD_POINTER_ID)
-               libdl=
-               gc_default=boehm
-               libgc_threads=pthreads
-               with_sigaltstack=no
-               use_sigposix=yes
-               ;;
-       *-*-linux-android*)
-               host_win32=no
-               platform_android=yes
-               AC_DEFINE(PLATFORM_ANDROID,1,[Targeting the Android platform])
-               AC_DEFINE(TARGET_ANDROID,1,[Targeting the Android platform])
-
-               CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
-               if test "x$disable_munmap" != "xyes"; then
-                       CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
-               fi
-               libmono_cflags="-D_REENTRANT"
-               libdl="-ldl"
-               libgc_threads=pthreads
-               use_sigposix=yes
-
-               with_tls=pthread
-               with_sigaltstack=no
-               with_static_mono=no
-
-               # Android doesn't support boehm, as it's missing <link.h>
-               support_boehm=no
-               with_gc=sgen
-
-               # isinf(3) requires -lm; see isinf check below
-               LDFLAGS="$LDFLAGS -lm"
-
-               # Bionic's <pthread.h> sets PTHREAD_STACK_MIN=2*PAGE_SIZE; doesn't define
-               # PAGE_SIZE; breaks mono/io-layer/collection.c
-               # Bionic doesn't provide S_IWRITE; breaks io-layer/io.c
-               CFLAGS="$CFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
-               CXXFLAGS="$CXXFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
-
-               # The configure check can't detect this
-               AC_DEFINE(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support])
-
-               # to bypass the underscore linker check, can't work when cross-compiling
-               mono_cv_uscore=yes
-               mono_cv_clang=no
-               ;;
-       *-*-linux*)
-               host_win32=no
-               CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
-               if test "x$disable_munmap" != "xyes"; then
-                       CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
-               fi
-               libmono_cflags="-D_REENTRANT"
-               libdl="-ldl"
-               libgc_threads=pthreads
-               use_sigposix=yes
-               if test "x$cross_compiling" != "xno"; then
-                       # to bypass the underscore linker check, not
-                       # available during cross-compilation
-                       mono_cv_uscore=no
-                fi
-               case "$host" in
-               aarch64-*)
-                       support_boehm=no
-                       with_gc=sgen
-                       ;;
-               esac
-               ;;
-       *-*-nacl*)
-               host_win32=no
-               CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
-               if test "x$disable_munmap" != "xyes"; then
-                       CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
-               fi
-               libmono_cflags="-D_REENTRANT"
-               libdl=
-               libgc_threads=pthreads
-               gc_default=boehm
-               use_sigposix=yes
-               ikvm_native=no
-               AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
-               AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
-               ;;
-       *-*-hpux*)
-               host_win32=no
-               CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
-               # +ESdbgasm only valid on bundled cc on RISC
-               # silently ignored for ia64
-               if test $GCC != "yes"; then
-                       CFLAGS="$CFLAGS +ESdbgasm"
-                       # Arrange for run-time dereferencing of null
-                       # pointers to produce a SIGSEGV signal.
-                       LDFLAGS="$LDFLAGS -z"
-               fi
-               CFLAGS="$CFLAGS +ESdbgasm"
-               LDFLAGS="$LDFLAGS -z"
-               libmono_cflags="-D_REENTRANT"
-               libmono_ldflags="-lpthread"
-               libgc_threads=pthreads
-               need_link_unlink=yes
-               use_sigposix=yes
-               ;;
-       *-*-solaris*)
-               host_win32=no
-               CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DPLATFORM_SOLARIS"
-               need_link_unlink=yes
-               libmono_cflags="-D_REENTRANT"
-               libgc_threads=pthreads
-               # This doesn't seem to work on solaris/x86, but the configure test runs
-               with_tls=pthread
-               has_dtrace=yes
-               use_sigposix=yes
-               enable_solaris_tar_check=yes
-               ;;
-       *-*-darwin*)
-               parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
-               host_win32=no
-               platform_darwin=yes
-               target_mach=yes
-               CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
-               CPPFLAGS="$CPPFLAGS -DGetCurrentProcess=MonoGetCurrentProcess -DGetCurrentThread=MonoGetCurrentThread -DCreateEvent=MonoCreateEvent"
-               libmono_cflags="-D_THREAD_SAFE"
-               need_link_unlink=yes
-               AC_DEFINE(PTHREAD_POINTER_ID)
-               AC_DEFINE(USE_MACH_SEMA, 1, [...])
-               no_version_script=yes
-               libdl=
-               libgc_threads=pthreads
-               has_dtrace=yes
-               if test "x$cross_compiling" = "xyes"; then
-                       has_broken_apple_cpp=yes
-               fi
-               dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin*, but
-               dnl its gcc defaults to 64-bit mode.  They have also deprecated the usage of ucontext
-               dnl we need to set some flags to build our 32-bit binaries on 10.6 properly
-               case "$host" in
-                       dnl Snow Leopard and newer config.guess reports as this
-                       i*86-*-darwin*)
-                               BROKEN_DARWIN_FLAGS="-arch i386 -D_XOPEN_SOURCE"
-                               BROKEN_DARWIN_CPPFLAGS="-D_XOPEN_SOURCE"
-                               CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_CPPFLAGS"
-                               CFLAGS="$CFLAGS $BROKEN_DARWIN_FLAGS"
-                               CXXFLAGS="$CXXFLAGS $BROKEN_DARWIN_FLAGS"
-                               CCASFLAGS="$CCASFLAGS $BROKEN_DARWIN_FLAGS"
-                               CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC $BROKEN_DARWIN_CPPFLAGS"
-                               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"
-                               ;;
-                       x*64-*-darwin*)
-                               ;;
-                       arm*-darwin*)
-                               has_dtrace=no
-                               ;;                      
-               esac
-               ;;
-       *-*-haiku*)
-               host_win32=no
-               CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_THREAD_SAFE"
-               libmono_cflags="-D_REENTRANT -D_THREAD_SAFE"
-               libdl=
-               LIBS="$LIBS -lnetwork"
-               need_link_unlink=yes
-               AC_DEFINE(PTHREAD_POINTER_ID)
-               libgc_threads=pthreads
-               use_sigposix=yes
-               ;;
-       *)
-               AC_MSG_WARN([*** Please add $host to configure.in checks!])
-               host_win32=no
-               libdl="-ldl"
-               ;;
-esac
-AC_MSG_RESULT(ok)
-
-if test x$need_link_unlink = xyes; then
-   AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
-fi
-
-AC_SUBST(extra_runtime_ldflags)
-AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes)
-AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
-AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux)
-AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
-AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
-AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
-
-AC_CHECK_TOOL(CC, gcc, gcc)
-AC_PROG_CC
-AC_CHECK_TOOL(CXX, g++, g++)
-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.
-: ${CCASFLAGS='$(CFLAGS)'}
-AC_SUBST(CCAS)
-AC_SUBST(CCASFLAGS)
-
-# AC_PROG_CXX helpfully sets CXX to g++ even if no c++ compiler is found so check
-# GXX instead. See http://lists.gnu.org/archive/html/bug-autoconf/2002-04/msg00056.html
-if test "x$CXX" = "xg++"; then
-       if test "x$GXX" != "xyes"; then
-               # automake/libtool is so broken, it requires g++ even if the c++ sources
-               # are inside automake conditionals
-               AC_MSG_ERROR([You need to install g++])
-       fi
-fi
-
-dnl may require a specific autoconf version
-dnl AC_PROG_CC_FOR_BUILD
-dnl CC_FOR_BUILD not automatically detected
-CC_FOR_BUILD=$CC
-CFLAGS_FOR_BUILD=$CFLAGS
-BUILD_EXEEXT=
-if test "x$cross_compiling" = "xyes"; then
-       CC_FOR_BUILD=cc
-       CFLAGS_FOR_BUILD=
-       BUILD_EXEEXT=""
-fi
-AC_SUBST(CC_FOR_BUILD)
-AC_SUBST(CFLAGS_FOR_BUILD)
-AC_SUBST(HOST_CC)
-AC_SUBST(BUILD_EXEEXT)
-
-AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
-AM_CONDITIONAL(USE_BATCH_FILES, [test x$host_win32 = xyes -a x$cross_compiling = xyes])
-
-# Set STDC_HEADERS
-AC_HEADER_STDC
-AC_LIBTOOL_WIN32_DLL
-# This causes monodis to not link correctly
-#AC_DISABLE_FAST_INSTALL
-AM_PROG_LIBTOOL
-# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
-DOLT
-
-export_ldflags=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-AC_SUBST(export_ldflags)
-
-# Test whenever ld supports -version-script
-AC_PROG_LD
-AC_PROG_LD_GNU
-if test "x$lt_cv_prog_gnu_ld" = "xno"; then
-   no_version_script=yes
-fi
-
-AM_ICONV()
-
-AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
-
-AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h libproc.h)
-AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h)
-AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h],
-                  [], [], [#include <stddef.h>
-                 #include <sys/socket.h>
-                 #include <linux/socket.h>])
-
-AC_CHECK_HEADERS(sys/user.h, [], [],
-[
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-])
-
-AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
-if test x$have_zlib = xyes; then
-   AC_TRY_COMPILE([#include <zlib.h>], [
-   #if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230)
-   return 0;
-   #else
-   #error No good zlib found
-   #endif
-   ],[
-       AC_MSG_RESULT(Using system zlib)
-       zlib_msg="system zlib"
-       AC_DEFINE(HAVE_SYS_ZLIB,1,[Have system zlib])
-   ],[
-       AC_MSG_RESULT(Using embedded zlib)
-       have_zlib=no
-       zlib_msg="bundled zlib"
-   ])
-fi
-
-AM_CONDITIONAL(HAVE_ZLIB, test x$have_zlib = xyes)
-AC_DEFINE(HAVE_ZLIB,1,[Have system zlib])
-
-# for mono/metadata/debug-symfile.c
-AC_CHECK_HEADERS(elf.h)
-
-# for support
-AC_CHECK_HEADERS(poll.h)
-AC_CHECK_HEADERS(sys/poll.h)
-AC_CHECK_HEADERS(sys/wait.h)
-AC_CHECK_HEADERS(grp.h)
-AC_CHECK_HEADERS(syslog.h)
-
-# for mono/dis
-AC_CHECK_HEADERS(wchar.h)
-AC_CHECK_HEADERS(ieeefp.h)
-AC_MSG_CHECKING(for isinf)
-AC_TRY_LINK([#include <math.h>], [
-       int f = isinf (1);
-], [
-       AC_MSG_RESULT(yes)
-       AC_DEFINE(HAVE_ISINF, 1, [isinf available])
-], [
-       # 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)
-
-# not 64 bit clean in cross-compile
-AC_CHECK_SIZEOF(void *, 4)
-
-AC_CACHE_CHECK([for clang],
-       mono_cv_clang,[
-       AC_TRY_COMPILE([], [
-               #ifdef __clang__
-               #else
-               #error "FAILED"
-               #endif
-               return 0;
-       ],
-       [mono_cv_clang=yes],
-       [mono_cv_clang=no],
-       [])
-])
-
-WARN=''
-if test x"$GCC" = xyes; then
-        WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value'
-               # The runtime code does not respect ANSI C strict aliasing rules
-               CFLAGS="$CFLAGS -fno-strict-aliasing"
-
-               # We rely on signed overflow to behave
-               CFLAGS="$CFLAGS -fwrapv"
-
-               ORIG_CFLAGS=$CFLAGS
-               CFLAGS="$CFLAGS -Wdeclaration-after-statement"
-               AC_MSG_CHECKING(for -Wdeclaration-after-statement option to gcc)
-               AC_TRY_COMPILE([],[
-                               return 0;
-               ], [
-                  AC_MSG_RESULT(yes)
-               ], [
-                  AC_MSG_RESULT(no)
-                  CFLAGS=$ORIG_CFLAGS
-               ])
-
-               ORIG_CFLAGS=$CFLAGS
-               # Check for the normal version, since gcc ignores unknown -Wno options
-               CFLAGS="$CFLAGS -Wunused-but-set-variable -Werror"
-               AC_MSG_CHECKING(for -Wno-unused-but-set-variable option to gcc)
-               AC_TRY_COMPILE([],[
-                               return 0;
-               ], [
-                  AC_MSG_RESULT(yes)
-                  CFLAGS="$ORIG_CFLAGS -Wno-unused-but-set-variable"
-               ], [
-                  AC_MSG_RESULT(no)
-                  CFLAGS=$ORIG_CFLAGS
-               ])
-
-               if test "x$mono_cv_clang" = "xyes"; then
-                  # https://bugzilla.samba.org/show_bug.cgi?id=8118
-                  WARN="$WARN -Qunused-arguments"
-                  WARN="$WARN -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign"
-               fi
-else
-       # The Sun Forte compiler complains about inline functions that access static variables
-       # so disable all inlining.
-       case "$host" in
-       *-*-solaris*)
-               CFLAGS="$CFLAGS -Dinline="
-               ;;
-       esac
-fi
-CFLAGS="$CFLAGS -g $WARN"
-CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -g"
-
-# Where's the 'mcs' source tree?
-if test -d $srcdir/mcs; then
-  mcsdir=mcs
-else
-  mcsdir=../mcs
-fi
-
-AC_ARG_WITH(mcs-path, [  --with-mcs-path=/path/to/mcs      Specify an alternate mcs source tree],
-       if test x$with_mcs_path != "x" -a -d $with_mcs_path ; then
-               mcsdir=$with_mcs_path
-       fi
-)
-
-AC_ARG_WITH(jumptables, [  --with-jumptables=yes,no      enable/disable support for jumptables (ARM-only for now) (defaults to no)],[],[with_jumptables=no])
-
-#
-# A sanity check to catch cases where the package was unpacked
-# with an ancient tar program (Solaris)
-#
-AC_ARG_ENABLE(solaris-tar-check,
-[  --disable-solaris-tar-check    disable solaris tar check],
-   do_solaris_tar_check=no, do_solaris_tar_check=yes)
-
-if test x"$do_solaris_tar_check" = xyes -a x"$enable_solaris_tar_check" = xyes; then
-       AC_MSG_CHECKING(integrity of package)
-       if test -f $mcsdir/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
-       then
-               AC_MSG_RESULT(ok)
-       else
-               errorm="Your mono distribution is incomplete;  if unpacking from a tar file, make sure you use GNU tar;  see http://www.mono-project.com/IncompletePackage for more details"
-               AC_MSG_ERROR([$errorm])
-       fi
-fi
-
-if test "x$with_mcs_path" != "x"; then
-mcs_topdir=$(cd "$mcsdir" && pwd)
-mcs_topdir_from_srcdir=$mcs_topdir
-else
-mcs_topdir=$(cd "$srcdir/$mcsdir" && pwd)
-mcs_topdir_from_srcdir='$(top_builddir)'/$mcsdir
-fi
-
-# Convert mcs_topdir* paths to Windows syntax.
-if test x$cross_compiling$host_win32 = xnoyes; then
-  mcs_topdir=$(cygpath -m $mcs_topdir)
-  case $mcs_topdir_from_srcdir in
-    /cygdrive/*)
-       mcs_topdir_from_srcdir=$(cygpath -m $mcs_topdir_from_srcdir)
-       ;;
-  esac
-fi
-
-AC_SUBST([mcs_topdir])
-AC_SUBST([mcs_topdir_from_srcdir])
-
-# Where's the 'olive' source tree?
-if test -d $srcdir/olive; then
-  olivedir=olive
-else
-  olivedir=../olive
-fi
-
-if test -d $srcdir/$olivedir; then
-olive_topdir='$(top_srcdir)/'$olivedir
-fi
-
-# gettext: prepare the translation directories. 
-# we do not configure the full gettext, as we consume it dynamically from C#
-AM_PO_SUBDIRS
-
-if test "x$USE_NLS" = "xyes"; then
-   AC_CHECK_PROG(HAVE_MSGFMT, msgfmt,yes,no)
-
-   if test "x$HAVE_MSGFMT" = "xno"; then
-         AC_MSG_ERROR([msgfmt not found. You need to install the 'gettext' package, or pass --enable-nls=no to configure.])
-   fi
-fi
-
-AC_ARG_WITH([libgdiplus], 
-       [  --with-libgdiplus=installed|sibling|<path>   Override the libgdiplus used for System.Drawing tests (defaults to installed)], 
-       [], [with_libgdiplus=installed])
-
-case $with_libgdiplus in
-no|installed) libgdiplus_loc= ;;
-yes|sibling) libgdiplus_loc=`cd ../libgdiplus && pwd`/src/libgdiplus.la ;;
-/*) libgdiplus_loc=$with_libgdiplus ;;
-*) libgdiplus_loc=`pwd`/$with_libgdiplus ;;
-esac
-AC_SUBST([libgdiplus_loc])
-
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-
-pkg_config_path=
-AC_ARG_WITH(crosspkgdir, [  --with-crosspkgdir=/path/to/pkg-config/dir      Change pkg-config dir to custom dir],
-       if test x$with_crosspkgdir = "x"; then
-               if test -s $PKG_CONFIG_PATH; then
-                       pkg_config_path=$PKG_CONFIG_PATH
-               fi
-       else
-               pkg_config_path=$with_crosspkgdir
-               PKG_CONFIG_PATH=$pkg_config_path
-               export PKG_CONFIG_PATH
-       fi
-)
-
-ac_configure_args="$ac_configure_args \"CPPFLAGS_FOR_EGLIB=$EGLIB_CPPFLAGS\" \"CFLAGS_FOR_EGLIB=$CFLAGS_FOR_EGLIB\""
-AC_CONFIG_SUBDIRS(eglib)
-
-GLIB_CFLAGS='-I$(top_srcdir)/eglib/src -I$(top_builddir)/eglib/src'
-GLIB_LIBS='-L$(top_builddir)/eglib/src -leglib -lm'
-BUILD_GLIB_CFLAGS="$GLIB_CFLAGS"
-BUILD_GLIB_LIBS="$GLIB_LIBS"
-GMODULE_CFLAGS="$GLIB_CFLAGS"
-GMODULE_LIBS="$GLIB_LIBS"
-  
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-AC_SUBST(GMODULE_CFLAGS)
-AC_SUBST(GMODULE_LIBS)
-AC_SUBST(BUILD_GLIB_CFLAGS)
-AC_SUBST(BUILD_GLIB_LIBS)
-
-AC_ARG_WITH(gc,   [  --with-gc=boehm,included,none  Controls the Boehm GC config, default=included],[gc=$with_gc],[gc=$gc_default])
-
-# Enable support for fast thread-local storage
-# Some systems have broken support, so we allow to disable it.
-AC_ARG_WITH(tls, [  --with-tls=__thread,pthread    select Thread Local Storage implementation (defaults to __thread)],[],[with_tls=__thread])
-
-# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
-# This does not work on some platforms (bug #55253)
-AC_ARG_WITH(sigaltstack, [  --with-sigaltstack=yes,no      enable/disable support for sigaltstack (defaults to yes)],[],[with_sigaltstack=yes])
-
-AC_ARG_WITH(static_mono, [  --with-static_mono=yes,no      link mono statically to libmono (faster) (defaults to yes)],[],[with_static_mono=yes])
-AC_ARG_WITH(shared_mono, [  --with-shared_mono=yes,no      build a shared libmono library (defaults to yes)],[],[with_shared_mono=yes])
-# Same as --with-shared_mono=no
-AC_ARG_ENABLE(libraries, [  --disable-libraries disable the build of libmono], enable_libraries=$enableval, enable_libraries=yes)
-
-if test "x$enable_static" = "xno"; then
-   with_static_mono=no
-fi
-
-if test "x$enable_shared" = "xno"; then
-   with_shared_mono=no
-fi
-
-if test "x$enable_libraries" = "xno"; then
-   with_shared_mono=no
-fi
-
-AM_CONDITIONAL(DISABLE_LIBRARIES, test x$enable_libraries = xno)
-
-case $host in
-*nacl* ) with_shared_mono=yes;;
-esac
-
-if test "x$host_win32" = "xyes"; then
-   # Boehm GC requires the runtime to be in its own dll
-   with_static_mono=no
-fi
-
-AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
-AM_CONDITIONAL(SHARED_MONO, test x$with_shared_mono != xno)
-AC_ARG_ENABLE(mcs-build, [  --disable-mcs-build disable the build of the mcs directory], try_mcs_build=$enableval, enable_mcs_build=yes)
-
-AC_ARG_WITH(xen_opt,   [  --with-xen_opt=yes,no          Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes])
-if test "x$with_xen_opt" = "xyes" -a "x$mono_cv_clang" = "xno"; then
-       AC_DEFINE(MONO_XEN_OPT, 1, [Xen-specific behaviour])
-       ORIG_CFLAGS=$CFLAGS
-       CFLAGS="$CFLAGS -mno-tls-direct-seg-refs"
-       AC_MSG_CHECKING(for -mno-tls-direct-seg-refs option to gcc)
-       AC_TRY_COMPILE([], [
-               return 0;
-       ], [
-          AC_MSG_RESULT(yes)
-          # Pass it to libgc as well
-          CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -mno-tls-direct-seg-refs"
-       ], [
-          AC_MSG_RESULT(no)
-          CFLAGS=$ORIG_CFLAGS
-       ])
-fi
-
-AC_ARG_ENABLE(small-config, [  --enable-small-config Enable tweaks to reduce requirements (and capabilities)], enable_small_config=$enableval, enable_small_config=no)
-
-if test x$enable_small_config = xyes; then
-       AC_DEFINE(MONO_SMALL_CONFIG,1,[Reduce runtime requirements (and capabilities)])
-       CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DSMALL_CONFIG"
-fi
-
-AC_ARG_ENABLE(system-aot, [  --enable-system-aot  Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=default)
-
-DISABLED_FEATURES=none
-
-AC_ARG_ENABLE(minimal, [  --enable-minimal=LIST      drop support for LIST subsystems.
-     LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, 
-     reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters, remoting,
-        security, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
-[
-       for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
-               eval "mono_feature_disable_$feature='yes'"
-       done
-       DISABLED_FEATURES=$enable_minimal
-       disabled="Disabled:      $enable_minimal"
-],[])
-
-AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
-
-if test "x$mono_feature_disable_aot" = "xyes"; then
-       AC_DEFINE(DISABLE_AOT_COMPILER, 1, [Disable AOT Compiler])
-       AC_MSG_NOTICE([Disabled AOT compiler])
-fi
-
-if test "x$mono_feature_disable_profiler" = "xyes"; then
-       AC_DEFINE(DISABLE_PROFILER, 1, [Disable default profiler support])
-       AC_MSG_NOTICE([Disabled support for the profiler])
-fi
-AM_CONDITIONAL(DISABLE_PROFILER, test x$mono_feature_disable_profiler = xyes)
-
-if test "x$mono_feature_disable_decimal" = "xyes"; then
-       AC_DEFINE(DISABLE_DECIMAL, 1, [Disable System.Decimal support])
-       AC_MSG_NOTICE([Disabled support for decimal])
-fi
-
-if test "x$mono_feature_disable_pinvoke" = "xyes"; then
-       AC_DEFINE(DISABLE_PINVOKE, 1, [Disable P/Invoke support])
-       AC_MSG_NOTICE([Disabled support for P/Invoke])
-fi
-
-if test "x$mono_feature_disable_debug" = "xyes"; then
-       AC_DEFINE(DISABLE_DEBUG, 1, [Disable runtime debugging support])
-       AC_MSG_NOTICE([Disabled support for runtime debugging])
-fi
-
-if test "x$mono_feature_disable_reflection_emit" = "xyes"; then
-       AC_DEFINE(DISABLE_REFLECTION_EMIT, 1, [Disable reflection emit support])
-       mono_feature_disable_reflection_emit_save=yes
-       AC_MSG_NOTICE([Disabled support for Reflection.Emit])
-fi
-
-if test "x$mono_feature_disable_reflection_emit_save" = "xyes"; then
-       AC_DEFINE(DISABLE_REFLECTION_EMIT_SAVE, 1, [Disable assembly saving support in reflection emit])
-       AC_MSG_NOTICE([Disabled support for Reflection.Emit.Save])
-fi
-
-if test "x$mono_feature_disable_large_code" = "xyes"; then
-       AC_DEFINE(DISABLE_LARGE_CODE, 1, [Disable support for huge assemblies])
-       AC_MSG_NOTICE([Disabled support for large assemblies])
-fi
-
-if test "x$mono_feature_disable_logging" = "xyes"; then
-       AC_DEFINE(DISABLE_LOGGING, 1, [Disable support debug logging])
-       AC_MSG_NOTICE([Disabled support for logging])
-fi
-
-if test "x$mono_feature_disable_com" = "xyes"; then
-       AC_DEFINE(DISABLE_COM, 1, [Disable COM support])
-       AC_MSG_NOTICE([Disabled COM support])
-fi
-
-if test "x$mono_feature_disable_ssa" = "xyes"; then
-       AC_DEFINE(DISABLE_SSA, 1, [Disable advanced SSA JIT optimizations])
-       AC_MSG_NOTICE([Disabled SSA JIT optimizations])
-fi
-
-if test "x$mono_feature_disable_generics" = "xyes"; then
-       AC_DEFINE(DISABLE_GENERICS, 1, [Disable generics support])
-       AC_MSG_NOTICE([Disabled Generics Support])
-fi
-
-if test "x$mono_feature_disable_shadowcopy" = "xyes"; then
-       AC_DEFINE(DISABLE_SHADOW_COPY, 1, [Disable Shadow Copy for AppDomains])
-       AC_MSG_NOTICE([Disabled Shadow copy for AppDomains])
-fi
-
-if test "x$mono_feature_disable_portability" = "xyes"; then
-       AC_DEFINE(DISABLE_PORTABILITY, 1, [Disables the IO portability layer])
-       AC_MSG_NOTICE([Disabled IO Portability layer])
-fi
-
-if test "x$mono_feature_disable_attach" = "xyes"; then
-       AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
-       AC_MSG_NOTICE([Disabled agent attach])
-fi
-
-if test "x$mono_feature_disable_full_messages" = "xyes"; then
-       AC_DEFINE(DISABLE_FULL_MESSAGES, 1, [Disables building in the full table of WAPI messages])
-       AC_MSG_NOTICE([Disabled full messages for Win32 errors, only core message strings shipped])
-fi
-
-if test "x$mono_feature_disable_verifier" = "xyes"; then
-       AC_DEFINE(DISABLE_VERIFIER, 1, [Disables the verifier])
-       AC_MSG_NOTICE([Disabled the metadata and IL verifiers])
-fi
-
-if test "x$mono_feature_disable_jit" = "xyes"; then
-       AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode will be supported by the runtime.])
-       AC_MSG_NOTICE([Disabled the JIT engine, only full AOT will be supported])
-fi
-
-AM_CONDITIONAL(DISABLE_JIT, test x$mono_feature_disable_jit = xyes)
-
-if test "x$mono_feature_disable_simd" = "xyes"; then
-       AC_DEFINE(DISABLE_SIMD, 1, [Disable SIMD intrinsics related optimizations.])
-       AC_MSG_NOTICE([Disabled SIMD support])
-fi
-
-if test "x$mono_feature_disable_soft_debug" = "xyes"; then
-       AC_DEFINE(DISABLE_SOFT_DEBUG, 1, [Disable Soft Debugger Agent.])
-       AC_MSG_NOTICE([Disabled Soft Debugger.])
-fi
-
-if test "x$mono_feature_disable_perfcounters" = "xyes"; then
-       AC_DEFINE(DISABLE_PERFCOUNTERS, 1, [Disable Performance Counters.])
-       AC_MSG_NOTICE([Disabled Performance Counters.])
-fi
-if test "x$mono_feature_disable_normalization" = "xyes"; then
-       AC_DEFINE(DISABLE_NORMALIZATION, 1, [Disable String normalization support.])
-       AC_MSG_NOTICE([Disabled String normalization support.])
-fi
-
-if test "x$mono_feature_disable_assembly_remapping" = "xyes"; then
-       AC_DEFINE(DISABLE_ASSEMBLY_REMAPPING, 1, [Disable assembly remapping.])
-       AC_MSG_NOTICE([Disabled Assembly remapping.])
-fi
-
-if test "x$mono_feature_disable_shared_perfcounters" = "xyes"; then
-       AC_DEFINE(DISABLE_SHARED_PERFCOUNTERS, 1, [Disable shared perfcounters.])
-       AC_MSG_NOTICE([Disabled Shared perfcounters.])
-fi
-
-if test "x$mono_feature_disable_appdomains" = "xyes"; then
-       AC_DEFINE(DISABLE_APPDOMAINS, 1, [Disable support for multiple appdomains.])
-       AC_MSG_NOTICE([Disabled support for multiple appdomains.])
-fi
-
-if test "x$mono_feature_disable_remoting" = "xyes"; then
-       AC_DEFINE(DISABLE_REMOTING, 1, [Disable remoting support (This disables type proxies and make com non-functional)])
-       AC_MSG_NOTICE([Disabled remoting])
-fi
-
-if test "x$mono_feature_disable_security" = "xyes"; then
-       AC_DEFINE(DISABLE_SECURITY, 1, [Disable CAS/CoreCLR security])
-       AC_MSG_NOTICE([Disabled CAS/CoreCLR security manager (used e.g. for Moonlight)])
-fi
-
-if test "x$mono_feature_disable_sgen_remset" = "xyes"; then
-       AC_DEFINE(DISABLE_SGEN_REMSET, 1, [Disable wbarrier=remset support in SGEN.])
-       AC_MSG_NOTICE([Disabled wbarrier=remset support in SGEN.])
-fi
-
-if test "x$mono_feature_disable_sgen_marksweep_par" = "xyes"; then
-       AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_PAR, 1, [Disable major=marksweep-par support in SGEN.])
-       AC_MSG_NOTICE([Disabled major=marksweep-par support in SGEN.])
-fi
-
-if test "x$mono_feature_disable_sgen_marksweep_fixed" = "xyes"; then
-       AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_FIXED, 1, [Disable major=marksweep-fixed support in SGEN.])
-       AC_MSG_NOTICE([Disabled major=marksweep-fixed support in SGEN.])
-fi
-
-if test "x$mono_feature_disable_sgen_marksweep_fixed_par" = "xyes"; then
-       AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_FIXED_PAR, 1, [Disable major=marksweep-fixed-par support in SGEN.])
-       AC_MSG_NOTICE([Disabled major=marksweep-fixed-par support in SGEN.])
-fi
-
-if test "x$mono_feature_disable_sgen_copying" = "xyes"; then
-       AC_DEFINE(DISABLE_SGEN_MAJOR_COPYING, 1, [Disable major=copying support in SGEN.])
-       AC_MSG_NOTICE([Disabled major=copying support in SGEN.])
-fi
-
-AC_ARG_ENABLE(executables, [  --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
-AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)
-
-has_extension_module=no
-AC_ARG_ENABLE(extension-module, [  --enable-extension-module=LIST enable the core-extensions from LIST],
-[
-       for extension in `echo "$enable_extension_module" | sed -e "s/,/ /g"`; do
-               if test x$extension = xdefault ; then
-                       has_extension_module=yes;
-               fi
-       done
-       if test x$enable_extension_module = xyes; then
-               has_extension_module=yes;
-       fi
-], [])
-
-AM_CONDITIONAL([HAS_EXTENSION_MODULE], [test x$has_extension_module != xno])
-
-if test x$has_extension_module != xno ; then
-       AC_DEFINE([ENABLE_EXTENSION_MODULE], 1, [Extension module enabled])
-       AC_MSG_NOTICE([Enabling mono extension module.])
-fi
-
-AC_ARG_ENABLE(gsharing, [  --enable-gsharing Enable gsharing], enable_gsharing=$enableval, enable_gsharing=no)
-if test x$enable_gsharing = xyes; then
-       AC_DEFINE(ENABLE_GSHAREDVT,1,[Gsharing])
-fi
-
-AC_ARG_ENABLE(native-types, [  --enable-native-types Enable native types], enable_native_types=$enableval, enable_native_types=no)
-if test x$enable_native_types = xyes; then
-       AC_DEFINE(MONO_NATIVE_TYPES,1,[native types])
-fi
-
-AC_MSG_CHECKING(for visibility __attribute__)
-AC_COMPILE_IFELSE([
-       AC_LANG_SOURCE([[
-               void __attribute__ ((visibility ("hidden"))) doit (void) {}
-               int main () { doit (); return 0; }
-       ]])
-], [
-   have_visibility_hidden=yes
-   AC_MSG_RESULT(yes)
-], [
-   have_visibility_hidden=no
-   AC_MSG_RESULT(no)
-])
-
-AC_MSG_CHECKING(for deprecated __attribute__)
-AC_TRY_COMPILE([
-     int doit (void) __attribute__ ((deprecated));
-     int doit (void) { return 0; }
-], [
-       return 0;
-], [
-   have_deprecated=yes
-   AC_MSG_RESULT(yes)
-], [
-   have_deprecated=no
-   AC_MSG_RESULT(no)
-])
-
-AC_ARG_ENABLE(parallel-mark, [  --enable-parallel-mark     Enables GC Parallel Marking], enable_parallel_mark=$enableval, enable_parallel_mark=$parallel_mark)
-if test x$enable_parallel_mark = xyes; then
-       libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
-fi
-
-AC_ARG_ENABLE(boehm, [  --disable-boehm            Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
-AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
-
-dnl
-dnl Boehm GC configuration
-dnl
-LIBGC_CPPFLAGS=
-LIBGC_LIBS=
-LIBGC_STATIC_LIBS=
-libgc_dir=
-case "x$gc" in
-       xboehm|xbohem|xyes)
-               AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
-               AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
-
-               if test "x$found_boehm" != "xyes"; then
-                       AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
-               fi
-               if test "x$gc_headers" != "xyes"; then
-                       AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
-               fi
-
-               LIBGC_LIBS="-lgc $libdl"
-               LIBGC_STATIC_LIBS="$LIBGC_LIBS"
-               libmono_ldflags="$libmono_ldflags -lgc"
-               BOEHM_DEFINES="-DHAVE_BOEHM_GC"
-
-               # AC_CHECK_FUNCS does not work for some reason...
-               AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
-               if test "x$found_gcj_malloc" = "xyes"; then
-                       BOEHM_DEFINES="-DHAVE_GC_GCJ_MALLOC $BOEHM_DEFINES"
-                       AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (with typed GC)", [GC description])
-                       gc_msg="System Boehm with typed GC"
-               else
-                       AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (no typed GC)", [GC description])
-                       gc_msg="System Boehm (without typed GC)"
-               fi
-               AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
-               if test "x$found_gc_enable" = "xyes"; then
-                       BOEHM_DEFINES="-DHAVE_GC_ENABLE $BOEHM_DEFINES"
-               fi
-
-               # check whether we need to explicitly allow
-                       # thread registering
-                       AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
-                       if test "x$found_allow_register_threads" = "xyes"; then
-                        AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
-                       fi
-
-               ;;
-
-       xincluded)
-               use_included_gc=yes
-               libgc_dir=libgc
-
-               LIBGC_CPPFLAGS='-I$(top_srcdir)/libgc/include'
-               LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
-               LIBGC_STATIC_LIBS='$(top_builddir)/libgc/libmonogc-static.la'
-
-               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])
-                       gc_msg="$gc_msg and parallel mark"
-               else
-                       AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC)", [GC description])
-               fi
-               ;;
-
-       xsgen)
-               AC_MSG_WARN("Use --with-sgen instead, --with-gc= controls Boehm configuration")
-               ;;
-
-       xnone)
-               AC_MSG_WARN("Compiling mono without GC.")
-               AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "none", [GC description])
-               AC_DEFINE(HAVE_NULL_GC,1,[No GC support.])
-               ;;
-       *)
-               AC_MSG_ERROR([Invalid argument to --with-gc.])
-               ;;
-esac
-
-AC_ARG_WITH(large-heap, [  --with-large-heap=yes,no       Enable support for GC heaps larger than 3GB (defaults to no)], [large_heap=$withval], [large_heap=no])
-if test "x$large_heap" = "xyes"; then
-   CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
-fi
-
-AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
-AC_SUBST(LIBGC_CPPFLAGS)
-AC_SUBST(LIBGC_LIBS)
-AC_SUBST(LIBGC_STATIC_LIBS)
-AC_SUBST(libgc_dir)
-AC_SUBST(BOEHM_DEFINES)
-
-dnl
-dnl End of libgc checks
-dnl
-
-dnl *************************************
-dnl *** Checks for zero length arrays ***
-dnl *************************************
-AC_MSG_CHECKING(whether $CC supports zero length arrays)
-AC_TRY_COMPILE([
-       struct s {
-               int  length;
-               char data [0];
-       };
-], [], [
-       AC_MSG_RESULT(yes)
-       AC_DEFINE_UNQUOTED(MONO_ZERO_LEN_ARRAY, 0, [Length of zero length arrays])
-], [
-       AC_MSG_RESULT(no)
-       AC_DEFINE_UNQUOTED(MONO_ZERO_LEN_ARRAY, 1, [Length of zero length arrays])
-])
-
-AC_CHECK_HEADERS(nacl/nacl_dyncode.h)
-
-if test x$target_win32 = xno; then
-
-       dnl hires monotonic clock support
-       AC_SEARCH_LIBS(clock_gettime, rt)
-
-       dnl dynamic loader support
-       AC_CHECK_FUNC(dlopen, DL_LIB="",
-               AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", dl_support=no)
-       )
-       if test x$dl_support = xno; then
-               AC_MSG_WARN([No dynamic loading support available])
-       else
-               LIBS="$LIBS $DL_LIB"
-               AC_DEFINE(HAVE_DL_LOADER,1,[dlopen-based dynamic loader available])
-               dnl from glib's configure.in
-               AC_CACHE_CHECK([for preceeding underscore in symbols],
-                       mono_cv_uscore,[
-                       AC_TRY_RUN([#include <dlfcn.h>
-                       int mono_underscore_test (void) { return 42; }
-                       int main() {
-                         void *f1 = (void*)0, *f2 = (void*)0, *handle;
-                         handle = dlopen ((void*)0, 0);
-                         if (handle) {
-                           f1 = dlsym (handle, "mono_underscore_test");
-                           f2 = dlsym (handle, "_mono_underscore_test");
-                         } return (!f2 || f1);
-                       }],
-                               [mono_cv_uscore=yes],
-                               [mono_cv_uscore=no],
-                       [])
-               ])
-               if test "x$mono_cv_uscore" = "xyes"; then
-                       MONO_DL_NEED_USCORE=1
-               else
-                       MONO_DL_NEED_USCORE=0
-               fi
-               AC_SUBST(MONO_DL_NEED_USCORE)
-               AC_CHECK_FUNC(dlerror)
-       fi
-
-       dnl ******************************************************************
-       dnl *** Checks for the IKVM JNI interface library                  ***
-       dnl ******************************************************************
-       AC_ARG_WITH(ikvm-native, [  --with-ikvm-native=yes,no      build the IKVM JNI interface library (defaults to yes)],[with_ikvm_native=$withval],[with_ikvm_native=$ikvm_native])
-
-       ikvm_native_dir=
-       if test x$with_ikvm_native = xyes; then
-               ikvm_native_dir=ikvm-native
-               jdk_headers_found="IKVM Native"
-       fi
-
-       AC_SUBST(ikvm_native_dir)
-
-       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)
-       AC_CHECK_FUNCS(getpwuid_r)
-       AC_CHECK_FUNCS(getresuid)
-       AC_CHECK_FUNCS(setresuid)
-       AC_CHECK_FUNCS(kqueue)
-       AC_CHECK_FUNCS(backtrace_symbols)
-       AC_CHECK_FUNCS(mkstemp)
-       AC_CHECK_FUNCS(mmap)
-       AC_CHECK_FUNCS(madvise)
-       AC_CHECK_FUNCS(getrusage)
-       AC_CHECK_FUNCS(getpriority)
-       AC_CHECK_FUNCS(setpriority)
-       AC_CHECK_FUNCS(dl_iterate_phdr)
-       AC_CHECK_FUNCS(dladdr)
-       AC_CHECK_FUNCS(sysconf)
-
-       AC_CHECK_FUNCS(sched_setaffinity)
-       AC_CHECK_FUNCS(sched_getcpu)
-
-       dnl ****************************************************************
-       dnl *** Check for sched_setaffinity from glibc versions before   ***
-       dnl *** 2.3.4. The older versions of the function only take 2    ***
-       dnl *** parameters, not 3.                                       ***
-       dnl ***                                                          ***
-       dnl *** Because the interface change was not made in a minor     ***
-       dnl *** version rev, the __GLIBC__ and __GLIBC_MINOR__ macros    ***
-       dnl *** won't always indicate the interface sched_affinity has.  ***
-       dnl ****************************************************************
-       AC_MSG_CHECKING(for sched_setaffinity from glibc < 2.3.4)
-       AC_TRY_COMPILE([#include <sched.h>], [
-            int mask = 1; 
-            sched_setaffinity(0, &mask);
-                       return 0;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY, 1, [Have GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY])
-       ], [
-               # We have the new, three-parameter version
-               AC_MSG_RESULT(no)
-       ])
-
-
-       dnl ******************************************************************
-       dnl *** Check for large file support                               ***
-       dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
-       dnl ******************************************************************
-       
-       # Check that off_t can represent 2**63 - 1 correctly, working around
-       # potential compiler bugs.  Defines LARGE_FILE_SUPPORT, adds $1 to
-       # CPPFLAGS and sets $large_offt to yes if the test succeeds
-       large_offt=no
-       AC_DEFUN([LARGE_FILES], [
-               large_CPPFLAGS=$CPPFLAGS
-               CPPFLAGS="$CPPFLAGS $1"
-               AC_TRY_COMPILE([
-                       #include <sys/types.h>
-                       #include <limits.h>
-               ], [
-                       /* Lifted this compile time assert method from: http://www.jaggersoft.com/pubs/CVu11_3.html */
-                       #define COMPILE_TIME_ASSERT(pred) \
-                               switch(0){case 0:case pred:;}
-                       COMPILE_TIME_ASSERT(sizeof(off_t) * CHAR_BIT == 64);
-               ], [
-                       AC_MSG_RESULT(ok)
-                       AC_DEFINE(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support])
-                       large_CPPFLAGS="$large_CPPFLAGS $1"
-                       large_offt=yes
-               ], [
-                       AC_MSG_RESULT(no)
-               ])
-               CPPFLAGS=$large_CPPFLAGS
-       ])
-
-       AC_MSG_CHECKING(if off_t is 64 bits wide)
-       LARGE_FILES("")
-       if test $large_offt = no; then
-               AC_MSG_CHECKING(if _FILE_OFFSET_BITS=64 gives 64 bit off_t)
-               LARGE_FILES("-D_FILE_OFFSET_BITS=64")
-       fi
-       if test $large_offt = no; then
-               AC_MSG_WARN([No 64 bit file size support available])
-       fi
-       
-       dnl *****************************
-       dnl *** Checks for libsocket  ***
-       dnl *****************************
-       AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
-
-       case "$host" in
-               *-*-*freebsd*)
-                       dnl *****************************
-                       dnl *** Checks for libinotify ***
-                       dnl *****************************
-                       AC_CHECK_LIB(inotify, inotify_init, LIBS="$LIBS -linotify")
-       esac
-
-       dnl *******************************
-       dnl *** Checks for MSG_NOSIGNAL ***
-       dnl *******************************
-       AC_MSG_CHECKING(for MSG_NOSIGNAL)
-       AC_TRY_COMPILE([#include <sys/socket.h>], [
-               int f = MSG_NOSIGNAL;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Have MSG_NOSIGNAL])
-       ], [
-               # We'll have to use signals
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl *****************************
-       dnl *** Checks for IPPROTO_IP ***
-       dnl *****************************
-       AC_MSG_CHECKING(for IPPROTO_IP)
-       AC_TRY_COMPILE([#include <netinet/in.h>], [
-               int level = IPPROTO_IP;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IPPROTO_IP, 1, [Have IPPROTO_IP])
-       ], [
-               # We'll have to use getprotobyname
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl *******************************
-       dnl *** Checks for IPPROTO_IPV6 ***
-       dnl *******************************
-       AC_MSG_CHECKING(for IPPROTO_IPV6)
-       AC_TRY_COMPILE([#include <netinet/in.h>], [
-               int level = IPPROTO_IPV6;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IPPROTO_IPV6, 1, [Have IPPROTO_IPV6])
-       ], [
-               # We'll have to use getprotobyname
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl ******************************
-       dnl *** Checks for IPPROTO_TCP ***
-       dnl ******************************
-       AC_MSG_CHECKING(for IPPROTO_TCP)
-       AC_TRY_COMPILE([#include <netinet/in.h>], [
-               int level = IPPROTO_TCP;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IPPROTO_TCP, 1, [Have IPPROTO_TCP])
-       ], [
-               # We'll have to use getprotobyname
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl *****************************
-       dnl *** Checks for SOL_IP     ***
-       dnl *****************************
-       AC_MSG_CHECKING(for SOL_IP)
-       AC_TRY_COMPILE([#include <netdb.h>], [
-               int level = SOL_IP;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_SOL_IP, 1, [Have SOL_IP])
-       ], [
-               # We'll have to use getprotobyname
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl *****************************
-       dnl *** Checks for SOL_IPV6     ***
-       dnl *****************************
-       AC_MSG_CHECKING(for SOL_IPV6)
-       AC_TRY_COMPILE([#include <netdb.h>], [
-               int level = SOL_IPV6;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_SOL_IPV6, 1, [Have SOL_IPV6])
-       ], [
-               # We'll have to use getprotobyname
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl *****************************
-       dnl *** Checks for SOL_TCP    ***
-       dnl *****************************
-       AC_MSG_CHECKING(for SOL_TCP)
-       AC_TRY_COMPILE([#include <netdb.h>], [
-               int level = SOL_TCP;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_SOL_TCP, 1, [Have SOL_TCP])
-       ], [
-               # We'll have to use getprotobyname
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl *****************************
-       dnl *** Checks for IP_PKTINFO ***
-       dnl *****************************
-       AC_MSG_CHECKING(for IP_PKTINFO)
-       AC_TRY_COMPILE([#include <linux/in.h>], [
-               int level = IP_PKTINFO;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IP_PKTINFO, 1, [Have IP_PKTINFO])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl *****************************
-       dnl *** Checks for IPV6_PKTINFO ***
-       dnl *****************************
-       AC_MSG_CHECKING(for IPV6_PKTINFO)
-       AC_TRY_COMPILE([#include <netdb.h>], [
-               int level = IPV6_PKTINFO;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IPV6_PKTINFO, 1, [Have IPV6_PKTINFO])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl **********************************
-       dnl *** Checks for IP_DONTFRAG     ***
-       dnl **********************************
-       AC_MSG_CHECKING(for IP_DONTFRAG)
-       AC_TRY_COMPILE([#include <netinet/in.h>], [
-               int level = IP_DONTFRAG;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IP_DONTFRAG, 1, [Have IP_DONTFRAG])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl **********************************
-       dnl *** Checks for IP_DONTFRAGMENT ***
-       dnl **********************************
-       AC_MSG_CHECKING(for IP_DONTFRAGMENT)
-       AC_TRY_COMPILE([#include <Ws2ipdef.h>], [
-               int level = IP_DONTFRAGMENT;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IP_DONTFRAGMENT, 1, [Have IP_DONTFRAGMENT])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl **********************************
-       dnl *** Checks for IP_MTU_DISCOVER ***
-       dnl **********************************
-       AC_MSG_CHECKING(for IP_MTU_DISCOVER)
-       AC_TRY_COMPILE([#include <linux/in.h>], [
-               int level = IP_MTU_DISCOVER;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IP_MTU_DISCOVER, 1, [Have IP_MTU_DISCOVER])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl **********************************
-       dnl *** Checks for  IP_PMTUDISC_DO ***
-       dnl **********************************
-       AC_MSG_CHECKING(for IP_PMTUDISC_DO)
-       AC_TRY_COMPILE([#include <linux/in.h>], [
-               int level = IP_PMTUDISC_DO;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IP_PMTUDISC_DO, 1, [Have IP_PMTUDISC_DO])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl *********************************
-       dnl *** Check for struct ip_mreqn ***
-       dnl *********************************
-       AC_MSG_CHECKING(for struct ip_mreqn)
-       AC_TRY_COMPILE([#include <netinet/in.h>], [
-               struct ip_mreqn mreq;
-               mreq.imr_address.s_addr = 0;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_STRUCT_IP_MREQN, 1, [Have struct ip_mreqn])
-       ], [
-               # We'll just have to try and use struct ip_mreq
-               AC_MSG_RESULT(no)
-               AC_MSG_CHECKING(for struct ip_mreq)
-               AC_TRY_COMPILE([#include <netinet/in.h>], [
-                       struct ip_mreq mreq;
-                       mreq.imr_interface.s_addr = 0;
-               ], [
-                       # Yes, we have it...
-                       AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_STRUCT_IP_MREQ, 1, [Have struct ip_mreq])
-               ], [
-                       # No multicast support
-                       AC_MSG_RESULT(no)
-               ])
-       ])
-       
-       dnl **********************************
-       dnl *** Check for gethostbyname2_r ***
-       dnl **********************************
-       AC_MSG_CHECKING(for gethostbyname2_r)
-               AC_TRY_LINK([#include <netdb.h>], [
-               gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL);
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_GETHOSTBYNAME2_R, 1, [Have gethostbyname2_r])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-
-       dnl *****************************
-       dnl *** Checks for libnsl     ***
-       dnl *****************************
-       AC_CHECK_FUNC(gethostbyaddr, , AC_CHECK_LIB(nsl, gethostbyaddr, LIBS="$LIBS -lnsl"))
-
-       AC_CHECK_FUNCS(inet_pton inet_aton)
-
-       dnl ***********************************************
-       dnl *** Checks for size of sockaddr_un.sun_path ***
-       dnl ***********************************************
-       # AC_CHECK_SIZEOF can't cope with struct members :-(
-       AC_MSG_CHECKING(size of sockaddr_un.sun_path)
-       AC_CACHE_VAL(mono_cv_sizeof_sunpath,
-               [AC_TRY_RUN([
-                       #include <sys/types.h>
-                       #include <stdio.h>
-                       #include <sys/un.h>
-
-                       int main(void) {
-                               struct sockaddr_un sock_un;
-                               FILE *f=fopen("conftestval", "w");
-                               if(!f) exit(1);
-                               fprintf(f, "%d\n", sizeof(sock_un.sun_path));
-                               exit(0);
-                       }
-               ], mono_cv_sizeof_sunpath=`cat conftestval`,
-                  mono_cv_sizeof_sunpath=0,
-                  mono_cv_sizeof_sunpath=0)])dnl
-       AC_MSG_RESULT($mono_cv_sizeof_sunpath)
-       AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $mono_cv_sizeof_sunpath, [Sizeof sock_un.sun_path])
-
-       dnl *****************************
-       dnl *** Checks for libxnet    ***
-       dnl *****************************
-       case "${host}" in
-               *solaris* )
-                       AC_MSG_CHECKING(for Solaris XPG4 support)
-                       if test -f /usr/lib/libxnet.so; then
-                               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
-                               CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
-                               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
-                               LIBS="$LIBS -lxnet"
-                               AC_MSG_RESULT(yes)
-                       else
-                               AC_MSG_RESULT(no)
-                       fi
-
-                       if test "$GCC" = "yes"; then
-                               CFLAGS="$CFLAGS -Wno-char-subscripts"
-                       fi
-               ;;
-       esac
-
-       dnl *****************************
-       dnl *** Checks for libpthread ***
-       dnl *****************************
-# on FreeBSD -STABLE, the pthreads functions all reside in libc_r
-# and libpthread does not exist
-#
-       case "${host}" in
-               *-*-*freebsd*)
-                       AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
-               ;;
-               *-*-*openbsd*)
-                       AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
-               ;;
-               *)
-                       AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
-               ;;
-       esac
-       AC_CHECK_HEADERS(pthread.h)
-       AC_CHECK_HEADERS(pthread_np.h)
-       AC_CHECK_FUNCS(pthread_mutex_timedlock)
-       AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np)
-       AC_CHECK_FUNCS(pthread_kill)
-       AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
-       AC_TRY_COMPILE([ #include <pthread.h>], [
-               pthread_mutexattr_t attr;
-               pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-       ], [
-               AC_MSG_RESULT(ok)
-       ], [
-               AC_MSG_RESULT(no)
-               AC_ERROR(Posix system lacks support for recursive mutexes)
-       ])
-       AC_CHECK_FUNCS(pthread_attr_setstacksize)
-       AC_CHECK_FUNCS(pthread_attr_getstack pthread_attr_getstacksize)
-       AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
-
-       dnl ***********************************
-       dnl *** Checks for signals
-       dnl ***********************************
-       AC_CHECK_HEADERS(signal.h)
-       AC_CHECK_FUNCS(sigaction)
-
-       dnl ***********************************
-       dnl *** Checks for working __thread ***
-       dnl ***********************************
-       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;
-
-                       void thread_main (void *arg)
-                       {
-                               i = arg;
-                               sleep (1);
-                               if (arg == 1)
-                                       res1 = (i == arg);
-                               else
-                                       res2 = (i == arg);
-                       }
-
-                       int main () {
-                               pthread_t t1, t2;
-
-                               i = 5;
-
-                               pthread_create (&t1, NULL, thread_main, 1);
-                               pthread_create (&t2, NULL, thread_main, 2);
-
-                               pthread_join (t1, NULL);
-                               pthread_join (t2, NULL);
-
-                               return !(res1 + res2 == 2);
-                       }
-               ], [
-                               AC_MSG_RESULT(yes)
-               ], [
-                               AC_MSG_RESULT(no)
-                               with_tls=pthread
-               ])
-       fi
-
-       dnl **************************************
-       dnl *** Checks for working sigaltstack ***
-       dnl **************************************
-       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>
-                       #include <stdlib.h>
-                       #include <unistd.h>
-                       #include <signal.h>
-                       #include <pthread.h>
-                       #include <sys/wait.h>
-                       #if defined(__FreeBSD__) || defined(__NetBSD__)
-                       #define SA_STACK SA_ONSTACK
-                       #endif
-                       static void
-                       sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context)
-                       {
-                               exit (0);
-                       }
-
-                       volatile char*__ptr = NULL;
-                       static void *
-                       loop (void *ignored)
-                       {
-                               *__ptr = 0;
-                               return NULL;
-                       }
-
-                       static void
-                       child ()
-                       {
-                               struct sigaction sa;
-                       #ifdef __APPLE__
-                               stack_t sas;
-                       #else
-                               struct sigaltstack sas;
-                       #endif
-                               pthread_t id;
-                               pthread_attr_t attr;
-
-                               sa.sa_sigaction = sigsegv_signal_handler;
-                               sigemptyset (&sa.sa_mask);
-                               sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
-                               if (sigaction (SIGSEGV, &sa, NULL) == -1) {
-                                       perror ("sigaction");
-                                       return;
-                               }
-
-                               /* x86 darwin deliver segfaults using SIGBUS */
-                               if (sigaction (SIGBUS, &sa, NULL) == -1) {
-                                       perror ("sigaction");
-                                       return;
-                               }
-                               sas.ss_sp = malloc (SIGSTKSZ);
-                               sas.ss_size = SIGSTKSZ;
-                               sas.ss_flags = 0;
-                               if (sigaltstack (&sas, NULL) == -1) {
-                                       perror ("sigaltstack");
-                                       return;
-                               }
-
-                               pthread_attr_init (&attr);
-                               if (pthread_create(&id, &attr, loop, &attr) != 0) {
-                                       printf ("pthread_create\n");
-                                       return;
-                               }
-
-                               sleep (100);
-                       }
-
-                       int
-                       main ()
-                       {
-                               pid_t son;
-                               int status;
-                               int i;
-
-                               son = fork ();
-                               if (son == -1) {
-                                       return 1;
-                               }
-
-                               if (son == 0) {
-                                       child ();
-                                       return 0;
-                               }
-
-                               for (i = 0; i < 300; ++i) {
-                                       waitpid (son, &status, WNOHANG);
-                                       if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
-                                               return 0;
-                                       usleep (10000);
-                               }
-
-                               kill (son, SIGKILL);
-                               return 1;
-                       }
-
-               ], [
-                               AC_MSG_RESULT(yes)
-                               AC_DEFINE(HAVE_WORKING_SIGALTSTACK, 1, [Have a working sigaltstack])
-               ], [
-                               with_sigaltstack=no
-                               AC_MSG_RESULT(no)
-               ])
-       fi
-
-       dnl ********************************
-       dnl *** Checks for semaphore lib ***
-       dnl ********************************
-       # 'Real Time' functions on Solaris
-       # posix4 on Solaris 2.6
-       # pthread (first!) on Linux
-       AC_SEARCH_LIBS(sem_init, pthread rt posix4) 
-
-       AC_SEARCH_LIBS(shm_open, pthread rt posix4) 
-       AC_CHECK_FUNCS(shm_open)
-
-       dnl ********************************
-       dnl *** Checks for timezone stuff **
-       dnl ********************************
-       AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
-               AC_TRY_COMPILE([
-                       #include <time.h>
-                       ], [
-                       struct tm tm;
-                       tm.tm_gmtoff = 1;
-                       ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
-       if test $ac_cv_struct_tm_gmtoff = yes; then
-               AC_DEFINE(HAVE_TM_GMTOFF, 1, [Have tm_gmtoff])
-       else
-               AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
-                       AC_TRY_COMPILE([
-                               #include <time.h>
-                       ], [
-                               timezone = 1;
-                       ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
-               if test $ac_cv_var_timezone = yes; then
-                       AC_DEFINE(HAVE_TIMEZONE, 1, [Have timezone variable])
-               else
-                       AC_ERROR(unable to find a way to determine timezone)
-               fi
-       fi
-
-       dnl *********************************
-       dnl *** Checks for math functions ***
-       dnl *********************************
-       AC_SEARCH_LIBS(sqrtf, m)
-       if test "x$has_broken_apple_cpp" != "xyes"; then
-               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)))
-       fi
-        AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
-                AC_TRY_LINK([#include <math.h>], 
-                [ isfinite(0.0); ], 
-                AC_DEFINE(HAVE_ISFINITE, 1, [Have isfinite]) AC_MSG_RESULT(yes),
-                AC_MSG_RESULT(no)))
-
-       dnl ****************************************************************
-       dnl *** Checks for working poll() (macosx defines it but doesn't ***
-       dnl *** have it in the library (duh))                            ***
-       dnl ****************************************************************
-       AC_CHECK_FUNCS(poll)
-
-       dnl *************************
-       dnl *** Check for signbit ***
-       dnl *************************
-       AC_MSG_CHECKING(for signbit)
-       AC_TRY_LINK([#include <math.h>], [
-               int s = signbit(1.0);
-       ], [
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_SIGNBIT, 1, [Have signbit])
-       ], [
-               AC_MSG_RESULT(no)
-       ]) 
-
-       dnl **********************************
-       dnl *** epoll                      ***
-       dnl **********************************
-       if test "x$ac_cv_header_nacl_nacl_dyncode_h" = "xno"; then
-               AC_CHECK_HEADERS(sys/epoll.h)
-               haveepoll=no
-               AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
-               if test "x$haveepoll" = "xyes" -a "x$ac_cv_header_sys_epoll_h" = "xyes"; then
-                       AC_DEFINE(HAVE_EPOLL, 1, [epoll supported])
-               fi
-       fi
-
-       havekqueue=no
-
-       AC_CHECK_HEADERS(sys/event.h)
-       AC_CHECK_FUNCS(kqueue, [havekqueue=yes], )
-
-       dnl **************************************
-       dnl * Darwin has a race that prevents us from using reliably:
-       dnl * http://lists.apple.com/archives/darwin-dev/2011/Jun/msg00016.html
-       dnl * Since kqueue is mostly used for scaling large web servers, 
-       dnl * and very few folks run Mono on large web servers on OSX, falling
-       dnl * back 
-       dnl **************************************
-       if test "x$havekqueue" = "xyes" -a "x$ac_cv_header_sys_event_h" = "xyes"; then
-               if test "x$platform_darwin" = "xno"; then
-                       AC_DEFINE(USE_KQUEUE_FOR_THREADPOOL, 1, [Use kqueue for the threadpool])
-               fi
-       fi
-
-       dnl ******************************
-       dnl *** Checks for SIOCGIFCONF ***
-       dnl ******************************
-       AC_CHECK_HEADERS(sys/ioctl.h)
-       AC_CHECK_HEADERS(net/if.h, [], [],
-          [
-          #ifdef HAVE_SYS_TYPES_H
-          # include <sys/types.h>
-          #endif
-          #ifdef HAVE_SYS_SOCKET_H
-          # include <sys/socket.h>
-          #endif
-          ])
-       AC_MSG_CHECKING(for ifreq)
-       AC_TRY_COMPILE([
-               #include <stdio.h>
-               #include <sys/ioctl.h>
-               #include <net/if.h>
-               ], [
-               struct ifconf ifc;
-               struct ifreq *ifr;
-               void *x;
-               ifc.ifc_len = 0;
-               ifc.ifc_buf = NULL;
-               x = (void *) &ifr->ifr_addr;
-               ],[
-                       AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_SIOCGIFCONF, 1, [Can get interface list])
-               ], [
-                       AC_MSG_RESULT(no)
-               ])
-       dnl **********************************
-       dnl ***     Checks for sin_len     ***
-       dnl **********************************
-       AC_MSG_CHECKING(for sockaddr_in.sin_len)
-       AC_TRY_COMPILE([
-               #include <netinet/in.h>
-               ], [
-               struct sockaddr_in saddr;
-               saddr.sin_len = sizeof (saddr);
-               ],[
-                       AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [sockaddr_in has sin_len])
-               ], [
-                       AC_MSG_RESULT(no)
-               ])      
-       dnl **********************************
-       dnl ***    Checks for sin6_len     ***
-       dnl **********************************
-       AC_MSG_CHECKING(for sockaddr_in6.sin6_len)
-       AC_TRY_COMPILE([
-               #include <netinet/in.h>
-               ], [
-               struct sockaddr_in6 saddr6;
-               saddr6.sin6_len = sizeof (saddr6);
-               ],[
-                       AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_SOCKADDR_IN6_SIN_LEN, 1, [sockaddr_in6 has sin6_len])
-               ], [
-                       AC_MSG_RESULT(no)
-               ])
-       dnl **********************************
-       dnl *** Check for getifaddrs       ***
-       dnl **********************************
-       AC_MSG_CHECKING(for getifaddrs)
-               AC_TRY_LINK([
-               #include <stdio.h>
-               #include <sys/types.h>
-               #include <sys/socket.h>
-               #include <ifaddrs.h>
-       ], [
-               getifaddrs(NULL);
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_GETIFADDRS, 1, [Have getifaddrs])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-       dnl **********************************
-       dnl *** Check for if_nametoindex   ***
-       dnl **********************************
-       AC_MSG_CHECKING(for if_nametoindex)
-               AC_TRY_LINK([
-               #include <stdio.h>
-               #include <sys/types.h>
-               #include <sys/socket.h>
-               #include <net/if.h>
-       ], [
-               if_nametoindex(NULL);
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_IF_NAMETOINDEX, 1, [Have if_nametoindex])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-                       
-       dnl **********************************
-       dnl *** Checks for MonoPosixHelper ***
-       dnl **********************************
-       AC_CHECK_HEADERS(checklist.h)
-       AC_CHECK_HEADERS(pathconf.h)
-       AC_CHECK_HEADERS(fstab.h)
-       AC_CHECK_HEADERS(attr/xattr.h)
-       AC_CHECK_HEADERS(sys/extattr.h)
-       AC_CHECK_HEADERS(sys/sendfile.h)
-       AC_CHECK_HEADERS(sys/statvfs.h)
-       AC_CHECK_HEADERS(sys/statfs.h)
-       AC_CHECK_HEADERS(sys/vfstab.h)
-       AC_CHECK_HEADERS(sys/xattr.h)
-       AC_CHECK_HEADERS(sys/mman.h)
-       AC_CHECK_HEADERS(sys/param.h)
-       AC_CHECK_HEADERS(sys/mount.h, [], [],
-               [
-               #ifdef HAVE_SYS_PARAM_H
-               # include <sys/param.h>
-               #endif
-               ])
-       AC_CHECK_HEADERS(sys/mount.h)
-       AC_CHECK_FUNCS(confstr)
-       AC_CHECK_FUNCS(seekdir telldir)
-       AC_CHECK_FUNCS(getdomainname)
-       AC_CHECK_FUNCS(setdomainname)
-       AC_CHECK_FUNCS(endgrent getgrent fgetgrent setgrent)
-       AC_CHECK_FUNCS(setgroups)
-       AC_CHECK_FUNCS(endpwent getpwent fgetpwent setpwent)
-       AC_CHECK_FUNCS(getfsstat)
-       AC_CHECK_FUNCS(lutimes futimes)
-       AC_CHECK_FUNCS(mremap)
-       AC_CHECK_FUNCS(remap_file_pages)
-       AC_CHECK_FUNCS(posix_fadvise)
-       AC_CHECK_FUNCS(posix_fallocate)
-       AC_CHECK_FUNCS(posix_madvise)
-       AC_CHECK_FUNCS(vsnprintf)
-       AC_CHECK_FUNCS(sendfile)
-       AC_CHECK_FUNCS(gethostid sethostid)
-       AC_CHECK_FUNCS(sethostname)
-       AC_CHECK_FUNCS(statfs)
-       AC_CHECK_FUNCS(fstatfs)
-       AC_CHECK_FUNCS(statvfs)
-       AC_CHECK_FUNCS(fstatvfs)
-       AC_CHECK_FUNCS(stime)
-       AC_CHECK_FUNCS(strerror_r)
-       AC_CHECK_FUNCS(ttyname_r)
-       AC_CHECK_FUNCS(psignal)
-       AC_CHECK_FUNCS(getlogin_r)
-       AC_CHECK_FUNCS(lockf)
-       AC_CHECK_FUNCS(swab)
-       AC_CHECK_FUNCS(setusershell endusershell)
-       AC_CHECK_FUNCS(futimens utimensat)
-       AC_CHECK_FUNCS(fstatat mknodat readlinkat)
-       AC_CHECK_FUNCS(readv writev preadv pwritev)
-       AC_CHECK_FUNCS(setpgid)
-       AC_CHECK_SIZEOF(size_t)
-       AC_CHECK_TYPES([blksize_t], [AC_DEFINE(HAVE_BLKSIZE_T)], , 
-               [#include <sys/types.h>
-                #include <sys/stat.h>
-                #include <unistd.h>])
-       AC_CHECK_TYPES([blkcnt_t], [AC_DEFINE(HAVE_BLKCNT_T)], ,
-               [#include <sys/types.h>
-                #include <sys/stat.h>
-                #include <unistd.h>])
-       AC_CHECK_TYPES([suseconds_t], [AC_DEFINE(HAVE_SUSECONDS_T)], ,
-               [#include <sys/time.h>])
-       AC_CHECK_TYPES([struct flock], [AC_DEFINE(HAVE_STRUCT_FLOCK)], ,
-               [#include <unistd.h>
-                #include <fcntl.h>])
-       AC_CHECK_TYPES([struct iovec], [AC_DEFINE(HAVE_STRUCT_IOVEC)], ,
-               [#include <sys/uio.h>])
-       AC_CHECK_TYPES([struct pollfd], [AC_DEFINE(HAVE_STRUCT_POLLFD)], ,
-               [#include <sys/poll.h>])
-       AC_CHECK_TYPES([struct stat], [AC_DEFINE(HAVE_STRUCT_STAT)], ,
-               [#include <sys/types.h>
-                #include <sys/stat.h>
-                #include <unistd.h>])
-       AC_CHECK_TYPES([struct timespec], [AC_DEFINE(HAVE_STRUCT_TIMESPEC)], ,
-               [#include <time.h>])
-       AC_CHECK_TYPES([struct timeval], [AC_DEFINE(HAVE_STRUCT_TIMEVAL)], ,
-               [#include <sys/time.h>
-                #include <sys/types.h>
-                #include <utime.h>])
-       AC_CHECK_TYPES([struct timezone], [AC_DEFINE(HAVE_STRUCT_TIMEZONE)], ,
-               [#include <sys/time.h>])
-       AC_CHECK_TYPES([struct utimbuf], [AC_DEFINE(HAVE_STRUCT_UTIMBUF)], ,
-               [#include <sys/types.h>
-                #include <utime.h>])
-       AC_CHECK_MEMBERS(
-               [struct dirent.d_off, struct dirent.d_reclen, struct dirent.d_type],,, 
-               [#include <sys/types.h>
-                #include <dirent.h>])
-       AC_CHECK_MEMBERS(
-               [struct passwd.pw_gecos],,, 
-               [#include <sys/types.h>
-                #include <pwd.h>])
-       AC_CHECK_MEMBERS(
-               [struct statfs.f_flags],,, 
-               [#include <sys/types.h>
-                #include <sys/vfs.h>])
-       AC_CHECK_MEMBERS(
-               [struct stat.st_atim, struct stat.st_mtim, struct stat.st_ctim],,, 
-               [#include <sys/types.h>
-                #include <sys/stat.h>
-                #include <unistd.h>])
-
-       dnl Favour xattr through glibc, but use libattr if we have to
-       AC_CHECK_FUNC(lsetxattr, ,
-               AC_CHECK_LIB(attr, lsetxattr, XATTR_LIB="-lattr",)
-       )
-       AC_SUBST(XATTR_LIB)
-
-       dnl kinfo_proc.kp_proc works on darwin but fails on other simil-bsds
-       AC_CHECK_MEMBERS(
-               [struct kinfo_proc.kp_proc],,, 
-               [#include <sys/types.h>
-                #include <sys/param.h>
-                #include <sys/sysctl.h>
-                #include <sys/proc.h>
-                ])
-
-       dnl *********************************
-       dnl *** Checks for Windows compilation ***
-       dnl *********************************
-       AC_CHECK_HEADERS(sys/time.h)
-       AC_CHECK_HEADERS(sys/param.h)
-       AC_CHECK_HEADERS(dirent.h)
-
-       dnl ******************************************
-       dnl *** Checks for OSX and iOS compilation ***
-       dnl ******************************************
-       AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h)
-
-       dnl *********************************
-       dnl *** Check for Console 2.0 I/O ***
-       dnl *********************************
-       AC_CHECK_HEADERS([curses.h])
-       AC_CHECK_HEADERS([term.h], [], [],
-       [#if HAVE_CURSES_H
-        #include <curses.h>
-        #endif
-       ])
-       AC_CHECK_HEADERS([termios.h])
-
-       dnl * This is provided in io-layer, but on windows it's only available
-       dnl * on xp+
-       AC_DEFINE(HAVE_GETPROCESSID, 1, [Define if GetProcessId is available])
-else
-       dnl *********************************
-       dnl *** Checks for Windows compilation ***
-       dnl *********************************
-       AC_CHECK_HEADERS(winternl.h)
-
-       jdk_headers_found=no
-       AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
-       AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
-       AC_CHECK_LIB(ole32, main, LIBS="$LIBS -lole32", AC_ERROR(bad mingw install?))
-       AC_CHECK_LIB(winmm, main, LIBS="$LIBS -lwinmm", AC_ERROR(bad mingw install?))
-       AC_CHECK_LIB(oleaut32, main, LIBS="$LIBS -loleaut32", AC_ERROR(bad mingw install?))
-       AC_CHECK_LIB(advapi32, main, LIBS="$LIBS -ladvapi32", AC_ERROR(bad mingw install?))
-       AC_CHECK_LIB(version, main, LIBS="$LIBS -lversion", AC_ERROR(bad mingw install?))
-
-       dnl *********************************
-       dnl *** Check for struct ip_mreqn ***
-       dnl *********************************
-       AC_MSG_CHECKING(for struct ip_mreqn)
-       AC_TRY_COMPILE([#include <ws2tcpip.h>], [
-               struct ip_mreqn mreq;
-               mreq.imr_address.s_addr = 0;
-       ], [
-               # Yes, we have it...
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_STRUCT_IP_MREQN)
-       ], [
-               # We'll just have to try and use struct ip_mreq
-               AC_MSG_RESULT(no)
-               AC_MSG_CHECKING(for struct ip_mreq)
-               AC_TRY_COMPILE([#include <ws2tcpip.h>], [
-                       struct ip_mreq mreq;
-                       mreq.imr_interface.s_addr = 0;
-               ], [
-                       # Yes, we have it...
-                       AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_STRUCT_IP_MREQ)
-               ], [
-                       # No multicast support
-                       AC_MSG_RESULT(no)
-               ])
-       ])
-       AC_CHECK_FUNCS(GetProcessId)
-       AC_CHECK_DECLS(InterlockedExchange64, [], [], [[#include <windows.h>]])
-       AC_CHECK_DECLS(InterlockedCompareExchange64, [], [], [[#include <windows.h>]])
-       AC_CHECK_DECLS(InterlockedDecrement64, [], [], [[#include <windows.h>]])
-       AC_CHECK_DECLS(InterlockedIncrement64, [], [], [[#include <windows.h>]])
-       AC_CHECK_DECLS(InterlockedAdd, [], [], [[#include <windows.h>]])
-       AC_CHECK_DECLS(InterlockedAdd64, [], [], [[#include <windows.h>]])
-       AC_CHECK_DECLS(__readfsdword, [], [], [[#include <windows.h>]])
-fi
-
-dnl socklen_t check
-AC_MSG_CHECKING(for socklen_t)
-AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-],[
-  socklen_t foo;
-],[
-ac_cv_c_socklen_t=yes
-       AC_DEFINE(HAVE_SOCKLEN_T, 1, [Have socklen_t])
-       AC_MSG_RESULT(yes)
-],[
-       AC_MSG_RESULT(no)
-])
-
-AC_MSG_CHECKING(for array element initializer support)
-AC_TRY_COMPILE([#include <sys/socket.h>], [
-       const int array[] = {[1] = 2,};
-], [
-       # Yes, we have it...
-       AC_MSG_RESULT(yes)
-       AC_DEFINE(HAVE_ARRAY_ELEM_INIT,1,[Supports C99 array initialization])
-], [
-       # We'll have to use signals
-       AC_MSG_RESULT(no)
-])
-
-AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
-       # Simply calling trunc (0.0) is no good since gcc will optimize the call away
-       AC_TRY_LINK([#include <math.h>], 
-       [ static void *p = &trunc; ],
-       [
-               AC_DEFINE(HAVE_TRUNC) 
-               AC_MSG_RESULT(yes)
-               ac_cv_trunc=yes
-       ],
-       AC_MSG_RESULT(no)))
-
-if test "x$ac_cv_truncl" != "xyes"; then
-   AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL, 1, [Has the 'aintl' function]) LIBS="$LIBS -lsunmath"])
-fi
-
-AC_CHECK_FUNCS(round)
-AC_CHECK_FUNCS(rint)
-AC_CHECK_FUNCS(execvp)
-
-dnl ****************************
-dnl *** Look for /dev/random ***
-dnl ****************************
-
-AC_MSG_CHECKING([if usage of random device is requested])
-AC_ARG_ENABLE(dev-random,
-[  --disable-dev-random    disable the use of the random device (enabled by default)],
-try_dev_random=$enableval, try_dev_random=yes)
-
-AC_MSG_RESULT($try_dev_random)
-
-case "{$build}" in
-    *-openbsd*)
-    NAME_DEV_RANDOM="/dev/srandom"
-    ;;
-
-dnl Win32 does not have /dev/random, they have their own method...
-
-    *-mingw*|*-*-cygwin*)
-    ac_cv_have_dev_random=no
-    ;;
-
-dnl Everywhere else, it's /dev/random
-
-    *)
-    NAME_DEV_RANDOM="/dev/random"
-    ;;
-esac
-
-AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM", [Name of /dev/random])
-
-dnl Now check if the device actually exists
-
-if test "x$try_dev_random" = "xyes"; then
-    AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
-    [if test -r "$NAME_DEV_RANDOM" ; then
-        ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
-    if test "x$ac_cv_have_dev_random" = "xyes"; then
-        AC_DEFINE(HAVE_CRYPT_RNG, 1, [Have /dev/random])
-    fi
-else
-    AC_MSG_CHECKING(for random device)
-    ac_cv_have_dev_random=no
-    AC_MSG_RESULT(has been disabled)
-fi
-
-if test "x$host_win32" = "xyes"; then
-    AC_DEFINE(HAVE_CRYPT_RNG)
-fi
-
-if test "x$ac_cv_have_dev_random" = "xno" \
-    && test "x$host_win32" = "xno"; then
-    AC_MSG_WARN([[
-***
-*** A system-provided entropy source was not found on this system.
-*** Because of this, the System.Security.Cryptography random number generator
-*** will throw a NotImplemented exception.
-***
-*** If you are seeing this message, and you know your system DOES have an
-*** entropy collection in place, please contact <crichton@gimp.org> and
-*** provide information about the system and how to access the random device.
-***
-*** Otherwise you can install either egd or prngd and set the environment
-*** variable MONO_EGD_SOCKET to point to the daemon's socket to use that.
-***]])
-fi
-AC_MSG_CHECKING([if inter-process shared handles are requested])
-AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
-AC_MSG_RESULT($try_shared_handles)
-if test "x$try_shared_handles" != "xyes"; then
-       AC_DEFINE(DISABLE_SHARED_HANDLES, 1, [Disable inter-process shared handles])
-       AC_SUBST(DISABLE_SHARED_HANDLES)
-fi
-
-AC_ARG_ENABLE(bcl-opt, [  --disable-bcl-opt    BCL is compiled with no optimizations (allows accurate BCL debugging)], test_bcl_opt=$enableval, test_bcl_opt=yes)
-
-AC_ARG_ENABLE(nunit-tests, [  --enable-nunit-tests     Run the nunit tests of the class library on 'make check'])
-AM_CONDITIONAL(ENABLE_NUNIT_TESTS, [test x$enable_nunit_tests = xyes])
-
-AC_MSG_CHECKING([if big-arrays are to be enabled])
-AC_ARG_ENABLE(big-arrays,  [  --enable-big-arrays      Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no)
-if test "x$enable_big_arrays" = "xyes" ; then
-    if  test "x$ac_cv_sizeof_void_p" = "x8"; then
-       AC_DEFINE(MONO_BIG_ARRAYS,1,[Enable the allocation and indexing of arrays greater than Int32.MaxValue])
-    else
-        AC_MSG_ERROR([The allocation and indexing of arrays greater than Int32.MaxValue is not supported on this platform.])
-    fi
-fi
-AC_MSG_RESULT($enable_big_arrays)
-
-dnl **************
-dnl *** DTRACE ***
-dnl **************
-
-AC_ARG_ENABLE(dtrace,[  --enable-dtrace        Enable DTrace probes], enable_dtrace=$enableval, enable_dtrace=$has_dtrace)
-
-if test "x$enable_dtrace" = "xyes"; then
-   if test "x$has_dtrace" = "xno"; then
-         AC_MSG_ERROR([DTrace probes are not supported on this platform.])
-   fi
-   AC_PATH_PROG(DTRACE, [dtrace], [no], [$PATH:/usr/sbin])
-   if test "x$DTRACE" = "xno"; then
-         AC_MSG_RESULT([dtrace utility not found, dtrace support disabled.])
-         enable_dtrace=no
-   elif ! $DTRACE -h -s $srcdir/data/mono.d > /dev/null 2>&1; then
-         AC_MSG_RESULT([dtrace doesn't support -h option, dtrace support disabled.])
-         enable_dtrace=no
-   fi
-fi
-
-dtrace_g=no
-if test "x$enable_dtrace" = "xyes"; then
-       AC_DEFINE(ENABLE_DTRACE, 1, [Enable DTrace probes])
-       DTRACEFLAGS=
-       if test "x$ac_cv_sizeof_void_p" = "x8"; then
-               case "$host" in
-                       powerpc-*-darwin*)
-                       DTRACEFLAGS="-arch ppc64"
-                       ;;
-                       i*86-*-darwin*)
-                       DTRACEFLAGS="-arch x86_64"
-                       ;;
-                       *)
-                       DTRACEFLAGS=-64
-                       ;;
-               esac
-       else
-               case "$host" in
-                       powerpc-*-darwin*)
-                       DTRACEFLAGS="-arch ppc"
-                       ;;
-                       i*86-*-darwin*)
-                       DTRACEFLAGS="-arch i386"
-                       ;;
-                       *)
-                       DTRACEFLAGS=-32
-                       ;;
-               esac
-       fi
-       AC_SUBST(DTRACEFLAGS)
-       case "$host" in
-               *-*-solaris*)
-               dtrace_g=yes
-               ;;
-       esac
-       AC_CHECK_HEADERS([sys/sdt.h])
-fi
-AM_CONDITIONAL(ENABLE_DTRACE, [test x$enable_dtrace = xyes])
-AM_CONDITIONAL(DTRACE_G_REQUIRED, [test x$dtrace_g = xyes])
-
-dnl **************
-dnl ***  NaCl  ***
-dnl **************
-
-AC_ARG_ENABLE(nacl_codegen, [  --enable-nacl-codegen      Enable Native Client code generation], enable_nacl_codegen=$enableval, enable_nacl_codegen=no)
-AC_ARG_ENABLE(nacl_gc, [  --enable-nacl-gc           Enable Native Client garbage collection], enable_nacl_gc=$enableval, enable_nacl_gc=no)
-
-AM_CONDITIONAL(NACL_CODEGEN, test x$enable_nacl_codegen != xno)
-
-dnl
-dnl Hack to use system mono for operations in build/install not allowed in NaCl.
-dnl
-nacl_self_host=""
-if test "x$ac_cv_header_nacl_nacl_dyncode_h" = "xyes"; then
-   nacl_self_host="nacl_self_host"
-fi
-AC_SUBST(nacl_self_host)
-
-if test "x$enable_nacl_codegen" = "xyes"; then
-   MONO_NACL_ALIGN_MASK_OFF=1
-   AC_DEFINE(TARGET_NACL, 1, [...])
-   AC_DEFINE(__native_client_codegen__, 1, [...])
-else
-   MONO_NACL_ALIGN_MASK_OFF=0
-   AC_DEFINE(__default_codegen__, 1, [...])
-fi
-if test "x$enable_nacl_gc" = "xyes"; then
-   if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
-      INSTRUMENT_CFLAG="-finstrument-for-thread-suspension"
-   else
-      # Not yet implemented
-      INSTRUMENT_CFLAG=""
-   fi
-   CPPFLAGS="$CPPFLAGS $INSTRUMENT_CFLAG -D__native_client_gc__"
-fi
-AC_SUBST(MONO_NACL_ALIGN_MASK_OFF)
-
-dnl **************
-dnl ***  LLVM  ***
-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
-   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"
-   case "$target" in
-   arm*)
-               llvm_codegen="armcodegen"
-               ;;
-   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`
-   # This might include empty lines
-   LLVM_SYSTEM_LIBS=`$LLVM_CONFIG --system-libs 2>/dev/null | grep -- -`
-   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_LIBS $LLVM_LDFLAGS $LLVM_SYSTEM_LIBS -lstdc++"
-
-   expected_llvm_version="3.4svn-mono-mono/e656cac"
-
-   # Should be something like '2.6' or '2.7svn'
-   llvm_version=`$LLVM_CONFIG --version`
-   major_version=`echo $llvm_version | cut -c 1`
-   minor_version=`echo $llvm_version | cut -c 3`
-   llvm_api_version=`$LLVM_CONFIG --mono-api-version 2>/dev/null`
-   AC_MSG_CHECKING(LLVM version)
-   AC_MSG_RESULT($llvm_version)
-   if echo $llvm_version | grep -q 'mono'; then
-         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
-         if test "x$llvm_api_version" = "x"; then
-               LLVM_CFLAGS="$LLVM_CFLAGS -DLLVM_API_VERSION=0"
-               LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=0"
-         else
-               LLVM_CFLAGS="$LLVM_CFLAGS -DLLVM_API_VERSION=$llvm_api_version"
-               LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=$llvm_api_version"
-         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
-
-   AC_DEFINE_UNQUOTED(LLVM_MAJOR_VERSION, $major_version, [Major version of LLVM libraries])
-   AC_DEFINE_UNQUOTED(LLVM_MINOR_VERSION, $minor_version, [Minor version of LLVM libraries])
-   AC_DEFINE_UNQUOTED(LLVM_VERSION, "$llvm_version", [Full version of LLVM libraties])
-
-   # Have to pass these on the command line since mini-llvm-cpp.h already includes
-   # llvm's config.h
-   LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_MAJOR_VERSION=$major_version -DLLVM_MINOR_VERSION=$minor_version"
-
-   AC_SUBST(LLVM_CFLAGS)
-   AC_SUBST(LLVM_CXXFLAGS)
-   AC_SUBST(LLVM_LIBS)
-   AC_SUBST(LLVM_LDFLAGS)
-   AC_DEFINE(ENABLE_LLVM, 1, [Enable the LLVM back end])
-fi
-
-AM_CONDITIONAL(ENABLE_LLVM, [test x$enable_llvm = xyes])
-if test "x$enable_loadedllvm" = "xyes"; then
-   AC_DEFINE(MONO_LLVM_LOADED, 1, [The LLVM back end is dynamically loaded])
-fi
-AM_CONDITIONAL(LOADED_LLVM, [test x$enable_loadedllvm = xyes])
-
-TARGET="unknown"
-ACCESS_UNALIGNED="yes"
-
-JIT_SUPPORTED=no
-INTERP_SUPPORTED=no
-LIBC="libc.so.6"
-INTL="libc.so.6"
-SQLITE="libsqlite.so.0"
-SQLITE3="libsqlite3.so.0"
-X11="libX11.so"
-XINERAMA="libXinerama.so"
-
-sizeof_register="SIZEOF_VOID_P"
-
-jit_wanted=true
-interp_wanted=false
-sgen_supported=false
-boehm_supported=true
-case "$host" in
-       mips*)
-               TARGET=MIPS;
-               arch_target=mips;
-               sgen_supported=true
-               ACCESS_UNALIGNED="no"
-               JIT_SUPPORTED=yes
-
-               AC_MSG_CHECKING(for mips n32)
-               AC_TRY_COMPILE([],[
-               #if _MIPS_SIM != _ABIN32
-               #error Not mips n32
-               #endif
-               return 0;
-               ],[
-               AC_MSG_RESULT(yes)
-               sizeof_register=8
-               ],[
-               AC_MSG_RESULT(no)
-               ])
-               ;;
-       i*86-*-*)
-               TARGET=X86;
-               arch_target=x86;
-               JIT_SUPPORTED=yes
-               case $host_os in
-                 solaris*)
-                       LIBC="libc.so"
-                       INTL="libintl.so"
-                       if test "x$ac_cv_sizeof_void_p" = "x8"; then
-                               TARGET=AMD64
-                               arch_target=amd64
-                       fi
-
-                       # On solaris 10 x86, gcc prints a warning saying 'visibility attribute not supported on this configuration; ignored', but linking fails. A test case:
-                       # int astruct __attribute__ ((visibility ("hidden")));
-                       # void foo ()
-                       # {
-                       #       void *p = &astruct;
-                       # }
-                       # gcc -fPIC --shared -o libfoo.so foo.c
-                       # yields:
-                       # foo.c:6: warning: visibility attribute not supported in this configuration; ignored
-                       # ld: fatal: relocation error: R_386_GOTOFF: file /var/tmp//ccxYR96k.o: symbol astruct: relocation must bind locally
-                       have_visibility_hidden=no
-                       sgen_supported=true
-                       ;;
-                 mingw*|cygwin*)
-                       sgen_supported=true
-                       have_visibility_hidden=no                 
-                       ;;
-                 haiku*)
-                       LIBC=libroot.so
-                       ;;
-                 linux*)
-                       sgen_supported=true
-                       AOT_SUPPORTED="yes"
-                       ;;
-                 darwin*)
-                       sgen_supported=true
-                       AOT_SUPPORTED="yes"
-                       ;;
-                 darwin*|openbsd*|freebsd*)
-                       sgen_supported=true
-                       ;;
-               esac
-               ;;
-       x86_64-*-* | amd64-*-*)
-               TARGET=AMD64;
-               arch_target=amd64;
-               JIT_SUPPORTED=yes
-               if test "x$ac_cv_sizeof_void_p" = "x4"; then
-                       AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
-                       sizeof_register=8
-               fi
-               case $host_os in
-                 linux*)
-                       sgen_supported=true
-                       AOT_SUPPORTED="yes"
-                       ;;
-                 darwin*|openbsd*|freebsd*)
-                       sgen_supported=true
-                       ;;
-               esac
-               case "$host" in
-                       x86_64-*-nacl*)
-                               AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
-                               sizeof_register=8
-                               ;;
-               esac
-               ;;
-       ia64-*-*)
-               TARGET=IA64
-               arch_target=ia64
-               ACCESS_UNALIGNED="no"
-               JIT_SUPPORTED=yes
-               LIBC="libc.so.6.1"
-               INTL="libc.so.6.1"
-               AC_CHECK_LIB(unwind, _U_dyn_register, [], [AC_MSG_ERROR(library libunwind not found)])
-               libmono_ldflags="-lunwind"
-               ;;
-       sparc*-*-*)
-               if test "x$ac_cv_sizeof_void_p" = "x8"; then
-                  TARGET=SPARC64
-               else
-                       TARGET=SPARC
-               fi
-               arch_target=sparc;
-               JIT_SUPPORTED=yes
-               ACCESS_UNALIGNED="no"
-               case $host_os in
-                 linux*) ;;
-                 *)
-                       LIBC="libc.so"
-                       INTL="libintl.so"
-               esac
-               if test x"$GCC" = xyes; then
-                       # We don't support v8 cpus
-                       CFLAGS="$CFLAGS -Wno-cast-align -mcpu=v9"
-               fi
-               if test x"$AR" = xfalse; then
-                       AC_MSG_ERROR([The required utility 'ar' is not found in your PATH. Usually it can be found in /usr/ccs/bin.])
-               fi
-               sgen_supported=true
-               ;;
-       *-mingw*|*-*-cygwin*)
-               # When this is enabled, it leads to very strange crashes at runtime (gcc-3.4.4)
-               have_visibility_hidden=no
-               INTL="intl"
-               ;;
-       macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
-        powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc-*-freebsd* )
-               if test "x$ac_cv_sizeof_void_p" = "x8"; then
-                       TARGET=POWERPC64;
-                       CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
-                       CFLAGS="$CFLAGS -mminimal-toc"
-               else
-                       TARGET=POWERPC;
-                       CPPFLAGS="$CPPFLAGS -D__mono_ppc__"
-               fi
-               arch_target=ppc;
-               JIT_SUPPORTED=yes
-               case $host_os in
-                 linux*|darwin*)
-                       sgen_supported=true
-                       ;;
-               esac
-               ;;
-       arm*-darwin*)
-               TARGET=ARM;
-               arch_target=arm;
-               ACCESS_UNALIGNED="no"
-               JIT_SUPPORTED=yes
-               CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
-               # libgc's gc_locks.h depends on this
-           CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC"
-               sgen_supported=true
-               ;;
-       arm*-linux*)
-               TARGET=ARM;
-               arch_target=arm;
-               ACCESS_UNALIGNED="no"
-               JIT_SUPPORTED=yes
-               sgen_supported=true
-               AOT_SUPPORTED="yes"
-               CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
-               ;;
-# TODO: make proper support for NaCl host.
-#        arm*-*nacl)
-#              TARGET=ARM;
-#              arch_target=arm;
-#              ACCESS_UNALIGNED="no"
-#              JIT_SUPPORTED=yes
-#              sgen_supported=true
-#              AOT_SUPPORTED="no"
-#              ;;
-       aarch64-*)
-               # https://lkml.org/lkml/2012/7/15/133
-               TARGET=ARM64
-               arch_target=arm64
-               JIT_SUPPORTED=yes
-               sgen_supported=true
-               boehm_supported=false
-               ;;
-       s390x-*-linux*)
-               TARGET=S390X;
-               arch_target=s390x;
-               ACCESS_UNALIGNED="yes"
-               JIT_SUPPORTED=yes
-               sgen_supported=true
-               CFLAGS="$CFLAGS -mbackchain -D__USE_STRING_INLINES"
-               ;;
-esac
-
-HOST=$TARGET
-
-if test "x$host" != "x$target"; then
-   AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
-   enable_mcs_build=no
-   case "$target" in
-   arm*-darwin*)
-               TARGET=ARM;
-               arch_target=arm;
-               ACCESS_UNALIGNED="no"
-               JIT_SUPPORTED=yes
-               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
-               with_tls=pthread
-               ;;
-   powerpc64-ps3-linux-gnu)
-               TARGET=POWERPC64
-               arch_target=powerpc64
-               AC_DEFINE(TARGET_PS3, 1, [...])
-               # It would be better to just use TARGET_POWERPC64, but lots of code already
-               # uses this define
-               AC_DEFINE(__mono_ppc64__, 1, [...])
-               AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
-               sizeof_register=8
-               target_byte_order=G_BIG_ENDIAN
-               ;;
-
-   powerpc64-xbox360-linux-gnu)
-               TARGET=POWERPC64
-               arch_target=powerpc64
-               AC_DEFINE(TARGET_XBOX360, 1, [...])
-               # It would be better to just use TARGET_POWERPC64, but lots of code already
-               # uses this define
-               sizeof_register=8
-               target_byte_order=G_BIG_ENDIAN
-               ;;
-   x86_64-*-nacl)
-               TARGET=AMD64
-               arch_target=amd64
-               AC_DEFINE(TARGET_AMD64, 1, [...])
-               AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
-               sizeof_register=8
-               ;;
-# TODO: make proper support for NaCl target.
-#   arm*-*nacl)
-#              TARGET=ARM
-#              arch_target=arm
-#              AC_DEFINE(TARGET_ARM, 1, [...])
-#              ACCESS_UNALIGNED="no"
-#              JIT_SUPPORTED=yes
-#              sizeof_register=4
-#               CPPFLAGS="$CPPFLAGS \
-#                    -D__ARM_EABI__ \
-#                    -D__arm__ \
-#                    -D__portable_native_client__ \
-#                    -Dtimezone=_timezone \
-#                    -DDISABLE_SOCKETS \
-#                    -DDISABLE_ATTACH \
-#                    -DUSE_NEWLIB"
-#              jit_wanted=true
-               # Can't use tls, since it depends on the runtime detection of tls offsets
-               # in mono-compiler.h
-#              with_tls=pthread
-#              ;;
-   i686-*-nacl)
-               TARGET=X86
-               arch_target=x86
-               AC_DEFINE(TARGET_X86, 1, [...])
-               sizeof_register=4
-               ;;
-   arm*-linux-*)
-               TARGET=ARM;
-               arch_target=arm;
-               AC_DEFINE(TARGET_ARM, 1, [...])
-               AC_DEFINE(TARGET_ANDROID, 1, [...])
-               ACCESS_UNALIGNED="no"
-               JIT_SUPPORTED=yes
-               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
-               with_tls=pthread
-               target_mach=no
-               case "$target" in
-               armv7l-unknown-linux-gnueabi*)
-                       # TEGRA
-                       CPPFLAGS="$CPPFLAGS"
-                       ;;
-               armv5-*-linux-androideabi*)
-                       CPPFLAGS="$CPPFLAGS"
-                       ;;
-               esac
-               ;;
-       aarch64-*)
-               TARGET=ARM64
-               JIT_SUPPORTED=yes
-               jit_wanted=true
-               ;;
-       *)
-               AC_MSG_ERROR([Cross compiling is not supported for target $target])
-       esac
-fi
-
-case "$TARGET" in
-X86)
-       AC_DEFINE(TARGET_X86, 1, [...])
-       ;;
-AMD64)
-       AC_DEFINE(TARGET_AMD64, 1, [...])
-       ;;
-ARM)
-       AC_DEFINE(TARGET_ARM, 1, [...])
-       ;;
-ARM64)
-       AC_DEFINE(TARGET_ARM64, 1, [...])
-       ;;
-POWERPC)
-       AC_DEFINE(TARGET_POWERPC, 1, [...])
-       ;;
-POWERPC64)
-       AC_DEFINE(TARGET_POWERPC, 1, [...])
-       AC_DEFINE(TARGET_POWERPC64, 1, [...])
-       ;;
-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 | ARM64 | 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" -o "x$TARGET" = "xARM64"; then
-         AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
-         CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
-         CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
-   else
-       AC_TRY_COMPILE([#include "TargetConditionals.h"],[
-       #if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
-       #error fail this for ios
-       #endif
-       return 0;
-       ], [
-                 AC_DEFINE(TARGET_OSX,1,[The JIT/AOT targets OSX])
-          CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_OSX"
-          CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_OSX"
-       ], [
-          AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
-          CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
-          CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
-       ])
-       fi
-   AC_DEFINE(TARGET_MACH,1,[The JIT/AOT targets Apple platforms])
-fi
-
-if test "x$sizeof_register" = "x4"; then
-   AC_DEFINE(SIZEOF_REGISTER,4,[size of machine integer registers])
-elif test "x$sizeof_register" = "x8"; then
-   AC_DEFINE(SIZEOF_REGISTER,8,[size of machine integer registers])
-else
-   AC_DEFINE(SIZEOF_REGISTER,SIZEOF_VOID_P,[size of machine integer registers])
-fi
-
-if test "x$target_byte_order" = "xG_BIG_ENDIAN"; then
-   AC_DEFINE(TARGET_BYTE_ORDER,G_BIG_ENDIAN,[byte order of target])
-elif test "x$target_byte_order" = "xG_LITTLE_ENDIAN"; then
-   AC_DEFINE(TARGET_BYTE_ORDER,G_LITTLE_ENDIAN,[byte order of target])
-else
-   AC_DEFINE(TARGET_BYTE_ORDER,G_BYTE_ORDER,[byte order of target])
-fi
-
-if test "x$have_visibility_hidden" = "xyes"; then
-   AC_DEFINE(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility ("hidden") attribute])
-fi
-
-if test "x$have_deprecated" = "xyes"; then
-   AC_DEFINE(HAVE_DEPRECATED, 1, [Support for the deprecated attribute])
-fi
-
-dnl 
-dnl Simple Generational checks (sgen)
-dnl
-if $sgen_supported; then
-   build_sgen_default=yes
-else
-   build_sgen_default=no
-fi
-SGEN_DEFINES=
-AC_ARG_WITH(sgen, [  --with-sgen=yes,no             Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=$build_sgen_default])
-if test x$buildsgen = xyes; then
-   if $sgen_supported; then
-       SGEN_DEFINES="-DHAVE_SGEN_GC -DHAVE_MOVING_COLLECTOR"
-       gc_msg="sgen and $gc_msg"
-   else
-       buildsgen=no
-       AC_MSG_WARN("Sgen is not supported on this platform")
-   fi
-fi
-AC_SUBST(SGEN_DEFINES)
-AM_CONDITIONAL(SUPPORT_SGEN, test x$buildsgen = xyes)
-
-USEJIT=false
-if test x$JIT_SUPPORTED = xyes; then
-   if $jit_wanted; then
-      USEJIT=true
-      jit_status="Building and using the JIT"
-   else
-      if $interp_wanted; then
-         jit_status="Building the JIT, defaulting to the interpreter"
-      else
-         AC_ERROR(No JIT or interpreter support available or selected.)
-      fi
-   fi
-else
-   if test x$interp_wanted = xtrue; then
-      jit_status="interpreter"
-   else
-      AC_ERROR(No JIT or interpreter support available or selected.)
-   fi
-fi
-
-AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
-
-libsuffix=".so"
-
-case "$host" in
-     *-*-darwin*)
-       libsuffix=".dylib"
-       LIBC="libc.dylib"
-       INTL="libintl.dylib"
-       SQLITE="libsqlite.0.dylib"
-       SQLITE3="libsqlite3.0.dylib"
-       X11="libX11.dylib"
-       ;;
-     *-*-*netbsd*)
-       LIBC="libc.so.12"
-       INTL="libintl.so.0"
-       ;;
-    *-*-*freebsd*)
-       LIBC="libc.so"
-       INTL="libintl.so"
-       SQLITE="libsqlite.so"
-       SQLITE3="libsqlite3.so"
-       ;;
-    *-*-*openbsd*)
-       LIBC="libc.so"
-       INTL="libintl.so"
-        SQLITE="libsqlite.so"
-        SQLITE3="libsqlite3.so"
-       ;;
-    *-*-*linux*)
-       AC_PATH_X
-       dlsearch_path=`(libtool --config ; echo eval echo \\$sys_lib_dlsearch_path_spec) | sh`
-       AC_MSG_CHECKING(for the soname of libX11.so)
-       for i in $x_libraries $dlsearch_path; do
-               for r in 4 5 6; do
-                       if test -f $i/libX11.so.$r; then
-                               X11=libX11.so.$r
-                               AC_MSG_RESULT($X11)
-                       fi
-               done
-       done
-       
-       if test "x$X11" = "xlibX11.so"; then
-               AC_MSG_WARN([Could not find X development libs. Do you have the -devel package installed? Assuming libX11.so.6...]);
-               X11=libX11.so.6
-       fi
-       AC_MSG_CHECKING(for the soname of libXinerama.so)
-       for i in $x_libraries $dlsearch_path; do
-               for r in 1 2 3; do
-                       if test -f $i/libXinerama.so.$r; then
-                               XINERAMA=libXinerama.so.$r
-                               AC_MSG_RESULT($XINERAMA)
-                       fi
-               done
-       done
-       if test "x$XINERAMA" = "xlibXinerama.so"; then
-               AC_MSG_WARN([Could not find Xinerama development libs. Support for multiple monitors might not work...]);
-       fi
-       ;;
-esac
-
-
-AC_SUBST(libsuffix)
-
-if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
-       if test "x$with_tls" = "x__thread"; then
-               #
-               # On some linux distributions, TLS works in executables, but linking 
-               # against a shared library containing TLS fails with:
-               # undefined reference to `__tls_get_addr'
-               #
-               rm -f conftest.c conftest.so conftest
-               echo "static __thread int foo; int main () { foo = 5; return 0; }" > conftest.c
-               $CC -fPIC --shared -o conftest.so conftest.c > /dev/null 2>&1
-               $CC -o conftest conftest.so > /dev/null 2>&1
-               if test ! -f conftest; then
-                  AC_MSG_WARN([Disabling usage of __thread.]);
-                  with_tls=pthread
-               fi
-               rm -f conftest.c conftest.so conftest
-       fi
-fi
-
-AC_ARG_ENABLE(icall-symbol-map,[  --enable-icall-symbol-map Generate tables which map icall functions to their C symbols], icall_symbol_map=$enableval, icall_symbol_map=no)
-if test "x$icall_symbol_map" = "xyes"; then
-   AC_DEFINE(ENABLE_ICALL_SYMBOL_MAP, 1, [Icall symbol map enabled])
-fi
-
-AC_ARG_ENABLE(icall-export,[  --enable-icall-export Export icall functions], icall_export=$enableval, icall_export=no)
-if test "x$icall_export" = "xyes"; then
-   AC_DEFINE(ENABLE_ICALL_EXPORT, 1, [Icall export enabled])
-fi
-
-AC_ARG_ENABLE(icall-tables,[  --disable-icall-tables Disable the runtime lookup of icalls], icall_tables=$enableval, icall_tables=yes)
-if test "x$icall_tables" = "xno"; then
-   AC_DEFINE(DISABLE_ICALL_TABLES, 1, [Icall tables disabled])
-fi
-
-if test "x$with_tls" = "x__thread"; then
-       AC_DEFINE(HAVE_KW_THREAD, 1, [Have __thread keyword])
-       # Pass the information to libgc
-       CPPFLAGS="$CPPFLAGS -DUSE_COMPILER_TLS"
-       AC_MSG_CHECKING(if the tls_model attribute is supported)
-       AC_TRY_COMPILE([static __thread int foo __attribute__((tls_model("initial-exec")));], [
-               ], [
-                       AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_TLS_MODEL_ATTR, 1, [tls_model available])
-               ], [
-                       AC_MSG_RESULT(no)
-       ])
-fi
-
-if test ${TARGET} = ARM; then
-       dnl ******************************************
-       dnl *** Check to see what FPU is available ***
-       dnl ******************************************
-       AC_MSG_CHECKING(which FPU to use)
-
-       #
-       # This is a bit tricky:
-       #
-       # if (__ARM_PCS_VFP) {
-       #       /* mfloat-abi=hard == VFP with hard ABI */
-       # } elif (!__SOFTFP__) {
-       #       /* mfloat-abi=softfp == VFP with soft ABI */
-       # } else {
-       #       /* mfloat-abi=soft == no VFP */
-       # }
-       #
-       # The exception is iOS (w/ GCC) where none of the above
-       # are defined (but iOS always uses the 'softfp' ABI).
-       #
-       # No support for FPA.
-       #
-
-       fpu=NONE
-
-       # iOS GCC always uses the 'softfp' ABI.
-       if test x"$GCC" = xyes && test x$platform_darwin = xyes; then
-               fpu=VFP
-       fi
-
-       # Are we using the 'hard' ABI?
-       if test x$fpu = xNONE; then
-               AC_TRY_COMPILE([], [
-                       #ifndef __ARM_PCS_VFP
-                       #error "Float ABI is not 'hard'"
-                       #endif
-                       return 0;
-               ], [
-                       fpu=VFP_HARD
-               ], [
-                       fpu=NONE
-               ])
-       fi
-
-       # No 'hard' ABI. 'soft' or 'softfp'?
-       if test x$fpu = xNONE; then
-               AC_TRY_COMPILE([], [
-                       #ifdef __SOFTFP__
-                       #error "Float ABI is not 'softfp'"
-                       #endif
-                       return 0;
-               ], [
-                       fpu=VFP
-               ], [
-                       fpu=NONE
-               ])
-       fi
-
-       AC_MSG_RESULT($fpu)
-       CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu=1"
-       unset fpu
-
-       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
-
-               arm_ver=ARMv5
-       ], [])
-
-       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
-
-               arm_ver=ARMv6
-       ], [])
-
-       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
-
-               arm_ver=ARMv7
-       ], [])
-
-       AC_MSG_RESULT($arm_ver)
-
-       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
-
-if test ${TARGET} = ARM; then
-       if test "x${with_jumptables}" = "xyes"; then
-                AC_DEFINE(USE_JUMP_TABLES, 1, Use jump tables in JIT)
-        fi
-fi
-
-if test ${TARGET} = unknown; then
-       CPPFLAGS="$CPPFLAGS -DNO_PORT"
-       AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
-fi
-
-if test ${ACCESS_UNALIGNED} = no; then
-       CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
-fi
-
-case "x$gc" in
-       xincluded)
-               # Pass CPPFLAGS to libgc configure
-               # We should use a separate variable for this to avoid passing useless and
-               # potentially problematic defines to libgc (like -D_FILE_OFFSET_BITS=64)
-               # This should be executed late so we pick up the final version of CPPFLAGS
-               # The problem with this approach, is that during a reconfigure, the main
-               # configure scripts gets invoked with these arguments, so we use separate
-               # variables understood by libgc's configure to pass CPPFLAGS and CFLAGS.
-               TMP_CPPFLAGS="$CPPFLAGS $CPPFLAGS_FOR_LIBGC"
-               if test x$TARGET = xSPARC -o x$TARGET = xSPARC64; then
-                       TMP_CPPFLAGS=`echo $TMP_CPPFLAGS | sed -e 's/-D_FILE_OFFSET_BITS=64//g'`
-               fi
-               # Don't pass -finstrument-for-thread-suspension in, 
-               # if these are instrumented it will be very bad news 
-               # (infinite recursion, undefined parking behavior, etc)
-               TMP_CPPFLAGS=`echo $TMP_CPPFLAGS | sed -e 's/-finstrument-for-thread-suspension//g'`
-               ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS_FOR_LIBGC=$TMP_CPPFLAGS\" \"CFLAGS_FOR_LIBGC=$CFLAGS_FOR_LIBGC\""
-               AC_CONFIG_SUBDIRS(libgc)
-               ;;
-esac
-
-AC_ARG_WITH(profile2,  [  --with-profile2=yes,no          If you want to install the 2.0/3.5 FX (defaults to yes)],            [], [with_profile2=yes])
-AC_ARG_WITH(profile4,  [  --with-profile4=yes,no          If you want to install the 4.0 FX (defaults to yes)],                [], [with_profile4=yes])
-AC_ARG_WITH(profile4_5,[  --with-profile4_5=yes,no        If you want to install the 4.5 FX (defaults to yes)],                [], [with_profile4_5=yes])
-AC_ARG_WITH(monodroid, [  --with-monodroid=yes,no         If you want to build the MonoDroid assemblies (defaults to no)],     [], [with_monodroid=no])
-AC_ARG_WITH(monotouch, [  --with-monotouch=yes,no,only    If you want to build the MonoTouch assemblies (defaults to no)],     [], [with_monotouch=no])
-AC_ARG_WITH(xammac,    [  --with-xammac=yes,no,only       If you want to build the Xamarin.Mac assemblies (defaults to no)],   [], [with_xammac=no])
-
-OPROFILE=no
-AC_ARG_WITH(oprofile,[  --with-oprofile=no,<oprofile install dir>   Enable oprofile support (defaults to no)],[
-       if test x$with_oprofile != xno; then
-           oprofile_include=$with_oprofile/include
-           if test ! -f $oprofile_include/opagent.h; then
-                 AC_MSG_ERROR([oprofile include file not found at $oprofile_include/opagent.h])
-               fi
-           OPROFILE=yes
-               OPROFILE_CFLAGS="-I$oprofile_include"
-           OPROFILE_LIBS="-L$with_oprofile/lib/oprofile -lopagent"
-           AC_DEFINE(HAVE_OPROFILE,1,[Have oprofile support])
-       fi
-])
-
-MALLOC_MEMPOOLS=no
-AC_ARG_WITH(malloc_mempools,[  --with-malloc-mempools=yes,no  Use malloc for each single mempool allocation (only for runtime debugging, defaults to no)],[
-       if test x$with_malloc_mempools = xyes; then
-               MALLOC_MEMPOOLS=yes
-               AC_DEFINE(USE_MALLOC_FOR_MEMPOOLS,1,[Use malloc for each single mempool allocation])
-       fi
-])
-
-
-DISABLE_MCS_DOCS=no
-AC_ARG_WITH(mcs_docs,[  --with-mcs-docs=yes,no         If you want to build the documentation under mcs (defaults to yes)],[
-       if test x$with_mcs_docs != xyes; then
-               DISABLE_MCS_DOCS=yes
-       fi
-])
-if test x$with_profile4 != xyes; then
-       DISABLE_MCS_DOCS=yes
-fi
-
-AC_ARG_WITH(lazy_gc_thread_creation, [  --with-lazy-gc-thread-creation=yes|no      Enable lazy runtime thread creation, embedding host must do it explicitly (defaults to no)],[
-       if test x$with_lazy_gc_thread_creation != xno ; then
-               AC_DEFINE(LAZY_GC_THREAD_CREATION,1,[Enable lazy gc thread creation by the embedding host.])
-       fi
-], [with_lazy_gc_thread_creation=no])
-
-AC_CHECK_HEADER([malloc.h], 
-               [AC_DEFINE([HAVE_USR_INCLUDE_MALLOC_H], [1], 
-                       [Define to 1 if you have /usr/include/malloc.h.])],,)
-
-if test x"$GCC" = xyes; then
-       # Implicit function declarations are not 64 bit safe
-       # Do this late, since this causes lots of configure tests to fail
-       CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
-       # jay has a lot of implicit declarations
-       JAY_CFLAGS="-Wno-implicit-function-declaration"
-fi
-
-# When --disable-shared is used, libtool transforms libmono-2.0.la into libmono-2.0.so
-# instead of libmono-static.a
-if test "x$enable_shared" = "xno" -a "x$enable_executables" = "xyes"; then
-   LIBMONO_LA=libmini-static.la
-else
-   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)
-
-dnl
-dnl Consistency settings
-dnl
-if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
-   DISABLE_MCS_DOCS=yes
-   with_profile2=no
-   with_profile4=no
-   with_profile4_5=no
-   with_monodroid=no
-   with_monotouch=no
-   with_xammac=no
-fi
-
-if test x$DISABLE_MCS_DOCS = xyes; then
-   docs_dir=""
-else
-   docs_dir=docs
-fi
-AC_SUBST(docs_dir)
-
-## Maybe should also disable if mcsdir is invalid.  Let's punt the issue for now.
-AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_build != xno])
-
-AM_CONDITIONAL(HAVE_OPROFILE, test x$OPROFILE = xyes)
-AC_SUBST(OPROFILE_CFLAGS)
-AC_SUBST(OPROFILE_LIBS)
-
-libmono_ldflags="$libmono_ldflags $LIBS"
-
-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])
-AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
-AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
-AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
-AM_CONDITIONAL(ONLY_MONOTOUCH, [test "x$with_monotouch" = "xonly"])
-AM_CONDITIONAL(ONLY_XAMMAC, [test "x$with_xammac" = "xonly"])
-
-AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
-AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
-AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
-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(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(ARM64, test x$TARGET = xARM64)
-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)
-AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
-AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
-
-AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
-AM_CONDITIONAL(INTERP_SUPPORTED, test x$interp_wanted = xtrue)
-AM_CONDITIONAL(INCLUDED_LIBGC, test x$gc = xincluded)
-
-AC_SUBST(LIBC)
-AC_SUBST(INTL)
-AC_SUBST(SQLITE)
-AC_SUBST(SQLITE3)
-AC_SUBST(X11)
-AC_SUBST(XINERAMA)
-AC_DEFINE_UNQUOTED(ARCHITECTURE,"$arch_target",[The architecture this is running on])
-AC_SUBST(arch_target)
-AC_SUBST(CFLAGS)
-AC_SUBST(CPPFLAGS)
-AC_SUBST(LDFLAGS)
-
-mono_build_root=`pwd`
-AC_SUBST(mono_build_root)
-
-if test x$USEJIT = xtrue; then
-  mono_runtime=mono/mini/mono
-else
-  mono_runtime=mono/interpreter/mint
-fi
-AC_SUBST(mono_runtime)
-
-mono_cfg_root=$mono_build_root/runtime
-if test x$host_win32 = xyes; then
-  if test "x$cross_compiling" = "xno"; then
-    mono_cfg_dir=`cygpath -w -a $mono_cfg_root`\\etc
-  else
-    mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\'`\\etc
-  fi
-else
-  mono_cfg_dir=$mono_cfg_root/etc
-fi
-AC_SUBST(mono_cfg_dir)
-
-AC_CONFIG_FILES([po/mcs/Makefile.in])
-
-AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
-AC_CONFIG_FILES([runtime/monodis-wrapper],[chmod +x runtime/monodis-wrapper])
-
-AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
-[   depth=../../../..
-    case $srcdir in
-    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
-    .) reldir=$depth ;;
-    *) reldir=$depth/$srcdir ;;
-    esac
-    $ac_aux_dir/install-sh -d runtime/etc/mono/1.0
-    cd runtime/etc/mono/1.0
-    rm -f machine.config
-    $LN_S $reldir/data/net_1_1/machine.config machine.config
-    cd $depth
-],[LN_S='$LN_S'])
-
-AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
-[   depth=../../../..
-    case $srcdir in
-    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
-    .) reldir=$depth ;;
-    *) reldir=$depth/$srcdir ;;
-    esac
-    $ac_aux_dir/install-sh -d runtime/etc/mono/2.0
-    cd runtime/etc/mono/2.0
-    rm -f machine.config
-    $LN_S $reldir/data/net_2_0/machine.config machine.config
-    cd $depth
-],[LN_S='$LN_S'])
-
-AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config],
-[   depth=../../../..
-    case $srcdir in
-    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
-    .) reldir=$depth ;;
-    *) reldir=$depth/$srcdir ;;
-    esac
-    $ac_aux_dir/install-sh -d runtime/etc/mono/2.0
-    cd runtime/etc/mono/2.0
-    rm -f web.config
-    $LN_S $reldir/data/net_2_0/web.config web.config
-    cd $depth
-],[LN_S='$LN_S'])
-
-AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
-[   depth=../../..
-    case $srcdir in
-    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
-    .) reldir=$depth ;;
-    *) reldir=$depth/$srcdir ;;
-    esac
-    $ac_aux_dir/install-sh -d runtime/etc/mono/
-    cd runtime/etc/mono/
-    rm -f browscap.ini
-    $LN_S $reldir/data/browscap.ini browscap.ini
-    cd $depth
-],[LN_S='$LN_S'])
-
-AC_CONFIG_COMMANDS([runtime/etc/mono/2.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/2.0/Browsers/
-    cd runtime/etc/mono/2.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.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'])
-
-AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config],
-[   depth=../../../..
-    case $srcdir in
-    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
-    .) reldir=$depth ;;
-    *) reldir=$depth/$srcdir ;;
-    esac
-    $ac_aux_dir/install-sh -d runtime/etc/mono/4.0
-    cd runtime/etc/mono/4.0
-    rm -f machine.config
-    $LN_S $reldir/data/net_4_0/machine.config machine.config
-    cd $depth
-],[LN_S='$LN_S'])
-
-AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config],
-[   depth=../../../..
-    case $srcdir in
-    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
-    .) reldir=$depth ;;
-    *) reldir=$depth/$srcdir ;;
-    esac
-    $ac_aux_dir/install-sh -d runtime/etc/mono/4.0
-    cd runtime/etc/mono/4.0
-    rm -f web.config
-    $LN_S $reldir/data/net_4_0/web.config web.config
-    cd $depth
-],[LN_S='$LN_S'])
-
-AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/machine.config],
-[   depth=../../../..
-    case $srcdir in
-    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
-    .) reldir=$depth ;;
-    *) reldir=$depth/$srcdir ;;
-    esac
-    $ac_aux_dir/install-sh -d runtime/etc/mono/4.5
-    cd runtime/etc/mono/4.5
-    rm -f machine.config
-    $LN_S $reldir/data/net_4_5/machine.config machine.config
-    cd $depth
-],[LN_S='$LN_S'])
-
-AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/web.config],
-[   depth=../../../..
-    case $srcdir in
-    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
-    .) reldir=$depth ;;
-    *) reldir=$depth/$srcdir ;;
-    esac
-    $ac_aux_dir/install-sh -d runtime/etc/mono/4.5
-    cd runtime/etc/mono/4.5
-    rm -f web.config
-    $LN_S $reldir/data/net_4_5/web.config web.config
-    cd $depth
-],[LN_S='$LN_S'])
-
-AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/echo "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
-
-AC_OUTPUT([
-Makefile
-mono-core.spec
-mono-uninstalled.pc
-scripts/mono-find-provides
-scripts/mono-find-requires
-mono/Makefile
-mono/utils/Makefile
-mono/metadata/Makefile
-mono/dis/Makefile
-mono/cil/Makefile
-mono/arch/Makefile
-mono/arch/x86/Makefile
-mono/arch/amd64/Makefile
-mono/arch/ppc/Makefile
-mono/arch/sparc/Makefile
-mono/arch/s390x/Makefile
-mono/arch/arm/Makefile
-mono/arch/arm64/Makefile
-mono/arch/ia64/Makefile
-mono/arch/mips/Makefile
-mono/interpreter/Makefile
-mono/tests/Makefile
-mono/tests/tests-config
-mono/tests/assemblyresolve/Makefile
-mono/tests/cas/Makefile
-mono/tests/cas/assembly/Makefile
-mono/tests/cas/demand/Makefile
-mono/tests/cas/inheritance/Makefile
-mono/tests/cas/linkdemand/Makefile
-mono/tests/cas/threads/Makefile
-mono/tests/gc-descriptors/Makefile
-mono/unit-tests/Makefile
-mono/benchmark/Makefile
-mono/monograph/Makefile
-mono/io-layer/Makefile
-mono/mini/Makefile
-mono/profiler/Makefile
-m4/Makefile
-ikvm-native/Makefile
-scripts/Makefile
-man/Makefile
-docs/Makefile
-data/Makefile
-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
-data/mono.pc
-data/mono-cairo.pc
-data/mono-nunit.pc
-data/mono-options.pc
-data/mono-lineeditor.pc
-data/monodoc.pc
-data/dotnet.pc
-data/dotnet35.pc
-data/wcf.pc
-data/cecil.pc
-data/system.web.extensions_1.0.pc
-data/system.web.extensions.design_1.0.pc
-data/system.web.mvc.pc
-data/system.web.mvc2.pc
-data/system.web.mvc3.pc
-data/aspnetwebstack.pc
-data/reactive.pc
-samples/Makefile
-support/Makefile
-data/config
-tools/Makefile
-tools/locale-builder/Makefile
-tools/sgen/Makefile
-runtime/Makefile
-msvc/Makefile
-po/Makefile
-])
-
-# Update all submodules recursively to ensure everything is checked out
-$srcdir/scripts/update_submodules
-
-if test x$host_win32 = xyes; then
-   # Get rid of 'cyg' prefixes in library names
-   sed -e "s/\/cyg\//\/\//" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
-   # libtool seems to inherit -mno-cygwin from our CFLAGS, and uses it to compile its executable
-   # wrapper scripts which use exec(). gcc has no problem compiling+linking this, but the resulting
-   # executable doesn't work...
-   sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
-fi
-
-if test x$platform_darwin = xyes; then
-   # This doesn't seem to be required and it slows down parallel builds
-   sed -e 's,lock_old_archive_extraction=yes,lock_old_archive_extraction=no,g' < libtool > libtool.new && mv libtool.new libtool && chmod +x libtool
-fi
-
-(
-  case $prefix in
-  NONE) prefix=$ac_default_prefix ;;
-  esac
-  case $exec_prefix in
-  NONE) exec_prefix='${prefix}' ;;
-  esac
-
-  #
-  # If we are cross compiling, we don't build in the mcs/ tree.  Let us not clobber
-  # any existing config.make.  This allows people to share the same source tree
-  # with different build directories, one native and one cross
-  #
-  if test x$cross_compiling = xno && test x$enable_mcs_build != xno; then
-
-    test -w $mcs_topdir/build || chmod +w $mcs_topdir/build
-
-    echo "prefix=$prefix" > $mcs_topdir/build/config.make
-    echo "exec_prefix=$exec_prefix" >> $mcs_topdir/build/config.make
-    echo "sysconfdir=$sysconfdir" >> $mcs_topdir/build/config.make
-    echo 'mono_libdir=${exec_prefix}/lib' >> $mcs_topdir/build/config.make
-    echo 'IL_FLAGS = /debug' >> $mcs_topdir/build/config.make
-    echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $mcs_topdir/build/config.make
-    echo "ILDISASM = $mono_build_root/runtime/monodis-wrapper" >> $mcs_topdir/build/config.make
-    echo "JAY_CFLAGS = $JAY_CFLAGS" >> $mcs_topdir/build/config.make
-
-    case $INSTALL in
-    [[\\/$]]* | ?:[[\\/]]* ) mcs_INSTALL=$INSTALL ;;
-    *) mcs_INSTALL=$mono_build_root/$INSTALL ;;
-    esac
-
-    echo "INSTALL = $mcs_INSTALL" >> $mcs_topdir/build/config.make
-
-    export VERSION
-    [myver=$($AWK 'BEGIN {
-      split (ENVIRON["VERSION"] ".0.0.0", vsplit, ".")
-      if(length(vsplit [1]) > 4) {
-        split (substr(ENVIRON["VERSION"], 0, 4) "." substr(ENVIRON["VERSION"], 5) ".0.0", vsplit, ".")
-      }
-      print vsplit [1] "." vsplit [2] "." vsplit [3] "." vsplit [4]
-    }')]
-
-    echo "MONO_VERSION = $myver" >> $mcs_topdir/build/config.make
-
-    if test x$platform_darwin = xyes; then
-      echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
-    fi
-
-       if test x$AOT_SUPPORTED = xyes -a x$enable_system_aot = xdefault; then
-          enable_system_aot=yes
-       fi
-
-       if test "x$enable_loadedllvm" = "xyes"; then
-          # This seems to fail on the x86 buildbots
-          enable_system_aot=no
-       fi
-
-    if test x$host_win32 = xno -a x$enable_system_aot = xyes; then
-      echo "ENABLE_AOT = 1" >> $mcs_topdir/build/config.make
-    fi
-
-    if test x$DISABLE_MCS_DOCS = xyes; then
-      echo "DISABLE_MCS_DOCS = yes" >> $mcs_topdir/build/config.make
-    fi
-
-    if test x$has_extension_module != xno; then
-        echo "EXTENSION_MODULE = 1" >> $srcdir/$mcsdir/build/config.make
-    fi
-
-       default_profile=net_2_0
-    if test -z "$INSTALL_4_0_TRUE"; then :
-               default_profile=net_4_0
-    fi
-    if test -z "$INSTALL_MONODROID_TRUE"; then :
-               default_profile=monodroid
-    fi
-    if test -z "$INSTALL_MONOTOUCH_TRUE"; then :
-               default_profile=monotouch
-    fi
-       if test -z "$INSTALL_XAMMAC_TRUE"; then :
-               default_profile=xammac
-       fi
-    if test -z "$INSTALL_4_5_TRUE"; then :
-               default_profile=net_4_5
-    fi
-    
-    echo "DEFAULT_PROFILE = $default_profile" >> $srcdir/$mcsdir/build/config.make
-    
-    if test "x$test_bcl_opt" = "xyes"; then    
-      echo "BCL_OPTIMIZE = 1" >> $srcdir/$mcsdir/build/config.make
-    fi
-
-  fi
-
-  # if we have an olive folder, override the default settings
-  if test -d $olivedir; then
-
-    if test x$cross_compiling = xno && test x$enable_olive_build != xno; then
-
-      test -w $srcdir/$olivedir/build || chmod +w $srcdir/$olivedir/build
-
-      echo "prefix=$prefix" > $srcdir/$olivedir/build/config.make
-      echo "exec_prefix=$exec_prefix" >> $srcdir/$olivedir/build/config.make
-      echo 'mono_libdir=${exec_prefix}/lib' >> $srcdir/$olivedir/build/config.make
-      echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$olivedir/build/config.make
-      echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$olivedir/build/config.make
-      echo "MONO_VERSION = $myver" >> $srcdir/$olivedir/build/config.make
-    fi
-  fi
-
-)
-
-libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
-
-echo "
-        mcs source:    $mcsdir
-
-   Engine:
-       GC:            $gc_msg 
-       TLS:           $with_tls
-       SIGALTSTACK:   $with_sigaltstack
-       Engine:        $jit_status
-       oprofile:      $OPROFILE
-       BigArrays:     $enable_big_arrays
-       DTrace:        $enable_dtrace
-       LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
-
-   Libraries:
-       .NET 2.0/3.5:  $with_profile2
-       .NET 4.0:      $with_profile4
-       .NET 4.5:      $with_profile4_5
-       MonoDroid:     $with_monodroid
-       MonoTouch:     $with_monotouch
-       Xamarin.Mac:   $with_xammac
-       JNI support:   $jdk_headers_found
-       libgdiplus:    $libgdiplus_msg
-       zlib:          $zlib_msg
-       $disabled
-"
-if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
-   AC_MSG_WARN(Turning off static Mono is a risk, you might run into unexpected bugs)
-fi
index 44fefc080276ca63a6080c5327fa6ce66034ce77..51cac3f0b4323d9ff0d2818010964d122a59fa88 100644 (file)
        <dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
        <dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
        <dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
-       <dllmap dll="MonoPosixHelper" target="libMonoPosixHelper@libsuffix@" os="!windows" />
+       <dllmap dll="MonoPosixHelper" target="@prefix@/lib/libMonoPosixHelper@libsuffix@" os="!windows" />
        <dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
        <dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
        <dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
        <dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
        <dllmap dll="libX11" target="@X11@" os="!windows" />
+       <dllmap dll="libgdk-x11-2.0" target="@GDKX11@" os="!windows"/>
+       <dllmap dll="libgtk-x11-2.0" target="@GTKX11@" os="!windows"/>
        <dllmap dll="libXinerama" target="@XINERAMA@" os="!windows" />
        <dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
        <dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
@@ -27,8 +29,8 @@
                <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@" os="!windows"/>
-       <dllmap dll="gdiplus.dll" target="@prefix@/lib/libgdiplus@libsuffix@"  os="!windows"/>
-       <dllmap dll="gdi32" target="@prefix@/lib/libgdiplus@libsuffix@" os="!windows"/>
-       <dllmap dll="gdi32.dll" target="@prefix@/lib/libgdiplus@libsuffix@" os="!windows"/>
+       <dllmap dll="gdiplus" target="@libgdiplus_install_loc@" os="!windows"/>
+       <dllmap dll="gdiplus.dll" target="@libgdiplus_install_loc@"  os="!windows"/>
+       <dllmap dll="gdi32" target="@libgdiplus_install_loc@" os="!windows"/>
+       <dllmap dll="gdi32.dll" target="@libgdiplus_install_loc@" os="!windows"/>
 </configuration>
index b7e5cd63894c695447748d7f651671cebf7c5d5b..84cc8353c99489244340626b95d1d4b4b7b45cb1 100644 (file)
@@ -1,5 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 
+AM_CFLAGS = $(WERROR_CFLAGS)
+
 if HOST_WIN32
 SUBDIRS = m4 src
 else
index 526d00c1be7822b1cfa9de6a821dd5c7ed0795e8..5216cd14a5ef88245107fe9f27c1821914e14025 100644 (file)
@@ -22,8 +22,8 @@ if test x$GCC != xyes; then
     dolt_supported=no
 fi
 case $host in
-i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
-|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
+i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
     pic_options='-fPIC'
     ;;
 ?86-pc-cygwin*|i?86-pc-cygwin*)
index fab57247699fab6cdd6910b278c7f40ee7c36c5b..1ff6c42ff28d5247e052e7e68b34c72e9a43f8eb 100644 (file)
@@ -179,7 +179,7 @@ if test "x$have_iso_varargs" = "xyes"; then
 fi
 AC_SUBST(G_HAVE_ISO_VARARGS)
 
-AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h)
+AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h)
 AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
 AC_SUBST(HAVE_ALLOCA_H)
 
@@ -235,6 +235,12 @@ AC_ARG_WITH(crosspkgdir, [  --with-crosspkgdir=/path/to/pkg-config/dir      Chan
        fi
 )
 
+AC_ARG_ENABLE(werror, [  --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no)
+if test x$werror_flag = xyes; then
+       WERROR_CFLAGS="-Werror"
+fi
+AC_SUBST([WERROR_CFLAGS])
+
 AC_SUBST(GPOINTER_TO_INT)
 AC_SUBST(GPOINTER_TO_UINT)
 AC_SUBST(GINT_TO_POINTER)
index 0d0e90354ee8adb5c48053a37c012ab0d0991393..70d519ea225ca26dfef7cb1376125b8c07552204 100644 (file)
@@ -1,5 +1,7 @@
 noinst_LTLIBRARIES = libeglib.la libeglib-static.la
 
+AM_CFLAGS = $(WERROR_CFLAGS)
+
 win_files  = \
        eglib-config.hw \
        gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
@@ -30,6 +32,7 @@ libeglib_la_SOURCES = \
        garray.c        \
        gbytearray.c    \
        gerror.c        \
+       vasprintf.h     \
        ghashtable.c    \
        giconv.c        \
        gmem.c          \
index 790c388c7ad9fb6bb0230804ecbf4f3ef90f7dc4..2ec089c9956c1053c96bd0b8ea441d2881d54800 100644 (file)
@@ -30,6 +30,8 @@
 #include <string.h>
 #include <glib.h>
 
+#include "vasprintf.h"
+
 GError *
 g_error_new (gpointer domain, gint code, const char *format, ...)
 {
index 6d6dadff448c31b9b07cf6ab691b0c4f8a6624f1..7cb8e6179c0128b02bdbc0b6d1480d01220f0f3d 100644 (file)
 
 G_BEGIN_DECLS
 
-#ifdef G_OS_WIN32
-/* MSC and Cross-compilatin will use this */
-int vasprintf (char **strp, const char *fmt, va_list ap);
-#endif
-
-
 /*
  * Basic data types
  */
@@ -727,8 +721,16 @@ GUnicodeBreakType   g_unichar_break_type (gunichar c);
 #define G_UNLIKELY(x) (x)
 #endif
 
+#if defined(_MSC_VER)
+#define  eg_unreachable() __assume(0)
+#elif defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 5)))
+#define  eg_unreachable() __builtin_unreachable()
+#else
+#define  eg_unreachable()
+#endif
+
 #define  g_assert(x)     G_STMT_START { if (G_UNLIKELY (!(x))) g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x);  } G_STMT_END
-#define  g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); } G_STMT_END
+#define  g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); eg_unreachable(); } G_STMT_END
 
 /*
  * Unicode conversion
@@ -1008,19 +1010,6 @@ glong     g_utf8_pointer_to_offset (const gchar *str, const gchar *pos);
 #define G_PRIORITY_DEFAULT 0
 #define G_PRIORITY_DEFAULT_IDLE 200
 
-/*
- * Empty thread functions, not used by eglib
- */
-#define g_thread_supported()   TRUE
-#define g_thread_init(x)       G_STMT_START { if (x != NULL) { g_error ("No vtable supported in g_thread_init"); } } G_STMT_END
-
-#define G_LOCK_DEFINE(name)        int name;
-#define G_LOCK_DEFINE_STATIC(name) static int name;
-#define G_LOCK_EXTERN(name)
-#define G_LOCK(name)
-#define G_TRYLOCK(name)
-#define G_UNLOCK(name)
-
 #define GUINT16_SWAP_LE_BE_CONSTANT(x) ((((guint16) x) >> 8) | ((((guint16) x) << 8)))
 
 #define GUINT16_SWAP_LE_BE(x) ((guint16) (((guint16) x) >> 8) | ((((guint16)(x)) & 0xff) << 8))
index aff9f460c57c6ce3e675e00640e1d0ff01c396c5..73ef1f383dea0d572bd6ee5150c98673ad93ca4f 100644 (file)
@@ -31,6 +31,8 @@
 #include <stdlib.h>
 #include <glib.h>
 
+#include "vasprintf.h"
+
 /* The current fatal levels, error is always fatal */
 static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR;
 
index 4f4e5bef5391cf94e8a601125637c70fcab13371..836e6f2aa9c6c551113692c2da65059b72e92a37 100644 (file)
 #include <unistd.h>
 #endif
 
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
index 335ccff9365ba7ae6c3e6cec0a8d7f18083bd151..3e976c5a2edfe3019a294daad9f45d355f7da250 100644 (file)
@@ -32,6 +32,8 @@
 #include <ctype.h>
 #include <glib.h>
 
+#include "vasprintf.h"
+
 /* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */
 gchar *
 g_strndup (const gchar *str, gsize n)
index 2cf5a9ba1f3ea84c2b8e90ec014146f649323c9b..6dc1950ae4e9a9b87358266497993a7a8306fdfa 100644 (file)
@@ -88,12 +88,24 @@ merge_lists (list_node *first, list_node *second, GCompareFunc func)
 static inline list_node *
 sweep_up (struct sort_info *si, list_node *list, int upto)
 {
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
+       /*
+        * GCC incorrectly thinks we're writing below si->ranks array bounds.
+        */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+
        int i;
        for (i = si->min_rank; i < upto; ++i) {
                list = merge_lists (si->ranks [i], list, si->func);
                si->ranks [i] = NULL;
        }
        return list;
+
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
+#pragma GCC diagnostic pop
+#endif
 }
 
 /*
@@ -124,6 +136,14 @@ sweep_up (struct sort_info *si, list_node *list, int upto)
 static inline void
 insert_list (struct sort_info *si, list_node* list, int rank)
 {
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
+       /*
+        * GCC incorrectly thinks we're writing below si->ranks array bounds.
+        */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+
        int i;
 
        if (rank > si->n_ranks) {
@@ -149,6 +169,10 @@ insert_list (struct sort_info *si, list_node* list, int rank)
                si->n_ranks = i + 1;
        si->min_rank = i;
        si->ranks [i] = list;
+
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
+#pragma GCC diagnostic pop
+#endif
 }
 
 #undef stringify2
diff --git a/eglib/src/vasprintf.h b/eglib/src/vasprintf.h
new file mode 100644 (file)
index 0000000..3d29454
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef __VASPRINTF_H
+#define __VASPRINTF_H
+
+#include <stdarg.h>
+#include <config.h>
+
+#ifndef HAVE_VASPRINTF
+int vasprintf(char **ret, const char *fmt, va_list ap);
+#endif
+
+#endif /* __VASPRINTF_H */
index 411c945296684b97d819f9e0affbc561dc97a01b..19276c990c6b19f2a9881e754d473a751551061c 100644 (file)
@@ -115,7 +115,7 @@ test_file ()
 
 #ifndef G_OS_WIN32 /* FIXME */
        gchar *sympath;
-       gint ignored;
+       gint ignored G_GNUC_UNUSED;
 #endif
 
        res = g_file_test (NULL, 0);
index dec858e131f66a67e6ff2b0b445144a1d49ad070..e638db1d76f341e2e7df7157292feb57ba00466b 100644 (file)
@@ -486,11 +486,15 @@ static void* JNIEnv_vtable[] =
        0  // jlong JNICALL GetDirectBufferCapacity(jobject buf);
 };
 
-JNIEXPORT void** JNICALL ikvm_GetJNIEnvVTable()
+void** ikvm_GetJNIEnvVTable(void);
+
+JNIEXPORT void** JNICALL ikvm_GetJNIEnvVTable(void)
 {
        return JNIEnv_vtable;
 }
 
+void* JNICALL ikvm_MarshalDelegate(void* p);
+
 JNIEXPORT void* JNICALL ikvm_MarshalDelegate(void* p)
 {
        return p;
@@ -498,6 +502,8 @@ JNIEXPORT void* JNICALL ikvm_MarshalDelegate(void* p)
 
 typedef jint (JNICALL *PJNI_ONLOAD)(JavaVM* vm, void* reserved);
 
+jint JNICALL ikvm_CallOnLoad(PJNI_ONLOAD method, JavaVM* vm, void* reserved);
+
 JNIEXPORT jint JNICALL ikvm_CallOnLoad(PJNI_ONLOAD method, JavaVM* vm, void* reserved)
 {
        return method(vm, reserved);
index 9f2115f712ba6c2726969e963ebe4aa246048529..43531ae0ea5b5d7666759ac7dd98d5505e4f4067 100644 (file)
        #include <sys/mman.h>
        #include "jni.h"
 
+       void* JNICALL ikvm_LoadLibrary(char* psz);
+
        JNIEXPORT void* JNICALL ikvm_LoadLibrary(char* psz)
        {
                return g_module_open(psz, 0);
        }
 
+       void JNICALL ikvm_FreeLibrary(GModule* handle);
+
        JNIEXPORT void JNICALL ikvm_FreeLibrary(GModule* handle)
        {
                g_module_close(handle);
        }
 
+       void* JNICALL ikvm_GetProcAddress(GModule* handle, char* name, jint argc);
+
        JNIEXPORT void* JNICALL ikvm_GetProcAddress(GModule* handle, char* name, jint argc)
        {
                void *symbol;
                        return NULL;
        }
 
+       void* JNICALL ikvm_mmap(int fd, jboolean writeable, jboolean copy_on_write, jlong position, jint size);
+
        JNIEXPORT void* JNICALL ikvm_mmap(int fd, jboolean writeable, jboolean copy_on_write, jlong position, jint size)
        {
                return mmap(0, size, writeable ? PROT_WRITE | PROT_READ : PROT_READ, copy_on_write ? MAP_PRIVATE : MAP_SHARED, fd, position);
        }
 
+       int JNICALL ikvm_munmap(void* address, jint size);
+
        JNIEXPORT int JNICALL ikvm_munmap(void* address, jint size)
        {
                return munmap(address, size);
        }
 
+       int JNICALL ikvm_msync(void* address, jint size);
+
        JNIEXPORT int JNICALL ikvm_msync(void* address, jint size)
        {
 #if defined(__native_client__) && defined(USE_NEWLIB)
index 49dbe4be81c6dcd2d3466b8ab07bf43b3b8417c6..a53aafcbf3e1d89d35191047891c45fafea27bff 100644 (file)
@@ -68,7 +68,7 @@ libmonogc_static_la_LDFLAGS = -static
 
 EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S
 
-AM_CFLAGS = @GC_CFLAGS@
+AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@
 
 if CPLUSPLUS
 extra_checks = test_cpp
index 1f03b511c3b298c6fc71abcdbfc3bc2d090d944e..8b4dff1fb73f4d315793d370fc99b8b9a9fa3e6f 100644 (file)
@@ -331,7 +331,7 @@ DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
 TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
        tests/leak_test.c tests/thread_leak_test.c tests/middle.c
 
-GNU_BUILD_FILES= configure.in Makefile.am configure acinclude.m4 \
+GNU_BUILD_FILES= configure.ac Makefile.am configure acinclude.m4 \
                 libtool.m4 install-sh configure.host Makefile.in \
                 aclocal.m4 config.sub config.guess \
                 include/Makefile.am include/Makefile.in \
index bf2fbf7df7ae99df3c6207fd7bddd4785018c2f6..559d3ec493225613625077655994455c6dfca6c5 100644 (file)
@@ -5,8 +5,8 @@ This is a modified version of Boehm GC 6.1 for Mono.
   - Makefile changes:
 
     libgc has a lot of configurable options which are AC_DEFINE()d in its
-    configure.in.  To make it easier to build and bundle it with Mono, I
-    replaced most of the orignal configure.in and the makefiles with custom
+    configure.ac.  To make it easier to build and bundle it with Mono, I
+    replaced most of the orignal configure.ac and the makefiles with custom
     versions which just define what we actually need for Mono.
 
     This means that you can just run configure in this directory and it'll
@@ -58,7 +58,7 @@ This is a modified version of Boehm GC 6.1 for Mono.
 
         cvs diff -u -r LIBGC
 
-  When importing new upstream versions, don't import the new configure.in or any of the
+  When importing new upstream versions, don't import the new configure.ac or any of the
   Makefile.am's; they've been replaced by custom versions.  Just import all the new source
   files and it should be fine.
 
index 526d00c1be7822b1cfa9de6a821dd5c7ed0795e8..5216cd14a5ef88245107fe9f27c1821914e14025 100644 (file)
@@ -22,8 +22,8 @@ if test x$GCC != xyes; then
     dolt_supported=no
 fi
 case $host in
-i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
-|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
+i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
     pic_options='-fPIC'
     ;;
 ?86-pc-cygwin*|i?86-pc-cygwin*)
index 376c387885677ce108f2841a1faa8061a235fa29..10ae8cf6831ad2b6fe0977605ab8e6113ff3045e 100755 (executable)
@@ -22,7 +22,7 @@ if [ -z "$LIBTOOL" ]; then
   fi
 fi
 
-(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
+(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
   ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
     echo
     echo "**Error**: You must have \`libtool' installed to compile Mono."
@@ -32,8 +32,8 @@ fi
   }
 }
 
-grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
-  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
+  grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
   (gettext --version) < /dev/null > /dev/null 2>&1 || {
     echo
     echo "**Error**: You must have \`gettext' installed to compile Mono."
@@ -80,7 +80,7 @@ xlc )
 esac
 
 
-if grep "^AC_PROG_LIBTOOL" configure.in >/dev/null; then
+if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
   if test -z "$NO_LIBTOOLIZE" ; then 
     echo "Running libtoolize..."
     ${LIBTOOL}ize --force --copy
@@ -99,7 +99,7 @@ aclocal $ACLOCAL_FLAGS || {
   exit 1
 }
 
-if grep "^AC_CONFIG_HEADERS" configure.in >/dev/null; then
+if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
   echo "Running autoheader..."
   autoheader || { echo "**Error**: autoheader failed."; exit 1; }
 fi
diff --git a/libgc/configure.ac b/libgc/configure.ac
new file mode 100644 (file)
index 0000000..ac992ab
--- /dev/null
@@ -0,0 +1,567 @@
+# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
+# 
+# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+# OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+# 
+# Permission is hereby granted to use or copy this program
+# for any purpose,  provided the above notices are retained on all copies.
+# Permission to modify the code and to distribute modified code is granted,
+# provided the above notices are retained, and a notice that the code was
+# modified is included with the above copyright notice.
+#
+# Original author: Tom Tromey
+# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
+
+dnl Process this file with autoconf to produce configure.
+
+AC_PREREQ([2.53])
+AC_INIT([libgc-mono], [6.6], [Hans_Boehm@hp.com])
+
+AM_INIT_AUTOMAKE([1.9 no-define foreign])
+AC_CONFIG_SRCDIR(gcj_mlc.c)
+AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_HOST
+
+AC_SUBST(PACKAGE)
+AC_SUBST(GC_VERSION)
+
+AC_PROG_CC
+AC_PROG_CXX
+
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+dnl automake 1.6 and later need the AM_PROG_AS macro.
+ifdef([AM_PROG_AS],[AM_PROG_AS],[])
+AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, :)  # :)
+
+AC_PROG_INSTALL
+
+AM_MAINTAINER_MODE
+
+. [$]{srcdir}/configure.host
+
+# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono 
+# configure, because of autoconf brokeness
+if test "x$CPPFLAGS_FOR_LIBGC" != "x"; then
+   CPPFLAGS=$CPPFLAGS_FOR_LIBGC
+fi
+if test "x$CFLAGS_FOR_LIBGC" != "x"; then
+   CFLAGS=$CFLAGS_FOR_LIBGC
+fi
+
+GC_CFLAGS=${gc_cflags}
+AC_SUBST(GC_CFLAGS)
+
+case $enable_embed_check in
+no) ;;
+*) AC_MSG_ERROR([This module is now part of 'mono' and cannot be built as a stand-alone module any longer.]) ;;
+esac
+
+THREADS=$with_libgc_threads
+
+AC_ARG_ENABLE(win32-dllmain,
+[  --enable-win32-dllmain    Define the DllMain function in win32_threads.c even if the collector is not built as a dll],
+)
+
+AC_ARG_ENABLE(parallel-mark,
+[  --enable-parallel-mark      parallelize marking and free list construction],
+   [case "$THREADS" in
+      no | none | single)
+       AC_MSG_ERROR([Parallel mark requires --enable-threads=x spec])
+       ;;
+    esac]
+)
+
+AC_ARG_ENABLE(cplusplus,
+[  --enable-cplusplus          install C++ support],
+)
+
+AM_CPPFLAGS=-I${srcdir}/include
+THREADDLLIBS=
+## Libraries needed to support dynamic loading and/or threads.
+case "$THREADS" in
+ no | none | single)
+    THREADS=none
+    ;;
+ posix | pthreads)
+    THREADS=posix
+    AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,)
+    case "$host" in
+     x86-*-linux* | ia64-*-linux* | i386-*-linux* | i486-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha*-*-linux* | s390*-*-linux* | sparc*-*-linux* | powerpc-*-linux*)
+       AC_DEFINE(GC_LINUX_THREADS)
+       AC_DEFINE(_REENTRANT)
+        if test "${enable_parallel_mark}" = yes; then
+         AC_DEFINE(PARALLEL_MARK)
+       fi
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       ;;
+     *-*-linux* | *-*-nacl*)
+       AC_DEFINE(GC_LINUX_THREADS)
+       AC_DEFINE(_REENTRANT)
+       ;;
+     *-*-aix*)
+       AC_DEFINE(GC_AIX_THREADS)
+       AC_DEFINE(_REENTRANT)
+       ;;
+     *-*-hpux*)
+       AC_MSG_WARN("Only HP/UX 11 threads are supported.")
+       AC_DEFINE(GC_HPUX_THREADS)
+       AC_DEFINE(_POSIX_C_SOURCE,199506L)
+       if test "${enable_parallel_mark}" = yes; then
+         AC_DEFINE(PARALLEL_MARK)
+       fi
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       THREADDLLIBS="-lpthread -lrt"
+       ;;
+     *-*-kfreebsd*-gnu)
+       AC_DEFINE(GC_FREEBSD_THREADS)
+       INCLUDES="$INCLUDES -pthread"
+       THREADDLLIBS=-pthread
+       AC_DEFINE(_REENTRANT)
+       if test "${enable_parallel_mark}" = yes; then
+               AC_DEFINE(PARALLEL_MARK)
+       fi
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       AC_DEFINE(USE_COMPILER_TLS)
+       ;;
+      *-*-freebsd*)
+       AC_DEFINE(GC_FREEBSD_THREADS)
+       if test "x$PTHREAD_CFLAGS" != "x"; then
+               AM_CPPFLAGS="$AM_CPPFLAGS $PTHREAD_CFLAGS"
+       fi
+       if test "x$PTHREAD_LIBS" = "x"; then
+               THREADDLLIBS=-pthread
+       else
+               THREADDLLIBS="$PTHREAD_LIBS"
+       fi
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       ;;
+     *-*-solaris*)
+       AC_DEFINE(GC_SOLARIS_THREADS)
+       AC_DEFINE(GC_SOLARIS_PTHREADS)
+       ;;
+     *-*-irix*)
+       AC_DEFINE(GC_IRIX_THREADS)
+       ;;
+     *-*-cygwin*)
+       AC_DEFINE(GC_WIN32_THREADS)
+       ;;
+     *-*-darwin*)
+       AC_DEFINE(GC_DARWIN_THREADS)
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       if test "${enable_parallel_mark}" = yes; then
+         AC_DEFINE(PARALLEL_MARK)
+       fi
+       ;;
+     *-*-netbsd*)
+       AC_DEFINE(GC_NETBSD_THREADS)
+       if test "${enable_parallel_mark}" = yes; then
+         AC_DEFINE(PARALLEL_MARK)
+       fi
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       ;;
+     *-*-openbsd*)
+       AC_DEFINE(GC_OPENBSD_THREADS)
+       if test "${enable_parallel_mark}" = yes; then
+         AC_DEFINE(PARALLEL_MARK)
+       fi
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       ;;
+     *-*-osf*)
+       AC_DEFINE(GC_OSF1_THREADS)
+        if test "${enable_parallel_mark}" = yes; then
+         AC_DEFINE(PARALLEL_MARK)
+         AC_DEFINE(THREAD_LOCAL_ALLOC)
+         # May want to enable it in other cases, too.
+         # Measurements havent yet been done.
+       fi
+       AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
+       THREADDLLIBS="-lpthread -lrt"
+       ;;
+      *)
+       AC_MSG_ERROR("Pthreads not supported by the GC on this platform.")
+       ;;
+    esac
+    ;;
+ win32)
+    AC_DEFINE(GC_WIN32_THREADS)
+    dnl Wine getenv may not return NULL for missing entry
+    AC_DEFINE(NO_GETENV)
+       if test "${enable_win32_dllmain}" = yes; then
+          AC_DEFINE(GC_INSIDE_DLL)
+       fi
+    ;;
+ dgux386)
+    THREADS=dgux386
+    AC_MSG_RESULT($THREADDLLIBS)
+    # Use pthread GCC  switch
+    THREADDLLIBS=-pthread
+    if test "${enable_parallel_mark}" = yes; then
+        AC_DEFINE(PARALLEL_MARK)
+    fi
+    AC_DEFINE(THREAD_LOCAL_ALLOC)
+    AC_DEFINE(GC_DGUX386_THREADS)
+    AC_DEFINE(DGUX_THREADS)
+    # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
+    AM_CPPFLAGS="-pthread $AM_CPPFLAGS"
+    ;;
+ aix)
+    THREADS=posix
+    THREADDLLIBS=-lpthread
+    AC_DEFINE(GC_AIX_THREADS)
+    AC_DEFINE(_REENTRANT)
+    ;;
+ decosf1 | irix | mach | os2 | solaris | dce | vxworks)
+    AC_MSG_ERROR(thread package $THREADS not yet supported)
+    ;;
+ *)
+    AC_MSG_ERROR($THREADS is an unknown thread package)
+    ;;
+esac
+AC_SUBST(THREADDLLIBS)
+
+case "$host" in 
+   powerpc-*-darwin*)
+      powerpc_darwin=true
+      ;;
+esac
+AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
+
+# Check if the GCC builtin __sync_bool_compare_and_swap is available.
+# It is preferred in gc_locks.h for PPC as GCC 4.4 has a problem with the inline assembly there.
+AC_MSG_CHECKING(for __sync_bool_compare_and_swap)
+AC_TRY_COMPILE([],[
+volatile unsigned int foo = 0;
+int main(int argc, char** argv) {
+    unsigned int r1 = __sync_bool_compare_and_swap(&foo, 0, 1);
+    return 0;
+}
+], [
+AC_MSG_RESULT(yes)
+AC_DEFINE(HAS___SYNC_BOOL_COMPARE_AND_SWAP)
+], [
+AC_MSG_RESULT(no)
+])
+
+AC_MSG_CHECKING(for xlc)
+AC_TRY_COMPILE([],[
+ #ifndef __xlC__
+ # error
+ #endif
+], [compiler_xlc=yes], [compiler_xlc=no])
+AC_MSG_RESULT($compiler_xlc)
+AM_CONDITIONAL(COMPILER_XLC,test $compiler_xlc = yes)
+if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
+  # the darwin stack-frame-walking code is completely broken on xlc
+  AC_DEFINE(DARWIN_DONT_PARSE_STACK)
+fi
+
+# We never want libdl on darwin. It is a fake libdl that just ends up making
+# dyld calls anyway
+case "$host" in
+  *-*-darwin*) ;;
+  *) 
+    AC_CHECK_LIB(dl, dlopen, THREADDLLIBS="$THREADDLLIBS -ldl")
+    ;;
+esac
+
+AC_SUBST(EXTRA_TEST_LIBS)
+
+target_all=libgc.la
+AC_SUBST(target_all)
+
+dnl If the target is an eCos system, use the appropriate eCos
+dnl I/O routines.
+dnl FIXME: this should not be a local option but a global target
+dnl system; at present there is no eCos target.
+TARGET_ECOS="no"
+AC_ARG_WITH(ecos,
+[  --with-ecos             enable runtime eCos target support],
+TARGET_ECOS="$with_ecos"
+)
+
+addobjs=
+addlibs=
+addincludes=
+addtests=
+CXXAM_CPPFLAGS=
+case "$TARGET_ECOS" in
+   no)
+      ;;
+   *)
+      AC_DEFINE(ECOS)
+      CXXINCLUDES="-I${TARGET_ECOS}/include"
+      addobjs="$addobjs ecos.lo"
+      ;;
+esac
+
+if test "${enable_cplusplus}" = yes; then
+      addincludes="$addincludes include/gc_cpp.h include/gc_allocator.h"
+      addtests="$addtests test_cpp"
+fi
+
+AM_CONDITIONAL(CPLUSPLUS, test "${enable_cplusplus}" = yes)
+
+AC_SUBST(CXX)
+
+AC_SUBST(AM_CPPFLAGS)
+AC_SUBST(CXXINCLUDES)
+
+# Configuration of shared libraries
+#
+AC_MSG_CHECKING(whether to build shared libraries)
+AC_ENABLE_SHARED
+
+case "$host" in
+ alpha-*-openbsd*)
+     enable_shared=no
+     AC_MSG_RESULT(no)
+     ;;
+ *)
+     AC_MSG_RESULT(yes)
+     ;;
+esac
+
+# Configuration of machine-dependent code
+#
+AC_MSG_CHECKING(which machine-dependent code should be used) 
+machdep=
+case "$host" in
+ alpha-*-openbsd*)
+    machdep="alpha_mach_dep.lo"
+    if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
+       AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
+    fi
+    ;;
+ alpha*-*-linux*)
+    machdep="alpha_mach_dep.lo"
+    ;;
+ i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?)
+    AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
+    ;;
+ mipstx39-*-elf*)
+    machdep="mips_ultrix_mach_dep.lo"
+    AC_DEFINE(STACKBASE, __stackbase)
+    AC_DEFINE(DATASTART_IS_ETEXT)
+    ;;
+ mips-dec-ultrix*)
+    machdep="mips_ultrix_mach-dep.lo"
+    ;;
+ mips-nec-sysv*|mips-unknown-sysv*)
+    ;;
+ mips*-*-linux*) 
+    ;; 
+ mips-*-*)
+    machdep="mips_sgi_mach_dep.lo"
+    AC_DEFINE(NO_EXECUTE_PERMISSION)
+    ;;
+ sparc-*-netbsd*)
+    machdep="sparc_netbsd_mach_dep.lo"
+    ;;
+ sparc-sun-solaris2.3)
+    machdep="sparc_mach_dep.lo"
+    AC_DEFINE(SUNOS53_SHARED_LIB)
+    ;;
+ sparc*-sun-solaris2.*)
+    machdep="sparc_mach_dep.lo"
+    ;;
+ ia64-*-*)
+     machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
+       target_ia64=true
+    ;;
+ *-*-nacl*)
+    AC_DEFINE(NO_EXECUTE_PERMISSION)
+    ;;
+esac
+if test x"$machdep" = x; then
+AC_MSG_RESULT($machdep)
+   machdep="mach_dep.lo"
+fi
+addobjs="$addobjs $machdep"
+#
+# Adding object files directly to _LIBADD breaks -j builds, so we need to add the sources
+# instead, but _SOURCES can't contain autoconf substitutions, so add them using automake
+# conditionals.
+#
+#AC_SUBST(addobjs)
+AC_SUBST(addincludes)
+AC_SUBST(addlibs)
+AC_SUBST(addtests)
+
+AM_CONDITIONAL(TARGET_IA64,test x$target_ia64 = xtrue)
+
+AC_PROG_LIBTOOL
+# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
+DOLT
+
+#
+# Check for AViiON Machines running DGUX
+#
+ac_is_dgux=no
+AC_CHECK_HEADER(sys/dg_sys_info.h,
+[ac_is_dgux=yes;])
+
+    ## :GOTCHA: we do not check anything but sys/dg_sys_info.h
+if test $ac_is_dgux = yes; then
+    if test "$enable_full_debug" = "yes"; then
+      CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
+      CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
+    else
+      CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
+      CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
+    fi
+    AC_SUBST(CFLAGS)
+    AC_SUBST(CXXFLAGS)
+fi
+
+dnl We use these options to decide which functions to include.
+AC_ARG_WITH(target-subdir,
+[  --with-target-subdir=SUBDIR
+                          configuring with a cross compiler])
+AC_ARG_WITH(cross-host,
+[  --with-cross-host=HOST  configuring with a cross compiler])
+
+# automake wants to see AC_EXEEXT.  But we don't need it.  And having
+# it is actually a problem, because the compiler we're passed can't
+# necessarily do a full link.  So we fool automake here.
+if false; then
+  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
+  # to nothing, so nothing would remain between `then' and `fi' if it
+  # were not for the `:' below.
+  :
+  AC_EXEEXT
+fi
+
+AC_MSG_CHECKING([for threads package to use])
+AC_MSG_RESULT($THREADS)
+
+dnl As of 4.13a2, the collector will not properly work on Solaris when
+dnl built with gcc and -O.  So we remove -O in the appropriate case.
+dnl Not needed anymore on Solaris.
+AC_MSG_CHECKING(whether Solaris gcc optimization fix is necessary)
+case "$host" in
+ *aix*)
+    if test "$GCC" = yes; then
+       AC_MSG_RESULT(yes)
+       new_CFLAGS=
+       for i in $CFLAGS; do
+         case "$i" in
+          -O*)
+             ;;
+          *)
+             new_CFLAGS="$new_CFLAGS $i"
+             ;;
+         esac
+       done
+       CFLAGS="$new_CFLAGS"
+    else
+       AC_MSG_RESULT(no)
+    fi
+    ;;
+ *) AC_MSG_RESULT(no) ;;
+esac
+
+dnl We need to override the top-level CFLAGS.  This is how we do it.
+MY_CFLAGS="$CFLAGS"
+AC_SUBST(MY_CFLAGS)
+
+dnl Include defines that have become de facto standard.
+dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
+AC_DEFINE(SILENT)
+AC_DEFINE(NO_SIGNALS)
+AC_DEFINE(NO_EXECUTE_PERMISSION)
+dnl AC_DEFINE(ALL_INTERIOR_POINTERS)
+
+dnl By default, make the library as general as possible.
+AC_DEFINE(JAVA_FINALIZATION)
+AC_DEFINE(GC_GCJ_SUPPORT)
+AC_DEFINE(ATOMIC_UNCOLLECTABLE)
+
+dnl This is something of a hack.  When cross-compiling we turn off
+dnl some functionality.  We also enable the "small" configuration.
+dnl These is only correct when targetting an embedded system.  FIXME.
+if test -n "${with_cross_host}"; then
+   AC_DEFINE(NO_SIGSET)
+   AC_DEFINE(NO_CLOCK)
+   AC_DEFINE(SMALL_CONFIG)
+   AC_DEFINE(NO_DEBUGGING)
+fi
+
+UNWINDLIBS=
+AC_ARG_ENABLE(full-debug,
+[  --enable-full-debug include full support for pointer backtracing etc.],
+[ if test "$enable_full_debug" = "yes"; then
+    AC_MSG_WARN("Should define GC_DEBUG and use debug alloc. in clients.")
+    AC_DEFINE(KEEP_BACK_PTRS)
+    AC_DEFINE(DBG_HDRS_ALL)
+    case $host in
+      ia64-*-linux* )
+       AC_DEFINE(MAKE_BACK_GRAPH)
+       AC_DEFINE(SAVE_CALL_COUNT, 8)
+        AC_CHECK_LIB(unwind, backtrace, [
+         AC_DEFINE(GC_HAVE_BUILTIN_BACKTRACE)
+         UNWINDLIBS=-lunwind
+         AC_MSG_WARN("Client code may need to link against libunwind.")
+       ])
+      ;;
+      x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
+       AC_DEFINE(MAKE_BACK_GRAPH)
+       AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
+       AC_DEFINE(SAVE_CALL_COUNT, 8)
+      ;;
+      i[3456]86-*-dgux*)
+       AC_DEFINE(MAKE_BACK_GRAPH)
+      ;;
+    esac ]
+  fi)
+
+AC_SUBST(UNWINDLIBS)
+
+AC_ARG_ENABLE(redirect-malloc,
+[  --enable-redirect-malloc  redirect malloc and friends to GC routines])
+
+if test "${enable_redirect_malloc}" = yes; then
+    if test "${enable_full_debug}" = yes; then
+       AC_DEFINE(REDIRECT_MALLOC, GC_debug_malloc_replacement)
+       AC_DEFINE(REDIRECT_REALLOC, GC_debug_realloc_replacement)
+       AC_DEFINE(REDIRECT_FREE, GC_debug_free)
+    else
+       AC_DEFINE(REDIRECT_MALLOC, GC_malloc)
+    fi
+fi
+
+AC_DEFINE(_IN_LIBGC)
+
+AC_ARG_ENABLE(gc-assertions,
+[  --enable-gc-assertions  collector-internal assertion checking])
+if test "${enable_gc_assertions}" = yes; then
+    AC_DEFINE(GC_ASSERTIONS)
+fi
+
+AC_ARG_ENABLE(quiet-build, [  --enable-quiet-build  Enable quiet libgc build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes)
+AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
+
+AC_ARG_ENABLE(werror, [  --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no)
+if test x$werror_flag = xyes; then
+       WERROR_CFLAGS="-Werror"
+fi
+AC_SUBST([WERROR_CFLAGS])
+
+if test "${multilib}" = "yes"; then
+  multilib_arg="--enable-multilib"
+else
+  multilib_arg=
+fi
+
+AC_OUTPUT(Makefile
+m4/Makefile
+include/Makefile
+include/private/Makefile
+doc/Makefile,,
+srcdir=${srcdir}
+host=${host}
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="${CC}"
+DEFS="$DEFS"
+)
diff --git a/libgc/configure.in b/libgc/configure.in
deleted file mode 100644 (file)
index 837e2cb..0000000
+++ /dev/null
@@ -1,550 +0,0 @@
-# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
-# 
-# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-# OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-# 
-# Permission is hereby granted to use or copy this program
-# for any purpose,  provided the above notices are retained on all copies.
-# Permission to modify the code and to distribute modified code is granted,
-# provided the above notices are retained, and a notice that the code was
-# modified is included with the above copyright notice.
-#
-# Original author: Tom Tromey
-# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
-
-dnl Process this file with autoconf to produce configure.
-
-AC_PREREQ([2.53])
-AC_INIT([libgc-mono], [6.6], [Hans_Boehm@hp.com])
-
-AM_INIT_AUTOMAKE([1.9 no-define foreign])
-AC_CONFIG_SRCDIR(gcj_mlc.c)
-AC_CONFIG_MACRO_DIR([m4])
-AC_CANONICAL_HOST
-
-AC_SUBST(PACKAGE)
-AC_SUBST(GC_VERSION)
-
-AC_PROG_CC
-AC_PROG_CXX
-
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-dnl automake 1.6 and later need the AM_PROG_AS macro.
-ifdef([AM_PROG_AS],[AM_PROG_AS],[])
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)  # :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-. [$]{srcdir}/configure.host
-
-# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono 
-# configure, because of autoconf brokeness
-if test "x$CPPFLAGS_FOR_LIBGC" != "x"; then
-   CPPFLAGS=$CPPFLAGS_FOR_LIBGC
-fi
-if test "x$CFLAGS_FOR_LIBGC" != "x"; then
-   CFLAGS=$CFLAGS_FOR_LIBGC
-fi
-
-GC_CFLAGS=${gc_cflags}
-AC_SUBST(GC_CFLAGS)
-
-case $enable_embed_check in
-no) ;;
-*) AC_MSG_ERROR([This module is now part of 'mono' and cannot be built as a stand-alone module any longer.]) ;;
-esac
-
-THREADS=$with_libgc_threads
-
-AC_ARG_ENABLE(win32-dllmain,
-[  --enable-win32-dllmain    Define the DllMain function in win32_threads.c even if the collector is not built as a dll],
-)
-
-AC_ARG_ENABLE(parallel-mark,
-[  --enable-parallel-mark      parallelize marking and free list construction],
-   [case "$THREADS" in
-      no | none | single)
-       AC_MSG_ERROR([Parallel mark requires --enable-threads=x spec])
-       ;;
-    esac]
-)
-
-AC_ARG_ENABLE(cplusplus,
-[  --enable-cplusplus          install C++ support],
-)
-
-AM_CPPFLAGS=-I${srcdir}/include
-THREADDLLIBS=
-## Libraries needed to support dynamic loading and/or threads.
-case "$THREADS" in
- no | none | single)
-    THREADS=none
-    ;;
- posix | pthreads)
-    THREADS=posix
-    AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,)
-    case "$host" in
-     x86-*-linux* | ia64-*-linux* | i386-*-linux* | i486-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha*-*-linux* | s390*-*-linux* | sparc*-*-linux* | powerpc-*-linux*)
-       AC_DEFINE(GC_LINUX_THREADS)
-       AC_DEFINE(_REENTRANT)
-        if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
-       fi
-       AC_DEFINE(THREAD_LOCAL_ALLOC)
-       ;;
-     *-*-linux* | *-*-nacl*)
-       AC_DEFINE(GC_LINUX_THREADS)
-       AC_DEFINE(_REENTRANT)
-       ;;
-     *-*-aix*)
-       AC_DEFINE(GC_AIX_THREADS)
-       AC_DEFINE(_REENTRANT)
-       ;;
-     *-*-hpux*)
-       AC_MSG_WARN("Only HP/UX 11 threads are supported.")
-       AC_DEFINE(GC_HPUX_THREADS)
-       AC_DEFINE(_POSIX_C_SOURCE,199506L)
-       if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
-       fi
-       AC_DEFINE(THREAD_LOCAL_ALLOC)
-       THREADDLLIBS="-lpthread -lrt"
-       ;;
-      *-*-freebsd*)
-       AC_DEFINE(GC_FREEBSD_THREADS)
-       if test "x$PTHREAD_CFLAGS" != "x"; then
-               AM_CPPFLAGS="$AM_CPPFLAGS $PTHREAD_CFLAGS"
-       fi
-       if test "x$PTHREAD_LIBS" = "x"; then
-               THREADDLLIBS=-pthread
-       else
-               THREADDLLIBS="$PTHREAD_LIBS"
-       fi
-       AC_DEFINE(THREAD_LOCAL_ALLOC)
-       ;;
-     *-*-solaris*)
-       AC_DEFINE(GC_SOLARIS_THREADS)
-       AC_DEFINE(GC_SOLARIS_PTHREADS)
-       ;;
-     *-*-irix*)
-       AC_DEFINE(GC_IRIX_THREADS)
-       ;;
-     *-*-cygwin*)
-       AC_DEFINE(GC_WIN32_THREADS)
-       ;;
-     *-*-darwin*)
-       AC_DEFINE(GC_DARWIN_THREADS)
-       AC_DEFINE(THREAD_LOCAL_ALLOC)
-       if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
-       fi
-       ;;
-     *-*-netbsd*)
-       AC_DEFINE(GC_NETBSD_THREADS)
-       if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
-       fi
-       AC_DEFINE(THREAD_LOCAL_ALLOC)
-       ;;
-     *-*-openbsd*)
-       AC_DEFINE(GC_OPENBSD_THREADS)
-       if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
-       fi
-       AC_DEFINE(THREAD_LOCAL_ALLOC)
-       ;;
-     *-*-osf*)
-       AC_DEFINE(GC_OSF1_THREADS)
-        if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
-         AC_DEFINE(THREAD_LOCAL_ALLOC)
-         # May want to enable it in other cases, too.
-         # Measurements havent yet been done.
-       fi
-       AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
-       THREADDLLIBS="-lpthread -lrt"
-       ;;
-      *)
-       AC_MSG_ERROR("Pthreads not supported by the GC on this platform.")
-       ;;
-    esac
-    ;;
- win32)
-    AC_DEFINE(GC_WIN32_THREADS)
-    dnl Wine getenv may not return NULL for missing entry
-    AC_DEFINE(NO_GETENV)
-       if test "${enable_win32_dllmain}" = yes; then
-          AC_DEFINE(GC_INSIDE_DLL)
-       fi
-    ;;
- dgux386)
-    THREADS=dgux386
-    AC_MSG_RESULT($THREADDLLIBS)
-    # Use pthread GCC  switch
-    THREADDLLIBS=-pthread
-    if test "${enable_parallel_mark}" = yes; then
-        AC_DEFINE(PARALLEL_MARK)
-    fi
-    AC_DEFINE(THREAD_LOCAL_ALLOC)
-    AC_DEFINE(GC_DGUX386_THREADS)
-    AC_DEFINE(DGUX_THREADS)
-    # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
-    AM_CPPFLAGS="-pthread $AM_CPPFLAGS"
-    ;;
- aix)
-    THREADS=posix
-    THREADDLLIBS=-lpthread
-    AC_DEFINE(GC_AIX_THREADS)
-    AC_DEFINE(_REENTRANT)
-    ;;
- decosf1 | irix | mach | os2 | solaris | dce | vxworks)
-    AC_MSG_ERROR(thread package $THREADS not yet supported)
-    ;;
- *)
-    AC_MSG_ERROR($THREADS is an unknown thread package)
-    ;;
-esac
-AC_SUBST(THREADDLLIBS)
-
-case "$host" in 
-   powerpc-*-darwin*)
-      powerpc_darwin=true
-      ;;
-esac
-AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
-
-# Check if the GCC builtin __sync_bool_compare_and_swap is available.
-# It is preferred in gc_locks.h for PPC as GCC 4.4 has a problem with the inline assembly there.
-AC_MSG_CHECKING(for __sync_bool_compare_and_swap)
-AC_TRY_COMPILE([],[
-volatile unsigned int foo = 0;
-int main(int argc, char** argv) {
-    unsigned int r1 = __sync_bool_compare_and_swap(&foo, 0, 1);
-    return 0;
-}
-], [
-AC_MSG_RESULT(yes)
-AC_DEFINE(HAS___SYNC_BOOL_COMPARE_AND_SWAP)
-], [
-AC_MSG_RESULT(no)
-])
-
-AC_MSG_CHECKING(for xlc)
-AC_TRY_COMPILE([],[
- #ifndef __xlC__
- # error
- #endif
-], [compiler_xlc=yes], [compiler_xlc=no])
-AC_MSG_RESULT($compiler_xlc)
-AM_CONDITIONAL(COMPILER_XLC,test $compiler_xlc = yes)
-if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
-  # the darwin stack-frame-walking code is completely broken on xlc
-  AC_DEFINE(DARWIN_DONT_PARSE_STACK)
-fi
-
-# We never want libdl on darwin. It is a fake libdl that just ends up making
-# dyld calls anyway
-case "$host" in
-  *-*-darwin*) ;;
-  *) 
-    AC_CHECK_LIB(dl, dlopen, THREADDLLIBS="$THREADDLLIBS -ldl")
-    ;;
-esac
-
-AC_SUBST(EXTRA_TEST_LIBS)
-
-target_all=libgc.la
-AC_SUBST(target_all)
-
-dnl If the target is an eCos system, use the appropriate eCos
-dnl I/O routines.
-dnl FIXME: this should not be a local option but a global target
-dnl system; at present there is no eCos target.
-TARGET_ECOS="no"
-AC_ARG_WITH(ecos,
-[  --with-ecos             enable runtime eCos target support],
-TARGET_ECOS="$with_ecos"
-)
-
-addobjs=
-addlibs=
-addincludes=
-addtests=
-CXXAM_CPPFLAGS=
-case "$TARGET_ECOS" in
-   no)
-      ;;
-   *)
-      AC_DEFINE(ECOS)
-      CXXINCLUDES="-I${TARGET_ECOS}/include"
-      addobjs="$addobjs ecos.lo"
-      ;;
-esac
-
-if test "${enable_cplusplus}" = yes; then
-      addincludes="$addincludes include/gc_cpp.h include/gc_allocator.h"
-      addtests="$addtests test_cpp"
-fi
-
-AM_CONDITIONAL(CPLUSPLUS, test "${enable_cplusplus}" = yes)
-
-AC_SUBST(CXX)
-
-AC_SUBST(AM_CPPFLAGS)
-AC_SUBST(CXXINCLUDES)
-
-# Configuration of shared libraries
-#
-AC_MSG_CHECKING(whether to build shared libraries)
-AC_ENABLE_SHARED
-
-case "$host" in
- alpha-*-openbsd*)
-     enable_shared=no
-     AC_MSG_RESULT(no)
-     ;;
- *)
-     AC_MSG_RESULT(yes)
-     ;;
-esac
-
-# Configuration of machine-dependent code
-#
-AC_MSG_CHECKING(which machine-dependent code should be used) 
-machdep=
-case "$host" in
- alpha-*-openbsd*)
-    machdep="alpha_mach_dep.lo"
-    if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
-       AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
-    fi
-    ;;
- alpha*-*-linux*)
-    machdep="alpha_mach_dep.lo"
-    ;;
- i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?)
-    AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
-    ;;
- mipstx39-*-elf*)
-    machdep="mips_ultrix_mach_dep.lo"
-    AC_DEFINE(STACKBASE, __stackbase)
-    AC_DEFINE(DATASTART_IS_ETEXT)
-    ;;
- mips-dec-ultrix*)
-    machdep="mips_ultrix_mach-dep.lo"
-    ;;
- mips-nec-sysv*|mips-unknown-sysv*)
-    ;;
- mips*-*-linux*) 
-    ;; 
- mips-*-*)
-    machdep="mips_sgi_mach_dep.lo"
-    AC_DEFINE(NO_EXECUTE_PERMISSION)
-    ;;
- sparc-*-netbsd*)
-    machdep="sparc_netbsd_mach_dep.lo"
-    ;;
- sparc-sun-solaris2.3)
-    machdep="sparc_mach_dep.lo"
-    AC_DEFINE(SUNOS53_SHARED_LIB)
-    ;;
- sparc*-sun-solaris2.*)
-    machdep="sparc_mach_dep.lo"
-    ;;
- ia64-*-*)
-     machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
-       target_ia64=true
-    ;;
- *-*-nacl*)
-    AC_DEFINE(NO_EXECUTE_PERMISSION)
-    ;;
-esac
-if test x"$machdep" = x; then
-AC_MSG_RESULT($machdep)
-   machdep="mach_dep.lo"
-fi
-addobjs="$addobjs $machdep"
-#
-# Adding object files directly to _LIBADD breaks -j builds, so we need to add the sources
-# instead, but _SOURCES can't contain autoconf substitutions, so add them using automake
-# conditionals.
-#
-#AC_SUBST(addobjs)
-AC_SUBST(addincludes)
-AC_SUBST(addlibs)
-AC_SUBST(addtests)
-
-AM_CONDITIONAL(TARGET_IA64,test x$target_ia64 = xtrue)
-
-AC_PROG_LIBTOOL
-# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
-DOLT
-
-#
-# Check for AViiON Machines running DGUX
-#
-ac_is_dgux=no
-AC_CHECK_HEADER(sys/dg_sys_info.h,
-[ac_is_dgux=yes;])
-
-    ## :GOTCHA: we do not check anything but sys/dg_sys_info.h
-if test $ac_is_dgux = yes; then
-    if test "$enable_full_debug" = "yes"; then
-      CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
-      CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
-    else
-      CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
-      CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
-    fi
-    AC_SUBST(CFLAGS)
-    AC_SUBST(CXXFLAGS)
-fi
-
-dnl We use these options to decide which functions to include.
-AC_ARG_WITH(target-subdir,
-[  --with-target-subdir=SUBDIR
-                          configuring with a cross compiler])
-AC_ARG_WITH(cross-host,
-[  --with-cross-host=HOST  configuring with a cross compiler])
-
-# automake wants to see AC_EXEEXT.  But we don't need it.  And having
-# it is actually a problem, because the compiler we're passed can't
-# necessarily do a full link.  So we fool automake here.
-if false; then
-  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
-  # to nothing, so nothing would remain between `then' and `fi' if it
-  # were not for the `:' below.
-  :
-  AC_EXEEXT
-fi
-
-AC_MSG_CHECKING([for threads package to use])
-AC_MSG_RESULT($THREADS)
-
-dnl As of 4.13a2, the collector will not properly work on Solaris when
-dnl built with gcc and -O.  So we remove -O in the appropriate case.
-dnl Not needed anymore on Solaris.
-AC_MSG_CHECKING(whether Solaris gcc optimization fix is necessary)
-case "$host" in
- *aix*)
-    if test "$GCC" = yes; then
-       AC_MSG_RESULT(yes)
-       new_CFLAGS=
-       for i in $CFLAGS; do
-         case "$i" in
-          -O*)
-             ;;
-          *)
-             new_CFLAGS="$new_CFLAGS $i"
-             ;;
-         esac
-       done
-       CFLAGS="$new_CFLAGS"
-    else
-       AC_MSG_RESULT(no)
-    fi
-    ;;
- *) AC_MSG_RESULT(no) ;;
-esac
-
-dnl We need to override the top-level CFLAGS.  This is how we do it.
-MY_CFLAGS="$CFLAGS"
-AC_SUBST(MY_CFLAGS)
-
-dnl Include defines that have become de facto standard.
-dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
-AC_DEFINE(SILENT)
-AC_DEFINE(NO_SIGNALS)
-AC_DEFINE(NO_EXECUTE_PERMISSION)
-dnl AC_DEFINE(ALL_INTERIOR_POINTERS)
-
-dnl By default, make the library as general as possible.
-AC_DEFINE(JAVA_FINALIZATION)
-AC_DEFINE(GC_GCJ_SUPPORT)
-AC_DEFINE(ATOMIC_UNCOLLECTABLE)
-
-dnl This is something of a hack.  When cross-compiling we turn off
-dnl some functionality.  We also enable the "small" configuration.
-dnl These is only correct when targetting an embedded system.  FIXME.
-if test -n "${with_cross_host}"; then
-   AC_DEFINE(NO_SIGSET)
-   AC_DEFINE(NO_CLOCK)
-   AC_DEFINE(SMALL_CONFIG)
-   AC_DEFINE(NO_DEBUGGING)
-fi
-
-UNWINDLIBS=
-AC_ARG_ENABLE(full-debug,
-[  --enable-full-debug include full support for pointer backtracing etc.],
-[ if test "$enable_full_debug" = "yes"; then
-    AC_MSG_WARN("Should define GC_DEBUG and use debug alloc. in clients.")
-    AC_DEFINE(KEEP_BACK_PTRS)
-    AC_DEFINE(DBG_HDRS_ALL)
-    case $host in
-      ia64-*-linux* )
-       AC_DEFINE(MAKE_BACK_GRAPH)
-       AC_DEFINE(SAVE_CALL_COUNT, 8)
-        AC_CHECK_LIB(unwind, backtrace, [
-         AC_DEFINE(GC_HAVE_BUILTIN_BACKTRACE)
-         UNWINDLIBS=-lunwind
-         AC_MSG_WARN("Client code may need to link against libunwind.")
-       ])
-      ;;
-      x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
-       AC_DEFINE(MAKE_BACK_GRAPH)
-       AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
-       AC_DEFINE(SAVE_CALL_COUNT, 8)
-      ;;
-      i[3456]86-*-dgux*)
-       AC_DEFINE(MAKE_BACK_GRAPH)
-      ;;
-    esac ]
-  fi)
-
-AC_SUBST(UNWINDLIBS)
-
-AC_ARG_ENABLE(redirect-malloc,
-[  --enable-redirect-malloc  redirect malloc and friends to GC routines])
-
-if test "${enable_redirect_malloc}" = yes; then
-    if test "${enable_full_debug}" = yes; then
-       AC_DEFINE(REDIRECT_MALLOC, GC_debug_malloc_replacement)
-       AC_DEFINE(REDIRECT_REALLOC, GC_debug_realloc_replacement)
-       AC_DEFINE(REDIRECT_FREE, GC_debug_free)
-    else
-       AC_DEFINE(REDIRECT_MALLOC, GC_malloc)
-    fi
-fi
-
-AC_DEFINE(_IN_LIBGC)
-
-AC_ARG_ENABLE(gc-assertions,
-[  --enable-gc-assertions  collector-internal assertion checking])
-if test "${enable_gc_assertions}" = yes; then
-    AC_DEFINE(GC_ASSERTIONS)
-fi
-
-AC_ARG_ENABLE(quiet-build, [  --enable-quiet-build  Enable quiet libgc build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes)
-AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
-
-if test "${multilib}" = "yes"; then
-  multilib_arg="--enable-multilib"
-else
-  multilib_arg=
-fi
-
-AC_OUTPUT(Makefile
-m4/Makefile
-include/Makefile
-include/private/Makefile
-doc/Makefile,,
-srcdir=${srcdir}
-host=${host}
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-CC="${CC}"
-DEFS="$DEFS"
-)
index a19cb3021b0aa9568f3ec265e4aca5a2961606ce..eaba6e509d36612d6258fbd20f6f56f8b2fff744 100644 (file)
@@ -6,7 +6,7 @@ Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
 The file linux_threads.c is also
 Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
 
-The files Makefile.am, and configure.in are
+The files Makefile.am, and configure.ac are
 Copyright (c) 2001 by Red Hat Inc. All rights reserved.
 
 Several files supporting GNU-style builds are copyrighted by the Free
index 97b0b684dde5b556750993056e3240d3bee1c2f5..fa6f279f518a5fac4b4778e9e869e4d82bb0539c 100644 (file)
@@ -1269,7 +1269,7 @@ Since 6.0alpha6:
    many places.  (Thanks to Benjamin Lerman.)
  - Made win32_threads.c more tolerant of detaching a thread that it didn't
    know about.  (Thanks to Paul Nash.)
- - Added Makefile.am and configure.in from gcc to the distribution, with
+ - Added Makefile.am and configure.ac from gcc to the distribution, with
    minimal changes.  For the moment, those are just placeholders.  In the
    future, we're planning to switch to a GNU-style build environment for
    Un*x-like systems, though the old Makefile will remain as a backup.
@@ -1491,7 +1491,7 @@ Since 6.1alpha3:
  - Fixed a formatting error in dbg_mlc.c.  Added prototype to GC_abort()
    declaration.   (Thanks to Michael Smith.)
  - Removed "source" argument to GC_find_start().  Eliminate GC_FIND_START().
- - Added win32 recognition code in configure.in.  Changed some of the
+ - Added win32 recognition code in configure.ac.  Changed some of the
    dllimport/export defines in gc.h.  (Thanks to Adam Megacz.)
  - GC_malloc_many didn't set hb_last_reclaimed when it called 
    GC_reclaim_generic.  (I'm not sure this matters much, but ...)
@@ -1629,7 +1629,7 @@ Since 6.1alpha4:
 
 Since 6.1alpha5:
  - Added GC_MAXIMUM_HEAP_SIZE environment variable.
- - Fix configure.in for MIPS/LINUX. (Thanks to H.J. Lu.)
+ - Fix configure.ac for MIPS/LINUX. (Thanks to H.J. Lu.)
  - Double page hash table size for -DLARGE_CONFIG.
  - Integrated Bo Thorsen's X86-64 support.
  - STACKBOTTOM definition for LINUX/MIPS was partially changed back.
@@ -1942,7 +1942,7 @@ Since 6.3alpha1:
    There is also still some code duplication with pthread_support.c.
    (Thread descriptors did become much smaller, since Ben Hutchings
    removed the thread context from them.)
- - Integrated a Solaris configure.in patch from Rainer Orth.
+ - Integrated a Solaris configure.ac patch from Rainer Orth.
  - Added GC_IGNORE_FB and associated warning to very partially address
    the issue of the collector treating a mapped frame buffer as part
    of the root set.  (Thanks to David Peroutka for providing some
@@ -2151,7 +2151,7 @@ Since 6.3:
    it seems to be incorrect if the preceding memory op is a load.
  - Fixed print_block_list to print the correct kind number for
    STUBBORN.  (Thanks to Rutger Ovidus.)
- - Have configure.in generate an error if it is asked to support
+ - Have configure.ac generate an error if it is asked to support
    pthreads, but doesn't know how to.
  - Added Kazuhiro Inaoka's patch for Renesas M32R support.
  - Have the GNU build mechanism link with -ldl.  Rename THREADLIBS
index ca7ce54f19461e6f38f49c57c9ed49c849b8a935..5db3503aacbaf3b68ce53ddc427cb1069cccce04 100644 (file)
@@ -26,7 +26,7 @@
  * None of this is safe with dlclose and incremental collection.
  * But then not much of anything is safe in the presence of dlclose.
  */
-#if (defined(__linux__) || defined(__native_client__)) && !defined(_GNU_SOURCE)
+#if (defined(__linux__) || defined(__GLIBC__) || defined(__native_client__)) && !defined(_GNU_SOURCE)
     /* Can't test LINUX, since this must be define before other includes */
 #   define _GNU_SOURCE
 #endif
@@ -394,7 +394,7 @@ GC_bool GC_register_main_static_data()
 /* For glibc 2.2.4+.  Unfortunately, it doesn't work for older */
 /* versions.  Thanks to Jakub Jelinek for most of the code.    */
 
-# if (defined(LINUX) || defined(NACL)) /* Are others OK here, too? */ \
+# if (defined(LINUX) || defined (__GLIBC__) || defined(NACL)) /* Are others OK here, too? */ \
      && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
          || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) 
 
index 91f6970180cd26352a864464a0ac44184d2a07ce..5626e8721370071bbefdbfb1710911b86a17bb50 100644 (file)
@@ -366,6 +366,15 @@ GC_process_togglerefs (void)
        GC_toggleref_array_size = w;
 }
 
+/* Finalizer proc support */
+static void (*GC_object_finalized_proc) (GC_PTR obj);
+
+void
+GC_set_finalizer_notify_proc (void (*proc) (GC_PTR obj))
+{
+       GC_object_finalized_proc = proc;
+}
+
 
 static void push_and_mark_object (GC_PTR p)
 {
@@ -877,6 +886,10 @@ void GC_finalize()
                 fo_set_next(prev_fo, next_fo);
               }
               GC_fo_entries--;
+
+                         if (GC_object_finalized_proc)
+                                 GC_object_finalized_proc (real_ptr);
+
             /* Add to list of objects awaiting finalization.   */
               fo_set_next(curr_fo, GC_finalize_now);
               GC_finalize_now = curr_fo;
index a3eb3c2dc06e35ff79ed87bf223c85131c8b412a..2265fdbd34a71094805a5c568cc44e8ce70719f2 100644 (file)
@@ -497,7 +497,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
 #   define GC_RETURN_ADDR (GC_word)__return_address
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
 # include <features.h>
 # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
      && !defined(__ia64__)
@@ -778,6 +778,10 @@ GC_API int GC_unregister_long_link GC_PROTO((GC_PTR * /* link */));
 GC_API void GC_toggleref_register_callback GC_PROTO((int (*proccess_toggleref) (GC_PTR obj)));
 GC_API void GC_toggleref_add (GC_PTR object, int strong_ref);
 
+/* finalizer callback support */
+GC_API void GC_set_finalizer_notify_proc GC_PROTO((void (*object_finalized) (GC_PTR obj)));
+
+
 /* Returns !=0  if GC_invoke_finalizers has something to do.           */
 GC_API int GC_should_invoke_finalizers GC_PROTO((void));
 
index 418e046ae1267715dd3022625f839cf81d302dd8..3cbab919b940b448ad20511d686465ea2f261fe7 100644 (file)
@@ -55,7 +55,7 @@
 # endif
 
 /* And one for FreeBSD: */
-# if defined(__FreeBSD__) && !defined(FREEBSD)
+# if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined(FREEBSD)
 #    define FREEBSD
 # endif
 
 #      ifndef GC_FREEBSD_THREADS
 #          define MPROTECT_VDB
 #      endif
-#      define SIG_SUSPEND SIGTSTP
-#      define SIG_THR_RESTART SIGCONT
+#       ifdef __GLIBC__
+#           define SIG_SUSPEND          (32+6)
+#           define SIG_THR_RESTART      (32+5)
+            extern int _end[];
+#           define DATAEND (_end)
+#       else
+#           define SIG_SUSPEND SIGTSTP
+#           define SIG_THR_RESTART SIGCONT
+#       endif
 #      define FREEBSD_STACKBOTTOM
 #      ifdef __ELF__
 #          define DYNAMIC_LOADING
 #      ifndef GC_FREEBSD_THREADS
 #          define MPROTECT_VDB
 #      endif
-#      define SIG_SUSPEND SIGTSTP
-#      define SIG_THR_RESTART SIGCONT
+#      ifdef __GLIBC__
+#          define SIG_SUSPEND          (32+6)
+#          define SIG_THR_RESTART      (32+5)
+           extern int _end[];
+#          define DATAEND (_end)
+#      else
+#          define SIG_SUSPEND SIGUSR1
+#          define SIG_THR_RESTART SIGUSR2
+#      endif
 #      define NEED_FIND_LIMIT
 #      define FREEBSD_STACKBOTTOM
 #      ifdef __ELF__
 #   define SUNOS5SIGS
 # endif
 
-# if defined(FREEBSD) && (__FreeBSD__ >= 4)
+# if defined(FREEBSD) && ((__FreeBSD__ >= 4) || (__FreeBSD_kernel__ >= 4))
 #   define SUNOS5SIGS
 # endif
 
 #   define CACHE_LINE_SIZE 32  /* Wild guess   */
 # endif
 
-# ifdef LINUX
+# if defined(LINUX) || defined(__GLIBC__)
 #   define REGISTER_LIBRARIES_EARLY
     /* We sometimes use dl_iterate_phdr, which may acquire an internal */
     /* lock.  This isn't safe after the world has stopped.  So we must */
 #if defined(SPARC)
 # define CAN_SAVE_CALL_ARGS
 #endif
-#if (defined(I386) || defined(X86_64)) && defined(LINUX)
+#if (defined(I386) || defined(X86_64)) && (defined(LINUX) || defined(__GLIBC__))
            /* SAVE_CALL_CHAIN is supported if the code is compiled to save     */
            /* frame pointers by default, i.e. no -fomit-frame-pointer flag.    */
 # define CAN_SAVE_CALL_ARGS
index 4074879a71aa90d1f8e638b9ce7521573939bfb4..b3e996a29c2d51645a8cd9374ff53194dad84e7d 100644 (file)
@@ -375,8 +375,15 @@ ptr_t GC_approx_sp()
                /* doing something wrong.                               */
 #   ifdef _MSC_VER
 #     pragma warning(disable:4172)
+#   endif
+#   if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 408)
+#     pragma GCC diagnostic push
+#     pragma GCC diagnostic ignored "-Wreturn-local-addr"
 #   endif
     return((ptr_t)(&dummy));
+#   if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 408)
+#      pragma GCC diagnostic pop
+#   endif
 #   ifdef _MSC_VER
 #     pragma warning(default:4172)
 #   endif
index e1fe24bd0abe84e8b3f15b950721c724ec612f20..9fcbb7b651fb0e5be116c17ecbf954b19c90c8d6 100644 (file)
@@ -1,4 +1,4 @@
-/* The version here should match that in configure/configure.in        */
+/* The version here should match that in configure/configure.ac        */
 /* Eventually this one may become unnecessary.  For now we need        */
 /* it to keep the old-style build process working.             */
 #define GC_TMP_VERSION_MAJOR 6
@@ -14,7 +14,7 @@
      GC_TMP_VERSION_MINOR != GC_VERSION_MINOR || \
      defined(GC_ALPHA_VERSION) != (GC_TMP_ALPHA_VERSION != GC_NOT_ALPHA) || \
      defined(GC_ALPHA_VERSION) && GC_TMP_ALPHA_VERSION != GC_ALPHA_VERSION
-#   error Inconsistent version info.  Check README, version.h, and configure.in.
+#   error Inconsistent version info.  Check README, version.h, and configure.ac.
 # endif
 #else
 # define GC_VERSION_MAJOR GC_TMP_VERSION_MAJOR
index ac2808e25f390c02e3c95b0ea0b4a3aeed3a1843..3d4bd54e9895550c8f348828da97a6dc819a2a9a 100644 (file)
@@ -1216,6 +1216,17 @@ is used.
 Performs a check to make sure that no references are left to an
 unloaded AppDomain.
 .TP
+\fBclear-at-tlab-creation\fR
+Clears the nursery incrementally when the thread local allocation
+buffers (TLAB) are created.  The default setting clears the whole
+nursery at GC time.
+.TP
+\fBdebug-clear-at-tlab-creation\fR
+Clears the nursery incrementally when the thread local allocation
+buffers (TLAB) are created, but at GC time fills it with the byte
+`0xff`, which should result in a crash more quickly if
+`clear-at-tlab-creation` doesn't work properly.
+.TP
 \fBclear-at-gc\fR
 This clears the nursery at GC time instead of doing it when the thread
 local allocation buffer (TLAB) is created.  The default is to clear
index de40af60d8ea88d0ae94ae42420f5a42295a8e6f..4b1b7816817ae65a643c4eda775415fee81c769f 100644 (file)
@@ -211,6 +211,15 @@ The following commands are available:
 .IP \[bu] 2
 \f[I]heapshot\f[]: perform a heapshot as soon as possible
 .RE
+.IP \[bu] 2
+\f[I]counters\f[]: sample counters values every 1 second. This allow
+a really lightweight way to have insight in some of the runtime key
+metrics. Counters displayed in non verbose mode are : Methods from AOT,
+Methods JITted using mono JIT, Methods JITted using LLVM, Total time
+spent JITting (sec), User Time, System Time, Total Time, Working Set,
+Private Bytes, Virtual Bytes, Page Faults and CPU Load Average (1min,
+5min and 15min).
+.RE
 .SS Analyzing the profile data
 .PP
 Currently there is a command line program (\f[I]mprof-report\f[])
@@ -284,6 +293,16 @@ where \f[I]MODE\f[] can be:
 .IP \[bu] 2
 \f[I]bytes\f[]: the total number of bytes used by objects of the
 given type
+.PP
+To change the sort order of counters, use the option:
+.PP
+\f[B]--counters-sort=MODE\f[]
+.PP
+where \f[I]MODE\f[] can be:
+.IP \[bu] 2
+\f[I]time\f[]: sort values by time then category
+.IP \[bu] 2
+\f[I]category\f[]: sort values by category then time
 .SS Selecting what data to report
 .PP
 The profiler by default collects data about many runtime subsystems
@@ -319,6 +338,8 @@ version
 \f[I]thread\f[]: thread information
 .IP \[bu] 2
 \f[I]heapshot\f[]: live heap usage at heap shots
+.IP \[bu] 2
+\f[I]counters\f[]: counters samples
 .PP
 It is possible to limit some of the data displayed to a timeframe
 of the program execution with the option:
index 78af02bc44f60b892ed897af08dfdabac2393803..a10dfa504cb5e48ae02a7556956cac5a48a104d8 100644 (file)
@@ -24,7 +24,6 @@ centum_tests := \
        class/System.XML                                        \
        class/Commons.Xml.Relaxng                               \
        class/Cscompmgd                                         \
-       class/Microsoft.JScript                                 \
        class/Mono.Posix                                        \
        class/Mono.Security                                     \
        class/System.Design                                     \
index c270cc81ccf0f562604f81c10869e5364d426577..12f6c82cff2c8f05c225231d8d3769a19760335d 100644 (file)
@@ -65,7 +65,7 @@ do-profile-check: $(depsdir)/.stamp
                $(MAKE) -s do-profile-check-monolite ; \
            else \
                echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
-                echo "*** You need Mono version 2.4 or better installed to build MCS" 1>&2 ; \
+                echo "*** You need Mono version 2.10 or better installed to build MCS" 1>&2 ; \
                 echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \
                exit 1; fi; fi
 
index 1d2a512447d401388f5a48aa7585e86384bb7f36..a576ba602dbff7e642312899cdcacb52ee3a3d13 100644 (file)
@@ -11,7 +11,7 @@
 tests_CLEAN_FILES := 
 
 ifndef TEST_COMPILE
-TEST_COMPILE = $(CSCOMPILE)
+TEST_COMPILE = $(subst $(test_remove),,$(CSCOMPILE))
 endif
 
 TEST_RUNTIME_WRAPPERS_PATH = $(shell dirname $(RUNTIME))/_tmpinst/bin
index 46ab1607ccb3595678a8bddb3d4a7624ffb817b3..28d5043dcd403d9e039ee2a51db20a3fc15e61fe 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
@@ -73,7 +74,7 @@
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1e11dffd26006e303e1714e2b2ea50b52f3c2169..c390f2dbcffc31536c45c4ea8ee8a887b4482f86 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index d249b5528d58cf023f599b670515e976b5a8e4fd..a2783d9b1d54bc5e0a44487ce3a28f44995d51a3 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index d53213ae9151e5638263e1c4b9e5809b8c68b72f..b655375597406c6fb5cf1adf0a625770b4d12abf 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index a529f198e095830dcb7a6739ed10759f1d5819a8..5477c74d8242ad4001b1a8556c0841654d36daa6 100644 (file)
     <AssemblyName>EntityFramework.SqlServer</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../ecma.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../EntityFramework/EntityFramework-net_4_5.csproj">\r
       <Project>{CEE31F03-087E-4164-BBD4-990759B40C3E}</Project>\r
-      <Name>EntityFramework\EntityFramework-net_4_5</Name>\r
+      <Name>EntityFramework-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 7c81911b07f2c99fcbc7a82731ae8510b09d6493..c99f52bcf5bab108783c0a9d83c97ea9d02a2f9e 100644 (file)
     <AssemblyName>EntityFramework</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../ecma.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Transactions/System.Transactions-net_4_5.csproj">\r
       <Project>{AF2BBF50-AB57-4CA1-8EF5-2B54C7418434}</Project>\r
-      <Name>System.Transactions\System.Transactions-net_4_5</Name>\r
+      <Name>System.Transactions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Xml.Linq/System.Xml.Linq-net_4_5.csproj">\r
       <Project>{8328796E-8A15-4972-8F1E-2F15E7D57C42}</Project>\r
-      <Name>System.Xml.Linq\System.Xml.Linq-net_4_5</Name>\r
+      <Name>System.Xml.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_5.csproj">\r
       <Project>{63EC4158-FFAC-4867-8003-CF6054C8DF0B}</Project>\r
-      <Name>System.ComponentModel.DataAnnotations\System.ComponentModel.DataAnnotations-net_4_5</Name>\r
+      <Name>System.ComponentModel.DataAnnotations-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.CSharp/Microsoft.CSharp-net_4_5.csproj">\r
       <Project>{D554618C-5D38-413A-82BA-7A70B6FC61A3}</Project>\r
-      <Name>Microsoft.CSharp\Microsoft.CSharp-net_4_5</Name>\r
+      <Name>Microsoft.CSharp-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 8f6854869c6129af981e846ac42138031667b882..ffdea4c751cc43b7e65000974c3a907311bc8eec 100644 (file)
@@ -8,7 +8,7 @@ monotouch_SUBDIRS = System.Collections.Concurrent System.Collections System.Comp
        System.Reflection.Extensions System.Reflection.Primitives System.Reflection System.Resources.ResourceManager System.Runtime.Extensions \
        System.Runtime.InteropServices System.Runtime.InteropServices.WindowsRuntime System.Runtime.Numerics System.Runtime.Serialization.Json \
        System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml System.Runtime System.Security.Principal System.ServiceModel.Http \
-       System.ServiceModel.Primitives System.Text.Encoding.Extensions System.Text.Encoding System.Text.RegularExpressions System.Threading.Tasks.Parallel \
+       System.ServiceModel.Primitives System.ServiceModel.Security System.Text.Encoding.Extensions System.Text.Encoding System.Text.RegularExpressions System.Threading.Tasks.Parallel \
        System.Threading.Tasks System.Threading.Timer System.Threading System.Xml.ReaderWriter System.Xml.XDocument System.Xml.XmlSerializer
 
 mobile_static_SUBDIRS = $(monotouch_SUBDIRS)
@@ -45,6 +45,7 @@ include $(MCS_BUILD_DIR)/rules.make
 
 dist-local: dist-default
 
+SUBDIRS = $(net_4_5_SUBDIRS)
 
 doc-update-local:
        @echo "not doing docs"
index fe9af8668366e9a24453a45afa03f0b37611e34b..785ae325924d4b70d7956a7b8d0c88c5b8993249 100644 (file)
     <AssemblyName>System.Collections.Concurrent</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 07f594f6fab697456b7755fdae34b91744740ea8..7739de83730b105dafb0dcef34d606e1c24009b3 100644 (file)
     <AssemblyName>System.Collections</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 79124c6c016ee4cbf8aa0011b0813d24e7a07cbc..11fd690cf1aa51e2b5a9c766034bf69f8c33dc9d 100644 (file)
     <AssemblyName>System.ComponentModel.Annotations</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_5.csproj">\r
       <Project>{63EC4158-FFAC-4867-8003-CF6054C8DF0B}</Project>\r
-      <Name>System.ComponentModel.DataAnnotations\System.ComponentModel.DataAnnotations-net_4_5</Name>\r
+      <Name>System.ComponentModel.DataAnnotations-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index f400ebc980e6563b7f6f5eae8f9eeba4cdc1df87..e524ac8f8f3508c378b79457b9c1d73d70207d2b 100644 (file)
     <AssemblyName>System.ComponentModel.EventBasedAsync</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 524b35472f36b82492f5937ec530a86a6abef389..0ad13cf5122b9658e5cd1af1a94f4441f40cfebc 100644 (file)
     <AssemblyName>System.ComponentModel</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index bff7c5e0ca2ee4a3fd3ba75106b73affc7944754..115c3e065c25b5c5faa45f8b3493b5b770966c8b 100644 (file)
     <AssemblyName>System.Diagnostics.Contracts</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 5a9d868f231384a1e7c50132c1e40489a2152bd1..7b44d0996db8b851a3b0bb92251a5d33bd8ab236 100644 (file)
     <AssemblyName>System.Diagnostics.Debug</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 4aa4baa76da94f6f2e9c86f04155baddff2ed6cc..cf5c5e745e2b30f3f3eb0a9d422fa0b934eeaf0b 100644 (file)
     <AssemblyName>System.Diagnostics.Tools</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 71078ed61e1a0c24f061e47489c9d4851e723ee3..8182d201d8c47fb8cb7f53a922d7391647b80cf7 100644 (file)
     <AssemblyName>System.Diagnostics.Tracing</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index dc0b78b8814a87c373ede1caa2d844ea455b4a0c..529847be7b5f47e433e105ecadd9e36d0d1637bc 100644 (file)
     <AssemblyName>System.Dynamic.Runtime</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c13d0b502ae20f642adc461b96fb8855cae0d5c5..67df5249ef75d11c0ad3151060870cbee8c80052 100644 (file)
     <AssemblyName>System.Globalization</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 7a70db9f819a4e3d9be830945ba50f9cc40d6610..596ecf7afb0480cd51a285f9b1412682d821e1ae 100644 (file)
     <AssemblyName>System.IO</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 870d659ad1d8646edbaf4a8472cf0358b3ed5aaf..5467fc471c58a459939843e6dc1b7fee421f2610 100644 (file)
     <AssemblyName>System.Linq.Expressions</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 069b01b11714f3ff3bd82023c56c8b39c391f574..dea40f73f627c9f380b70346b93950d8b21147d7 100644 (file)
     <AssemblyName>System.Linq.Parallel</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 775bafd6e70f3f7cfd3f43492d206ce03459f339..be8d341330749a99aa38551e621c5d2fbf8a371d 100644 (file)
     <AssemblyName>System.Linq.Queryable</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c1f86a6f12e81756f676cd4a3043ac99e579637e..a674a868fede1e847ef4407cef6f8476866160ca 100644 (file)
     <AssemblyName>System.Linq</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index a4b3d4beca232394bf9f81097b889abf5dd85cd2..214fb1cd476332146e886696408af0515c999059 100644 (file)
     <AssemblyName>System.Net.NetworkInformation</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index bb9e054295b0d47026b98c679f8fcb1bc6215dc1..adaab1def69cb88c3b57c968a5aae23b75ffd9c4 100644 (file)
     <AssemblyName>System.Net.Primitives</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index d3afb5203e4da6b733fd11299a313ec1d6177bea..09b309af64ae5941381b1f59608332ee209e3e2a 100644 (file)
     <AssemblyName>System.Net.Requests</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c720b82c313276001329866961e1bd52ca59268b..3c290c07e38ed32d4d48dbb3b23f4729e22fe6b7 100644 (file)
     <AssemblyName>System.ObjectModel</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index f3a01fa4e8b8f5b30e6575df7be5c70103d9e15b..18738869be0fc150cd257d39b62d63654d10f034 100644 (file)
     <AssemblyName>System.Reflection.Emit.ILGeneration</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 5e37de37c886dca92545729b7d064921948a1d38..62ea08f2ffa67090ed5885522ab77f7efb87aa87 100644 (file)
     <AssemblyName>System.Reflection.Emit.Lightweight</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 185c48c77e486c42280560221d6ad4809b747376..1a1743fbd9b05c7a9f9406a1ddd19ca9af3c3d1d 100644 (file)
     <AssemblyName>System.Reflection.Emit</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index e60886ccf444eadf99cc6c7100d7cb6c1e034678..6b5fa509b447bcaf3ff152628d87afcfde3d158d 100644 (file)
     <AssemblyName>System.Reflection.Extensions</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1ba5bdedbc3390f2bf71895836af8ebfe75be377..3d4df95f0f93d5dd3857285d789b6fc2a4441b10 100644 (file)
     <AssemblyName>System.Reflection.Primitives</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index eb4cd6e075b5a6fd74b14fa81f86962a0bfd5cdd..82b4dbdd6c63c327c2a0833c035d6874418857b3 100644 (file)
     <AssemblyName>System.Reflection</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 0fc45e22ee46f3fc2ca964eac9a06a2d95d2ca60..9625feac8b7ddbf91f0078dab59d8af7d2fd0611 100644 (file)
     <AssemblyName>System.Resources.ResourceManager</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 2c7de2ddcde5f8ff4f2eabecbb50d49a87b4a2ff..cb8249005dd9b664fb72eaf184f73891b96bab09 100644 (file)
     <AssemblyName>System.Runtime.Extensions</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 05c287dd3a95d10d1284c9e931594c319bf8db28..35c6e825d291c8f9fe43ad75a409d8f140239e7f 100644 (file)
     <AssemblyName>System.Runtime.InteropServices.WindowsRuntime</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 00fa6b3eb601c2ca6a86fa114b83b5553627c6b9..f28fddd49b11d5a2e3b04ae559a35cc89ba65030 100644 (file)
     <AssemblyName>System.Runtime.InteropServices</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 48a4e24b5f0d59d2a02978e29f9c88df670842d9..060d92922652b2f08b9a97ee7ecb20bd2f5ff145 100644 (file)
@@ -40,6 +40,8 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.COMException))]
 [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.ComTypes.IStream))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STATSTG))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CriticalHandle))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CurrencyWrapper))]
 //[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceMode))]
@@ -76,4 +78,3 @@
 [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))]
-
index cd4e31882ffc0a3551b14e5d77748ec027dfc451..650e2d7ff296b1393860746049b01a2fbc32c8a3 100644 (file)
     <AssemblyName>System.Runtime.Numerics</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Numerics/System.Numerics-net_4_5.csproj">\r
       <Project>{14631AC9-FDC6-4561-A04C-6913947C939E}</Project>\r
-      <Name>System.Numerics\System.Numerics-net_4_5</Name>\r
+      <Name>System.Numerics-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index a880c8b76d5a14b9a0475bab1edc3866b569c864..1208c6450e4c681b2e33015418a1330bf49f93e3 100644 (file)
     <AssemblyName>System.Runtime.Serialization.Json</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 83f042e51e43b9429eb6cbef67ab496e0b3ff70f..1e4d995779924e41db9354f773ec2f418e6690dd 100644 (file)
     <AssemblyName>System.Runtime.Serialization.Primitives</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 3ce07ff9374ec85a9672823f45dbdd0df6e92986..8b6f6eb33839c3f01074117caaf0b0d3393eb9e1 100644 (file)
     <AssemblyName>System.Runtime.Serialization.Xml</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1ff2f7c3e6037f470677b01f39a249651eb01fd1..d8192f88f4f33a273f0a446b360388b79d89fd94 100644 (file)
     <AssemblyName>System.Runtime</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.ComponentModel.Composition/System.ComponentModel.Composition-net_4_5.csproj">\r
       <Project>{51392CAD-5DCF-443F-8ECF-C9113DF3B91A}</Project>\r
-      <Name>System.ComponentModel.Composition\System.ComponentModel.Composition-net_4_5</Name>\r
+      <Name>System.ComponentModel.Composition-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index aa6669d68c9a84adfcd5a78c213f6bf591b33f27..a4cbb6299c9d8165be8b78055cfdb3fb73277cde 100644 (file)
     <AssemblyName>System.Security.Principal</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 0a2b1b579c51c158ece6c7f3564f3aeb5201eb54..d66906dce8ab5b8b2fd0e29c92e82e489a48c152 100644 (file)
     <AssemblyName>System.ServiceModel.Http</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 9fc9038ac51a762841646e974b5c26d0c760538e..d0cb63b3eae1d0cf6f767f635ae4118b6c8ad215 100644 (file)
     <AssemblyName>System.ServiceModel.Primitives</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
diff --git a/mcs/class/Facades/System.ServiceModel.Security/AssemblyInfo.cs b/mcs/class/Facades/System.ServiceModel.Security/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..f222e8b
--- /dev/null
@@ -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.ServiceModel.Security.dll")]
+[assembly: AssemblyDescription ("System.ServiceModel.Security.dll")]
+[assembly: AssemblyDefaultAlias ("System.ServiceModel.Security.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.ServiceModel.Security/Makefile b/mcs/class/Facades/System.ServiceModel.Security/Makefile
new file mode 100644 (file)
index 0000000..b021eff
--- /dev/null
@@ -0,0 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.ServiceModel.Security
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.ServiceModel.Security.dll
+
+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 $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.ServiceModel.Security/System.ServiceModel.Security.dll.sources b/mcs/class/Facades/System.ServiceModel.Security/System.ServiceModel.Security.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs b/mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..b8424b6
--- /dev/null
@@ -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.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.LocalClientSecuritySettings))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SecurityBindingElement))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SecurityHeaderLayout))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TransportSecurityBindingElement))]
+#if !MOBILE
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DnsEndpointIdentity))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageSecurityVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.BasicSecurityProfileVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecureConversationVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityPolicyVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SecureConversationSecurityTokenParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SecurityTokenParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SupportingTokenParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.UserNameSecurityTokenParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.TrustVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SpnEndpointIdentity))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UpnEndpointIdentity))]
+#endif
\ No newline at end of file
index 3a55e57e568dd0b1f34ddf354a111bf5a7b95b5a..4a6b140ae32401796d1c29d0c02a1cd250c51d43 100644 (file)
     <AssemblyName>System.Text.Encoding.Extensions</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 209c0590891fd9744a06be5abbf68c54bdd4c544..6c03c541652a66d707854ccd97f194625f017058 100644 (file)
     <AssemblyName>System.Text.Encoding</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index b22e1ed1714927c7e0973d3f0bc3b9951ea24b66..8603aca5d46eb79f9bb189fa9d397a0234e1a599 100644 (file)
     <AssemblyName>System.Text.RegularExpressions</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 109f1b88022809f2599ba30f2ccad3a892a7b115..e7a569031790a84c4f12a55962ea8a2ea4ed10f6 100644 (file)
     <AssemblyName>System.Threading.Tasks.Parallel</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 269a6fe3e744ccdc8d634c130abbada665ea2dcd..6cbf5f5fe641f0f535042a9ae01768aff577db36 100644 (file)
     <AssemblyName>System.Threading.Tasks</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index e3d5a299d7d7feba2df10af625caf007c75540c0..35f690a0c96d5b1272e3200bd27f56a006d49e17 100644 (file)
     <AssemblyName>System.Threading.Timer</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 0c2c715a4929c5ead4fd919b575e7b2e0e27bad7..855dcde2a23f7328e8a32f93b7f5720c6dbe0ca0 100644 (file)
     <AssemblyName>System.Threading</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1d31710672530f299aabf6c9be47fc6e5f219160..c5f31c82bbc94f4837262c9783c48c155cca4e3c 100644 (file)
     <AssemblyName>System.Xml.ReaderWriter</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 962af3458f3101ccdec31a8664f8ea674c0dd4cb..030fbbb7c18b9c11ff69484ce4bfd21381233aad 100644 (file)
     <AssemblyName>System.Xml.XDocument</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.Xml.Linq/System.Xml.Linq-net_4_5.csproj">\r
       <Project>{8328796E-8A15-4972-8F1E-2F15E7D57C42}</Project>\r
-      <Name>System.Xml.Linq\System.Xml.Linq-net_4_5</Name>\r
+      <Name>System.Xml.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index aa436dcd8825df35523930b4e11f75ddb6b30c0f..7ef501521c3404b24646b3e296cd8cffc391a16f 100644 (file)
     <AssemblyName>System.Xml.XmlSerializer</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 5a517b6f6d6bf7941fb7c7493ab68a4d28835b47..dec298ea7f2d0afea4c5986620e56e73949b7c05 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Common/I18N-net_4_5.csproj">\r
       <Project>{C337A9A4-3797-4339-AD23-493DF062CD76}</Project>\r
-      <Name>Common\I18N-net_4_5</Name>\r
+      <Name>I18N-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 76baf716f31252028108548c73b4591804963b04..d982706eeda65001d8856ea53ce3403805e1191a 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
@@ -78,7 +79,7 @@
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 66fbe53d000938885ab924902d5de6166a492c65..ea241e7de1bc8cc7930ab05fef681f96b8ea3e0e 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Common/I18N-net_4_5.csproj">\r
       <Project>{C337A9A4-3797-4339-AD23-493DF062CD76}</Project>\r
-      <Name>Common\I18N-net_4_5</Name>\r
+      <Name>I18N-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 0e6cbf1e160dcaff1976b26bb7c28f3f1fce6774..a0f092aee99f85c956aab7159b34b18082a26f6d 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Common/I18N-net_4_5.csproj">\r
       <Project>{C337A9A4-3797-4339-AD23-493DF062CD76}</Project>\r
-      <Name>Common\I18N-net_4_5</Name>\r
+      <Name>I18N-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 08f7769891d48a118254f30512913acf06890842..bc4392d65dac4ac162177ae189400a9090c7882a 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Common/I18N-net_4_5.csproj">\r
       <Project>{C337A9A4-3797-4339-AD23-493DF062CD76}</Project>\r
-      <Name>Common\I18N-net_4_5</Name>\r
+      <Name>I18N-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 12daa0d7364fe9a82ce159c3f605974e3154e60b..b2487de8957b574c100c89ad26893c8c72f617d9 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Common/I18N-net_4_5.csproj">\r
       <Project>{C337A9A4-3797-4339-AD23-493DF062CD76}</Project>\r
-      <Name>Common\I18N-net_4_5</Name>\r
+      <Name>I18N-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 9a0a126b3c1aab692897822fda83e7bb2426fec8..f9d1cdda39ced46b0850c38f17860afa1b29e06d 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index f6f3e38121aff1192e46c9b5d59120dc6ee771b3..0cc37dc7f4549ec9974154982ad5def3ae590beb 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 73ca2abb57a8afa64ec8b58496cbfb47aea60e5b..b3d367cb2e04d080cd5782ecc11b6e830a2a4343 100644 (file)
@@ -25,7 +25,7 @@ net_1_1_java_SUBDIRS = \
        System.Runtime.Serialization.Formatters.Soap    \
        System.Runtime.Remoting
 
-common_dirs := \
+net_2_0_dirs := \
        corlib                          \
        System                          \
        System.XML                      \
@@ -78,14 +78,11 @@ common_dirs := \
        Mono.Cecil                      \
        Mono.Cecil.Mdb                  \
        Mono.Debugger.Soft              \
-       SystemWebTestShim
-
-net_2_0_dirs := \
+       SystemWebTestShim                       \
        System.Xml.Linq                 \
        System.Runtime.Serialization    \
        System.Data.DataSetExtensions   \
        System.Data.Linq                \
-       System.Web                      \
        System.Web.Abstractions         \
        System.Web.Routing              \
        System.IdentityModel            \
@@ -179,7 +176,6 @@ net_4_0_dirs := \
        System.Xaml \
        WindowsBase \
        System.ServiceModel.Activation \
-       System.ServiceModel \
        System.ServiceModel.Routing \
        System.ServiceModel.Discovery \
        System.Runtime.Caching \
@@ -241,7 +237,7 @@ xbuild_4_0_dirs := \
        $(xbuild_2_0_dirs)      \
        Microsoft.Build
 
-net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler
+net_2_0_SUBDIRS := $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler
 monodroid_SUBDIRS := $(mobile_dirs) $(monodroid_dirs)
 monotouch_SUBDIRS := $(mobile_dirs) $(monotouch_dirs)
 monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
@@ -249,13 +245,13 @@ mobile_static_SUBDIRS := $(mobile_dirs)
 mobile_SUBDIRS := $(mobile_dirs)
 xammac_SUBDIRS := $(mobile_dirs) $(xammac_dirs)
 net_3_5_SUBDIRS := $(xbuild_2_0_dirs)
-net_4_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs)
-net_4_5_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler
+net_4_0_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs)
+net_4_5_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler
 xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
 
 include ../build/rules.make
 
-SUBDIRS = $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
+SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
 
 DIST_ONLY_SUBDIRS = dlr aot-compiler $(xbuild_4_0_dirs)
 
@@ -285,7 +281,7 @@ all-local $(STD_TARGETS:=-local):
        @:
 
 # Files needed to bootstrap C# compiler
-basic_files = basic.exe mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll
+basic_files = basic.exe mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll
 monolite_files = $(basic_files:%=lib/monolite/%)
 
 lib/monolite:
diff --git a/mcs/class/Managed.Windows.Forms/.gitignore b/mcs/class/Managed.Windows.Forms/.gitignore
new file mode 100644 (file)
index 0000000..f6cce0c
--- /dev/null
@@ -0,0 +1,3 @@
+DummyAssembly.dll
+DummyAssembly.mdb
+test_file
index 7a7439b74417d1dd8561fe4db7672b3f8ebec6e9..37a323899bed7f760ff448f3464b27e0217c2889 100644 (file)
@@ -93,7 +93,10 @@ TEST_DISTFILES = \
        Test/resources/32x32.ico \
        Test/System.Resources/compat_1_1.resx \
        Test/System.Resources/compat_2_0.resx \
-       Test/System.Windows.Forms/bitmaps/a.png
+       Test/System.Windows.Forms/bitmaps/a.png \
+       Test/DummyAssembly/AnotherSerializable.cs \
+       Test/DummyAssembly/Convertable.cs \
+       Test/DummyAssembly/Properties/AssemblyInfo.cs \
 
 EXTRA_DISTFILES = \
        README System.Windows.Forms.dll.resources \
@@ -106,6 +109,11 @@ TEST_MCS_FLAGS = /r:System.Data.dll /r:System.Drawing.dll /r:Accessibility.dll -
        -resource:Test/resources/32x32.ico,32x32.ico \
        -nowarn:618,612
 
+DummyAssembly.dll:
+       $(CSCOMPILE) /target:library /out:$@ Test/DummyAssembly/AnotherSerializable.cs Test/DummyAssembly/Convertable.cs Test/DummyAssembly/Properties/AssemblyInfo.cs
+
+test-local: DummyAssembly.dll
+
 include ../../build/library.make
 
 TEST_HARNESS_EXCLUDES = -exclude=Interactive,NotWorking,ValueAdd,CAS,InetAccess
index 4c79552f4af690db2fedbbfee7a3ab08cf6083b6..48bf07b6720fb4e5f911b59eea92284e03802004 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Accessibility/Accessibility-net_4_5.csproj">\r
       <Project>{FACE8136-C95A-4788-90B2-DB0ECF7A020A}</Project>\r
-      <Name>Accessibility\Accessibility-net_4_5</Name>\r
+      <Name>Accessibility-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Posix/Mono.Posix-net_4_5.csproj">\r
       <Project>{85A9B29B-58FF-4FBE-8998-B0A89AC22880}</Project>\r
-      <Name>Mono.Posix\Mono.Posix-net_4_5</Name>\r
+      <Name>Mono.Posix-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.WebBrowser/Mono.WebBrowser-net_4_5.csproj">\r
       <Project>{1D660912-8164-4499-A2D7-A3B2FE742E17}</Project>\r
-      <Name>Mono.WebBrowser\Mono.WebBrowser-net_4_5</Name>\r
+      <Name>Mono.WebBrowser-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap-net_4_5.csproj">\r
       <Project>{B12AABBC-30D1-4885-BF3F-A53B970F68FB}</Project>\r
-      <Name>System.Runtime.Serialization.Formatters.Soap\System.Runtime.Serialization.Formatters.Soap-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization.Formatters.Soap-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 43b39dcd4fc9a9d78ccc3fd62494fcc426ea1d42..a15b747d1884e052787b5e3cc226c53114d4d905 100644 (file)
@@ -104,7 +104,7 @@ namespace System.Windows.Forms.X11Internal {
                {
                        if (display == IntPtr.Zero) {
                                throw new ArgumentNullException("Display",
-                                                       "Could not open display (X-Server required. Check you DISPLAY environment variable)");
+                                                       "Could not open display (X-Server required. Check your DISPLAY environment variable)");
                        }
 
                        this.display = display;
index 3e928459ba0a07803cfb928fd7a04cf758800480..a16a996355d4867ce3c803f219c156852e19956c 100644 (file)
@@ -207,6 +207,7 @@ namespace System.Windows.Forms {
                private void OnParentCurrencyManagerChanged (object sender, EventArgs args)
                {
                        // Essentially handles chained data sources (e.g. chained BindingSource)
+                       ResetDataMemberIfInvalid ();
                        ResetList ();
                }
 
@@ -349,6 +350,7 @@ namespace System.Windows.Forms {
 
                                        DisconnectDataSourceEvents (datasource);
                                        datasource = value;
+                                       ResetDataMemberIfInvalid ();
                                        ConnectDataSourceEvents (datasource);
                                        ResetList ();
 
@@ -454,6 +456,19 @@ namespace System.Windows.Forms {
                        }
                }
 
+               void ResetDataMemberIfInvalid ()
+               {
+                       if (datamember == String.Empty)
+                               return;
+
+                       // if dataMember doesn't refer to a valid property of dataSource, we need to reset it
+                       var property = ListBindingHelper.GetListItemProperties (datasource).Find (datamember, true);
+                       if (property == null) {
+                               datamember = String.Empty;
+                               OnDataMemberChanged (EventArgs.Empty);
+                       }
+               }
+
                // NOTE: Probably the parsing can be improved
                void ProcessSortString (string sort)
                {
index 277e71c9c6b952bf59dd2fe41ac3abb4384cecd3..e69308f62f333f0aadc54f1b6319f669cd918cdf 100644 (file)
@@ -390,7 +390,8 @@ namespace System.Windows.Forms {
                                else if (e.NewIndex <= listposition) {
                                        /* the deleted row was either the current one, or one earlier in the list.
                                           Update the index and emit PositionChanged, CurrentChanged, and ItemChanged. */
-                                       ChangeRecordState (listposition+1,
+                                       // FIXME: this looks wrong, shouldn't it be (listposition - 1) instead of e.NewIndex ?
+                                       ChangeRecordState (e.NewIndex,
                                                           false, false, e.NewIndex != listposition, false);
                                }
                                else {
@@ -412,7 +413,7 @@ namespace System.Windows.Forms {
                                }
                                else {
                                        if (e.NewIndex <= listposition) {
-                                               ChangeRecordState (e.NewIndex,
+                                               ChangeRecordState (listposition + 1,
                                                                   false, false, false, false);
                                                OnItemChanged (new ItemChangedEventArgs (-1));
                                                OnListChanged (e);
index a930aa9301fcd41cca1f6cd1ed20b0ccdbb61087..5fa129b4c065820d4bbd840832807e8139129bdb 100644 (file)
@@ -150,7 +150,7 @@ namespace System.Windows.Forms {
                }
                */
 
-               static byte [] header = new byte []{ 77, 83, 70, 116, 73, 76, 3, 0 };
+               static byte [] header = new byte []{ 77, 83, 70, 116, 73, 76, 1, 1 };
                public void GetObjectData (SerializationInfo si, StreamingContext context)
                {
                        MemoryStream stream = new MemoryStream ();
@@ -169,7 +169,7 @@ namespace System.Windows.Forms {
                        writer.Write ((ushort) (images [0].Width));
                        writer.Write ((ushort) (images [0].Height));
                        writer.Write (0xFFFFFFFF); //BackColor.ToArgb ()); //FIXME: should set the right one here.
-                       writer.Write ((ushort) 0x1009);
+                       writer.Write ((ushort) 0x21);
                        for (int i = 0; i < 4; i++)
                                writer.Write ((short) -1);
 
index c1b7d791f8d2974c14d91a11622fb822eee0dafa..f7075e8ef8f7cfbc0c67a85dbedc54b114523b38 100644 (file)
@@ -3833,8 +3833,7 @@ namespace System.Windows.Forms
                {
                        Size item_size = ItemSize;
                        for (int i = 0; i < items.Count; i++) {
-                               Point item_location = GetItemLocation (i);
-                               Rectangle item_rect = new Rectangle (item_location, item_size);
+                               Rectangle item_rect = items [i].Bounds;
                                if (item_rect.Contains (x, y))
                                        return items [i];
                        }
index 5ffc23eb615fceae21d162d04fb649a4b4be0579..856137cb17e051cd2f72513bbc16b7ea7c2ea4ac 100644 (file)
@@ -109,7 +109,7 @@ namespace System.Windows.Forms {
                        hexadecimal = false;
                        increment = 1M;
                        maximum = 100M;
-                       minimum = 0.0M;
+                       minimum = 0M;
                        thousands_separator = false;
 
                        Text = "0";
index e05a093aac549755036f160867f3515bc78def96..1f3af25846450af900f33b95ed551929392ee807 100644 (file)
@@ -552,7 +552,7 @@ namespace System.Windows.Forms {
                                ErrorHandler = new XErrorHandler(HandleError);
                                XSetErrorHandler(ErrorHandler);
                        } else {
-                               throw new ArgumentNullException("Display", "Could not open display (X-Server required. Check you DISPLAY environment variable)");
+                               throw new ArgumentNullException("Display", "Could not open display (X-Server required. Check your DISPLAY environment variable)");
                        }
                }
                #endregion      // Internal Methods
index 77e89c4975a80d8a6711e9cb388dfd12bff56134..b8820a9bed074381003909db608d01c517fc4cdd 100644 (file)
@@ -708,7 +708,7 @@ namespace System.Windows.Forms {
                                ErrorHandler = new XErrorHandler (HandleError);
                                XSetErrorHandler (ErrorHandler);
                        } else {
-                               throw new ArgumentNullException ("Display", "Could not open display (X-Server required. Check you DISPLAY environment variable)");
+                               throw new ArgumentNullException ("Display", "Could not open display (X-Server required. Check your DISPLAY environment variable)");
                        }
                }
                #endregion      // Internal Methods
diff --git a/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/AnotherSerializable.cs b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/AnotherSerializable.cs
new file mode 100644 (file)
index 0000000..a6336ce
--- /dev/null
@@ -0,0 +1,88 @@
+//
+// AnotherSerializable.cs : Serializable Class used to test types from other
+// assemblies for resources tests
+//
+// Author:
+//     Gary Barnett (gary.barnett.mono@gmail.com)
+// 
+// Copyright (C) Gary Barnett (2012)
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, 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.IO;
+using System.Runtime.Serialization.Formatters.Binary;
+
+namespace DummyAssembly {
+       [SerializableAttribute]
+       public class AnotherSerializable : ISerializable {
+               public string name;
+               public string value;
+
+               public AnotherSerializable ()
+               {
+               }
+
+               public AnotherSerializable (string name, string value)
+               {
+                       this.name = name;
+                       this.value = value;
+               }
+
+               public AnotherSerializable (SerializationInfo info, StreamingContext ctxt)
+               {
+                       name = (string) info.GetValue ("sername", typeof (string));
+                       value = (String) info.GetValue ("servalue", typeof (string));
+               }
+
+               public AnotherSerializable (Stream stream)
+               {
+                       BinaryFormatter bFormatter = new BinaryFormatter ();
+                       AnotherSerializable deser = (AnotherSerializable) bFormatter.Deserialize (stream);
+                       stream.Close ();
+
+                       name = deser.name;
+                       value = deser.value;
+               }
+
+               public void GetObjectData (SerializationInfo info, StreamingContext ctxt)
+               {
+                       info.AddValue ("sername", name);
+                       info.AddValue ("servalue", value);
+               }
+
+               public override string ToString ()
+               {
+                       return String.Format ("name={0};value={1}", this.name, this.value);
+               }
+
+               public override bool Equals (object obj)
+               {
+                       AnotherSerializable o = obj as AnotherSerializable;
+                       if (o == null)
+                               return false;
+                       return this.name.Equals (o.name) && this.value.Equals (o.value);
+               }
+       }
+}
+
diff --git a/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Convertable.cs b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Convertable.cs
new file mode 100644 (file)
index 0000000..7f1ea03
--- /dev/null
@@ -0,0 +1,119 @@
+//
+// Convertable.cs : Class with type converter used to test types from other
+// assemblies for resources tests
+//
+// Author:
+//     Gary Barnett (gary.barnett.mono@gmail.com)
+// 
+// Copyright (C) Gary Barnett (2012)
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, 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.Text;
+using System.Runtime.Serialization.Formatters.Binary;
+using System.IO;
+using System.Runtime.Serialization;
+using System.ComponentModel;
+
+namespace DummyAssembly {
+
+    [SerializableAttribute]
+    [TypeConverter (typeof (ConvertableConverter))]
+    public class Convertable {
+        protected string name;
+        protected string value;
+
+        public Convertable ()
+        {
+        }
+
+        public Convertable (string name, string value)
+        {
+            this.name = name;
+            this.value = value;
+        }
+        
+        public void GetObjectData (SerializationInfo info, StreamingContext ctxt)
+        {
+            info.AddValue ("sername", name);
+            info.AddValue ("servalue", value);
+        }
+
+        public override string ToString ()
+        {
+            return String.Format ("{0}\t{1}",name, value);
+        }
+
+        public override bool Equals (object obj)
+        {
+            Convertable o = obj as Convertable;
+            if (o == null)
+                return false;
+            return this.name.Equals (o.name) && this.value.Equals (o.value);
+        }
+    }
+
+    class ConvertableConverter : TypeConverter {
+        public ConvertableConverter ()
+        {
+        }
+
+        public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
+        {
+            return sourceType == typeof (string);
+        }
+
+        public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
+        {
+            return destinationType == typeof (string);
+        }
+
+        public override object ConvertFrom (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
+        {
+            if (value.GetType() != typeof (string))
+                throw new Exception ("value not string");
+
+            string serialised = (string) value;
+
+            string [] parts = serialised.Split ('\t');
+
+            if (parts.Length != 2)
+                throw new Exception ("string in incorrect format");
+
+            Convertable convertable = new Convertable (parts [0], parts [1]);
+            return convertable;
+        }
+
+        public override object ConvertTo (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
+        {
+            if (destinationType != typeof (String)) {
+                return base.ConvertTo (context, culture, value, destinationType);
+            }
+
+            return ((Convertable) value).ToString ();
+        }
+    }
+
+}
+
diff --git a/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Properties/AssemblyInfo.cs b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..73e9fef
--- /dev/null
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle ("DummyAssembly")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("DummyAssembly")]
+[assembly: AssemblyCopyright ("")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible (false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid ("c80e062b-a918-4aa5-b62c-7455ca2c56d5")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion ("1.0.0.0")]
+[assembly: AssemblyFileVersion ("1.0.0.0")]
index fb231e26345b87283d4bd439ea0091e2ecf9f617..4c6ba44c18cfe624bdc793414f489d14d756dda8 100644 (file)
@@ -144,15 +144,14 @@ namespace MonoTests.System.Resources {
                [Test]
                public void WriteRead1 ()
                {
-                       ResXResourceWriter rw = new ResXResourceWriter ("resx.resx");
                        serializable ser = new serializable ("aaaaa", "bbbbb");
                        ResXDataNode dn = new ResXDataNode ("test", ser);
                        dn.Comment = "comment";
-                       rw.AddResource (dn);
-                       rw.Close ();
+
+                       string resXFile = GetResXFileWithNode (dn, "resx.resx");
 
                        bool found = false;
-                       ResXResourceReader rr = new ResXResourceReader ("resx.resx");
+                       ResXResourceReader rr = new ResXResourceReader (resXFile);
                        rr.UseResXDataNodes = true;
                        IDictionaryEnumerator en = rr.GetEnumerator ();
                        while (en.MoveNext ()) {
@@ -224,7 +223,6 @@ namespace MonoTests.System.Resources {
                        ResXDataNode node = ((DictionaryEntry) en.Current).Value as ResXDataNode;
                        rr.Close ();
 
-                       File.Delete ("resx.resx");
                        Assert.IsNotNull (node,"#A1");
 
                        serializable o = node.GetValue ((AssemblyName []) null) as serializable;
@@ -245,7 +243,6 @@ namespace MonoTests.System.Resources {
                        ResXDataNode node = ((DictionaryEntry) en.Current).Value as ResXDataNode;
                        rr.Close ();
 
-                       File.Delete ("resx.resx");
                        Assert.IsNotNull (node, "#A1");
 
                        object o = node.GetValue ((AssemblyName []) null);
index f90a1b98c1274b9676dba4f8550b28333a30fc36..198dcda4270fd5ba275816b3b9e7fbb26e837eb1 100644 (file)
@@ -104,6 +104,7 @@ namespace MonoTests.System.Windows.Forms
                }
 
                [Test]
+               [Category ("NotWorking")] // Doesn't work under Xvfb.
                public void DataRemainsOnClipboard_Xamarin4959 ()
                {
                        // Compile an app that puts something on the clipboard
index e0261dc21bb7c26de1b10730fd316b2d82d9f73d..aef76e0777a037691ea8b9e8f55694888280905f 100644 (file)
@@ -172,6 +172,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
 
                        row.Delete ();
 
+                       Assert.AreEqual (-1, cm.Position);
+
                        // Console.WriteLine (event_log);
 
                        Assert.AreEqual (
@@ -221,6 +223,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
 
                        row.Delete ();
 
+                       Assert.AreEqual (0, cm.Position);
+
                        Console.WriteLine (event_log);
 
                        Assert.AreEqual (
@@ -273,6 +277,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
 
                        row.Delete ();
 
+                       Assert.AreEqual (0, cm.Position);
+
                        Console.WriteLine (event_log);
 
 #if WITH_BINDINGS
@@ -323,6 +329,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
 
                        row.Delete ();
 
+                       Assert.AreEqual (0, cm.Position);
+
                        Console.WriteLine (event_log);
 
                        Assert.AreEqual (
@@ -379,6 +387,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
                        DataRow newrow = dataSet1.Tables[0].NewRow ();
                        dataSet1.Tables[0].Rows.Add(newrow);
 
+                       Assert.AreEqual (0, cm.Position);
+
                        Console.WriteLine (event_log);
 
                        Assert.AreEqual (
@@ -434,6 +444,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
                        newrow = dataSet1.Tables[0].NewRow ();
                        dataSet1.Tables[0].Rows.Add(newrow);
 
+                       Assert.AreEqual (0, cm.Position);
+
                        Console.WriteLine (event_log);
 
 #if WITH_BINDINGS
@@ -489,6 +501,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
                        newrow = dataSet1.Tables[0].NewRow ();
                        dataSet1.Tables[0].Rows.InsertAt(newrow, 0);
 
+                       Assert.AreEqual (2, cm.Position);
+
                        Console.WriteLine (event_log);
 
                        Assert.AreEqual (
@@ -547,6 +561,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
                        newrow = dataSet1.Tables[0].NewRow ();
                        dataSet1.Tables[0].Rows.InsertAt(newrow, 1);
 
+                       Assert.AreEqual (2, cm.Position);
+
                        Console.WriteLine (event_log);
 
                        Assert.AreEqual (
@@ -596,6 +612,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
 
                        dataSet1.Tables[0].Columns.Add();
 
+                       Assert.AreEqual (-1, cm.Position);
+
                        Console.WriteLine (event_log);
 
 #if NET_2_0                    
@@ -635,6 +653,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
 
                        dataSet1.Tables[0].Columns.Remove(dataSet1.Tables[0].Columns[1]);
 
+                       Assert.AreEqual (-1, cm.Position);
+
                        Console.WriteLine (event_log);
                        
                        Assert.AreEqual ("0: MetaDataChanged\n", event_log, "2");
@@ -672,6 +692,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
 
                        dataSet1.Tables[0].Columns.Remove(dataSet1.Tables[0].Columns[0]);
 
+                       Assert.AreEqual (-1, cm.Position);
+
                        Console.WriteLine (event_log);
                        
                        Assert.AreEqual ("0: MetaDataChanged\n", event_log, "3");
@@ -717,6 +739,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
 
                        dataSet1.Tables[0].Columns[0].ColumnName = "new name";
 
+                       Assert.AreEqual (-1, cm.Position);
+
                        Console.WriteLine (event_log);
                        
                        Assert.AreEqual ("0: MetaDataChanged\n", event_log, "3");
@@ -775,6 +799,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
                        row[column_name] = "hi";
                        row.EndEdit ();
 
+                       Assert.AreEqual (0, cm.Position);
+
                        Console.WriteLine (event_log);
 
                        Assert.AreEqual (
@@ -834,6 +860,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
                        row[column_name] = "hi";
                        cm.CancelCurrentEdit ();
 
+                       Assert.AreEqual (0, cm.Position);
+
                        Console.WriteLine (event_log);
                        Assert.AreEqual ("0: ItemChanged (index = 0)\n", event_log, "2");
 
@@ -875,6 +903,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
                        DataRowView row = (DataRowView)cm.Current;
                        row.Delete ();
 
+                       Assert.AreEqual (-1, cm.Position);
+
                        Console.WriteLine (event_log);
 
                        Assert.AreEqual (
index 9a7e9bcfb4072c39898c3075d7389a0cf751ae41..9712812c29459c740c810c5a642dd6cfadc778b8 100644 (file)
@@ -642,6 +642,7 @@ namespace MonoTests.System.Windows.Forms
                private static int oipt_t1 = 0;
                private static int oipt_t2 = 0;
                [Test]
+               [NUnit.Framework.Category ("NotWorking")]
                public void OneIdlePerThread () {
                        Thread t = Thread.CurrentThread;
                        oipt_t1 = t.ManagedThreadId;
index f6f5fadb7df800a00159edd72fc76b254c96b3a9..4fac9f436ca5607cef5cc90e693448cbee76000e 100644 (file)
@@ -1,18 +1,96 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>
 <root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
     <xsd:element name="root" msdata:IsDataSet="true">
       <xsd:complexType>
         <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
           <xsd:element name="data">
             <xsd:complexType>
               <xsd:sequence>
                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
               <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
           <xsd:element name="resheader">
       </xsd:complexType>
     </xsd:element>
   </xsd:schema>
-<resheader name="resmimetype"><value>text/microsoft-resx</value></resheader><resheader name="version"><value>1.3</value></resheader><resheader name="reader"><value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader><resheader name="writer"><value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader><data name="keyboard_table" mimetype="application/x-microsoft.net.object.binary.base64"><value>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eA0AAAl5DQAACXoNAAAJew0AAAl8DQAACX0NAAAJfg0AAAl/DQAACYANAAAJgQ0AAAmCDQAAD0MBAAACAAAAD2AAAAB+AAAAD0QBAAACAAAADzEAAAAhAAAAD0UBAAACAAAADzIAAABAAAAAD0YBAAACAAAADzMAAAAjAAAAD0cBAAACAAAADzQAAAAkAAAAD0gBAAACAAAADzUAAAAlAAAAD0kBAAACAAAADzYAAABeAAAAD0oBAAACAAAADzcAAAAmAAAAD0sBAAACAAAADzgAAAAqAAAAD0wBAAACAAAADzkAAAAoAAAAD00BAAACAAAADzAAAAApAAAAD04BAAACAAAADy0AAABfAAAAD08BAAACAAAADz0AAAArAAAAD1ABAAACAAAAD3EAAABRAAAAD1EBAAACAAAAD3cAAABXAAAAD1IBAAACAAAAD2UAAABFAAAAD1MBAAACAAAAD3IAAABSAAAAD1QBAAACAAAAD3QAAABUAAAAD1UBAAACAAAAD3kAAABZAAAAD1YBAAACAAAAD3UAAABVAAAAD1cBAAACAAAAD2kAAABJAAAAD1gBAAACAAAAD28AAABPAAAAD1kBAAACAAAAD3AAAABQAAAAD1oBAAACAAAAD1sAAAB7AAAAD1sBAAACAAAAD10AAAB9AAAAD1wBAAACAAAAD2EAAABBAAAAD10BAAACAAAAD3MAAABTAAAAD14BAAACAAAAD2QAAABEAAAAD18BAAACAAAAD2YAAABGAAAAD2ABAAACAAAAD2cAAABHAAAAD2EBAAACAAAAD2gAAABIAAAAD2IBAAACAAAAD2oAAABKAAAAD2MBAAACAAAAD2sAAABLAAAAD2QBAAACAAAAD2wAAABMAAAAD2UBAAACAAAADzsAAAA6AAAAD2YBAAACAAAADycAAAAiAAAAD2cBAAACAAAAD1wAAAB8AAAAD2gBAAACAAAAD3oAAABaAAAAD2kBAAACAAAAD3gAAABYAAAAD2oBAAACAAAAD2MAAABDAAAAD2sBAAACAAAAD3YAAABWAAAAD2wBAAACAAAAD2IAAABCAAAAD20BAAACAAAAD24AAABOAAAAD24BAAACAAAAD20AAABNAAAAD28BAAACAAAADywAAAA8AAAAD3ABAAACAAAADy4AAAA+AAAAD3EBAAACAAAADy8AAAA/AAAAD3IBAAAAAAAADw9zAQAAAAAAAA8PdAEAAAIAAAAPYAAAAH4AAAAPdQEAAAIAAAAPMQAAACEAAAAPdgEAAAIAAAAPMgAAAEAAAAAPdwEAAAIAAAAPMwAAACMAAAAPeAEAAAIAAAAPNAAAACQAAAAPeQEAAAIAAAAPNQAAACUAAAAPegEAAAIAAAAPNgAAAF4AAAAPewEAAAIAAAAPNwAAACYAAAAPfAEAAAIAAAAPOAAAACoAAAAPfQEAAAIAAAAPOQAAACgAAAAPfgEAAAIAAAAPMAAAACkAAAAPfwEAAAIAAAAPLQAAAF8AAAAPgAEAAAIAAAAPPQAAACsAAAAPgQEAAAIAAAAPcQAAAFEAAAAPggEAAAIAAAAPdwAAAFcAAAAPgwEAAAIAAAAPZQAAAEUAAAAPhAEAAAIAAAAPcgAAAFIAAAAPhQEAAAIAAAAPdAAAAFQAAAAPhgEAAAIAAAAPeQAAAFkAAAAPhwEAAAIAAAAPdQAAAFUAAAAPiAEAAAIAAAAPaQAAAEkAAAAPiQEAAAIAAAAPbwAAAE8AAAAPigEAAAIAAAAPcAAAAFAAAAAPiwEAAAIAAAAPWwAAAHsAAAAPjAEAAAIAAAAPXQAAAH0AAAAPjQEAAAIAAAAPYQAAAEEAAAAPjgEAAAIAAAAPcwAAAFMAAAAPjwEAAAIAAAAPZAAAAEQAAAAPkAEAAAIAAAAPZgAAAEYAAAAPkQEAAAIAAAAPZwAAAEcAAAAPkgEAAAIAAAAPaAAAAEgAAAAPkwEAAAIAAAAPagAAAEoAAAAPlAEAAAIAAAAPawAAAEsAAAAPlQEAAAIAAAAPbAAAAEwAAAAPlgEAAAIAAAAPOwAAADoAAAAPlwEAAAIAAAAPJwAAACIAAAAPmAEAAAIAAAAPXAAAAHwAAAAPmQEAAAIAAAAPegAAAFoAAAAPmgEAAAIAAAAPeAAAAFgAAAAPmwEAAAIAAAAPYwAAAEMAAAAPnAEAAAIAAAAPdgAAAFYAAAAPnQEAAAIAAAAPYgAAAEIAAAAPngEAAAIAAAAPbgAAAE4AAAAPnwEAAAIAAAAPbQAAAE0AAAAPoAEAAAIAAAAPLAAAADwAAAAPoQEAAAIAAAAPLgAAAD4AAAAPogEAAAIAAAAPLwAAAD8AAAAPowEAAAIAAAAPPAAAAD4AAAAPpAEAAAAAAAAPD6UBAAACAAAAD2AAAAB+AAAAD6YBAAACAAAADzEAAAAhAAAAD6cBAAACAAAADzIAAABAAAAAD6gBAAACAAAADzMAAAAjAAAAD6kBAAACAAAADzQAAAAkAAAAD6oBAAACAAAADzUAAAAlAAAAD6sBAAACAAAADzYAAABeAAAAD6wBAAACAAAADzcAAAAmAAAAD60BAAACAAAADzgAAAAqAAAAD64BAAACAAAADzkAAAAoAAAAD68BAAACAAAADzAAAAApAAAAD7ABAAACAAAAD1sAAAB7AAAAD7EBAAACAAAAD10AAAB9AAAAD7IBAAACAAAADycAAAAiAAAAD7MBAAACAAAADywAAAA8AAAAD7QBAAACAAAADy4AAAA+AAAAD7UBAAACAAAAD3AAAABQAAAAD7YBAAACAAAAD3kAAABZAAAAD7cBAAACAAAAD2YAAABGAAAAD7gBAAACAAAAD2cAAABHAAAAD7kBAAACAAAAD2MAAABDAAAAD7oBAAACAAAAD3IAAABSAAAAD7sBAAACAAAAD2wAAABMAAAAD7wBAAACAAAADy8AAAA/AAAAD70BAAACAAAADz0AAAArAAAAD74BAAACAAAAD2EAAABBAAAAD78BAAACAAAAD28AAABPAAAAD8ABAAACAAAAD2UAAABFAAAAD8EBAAACAAAAD3UAAABVAAAAD8IBAAACAAAAD2kAAABJAAAAD8MBAAACAAAAD2QAAABEAAAAD8QBAAACAAAAD2gAAABIAAAAD8UBAAACAAAAD3QAAABUAAAAD8YBAAACAAAAD24AAABOAAAAD8cBAAACAAAAD3MAAABTAAAAD8gBAAACAAAADy0AAABfAAAAD8kBAAACAAAAD1wAAAB8AAAAD8oBAAACAAAADzsAAAA6AAAAD8sBAAACAAAAD3EAAABRAAAAD8wBAAACAAAAD2oAAABKAAAAD80BAAACAAAAD2sAAABLAAAAD84BAAACAAAAD3gAAABYAAAAD88BAAACAAAAD2IAAABCAAAAD9ABAAACAAAAD20AAABNAAAAD9EBAAACAAAAD3cAAABXAAAAD9IBAAACAAAAD3YAAABWAAAAD9MBAAACAAAAD3oAAABaAAAAD9QBAAAAAAAADw/VAQAAAAAAAA8P1gEAAAIAAAAPYAAAAH4AAAAP1wEAAAIAAAAPMQAAACEAAAAP2AEAAAIAAAAPMgAAAEAAAAAP2QEAAAIAAAAPMwAAACMAAAAP2gEAAAIAAAAPNAAAACQAAAAP2wEAAAIAAAAPNQAAACUAAAAP3AEAAAIAAAAPNgAAAF4AAAAP3QEAAAIAAAAPNwAAACYAAAAP3gEAAAIAAAAPOAAAACoAAAAP3wEAAAIAAAAPOQAAACgAAAAP4AEAAAIAAAAPMAAAACkAAAAP4QEAAAIAAAAPLQAAAF8AAAAP4gEAAAIAAAAPPQAAACsAAAAP4wEAAAIAAAAPXAAAAHwAAAAP5AEAAAIAAAAPcQAAAFEAAAAP5QEAAAIAAAAPdwAAAFcAAAAP5gEAAAIAAAAPZQAAAEUAAAAP5wEAAAIAAAAPcgAAAFIAAAAP6AEAAAIAAAAPdAAAAFQAAAAP6QEAAAIAAAAPeQAAAFkAAAAP6gEAAAIAAAAPdQAAAFUAAAAP6wEAAAIAAAAPaQAAAEkAAAAP7AEAAAIAAAAPbwAAAE8AAAAP7QEAAAIAAAAPcAAAAFAAAAAP7gEAAAIAAAAPWwAAAHsAAAAP7wEAAAIAAAAPXQAAAH0AAAAP8AEAAAIAAAAPYQAAAEEAAAAP8QEAAAIAAAAPcwAAAFMAAAAP8gEAAAIAAAAPZAAAAEQAAAAP8wEAAAIAAAAPZgAAAEYAAAAP9AEAAAIAAAAPZwAAAEcAAAAP9QEAAAIAAAAPaAAAAEgAAAAP9gEAAAIAAAAPagAAAEoAAAAP9wEAAAIAAAAPawAAAEsAAAAP+AEAAAIAAAAPbAAAAEwAAAAP+QEAAAIAAAAPOwAAADoAAAAP+gEAAAIAAAAPJwAAACIAAAAP+wEAAAIAAAAPegAAAFoAAAAP/AEAAAIAAAAPeAAAAFgAAAAP/QEAAAIAAAAPYwAAAEMAAAAP/gEAAAIAAAAPdgAAAFYAAAAP/wEAAAIAAAAPYgAAAEIAAAAPAAIAAAIAAAAPbgAAAE4AAAAPAQIAAAIAAAAPbQAAAE0AAAAPAgIAAAIAAAAPLAAAADwAAAAPAwIAAAIAAAAPLgAAAD4AAAAPBAIAAAIAAAAPLwAAAD8AAAAPBQIAAAAAAAAPDwYCAAAAAAAADw8HAgAAAQAAAA9gAAAADwgCAAACAAAADzEAAAAhAAAADwkCAAACAAAADzIAAAAiAAAADwoCAAACAAAADzMAAACj////DwsCAAACAAAADzQAAAAkAAAADwwCAAACAAAADzUAAAAlAAAADw0CAAACAAAADzYAAABeAAAADw4CAAACAAAADzcAAAAmAAAADw8CAAACAAAADzgAAAAqAAAADxACAAACAAAADzkAAAAoAAAADxECAAACAAAADzAAAAApAAAADxICAAACAAAADy0AAABfAAAADxMCAAACAAAADz0AAAArAAAADxQCAAACAAAAD3EAAABRAAAADxUCAAACAAAAD3cAAABXAAAADxYCAAACAAAAD2UAAABFAAAADxcCAAACAAAAD3IAAABSAAAADxgCAAACAAAAD3QAAABUAAAADxkCAAACAAAAD3kAAABZAAAADxoCAAACAAAAD3UAAABVAAAADxsCAAACAAAAD2kAAABJAAAADxwCAAACAAAAD28AAABPAAAADx0CAAACAAAAD3AAAABQAAAADx4CAAACAAAAD1sAAAB7AAAADx8CAAACAAAAD10AAAB9AAAADyACAAACAAAAD2EAAABBAAAADyECAAACAAAAD3MAAABTAAAADyICAAACAAAAD2QAAABEAAAADyMCAAACAAAAD2YAAABGAAAADyQCAAACAAAAD2cAAABHAAAADyUCAAACAAAAD2gAAABIAAAADyYCAAACAAAAD2oAAABKAAAADycCAAACAAAAD2sAAABLAAAADygCAAACAAAAD2wAAABMAAAADykCAAACAAAADzsAAAA6AAAADyoCAAACAAAADycAAABAAAAADysCAAACAAAADyMAAAB+AAAADywCAAACAAAAD3oAAABaAAAADy0CAAACAAAAD3gAAABYAAAADy4CAAACAAAAD2MAAABDAAAADy8CAAACAAAAD3YAAABWAAAADzACAAACAAAAD2IAAABCAAAADzECAAACAAAAD24AAABOAAAADzICAAACAAAAD20AAABNAAAADzMCAAACAAAADywAAAA8AAAADzQCAAACAAAADy4AAAA+AAAADzUCAAACAAAADy8AAAA/AAAADzYCAAACAAAAD1wAAAB8AAAADzcCAAAAAAAADw84AgAAAgAAAA9eAAAAsP///w85AgAAAgAAAA8xAAAAIQAAAA86AgAAAgAAAA8yAAAAIgAAAA87AgAAAgAAAA8zAAAAp////w88AgAAAgAAAA80AAAAJAAAAA89AgAAAgAAAA81AAAA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AAAvAAAADzUDAAACAAAADzgAAAAoAAAADzYDAAACAAAADzkAAAApAAAADzcDAAACAAAADzAAAAA9AAAADzgDAAACAAAADycAAAA/AAAADzkDAAACAAAAD14AAABgAAAADzoDAAACAAAAD3EAAABRAAAADzsDAAACAAAAD3cAAABXAAAADzwDAAACAAAAD2UAAABFAAAADz0DAAACAAAAD3IAAABSAAAADz4DAAACAAAAD3QAAABUAAAADz8DAAACAAAAD3oAAABaAAAAD0ADAAACAAAAD3UAAABVAAAAD0EDAAACAAAAD2kAAABJAAAAD0IDAAACAAAAD28AAABPAAAAD0MDAAACAAAAD3AAAABQAAAAD0QDAAACAAAAD+j////8////D0UDAAACAAAAD6j///8hAAAAD0YDAAACAAAAD2EAAABBAAAAD0cDAAACAAAAD3MAAABTAAAAD0gDAAACAAAAD2QAAABEAAAAD0kDAAACAAAAD2YAAABGAAAAD0oDAAACAAAAD2cAAABHAAAAD0sDAAACAAAAD2gAAABIAAAAD0wDAAACAAAAD2oAAABKAAAAD00DAAACAAAAD2sAAABLAAAAD04DAAACAAAAD2wAAABMAAAAD08DAAACAAAAD+n////2////D1ADAAACAAAAD+D////k////D1EDAAACAAAADyQAAACj////D1IDAAACAAAAD3kAAABZAAAAD1MDAAACAAAAD3gAAABYAAAAD1QDAAACAAAAD2MAAABDAAAAD1UDAAACAAAAD3YAAABWAAAAD1YDAAACAAAAD2IAAABCAAAAD1cDAAACAAAAD24AAABOAAAAD1gDAAACAAAAD20AAABNAAAAD1kDAAACAAAADywAAAA7AAAAD1oDAAACAAAADy4AAAA6AAAAD1sDAAACAAAADy0AAABfAAAAD1wDAAACAAAADzwAAAA+AAAAD10DAAAAAAAADw9eAwAAAgAAAA+n////vf///w9fAwAAAgAAAA8xAAAAIQAAAA9gAwAAAgAAAA8yAAAAIgAAAA9hAwAAAgAAAA8zAAAAIwAAAA9iAwAAAgAAAA80AAAApP///w9jAwAAAgAAAA81AAAAJQAAAA9kAwAAAgAAAA82AAAAJgAAAA9lAwAAAgAAAA83AAAALwAAAA9mAwAAAgAAAA84AAAAKAAAAA9n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D4wEAAACAAAADzgAAAAqAAAAD40EAAACAAAADzkAAAAoAAAAD44EAAACAAAADzAAAAApAAAAD48EAAACAAAADy0AAABfAAAAD5AEAAACAAAADz0AAAArAAAAD5EEAAACAAAAD3EAAABRAAAAD5IEAAACAAAAD3cAAABXAAAAD5MEAAACAAAAD2UAAABFAAAAD5QEAAACAAAAD3IAAABSAAAAD5UEAAACAAAAD3QAAABUAAAAD5YEAAACAAAAD3kAAABZAAAAD5cEAAACAAAAD3UAAABVAAAAD5gEAAACAAAAD2kAAABJAAAAD5kEAAACAAAAD28AAABPAAAAD5oEAAACAAAAD3AAAABQAAAAD5sEAAACAAAAD14AAABeAAAAD5wEAAACAAAAD7j///+o////D50EAAACAAAAD2EAAABBAAAAD54EAAACAAAAD3MAAABTAAAAD58EAAACAAAAD2QAAABEAAAAD6AEAAACAAAAD2YAAABGAAAAD6EEAAACAAAAD2cAAABHAAAAD6IEAAACAAAAD2gAAABIAAAAD6MEAAACAAAAD2oAAABKAAAAD6QEAAACAAAAD2sAAABLAAAAD6UEAAACAAAAD2wAAABMAAAAD6YEAAACAAAADzsAAAA6AAAAD6cEAAACAAAAD2AAAABgAAAAD6gEAAACAAAADzwAAAA+AAAAD6kEAAACAAAAD3oAAABaAAAAD6oEAAACAAAAD3gAAABYAAAAD6sEAAACAAAAD2MAAABDAAAAD6wEAAACAAAAD3YAAABWAAAAD60EAAACAAAAD2IAAABCAAAAD64EAAACAAAAD24AAABOAAAAD68EAAACAAAAD20AAABNAAAAD7AEAAACAAAADywAAAAnAAAAD7EEAAABAAAADy4AAAAPsgQAAAIAAAAP6f///8n///8PswQAAAIAAAAPq////7v///8PtAQAAAAAAAAPD7UEAAACAAAADy8AAABcAAAAD7YEAAAEAAAADzEAAAAhAAAAuf///6H///8PtwQAAAMAAAAPMgAAAEAAAACy////D7gEAAAEAAAADzMAAAAjAAAAs////6P///8PuQQAAAQAAAAPNAAAACQAAAC8////pP///w+6BAAAAwAAAA81AAAAJQAAAL3///8PuwQAAAMAAAAPNgAAAD8AAAC+////D7wEAAACAAAADzcAAAAmAAAAD70EAAACAAAADzgAAAAqAAAAD74EAAACAAAADzkAAAAoAAAAD78EAAACAAAADzAAAAApAAAAD8AEAAACAAAADy0AAABfAAAAD8EEAAACAAAADz0AAAArAAAAD8IEAAACAAAAD3EAAABRAAAAD8MEAAACAAAAD3cAAABXAAAAD8QEAAACAAAAD2UAAABFAAAAD8UEAAACAAAAD3IAAABSAAAAD8YEAAACAAAAD3QAAABUAAAAD8cEAAACAAAAD3kAAABZAAAAD8gEAAACAAAAD3UAAABVAAAAD8kEAAACAAAAD2kAAABJAAAAD8oEAAAEAAAAD28AAABPAAAA+P///9j///8PywQAAAQAAAAPcAAAAFAAAAD+////3v///w/MBAAAAwAAAA9eAAAAqP///6j///8PzQQAAAMAAAAP5////8f///9+AAAAD84EAAAEAAAAD2EAAABBAAAA5v///8b///8PzwQAAAQAAAAPcwAAAFMAAADf////p////w/QBAAABAAAAA9kAAAARAAAAPD////Q////D9EEAAACAAAAD2YAAABGAAAAD9IEAAACAAAAD2cAAABHAAAAD9MEAAACAAAAD2gAAABIAAAAD9QEAAACAAAAD2oAAABKAAAAD9UEAAACAAAAD2sAAABLAAAAD9YEAAACAAAAD2wAAABMAAAAD9cEAAADAAAADzsAAAA6AAAAtP///w/YBAAAAgAAAA/o////yP///w/ZBAAAAgAAAA/g////wP///w/aBAAAAgAAAA96AAAAWgAAAA/bBAAAAgAAAA94AAAAWAAAAA/cBAAABAAAAA9jAAAAQwAAAKL///+p////D90EAAACAAAAD3YAAABWAAAAD94EAAACAAAAD2IAAABCAAAAD98EAAACAAAAD24AAABOAAAAD+AEAAAEAAAAD20AAABNAAAAtf///7r///8P4QQAAAIAAAAPLAAAACcAAAAP4gQAAAQAAAAPLgAAACIAAAC3////9////w/jBAAAAgAAAA/p////yf///w/kBAAAAgAAAA/5////2f///w/lBAAAAAAAAA8P5gQAAAAAAAAPD+cEAAADAAAADyYAAAAxAAAAfAAAAA/oBAAAAwAAAA/p////MgAAAEAAAAAP6QQAAAMAAAAPIgAAADMAAAAjAAAAD+oEAAACAAAADycAAAA0AAAAD+sEAAACAAAADygAAAA1AAAAD+wEAAADAAAAD6f///82AAAAXgAAAA/tBAAAAgAAAA/o////NwAAAA/uBAAAAgAAAA8hAAAAOAAAAA/vBAAAAwAAAA/n////OQAAAHsAAAAP8AQAAAMAAAAP4P///zAAAAB9AAAAD/EEAAACAAAADykAAACw////D/IEAAACAAAADy0AAABfAAAAD/MEAAACAAAAD2EAAABBAAAAD/QEAAACAAAAD3oAAABaAAAAD/UEAAADAAAAD2UAAABFAAAApP///w/2BAAAAgAAAA9yAAAAUgAAAA/3BAAAAgAAAA90AAAAVAAAAA/4BAAAAgAAAA95AAAAWQAAAA/5BAAAAgAAAA91AAAAVQAAAA/6BAAAAgAAAA9pAAAASQAAAA/7BAAAAgAAAA9vAAAATwAAAA/8BAAAAgAAAA9wAAAAUAAAAA/9BAAAAwAAAA9eAAAAqP///1sAAAAP/gQAAAMAAAAPJAAAACoAAABdAAAAD/8EAAACAAAAD3EAAABRAAAADwAFAAADAAAAD3MAAABTAAAA3////w8BBQAAAgAAAA9kAAAARAAAAA8CBQAAAgAAAA9mAAAARgAAAA8DBQAAAgAAAA9nAAAARwAAAA8EBQAAAgAAAA9oAAAASAAAAA8FBQAAAgAAAA9qAAAASgAAAA8GBQAAAgAAAA9rAAAASwAAAA8HBQAAAgAAAA9sAAAATAAAAA8IBQAAAgAAAA9tAAAATQAAAA8JBQAAAwAAAA/5////JQAAALT///8PCgUAAAMAAAAPtf///6P///9gAAAADwsFAAACAAAAD3cAAABXAAAADwwFAAACAAAAD3gAAABYAAAADw0FAAACAAAAD2MAAABDAAAADw4FAAACAAAAD3YAAABWAAAADw8FAAACAAAAD2IAAABCAAAADxAFAAACAAAAD24AAABOAAAADxEFAAACAAAADywAAAA/AAAADxIFAAACAAAADzsAAAAuAAAADxMFAAACAAAADzoAAAAvAAAADxQFAAADAAAADz0AAAArAAAAfgAAAA8VBQAAAwAAAA88AAAAPgAAAFwAAAAPFgUAAAAAAAAPDxcFAAACAAAAD1wAAAB8AAAADxgFAAACAAAADzEAAAAhAAAADxkFAAACAAAADzIAAAAiAAAADxoFAAACAAAADzMAAAAjAAAADxsFAAACAAAADzQAAAAkAAAADxwFAAACAAAADzUAAAAlAAAADx0FAAACAAAADzYAAAAmAAAADx4FAAACAAAADzcAAAAvAAAADx8FAAACAAAADzgAAAAoAAAADyAFAAACAAAADzkAAAApAAAADyEFAAACAAAADzAAAAA9AAAADyIFAAACAAAADycAAAA/AAAADyMFAAACAAAAD6v///+7////DyQFAAACAAAAD3EAAABRAAAADyUFAAACAAAAD3cAAABXAAAADyYFAAACAAAAD2UAAABFAAAADycFAAACAAAAD3IAAABSAAAADygFAAACAAAAD3QAAABUAAAADykFAAACAAAAD3kAAABZAAAADyoFAAACAAAAD3UAAABVAAAADysFAAACAAAAD2kAAABJAAAADywFAAACAAAAD28AAABPAAAADy0FAAACAAAAD3AAAABQAAAADy4FAAACAAAADysAAAAqAAAADy8FAAACAAAAD7T///9gAAAADzAFAAACAAAAD2EAAABBAAAADzEFAAACAAAAD3MAAABTAAAADzIFAAACAAAAD2QAAABEAAAADzMFAAACAAAAD2YAAABGAAAADzQFAAACAAAAD2cAAABHAAAADzUFAAACAAAAD2gAAABIAAAADzYFAAACAAAAD2oAAABKAAAADzcFAAACAAAAD2sAAABLAAAADzgFAAACAAAAD2wAAABMAAAADzkFAAACAAAAD+f////H////DzoFAAACAAAAD7r///+q////DzsFAAACAAAAD34AAABeAAAADzwFAAACAAAAD3oAAABaAAAADz0FAAACAAAAD3gAAABYAAAADz4FAAACAAAAD2MAAABDAAAADz8FAAACAAAAD3YAAABWAAAAD0AFAAACAAAAD2IAAABCAAAAD0EFAAACAAAAD24AAABOAAAAD0IFAAACAAAAD20AAABNAAAAD0MFAAACAAAADywAAAA7AAAAD0QFAAACAAAADy4AAAA6AAAAD0UFAAACAAAADy0AAABfAAAAD0YFAAACAAAADzwAAAA+AAAAD0cFAAAAAAAADw9IBQAAAgAAAA8nAAAAIgAAAA9JBQAAAgAAAA8xAAAAIQAAAA9KBQAAAgAAAA8yAAAAQAAAAA9LBQAAAgAAAA8zAAAAIwAAAA9MBQAAAgAAAA80AAAAJAAAAA9N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NAAAACIAAAAP4AUAAAIAAAAPNQAAACUAAAAP4QUAAAQAAAAPNgAAAF4AAAA2AAAAPQAAAA/iBQAABAAAAA83AAAAJgAAADcAAAA6AAAAD+MFAAAEAAAADzgAAAAqAAAAOAAAAC8AAAAP5AUAAAIAAAAPOQAAACgAAAAP5QUAAAIAAAAPMAAAACkAAAAP5gUAAAQAAAAPLQAAAF8AAAAtAAAASQAAAA/nBQAABAAAAA89AAAAKwAAAC4AAABWAAAAD+gFAAAEAAAAD3EAAABRAAAALAAAAPv///8P6QUAAAQAAAAPdwAAAFcAAADz////0////w/qBQAABAAAAA9lAAAARQAAAOX////F////D+sFAAAEAAAAD3IAAABSAAAA6P///8j///8P7AUAAAQAAAAPdAAAAFQAAAD4////2P///w/tBQAABAAAAA95AAAAWQAAAPn////Z////D+4FAAAEAAAAD3UAAABVAAAA6v///8r///8P7wUAAAQAAAAPaQAAAEkAAADx////0f///w/wBQAABAAAAA9vAAAATwAAAOT////E////D/EFAAAEAAAAD3AAAABQAAAA5////8f///8P8gUAAAQAAAAPWwAAAHsAAAD2////1v///w/zBQAAAwAAAA9dAAAAfQAAADsAAAAP9AUAAAQAAAAPYQAAAEEAAAD8////3P///w/1BQAABAAAAA9zAAAAUwAAAP/////f////D/YFAAAEAAAAD2QAAABEAAAA4P///8D///8P9wUAAAQAAAAPZgAAAEYAAADu////zv///w/4BQAABAAAAA9nAAAARwAAAOb////G////D/kFAAAEAAAAD2gAAABIAAAA4////8P///8P+gUAAAQAAAAPagAAAEoAAADy////0v///w/7BQAABAAAAA9rAAAASwAAAO3////N////D/wFAAAEAAAAD2wAAABMAAAA4v///8L///8P/QUAAAQAAAAPOwAAADoAAADs////zP///w/+BQAABAAAAA8nAAAAIgAAAPf////X////D/8FAAAEAAAAD1wAAAB8AAAAJwAAANv///8PAAYAAAQAAAAPegAAAFoAAAD+////3v///w8BBgAABAAAAA94AAAAWAAAAOn////J////DwIGAAAEAAAAD2MAAABDAAAA+v///9r///8PAwYAAAQAAAAPdgAAAFYAAAD9////3f///w8EBgAABAAAAA9iAAAAQgAAAPT////U////DwUGAAAEAAAAD24AAABOAAAA9f///9X///8PBgYAAAQAAAAPbQAAAE0AAADv////z////w8HBgAABAAAAA8sAAAAPAAAAPD////Q////DwgGAAAEAAAADy4AAAA+AAAA6////8v///8PCQYAAAQAAAAPLwAAAD8AAADh////wf///w8KBgAAAgAAAA88AAAAPgAAAA8LBgAAAAAAAA8PDAYAAAQAAAAPYAAAAH4AAAD3////1////w8NBgAAAgAAAA8xAAAAIQAAAA8OBgAAAgAAAA8yAAAAQAAAAA8PBgAAAgAAAA8zAAAAIwAAAA8QBgAAAgAAAA80AAAAJAAAAA8RBgAAAgAAAA81AAAAJQAAAA8SBgAAAgAAAA82AAAAXgAAAA8TBgAAAgAAAA83AAAAJgAAAA8UBgAAAgAAAA84AAAAKgAAAA8VBgAAAgAAAA85AAAAKAAAAA8WBgAAAgAAAA8wAAAAKQAAAA8XBgAAAgAAAA8tAAAAXwAAAA8YBgAAAgAAAA89AAAAKwAAAA8ZBgAABAAAAA9xAAAAUQAAAP/////f////DxoGAAAEAAAAD3cAAABXAAAA4v///8L///8PGwYAAAQAAAAPZQAAAEUAAADl////xf///w8cBgAABAAAAA9yAAAAUgAAAPD////Q////Dx0GAAAEAAAAD3QAAABUAAAA8v///9L///8PHgYAAAQAAAAPeQAAAFkAAAD6////2v///w8fBgAABAAAAA91AAAAVQAAAPP////T////DyAGAAAEAAAAD2kAAABJAAAA6P///8j///8PIQYAAAQAAAAPbwAAAE8AAADu////zv///w8iBgAABAAAAA9wAAAAUAAAAO/////P////DyMGAAAEAAAAD1sAAAB7AAAA+P///9j///8PJAYAAAQAAAAPXQAAAH0AAAD5////2f///w8lBgAABAAAAA9hAAAAQQAAAOD////A////DyYGAAAEAAAAD3MAAABTAAAA8f///9H///8PJwYAAAQAAAAPZAAAAEQAAADk////xP///w8oBgAABAAAAA9mAAAARgAAAPT////U////DykGAAAEAAAAD2cAAABHAAAA4////8P///8PKgYAAAQAAAAPaAAAAEgAAAD1////1f///w8rBgAABAAAAA9qAAAASgAAAOn////J////DywGAAAEAAAAD2sAAABLAAAA6v///8r///8PLQYAAAQAAAAPbAAAAEwAAADr////y////w8uBgAAAgAAAA87AAAAOgAAAA8vBgAAAgAAAA8nAAAAIgAAAA8wBgAABAAAAA9cAAAAfAAAAP7////e////DzEGAAAEAAAAD3oAAABaAAAA5////8f///8PMgYAAAQAAAAPeAAAAFgAAAD8////3P///w8zBgAABAAAAA9jAAAAQwAAAPb////W////DzQGAAAEAAAAD3YAAABWAAAA5v///8b///8PNQYAAAQAAAAPYgAAAEIAAADh////wf///w82BgAABAAAAA9uAAAATgAAAO3////N////DzcGAAAEAAAAD20AAABNAAAA7P///8z///8POAYAAAIAAAAPLAAAADwAAAAPOQYAAAIAAAAPLgAAAD4AAAAPOgYAAAIAAAAPLwAAAD8AAAAPOwYAAAIAAAAPPAAAAD4AAAAPPAYAAAAAAAAPDz0GAAAEAAAAD2AAAAB+AAAAo////7P///8PPgYAAAIAAAAPMQAAACEAAAAPPwYAAAIAAAAPMgAAAEAAAAAPQAYAAAIAAAAPMwAAACMAAAAPQQYAAAIAAAAPNAAAACQAAAAPQgYAAAIAAAAPNQAAACUAAAAPQwYAAAIAAAAPNgAAAF4AAAAPRAYAAAIAAAAPNwAAACYAAAAPRQYAAAIAAAAPOAAAACoAAAAPRgYAAAIAAAAPOQAAACgAAAAPRwYAAAIAAAAPMAAAACkAAAAPSAYAAAIAAAAPLQAAAF8AAAAPSQYAAAIAAAAPPQAAACsAAAAPSgYAAAQAAAAPcQAAAFEAAADK////6v///w9LBgAABAAAAA93AAAAVwAAAMP////j////D0wGAAAEAAAAD2UAAABFAAAA1f////X///8PTQYAAAQAAAAPcgAAAFIAAADL////6////w9OBgAABAAAAA90AAAAVAAAAMX////l////D08GAAAEAAAAD3kAAABZAAAAzv///+7///8PUAYAAAQAAAAPdQAAAFUAAADH////5////w9RBgAABAAAAA9pAAAASQAAANv////7////D1IGAAAEAAAAD28AAABPAAAArv///77///8PUwYAAAQAAAAPcAAAAFAAAADa////+v///w9UBgAABAAAAA9bAAAAewAAAMj////o////D1UGAAAEAAAAD10AAAB9AAAAJwAAACcAAAAPVgYAAAQAAAAPYQAAAEEAAADG////5v///w9XBgAABAAAAA9zAAAAUwAAANn////5////D1gGAAAEAAAAD2QAAABEAAAA1/////f///8PWQYAAAQAAAAPZgAAAEYAAADB////4f///w9aBgAABAAAAA9nAAAARwAAAND////w////D1sGAAAEAAAAD2gAAABIAAAA0v////L///8PXAYAAAQAAAAPagAAAEoAAADP////7////w9dBgAABAAAAA9rAAAASwAAAMz////s////D14GAAAEAAAAD2wAAABMAAAAxP///+T///8PXwYAAAQAAAAPOwAAADoAAADW////9v///w9gBgAABAAAAA8nAAAAIgAAANz////8////D2EGAAAEAAAAD1wAAAB8AAAALwAAAHwAAAAPYgYAAAQAAAAPegAAAFoAAADR////8f///w9jBgAABAAAAA94AAAAWAAAAN7////+////D2QGAAAEAAAAD2MAAABDAAAA0/////P///8PZQYAAAQAAAAPdgAAAFYAAADN////7f///w9mBgAABAAAAA9iAAAAQgAAAKb///+2////D2cGAAAEAAAAD24AAABOAAAA1P////T///8PaAYAAAQAAAAPbQAAAE0AAADY////+P///w9pBgAABAAAAA8sAAAAPAAAAML////i////D2oGAAAEAAAADy4AAAA+AAAAwP///+D///8PawYAAAQAAAAPLwAAAD8AAAAuAAAALAAAAA9sBgAABAAAAA88AAAAPgAAAHwAAACm////D20GAAAAAAAADw9uBgAAAgAAAA9gAAAAfgAAAA9vBgAAAgAAAA8xAAAAIQAAAA9wBgAAAgAAAA8yAAAAQAAAAA9xBgAAAgAAAA8zAAAAIwAAAA9yBgAAAgAAAA80AAAAJAAAAA9zBgAAAgAAAA81AAAAJQAAAA90BgAAAgAAAA82AAAAXgAAAA91BgAAAgAAAA83AAAAJgAAAA92BgAAAgAAAA84AAAAKgAAAA93BgAAAgAAAA85AAAAKAAAAA94BgAAAgAAAA8wAAAAKQAAAA95BgAAAgAAAA8tAAAAXwAAAA96BgAAAgAAAA89AAAAKwAAAA97BgAABAAAAA9xAAAAUQAAAMr////q////D3wGAAAEAAAAD3cAAABXAAAAw////+P///8PfQYAAAQAAAAPZQAAAEUAAADV////9f///w9+BgAABAAAAA9yAAAAUgAAAMv////r////D38GAAAEAAAAD3QAAABUAAAAxf///+X///8PgAYAAAQAAAAPeQAAAFkAAADO////7v///w+BBgAABAAAAA91AAAAVQAAAMf////n////D4IGAAAEAAAAD2kAAABJAAAA2/////v///8PgwYAAAQAAAAPbwAAAE8AAADd/////f///w+EBgAABAAAAA9wAAAAUAAAANr////6////D4UGAAAEAAAAD1sAAAB7AAAAyP///+j///8PhgYAAAQAAAAPXQAAAH0AAADf/////////w+HBgAABAAAAA9hAAAAQQAAAMb////m////D4gGAAAEAAAAD3MAAABTAAAA2f////n///8PiQYAAAQAAAAPZAAAAEQAAADX////9////w+KBgAABAAAAA9mAAAARgAAAMH////h////D4sGAAAEAAAAD2cAAABHAAAA0P////D///8PjAYAAAQAAAAPaAAAAEgAAADS////8v///w+NBgAABAAAAA9qAAAASgAAAM/////v////D44GAAAEAAAAD2sAAABLAAAAzP///+z///8PjwYAAAQAAAAPbAAAAEwAAADE////5P///w+QBgAABAAAAA87AAAAOgAAANb////2////D5EGAAAEAAAADycAAAAiAAAA3P////z///8PkgYAAAIAAAAPXAAAAHwAAAAPkwYAAAQAAAAPegAAAFoAAADR////8f///w+UBgAABAAAAA94AAAAWAAAAN7////+////D5UGAAAEAAAAD2MAAABDAAAA0/////P///8PlgYAAAQAAAAPdgAAAFYAAADN////7f///w+XBgAABAAAAA9iAAAAQgAAAMn////p////D5gGAAAEAAAAD24AAABOAAAA1P////T///8PmQYAAAQAAAAPbQAAAE0AAADY////+P///w+aBgAABAAAAA8sAAAAPAAAAML////i////D5sGAAAEAAAADy4AAAA+AAAAwP///+D///8PnAYAAAIAAAAPLwAAAD8AAAAPnQYAAAAAAAAPD54GAAAAAAAADw+fBgAAAgAAAA9gAAAAfgAAAA+gBgAAAgAAAA8xAAAAIQAAAA+hBgAAAgAAAA8yAAAAQAAAAA+iBgAAAgAAAA8zAAAAIwAAAA+jBgAAAgAAAA80AAAAJAAAAA+kBgAAAgAAAA81AAAAJQAAAA+lBgAAAgAAAA82AAAAXgAAAA+mBgAAAgAAAA83AAAAJgAAAA+nBgAAAgAAAA84AAAAKgAAAA+oBgAAAgAAAA85AAAAKAAAAA+pBgAAAgAAAA8wAAAAKQAAAA+qBgAAAgAAAA8tAAAAXwAAAA+rBgAAAgAAAA89AAAAKwAAAA+sBgAABAAAAA9xAAAAUQAAAMr////q////D60GAAAEAAAAD3cAAABXAAAAw////+P///8PrgYAAAQAAAAPZQAAAEUAAADV////9f///w+vBgAABAAAAA9yAAAAUgAAAMv////r////D7AGAAAEAAAAD3QAAABUAAAAxf///+X///8PsQYAAAQAAAAPeQAAAFkAAADO////7v///w+yBgAABAAAAA91AAAAVQAAAMf////n////D7MGAAAEAAAAD2kAAABJAAAA2/////v///8PtAYAAAQAAAAPbwAAAE8AAADd/////f///w+1BgAABAAAAA9wAAAAUAAAANr////6////D7YGAAAEAAAAD1sAAAB7AAAAyP///+j///8PtwYAAAQAAAAPXQAAAH0AAADf/////////w+4BgAABAAAAA9hAAAAQQAAAMb////m////D7kGAAAEAAAAD3MAAABTAAAA2f////n///8PugYAAAQAAAAPZAAAAEQAAADX////9////w+7BgAABAAAAA9mAAAARgAAAMH////h////D7wGAAAEAAAAD2cAAABHAAAA0P////D///8PvQYAAAQAAAAPaAAAAEgAAADS////8v///w++BgAABAAAAA9qAAAASgAAAM/////v////D78GAAAEAAAAD2sAAABLAAAAzP///+z///8PwAYAAAQAAAAPbAAAAEwAAADE////5P///w/BBgAABAAAAA87AAAAOgAAANb////2////D8IGAAAEAAAADycAAAAiAAAA3P////z///8PwwYAAAIAAAAPXAAAAHwAAAAPxAYAAAQAAAAPegAAAFoAAADR////8f///w/FBgAABAAAAA94AAAAWAAAAN7////+////D8YGAAAEAAAAD2MAAABDAAAA0/////P///8PxwYAAAQAAAAPdgAAAFYAAADN////7f///w/IBgAABAAAAA9iAAAAQgAAAMn////p////D8kGAAAEAAAAD24AAABOAAAA1P////T///8PygYAAAQAAAAPbQAAAE0AAADY////+P///w/LBgAABAAAAA8sAAAAPAAAAML////i////D8wGAAAEAAAADy4AAAA+AAAAwP///+D///8PzQYAAAIAAAAPLwAAAD8AAAAPzgYAAAIAAAAPPAAAAD4AAAAPzwYAAAAAAAAPD9AGAAACAAAADygAAAApAAAAD9EGAAACAAAADzEAAAAhAAAAD9IGAAACAAAADzIAAAAiAAAAD9MGAAACAAAADzMAAAAvAAAAD9QGAAACAAAADzQAAAAkAAAAD9UGAAACAAAADzUAAAA6AAAAD9YGAAACAAAADzYAAAAsAAAAD9cGAAACAAAADzcAAAAuAAAAD9gGAAACAAAADzgAAAA7AAAAD9kGAAACAAAADzkAAAA/AAAAD9oGAAACAAAADzAAAAAlAAAAD9sGAAACAAAADy0AAABfAAAAD9wGAAACAAAADz0AAAArAAAAD90GAAACAAAAD8r////q////D94GAAACAAAAD8P////j////D98GAAACAAAAD9X////1////D+AGAAACAAAAD8v////r////D+EGAAACAAAAD8X////l////D+IGAAACAAAAD87////u////D+MGAAACAAAAD8f////n////D+QGAAACAAAAD9v////7////D+UGAAACAAAAD93////9////D+YGAAACAAAAD9r////6////D+cGAAACAAAAD8j////o////D+gGAAACAAAAD9//////////D+kGAAACAAAAD8b////m////D+oGAAACAAAAD9n////5////D+sGAAACAAAAD9f////3////D+wGAAACAAAAD8H////h////D+0GAAACAAAAD9D////w////D+4GAAACAAAAD9L////y////D+8GAAACAAAAD8/////v////D/AGAAACAAAAD8z////s////D/EGAAACAAAAD8T////k////D/IGAAACAAAAD9b////2////D/MGAAACAAAAD9z////8////D/QGAAACAAAAD1wAAAB8AAAAD/UGAAACAAAAD9H////x////D/YGAAACAAAAD97////+////D/cGAAACAAAAD9P////z////D/gGAAACAAAAD83////t////D/kGAAACAAAAD8n////p////D/oGAAACAAAAD9T////0////D/sGAAACAAAAD9j////4////D/wGAAACAAAAD8L////i////D/0GAAACAAAAD8D////g////D/4GAAACAAAADy8AAAA/AAAAD/8GAAACAAAADzwAAAA+AAAADwAHAAAAAAAADw8BBwAAAgAAAA9gAAAAfgAAAA8CBwAAAgAAAA8xAAAAIQAAAA8DBwAAAgAAAA8yAAAAQAAAAA8EBwAAAgAAAA8zAAAAIwAAAA8FBwAAAgAAAA80AAAAJAAAAA8GBwAAAgAAAA81AAAAJQAAAA8HBwAAAgAAAA82AAAAXgAAAA8IBwAAAgAAAA83AAAAJgAAAA8JBwAAAgAAAA84AAAAKgAAAA8KBwAAAgAAAA85AAAAKAAAAA8LBwAAAgAAAA8wAAAAKQAAAA8MBwAAAgAAAA8tAAAAXwAAAA8NBwAAAgAAAA89AAAAKwAAAA8OBwAABAAAAA9xAAAAUQAAAOn////J////Dw8HAAAEAAAAD3cAAABXAAAA9v///9b///8PEAcAAAQAAAAPZQAAAEUAAADz////0////w8RBwAABAAAAA9yAAAAUgAAAOr////K////DxIHAAAEAAAAD3QAAABUAAAA5f///8X///8PEwcAAAQAAAAPeQAAAFkAAADt////zf///w8UBwAABAAAAA91AAAAVQAAAOP////D////DxUHAAAEAAAAD2kAAABJAAAA+P///9j///8PFgcAAAQAAAAPbwAAAE8AAAD5////2f///w8XBwAABAAAAA9wAAAAUAAAAOf////H////DxgHAAAEAAAAD1sAAAB7AAAA9f///9X///8PGQcAAAQAAAAPXQAAAH0AAAD6////2v///w8aBwAABAAAAA9hAAAAQQAAAPT////U////DxsHAAAEAAAAD3MAAABTAAAA+////9v///8PHAcAAAQAAAAPZAAAAEQAAADi////wv///w8dBwAABAAAAA9mAAAARgAAAOD////A////Dx4HAAAEAAAAD2cAAABHAAAA7////8////8PHwcAAAQAAAAPaAAAAEgAAADw////0P///w8gBwAABAAAAA9qAAAASgAAAO7////O////DyEHAAAEAAAAD2sAAABLAAAA6////8v///8PIgcAAAQAAAAPbAAAAEwAAADk////xP///w8jBwAABAAAAA87AAAAOgAAAOb////G////DyQHAAAEAAAADycAAAAiAAAA/f///93///8PJQcAAAIAAAAPXAAAAHwAAAAPJgcAAAQAAAAPegAAAFoAAAD/////3////w8nBwAABAAAAA94AAAAWAAAAPf////X////DygHAAAEAAAAD2MAAABDAAAA8f///9H///8PKQcAAAQAAAAPdgAAAFYAAADs////zP///w8qBwAABAAAAA9iAAAAQgAAAOj////I////DysHAAAEAAAAD24AAABOAAAA8v///9L///8PLAcAAAQAAAAPbQAAAE0AAAD8////3P///w8tBwAABAAAAA8sAAAAPAAAAOH////B////Dy4HAAAEAAAADy4AAAA+AAAA/v///97///8PLwcAAAIAAAAPLwAAAD8AAAAPMAcAAAIAAAAPPAAAAD4AAAAPMQcAAAAAAAAPDzIHAAACAAAAD2AAAAB+AAAADzMHAAACAAAADzEAAAAhAAAADzQHAAACAAAADzIAAABAAAAADzUHAAACAAAADzMAAAAjAAAADzYHAAACAAAADzQAAAAkAAAADzcHAAACAAAADzUAAAAlAAAADzgHAAACAAAADzYAAABeAAAADzkHAAACAAAADzcAAAAmAAAADzoHAAACAAAADzgAAAAqAAAADzsHAAACAAAADzkAAAAoAAAADzwHAAACAAAADzAAAAApAAAADz0HAAACAAAADy0AAABfAAAADz4HAAACAAAADz0AAAArAAAADz8HAAAEAAAAD3EAAABRAAAA0f////H///8PQAcAAAQAAAAPdwAAAFcAAADX////9////w9BBwAABAAAAA9lAAAARQAAAMX////l////D0IHAAAEAAAAD3IAAABSAAAA0v////L///8PQwcAAAQAAAAPdAAAAFQAAADU////9P///w9EBwAABAAAAA95AAAAWQAAANn////5////D0UHAAAEAAAAD3UAAABVAAAA1f////X///8PRgcAAAQAAAAPaQAAAEkAAADJ////6f///w9HBwAABAAAAA9vAAAATwAAAM/////v////D0gHAAAEAAAAD3AAAABQAAAA0P////D///8PSQcAAAQAAAAPWwAAAHsAAADb////+////w9KBwAABAAAAA9dAAAAfQAAAN3////9////D0sHAAAEAAAAD2EAAABBAAAAwf///+H///8PTAcAAAQAAAAPcwAAAFMAAADT////8////w9NBwAABAAAAA9kAAAARAAAAMT////k////D04HAAAEAAAAD2YAAABGAAAAxv///+b///8PTwcAAAQAAAAPZwAAAEcAAADH////5////w9QBwAABAAAAA9oAAAASAAAAMj////o////D1EHAAAEAAAAD2oAAABKAAAAyv///+r///8PUgcAAAQAAAAPawAAAEsAAADL////6////w9TBwAABAAAAA9sAAAATAAAAMz////s////D1QHAAACAAAADzsAAAA6AAAAD1UHAAACAAAADycAAAAiAAAAD1YHAAACAAAAD1wAAAB8AAAAD1cHAAAEAAAAD3oAAABaAAAA2v////r///8PWAcAAAQAAAAPeAAAAFgAAADY////+P///w9ZBwAABAAAAA9jAAAAQwAAAMP////j////D1oHAAAEAAAAD3YAAABWAAAA1v////b///8PWwcAAAQAAAAPYgAAAEIAAADC////4v///w9cBwAABAAAAA9uAAAATgAAAM7////u////D10HAAAEAAAAD20AAABNAAAAzf///+3///8PXgcAAAIAAAAPLAAAADwAAAAPXwcAAAIAAAAPLgAAAD4AAAAPYAcAAAIAAAAPLwAAAD8AAAAPYQcAAAIAAAAPPAAAAD4AAAAPYgcAAAAAAAAPD2MHAAAEAAAAD2AAAAB+AAAArf///73///8PZAcAAAQAAAAPMQAAACEAAAAxAAAAIQAAAA9lBwAABAAAAA8yAAAAQAAAADIAAAAiAAAAD2YHAAAEAAAADzMAAAAjAAAAMwAAACcAAAAPZwcAAAQAAAAPNAAAACQAAAA0AAAAKgAAAA9oBwAABAAAAA81AAAAJQAAADUAAAA6AAAAD2kHAAAEAAAADzYAAABeAAAANgAAACwAAAAPagcAAAQAAAAPNwAAACYAAAA3AAAALgAAAA9rBwAABAAAAA84AAAAKgAAADgAAAA7AAAAD2wHAAAEAAAADzkAAAAoAAAAOQAAACgAAAAPbQcAAAQAAAAPMAAAACkAAAAwAAAAKQAAAA9uBwAABAAAAA8tAAAAXwAAAC0AAABfAAAAD28HAAAEAAAADz0AAAArAAAAPQAAACsAAAAPcAcAAAQAAAAPcQAAAFEAAADK////6v///w9xBwAABAAAAA93AAAAVwAAAMP////j////D3IHAAAEAAAAD2UAAABFAAAA1f////X///8PcwcAAAQAAAAPcgAAAFIAAADL////6////w90BwAABAAAAA90AAAAVAAAAMX////l////D3UHAAAEAAAAD3kAAABZAAAAzv///+7///8PdgcAAAQAAAAPdQAAAFUAAADH////5////w93BwAABAAAAA9pAAAASQAAANv////7////D3gHAAAEAAAAD28AAABPAAAA3f////3///8PeQcAAAQAAAAPcAAAAFAAAADa////+v///w96BwAABAAAAA9bAAAAewAAAMj////o////D3sHAAAEAAAAD10AAAB9AAAAp////7f///8PfAcAAAQAAAAPYQAAAEEAAADG////5v///w99BwAABAAAAA9zAAAAUwAAAKb///+2////D34HAAAEAAAAD2QAAABEAAAA1/////f///8PfwcAAAQAAAAPZgAAAEYAAADB////4f///w+ABwAABAAAAA9nAAAARwAAAND////w////D4EHAAAEAAAAD2gAAABIAAAA0v////L///8PggcAAAQAAAAPagAAAEoAAADP////7////w+DBwAABAAAAA9rAAAASwAAAMz////s////D4QHAAAEAAAAD2wAAABMAAAAxP///+T///8PhQcAAAQAAAAPOwAAADoAAADW////9v///w+GBwAABAAAAA8nAAAAIgAAAKT///+0////D4cHAAAEAAAAD1wAAAB8AAAAXAAAAHwAAAAPiAcAAAQAAAAPegAAAFoAAADR////8f///w+JBwAABAAAAA94AAAAWAAAAN7////+////D4oHAAAEAAAAD2MAAABDAAAA0/////P///8PiwcAAAQAAAAPdgAAAFYAAADN////7f///w+MBwAABAAAAA9iAAAAQgAAAMn////p////D40HAAAEAAAAD24AAABOAAAA1P////T///8PjgcAAAQAAAAPbQAAAE0AAADY////+P///w+PBwAABAAAAA8sAAAAPAAAAML////i////D5AHAAAEAAAADy4AAAA+AAAAwP///+D///8PkQcAAAQAAAAPLwAAAD8AAAAvAAAAPwAAAA+SBwAAAgAAAA88AAAAPgAAAA+TBwAAAAAAAA8PlAcAAAIAAAAPrf///73///8PlQcAAAIAAAAPMQAAACEAAAAPlgcAAAIAAAAPMgAAACIAAAAPlwcAAAIAAAAPMwAAACcAAAAPmAcAAAIAAAAPNAAAADsAAAAPmQcAAAIAAAAPNQAAACUAAAAPmgcAAAIAAAAPNgAAADoAAAAPmwcAAAIAAAAPNwAAAD8AAAAPnAcAAAIAAAAPOAAAACoAAAAPnQcAAAIAAAAPOQAAACgAAAAPngcAAAIAAAAPMAAAACkAAAAPnwcAAAIAAAAPLQAAAF8AAAAPoAcAAAIAAAAPPQAAACsAAAAPoQcAAAIAAAAPyv///+r///8PogcAAAIAAAAPw////+P///8PowcAAAIAAAAP1f////X///8PpAcAAAIAAAAPy////+v///8PpQcAAAIAAAAPxf///+X///8PpgcAAAIAAAAPzv///+7///8PpwcAAAIAAAAPx////+f///8PqAcAAAIAAAAP2/////v///8PqQcAAAIAAAAP3f////3///8PqgcAAAIAAAAP2v////r///8PqwcAAAIAAAAPyP///+j///8PrAcAAAIAAAAPp////7f///8PrQcAAAIAAAAPxv///+b///8PrgcAAAIAAAAPpv///7b///8PrwcAAAIAAAAP1/////f///8PsAcAAAIAAAAPwf///+H///8PsQcAAAIAAAAP0P////D///8PsgcAAAIAAAAP0v////L///8PswcAAAIAAAAPz////+////8PtAcAAAIAAAAPzP///+z///8PtQcAAAIAAAAPxP///+T///8PtgcAAAIAAAAP1v////b///8PtwcAAAIAAAAPpP///7T///8PuAcAAAIAAAAPXAAAAC8AAAAPuQcAAAIAAAAP0f////H///8PugcAAAIAAAAP3v////7///8PuwcAAAIAAAAP0/////P///8PvAcAAAIAAAAPzf///+3///8PvQcAAAIAAAAPyf///+n///8PvgcAAAIAAAAP1P////T///8PvwcAAAIAAAAP2P////j///8PwAcAAAIAAAAPwv///+L///8PwQcAAAIAAAAPwP///+D///8PwgcAAAIAAAAPLgAAACwAAAAPwwcAAAIAAAAPPAAAAD4AAAAPxAcAAAAAAAAPD8UHAAACAAAAD6P///+z////D8YHAAACAAAADzEAAAAhAAAAD8cHAAACAAAADzIAAAAiAAAAD8gHAAACAAAADzMAAAAnAAAAD8kHAAACAAAADzQAAAA7AAAAD8oHAAACAAAADzUAAAAlAAAAD8sHAAACAAAADzYAAAA6AAAAD8wHAAACAAAADzcAAAA/AAAAD80HAAACAAAADzgAAAAqAAAAD84HAAACAAAADzkAAAAoAAAAD88HAAACAAAADzAAAAApAAAAD9AHAAACAAAADy0AAABfAAAAD9EHAAACAAAADz0AAAArAAAAD9IHAAACAAAAD8r////q////D9MHAAACAAAAD8P////j////D9QHAAACAAAAD9X////1////D9UHAAACAAAAD8v////r////D9YHAAACAAAAD8X////l////D9cHAAACAAAAD87////u////D9gHAAACAAAAD8f////n////D9kHAAACAAAAD9v////7////D9oHAAACAAAAD93////9////D9sHAAACAAAAD9r////6////D9wHAAACAAAAD8j////o////D90HAAACAAAAD9//////////D94HAAACAAAAD8b////m////D98HAAACAAAAD9n////5////D+AHAAACAAAAD9f////3////D+EHAAACAAAAD8H////h////D+IHAAACAAAAD9D////w////D+MHAAACAAAAD9L////y////D+QHAAACAAAAD8/////v////D+UHAAACAAAAD8z////s////D+YHAAACAAAAD8T////k////D+cHAAACAAAAD9b////2////D+gHAAACAAAAD9z////8////D+kHAAACAAAAD1wAAAAvAAAAD+oHAAACAAAAD9H////x////D+sHAAACAAAAD97////+////D+wHAAACAAAAD9P////z////D+0HAAACAAAAD83////t////D+4HAAACAAAAD8n////p////D+8HAAACAAAAD9T////0////D/AHAAACAAAAD9j////4////D/EHAAACAAAAD8L////i////D/IHAAACAAAAD8D////g////D/MHAAACAAAADy4AAAAsAAAA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IgAAALf///8PjAgAAAMAAAAPMwAAACsAAABeAAAAD40IAAADAAAADzQAAAAhAAAAov///w+OCAAABAAAAA81AAAAJQAAADAAAACw////D48IAAADAAAADzYAAAAvAAAAsv///w+QCAAAAwAAAA83AAAAPQAAAGAAAAAPkQgAAAMAAAAPOAAAACgAAAD/////D5IIAAADAAAADzkAAAApAAAAtP///w+TCAAAAwAAAA/2////1v///73///8PlAgAAAMAAAAP/P///9z///+o////D5UIAAADAAAAD/P////T////uP///w+WCAAAAwAAAA9xAAAAUQAAAFwAAAAPlwgAAAMAAAAPdwAAAFcAAAB8AAAAD5gIAAACAAAAD2UAAABFAAAAD5kIAAACAAAAD3IAAABSAAAAD5oIAAACAAAAD3QAAABUAAAAD5sIAAACAAAAD3oAAABaAAAAD5wIAAACAAAAD3UAAABVAAAAD50IAAADAAAAD2kAAABJAAAAzf///w+eCAAAAwAAAA9vAAAATwAAAPj///8PnwgAAAIAAAAPcAAAAFAAAAAPoAgAAAMAAAAP9f///9X////3////D6EIAAADAAAAD/r////a////1////w+iCAAAAgAAAA9hAAAAQQAAAA+jCAAAAwAAAA9zAAAAUwAAAPD///8PpAgAAAMAAAAPZAAAAEQAAADQ////D6UIAAADAAAAD2YAAABGAAAAWwAAAA+mCAAAAwAAAA9nAAAARwAAAF0AAAAPpwgAAAIAAAAPaAAAAEgAAAAPqAgAAAMAAAAPagAAAEoAAADt////D6kIAAADAAAAD2sAAABLAAAAs////w+qCAAAAwAAAA9sAAAATAAAAKP///8PqwgAAAMAAAAP6f///8n///8kAAAAD6wIAAADAAAAD+H////B////3////w+tCAAAAwAAAA/7////2////6T///8PrggAAAMAAAAPeQAAAFkAAAA+AAAAD68IAAADAAAAD3gAAABYAAAAIwAAAA+wCAAAAwAAAA9jAAAAQwAAACYAAAAPsQgAAAMAAAAPdgAAAFYAAABAAAAAD7IIAAADAAAAD2IAAABCAAAAewAAAA+zCAAAAwAAAA9uAAAATgAAAH0AAAAPtAgAAAIAAAAPbQAAAE0AAAAPtQgAAAMAAAAPLAAAAD8AAAA7AAAA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TgAAAA8WCQAAAgAAAA9tAAAATQAAAA8XCQAAAgAAAA8sAAAAOwAAAA8YCQAAAgAAAA8uAAAAOgAAAA8ZCQAAAgAAAA8tAAAAXwAAAA8aCQAAAgAAAA88AAAAPgAAAA8bCQAAAAAAAA8PHAkAAAIAAAAPYAAAAH4AAAAPHQkAAAIAAAAPMQAAACEAAAAPHgkAAAIAAAAPMgAAACIAAAAPHwkAAAIAAAAPMwAAACMAAAAPIAkAAAIAAAAPNAAAACQAAAAPIQkAAAIAAAAPNQAAACUAAAAPIgkAAAIAAAAPNgAAACYAAAAPIwkAAAIAAAAPNwAAAC8AAAAPJAkAAAIAAAAPOAAAACgAAAAPJQkAAAIAAAAPOQAAACkAAAAPJgkAAAIAAAAPMAAAAD0AAAAPJwkAAAIAAAAPJwAAAD8AAAAPKAkAAAIAAAAPKwAAACoAAAAPKQkAAAIAAAAPqf///7n///8PKgkAAAIAAAAPqv///7r///8PKwkAAAIAAAAPxf///+X///8PLAkAAAIAAAAP0v////L///8PLQkAAAIAAAAP1P////T///8PLgkAAAIAAAAP2v////r///8PLwkAAAIAAAAP1f////X///8PMAkAAAIAAAAPyf///+n///8PMQkAAAIAAAAPz////+////8PMgkAAAIAAAAP0P////D///8PMwkAAAIAAAAP2/////v///8PNAkAAAIAAAAPWwAAAF0AAAAPNQkAAAIAAAAPwf///+H///8PNgkAAAIAAAAP0/////P///8PNwkAAAIAAAAPxP///+T///8POAkAAAIAAAAPxv///+b///8POQkAAAIAAAAPx////+f///8POgkAAAIAAAAPyP///+j///8POwkAAAIAAAAPqP///7j///8PPAkAAAIAAAAPy////+v///8PPQkAAAIAAAAPzP///+z///8PPgkAAAIAAAAP3v////7///8PPwkAAAIAAAAPq////7v///8PQAkAAAIAAAAPLQAAAF8AAAAPQQkAAAIAAAAPof///7H///8PQgkAAAIAAAAPr////7////8PQwkAAAIAAAAPw////+P///8PRAkAAAIAAAAP1/////f///8PRQkAAAIAAAAPwv///+L///8PRgkAAAIAAAAPzv///+7///8PRwkAAAIAAAAPzf///+3///8PSAkAAAIAAAAPLAAAADsAAAAPSQkAAAIAAAAPLgAAADoAAAAPSgkAAAIAAAAP1v////b///8PSwkAAAIAAAAPPAAAAD4AAAAPTAkAAAAAAAAPD00JAAACAAAAD2AAAAB+AAAAD04JAAACAAAADzEAAAAhAAAAD08JAAAEAAAADzIAAABAAAAAMgAAACIAAAAPUAkAAAIAAAAPMwAAACMAAAAPUQkAAAIAAAAPNAAAACQAAAAPUgkAAAIAAAAPNQAAACUAAAAPUwkAAAQAAAAPNgAAAF4AAAA2AAAAJgAAAA9UCQAABAAAAA83AAAAJgAAADcAAAAvAAAAD1UJAAAEAAAADzgAAAAqAAAAOAAAACgAAAAPVgkAAAQAAAAPOQAAACgAAAA5AAAAKQAAAA9XCQAABAAAAA8wAAAAKQAAADAAAAA9AAAAD1gJAAAEAAAADy0AAABfAAAAJwAAAD8AAAAPWQkAAAQAAAAPPQAAACsAAAArAAAAKgAAAA9aCQAABAAAAA9xAAAAUQAAAKn///+5////D1sJAAAEAAAAD3cAAABXAAAAqv///7r///8PXAkAAAQAAAAPZQAAAEUAAADF////5f///w9dCQAABAAAAA9yAAAAUgAAANL////y////D14JAAAEAAAAD3QAAABUAAAA1P////T///8PXwkAAAQAAAAPeQAAAFkAAADa////+v///w9gCQAABAAAAA91AAAAVQAAANX////1////D2EJAAAEAAAAD2kAAABJAAAAyf///+n///8PYgkAAAQAAAAPbwAAAE8AAADP////7////w9jCQAABAAAAA9wAAAAUAAAAND////w////D2QJAAAEAAAAD1sAAAB7AAAA2/////v///8PZQkAAAQAAAAPXQAAAH0AAABbAAAAXQAAAA9mCQAABAAAAA9hAAAAQQAAAMH////h////D2cJAAAEAAAAD3MAAABTAAAA0/////P///8PaAkAAAQAAAAPZAAAAEQAAADE////5P///w9pCQAABAAAAA9mAAAARgAAAMb////m////D2oJAAAEAAAAD2cAAABHAAAAx////+f///8PawkAAAQAAAAPaAAAAEgAAADI////6P///w9sCQAABAAAAA9qAAAASgAAAKj///+4////D20JAAAEAAAAD2sAAABLAAAAy////+v///8PbgkAAAQAAAAPbAAAAEwAAADM////7P///w9vCQAABAAAAA87AAAAOgAAAN7////+////D3AJAAAEAAAADycAAAAiAAAAq////7v///8PcQkAAAQAAAAPXAAAAHwAAAAtAAAAXwAAAA9yCQAABAAAAA96AAAAWgAAAKH///+x////D3MJAAAEAAAAD3gAAABYAAAAr////7////8PdAkAAAQAAAAPYwAAAEMAAADD////4////w91CQAABAAAAA92AAAAVgAAANf////3////D3YJAAAEAAAAD2IAAABCAAAAwv///+L///8PdwkAAAQAAAAPbgAAAE4AAADO////7v///w94CQAABAAAAA9tAAAATQAAAM3////t////D3kJAAAEAAAADywAAAA8AAAALAAAADsAAAAPegkAAAQAAAAPLgAAAD4AAAAuAAAAOgAAAA97CQAABAAAAA8vAAAAPwAAANb////2////D3wJAAACAAAADzwAAAA+AAAAD30JAAAAAAAADw9+CQAAAgAAAA+4////qP///w9/CQAAAgAAAA8xAAAAIQAAAA+ACQAAAgAAAA8yAAAAIgAAAA+BCQAAAgAAAA8zAAAAIwAAAA+CCQAAAgAAAA80AAAAJAAAAA+DCQAAAgAAAA81AAAAJQAAAA+ECQAAAgAAAA82AAAAJgAAAA+FCQAAAgAAAA83AAAALwAAAA+GCQAAAgAAAA84AAAAKAAAAA+HCQAAAgAAAA85AAAAKQAAAA+ICQAAAgAAAA8wAAAAPQAAAA+JCQAAAgAAAA8nAAAAPwAAAA+KCQAAAgAAAA8rAAAAKgAAAA+LCQAAAgAAAA9xAAAAUQAAAA+MCQAAAgAAAA93AAAAVwAAAA+NCQAAAgAAAA9lAAAARQAAAA+OCQAAAgAAAA9yAAAAUgAAAA+PCQAAAgAAAA90AAAAVAAAAA+QCQAAAgAAAA96AAAAWgAAAA+RCQAAAgAAAA91AAAAVQAAAA+SCQAAAgAAAA9pAAAASQAAAA+TCQAAAgAAAA9vAAAATwAAAA+UCQAAAgAAAA9wAAAAUAAAAA+VCQAAAgAAAA+5////qf///w+WCQAAAgAAAA/w////0P///w+XCQAAAgAAAA9hAAAAQQAAAA+YCQAAAgAAAA9zAAAAUwAAAA+ZCQAAAgAAAA9kAAAARAAAAA+aCQAAAgAA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D2IKAAACAAAAD2sAAABLAAAAD2MKAAACAAAAD2wAAABMAAAAD2QKAAACAAAAD/T///8iAAAAD2UKAAACAAAAD6f///8hAAAAD2YKAAACAAAAD/L///8pAAAAD2cKAAACAAAAD3oAAABaAAAAD2gKAAACAAAAD3gAAABYAAAAD2kKAAACAAAAD2MAAABDAAAAD2oKAAACAAAAD3YAAABWAAAAD2sKAAACAAAAD2IAAABCAAAAD2wKAAACAAAAD24AAABOAAAAD20KAAACAAAAD20AAABNAAAAD24KAAACAAAADywAAAA/AAAAD28KAAACAAAADy4AAAA6AAAAD3AKAAACAAAADy0AAABfAAAAD3EKAAACAAAADzwAAAA+AAAAD3IKAAAAAAAADw9zCgAAAgAAAA9gAAAAfgAAAA90CgAAAgAAAA8xAAAAIQAAAA91CgAAAgAAAA8yAAAAQAAAAA92CgAAAgAAAA8zAAAAIwAAAA93CgAAAgAAAA80AAAAJAAAAA94CgAAAgAAAA81AAAAJQAAAA95CgAAAgAAAA82AAAAXgAAAA96CgAAAgAAAA83AAAAJgAAAA97CgAAAgAAAA84AAAAKgAAAA98CgAAAgAAAA85AAAAKAAAAA99CgAAAgAAAA8wAAAAKQAAAA9+CgAAAgAAAA8tAAAAXwAAAA9/CgAAAgAAAA89AAAAKwAAAA+ACgAABAAAAA9xAAAAUQAAAOT////E////D4EKAAAEAAAAD3cAAABXAAAA7P///8z///8PggoAAAQAAAAPZQAAAEUAAADp////yf///w+DCgAABAAAAA9yAAAAUgAAAPj////Y////D4QKAAAEAAAAD3QAAABUAAAAu////6v///8PhQoAAAQAAAAPeQAAAFkAAAD9////3f///w+GCgAABAAAAA91AAAAVQAAAPn////Z////D4cKAAAEAAAAD2kAAABJAAAA7f///83///8PiAoAAAQAAAAPbwAAAE8AAADz////0////w+JCgAABAAAAA9wAAAAUAAAAPb////W////D4oKAAACAAAAD1sAAAB7AAAAD4sKAAACAAAAD10AAAB9AAAAD4wKAAAEAAAAD2EAAABBAAAA4f///8H///8PjQoAAAQAAAAPcwAAAFMAAAC5////qf///w+OCgAABAAAAA9kAAAARAAAAO/////P////D48KAAAEAAAAD2YAAABGAAAA6////8v///8PkAoAAAQAAAAPZwAAAEcAAADg////wP///w+RCgAABAAAAA9oAAAASAAAAPr////a////D5IKAAAEAAAAD2oAAABKAAAA/P///9z///8PkwoAAAQAAAAPawAAAEsAAAD0////1P///w+UCgAABAAAAA9sAAAATAAAALX///+l////D5UKAAACAAAADzsAAAA6AAAAD5YKAAACAAAADycAAAAiAAAAD5cKAAACAAAAD1wAAAB8AAAAD5gKAAAEAAAAD3oAAABaAAAAvv///67///8PmQoAAAMAAAAPeAAAAFgAAACk////D5oKAAAEAAAAD2MAAABDAAAA6P///8j///8PmwoAAAQAAAAPdgAAAFYAAADn////x////w+cCgAAAgAAAA9iAAAAQgAAAA+dCgAABAAAAA9uAAAATgAAAPL////S////D54KAAAEAAAAD20AAABNAAAA5f///8X///8PnwoAAAIAAAAPLAAAADwAAAAPoAoAAAIAAAAPLgAAAD4AAAAPoQoAAAIAAAAPLwAAAD8AAAAPogoAAAIAAAAPPAAAAD4AAAAPowoAAAAAAAAPD6QKAAABAAAADzsAAAAPpQoAAAIAAAAPKwAAADEAAAAPpgoAAAIAAAAP7P///zIAAAAPpwoAAAIAAAAPuf///zMAAAAPqAoAAAIAAAAP6P///zQAAAAPqQoAAAIAAAAP+P///zUAAAAPqgoAAAIAAAAPvv///zYAAAAPqwoAAAIAAAAP/f///zcAAAAPrAoAAAIAAAAP4f///zgAAAAPrQoAAAIAAAAP7f///zkAAAAPrgoAAAQAAAAP6f///zAAAAC9////KQAAAA+vCgAAAgAAAA89AAAAJQAAAA+wCgAAAAAAAA8PsQoAAAMAAAAPcQAAAFEAAABcAAAAD7IKAAADAAAAD3cAAABXAAAAfAAAAA+zCgAAAgAAAA9lAAAARQAAAA+0CgAAAgAAAA9yAAAAUgAAAA+1CgAAAgAAAA90AAAAVAAAAA+2CgAAAgAAAA95AAAAWQAAAA+3CgAAAgAAAA91AAAAVQAAAA+4CgAAAgAAAA9pAAAASQAAAA+5CgAAAgAAAA9vAAAATwAAAA+6CgAAAgAAAA9wAAAAUAAAAA+7CgAABAAAAA/6////LwAAAFsAAAB7AAAAD7wKAAAEAAAADykAAAAoAAAAXQAAAH0AAAAPvQoAAAIAAAAPYQAAAEEAAAAPvgoAAAMAAAAPcwAAAFMAAADw////D78KAAADAAAAD2QAAABEAAAA0P///w/ACgAAAwAAAA9mAAAARgAAAFsAAAAPwQoAAAMAAAAPZwAAAEcAAABdAAAAD8IKAAACAAAAD2gAAABIAAAAD8MKAAACAAAAD2oAAABKAAAAD8QKAAADAAAAD2sAAABLAAAAs////w/FCgAAAwAAAA9sAAAATAAAAKP///8PxgoAAAMAAAAP+f///yIAAAAkAAAAD8cKAAADAAAAD6f///8hAAAA3////w/ICgAAAgAAAA+o////JwAAAA/JCgAAAwAAAA96AAAAWgAAAD4AAAAPygoAAAMAAAAPeAAAAFgAAAAjAAAAD8sKAAADAAAAD2MAAABDAAAAJgAAAA/MCgAAAwAAAA92AAAAVgAAAEAAAAAPzQoAAAMAAAAPYgAAAEIAAAB7AAAAD84KAAADAAAAD24AAABOAAAAfQAAAA/PCgAAAgAAAA9tAAAATQAAAA/QCgAAAwAAAA8sAAAAPwAAADwAAAAP0QoAAAMAAAAPLgAAADoAAAA+AAAAD9IKAAADAAAADy0AAABfAAAAKgAAAA/TCgAABAAAAA88AAAAPgAAAFwAAAB8AAAAD9QKAAAAAAAADw/VCgAAAQAAAA87AAAAD9YKAAACAAAADysAAAAxAAAAD9cKAAACAAAAD+z///8yAAAAD9gKAAACAAAAD7n///8zAAAAD9kKAAACAAAAD+j///80AAAAD9oKAAACAAAAD/j///81AAAAD9sKAAACAAAAD77///82AAAAD9wKAAACAAAAD/3///83AAAAD90KAAACAAAAD+H///84AAAAD94KAAACAAAAD+3///85AAAAD98KAAACAAAAD+n///8wAAAAD+AKAAACAAAADz0AAAAlAAAAD+EKAAACAAAAD7T///+3////D+IKAAACAAAAD3EAAABRAAAAD+MKAAACAAAAD3cAAABXAAAAD+QKAAACAAAAD2UAAABFAAAAD+UKAAACAAAAD3IAAABSAAAAD+YKAAACAAAAD3QAAABUAAAAD+cKAAACAAAAD3oAAABaAAAAD+gKAAACAAAAD3UAAABVAAAAD+kKAAAC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AA9lAAAARQAAAA8XDAAAAgAAAA9hAAAAQQAAAA8YDAAAAgAAAA/8////3P///w8ZDAAAAgAAAA90AAAAVAAAAA8aDAAAAgAAAA9rAAAASwAAAA8bDAAAAgAAAA9tAAAATQAAAA8cDAAAAgAAAA9sAAAATAAAAA8dDAAAAgAAAA95AAAAWQAAAA8eDAAAAgAAAA+6////qv///w8fDAAAAgAAAA94AAAAWAAAAA8gDAAAAgAAAA9qAAAASgAAAA8hDAAAAgAAAA/2////1v///w8iDAAAAgAAAA92AAAAVgAAAA8jDAAAAgAAAA9jAAAAQwAAAA8kDAAAAgAAAA/n////x////w8lDAAAAgAAAA96AAAAWgAAAA8mDAAAAgAAAA9zAAAAUwAAAA8nDAAAAgAAAA9iAAAAQgAAAA8oDAAAAgAAAA8uAAAAOgAAAA8pDAAAAgAAAA8sAAAAOwAAAA8qDAAAAgAAAA88AAAAPgAAAA8rDAAAAAAAAA8PLAwAAAMAAAAPYAAAAH4AAAA7AAAADy0MAAACAAAADzEAAAAhAAAADy4MAAACAAAADzIAAABAAAAADy8MAAACAAAADzMAAAAjAAAADzAMAAACAAAADzQAAAAkAAAADzEMAAACAAAADzUAAAAlAAAADzIMAAACAAAADzYAAABeAAAADzMMAAACAAAADzcAAAAmAAAADzQMAAACAAAADzgAAAAqAAAADzUMAAACAAAADzkAAAAoAAAADzYMAAACAAAADzAAAAApAAAADzcMAAACAAAADy0AAABfAAAADzgMAAACAAAADz0AAAArAAAADzkMAAADAAAAD3EAAABRAAAALwAAAA86DAAAAwAAAA93AAAAVwAAACcAAAAPOwwAAAMAAAAPZQAAAEUAAAD3////DzwMAAADAAAAD3IAAABSAAAA+P///w89DAAAAwAAAA90AAAAVAAAAOD///8PPgwAAAMAAAAPeQAAAFkAAADo////Dz8MAAADAAAAD3UAAABVAAAA5f///w9ADAAAAwAAAA9pAAAASQAAAO////8PQQwAAAMAAAAPbwAAAE8AAADt////D0IMAAADAAAAD3AAAABQAAAA9P///w9DDAAAAgAAAA9bAAAAewAAAA9EDAAAAgAAAA9dAAAAfQAAAA9FDAAAAwAAAA9hAAAAQQAAAPn///8PRgwAAAMAAAAPcwAAAFMAAADj////D0cMAAADAAAAD2QAAABEAAAA4v///w9IDAAAAwAAAA9mAAAARgAAAOv///8PSQwAAAMAAAAPZwAAAEcAAADy////D0oMAAADAAAAD2gAAABIAAAA6f///w9LDAAAAwAAAA9qAAAASgAAAOf///8PTAwAAAMAAAAPawAAAEsAAADs////D00MAAADAAAAD2wAAABMAAAA6v///w9ODAAAAwAAAA87AAAAOgAAAPP///8PTwwAAAMAAAAPJwAAACIAAAAsAAAAD1AMAAACAAAAD1wAAAB8AAAAD1EMAAADAAAAD3oAAABaAAAA5v///w9SDAAAAwAAAA94AAAAWAAAAPH///8PUwwAAAMAAAAPYwAAAEMAAADh////D1QMAAADAAAAD3YAAABWAAAA5P///w9VDAAAAwAAAA9iAAAAQgAAAPD///8PVgwAAAMAAAAPbgAAAE4AAADu////D1cMAAADAAAAD20AAABNAAAA9v///w9YDAAAAwAAAA8sAAAAPAAAAPr///8PWQwAAAMAAAAPLgAAAD4AAAD1////D1oMAAADAAAADy8AAAA/AAAALgAAAA9bDAAAAgAAAA88AAAAPgAAAA9cDAAAAAAAAA8PXQwAAAIAAAAPYAAAAH4AAAAPXgwAAAIAAAAPMQAAACEAAAAPXwwAAAIAAAAPMgAAAEAAAAAPYAwAAAIAAAAPMwAAACMAAAAPYQwAAAIAAAAPNAAAACQAAAAPYgwAAAIAAAAPNQAAACUAAAAPYwwAAAIAAAAPNgAAAF4AAAAPZAwAAAIAAAAPNwAAACYAAAAPZQwAAAIAAAAPOAAAACoAAAAPZgwAAAIAAAAPOQAAACgAAAAPZwwAAAIAAAAPMAAAACkAAAAPaAwAAAIAAAAPLQAAAF8AAAAPaQwAAAIAAAAPPQAAACsAAAAPagwAAAMAAAAPcQAAAFEAAAD3////D2sMAAADAAAAD3cAAABXAAAA5f///w9sDAAAAwAAAA9lAAAARQAAAOD///8PbQwAAAMAAAAPcgAAAFIAAAD4////D24MAAADAAAAD3QAAABUAAAA+v///w9vDAAAAwAAAA95AAAAWQAAAPL///8PcAwAAAMAAAAPdQAAAFUAAADl////D3EMAAADAAAAD2kAAABJAAAA6f///w9yDAAAAwAA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AA9yAAAAUgAAAPH////R////DwENAAAEAAAAD3QAAABUAAAA9P///9T///8PAg0AAAQAAAAPeQAAAFkAAAD1////1f///w8DDQAABAAAAA91AAAAVQAAAOj////I////DwQNAAAEAAAAD2kAAABJAAAA6f///8n///8PBQ0AAAQAAAAPbwAAAE8AAADv////z////w8GDQAABAAAAA9wAAAAUAAAAPD////Q////DwcNAAACAAAAD1sAAAB7AAAADwgNAAACAAAAD10AAAB9AAAADwkNAAAEAAAAD2EAAABBAAAA4f///8H///8PCg0AAAIAAAAPcwAAAFMAAAAPCw0AAAQAAAAPZAAAAEQAAADk////xP///w8MDQAABAAAAA9mAAAARgAAAPb////W////Dw0NAAAEAAAAD2cAAABHAAAA4////8P///8PDg0AAAQAAAAPaAAAAEgAAADn////x////w8PDQAABAAAAA9qAAAASgAAAO7////O////DxANAAAEAAAAD2sAAABLAAAA6v///8r///8PEQ0AAAQAAAAPbAAAAEwAAADr////y////w8SDQAABAAAAA87AAAAOgAAALT///+o////DxMNAAACAAAADycAAAAiAAAADxQNAAACAAAAD1wAAAB8AAAADxUNAAAEAAAAD3oAAABaAAAA5v///8b///8PFg0AAAQAAAAPeAAAAFgAAAD3////1////w8XDQAABAAAAA9jAAAAQwAAAPj////Y////DxgNAAAEAAAAD3YAAABWAAAA+f///9n///8PGQ0AAAQAAAAPYgAAAEIAAADi////wv///w8aDQAABAAAAA9uAAAATgAAAO3////N////DxsNAAAEAAAAD20AAABNAAAA7P///8z///8PHA0AAAIAAAAPLAAAADwAAAAPHQ0AAAIAAAAPLgAAAD4AAAAPHg0AAAIAAAAPLwAAAD8AAAAPHw0AAAIAAAAPPAAAAD4AAAAPIA0AAAAAAAAPDyENAAAEAAAAD2AAAAB+AAAAXwAAACUAAAAPIg0AAAQAAAAPMQAAACEAAADl////KwAAAA8jDQAABAAAAA8yAAAAQAAAAC8AAADx////DyQNAAAEAAAADzMAAAAjAAAALQAAAPL///8PJQ0AAAQAAAAPNAAAACQAAADA////8////w8mDQAABAAAAA81AAAAJQAAALb////0////DycNAAAEAAAADzYAAABeAAAA2P///9n///8PKA0AAAQAAAAPNwAAACYAAADW////3////w8pDQAABAAAAA84AAAAKgAAAKT////1////DyoNAAAEAAAADzkAAAAoAAAAtf////b///8PKw0AAAQAAAAPMAAAACkAAACo////9////w8sDQAABAAAAA8tAAAAXwAAAKL////4////Dy0NAAAEAAAADz0AAAArAAAAqv////n///8PLg0AAAQAAAAPcQAAAFEAAADm////8P///w8vDQAABAAAAA93AAAAVwAAAOT///8iAAAADzANAAAEAAAAD2UAAABFAAAA0////67///8PMQ0AAAQAAAAPcgAAAFIAAAC+////sf///w8yDQAABAAAAA90AAAAVAAAAND///+4////DzMNAAAEAAAAD3kAAABZAAAA0f///+3///8PNA0AAAQAAAAPdQAAAFUAAADV////6v///w81DQAABAAAAA9pAAAASQAAAMP///+z////DzYNAAAEAAAAD28AAABPAAAAuf///8////8PNw0AAAQAAAAPcAAAAFAAAADC////rf///w84DQAABAAAAA9bAAAAewAAALr///+w////DzkNAAAEAAAAD10AAAB9AAAAxf///ywAAAAPOg0AAAQAAAAPYQAAAEEAAAC/////xP///w87DQAABAAAAA9zAAAAUwAAAMv///+m////DzwNAAAEAAAAD2QAAABEAAAAof///6////8PPQ0AAAQAAAAPZgAAAEYAAAC0////4v///w8+DQAABAAAAA9nAAAARwAAAOD///+s////Dz8NAAAEAAAAD2gAAABIAAAA6f///+f///8PQA0AAAQAAAAPagAAAEoAAADo////6////w9BDQAABAAAAA9rAAAASwAAANL////J////D0INAAAEAAAAD2wAAABMAAAAyv///8j///8PQw0AAAQAAAAPOwAAADoAAADH////q////w9EDQAABAAAAA8nAAAAIgAAAKf///8uAAAAD0UNAAAEAAAAD1wAAAB8AAAAo////6X///8PRg0AAAQAAAAPegAAAFoAAAC8////KAAAAA9HDQAABAAAAA94AAAAWAAAALv///8pAAAAD0gNAAAEAAAAD2MAAABDAAAA4f///6n///8PSQ0AAAQAAAAPdgAAAFYAAADN////zv///w9KDQAAAwAAAA9iAAAAQgAAANr///8PSw0AAAQAAAAPbgAAAE4AAADX////7P///w9MDQAABAAAAA9tAAAATQAAALf///8/AAAAD00NAAAEAAAADywAAAA8AAAAwf///7L///8PTg0AAAQAAAAPLgAAAD4AAADj////zP///w9PDQAABAAAAA8vAAAAPwAAAL3////G////D1ANAAAAAAAADw9RDQAAAAAAAA8PUg0AAAIAAAAPQAAAAKf///8PUw0AAAIAAAAPMQAAACEAAAAPVA0AAAIAAAAPMgAAACIAAAAPVQ0AAAIAAAAPMwAAACMAAAAPVg0AAAIAAAAPNAAAACQAAAAPVw0AAAIAAAAPNQAAACUAAAAPWA0AAAIAAAAPNgAAACYAAAAPWQ0AAAIAAAAPNwAAAF8AAAAPWg0AAAIAAAAPOAAAACgAAAAPWw0AAAIAAAAPOQAAACkAAAAPXA0AAAIAAAAPMAAAACcAAAAPXQ0AAAIAAAAPLwAAAD8AAAAPXg0AAAIAAAAPsP///34AAAAPXw0AAAIAAAAPcQAAAFEAAAAPYA0AAAIAAAAPdwAAAFcAAAAPYQ0AAAIAAAAPZQAAAEUAAAAPYg0AAAIAAAAPcgAAAFIAAAAPYw0AAAIAAAAPdAAAAFQAAAAPZA0AAAIAAAAPeQAAAFkAAAAPZQ0AAAIAAAAPdQAAAFUAAAAPZg0AAAIAAAAPaQAAAEkAAAAPZw0AAAIAAAAPbwAAAE8AAAAPaA0AAAIAAAAPcAAAAFAAAAAPaQ0AAAIAAAAPqP///34AAAAPag0AAAIAAAAPKgAAAHwAAAAPaw0AAAIAAAAPYQAAAEEAAAAPbA0AAAIAAAAPcwAAAFMAAAAPbQ0AAAIAAAAPZAAAAEQAAAAPbg0AAAIAAAAPZgAAAEYAAAAPbw0AAAIAAAAPZwAAAEcAAAAPcA0AAAIAAAAPaAAAAEgAAAAPcQ0AAAIAAAAPagAAAEoAAAAPcg0AAAIAAAAPawAAAEsAAAAPcw0AAAIAAAAPbAAAAEwAAAAPdA0AAAIAAAAPKwAAALH///8PdQ0AAAIAAAAPJwAAAGAAAAAPdg0AAAIAAAAPPAAAAD4AAAAPdw0AAAIAAAAPegAAAFoAAAAPeA0AAAIAAAAPeAAAAFgAAAAPeQ0AAAIAAAAPYwAAAEMAAAAPeg0AAAIAAAAPdgAAAFYAAAAPew0AAAIAAAAPYgAAAEIAAAAPfA0AAAIAAAAPbgAAAE4AAAAPfQ0AAAIAAAAPbQAAAE0AAAAPfg0AAAIAAAAPLAAAADsAAAAPfw0AAAIAAAAPLgAAADoAAAAPgA0AAAIAAAAPLQAAAD0AAAAPgQ0AAAIAAAAPWwAAAF0AAAAPgg0AAAAAAAAPCw==</value></data><data name="scan_table" mimetype="application/x-microsoft.net.object.binary.base64"><value>AAEAAAD/////AQAAAAAAAAAHAQAAAAEBAAAABQAAAAcHCQIAAAAJAwAAAAkEAAAACQUAAAAJBgAAAA8CAAAAMAAAAAcpAAIAAwAEAAUABgAHAAgACQAKAAsADAANABAAEQASABMAFAAVABYAFwAYABkAGgAbAB4AHwAgACEAIgAjACQAJQAmACcAKAArACwALQAuAC8AMAAxADIAMwA0ADUAVgAPAwAAADAAAAAHKQACAAMABAAFAAYABwAIAAkACgALABoAGwAoADMANAAZABUAIQAiAC4AEwAmADUADQAeABgAEgAWABcAIAAjABQAMQAfAAwAKwAnABAAJAAlAC0AMAAyABEALwAsAFYADwQAAAAyAAAABykAAgADAAQABQAGAAcACAAJAAoACwAMAA0AEAARABIAEwAUABUAFgAXABgAGQAaABsAHgAfACAAIQAiACMAJAAlACYAJwAoACsAXgAsAC0ALgAvADAAMQAyADMANAA1AFYANQAPBQAAADAAAAAHAgADAAQABQAGAAcACAAJAAoACwAMAA0AKQAQABEAEgATABQAFQAWABcAGAAZABoAGwAeAB8AIAAhACIAIwAkACUAJgAnACgAKwAsAC0ALgAvADAAMQAyADMANAA1AFYADwYAAAAwAAAABwIAAwAEAAUABgAHAAgACQAKAAsADAANABoAGwAnACgAKQAzADQANQArAB4AMAAuACAAEgAhACIAIwAXACQAJQAmADIAMQAYABkAEAATAB8AFAAWAC8AEQAtABUALABWAAs=</value></data><data name="vkey_table" mimetype="application/x-microsoft.net.object.binary.base64"><value>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</value></data></root>A4gAAAAs=</value></data></root>
\ No newline at end of file
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="keyboard_table" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAEdjcmVhdGUta2V5Ym9hcmRzLCBWZXJzaW9uPTAuMC4wLjAsIEN1
+        bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAcBAAAAAAEAAABAAAAABCNTeXN0ZW0uV2lu
+        ZG93cy5Gb3Jtcy5LZXlib2FyZExheW91dAIAAAAJAwAAAAkEAAAACQUAAAAJBgAAAAkHAAAACQgAAAAJ
+        CQAAAAkKAAAACQsAAAAJDAAAAAkNAAAACQ4AAAAJDwAAAAkQAAAACREAAAAJEgAAAAkTAAAACRQAAAAJ
+        FQAAAAkWAAAACRcAAAAJGAAAAAkZAAAACRoAAAAJGwAAAAkcAAAACR0AAAAJHgAAAAkfAAAACSAAAAAJ
+        IQAAAAkiAAAACSMAAAAJJAAAAAklAAAACSYAAAAJJwAAAAkoAAAACSkAAAAJKgAAAAkrAAAACSwAAAAJ
+        LQAAAAkuAAAACS8AAAAJMAAAAAkxAAAACTIAAAAJMwAAAAk0AAAACTUAAAAJNgAAAAk3AAAACTgAAAAJ
+        OQAAAAk6AAAACTsAAAAJPAAAAAk9AAAACT4AAAAJPwAAAAlAAAAACUEAAAAJQgAAAAUDAAAAI1N5c3Rl
+        bS5XaW5kb3dzLkZvcm1zLktleWJvYXJkTGF5b3V0BQAAAARMY2lkBE5hbWUJU2NhbkluZGV4CVZLZXlJ
+        bmRleARLZXlzAAEEBAMII1N5c3RlbS5XaW5kb3dzLkZvcm1zLlNjYW5UYWJsZUluZGV4AgAAACNTeXN0
+        ZW0uV2luZG93cy5Gb3Jtcy5WS2V5VGFibGVJbmRleAIAAAARU3lzdGVtLlVJbnQzMltdW10CAAAACQQA
+        AAZDAAAAHVVuaXRlZCBTdGF0ZXMga2V5Ym9hcmQgbGF5b3V0Bbz///8jU3lzdGVtLldpbmRvd3MuRm9y
+        bXMuU2NhblRhYmxlSW5kZXgBAAAAB3ZhbHVlX18ACAIAAAAAAAAABbv///8jU3lzdGVtLldpbmRvd3Mu
+        Rm9ybXMuVktleVRhYmxlSW5kZXgBAAAAB3ZhbHVlX18ACAIAAAAAAAAACUYAAAABBAAAAAMAAAAJBAAA
+        BkcAAAAzVW5pdGVkIFN0YXRlcyBrZXlib2FyZCBsYXlvdXQgKHBoYW50b20ga2V5IHZlcnNpb24pAbj/
+        //+8////AAAAAAG3////u////wAAAAAJSgAAAAEFAAAAAwAAAAkEAAAGSwAAACZVbml0ZWQgU3RhdGVz
+        IGtleWJvYXJkIGxheW91dCAoZHZvcmFrKQG0////vP///wEAAAABs////7v///8CAAAACU4AAAABBgAA
+        AAMAAAAJBAAABk8AAAArVW5pdGVkIFN0YXRlcyBJbnRlcm5hdGlvbmFsIGtleWJvYXJkIGxheW91dAGw
+        ////vP///wAAAAABr////7v///8AAAAACVIAAAABBwAAAAMAAAAJCAAABlMAAAAXQnJpdGlzaCBrZXli
+        b2FyZCBsYXlvdXQBrP///7z///8AAAAAAav///+7////AAAAAAlWAAAAAQgAAAADAAAABwQAAAZXAAAA
+        Fkdlcm1hbiBrZXlib2FyZCBsYXlvdXQBqP///7z///8AAAAAAaf///+7////AQAAAAlaAAAAAQkAAAAD
+        AAAABwQAAAZbAAAAKEdlcm1hbiBrZXlib2FyZCBsYXlvdXQgd2l0aG91dCBkZWFkIGtleXMBpP///7z/
+        //8AAAAAAaP///+7////AQAAAAleAAAAAQoAAAADAAAABwQAAAZfAAAAL0dlcm1hbiBrZXlib2FyZCBs
+        YXlvdXQgZm9yIGxvZ2l0ZWNoIGRlc2t0b3AgcHJvAaD///+8////AAAAAAGf////u////wEAAAAJYgAA
+        AAELAAAAAwAAAAcEAAAGYwAAACxHZXJtYW4ga2V5Ym9hcmQgbGF5b3V0IHdpdGhvdXQgZGVhZCBrZXlz
+        IDEwNQGc////vP///wAAAAABm////7v///8DAAAACWYAAAABDAAAAAMAAAAHCAAABmcAAAAcU3dpc3Mg
+        R2VybWFuIGtleWJvYXJkIGxheW91dAGY////vP///wAAAAABl////7v///8BAAAACWoAAAABDQAAAAMA
+        AAAMEAAABmsAAAAcU3dpc3MgRnJlbmNoIGtleWJvYXJkIGxheW91dAGU////vP///wAAAAABk////7v/
+        //8BAAAACW4AAAABDgAAAAMAAAAdBAAABm8AAAAXU3dlZGlzaCBrZXlib2FyZCBsYXlvdXQBkP///7z/
+        //8AAAAAAY////+7////BQAAAAlyAAAAAQ8AAAADAAAAJQQAAAZzAAAAGEVzdG9uaWFuIGtleWJvYXJk
+        IGxheW91dAGM////vP///wAAAAABi////7v///8AAAAACXYAAAABEAAAAAMAAAAUBAAABncAAAAZTm9y
+        d2VnaWFuIGtleWJvYXJkIGxheW91dAGI////vP///wAAAAABh////7v///8AAAAACXoAAAABEQAAAAMA
+        AAAGBAAABnsAAAAWRGFuaXNoIGtleWJvYXJkIGxheW91dAGE////vP///wAAAAABg////7v///8AAAAA
+        CX4AAAABEgAAAAMAAAAMBAAABn8AAAAWRnJlbmNoIGtleWJvYXJkIGxheW91dAGA////vP///wAAAAAB
+        f////7v///8EAAAACYIAAAABEwAAAAMAAAAMDAAABoMAAAAfQ2FuYWRpYW4gRnJlbmNoIGtleWJvYXJk
+        IGxheW91dAF8////vP///wAAAAABe////7v///8AAAAACYYAAAABFAAAAAMAAAAMDAAABocAAAAnQ2Fu
+        YWRpYW4gRnJlbmNoIGtleWJvYXJkIGxheW91dCAoQ0FfZnIpAXj///+8////AAAAAAF3////u////wAA
+        AAAJigAAAAEVAAAAAwAAAAwMAAAGiwAAABhDYW5hZGlhbiBrZXlib2FyZCBsYXlvdXQBdP///7z///8A
+        AAAAAXP///+7////AAAAAAmOAAAAARYAAAADAAAADAgAAAaPAAAAF0JlbGdpYW4ga2V5Ym9hcmQgbGF5
+        b3V0AXD///+8////AAAAAAFv////u////wQAAAAJkgAAAAEXAAAAAwAAABYIAAAGkwAAABpQb3J0dWd1
+        ZXNlIGtleWJvYXJkIGxheW91dAFs////vP///wAAAAABa////7v///8AAAAACZYAAAABGAAAAAMAAAAW
+        BAAABpcAAAAgQnJhemlsaWFuIEFCTlQtMiBrZXlib2FyZCBsYXlvdXQBaP///7z///8CAAAAAWf///+7
+        ////BgAAAAmaAAAAARkAAAADAAAAFgQAAAabAAAAJ0JyYXppbGlhbiBBQk5ULTIga2V5Ym9hcmQgbGF5
+        b3V0IEFMVCBHUgFk////vP///wIAAAABY////7v///8GAAAACZ4AAAABGgAAAAMAAAALBAAABp8AAAAX
+        RmlubmlzaCBrZXlib2FyZCBsYXlvdXQBYP///7z///8AAAAAAV////+7////AAAAAAmiAAAAARsAAAAD
+        AAAAAgQAAAajAAAAHUJ1bGdhcmlhbiBiZHMga2V5Ym9hcmQgbGF5b3V0AVz///+8////AAAAAAFb////
+        u////wAAAAAJpgAAAAEcAAAAAwAAAAIEAAAGpwAAACJCdWxnYXJpYW4gcGhvbmV0aWMga2V5Ym9hcmQg
+        bGF5b3V0AVj///+8////AAAAAAFX////u////wAAAAAJqgAAAAEdAAAAAwAAACMEAAAGqwAAABpCZWxh
+        cnVzaWFuIGtleWJvYXJkIGxheW91dAFU////vP///wAAAAABU////7v///8AAAAACa4AAAABHgAAAAMA
+        AAAZBAAABq8AAAAXUnVzc2lhbiBrZXlib2FyZCBsYXlvdXQBUP///7z///8AAAAAAU////+7////AAAA
+        AAmyAAAAAR8AAAADAAAAGQQAAAazAAAALVJ1c3NpYW4ga2V5Ym9hcmQgbGF5b3V0IChwaGFudG9tIGtl
+        eSB2ZXJzaW9uKQFM////vP///wAAAAABS////7v///8AAAAACbYAAAABIAAAAAMAAAAZBAAABrcAAAAe
+        UnVzc2lhbiBrZXlib2FyZCBsYXlvdXQgS09JOC1SAUj///+8////AAAAAAFH////u////wAAAAAJugAA
+        AAEhAAAAAwAAABkEAAAGuwAAAB5SdXNzaWFuIGtleWJvYXJkIGxheW91dCBjcDEyNTEBRP///7z///8A
+        AAAAAUP///+7////AAAAAAm+AAAAASIAAAADAAAAGQQAAAa/AAAAIFJ1c3NpYW4gcGhvbmV0aWMga2V5
+        Ym9hcmQgbGF5b3V0AUD///+8////AAAAAAE/////u////wAAAAAJwgAAAAEjAAAAAwAAACIEAAAGwwAA
+        ACBVa3JhaW5pYW4ga2V5Ym9hcmQgbGF5b3V0IEtPSTgtVQE8////vP///wAAAAABO////7v///8AAAAA
+        CcYAAAABJAAAAAMAAAAiBAAABscAAAAkVWtyYWluaWFuIGtleWJvYXJkIGxheW91dCAoc3RhbmRhcmQp
+        ATj///+8////AAAAAAE3////u////wAAAAAJygAAAAElAAAAAwAAABkEAAAGywAAACJSdXNzaWFuIGtl
+        eWJvYXJkIGxheW91dCAoc3RhbmRhcmQpATT///+8////AAAAAAEz////u////wAAAAAJzgAAAAEmAAAA
+        AwAAAAoEAAAGzwAAABdTcGFuaXNoIGtleWJvYXJkIGxheW91dAEw////vP///wAAAAABL////7v///8A
+        AAAACdIAAAABJwAAAAMAAAAQBAAABtMAAAAXSXRhbGlhbiBrZXlib2FyZCBsYXlvdXQBLP///7z///8A
+        AAAAASv///+7////AAAAAAnWAAAAASgAAAADAAAADwQAAAbXAAAAGUljZWxhbmRpYyBrZXlib2FyZCBs
+        YXlvdXQBKP///7z///8AAAAAASf///+7////AAAAAAnaAAAAASkAAAADAAAADgQAAAbbAAAAGUh1bmdh
+        cmlhbiBrZXlib2FyZCBsYXlvdXQBJP///7z///8AAAAAASP///+7////AQAAAAneAAAAASoAAAADAAAA
+        FQQAAAbfAAAAJVBvbGlzaCAocHJvZ3JhbW1lcidzKSBrZXlib2FyZCBsYXlvdXQBIP///7z///8AAAAA
+        AR////+7////AAAAAAniAAAAASsAAAADAAAAJAQAAAbjAAAAGVNsb3ZlbmlhbiBrZXlib2FyZCBsYXlv
+        dXQBHP///7z///8AAAAAARv///+7////AQAAAAnmAAAAASwAAAADAAAAGgwAAAbnAAAAGlNlcmJpYW4g
+        a2V5Ym9hcmQgbGF5b3V0IHNyARj///+8////AAAAAAEX////u////wAAAAAJ6gAAAAEtAAAAAwAAABoM
+        AAAG6wAAAB1TZXJiaWFuIGtleWJvYXJkIGxheW91dCB1cyxzcgEU////vP///wAAAAABE////7v///8A
+        AAAACe4AAAABLgAAAAMAAAAaBAAABu8AAAAYQ3JvYXRpYW4ga2V5Ym9hcmQgbGF5b3V0ARD///+8////
+        AAAAAAEP////u////wEAAAAJ8gAAAAEvAAAAAwAAABoEAAAG8wAAACNDcm9hdGlhbiBrZXlib2FyZCBs
+        YXlvdXQgKHNwZWNpZmljKQEM////vP///wAAAAABC////7v///8AAAAACfYAAAABMAAAAAMAAAARBAAA
+        BvcAAAAcSmFwYW5lc2UgMTA2IGtleWJvYXJkIGxheW91dAEI////vP///wMAAAABB////7v///8HAAAA
+        CfoAAAABMQAAAAMAAAARBAAABvsAAAAfSmFwYW5lc2UgcGM5OHgxIGtleWJvYXJkIGxheW91dAEE////
+        vP///wAAAAABA////7v///8AAAAACf4AAAABMgAAAAMAAAAbBAAABv8AAAAWU2xvdmFrIGtleWJvYXJk
+        IGxheW91dAEA////vP///wAAAAAB//7//7v///8AAAAACQIBAAABMwAAAAMAAAAbBAAABgMBAAAyU2xv
+        dmFrIGFuZCBDemVjaCBrZXlib2FyZCBsYXlvdXQgd2l0aG91dCBkZWFkIGtleXMB/P7//7z///8AAAAA
+        Afv+//+7////AAAAAAkGAQAAATQAAAADAAAABQQAAAYHAQAAFUN6ZWNoIGtleWJvYXJkIGxheW91dAH4
+        /v//vP///wAAAAAB9/7//7v///8AAAAACQoBAAABNQAAAAMAAAAFBAAABgsBAAAYQ3plY2gga2V5Ym9h
+        cmQgbGF5b3V0IGN6AfT+//+8////AAAAAAHz/v//u////wEAAAAJDgEAAAE2AAAAAwAAAAUEAAAGDwEA
+        AB9DemVjaCBrZXlib2FyZCBsYXlvdXQgY3pfcXdlcnR5AfD+//+8////AAAAAAHv/v//u////wAAAAAJ
+        EgEAAAE3AAAAAwAAAAoEAAAGEwEAAB5MYXRpbiBBbWVyaWNhbiBrZXlib2FyZCBsYXlvdXQB7P7//7z/
+        //8AAAAAAev+//+7////AAAAAAkWAQAAATgAAAADAAAAJwQAAAYXAQAAI0xpdGh1YW5pYW4gKEJhbHRp
+        Yykga2V5Ym9hcmQgbGF5b3V0Aej+//+8////AAAAAAHn/v//u////wAAAAAJGgEAAAE5AAAAAwAAAB8E
+        AAAGGwEAABdUdXJraXNoIGtleWJvYXJkIGxheW91dAHk/v//vP///wAAAAAB4/7//7v///8AAAAACR4B
+        AAABOgAAAAMAAAAfBAAABh8BAAAaVHVya2lzaCBrZXlib2FyZCBsYXlvdXQgdHIB4P7//7z///8AAAAA
+        Ad/+//+7////AAAAAAkiAQAAATsAAAADAAAAHwQAAAYjAQAAG1R1cmtpc2gga2V5Ym9hcmQgbGF5b3V0
+        IHRyZgHc/v//vP///wAAAAAB2/7//7v///8AAAAACSYBAAABPAAAAAMAAAANBAAABicBAAAZSXNyYWVs
+        aWFuIGtleWJvYXJkIGxheW91dAHY/v//vP///wAAAAAB1/7//7v///8AAAAACSoBAAABPQAAAAMAAAAN
+        BAAABisBAAAiSXNyYWVsaWFuIHBob25ldGljIGtleWJvYXJkIGxheW91dAHU/v//vP///wAAAAAB0/7/
+        /7v///8AAAAACS4BAAABPgAAAAMAAAANBAAABi8BAAAhSXNyYWVsaWFuIFNhaGFyb24ga2V5Ym9hcmQg
+        bGF5b3V0AdD+//+8////AAAAAAHP/v//u////wAAAAAJMgEAAAE/AAAAAwAAAAkEAAAGMwEAABNWTkMg
+        a2V5Ym9hcmQgbGF5b3V0Acz+//+8////BAAAAAHL/v//u////wgAAAAJNgEAAAFAAAAAAwAAAAgEAAAG
+        NwEAABVHcmVlayBrZXlib2FyZCBsYXlvdXQByP7//7z///8AAAAAAcf+//+7////AAAAAAk6AQAAAUEA
+        AAADAAAAHgQAAAY7AQAAIFRoYWkgKEtlZG1hbmVlKSAga2V5Ym9hcmQgbGF5b3V0AcT+//+8////AAAA
+        AAHD/v//u////wAAAAAJPgEAAAFCAAAAAwAAABMEAAAGPwEAABVEdXRjaCBrZXlib2FyZCBsYXlvdXQB
+        wP7//7z///8AAAAAAb/+//+7////AAAAAAlCAQAAB0YAAAABAQAAADEAAAAHDwlDAQAACUQBAAAJRQEA
+        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
+        NQAAACUAAAAPegEAAAIAAAAPNgAAAF4AAAAPewEAAAIAAAAPNwAAACYAAAAPfAEAAAIAAAAPOAAAACoA
+        AAAPfQEAAAIAAAAPOQAAACgAAAAPfgEAAAIAAAAPMAAAACkAAAAPfwEAAAIAAAAPLQAAAF8AAAAPgAEA
+        AAIAAAAPPQAAACsAAAAPgQEAAAIAAAAPcQAAAFEAAAAPggEAAAIAAAAPdwAAAFcAAAAPgwEAAAIAAAAP
+        ZQAAAEUAAAAPhAEAAAIAAAAPcgAAAFIAAAAPhQEAAAIAAAAPdAAAAFQAAAAPhgEAAAIAAAAPeQAAAFkA
+        AAAPhwEAAAIAAAAPdQAAAFUAAAAPiAEAAAIAAAAPaQAAAEkAAAAPiQEAAAIAAAAPbwAAAE8AAAAPigEA
+        AAIAAAAPcAAAAFAAAAAPiwEAAAIAAAAPWwAAAHsAAAAPjAEAAAIAAAAPXQAAAH0AAAAPjQEAAAIAAAAP
+        YQAAAEEAAAAPjgEAAAIAAAAPcwAAAFMAAAAPjwEAAAIAAAAPZAAAAEQAAAAPkAEAAAIAAAAPZgAAAEYA
+        AAAPkQEAAAIAAAAPZwAAAEcAAAAPkgEAAAIAAAAPaAAAAEgAAAAPkwEAAAIAAAAPagAAAEoAAAAPlAEA
+        AAIAAAAPawAAAEsAAAAPlQEAAAIAAAAPbAAAAEwAAAAPlgEAAAIAAAAPOwAAADoAAAAPlwEAAAIAAAAP
+        JwAAACIAAAAPmAEAAAIAAAAPXAAAAHwAAAAPmQEAAAIAAAAPegAAAFoAAAAPmgEAAAIAAAAPeAAAAFgA
+        AAAPmwEAAAIAAAAPYwAAAEMAAAAPnAEAAAIAAAAPdgAAAFYAAAAPnQEAAAIAAAAPYgAAAEIAAAAPngEA
+        AAIAAAAPbgAAAE4AAAAPnwEAAAIAAAAPbQAAAE0AAAAPoAEAAAIAAAAPLAAAADwAAAAPoQEAAAIAAAAP
+        LgAAAD4AAAAPogEAAAIAAAAPLwAAAD8AAAAPowEAAAIAAAAPPAAAAD4AAAAPpAEAAAAAAAAPD6UBAAAC
+        AAAAD2AAAAB+AAAAD6YBAAACAAAADzEAAAAhAAAAD6cBAAACAAAADzIAAABAAAAAD6gBAAACAAAADzMA
+        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
+        DwgCAAACAAAADzEAAAAhAAAADwkCAAACAAAADzIAAAAiAAAADwoCAAACAAAADzMAAACj////DwsCAAAC
+        AAAADzQAAAAkAAAADwwCAAACAAAADzUAAAAlAAAADw0CAAACAAAADzYAAABeAAAADw4CAAACAAAADzcA
+        AAAmAAAADw8CAAACAAAADzgAAAAqAAAADxACAAACAAAADzkAAAAoAAAADxECAAACAAAADzAAAAApAAAA
+        DxICAAACAAAADy0AAABfAAAADxMCAAACAAAADz0AAAArAAAADxQCAAACAAAAD3EAAABRAAAADxUCAAAC
+        AAAAD3cAAABXAAAADxYCAAACAAAAD2UAAABFAAAADxcCAAACAAAAD3IAAABSAAAADxgCAAACAAAAD3QA
+        AABUAAAADxkCAAACAAAAD3kAAABZAAAADxoCAAACAAAAD3UAAABVAAAADxsCAAACAAAAD2kAAABJAAAA
+        DxwCAAACAAAAD28AAABPAAAADx0CAAACAAAAD3AAAABQAAAADx4CAAACAAAAD1sAAAB7AAAADx8CAAAC
+        AAAAD10AAAB9AAAADyACAAACAAAAD2EAAABBAAAADyECAAACAAAAD3MAAABTAAAADyICAAACAAAAD2QA
+        AABEAAAADyMCAAACAAAAD2YAAABGAAAADyQCAAACAAAAD2cAAABHAAAADyUCAAACAAAAD2gAAABIAAAA
+        DyYCAAACAAAAD2oAAABKAAAADycCAAACAAAAD2sAAABLAAAADygCAAACAAAAD2wAAABMAAAADykCAAAC
+        AAAADzsAAAA6AAAADyoCAAACAAAADycAAABAAAAADysCAAACAAAADyMAAAB+AAAADywCAAACAAAAD3oA
+        AABaAAAADy0CAAACAAAAD3gAAABYAAAADy4CAAACAAAAD2MAAABDAAAADy8CAAACAAAAD3YAAABWAAAA
+        DzACAAACAAAAD2IAAABCAAAADzECAAACAAAAD24AAABOAAAADzICAAACAAAAD20AAABNAAAADzMCAAAC
+        AAAADywAAAA8AAAADzQCAAACAAAADy4AAAA+AAAADzUCAAACAAAADy8AAAA/AAAADzYCAAACAAAAD1wA
+        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
+        AAAPHQMAAAIAAAAPbAAAAEwAAAAPHgMAAAIAAAAP9v///+n///8PHwMAAAIAAAAP5P///+D///8PIAMA
+        AAIAAAAPJAAAAKP///8PIQMAAAIAAAAPeQAAAFkAAAAPIgMAAAIAAAAPeAAAAFgAAAAPIwMAAAIAAAAP
+        YwAAAEMAAAAPJAMAAAIAAAAPdgAAAFYAAAAPJQMAAAIAAAAPYgAAAEIAAAAPJgMAAAIAAAAPbgAAAE4A
+        AAAPJwMAAAIAAAAPbQAAAE0AAAAPKAMAAAIAAAAPLAAAADsAAAAPKQMAAAIAAAAPLgAAADoAAAAPKgMA
+        AAIAAAAPLQAAAF8AAAAPKwMAAAIAAAAPPAAAAD4AAAAPLAMAAAAAAAAPDy0DAAACAAAAD6f///+w////
+        Dy4DAAACAAAADzEAAAArAAAADy8DAAACAAAADzIAAAAiAAAADzADAAACAAAADzMAAAAqAAAADzEDAAAC
+        AAAADzQAAADn////DzIDAAACAAAADzUAAAAlAAAADzMDAAACAAAADzYAAAAmAAAADzQDAAACAAAADzcA
+        AAAvAAAADzUDAAACAAAADzgAAAAoAAAADzYDAAACAAAADzkAAAApAAAADzcDAAACAAAADzAAAAA9AAAA
+        DzgDAAACAAAADycAAAA/AAAADzkDAAACAAAAD14AAABgAAAADzoDAAACAAAAD3EAAABRAAAADzsDAAAC
+        AAAAD3cAAABXAAAADzwDAAACAAAAD2UAAABFAAAADz0DAAACAAAAD3IAAABSAAAADz4DAAACAAAAD3QA
+        AABUAAAADz8DAAACAAAAD3oAAABaAAAAD0ADAAACAAAAD3UAAABVAAAAD0EDAAACAAAAD2kAAABJAAAA
+        D0IDAAACAAAAD28AAABPAAAAD0MDAAACAAAAD3AAAABQAAAAD0QDAAACAAAAD+j////8////D0UDAAAC
+        AAAAD6j///8hAAAAD0YDAAACAAAAD2EAAABBAAAAD0cDAAACAAAAD3MAAABTAAAAD0gDAAACAAAAD2QA
+        AABEAAAAD0kDAAACAAAAD2YAAABGAAAAD0oDAAACAAAAD2cAAABHAAAAD0sDAAACAAAAD2gAAABIAAAA
+        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
+        D4wEAAACAAAADzgAAAAqAAAAD40EAAACAAAADzkAAAAoAAAAD44EAAACAAAADzAAAAApAAAAD48EAAAC
+        AAAADy0AAABfAAAAD5AEAAACAAAADz0AAAArAAAAD5EEAAACAAAAD3EAAABRAAAAD5IEAAACAAAAD3cA
+        AABXAAAAD5MEAAACAAAAD2UAAABFAAAAD5QEAAACAAAAD3IAAABSAAAAD5UEAAACAAAAD3QAAABUAAAA
+        D5YEAAACAAAAD3kAAABZAAAAD5cEAAACAAAAD3UAAABVAAAAD5gEAAACAAAAD2kAAABJAAAAD5kEAAAC
+        AAAAD28AAABPAAAAD5oEAAACAAAAD3AAAABQAAAAD5sEAAACAAAAD14AAABeAAAAD5wEAAACAAAAD7j/
+        //+o////D50EAAACAAAAD2EAAABBAAAAD54EAAACAAAAD3MAAABTAAAAD58EAAACAAAAD2QAAABEAAAA
+        D6AEAAACAAAAD2YAAABGAAAAD6EEAAACAAAAD2cAAABHAAAAD6IEAAACAAAAD2gAAABIAAAAD6MEAAAC
+        AAAAD2oAAABKAAAAD6QEAAACAAAAD2sAAABLAAAAD6UEAAACAAAAD2wAAABMAAAAD6YEAAACAAAADzsA
+        AAA6AAAAD6cEAAACAAAAD2AAAABgAAAAD6gEAAACAAAADzwAAAA+AAAAD6kEAAACAAAAD3oAAABaAAAA
+        D6oEAAACAAAAD3gAAABYAAAAD6sEAAACAAAAD2MAAABDAAAAD6wEAAACAAAAD3YAAABWAAAAD60EAAAC
+        AAAAD2IAAABCAAAAD64EAAACAAAAD24AAABOAAAAD68EAAACAAAAD20AAABNAAAAD7AEAAACAAAADywA
+        AAAnAAAAD7EEAAABAAAADy4AAAAPsgQAAAIAAAAP6f///8n///8PswQAAAIAAAAPq////7v///8PtAQA
+        AAAAAAAPD7UEAAACAAAADy8AAABcAAAAD7YEAAAEAAAADzEAAAAhAAAAuf///6H///8PtwQAAAMAAAAP
+        MgAAAEAAAACy////D7gEAAAEAAAADzMAAAAjAAAAs////6P///8PuQQAAAQAAAAPNAAAACQAAAC8////
+        pP///w+6BAAAAwAAAA81AAAAJQAAAL3///8PuwQAAAMAAAAPNgAAAD8AAAC+////D7wEAAACAAAADzcA
+        AAAmAAAAD70EAAACAAAADzgAAAAqAAAAD74EAAACAAAADzkAAAAoAAAAD78EAAACAAAADzAAAAApAAAA
+        D8AEAAACAAAADy0AAABfAAAAD8EEAAACAAAADz0AAAArAAAAD8IEAAACAAAAD3EAAABRAAAAD8MEAAAC
+        AAAAD3cAAABXAAAAD8QEAAACAAAAD2UAAABFAAAAD8UEAAACAAAAD3IAAABSAAAAD8YEAAACAAAAD3QA
+        AABUAAAAD8cEAAACAAAAD3kAAABZAAAAD8gEAAACAAAAD3UAAABVAAAAD8kEAAACAAAAD2kAAABJAAAA
+        D8oEAAAEAAAAD28AAABPAAAA+P///9j///8PywQAAAQAAAAPcAAAAFAAAAD+////3v///w/MBAAAAwAA
+        AA9eAAAAqP///6j///8PzQQAAAMAAAAP5////8f///9+AAAAD84EAAAEAAAAD2EAAABBAAAA5v///8b/
+        //8PzwQAAAQAAAAPcwAAAFMAAADf////p////w/QBAAABAAAAA9kAAAARAAAAPD////Q////D9EEAAAC
+        AAAAD2YAAABGAAAAD9IEAAACAAAAD2cAAABHAAAAD9MEAAACAAAAD2gAAABIAAAAD9QEAAACAAAAD2oA
+        AABKAAAAD9UEAAACAAAAD2sAAABLAAAAD9YEAAACAAAAD2wAAABMAAAAD9cEAAADAAAADzsAAAA6AAAA
+        tP///w/YBAAAAgAAAA/o////yP///w/ZBAAAAgAAAA/g////wP///w/aBAAAAgAAAA96AAAAWgAAAA/b
+        BAAAAgAAAA94AAAAWAAAAA/cBAAABAAAAA9jAAAAQwAAAKL///+p////D90EAAACAAAAD3YAAABWAAAA
+        D94EAAACAAAAD2IAAABCAAAAD98EAAACAAAAD24AAABOAAAAD+AEAAAEAAAAD20AAABNAAAAtf///7r/
+        //8P4QQAAAIAAAAPLAAAACcAAAAP4gQAAAQAAAAPLgAAACIAAAC3////9////w/jBAAAAgAAAA/p////
+        yf///w/kBAAAAgAAAA/5////2f///w/lBAAAAAAAAA8P5gQAAAAAAAAPD+cEAAADAAAADyYAAAAxAAAA
+        fAAAAA/oBAAAAwAAAA/p////MgAAAEAAAAAP6QQAAAMAAAAPIgAAADMAAAAjAAAAD+oEAAACAAAADycA
+        AAA0AAAAD+sEAAACAAAADygAAAA1AAAAD+wEAAADAAAAD6f///82AAAAXgAAAA/tBAAAAgAAAA/o////
+        NwAAAA/uBAAAAgAAAA8hAAAAOAAAAA/vBAAAAwAAAA/n////OQAAAHsAAAAP8AQAAAMAAAAP4P///zAA
+        AAB9AAAAD/EEAAACAAAADykAAACw////D/IEAAACAAAADy0AAABfAAAAD/MEAAACAAAAD2EAAABBAAAA
+        D/QEAAACAAAAD3oAAABaAAAAD/UEAAADAAAAD2UAAABFAAAApP///w/2BAAAAgAAAA9yAAAAUgAAAA/3
+        BAAAAgAAAA90AAAAVAAAAA/4BAAAAgAAAA95AAAAWQAAAA/5BAAAAgAAAA91AAAAVQAAAA/6BAAAAgAA
+        AA9pAAAASQAAAA/7BAAAAgAAAA9vAAAATwAAAA/8BAAAAgAAAA9wAAAAUAAAAA/9BAAAAwAAAA9eAAAA
+        qP///1sAAAAP/gQAAAMAAAAPJAAAACoAAABdAAAAD/8EAAACAAAAD3EAAABRAAAADwAFAAADAAAAD3MA
+        AABTAAAA3////w8BBQAAAgAAAA9kAAAARAAAAA8CBQAAAgAAAA9mAAAARgAAAA8DBQAAAgAAAA9nAAAA
+        RwAAAA8EBQAAAgAAAA9oAAAASAAAAA8FBQAAAgAAAA9qAAAASgAAAA8GBQAAAgAAAA9rAAAASwAAAA8H
+        BQAAAgAAAA9sAAAATAAAAA8IBQAAAgAAAA9tAAAATQAAAA8JBQAAAwAAAA/5////JQAAALT///8PCgUA
+        AAMAAAAPtf///6P///9gAAAADwsFAAACAAAAD3cAAABXAAAADwwFAAACAAAAD3gAAABYAAAADw0FAAAC
+        AAAAD2MAAABDAAAADw4FAAACAAAAD3YAAABWAAAADw8FAAACAAAAD2IAAABCAAAADxAFAAACAAAAD24A
+        AABOAAAADxEFAAACAAAADywAAAA/AAAADxIFAAACAAAADzsAAAAuAAAADxMFAAACAAAADzoAAAAvAAAA
+        DxQFAAADAAAADz0AAAArAAAAfgAAAA8VBQAAAwAAAA88AAAAPgAAAFwAAAAPFgUAAAAAAAAPDxcFAAAC
+        AAAAD1wAAAB8AAAADxgFAAACAAAADzEAAAAhAAAADxkFAAACAAAADzIAAAAiAAAADxoFAAACAAAADzMA
+        AAAjAAAADxsFAAACAAAADzQAAAAkAAAADxwFAAACAAAADzUAAAAlAAAADx0FAAACAAAADzYAAAAmAAAA
+        Dx4FAAACAAAADzcAAAAvAAAADx8FAAACAAAADzgAAAAoAAAADyAFAAACAAAADzkAAAApAAAADyEFAAAC
+        AAAADzAAAAA9AAAADyIFAAACAAAADycAAAA/AAAADyMFAAACAAAAD6v///+7////DyQFAAACAAAAD3EA
+        AABRAAAADyUFAAACAAAAD3cAAABXAAAADyYFAAACAAAAD2UAAABFAAAADycFAAACAAAAD3IAAABSAAAA
+        DygFAAACAAAAD3QAAABUAAAADykFAAACAAAAD3kAAABZAAAADyoFAAACAAAAD3UAAABVAAAADysFAAAC
+        AAAAD2kAAABJAAAADywFAAACAAAAD28AAABPAAAADy0FAAACAAAAD3AAAABQAAAADy4FAAACAAAADysA
+        AAAqAAAADy8FAAACAAAAD7T///9gAAAADzAFAAACAAAAD2EAAABBAAAADzEFAAACAAAAD3MAAABTAAAA
+        DzIFAAACAAAAD2QAAABEAAAADzMFAAACAAAAD2YAAABGAAAADzQFAAACAAAAD2cAAABHAAAADzUFAAAC
+        AAAAD2gAAABIAAAADzYFAAACAAAAD2oAAABKAAAADzcFAAACAAAAD2sAAABLAAAADzgFAAACAAAAD2wA
+        AABMAAAADzkFAAACAAAAD+f////H////DzoFAAACAAAAD7r///+q////DzsFAAACAAAAD34AAABeAAAA
+        DzwFAAACAAAAD3oAAABaAAAADz0FAAACAAAAD3gAAABYAAAADz4FAAACAAAAD2MAAABDAAAADz8FAAAC
+        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
+        ///E////D/EFAAAEAAAAD3AAAABQAAAA5////8f///8P8gUAAAQAAAAPWwAAAHsAAAD2////1v///w/z
+        BQAAAwAAAA9dAAAAfQAAADsAAAAP9AUAAAQAAAAPYQAAAEEAAAD8////3P///w/1BQAABAAAAA9zAAAA
+        UwAAAP/////f////D/YFAAAEAAAAD2QAAABEAAAA4P///8D///8P9wUAAAQAAAAPZgAAAEYAAADu////
+        zv///w/4BQAABAAAAA9nAAAARwAAAOb////G////D/kFAAAEAAAAD2gAAABIAAAA4////8P///8P+gUA
+        AAQAAAAPagAAAEoAAADy////0v///w/7BQAABAAAAA9rAAAASwAAAO3////N////D/wFAAAEAAAAD2wA
+        AABMAAAA4v///8L///8P/QUAAAQAAAAPOwAAADoAAADs////zP///w/+BQAABAAAAA8nAAAAIgAAAPf/
+        ///X////D/8FAAAEAAAAD1wAAAB8AAAAJwAAANv///8PAAYAAAQAAAAPegAAAFoAAAD+////3v///w8B
+        BgAABAAAAA94AAAAWAAAAOn////J////DwIGAAAEAAAAD2MAAABDAAAA+v///9r///8PAwYAAAQAAAAP
+        dgAAAFYAAAD9////3f///w8EBgAABAAAAA9iAAAAQgAAAPT////U////DwUGAAAEAAAAD24AAABOAAAA
+        9f///9X///8PBgYAAAQAAAAPbQAAAE0AAADv////z////w8HBgAABAAAAA8sAAAAPAAAAPD////Q////
+        DwgGAAAEAAAADy4AAAA+AAAA6////8v///8PCQYAAAQAAAAPLwAAAD8AAADh////wf///w8KBgAAAgAA
+        AA88AAAAPgAAAA8LBgAAAAAAAA8PDAYAAAQAAAAPYAAAAH4AAAD3////1////w8NBgAAAgAAAA8xAAAA
+        IQAAAA8OBgAAAgAAAA8yAAAAQAAAAA8PBgAAAgAAAA8zAAAAIwAAAA8QBgAAAgAAAA80AAAAJAAAAA8R
+        BgAAAgAAAA81AAAAJQAAAA8SBgAAAgAAAA82AAAAXgAAAA8TBgAAAgAAAA83AAAAJgAAAA8UBgAAAgAA
+        AA84AAAAKgAAAA8VBgAAAgAAAA85AAAAKAAAAA8WBgAAAgAAAA8wAAAAKQAAAA8XBgAAAgAAAA8tAAAA
+        XwAAAA8YBgAAAgAAAA89AAAAKwAAAA8ZBgAABAAAAA9xAAAAUQAAAP/////f////DxoGAAAEAAAAD3cA
+        AABXAAAA4v///8L///8PGwYAAAQAAAAPZQAAAEUAAADl////xf///w8cBgAABAAAAA9yAAAAUgAAAPD/
+        ///Q////Dx0GAAAEAAAAD3QAAABUAAAA8v///9L///8PHgYAAAQAAAAPeQAAAFkAAAD6////2v///w8f
+        BgAABAAAAA91AAAAVQAAAPP////T////DyAGAAAEAAAAD2kAAABJAAAA6P///8j///8PIQYAAAQAAAAP
+        bwAAAE8AAADu////zv///w8iBgAABAAAAA9wAAAAUAAAAO/////P////DyMGAAAEAAAAD1sAAAB7AAAA
+        +P///9j///8PJAYAAAQAAAAPXQAAAH0AAAD5////2f///w8lBgAABAAAAA9hAAAAQQAAAOD////A////
+        DyYGAAAEAAAAD3MAAABTAAAA8f///9H///8PJwYAAAQAAAAPZAAAAEQAAADk////xP///w8oBgAABAAA
+        AA9mAAAARgAAAPT////U////DykGAAAEAAAAD2cAAABHAAAA4////8P///8PKgYAAAQAAAAPaAAAAEgA
+        AAD1////1f///w8rBgAABAAAAA9qAAAASgAAAOn////J////DywGAAAEAAAAD2sAAABLAAAA6v///8r/
+        //8PLQYAAAQAAAAPbAAAAEwAAADr////y////w8uBgAAAgAAAA87AAAAOgAAAA8vBgAAAgAAAA8nAAAA
+        IgAAAA8wBgAABAAAAA9cAAAAfAAAAP7////e////DzEGAAAEAAAAD3oAAABaAAAA5////8f///8PMgYA
+        AAQAAAAPeAAAAFgAAAD8////3P///w8zBgAABAAAAA9jAAAAQwAAAPb////W////DzQGAAAEAAAAD3YA
+        AABWAAAA5v///8b///8PNQYAAAQAAAAPYgAAAEIAAADh////wf///w82BgAABAAAAA9uAAAATgAAAO3/
+        ///N////DzcGAAAEAAAAD20AAABNAAAA7P///8z///8POAYAAAIAAAAPLAAAADwAAAAPOQYAAAIAAAAP
+        LgAAAD4AAAAPOgYAAAIAAAAPLwAAAD8AAAAPOwYAAAIAAAAPPAAAAD4AAAAPPAYAAAAAAAAPDz0GAAAE
+        AAAAD2AAAAB+AAAAo////7P///8PPgYAAAIAAAAPMQAAACEAAAAPPwYAAAIAAAAPMgAAAEAAAAAPQAYA
+        AAIAAAAPMwAAACMAAAAPQQYAAAIAAAAPNAAAACQAAAAPQgYAAAIAAAAPNQAAACUAAAAPQwYAAAIAAAAP
+        NgAAAF4AAAAPRAYAAAIAAAAPNwAAACYAAAAPRQYAAAIAAAAPOAAAACoAAAAPRgYAAAIAAAAPOQAAACgA
+        AAAPRwYAAAIAAAAPMAAAACkAAAAPSAYAAAIAAAAPLQAAAF8AAAAPSQYAAAIAAAAPPQAAACsAAAAPSgYA
+        AAQAAAAPcQAAAFEAAADK////6v///w9LBgAABAAAAA93AAAAVwAAAMP////j////D0wGAAAEAAAAD2UA
+        AABFAAAA1f////X///8PTQYAAAQAAAAPcgAAAFIAAADL////6////w9OBgAABAAAAA90AAAAVAAAAMX/
+        ///l////D08GAAAEAAAAD3kAAABZAAAAzv///+7///8PUAYAAAQAAAAPdQAAAFUAAADH////5////w9R
+        BgAABAAAAA9pAAAASQAAANv////7////D1IGAAAEAAAAD28AAABPAAAArv///77///8PUwYAAAQAAAAP
+        cAAAAFAAAADa////+v///w9UBgAABAAAAA9bAAAAewAAAMj////o////D1UGAAAEAAAAD10AAAB9AAAA
+        JwAAACcAAAAPVgYAAAQAAAAPYQAAAEEAAADG////5v///w9XBgAABAAAAA9zAAAAUwAAANn////5////
+        D1gGAAAEAAAAD2QAAABEAAAA1/////f///8PWQYAAAQAAAAPZgAAAEYAAADB////4f///w9aBgAABAAA
+        AA9nAAAARwAAAND////w////D1sGAAAEAAAAD2gAAABIAAAA0v////L///8PXAYAAAQAAAAPagAAAEoA
+        AADP////7////w9dBgAABAAAAA9rAAAASwAAAMz////s////D14GAAAEAAAAD2wAAABMAAAAxP///+T/
+        //8PXwYAAAQAAAAPOwAAADoAAADW////9v///w9gBgAABAAAAA8nAAAAIgAAANz////8////D2EGAAAE
+        AAAAD1wAAAB8AAAALwAAAHwAAAAPYgYAAAQAAAAPegAAAFoAAADR////8f///w9jBgAABAAAAA94AAAA
+        WAAAAN7////+////D2QGAAAEAAAAD2MAAABDAAAA0/////P///8PZQYAAAQAAAAPdgAAAFYAAADN////
+        7f///w9mBgAABAAAAA9iAAAAQgAAAKb///+2////D2cGAAAEAAAAD24AAABOAAAA1P////T///8PaAYA
+        AAQAAAAPbQAAAE0AAADY////+P///w9pBgAABAAAAA8sAAAAPAAAAML////i////D2oGAAAEAAAADy4A
+        AAA+AAAAwP///+D///8PawYAAAQAAAAPLwAAAD8AAAAuAAAALAAAAA9sBgAABAAAAA88AAAAPgAAAHwA
+        AACm////D20GAAAAAAAADw9uBgAAAgAAAA9gAAAAfgAAAA9vBgAAAgAAAA8xAAAAIQAAAA9wBgAAAgAA
+        AA8yAAAAQAAAAA9xBgAAAgAAAA8zAAAAIwAAAA9yBgAAAgAAAA80AAAAJAAAAA9zBgAAAgAAAA81AAAA
+        JQAAAA90BgAAAgAAAA82AAAAXgAAAA91BgAAAgAAAA83AAAAJgAAAA92BgAAAgAAAA84AAAAKgAAAA93
+        BgAAAgAAAA85AAAAKAAAAA94BgAAAgAAAA8wAAAAKQAAAA95BgAAAgAAAA8tAAAAXwAAAA96BgAAAgAA
+        AA89AAAAKwAAAA97BgAABAAAAA9xAAAAUQAAAMr////q////D3wGAAAEAAAAD3cAAABXAAAAw////+P/
+        //8PfQYAAAQAAAAPZQAAAEUAAADV////9f///w9+BgAABAAAAA9yAAAAUgAAAMv////r////D38GAAAE
+        AAAAD3QAAABUAAAAxf///+X///8PgAYAAAQAAAAPeQAAAFkAAADO////7v///w+BBgAABAAAAA91AAAA
+        VQAAAMf////n////D4IGAAAEAAAAD2kAAABJAAAA2/////v///8PgwYAAAQAAAAPbwAAAE8AAADd////
+        /f///w+EBgAABAAAAA9wAAAAUAAAANr////6////D4UGAAAEAAAAD1sAAAB7AAAAyP///+j///8PhgYA
+        AAQAAAAPXQAAAH0AAADf/////////w+HBgAABAAAAA9hAAAAQQAAAMb////m////D4gGAAAEAAAAD3MA
+        AABTAAAA2f////n///8PiQYAAAQAAAAPZAAAAEQAAADX////9////w+KBgAABAAAAA9mAAAARgAAAMH/
+        ///h////D4sGAAAEAAAAD2cAAABHAAAA0P////D///8PjAYAAAQAAAAPaAAAAEgAAADS////8v///w+N
+        BgAABAAAAA9qAAAASgAAAM/////v////D44GAAAEAAAAD2sAAABLAAAAzP///+z///8PjwYAAAQAAAAP
+        bAAAAEwAAADE////5P///w+QBgAABAAAAA87AAAAOgAAANb////2////D5EGAAAEAAAADycAAAAiAAAA
+        3P////z///8PkgYAAAIAAAAPXAAAAHwAAAAPkwYAAAQAAAAPegAAAFoAAADR////8f///w+UBgAABAAA
+        AA94AAAAWAAAAN7////+////D5UGAAAEAAAAD2MAAABDAAAA0/////P///8PlgYAAAQAAAAPdgAAAFYA
+        AADN////7f///w+XBgAABAAAAA9iAAAAQgAAAMn////p////D5gGAAAEAAAAD24AAABOAAAA1P////T/
+        //8PmQYAAAQAAAAPbQAAAE0AAADY////+P///w+aBgAABAAAAA8sAAAAPAAAAML////i////D5sGAAAE
+        AAAADy4AAAA+AAAAwP///+D///8PnAYAAAIAAAAPLwAAAD8AAAAPnQYAAAAAAAAPD54GAAAAAAAADw+f
+        BgAAAgAAAA9gAAAAfgAAAA+gBgAAAgAAAA8xAAAAIQAAAA+hBgAAAgAAAA8yAAAAQAAAAA+iBgAAAgAA
+        AA8zAAAAIwAAAA+jBgAAAgAAAA80AAAAJAAAAA+kBgAAAgAAAA81AAAAJQAAAA+lBgAAAgAAAA82AAAA
+        XgAAAA+mBgAAAgAAAA83AAAAJgAAAA+nBgAAAgAAAA84AAAAKgAAAA+oBgAAAgAAAA85AAAAKAAAAA+p
+        BgAAAgAAAA8wAAAAKQAAAA+qBgAAAgAAAA8tAAAAXwAAAA+rBgAAAgAAAA89AAAAKwAAAA+sBgAABAAA
+        AA9xAAAAUQAAAMr////q////D60GAAAEAAAAD3cAAABXAAAAw////+P///8PrgYAAAQAAAAPZQAAAEUA
+        AADV////9f///w+vBgAABAAAAA9yAAAAUgAAAMv////r////D7AGAAAEAAAAD3QAAABUAAAAxf///+X/
+        //8PsQYAAAQAAAAPeQAAAFkAAADO////7v///w+yBgAABAAAAA91AAAAVQAAAMf////n////D7MGAAAE
+        AAAAD2kAAABJAAAA2/////v///8PtAYAAAQAAAAPbwAAAE8AAADd/////f///w+1BgAABAAAAA9wAAAA
+        UAAAANr////6////D7YGAAAEAAAAD1sAAAB7AAAAyP///+j///8PtwYAAAQAAAAPXQAAAH0AAADf////
+        /////w+4BgAABAAAAA9hAAAAQQAAAMb////m////D7kGAAAEAAAAD3MAAABTAAAA2f////n///8PugYA
+        AAQAAAAPZAAAAEQAAADX////9////w+7BgAABAAAAA9mAAAARgAAAMH////h////D7wGAAAEAAAAD2cA
+        AABHAAAA0P////D///8PvQYAAAQAAAAPaAAAAEgAAADS////8v///w++BgAABAAAAA9qAAAASgAAAM//
+        ///v////D78GAAAEAAAAD2sAAABLAAAAzP///+z///8PwAYAAAQAAAAPbAAAAEwAAADE////5P///w/B
+        BgAABAAAAA87AAAAOgAAANb////2////D8IGAAAEAAAADycAAAAiAAAA3P////z///8PwwYAAAIAAAAP
+        XAAAAHwAAAAPxAYAAAQAAAAPegAAAFoAAADR////8f///w/FBgAABAAAAA94AAAAWAAAAN7////+////
+        D8YGAAAEAAAAD2MAAABDAAAA0/////P///8PxwYAAAQAAAAPdgAAAFYAAADN////7f///w/IBgAABAAA
+        AA9iAAAAQgAAAMn////p////D8kGAAAEAAAAD24AAABOAAAA1P////T///8PygYAAAQAAAAPbQAAAE0A
+        AADY////+P///w/LBgAABAAAAA8sAAAAPAAAAML////i////D8wGAAAEAAAADy4AAAA+AAAAwP///+D/
+        //8PzQYAAAIAAAAPLwAAAD8AAAAPzgYAAAIAAAAPPAAAAD4AAAAPzwYAAAAAAAAPD9AGAAACAAAADygA
+        AAApAAAAD9EGAAACAAAADzEAAAAhAAAAD9IGAAACAAAADzIAAAAiAAAAD9MGAAACAAAADzMAAAAvAAAA
+        D9QGAAACAAAADzQAAAAkAAAAD9UGAAACAAAADzUAAAA6AAAAD9YGAAACAAAADzYAAAAsAAAAD9cGAAAC
+        AAAADzcAAAAuAAAAD9gGAAACAAAADzgAAAA7AAAAD9kGAAACAAAADzkAAAA/AAAAD9oGAAACAAAADzAA
+        AAAlAAAAD9sGAAACAAAADy0AAABfAAAAD9wGAAACAAAADz0AAAArAAAAD90GAAACAAAAD8r////q////
+        D94GAAACAAAAD8P////j////D98GAAACAAAAD9X////1////D+AGAAACAAAAD8v////r////D+EGAAAC
+        AAAAD8X////l////D+IGAAACAAAAD87////u////D+MGAAACAAAAD8f////n////D+QGAAACAAAAD9v/
+        ///7////D+UGAAACAAAAD93////9////D+YGAAACAAAAD9r////6////D+cGAAACAAAAD8j////o////
+        D+gGAAACAAAAD9//////////D+kGAAACAAAAD8b////m////D+oGAAACAAAAD9n////5////D+sGAAAC
+        AAAAD9f////3////D+wGAAACAAAAD8H////h////D+0GAAACAAAAD9D////w////D+4GAAACAAAAD9L/
+        ///y////D+8GAAACAAAAD8/////v////D/AGAAACAAAAD8z////s////D/EGAAACAAAAD8T////k////
+        D/IGAAACAAAAD9b////2////D/MGAAACAAAAD9z////8////D/QGAAACAAAAD1wAAAB8AAAAD/UGAAAC
+        AAAAD9H////x////D/YGAAACAAAAD97////+////D/cGAAACAAAAD9P////z////D/gGAAACAAAAD83/
+        ///t////D/kGAAACAAAAD8n////p////D/oGAAACAAAAD9T////0////D/sGAAACAAAAD9j////4////
+        D/wGAAACAAAAD8L////i////D/0GAAACAAAAD8D////g////D/4GAAACAAAADy8AAAA/AAAAD/8GAAAC
+        AAAADzwAAAA+AAAADwAHAAAAAAAADw8BBwAAAgAAAA9gAAAAfgAAAA8CBwAAAgAAAA8xAAAAIQAAAA8D
+        BwAAAgAAAA8yAAAAQAAAAA8EBwAAAgAAAA8zAAAAIwAAAA8FBwAAAgAAAA80AAAAJAAAAA8GBwAAAgAA
+        AA81AAAAJQAAAA8HBwAAAgAAAA82AAAAXgAAAA8IBwAAAgAAAA83AAAAJgAAAA8JBwAAAgAAAA84AAAA
+        KgAAAA8KBwAAAgAAAA85AAAAKAAAAA8LBwAAAgAAAA8wAAAAKQAAAA8MBwAAAgAAAA8tAAAAXwAAAA8N
+        BwAAAgAAAA89AAAAKwAAAA8OBwAABAAAAA9xAAAAUQAAAOn////J////Dw8HAAAEAAAAD3cAAABXAAAA
+        9v///9b///8PEAcAAAQAAAAPZQAAAEUAAADz////0////w8RBwAABAAAAA9yAAAAUgAAAOr////K////
+        DxIHAAAEAAAAD3QAAABUAAAA5f///8X///8PEwcAAAQAAAAPeQAAAFkAAADt////zf///w8UBwAABAAA
+        AA91AAAAVQAAAOP////D////DxUHAAAEAAAAD2kAAABJAAAA+P///9j///8PFgcAAAQAAAAPbwAAAE8A
+        AAD5////2f///w8XBwAABAAAAA9wAAAAUAAAAOf////H////DxgHAAAEAAAAD1sAAAB7AAAA9f///9X/
+        //8PGQcAAAQAAAAPXQAAAH0AAAD6////2v///w8aBwAABAAAAA9hAAAAQQAAAPT////U////DxsHAAAE
+        AAAAD3MAAABTAAAA+////9v///8PHAcAAAQAAAAPZAAAAEQAAADi////wv///w8dBwAABAAAAA9mAAAA
+        RgAAAOD////A////Dx4HAAAEAAAAD2cAAABHAAAA7////8////8PHwcAAAQAAAAPaAAAAEgAAADw////
+        0P///w8gBwAABAAAAA9qAAAASgAAAO7////O////DyEHAAAEAAAAD2sAAABLAAAA6////8v///8PIgcA
+        AAQAAAAPbAAAAEwAAADk////xP///w8jBwAABAAAAA87AAAAOgAAAOb////G////DyQHAAAEAAAADycA
+        AAAiAAAA/f///93///8PJQcAAAIAAAAPXAAAAHwAAAAPJgcAAAQAAAAPegAAAFoAAAD/////3////w8n
+        BwAABAAAAA94AAAAWAAAAPf////X////DygHAAAEAAAAD2MAAABDAAAA8f///9H///8PKQcAAAQAAAAP
+        dgAAAFYAAADs////zP///w8qBwAABAAAAA9iAAAAQgAAAOj////I////DysHAAAEAAAAD24AAABOAAAA
+        8v///9L///8PLAcAAAQAAAAPbQAAAE0AAAD8////3P///w8tBwAABAAAAA8sAAAAPAAAAOH////B////
+        Dy4HAAAEAAAADy4AAAA+AAAA/v///97///8PLwcAAAIAAAAPLwAAAD8AAAAPMAcAAAIAAAAPPAAAAD4A
+        AAAPMQcAAAAAAAAPDzIHAAACAAAAD2AAAAB+AAAADzMHAAACAAAADzEAAAAhAAAADzQHAAACAAAADzIA
+        AABAAAAADzUHAAACAAAADzMAAAAjAAAADzYHAAACAAAADzQAAAAkAAAADzcHAAACAAAADzUAAAAlAAAA
+        DzgHAAACAAAADzYAAABeAAAADzkHAAACAAAADzcAAAAmAAAADzoHAAACAAAADzgAAAAqAAAADzsHAAAC
+        AAAADzkAAAAoAAAADzwHAAACAAAADzAAAAApAAAADz0HAAACAAAADy0AAABfAAAADz4HAAACAAAADz0A
+        AAArAAAADz8HAAAEAAAAD3EAAABRAAAA0f////H///8PQAcAAAQAAAAPdwAAAFcAAADX////9////w9B
+        BwAABAAAAA9lAAAARQAAAMX////l////D0IHAAAEAAAAD3IAAABSAAAA0v////L///8PQwcAAAQAAAAP
+        dAAAAFQAAADU////9P///w9EBwAABAAAAA95AAAAWQAAANn////5////D0UHAAAEAAAAD3UAAABVAAAA
+        1f////X///8PRgcAAAQAAAAPaQAAAEkAAADJ////6f///w9HBwAABAAAAA9vAAAATwAAAM/////v////
+        D0gHAAAEAAAAD3AAAABQAAAA0P////D///8PSQcAAAQAAAAPWwAAAHsAAADb////+////w9KBwAABAAA
+        AA9dAAAAfQAAAN3////9////D0sHAAAEAAAAD2EAAABBAAAAwf///+H///8PTAcAAAQAAAAPcwAAAFMA
+        AADT////8////w9NBwAABAAAAA9kAAAARAAAAMT////k////D04HAAAEAAAAD2YAAABGAAAAxv///+b/
+        //8PTwcAAAQAAAAPZwAAAEcAAADH////5////w9QBwAABAAAAA9oAAAASAAAAMj////o////D1EHAAAE
+        AAAAD2oAAABKAAAAyv///+r///8PUgcAAAQAAAAPawAAAEsAAADL////6////w9TBwAABAAAAA9sAAAA
+        TAAAAMz////s////D1QHAAACAAAADzsAAAA6AAAAD1UHAAACAAAADycAAAAiAAAAD1YHAAACAAAAD1wA
+        AAB8AAAAD1cHAAAEAAAAD3oAAABaAAAA2v////r///8PWAcAAAQAAAAPeAAAAFgAAADY////+P///w9Z
+        BwAABAAAAA9jAAAAQwAAAMP////j////D1oHAAAEAAAAD3YAAABWAAAA1v////b///8PWwcAAAQAAAAP
+        YgAAAEIAAADC////4v///w9cBwAABAAAAA9uAAAATgAAAM7////u////D10HAAAEAAAAD20AAABNAAAA
+        zf///+3///8PXgcAAAIAAAAPLAAAADwAAAAPXwcAAAIAAAAPLgAAAD4AAAAPYAcAAAIAAAAPLwAAAD8A
+        AAAPYQcAAAIAAAAPPAAAAD4AAAAPYgcAAAAAAAAPD2MHAAAEAAAAD2AAAAB+AAAArf///73///8PZAcA
+        AAQAAAAPMQAAACEAAAAxAAAAIQAAAA9lBwAABAAAAA8yAAAAQAAAADIAAAAiAAAAD2YHAAAEAAAADzMA
+        AAAjAAAAMwAAACcAAAAPZwcAAAQAAAAPNAAAACQAAAA0AAAAKgAAAA9oBwAABAAAAA81AAAAJQAAADUA
+        AAA6AAAAD2kHAAAEAAAADzYAAABeAAAANgAAACwAAAAPagcAAAQAAAAPNwAAACYAAAA3AAAALgAAAA9r
+        BwAABAAAAA84AAAAKgAAADgAAAA7AAAAD2wHAAAEAAAADzkAAAAoAAAAOQAAACgAAAAPbQcAAAQAAAAP
+        MAAAACkAAAAwAAAAKQAAAA9uBwAABAAAAA8tAAAAXwAAAC0AAABfAAAAD28HAAAEAAAADz0AAAArAAAA
+        PQAAACsAAAAPcAcAAAQAAAAPcQAAAFEAAADK////6v///w9xBwAABAAAAA93AAAAVwAAAMP////j////
+        D3IHAAAEAAAAD2UAAABFAAAA1f////X///8PcwcAAAQAAAAPcgAAAFIAAADL////6////w90BwAABAAA
+        AA90AAAAVAAAAMX////l////D3UHAAAEAAAAD3kAAABZAAAAzv///+7///8PdgcAAAQAAAAPdQAAAFUA
+        AADH////5////w93BwAABAAAAA9pAAAASQAAANv////7////D3gHAAAEAAAAD28AAABPAAAA3f////3/
+        //8PeQcAAAQAAAAPcAAAAFAAAADa////+v///w96BwAABAAAAA9bAAAAewAAAMj////o////D3sHAAAE
+        AAAAD10AAAB9AAAAp////7f///8PfAcAAAQAAAAPYQAAAEEAAADG////5v///w99BwAABAAAAA9zAAAA
+        UwAAAKb///+2////D34HAAAEAAAAD2QAAABEAAAA1/////f///8PfwcAAAQAAAAPZgAAAEYAAADB////
+        4f///w+ABwAABAAAAA9nAAAARwAAAND////w////D4EHAAAEAAAAD2gAAABIAAAA0v////L///8PggcA
+        AAQAAAAPagAAAEoAAADP////7////w+DBwAABAAAAA9rAAAASwAAAMz////s////D4QHAAAEAAAAD2wA
+        AABMAAAAxP///+T///8PhQcAAAQAAAAPOwAAADoAAADW////9v///w+GBwAABAAAAA8nAAAAIgAAAKT/
+        //+0////D4cHAAAEAAAAD1wAAAB8AAAAXAAAAHwAAAAPiAcAAAQAAAAPegAAAFoAAADR////8f///w+J
+        BwAABAAAAA94AAAAWAAAAN7////+////D4oHAAAEAAAAD2MAAABDAAAA0/////P///8PiwcAAAQAAAAP
+        dgAAAFYAAADN////7f///w+MBwAABAAAAA9iAAAAQgAAAMn////p////D40HAAAEAAAAD24AAABOAAAA
+        1P////T///8PjgcAAAQAAAAPbQAAAE0AAADY////+P///w+PBwAABAAAAA8sAAAAPAAAAML////i////
+        D5AHAAAEAAAADy4AAAA+AAAAwP///+D///8PkQcAAAQAAAAPLwAAAD8AAAAvAAAAPwAAAA+SBwAAAgAA
+        AA88AAAAPgAAAA+TBwAAAAAAAA8PlAcAAAIAAAAPrf///73///8PlQcAAAIAAAAPMQAAACEAAAAPlgcA
+        AAIAAAAPMgAAACIAAAAPlwcAAAIAAAAPMwAAACcAAAAPmAcAAAIAAAAPNAAAADsAAAAPmQcAAAIAAAAP
+        NQAAACUAAAAPmgcAAAIAAAAPNgAAADoAAAAPmwcAAAIAAAAPNwAAAD8AAAAPnAcAAAIAAAAPOAAAACoA
+        AAAPnQcAAAIAAAAPOQAAACgAAAAPngcAAAIAAAAPMAAAACkAAAAPnwcAAAIAAAAPLQAAAF8AAAAPoAcA
+        AAIAAAAPPQAAACsAAAAPoQcAAAIAAAAPyv///+r///8PogcAAAIAAAAPw////+P///8PowcAAAIAAAAP
+        1f////X///8PpAcAAAIAAAAPy////+v///8PpQcAAAIAAAAPxf///+X///8PpgcAAAIAAAAPzv///+7/
+        //8PpwcAAAIAAAAPx////+f///8PqAcAAAIAAAAP2/////v///8PqQcAAAIAAAAP3f////3///8PqgcA
+        AAIAAAAP2v////r///8PqwcAAAIAAAAPyP///+j///8PrAcAAAIAAAAPp////7f///8PrQcAAAIAAAAP
+        xv///+b///8PrgcAAAIAAAAPpv///7b///8PrwcAAAIAAAAP1/////f///8PsAcAAAIAAAAPwf///+H/
+        //8PsQcAAAIAAAAP0P////D///8PsgcAAAIAAAAP0v////L///8PswcAAAIAAAAPz////+////8PtAcA
+        AAIAAAAPzP///+z///8PtQcAAAIAAAAPxP///+T///8PtgcAAAIAAAAP1v////b///8PtwcAAAIAAAAP
+        pP///7T///8PuAcAAAIAAAAPXAAAAC8AAAAPuQcAAAIAAAAP0f////H///8PugcAAAIAAAAP3v////7/
+        //8PuwcAAAIAAAAP0/////P///8PvAcAAAIAAAAPzf///+3///8PvQcAAAIAAAAPyf///+n///8PvgcA
+        AAIAAAAP1P////T///8PvwcAAAIAAAAP2P////j///8PwAcAAAIAAAAPwv///+L///8PwQcAAAIAAAAP
+        wP///+D///8PwgcAAAIAAAAPLgAAACwAAAAPwwcAAAIAAAAPPAAAAD4AAAAPxAcAAAAAAAAPD8UHAAAC
+        AAAAD6P///+z////D8YHAAACAAAADzEAAAAhAAAAD8cHAAACAAAADzIAAAAiAAAAD8gHAAACAAAADzMA
+        AAAnAAAAD8kHAAACAAAADzQAAAA7AAAAD8oHAAACAAAADzUAAAAlAAAAD8sHAAACAAAADzYAAAA6AAAA
+        D8wHAAACAAAADzcAAAA/AAAAD80HAAACAAAADzgAAAAqAAAAD84HAAACAAAADzkAAAAoAAAAD88HAAAC
+        AAAADzAAAAApAAAAD9AHAAACAAAADy0AAABfAAAAD9EHAAACAAAADz0AAAArAAAAD9IHAAACAAAAD8r/
+        ///q////D9MHAAACAAAAD8P////j////D9QHAAACAAAAD9X////1////D9UHAAACAAAAD8v////r////
+        D9YHAAACAAAAD8X////l////D9cHAAACAAAAD87////u////D9gHAAACAAAAD8f////n////D9kHAAAC
+        AAAAD9v////7////D9oHAAACAAAAD93////9////D9sHAAACAAAAD9r////6////D9wHAAACAAAAD8j/
+        ///o////D90HAAACAAAAD9//////////D94HAAACAAAAD8b////m////D98HAAACAAAAD9n////5////
+        D+AHAAACAAAAD9f////3////D+EHAAACAAAAD8H////h////D+IHAAACAAAAD9D////w////D+MHAAAC
+        AAAAD9L////y////D+QHAAACAAAAD8/////v////D+UHAAACAAAAD8z////s////D+YHAAACAAAAD8T/
+        ///k////D+cHAAACAAAAD9b////2////D+gHAAACAAAAD9z////8////D+kHAAACAAAAD1wAAAAvAAAA
+        D+oHAAACAAAAD9H////x////D+sHAAACAAAAD97////+////D+wHAAACAAAAD9P////z////D+0HAAAC
+        AAAAD83////t////D+4HAAACAAAAD8n////p////D+8HAAACAAAAD9T////0////D/AHAAACAAAAD9j/
+        ///4////D/EHAAACAAAAD8L////i////D/IHAAACAAAAD8D////g////D/MHAAACAAAADy4AAAAsAAAA
+        D/QHAAACAAAADzwAAAA+AAAAD/UHAAAAAAAADw/2BwAAAgAAAA+6////qv///w/3BwAAAgAAAA8xAAAA
+        IQAAAA/4BwAAAgAAAA8yAAAAIgAAAA/5BwAAAgAAAA8zAAAAt////w/6BwAAAgAAAA80AAAAJAAAAA/7
+        BwAAAgAAAA81AAAAJQAAAA/8BwAAAgAAAA82AAAAJgAAAA/9BwAAAgAAAA83AAAALwAAAA/+BwAAAgAA
+        AA84AAAAKAAAAA//BwAAAgAAAA85AAAAKQAAAA8ACAAAAgAAAA8wAAAAPQAAAA8BCAAAAgAAAA8nAAAA
+        PwAAAA8CCAAAAgAAAA+h////v////w8DCAAAAgAAAA9xAAAAUQAAAA8ECAAAAgAAAA93AAAAVwAAAA8F
+        CAAAAgAAAA9lAAAARQAAAA8GCAAAAgAAAA9yAAAAUgAAAA8HCAAAAgAAAA90AAAAVAAAAA8ICAAAAgAA
+        AA95AAAAWQAAAA8JCAAAAgAAAA91AAAAVQAAAA8KCAAAAgAAAA9pAAAASQAAAA8LCAAAAgAAAA9vAAAA
+        TwAAAA8MCAAAAgAAAA9wAAAAUAAAAA8NCAAAAgAAAA9gAAAAXgAAAA8OCAAAAgAAAA8rAAAAKgAAAA8P
+        CAAAAgAAAA9hAAAAQQAAAA8QCAAAAgAAAA9zAAAAUwAAAA8RCAAAAgAAAA9kAAAARAAAAA8SCAAAAgAA
+        AA9mAAAARgAAAA8TCAAAAgAAAA9nAAAARwAAAA8UCAAAAgAAAA9oAAAASAAAAA8VCAAAAgAAAA9qAAAA
+        SgAAAA8WCAAAAgAAAA9rAAAASwAAAA8XCAAAAgAAAA9sAAAATAAAAA8YCAAAAgAAAA/x////0f///w8Z
+        CAAAAgAAAA+0////qP///w8aCAAAAgAAAA/n////x////w8bCAAAAgAAAA96AAAAWgAAAA8cCAAAAgAA
+        AA94AAAAWAAAAA8dCAAAAgAAAA9jAAAAQwAAAA8eCAAAAgAAAA92AAAAVgAAAA8fCAAAAgAAAA9iAAAA
+        QgAAAA8gCAAAAgAAAA9uAAAATgAAAA8hCAAAAgAAAA9tAAAATQAAAA8iCAAAAgAAAA8sAAAAOwAAAA8j
+        CAAAAgAAAA8uAAAAOgAAAA8kCAAAAgAAAA8tAAAAXwAAAA8lCAAAAgAAAA88AAAAPgAAAA8mCAAAAAAA
+        AA8PJwgAAAIAAAAPXAAAAHwAAAAPKAgAAAIAAAAPMQAAACEAAAAPKQgAAAIAAAAPMgAAACIAAAAPKggA
+        AAIAAAAPMwAAAKP///8PKwgAAAIAAAAPNAAAACQAAAAPLAgAAAIAAAAPNQAAACUAAAAPLQgAAAIAAAAP
+        NgAAACYAAAAPLggAAAIAAAAPNwAAAC8AAAAPLwgAAAIAAAAPOAAAACgAAAAPMAgAAAIAAAAPOQAAACkA
+        AAAPMQgAAAIAAAAPMAAAAD0AAAAPMggAAAIAAAAPJwAAAD8AAAAPMwgAAAIAAAAP7P///14AAAAPNAgA
+        AAIAAAAPcQAAAFEAAAAPNQgAAAIAAAAPdwAAAFcAAAAPNggAAAIAAAAPZQAAAEUAAAAPNwgAAAIAAAAP
+        cgAAAFIAAAAPOAgAAAIAAAAPdAAAAFQAAAAPOQgAAAIAAAAPeQAAAFkAAAAPOggAAAIAAAAPdQAAAFUA
+        AAAPOwgAAAIAAAAPaQAAAEkAAAAPPAgAAAIAAAAPbwAAAE8AAAAPPQgAAAIAAAAPcAAAAFAAAAAPPggA
+        AAIAAAAP6P///+n///8PPwgAAAIAAAAPKwAAACoAAAAPQAgAAAIAAAAPYQAAAEEAAAAPQQgAAAIAAAAP
+        cwAAAFMAAAAPQggAAAIAAAAPZAAAAEQAAAAPQwgAAAIAAAAPZgAAAEYAAAAPRAgAAAIAAAAPZwAAAEcA
+        AAAPRQgAAAIAAAAPaAAAAEgAAAAPRggAAAIAAAAPagAAAEoAAAAPRwgAAAIAAAAPawAAAEsAAAAPSAgA
+        AAIAAAAPbAAAAEwAAAAPSQgAAAIAAAAP8v///+f///8PSggAAAIAAAAP4P///7D///8PSwgAAAIAAAAP
+        +f///6f///8PTAgAAAIAAAAPegAAAFoAAAAPTQgAAAIAAAAPeAAAAFgAAAAPTggAAAIAAAAPYwAAAEMA
+        AAAPTwgAAAIAAAAPdgAAAFYAAAAPUAgAAAIAAAAPYgAAAEIAAAAPUQgAAAIAAAAPbgAAAE4AAAAPUggA
+        AAIAAAAPbQAAAE0AAAAPUwgAAAIAAAAPLAAAADsAAAAPVAgAAAIAAAAPLgAAADoAAAAPVQgAAAIAAAAP
+        LQAAAF8AAAAPVggAAAIAAAAPPAAAAD4AAAAPVwgAAAAAAAAPD1gIAAABAAAAD7D///8PWQgAAAIAAAAP
+        MQAAACEAAAAPWggAAAIAAAAPMgAAACIAAAAPWwgAAAIAAAAPMwAAACMAAAAPXAgAAAIAAAAPNAAAACQA
+        AAAPXQgAAAIAAAAPNQAAACUAAAAPXggAAAIAAAAPNgAAACYAAAAPXwgAAAIAAAAPNwAAAC8AAAAPYAgA
+        AAIAAAAPOAAAACgAAAAPYQgAAAIAAAAPOQAAACkAAAAPYggAAAIAAAAPMAAAAD0AAAAPYwgAAAIAAAAP
+        9v///9b///8PZAgAAAIAAAAPLQAAAF8AAAAPZQgAAAIAAAAPcQAAAFEAAAAPZggAAAIAAAAPdwAAAFcA
+        AAAPZwgAAAIAAAAPZQAAAEUAAAAPaAgAAAIAAAAPcgAAAFIAAAAPaQgAAAIAAAAPdAAAAFQAAAAPaggA
+        AAIAAAAPeQAAAFkAAAAPawgAAAIAAAAPdQAAAFUAAAAPbAgAAAIAAAAPaQAAAEkAAAAPbQgAAAIAAAAP
+        bwAAAE8AAAAPbggAAAIAAAAPcAAAAFAAAAAPbwgAAAIAAAAP8P///9D///8PcAgAAAIAAAAPJwAAAD8A
+        AAAPcQgAAAIAAAAPYQAAAEEAAAAPcggAAAIAAAAPcwAAAFMAAAAPcwgAAAIAAAAPZAAAAEQAAAAPdAgA
+        AAIAAAAPZgAAAEYAAAAPdQgAAAIAAAAPZwAAAEcAAAAPdggAAAIAAAAPaAAAAEgAAAAPdwgAAAIAAAAP
+        agAAAEoAAAAPeAgAAAIAAAAPawAAAEsAAAAPeQgAAAIAAAAPbAAAAEwAAAAPeggAAAIAAAAP5v///8b/
+        //8PewgAAAIAAAAPtP///8T///8PfAgAAAIAAAAPKwAAACoAAAAPfQgAAAIAAAAPegAAAFoAAAAPfggA
+        AAIAAAAPeAAAAFgAAAAPfwgAAAIAAAAPYwAAAEMAAAAPgAgAAAIAAAAPdgAAAFYAAAAPgQgAAAIAAAAP
+        YgAAAEIAAAAPgggAAAIAAAAPbgAAAE4AAAAPgwgAAAIAAAAPbQAAAE0AAAAPhAgAAAIAAAAPLAAAADsA
+        AAAPhQgAAAIAAAAPLgAAADoAAAAPhggAAAIAAAAP/v///97///8PhwgAAAIAAAAPPAAAAD4AAAAPiAgA
+        AAAAAAAPD4kIAAACAAAADzAAAACn////D4oIAAADAAAADzEAAAAnAAAAfgAAAA+LCAAAAwAAAA8yAAAA
+        IgAAALf///8PjAgAAAMAAAAPMwAAACsAAABeAAAAD40IAAADAAAADzQAAAAhAAAAov///w+OCAAABAAA
+        AA81AAAAJQAAADAAAACw////D48IAAADAAAADzYAAAAvAAAAsv///w+QCAAAAwAAAA83AAAAPQAAAGAA
+        AAAPkQgAAAMAAAAPOAAAACgAAAD/////D5IIAAADAAAADzkAAAApAAAAtP///w+TCAAAAwAAAA/2////
+        1v///73///8PlAgAAAMAAAAP/P///9z///+o////D5UIAAADAAAAD/P////T////uP///w+WCAAAAwAA
+        AA9xAAAAUQAAAFwAAAAPlwgAAAMAAAAPdwAAAFcAAAB8AAAAD5gIAAACAAAAD2UAAABFAAAAD5kIAAAC
+        AAAAD3IAAABSAAAAD5oIAAACAAAAD3QAAABUAAAAD5sIAAACAAAAD3oAAABaAAAAD5wIAAACAAAAD3UA
+        AABVAAAAD50IAAADAAAAD2kAAABJAAAAzf///w+eCAAAAwAAAA9vAAAATwAAAPj///8PnwgAAAIAAAAP
+        cAAAAFAAAAAPoAgAAAMAAAAP9f///9X////3////D6EIAAADAAAAD/r////a////1////w+iCAAAAgAA
+        AA9hAAAAQQAAAA+jCAAAAwAAAA9zAAAAUwAAAPD///8PpAgAAAMAAAAPZAAAAEQAAADQ////D6UIAAAD
+        AAAAD2YAAABGAAAAWwAAAA+mCAAAAwAAAA9nAAAARwAAAF0AAAAPpwgAAAIAAAAPaAAAAEgAAAAPqAgA
+        AAMAAAAPagAAAEoAAADt////D6kIAAADAAAAD2sAAABLAAAAs////w+qCAAAAwAAAA9sAAAATAAAAKP/
+        //8PqwgAAAMAAAAP6f///8n///8kAAAAD6wIAAADAAAAD+H////B////3////w+tCAAAAwAAAA/7////
+        2////6T///8PrggAAAMAAAAPeQAAAFkAAAA+AAAAD68IAAADAAAAD3gAAABYAAAAIwAAAA+wCAAAAwAA
+        AA9jAAAAQwAAACYAAAAPsQgAAAMAAAAPdgAAAFYAAABAAAAAD7IIAAADAAAAD2IAAABCAAAAewAAAA+z
+        CAAAAwAAAA9uAAAATgAAAH0AAAAPtAgAAAIAAAAPbQAAAE0AAAAPtQgAAAMAAAAPLAAAAD8AAAA7AAAA
+        D7YIAAADAAAADy4AAAA6AAAAPgAAAA+3CAAAAwAAAA8tAAAAXwAAACoAAAAPuAgAAAMAAAAP7f///83/
+        //88AAAAD7kIAAAAAAAADw+6CAAAAgAAAA9gAAAAfgAAAA+7CAAAAgAAAA8xAAAAIQAAAA+8CAAAAgAA
+        AA8yAAAAQAAAAA+9CAAAAgAAAA8zAAAAIwAAAA++CAAAAgAAAA80AAAAJAAAAA+/CAAAAgAAAA81AAAA
+        JQAAAA/ACAAAAgAAAA82AAAAXgAAAA/BCAAAAwAAAA83AAAAJgAAAKf///8PwggAAAIAAAAPOAAAACoA
+        AAAPwwgAAAIAAAAPOQAAACgAAAAPxAgAAAIAAAAPMAAAACkAAAAPxQgAAAIAAAAPLQAAAF8AAAAPxggA
+        AAIAAAAPPQAAACsAAAAPxwgAAAIAAAAPcQAAAFEAAAAPyAgAAAIAAAAPdwAAAFcAAAAPyQgAAAQAAAAP
+        ZQAAAEUAAADq////yv///w/KCAAAAgAAAA9yAAAAUgAAAA/LCAAAAgAAAA90AAAAVAAAAA/MCAAAAgAA
+        AA95AAAAWQAAAA/NCAAAAgAAAA91AAAAVQAAAA/OCAAAAgAAAA9pAAAASQAAAA/PCAAABAAAAA9vAAAA
+        TwAAAPP////T////D9AIAAACAAAAD3AAAABQAAAAD9EIAAACAAAAD1sAAAB7AAAAD9IIAAACAAAAD10A
+        AAB9AAAAD9MIAAAEAAAAD2EAAABBAAAAsf///6H///8P1AgAAAQAAAAPcwAAAFMAAAC2////pv///w/V
+        CAAAAgAAAA9kAAAARAAAAA/WCAAAAgAAAA9mAAAARgAAAA/XCAAAAgAAAA9nAAAARwAAAA/YCAAAAgAA
+        AA9oAAAASAAAAA/ZCAAAAgAAAA9qAAAASgAAAA/aCAAAAgAAAA9rAAAASwAAAA/bCAAABAAAAA9sAAAA
+        TAAAALP///+j////D9wIAAACAAAADzsAAAA6AAAAD90IAAACAAAADycAAAAiAAAAD94IAAACAAAAD1wA
+        AAB8AAAAD98IAAAEAAAAD3oAAABaAAAAv////6////8P4AgAAAQAAAAPeAAAAFgAAAC8////rP///w/h
+        CAAABAAAAA9jAAAAQwAAAOb////G////D+IIAAACAAAAD3YAAABWAAAAD+MIAAACAAAAD2IAAABCAAAA
+        D+QIAAAEAAAAD24AAABOAAAA8f///9H///8P5QgAAAIAAAAPbQAAAE0AAAAP5ggAAAIAAAAPLAAAADwA
+        AAAP5wgAAAIAAAAPLgAAAD4AAAAP6AgAAAIAAAAPLwAAAD8AAAAP6QgAAAMAAAAPPAAAAD4AAAB8AAAA
+        D+oIAAAAAAAADw/rCAAAAgAAAA+4////qP///w/sCAAAAgAAAA8xAAAAIQAAAA/tCAAAAgAAAA8yAAAA
+        IgAAAA/uCAAAAgAAAA8zAAAAIwAAAA/vCAAAAgAAAA80AAAAJAAAAA/wCAAAAgAAAA81AAAAJQAAAA/x
+        CAAAAgAAAA82AAAAJgAAAA/yCAAAAgAAAA83AAAALwAAAA/zCAAAAgAAAA84AAAAKAAAAA/0CAAAAgAA
+        AA85AAAAKQAAAA/1CAAAAgAAAA8wAAAAPQAAAA/2CAAAAgAAAA8nAAAAPwAAAA/3CAAAAgAAAA8rAAAA
+        KgAAAA/4CAAAAgAAAA9xAAAAUQAAAA/5CAAAAgAAAA93AAAAVwAAAA/6CAAAAgAAAA9lAAAARQAAAA/7
+        CAAAAgAAAA9yAAAAUgAAAA/8CAAAAgAAAA90AAAAVAAAAA/9CAAAAgAAAA96AAAAWgAAAA/+CAAAAgAA
+        AA91AAAAVQAAAA//CAAAAgAAAA9pAAAASQAAAA8ACQAAAgAAAA9vAAAATwAAAA8BCQAAAgAAAA9wAAAA
+        UAAAAA8CCQAAAgAAAA+5////qf///w8DCQAAAgAAAA/w////0P///w8ECQAAAgAAAA9hAAAAQQAAAA8F
+        CQAAAgAAAA9zAAAAUwAAAA8GCQAAAgAAAA9kAAAARAAAAA8HCQAAAgAAAA9mAAAARgAAAA8ICQAAAgAA
+        AA9nAAAARwAAAA8JCQAAAgAAAA9oAAAASAAAAA8KCQAAAgAAAA9qAAAASgAAAA8LCQAAAgAAAA9rAAAA
+        SwAAAA8MCQAAAgAAAA9sAAAATAAAAA8NCQAAAgAAAA/o////yP///w8OCQAAAgAAAA/m////xv///w8P
+        CQAAAgAAAA++////rv///w8QCQAAAgAAAA95AAAAWQAAAA8RCQAAAgAAAA94AAAAWAAAAA8SCQAAAgAA
+        AA9jAAAAQwAAAA8TCQAAAgAAAA92AAAAVgAAAA8UCQAAAgAAAA9iAAAAQgAAAA8VCQAAAgAAAA9uAAAA
+        TgAAAA8WCQAAAgAAAA9tAAAATQAAAA8XCQAAAgAAAA8sAAAAOwAAAA8YCQAAAgAAAA8uAAAAOgAAAA8Z
+        CQAAAgAAAA8tAAAAXwAAAA8aCQAAAgAAAA88AAAAPgAAAA8bCQAAAAAAAA8PHAkAAAIAAAAPYAAAAH4A
+        AAAPHQkAAAIAAAAPMQAAACEAAAAPHgkAAAIAAAAPMgAAACIAAAAPHwkAAAIAAAAPMwAAACMAAAAPIAkA
+        AAIAAAAPNAAAACQAAAAPIQkAAAIAAAAPNQAAACUAAAAPIgkAAAIAAAAPNgAAACYAAAAPIwkAAAIAAAAP
+        NwAAAC8AAAAPJAkAAAIAAAAPOAAAACgAAAAPJQkAAAIAAAAPOQAAACkAAAAPJgkAAAIAAAAPMAAAAD0A
+        AAAPJwkAAAIAAAAPJwAAAD8AAAAPKAkAAAIAAAAPKwAAACoAAAAPKQkAAAIAAAAPqf///7n///8PKgkA
+        AAIAAAAPqv///7r///8PKwkAAAIAAAAPxf///+X///8PLAkAAAIAAAAP0v////L///8PLQkAAAIAAAAP
+        1P////T///8PLgkAAAIAAAAP2v////r///8PLwkAAAIAAAAP1f////X///8PMAkAAAIAAAAPyf///+n/
+        //8PMQkAAAIAAAAPz////+////8PMgkAAAIAAAAP0P////D///8PMwkAAAIAAAAP2/////v///8PNAkA
+        AAIAAAAPWwAAAF0AAAAPNQkAAAIAAAAPwf///+H///8PNgkAAAIAAAAP0/////P///8PNwkAAAIAAAAP
+        xP///+T///8POAkAAAIAAAAPxv///+b///8POQkAAAIAAAAPx////+f///8POgkAAAIAAAAPyP///+j/
+        //8POwkAAAIAAAAPqP///7j///8PPAkAAAIAAAAPy////+v///8PPQkAAAIAAAAPzP///+z///8PPgkA
+        AAIAAAAP3v////7///8PPwkAAAIAAAAPq////7v///8PQAkAAAIAAAAPLQAAAF8AAAAPQQkAAAIAAAAP
+        of///7H///8PQgkAAAIAAAAPr////7////8PQwkAAAIAAAAPw////+P///8PRAkAAAIAAAAP1/////f/
+        //8PRQkAAAIAAAAPwv///+L///8PRgkAAAIAAAAPzv///+7///8PRwkAAAIAAAAPzf///+3///8PSAkA
+        AAIAAAAPLAAAADsAAAAPSQkAAAIAAAAPLgAAADoAAAAPSgkAAAIAAAAP1v////b///8PSwkAAAIAAAAP
+        PAAAAD4AAAAPTAkAAAAAAAAPD00JAAACAAAAD2AAAAB+AAAAD04JAAACAAAADzEAAAAhAAAAD08JAAAE
+        AAAADzIAAABAAAAAMgAAACIAAAAPUAkAAAIAAAAPMwAAACMAAAAPUQkAAAIAAAAPNAAAACQAAAAPUgkA
+        AAIAAAAPNQAAACUAAAAPUwkAAAQAAAAPNgAAAF4AAAA2AAAAJgAAAA9UCQAABAAAAA83AAAAJgAAADcA
+        AAAvAAAAD1UJAAAEAAAADzgAAAAqAAAAOAAAACgAAAAPVgkAAAQAAAAPOQAAACgAAAA5AAAAKQAAAA9X
+        CQAABAAAAA8wAAAAKQAAADAAAAA9AAAAD1gJAAAEAAAADy0AAABfAAAAJwAAAD8AAAAPWQkAAAQAAAAP
+        PQAAACsAAAArAAAAKgAAAA9aCQAABAAAAA9xAAAAUQAAAKn///+5////D1sJAAAEAAAAD3cAAABXAAAA
+        qv///7r///8PXAkAAAQAAAAPZQAAAEUAAADF////5f///w9dCQAABAAAAA9yAAAAUgAAANL////y////
+        D14JAAAEAAAAD3QAAABUAAAA1P////T///8PXwkAAAQAAAAPeQAAAFkAAADa////+v///w9gCQAABAAA
+        AA91AAAAVQAAANX////1////D2EJAAAEAAAAD2kAAABJAAAAyf///+n///8PYgkAAAQAAAAPbwAAAE8A
+        AADP////7////w9jCQAABAAAAA9wAAAAUAAAAND////w////D2QJAAAEAAAAD1sAAAB7AAAA2/////v/
+        //8PZQkAAAQAAAAPXQAAAH0AAABbAAAAXQAAAA9mCQAABAAAAA9hAAAAQQAAAMH////h////D2cJAAAE
+        AAAAD3MAAABTAAAA0/////P///8PaAkAAAQAAAAPZAAAAEQAAADE////5P///w9pCQAABAAAAA9mAAAA
+        RgAAAMb////m////D2oJAAAEAAAAD2cAAABHAAAAx////+f///8PawkAAAQAAAAPaAAAAEgAAADI////
+        6P///w9sCQAABAAAAA9qAAAASgAAAKj///+4////D20JAAAEAAAAD2sAAABLAAAAy////+v///8PbgkA
+        AAQAAAAPbAAAAEwAAADM////7P///w9vCQAABAAAAA87AAAAOgAAAN7////+////D3AJAAAEAAAADycA
+        AAAiAAAAq////7v///8PcQkAAAQAAAAPXAAAAHwAAAAtAAAAXwAAAA9yCQAABAAAAA96AAAAWgAAAKH/
+        //+x////D3MJAAAEAAAAD3gAAABYAAAAr////7////8PdAkAAAQAAAAPYwAAAEMAAADD////4////w91
+        CQAABAAAAA92AAAAVgAAANf////3////D3YJAAAEAAAAD2IAAABCAAAAwv///+L///8PdwkAAAQAAAAP
+        bgAAAE4AAADO////7v///w94CQAABAAAAA9tAAAATQAAAM3////t////D3kJAAAEAAAADywAAAA8AAAA
+        LAAAADsAAAAPegkAAAQAAAAPLgAAAD4AAAAuAAAAOgAAAA97CQAABAAAAA8vAAAAPwAAANb////2////
+        D3wJAAACAAAADzwAAAA+AAAAD30JAAAAAAAADw9+CQAAAgAAAA+4////qP///w9/CQAAAgAAAA8xAAAA
+        IQAAAA+ACQAAAgAAAA8yAAAAIgAAAA+BCQAAAgAAAA8zAAAAIwAAAA+CCQAAAgAAAA80AAAAJAAAAA+D
+        CQAAAgAAAA81AAAAJQAAAA+ECQAAAgAAAA82AAAAJgAAAA+FCQAAAgAAAA83AAAALwAAAA+GCQAAAgAA
+        AA84AAAAKAAAAA+HCQAAAgAAAA85AAAAKQAAAA+ICQAAAgAAAA8wAAAAPQAAAA+JCQAAAgAAAA8nAAAA
+        PwAAAA+KCQAAAgAAAA8rAAAAKgAAAA+LCQAAAgAAAA9xAAAAUQAAAA+MCQAAAgAAAA93AAAAVwAAAA+N
+        CQAAAgAAAA9lAAAARQAAAA+OCQAAAgAAAA9yAAAAUgAAAA+PCQAAAgAAAA90AAAAVAAAAA+QCQAAAgAA
+        AA96AAAAWgAAAA+RCQAAAgAAAA91AAAAVQAAAA+SCQAAAgAAAA9pAAAASQAAAA+TCQAAAgAAAA9vAAAA
+        TwAAAA+UCQAAAgAAAA9wAAAAUAAAAA+VCQAAAgAAAA+5////qf///w+WCQAAAgAAAA/w////0P///w+X
+        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
+        AAAP8wkAAAIAAAAPdQAAAFUAAAAP9AkAAAIAAAAPaQAAAEkAAAAP9QkAAAIAAAAPbwAAAE8AAAAP9gkA
+        AAIAAAAPcAAAAFAAAAAP9wkAAAIAAAAPQAAAAGAAAAAP+AkAAAIAAAAPWwAAAHsAAAAP+QkAAAIAAAAP
+        YQAAAEEAAAAP+gkAAAIAAAAPcwAAAFMAAAAP+wkAAAIAAAAPZAAAAEQAAAAP/AkAAAIAAAAPZgAAAEYA
+        AAAP/QkAAAIAAAAPZwAAAEcAAAAP/gkAAAIAAAAPaAAAAEgAAAAP/wkAAAIAAAAPagAAAEoAAAAPAAoA
+        AAIAAAAPawAAAEsAAAAPAQoAAAIAAAAPbAAAAEwAAAAPAgoAAAIAAAAPOwAAACsAAAAPAwoAAAIAAAAP
+        OgAAACoAAAAPBAoAAAIAAAAPXQAAAH0AAAAPBQoAAAIAAAAPegAAAFoAAAAPBgoAAAIAAAAPeAAAAFgA
+        AAAPBwoAAAIAAAAPYwAAAEMAAAAPCAoAAAIAAAAPdgAAAFYAAAAPCQoAAAIAAAAPYgAAAEIAAAAPCgoA
+        AAIAAAAPbgAAAE4AAAAPCwoAAAIAAAAPbQAAAE0AAAAPDAoAAAIAAAAPLAAAADwAAAAPDQoAAAIAAAAP
+        LgAAAD4AAAAPDgoAAAIAAAAPLwAAAD8AAAAPDwoAAAIAAAAPXAAAAF8AAAAPEAoAAAAAAAAPDxEKAAAC
+        AAAADzEAAAAhAAAADxIKAAACAAAADzIAAAAiAAAADxMKAAACAAAADzMAAAAjAAAADxQKAAACAAAADzQA
+        AAAkAAAADxUKAAACAAAADzUAAAAlAAAADxYKAAACAAAADzYAAAAmAAAADxcKAAACAAAADzcAAAAnAAAA
+        DxgKAAACAAAADzgAAAAoAAAADxkKAAACAAAADzkAAAApAAAADxoKAAABAAAADzAAAAAPGwoAAAIAAAAP
+        LQAAAD0AAAAPHAoAAAIAAAAPXgAAAGAAAAAPHQoAAAIAAAAPXAAAAHwAAAAPHgoAAAIAAAAPcQAAAFEA
+        AAAPHwoAAAIAAAAPdwAAAFcAAAAPIAoAAAIAAAAPZQAAAEUAAAAPIQoAAAIAAAAPcgAAAFIAAAAPIgoA
+        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
+        AA9xAAAAUQAAAOT////E////D4EKAAAEAAAAD3cAAABXAAAA7P///8z///8PggoAAAQAAAAPZQAAAEUA
+        AADp////yf///w+DCgAABAAAAA9yAAAAUgAAAPj////Y////D4QKAAAEAAAAD3QAAABUAAAAu////6v/
+        //8PhQoAAAQAAAAPeQAAAFkAAAD9////3f///w+GCgAABAAAAA91AAAAVQAAAPn////Z////D4cKAAAE
+        AAAAD2kAAABJAAAA7f///83///8PiAoAAAQAAAAPbwAAAE8AAADz////0////w+JCgAABAAAAA9wAAAA
+        UAAAAPb////W////D4oKAAACAAAAD1sAAAB7AAAAD4sKAAACAAAAD10AAAB9AAAAD4wKAAAEAAAAD2EA
+        AABBAAAA4f///8H///8PjQoAAAQAAAAPcwAAAFMAAAC5////qf///w+OCgAABAAAAA9kAAAARAAAAO//
+        ///P////D48KAAAEAAAAD2YAAABGAAAA6////8v///8PkAoAAAQAAAAPZwAAAEcAAADg////wP///w+R
+        CgAABAAAAA9oAAAASAAAAPr////a////D5IKAAAEAAAAD2oAAABKAAAA/P///9z///8PkwoAAAQAAAAP
+        awAAAEsAAAD0////1P///w+UCgAABAAAAA9sAAAATAAAALX///+l////D5UKAAACAAAADzsAAAA6AAAA
+        D5YKAAACAAAADycAAAAiAAAAD5cKAAACAAAAD1wAAAB8AAAAD5gKAAAEAAAAD3oAAABaAAAAvv///67/
+        //8PmQoAAAMAAAAPeAAAAFgAAACk////D5oKAAAEAAAAD2MAAABDAAAA6P///8j///8PmwoAAAQAAAAP
+        dgAAAFYAAADn////x////w+cCgAAAgAAAA9iAAAAQgAAAA+dCgAABAAAAA9uAAAATgAAAPL////S////
+        D54KAAAEAAAAD20AAABNAAAA5f///8X///8PnwoAAAIAAAAPLAAAADwAAAAPoAoAAAIAAAAPLgAAAD4A
+        AAAPoQoAAAIAAAAPLwAAAD8AAAAPogoAAAIAAAAPPAAAAD4AAAAPowoAAAAAAAAPD6QKAAABAAAADzsA
+        AAAPpQoAAAIAAAAPKwAAADEAAAAPpgoAAAIAAAAP7P///zIAAAAPpwoAAAIAAAAPuf///zMAAAAPqAoA
+        AAIAAAAP6P///zQAAAAPqQoAAAIAAAAP+P///zUAAAAPqgoAAAIAAAAPvv///zYAAAAPqwoAAAIAAAAP
+        /f///zcAAAAPrAoAAAIAAAAP4f///zgAAAAPrQoAAAIAAAAP7f///zkAAAAPrgoAAAQAAAAP6f///zAA
+        AAC9////KQAAAA+vCgAAAgAAAA89AAAAJQAAAA+wCgAAAAAAAA8PsQoAAAMAAAAPcQAAAFEAAABcAAAA
+        D7IKAAADAAAAD3cAAABXAAAAfAAAAA+zCgAAAgAAAA9lAAAARQAAAA+0CgAAAgAAAA9yAAAAUgAAAA+1
+        CgAAAgAAAA90AAAAVAAAAA+2CgAAAgAAAA95AAAAWQAAAA+3CgAAAgAAAA91AAAAVQAAAA+4CgAAAgAA
+        AA9pAAAASQAAAA+5CgAAAgAAAA9vAAAATwAAAA+6CgAAAgAAAA9wAAAAUAAAAA+7CgAABAAAAA/6////
+        LwAAAFsAAAB7AAAAD7wKAAAEAAAADykAAAAoAAAAXQAAAH0AAAAPvQoAAAIAAAAPYQAAAEEAAAAPvgoA
+        AAMAAAAPcwAAAFMAAADw////D78KAAADAAAAD2QAAABEAAAA0P///w/ACgAAAwAAAA9mAAAARgAAAFsA
+        AAAPwQoAAAMAAAAPZwAAAEcAAABdAAAAD8IKAAACAAAAD2gAAABIAAAAD8MKAAACAAAAD2oAAABKAAAA
+        D8QKAAADAAAAD2sAAABLAAAAs////w/FCgAAAwAAAA9sAAAATAAAAKP///8PxgoAAAMAAAAP+f///yIA
+        AAAkAAAAD8cKAAADAAAAD6f///8hAAAA3////w/ICgAAAgAAAA+o////JwAAAA/JCgAAAwAAAA96AAAA
+        WgAAAD4AAAAPygoAAAMAAAAPeAAAAFgAAAAjAAAAD8sKAAADAAAAD2MAAABDAAAAJgAAAA/MCgAAAwAA
+        AA92AAAAVgAAAEAAAAAPzQoAAAMAAAAPYgAAAEIAAAB7AAAAD84KAAADAAAAD24AAABOAAAAfQAAAA/P
+        CgAAAgAAAA9tAAAATQAAAA/QCgAAAwAAAA8sAAAAPwAAADwAAAAP0QoAAAMAAAAPLgAAADoAAAA+AAAA
+        D9IKAAADAAAADy0AAABfAAAAKgAAAA/TCgAABAAAAA88AAAAPgAAAFwAAAB8AAAAD9QKAAAAAAAADw/V
+        CgAAAQAAAA87AAAAD9YKAAACAAAADysAAAAxAAAAD9cKAAACAAAAD+z///8yAAAAD9gKAAACAAAAD7n/
+        //8zAAAAD9kKAAACAAAAD+j///80AAAAD9oKAAACAAAAD/j///81AAAAD9sKAAACAAAAD77///82AAAA
+        D9wKAAACAAAAD/3///83AAAAD90KAAACAAAAD+H///84AAAAD94KAAACAAAAD+3///85AAAAD98KAAAC
+        AAAAD+n///8wAAAAD+AKAAACAAAADz0AAAAlAAAAD+EKAAACAAAAD7T///+3////D+IKAAACAAAAD3EA
+        AABRAAAAD+MKAAACAAAAD3cAAABXAAAAD+QKAAACAAAAD2UAAABFAAAAD+UKAAACAAAAD3IAAABSAAAA
+        D+YKAAACAAAAD3QAAABUAAAAD+cKAAACAAAAD3oAAABaAAAAD+gKAAACAAAAD3UAAABVAAAAD+kKAAAC
+        AAAAD2kAAABJAAAAD+oKAAACAAAAD28AAABPAAAAD+sKAAACAAAAD3AAAABQAAAAD+wKAAACAAAAD/r/
+        //8vAAAAD+0KAAACAAAADykAAAAoAAAAD+4KAAACAAAAD2EAAABBAAAAD+8KAAACAAAAD3MAAABTAAAA
+        D/AKAAACAAAAD2QAAABEAAAAD/EKAAACAAAAD2YAAABGAAAAD/IKAAACAAAAD2cAAABHAAAAD/MKAAAC
+        AAAAD2gAAABIAAAAD/QKAAACAAAAD2oAAABKAAAAD/UKAAACAAAAD2sAAABLAAAAD/YKAAACAAAAD2wA
+        AABMAAAAD/cKAAACAAAAD/n///8iAAAAD/gKAAACAAAAD6f///8hAAAAD/kKAAACAAAAD6j///8nAAAA
+        D/oKAAACAAAAD3kAAABZAAAAD/sKAAACAAAAD3gAAABYAAAAD/wKAAACAAAAD2MAAABDAAAAD/0KAAAC
+        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
+        AA9lAAAARQAAAA8XDAAAAgAAAA9hAAAAQQAAAA8YDAAAAgAAAA/8////3P///w8ZDAAAAgAAAA90AAAA
+        VAAAAA8aDAAAAgAAAA9rAAAASwAAAA8bDAAAAgAAAA9tAAAATQAAAA8cDAAAAgAAAA9sAAAATAAAAA8d
+        DAAAAgAAAA95AAAAWQAAAA8eDAAAAgAAAA+6////qv///w8fDAAAAgAAAA94AAAAWAAAAA8gDAAAAgAA
+        AA9qAAAASgAAAA8hDAAAAgAAAA/2////1v///w8iDAAAAgAAAA92AAAAVgAAAA8jDAAAAgAAAA9jAAAA
+        QwAAAA8kDAAAAgAAAA/n////x////w8lDAAAAgAAAA96AAAAWgAAAA8mDAAAAgAAAA9zAAAAUwAAAA8n
+        DAAAAgAAAA9iAAAAQgAAAA8oDAAAAgAAAA8uAAAAOgAAAA8pDAAAAgAAAA8sAAAAOwAAAA8qDAAAAgAA
+        AA88AAAAPgAAAA8rDAAAAAAAAA8PLAwAAAMAAAAPYAAAAH4AAAA7AAAADy0MAAACAAAADzEAAAAhAAAA
+        Dy4MAAACAAAADzIAAABAAAAADy8MAAACAAAADzMAAAAjAAAADzAMAAACAAAADzQAAAAkAAAADzEMAAAC
+        AAAADzUAAAAlAAAADzIMAAACAAAADzYAAABeAAAADzMMAAACAAAADzcAAAAmAAAADzQMAAACAAAADzgA
+        AAAqAAAADzUMAAACAAAADzkAAAAoAAAADzYMAAACAAAADzAAAAApAAAADzcMAAACAAAADy0AAABfAAAA
+        DzgMAAACAAAADz0AAAArAAAADzkMAAADAAAAD3EAAABRAAAALwAAAA86DAAAAwAAAA93AAAAVwAAACcA
+        AAAPOwwAAAMAAAAPZQAAAEUAAAD3////DzwMAAADAAAAD3IAAABSAAAA+P///w89DAAAAwAAAA90AAAA
+        VAAAAOD///8PPgwAAAMAAAAPeQAAAFkAAADo////Dz8MAAADAAAAD3UAAABVAAAA5f///w9ADAAAAwAA
+        AA9pAAAASQAAAO////8PQQwAAAMAAAAPbwAAAE8AAADt////D0IMAAADAAAAD3AAAABQAAAA9P///w9D
+        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
+        AAB+AAAAD/EMAAACAAAADzEAAAAhAAAAD/IMAAACAAAADzIAAABAAAAAD/MMAAACAAAADzMAAAAjAAAA
+        D/QMAAACAAAADzQAAAAkAAAAD/UMAAACAAAADzUAAAAlAAAAD/YMAAACAAAADzYAAABeAAAAD/cMAAAC
+        AAAADzcAAAAmAAAAD/gMAAACAAAADzgAAAAqAAAAD/kMAAACAAAADzkAAAAoAAAAD/oMAAACAAAADzAA
+        AAApAAAAD/sMAAACAAAADy0AAABfAAAAD/wMAAACAAAADz0AAAArAAAAD/0MAAAEAAAAD3EAAABRAAAA
+        OwAAADoAAAAP/gwAAAIAAAAPdwAAAFcAAAAP/wwAAAQAAAAPZQAAAEUAAADl////xf///w8ADQAABAAA
+        AA9yAAAAUgAAAPH////R////DwENAAAEAAAAD3QAAABUAAAA9P///9T///8PAg0AAAQAAAAPeQAAAFkA
+        AAD1////1f///w8DDQAABAAAAA91AAAAVQAAAOj////I////DwQNAAAEAAAAD2kAAABJAAAA6f///8n/
+        //8PBQ0AAAQAAAAPbwAAAE8AAADv////z////w8GDQAABAAAAA9wAAAAUAAAAPD////Q////DwcNAAAC
+        AAAAD1sAAAB7AAAADwgNAAACAAAAD10AAAB9AAAADwkNAAAEAAAAD2EAAABBAAAA4f///8H///8PCg0A
+        AAIAAAAPcwAAAFMAAAAPCw0AAAQAAAAPZAAAAEQAAADk////xP///w8MDQAABAAAAA9mAAAARgAAAPb/
+        ///W////Dw0NAAAEAAAAD2cAAABHAAAA4////8P///8PDg0AAAQAAAAPaAAAAEgAAADn////x////w8P
+        DQAABAAAAA9qAAAASgAAAO7////O////DxANAAAEAAAAD2sAAABLAAAA6v///8r///8PEQ0AAAQAAAAP
+        bAAAAEwAAADr////y////w8SDQAABAAAAA87AAAAOgAAALT///+o////DxMNAAACAAAADycAAAAiAAAA
+        DxQNAAACAAAAD1wAAAB8AAAADxUNAAAEAAAAD3oAAABaAAAA5v///8b///8PFg0AAAQAAAAPeAAAAFgA
+        AAD3////1////w8XDQAABAAAAA9jAAAAQwAAAPj////Y////DxgNAAAEAAAAD3YAAABWAAAA+f///9n/
+        //8PGQ0AAAQAAAAPYgAAAEIAAADi////wv///w8aDQAABAAAAA9uAAAATgAAAO3////N////DxsNAAAE
+        AAAAD20AAABNAAAA7P///8z///8PHA0AAAIAAAAPLAAAADwAAAAPHQ0AAAIAAAAPLgAAAD4AAAAPHg0A
+        AAIAAAAPLwAAAD8AAAAPHw0AAAIAAAAPPAAAAD4AAAAPIA0AAAAAAAAPDyENAAAEAAAAD2AAAAB+AAAA
+        XwAAACUAAAAPIg0AAAQAAAAPMQAAACEAAADl////KwAAAA8jDQAABAAAAA8yAAAAQAAAAC8AAADx////
+        DyQNAAAEAAAADzMAAAAjAAAALQAAAPL///8PJQ0AAAQAAAAPNAAAACQAAADA////8////w8mDQAABAAA
+        AA81AAAAJQAAALb////0////DycNAAAEAAAADzYAAABeAAAA2P///9n///8PKA0AAAQAAAAPNwAAACYA
+        AADW////3////w8pDQAABAAAAA84AAAAKgAAAKT////1////DyoNAAAEAAAADzkAAAAoAAAAtf////b/
+        //8PKw0AAAQAAAAPMAAAACkAAACo////9////w8sDQAABAAAAA8tAAAAXwAAAKL////4////Dy0NAAAE
+        AAAADz0AAAArAAAAqv////n///8PLg0AAAQAAAAPcQAAAFEAAADm////8P///w8vDQAABAAAAA93AAAA
+        VwAAAOT///8iAAAADzANAAAEAAAAD2UAAABFAAAA0////67///8PMQ0AAAQAAAAPcgAAAFIAAAC+////
+        sf///w8yDQAABAAAAA90AAAAVAAAAND///+4////DzMNAAAEAAAAD3kAAABZAAAA0f///+3///8PNA0A
+        AAQAAAAPdQAAAFUAAADV////6v///w81DQAABAAAAA9pAAAASQAAAMP///+z////DzYNAAAEAAAAD28A
+        AABPAAAAuf///8////8PNw0AAAQAAAAPcAAAAFAAAADC////rf///w84DQAABAAAAA9bAAAAewAAALr/
+        //+w////DzkNAAAEAAAAD10AAAB9AAAAxf///ywAAAAPOg0AAAQAAAAPYQAAAEEAAAC/////xP///w87
+        DQAABAAAAA9zAAAAUwAAAMv///+m////DzwNAAAEAAAAD2QAAABEAAAAof///6////8PPQ0AAAQAAAAP
+        ZgAAAEYAAAC0////4v///w8+DQAABAAAAA9nAAAARwAAAOD///+s////Dz8NAAAEAAAAD2gAAABIAAAA
+        6f///+f///8PQA0AAAQAAAAPagAAAEoAAADo////6////w9BDQAABAAAAA9rAAAASwAAANL////J////
+        D0INAAAEAAAAD2wAAABMAAAAyv///8j///8PQw0AAAQAAAAPOwAAADoAAADH////q////w9EDQAABAAA
+        AA8nAAAAIgAAAKf///8uAAAAD0UNAAAEAAAAD1wAAAB8AAAAo////6X///8PRg0AAAQAAAAPegAAAFoA
+        AAC8////KAAAAA9HDQAABAAAAA94AAAAWAAAALv///8pAAAAD0gNAAAEAAAAD2MAAABDAAAA4f///6n/
+        //8PSQ0AAAQAAAAPdgAAAFYAAADN////zv///w9KDQAAAwAAAA9iAAAAQgAAANr///8PSw0AAAQAAAAP
+        bgAAAE4AAADX////7P///w9MDQAABAAAAA9tAAAATQAAALf///8/AAAAD00NAAAEAAAADywAAAA8AAAA
+        wf///7L///8PTg0AAAQAAAAPLgAAAD4AAADj////zP///w9PDQAABAAAAA8vAAAAPwAAAL3////G////
+        D1ANAAAAAAAADw9RDQAAAAAAAA8PUg0AAAIAAAAPQAAAAKf///8PUw0AAAIAAAAPMQAAACEAAAAPVA0A
+        AAIAAAAPMgAAACIAAAAPVQ0AAAIAAAAPMwAAACMAAAAPVg0AAAIAAAAPNAAAACQAAAAPVw0AAAIAAAAP
+        NQAAACUAAAAPWA0AAAIAAAAPNgAAACYAAAAPWQ0AAAIAAAAPNwAAAF8AAAAPWg0AAAIAAAAPOAAAACgA
+        AAAPWw0AAAIAAAAPOQAAACkAAAAPXA0AAAIAAAAPMAAAACcAAAAPXQ0AAAIAAAAPLwAAAD8AAAAPXg0A
+        AAIAAAAPsP///34AAAAPXw0AAAIAAAAPcQAAAFEAAAAPYA0AAAIAAAAPdwAAAFcAAAAPYQ0AAAIAAAAP
+        ZQAAAEUAAAAPYg0AAAIAAAAPcgAAAFIAAAAPYw0AAAIAAAAPdAAAAFQAAAAPZA0AAAIAAAAPeQAAAFkA
+        AAAPZQ0AAAIAAAAPdQAAAFUAAAAPZg0AAAIAAAAPaQAAAEkAAAAPZw0AAAIAAAAPbwAAAE8AAAAPaA0A
+        AAIAAAAPcAAAAFAAAAAPaQ0AAAIAAAAPqP///34AAAAPag0AAAIAAAAPKgAAAHwAAAAPaw0AAAIAAAAP
+        YQAAAEEAAAAPbA0AAAIAAAAPcwAAAFMAAAAPbQ0AAAIAAAAPZAAAAEQAAAAPbg0AAAIAAAAPZgAAAEYA
+        AAAPbw0AAAIAAAAPZwAAAEcAAAAPcA0AAAIAAAAPaAAAAEgAAAAPcQ0AAAIAAAAPagAAAEoAAAAPcg0A
+        AAIAAAAPawAAAEsAAAAPcw0AAAIAAAAPbAAAAEwAAAAPdA0AAAIAAAAPKwAAALH///8PdQ0AAAIAAAAP
+        JwAAAGAAAAAPdg0AAAIAAAAPPAAAAD4AAAAPdw0AAAIAAAAPegAAAFoAAAAPeA0AAAIAAAAPeAAAAFgA
+        AAAPeQ0AAAIAAAAPYwAAAEMAAAAPeg0AAAIAAAAPdgAAAFYAAAAPew0AAAIAAAAPYgAAAEIAAAAPfA0A
+        AAIAAAAPbgAAAE4AAAAPfQ0AAAIAAAAPbQAAAE0AAAAPfg0AAAIAAAAPLAAAADsAAAAPfw0AAAIAAAAP
+        LgAAADoAAAAPgA0AAAIAAAAPLQAAAD0AAAAPgQ0AAAIAAAAPWwAAAF0AAAAPgg0AAAAAAAAPCw==
+</value>
+  </data>
+  <data name="scan_table" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAHAQAAAAEBAAAABQAAAAcHCQIAAAAJAwAAAAkEAAAACQUAAAAJBgAAAA8C
+        AAAAMAAAAAcpAAIAAwAEAAUABgAHAAgACQAKAAsADAANABAAEQASABMAFAAVABYAFwAYABkAGgAbAB4A
+        HwAgACEAIgAjACQAJQAmACcAKAArACwALQAuAC8AMAAxADIAMwA0ADUAVgAPAwAAADAAAAAHKQACAAMA
+        BAAFAAYABwAIAAkACgALABoAGwAoADMANAAZABUAIQAiAC4AEwAmADUADQAeABgAEgAWABcAIAAjABQA
+        MQAfAAwAKwAnABAAJAAlAC0AMAAyABEALwAsAFYADwQAAAAyAAAABykAAgADAAQABQAGAAcACAAJAAoA
+        CwAMAA0AEAARABIAEwAUABUAFgAXABgAGQAaABsAHgAfACAAIQAiACMAJAAlACYAJwAoACsAXgAsAC0A
+        LgAvADAAMQAyADMANAA1AFYANQAPBQAAADAAAAAHAgADAAQABQAGAAcACAAJAAoACwAMAA0AKQAQABEA
+        EgATABQAFQAWABcAGAAZABoAGwAeAB8AIAAhACIAIwAkACUAJgAnACgAKwAsAC0ALgAvADAAMQAyADMA
+        NAA1AFYADwYAAAAwAAAABwIAAwAEAAUABgAHAAgACQAKAAsADAANABoAGwAnACgAKQAzADQANQArAB4A
+        MAAuACAAEgAhACIAIwAXACQAJQAmADIAMQAYABkAEAATAB8AFAAWAC8AEQAtABUALABWAAs=
+</value>
+  </data>
+  <data name="vkey_table" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        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
+        Cw==
+</value>
+  </data>
+</root>
\ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/resx.resx b/mcs/class/Managed.Windows.Forms/resx.resx
deleted file mode 100644 (file)
index 11d642e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-<resheader name="resmimetype"><value>text/microsoft-resx</value></resheader><resheader name="version"><value>1.3</value></resheader><resheader name="reader"><value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader><resheader name="writer"><value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader><data name="test" mimetype="application/x-microsoft.net.object.binary.base64"><value>AAEAAAD/////AQAAAAAAAAAMAgAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtc190ZXN0X25ldF8yXzAFAQAAACdNb25vVGVzdHMuU3lzdGVtLlJlc291cmNlcy5zZXJpYWxpemFibGUCAAAAB3Nlcm5hbWUIc2VydmFsdWUBAQIAAAAGAwAAAAVhYWFhYQYEAAAABWJiYmJiCw==</value><comment>comment</comment></data></root>
\ No newline at end of file
index ec538abc29f3441d5927656608e29ecdb24ed11c..b5e2e809ae4347f07178b44ada2c6dff97bc0d2e 100644 (file)
@@ -182,7 +182,7 @@ namespace Microsoft.Build.BuildEngine {
                                e = new ConditionFactorExpression (token);
                        } else if (token.Type == TokenType.Item || token.Type == TokenType.Property
                                        || token.Type == TokenType.Metadata) {
-                               e = ParseReferenceExpression (token.Value);
+                               e = ParseReferenceExpression (token.Value [0]);
                        } else if (token.Type == TokenType.Not) {
                                e = ParseNotExpression ();
                        } else
@@ -224,21 +224,33 @@ namespace Microsoft.Build.BuildEngine {
                }
 
                //@prefix: @ or $
-               ConditionExpression ParseReferenceExpression (string prefix)
+               ConditionExpression ParseReferenceExpression (char prefix)
                {
-                       StringBuilder sb = new StringBuilder ();
-
-                       string ref_type = prefix [0] == '$' ? "a property" : "an item list";
                        int token_pos = tokenizer.Token.Position;
+                       string ref_type = prefix == '$' ? "a property" : "an item list";
                        IsAtToken (TokenType.LeftParen, String.Format (
                                                "Expected {0} at position {1} in condition \"{2}\". Missing opening parantheses after the '{3}'.",
                                                ref_type, token_pos, conditionStr, prefix));
-                       tokenizer.GetNextToken ();
 
+
+                       if (prefix == '$') {
+                               //
+                               // Tjhe scan should consider quoted parenthesis but it breaks on .net as well
+                               // we are bug compatible
+                               //
+                               tokenizer.ScanForClosingParens ();
+                       } else {
+                               tokenizer.GetNextToken ();
+                       }
+
+                       if (tokenizer.IsEOF ())
+                               throw new ExpressionParseException ("Missing closing parenthesis in condition " + conditionStr);
+
+                       StringBuilder sb = new StringBuilder ();
                        sb.AppendFormat ("{0}({1}", prefix, tokenizer.Token.Value);
 
                        tokenizer.GetNextToken ();
-                       if (prefix == "@" && tokenizer.Token.Type == TokenType.Transform) {
+                       if (prefix == '@' && tokenizer.Token.Type == TokenType.Transform) {
                                tokenizer.GetNextToken ();
                                sb.AppendFormat ("->'{0}'", tokenizer.Token.Value);
 
@@ -250,9 +262,7 @@ namespace Microsoft.Build.BuildEngine {
                                }
                        }
 
-                       IsAtToken (TokenType.RightParen, String.Format (
-                                               "Expected {0} at position {1} in condition \"{2}\". Missing closing parantheses'.",
-                                               ref_type, token_pos, conditionStr, prefix));
+                       IsAtToken (TokenType.RightParen, "Missing closing parenthesis in condition " + conditionStr);
                        tokenizer.GetNextToken ();
 
                        sb.Append (")");
index 29a4aba628af1765cad1851993be5fe6e4ec9d73..d9ee74475d6b79c919c3f660c01c180806a96bdd 100644 (file)
@@ -257,6 +257,29 @@ namespace Microsoft.Build.BuildEngine {
                        } else
                                throw new ExpressionParseException (String.Format ("Invalid token: {0}", ch));
                }
+
+               public void ScanForClosingParens (int parensCounter = 1)
+               {
+                       tokenPosition = position;
+                       int start = position;
+                       int ch;
+                       while ((ch = ReadChar ()) >= 0) {
+                               switch (ch) {
+                               case ')':
+                                       if (--parensCounter == 0) {
+                                               --position;
+                                               token = new Token (inputString.Substring (start, position - start), TokenType.String, tokenPosition);
+                                               return;
+                                       }
+                                       break;
+                               case '(':
+                                       ++parensCounter;
+                                       break;
+                               }
+                       }
+
+                       token = new Token (null, TokenType.EOF, tokenPosition);
+               }
                
                public int TokenPosition {
                        get { return tokenPosition; }
index 1e0fda2fdd8b9b75617132da1f61dc8d8a09671b..ccfc0fa3a0ea8a46c1a5018af0732e84820892b4 100644 (file)
@@ -55,6 +55,14 @@ namespace Microsoft.Build.BuildEngine {
 
        internal class Expression {
        
+               enum TokenKind
+               {
+                       OpenParens,
+                       CloseParens,
+                       Dot,
+                       End
+               }
+
                ExpressionCollection expressionCollection;
 
                static Regex item_regex;
@@ -232,6 +240,7 @@ namespace Microsoft.Build.BuildEngine {
                                pos += 2;
                                int start = pos;
                                int end = 0;
+                               bool requires_closing_parens = true;
                                        
                                var ch = text [pos];
                                if ((ch == 'r' || ch == 'R') && text.Substring (pos + 1).StartsWith ("egistry:", StringComparison.OrdinalIgnoreCase)) {
@@ -273,6 +282,7 @@ namespace Microsoft.Build.BuildEngine {
                                                                        // Simple property reference $(Foo)
                                                                        //
                                                                        phase.Add (new PropertyReference (name));
+                                                                       requires_closing_parens = false;
                                                                } else {
                                                                        end = 0;
                                                                }
@@ -287,6 +297,14 @@ namespace Microsoft.Build.BuildEngine {
 
                                                pos = end;
                                        }
+
+                                       if (requires_closing_parens) {
+                                               end = text.IndexOf (')', pos);
+                                               if (end < 0)
+                                                       end = 0;
+                                               else
+                                                       pos = end + 1;
+                                       }
                                }
 
                                end = text.IndexOf ("$(", pos, StringComparison.Ordinal);
@@ -493,53 +511,71 @@ namespace Microsoft.Build.BuildEngine {
 
                static MemberInvocationReference ParseInvocation (string text, ref int p, Type type, IReference instance)
                {
-                       var open_parens = text.IndexOf ('(', p);
-                       string name;
-                       int end;
-                       List<string> args;
+                       TokenKind token;
+                       MemberInvocationReference mir = null;
+
+                       while (true) {
+                               int prev = p;
+                               token = ScanName (text, ref p);
+                               var name = text.Substring (prev, p - prev).TrimEnd ();
+
+                               switch (token) {
+                               case TokenKind.Dot:
+                               case TokenKind.OpenParens:
+                                       break;
+                               case TokenKind.CloseParens:
+                                       return new MemberInvocationReference (type, name) {
+                                               Instance = instance
+                                       };
+
+                               case TokenKind.End:
+                                       if (mir == null || name.Length != 0)
+                                               throw new InvalidProjectFileException (string.Format ("Invalid static method invocation syntax '{0}'", text.Substring (p)));
+
+                                       return mir;
+                               default:
+                                       throw new NotImplementedException ();
+                               }
 
-                       //
-                       // Is it method or property
-                       //
-                       if (open_parens > 0) {
-                               name = text.Substring (p, open_parens - p);
-
-                               //
-                               // It can be instance method on static property
-                               //
-                               if (name.IndexOf ('.') > 0) {
-                                       var names = name.Split ('.');
-                                       int i;
-                                       for (i = 0; i < names.Length - 1; ++i) {
-                                               instance = new MemberInvocationReference (type, names [i]) {
-                                                       Instance = instance
-                                               };
-                                       }
+                               instance = mir = new MemberInvocationReference (type, name) {
+                                       Instance = instance
+                               };
+
+                               if (type != null) {
+                                       if (!IsMethodAllowed (type, name))
+                                               throw new InvalidProjectFileException (string.Format ("The function '{0}' on type '{1}' has not been enabled for execution", name, type.FullName));
 
                                        type = null;
-                                       name = names [i];
                                }
-                               ++open_parens;
-                               args = ParseArguments (text, ref open_parens);
-                               end = text.IndexOf (')', open_parens);
-                       } else {
-                               end = text.IndexOf (')', p);
-                               if (end < 0)
-                                       throw new InvalidProjectFileException (string.Format ("Invalid static method invocation syntax '{0}'", text.Substring (p)));
 
-                               name = text.Substring (p, end - p);
-                               args = null;
+                               if (token == TokenKind.OpenParens) {
+                                       ++p;
+                                       mir.Arguments = ParseArguments (text, ref p);
+                               }
+
+                               if (p < text.Length && text [p] == '.') {
+                                       ++p;
+                                       continue;
+                               }
+
+                               return mir;
                        }
+               }
 
-                       name = name.TrimEnd ();
-                       if (!IsMethodAllowed (type, name))
-                               throw new InvalidProjectFileException (string.Format ("The function '{0}' on type '{1}' has not been enabled for execution", name, type.FullName));
+               static TokenKind ScanName (string text, ref int p)
+               {
+                       for (; p < text.Length; ++p) {
+                               switch (text [p]) {
+                               case '(':
+                                       return TokenKind.OpenParens;
+                               case '.':
+                                       return TokenKind.Dot;
+                               case ')':
+                                       return TokenKind.CloseParens;
+                               }
+                       }
 
-                       p = end + 1;
-                       return new MemberInvocationReference (type, name) {
-                               Arguments = args,
-                               Instance = instance
-                       };
+                       return TokenKind.End;
                }
 
                ArrayList SplitMetadata (string text)
index 351aea020876c31014f2c0b4e9845c8270f66100..b4d996faa9c370a67b58cdcb4a7b112494f7a685 100644 (file)
@@ -274,7 +274,11 @@ namespace Microsoft.Build.BuildEngine {
                                        continue;
 
                                if (!Directory.Exists (extn_path)) {
-                                       project.ParentEngine.LogMessage (MessageImportance.Low, "Extension path '{0}' not found, ignoring.", extn_path);
+                                       if (extn_path != DotConfigExtensionsPath)
+                                               project.ParentEngine.LogMessage (
+                                                       MessageImportance.Low,
+                                                       "Extension path '{0}' not found, ignoring.",
+                                                       extn_path);
                                        continue;
                                }
 
index ada57788f2a2e18ccc41690861e67912df33a63a..6430992fba9f81fc08bedd6bf33e0a6c6e7a00ed 100644 (file)
@@ -63,10 +63,16 @@ namespace Microsoft.Build.BuildEngine
                {
                        var flags = BindingFlags.IgnoreCase | BindingFlags.Public;
                        object target;
+                       string member_name = name;
 
                        if (Instance == null) {
                                target = null;
-                               flags |= BindingFlags.Static;
+                               if (string.Equals (member_name, "new", StringComparison.OrdinalIgnoreCase)) {
+                                       member_name = ConstructorInfo.ConstructorName;
+                                       flags |= BindingFlags.CreateInstance | BindingFlags.Instance;
+                               } else {
+                                       flags |= BindingFlags.Static;
+                               }
                        } else {
                                var mir = Instance as MemberInvocationReference;
                                if (mir != null) {
@@ -91,14 +97,14 @@ namespace Microsoft.Build.BuildEngine
                        } else {
                                flags |= BindingFlags.InvokeMethod;
                                ExpandArguments (project, options);
-                               args = PrepareMethodArguments (flags);
+                               args = PrepareMethodArguments (member_name, flags);
                                if (args == null)
                                        throw new InvalidProjectFileException (string.Format ("Method '{0}({1})' arguments cannot be evaluated'", name, string.Join (", ", Arguments.ToArray ())));
                        }
 
                        object value;
                        try {
-                               value = type.InvokeMember (name, flags, null, target, args, CultureInfo.InvariantCulture);
+                               value = type.InvokeMember (member_name, flags, null, target, args, CultureInfo.InvariantCulture);
                        } catch (MissingFieldException) {
                                //
                                // It can be field/constant instead of a property
@@ -106,7 +112,7 @@ namespace Microsoft.Build.BuildEngine
                                if (args == null && Instance == null) {
                                        flags &= ~BindingFlags.GetProperty;
                                        flags |= BindingFlags.GetField;
-                                       value = type.InvokeMember (name, flags, null, null, null, CultureInfo.InvariantCulture);
+                                       value = type.InvokeMember (member_name, flags, null, null, null, CultureInfo.InvariantCulture);
                                } else {
                                        throw;
                                }
@@ -132,9 +138,9 @@ namespace Microsoft.Build.BuildEngine
                        }
                }
 
-               object[] PrepareMethodArguments (BindingFlags flags)
+               object[] PrepareMethodArguments (string name, BindingFlags flags)
                {
-                       var candidates = type.GetMember (name, MemberTypes.Method, flags);
+                       var candidates = type.GetMember (name, MemberTypes.Method | MemberTypes.Constructor, flags);
                        object[] args = null;
                        ParameterInfo[] best = null;
                        foreach (MethodBase candidate in candidates) {
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln
deleted file mode 100644 (file)
index 6f9b584..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-\r
-Microsoft Visual Studio Solution File, Format Version 11.00\r
-# Visual Studio 2010\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine-net_4_0", "Microsoft.Build.Engine-net_4_0.csproj", "{155AEF28-C81F-405D-9072-9D52780E3E70}"\r
-EndProject\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine-tests-net_4_0", "Microsoft.Build.Engine-tests-net_4_0.csproj", "{155AEF28-C81F-405D-9072-9D52780E3E71}"\r
-EndProject\r
-Global\r
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
-               Debug|Any CPU = Debug|Any CPU\r
-               Release|Any CPU = Release|Any CPU\r
-       EndGlobalSection\r
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {155AEF28-C81F-405D-9072-9D52780E3E70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
-               {155AEF28-C81F-405D-9072-9D52780E3E71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
-               {155AEF28-C81F-405D-9072-9D52780E3E70}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
-               {155AEF28-C81F-405D-9072-9D52780E3E71}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
-               {155AEF28-C81F-405D-9072-9D52780E3E70}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
-               {155AEF28-C81F-405D-9072-9D52780E3E71}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
-               {155AEF28-C81F-405D-9072-9D52780E3E70}.Release|Any CPU.Build.0 = Release|Any CPU\r
-               {155AEF28-C81F-405D-9072-9D52780E3E71}.Release|Any CPU.Build.0 = Release|Any CPU\r
-       EndGlobalSection\r
-       GlobalSection(MonoDevelopProperties) = preSolution\r
-               StartupItem = Microsoft.Build.Engine-net_4_0.csproj\r
-       EndGlobalSection\r
-EndGlobal\r
index 708d5b1c55bc96d336de414a2f74e3acd38b8436..df6603cfa8569c53f1ea348724911660b08ee8d4 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Build.Framework/Microsoft.Build.Framework-net_4_5.csproj">\r
       <Project>{DA3B9FEE-8FBD-4587-B760-65420765256A}</Project>\r
-      <Name>Microsoft.Build.Framework\Microsoft.Build.Framework-net_4_5</Name>\r
+      <Name>Microsoft.Build.Framework-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Build.Utilities/Microsoft.Build.Utilities-net_4_5.csproj">\r
       <Project>{6E1C7BDE-7B9E-47B0-A7B2-1561822FE922}</Project>\r
-      <Name>Microsoft.Build.Utilities\Microsoft.Build.Utilities-net_4_5</Name>\r
+      <Name>Microsoft.Build.Utilities-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj
deleted file mode 100644 (file)
index 8ce515a..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <OutputType>Library</OutputType>
-    <RootNamespace>Microsoft.Build.Engine.Test</RootNamespace>
-    <AssemblyName>Microsoft.Build.Engine.Test</AssemblyName>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{A2F451CD-8701-434A-A562-EF1809E2DB7D}</ProjectGuid>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <OutputPath>.\</OutputPath>
-    <Optimize>False</Optimize>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugSymbols>True</DebugSymbols>
-    <DebugType>Full</DebugType>
-    <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
-    <UseVSHostingProcess>true</UseVSHostingProcess>
-    <DocumentationFile>
-    </DocumentationFile>
-    <RegisterForComInterop>false</RegisterForComInterop>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'DebugMS' ">
-    <OutputPath>.\</OutputPath>
-    <Optimize>False</Optimize>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugSymbols>True</DebugSymbols>
-    <DebugType>Full</DebugType>
-    <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
-    <UseVSHostingProcess>true</UseVSHostingProcess>
-    <DocumentationFile>
-    </DocumentationFile>
-    <RegisterForComInterop>false</RegisterForComInterop>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <OutputPath>bin\Release\</OutputPath>
-    <Optimize>True</Optimize>
-    <DefineConstants>TRACE</DefineConstants>
-    <DebugSymbols>False</DebugSymbols>
-    <DebugType>None</DebugType>
-    <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
-    <UseVSHostingProcess>true</UseVSHostingProcess>
-    <DocumentationFile>
-    </DocumentationFile>
-    <RegisterForComInterop>false</RegisterForComInterop>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-    <Reference Include="Microsoft.Build.Framework" />
-    <Reference Include="Microsoft.Build.Utilities" />
-    <Reference Include="nunit.core">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\nunit24\NUnitCore\core\bin\Debug2005\nunit.core.dll</HintPath>
-    </Reference>
-    <Reference Include="nunit.framework">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\nunit24\NUnitFramework\framework\bin\Debug2005\nunit.framework.dll</HintPath>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup Condition=" '$(Configuration)' == 'DebugMS' ">
-    <Reference Include="Microsoft.Build.Engine" />
-  </ItemGroup>
-  <ItemGroup Condition=" '$(Configuration)' != 'DebugMS' ">
-    <ProjectReference Include="Microsoft.Build.Engine.csproj">
-      <Project>{49CC9B64-E28A-4818-97F9-301E14B383B9}</Project>
-      <Name>Microsoft.Build.Engine</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Test\Microsoft.Build.BuildEngine\BuildItemGroupCollectionTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\BuildItemGroupTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\BuildItemTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\BuildPropertyTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\BuildPropertyGroupTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\BuildPropertyGroupCollectionTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\BuildTaskTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\BuildChooseTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\ConsoleLoggerTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\Consts.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\EngineTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\ImportCollectionTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\ImportTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\InternalLoggerExceptionTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\InvalidProjectFileExceptionTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\ProjectTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\TargetCollectionTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\TargetTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\TestNamespaceManager.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\UsingTaskTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\UsingTaskCollectionTest.cs" />
-    <Compile Include="Test\Microsoft.Build.BuildEngine\UtilitiesTest.cs" />
-    <Compile Include="Test\various\Build.cs" />
-    <Compile Include="Test\various\Conditions.cs" />
-    <Compile Include="Test\various\DefaultTasks.cs" />
-    <Compile Include="Test\various\EvaluationOrder.cs" />
-    <Compile Include="Test\various\Items.cs" />
-    <Compile Include="Test\various\ProjectElement.cs" />
-    <Compile Include="Test\various\Properties.cs" />
-    <Compile Include="..\Microsoft.Build.Tasks\Test/Microsoft.Build.Tasks\TestMessageLogger.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
-  <PropertyGroup>
-    <PreBuildEvent>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe /r:Microsoft.Build.Framework.dll /r:Microsoft.Build.Utilities.dll /target:library /out:$(ProjectDir)Test\resources\TestTasks.dll $(ProjectDir)Test\resources\TestTasks.cs</PreBuildEvent>
-  </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln
deleted file mode 100644 (file)
index c6101a2..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# SharpDevelop 2.0.0.1135
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine.Test", "Microsoft.Build.Engine.Test.csproj", "{A2F451CD-8701-434A-A562-EF1809E2DB7D}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|Any CPU = Debug|Any CPU
-               Release|Any CPU = Release|Any CPU
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Release|Any CPU.Build.0 = Release|Any CPU
-               {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
-       EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj
deleted file mode 100644 (file)
index 3b9be7c..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <OutputType>Library</OutputType>
-    <RootNamespace>Microsoft.Build.Engine</RootNamespace>
-    <AssemblyName>Microsoft.Build.Engine</AssemblyName>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{49CC9B64-E28A-4818-97F9-301E14B383B9}</ProjectGuid>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <OutputPath>.\</OutputPath>
-    <Optimize>False</Optimize>
-    <DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
-    <DebugSymbols>True</DebugSymbols>
-    <DebugType>Full</DebugType>
-    <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
-    <UseVSHostingProcess>true</UseVSHostingProcess>
-    <DocumentationFile>
-    </DocumentationFile>
-    <RegisterForComInterop>false</RegisterForComInterop>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <OutputPath>bin\Release\</OutputPath>
-    <Optimize>True</Optimize>
-    <DefineConstants>TRACE;NET_2_0</DefineConstants>
-    <DebugSymbols>False</DebugSymbols>
-    <DebugType>None</DebugType>
-    <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
-    <UseVSHostingProcess>true</UseVSHostingProcess>
-    <DocumentationFile>
-    </DocumentationFile>
-    <RegisterForComInterop>false</RegisterForComInterop>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'DebugMS' ">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\DebugMS\</OutputPath>
-    <DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
-    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
-    <DebugType>Full</DebugType>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-    <Reference Include="Microsoft.Build.Framework" />
-    <Reference Include="Microsoft.Build.Utilities" />
-  </ItemGroup>
-  <ItemGroup Condition=" '$(Configuration)' == 'DebugMS' ">
-    <Compile Include="Assembly\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="..\..\build\common\Consts.cs" />
-    <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />
-    <Compile Include="..\Microsoft.Build.Framework\Mono.XBuild.Framework/AssemblyLoadInfo.cs" />
-    <Compile Include="..\Microsoft.Build.Utilities\Mono.XBuild.Utilities/ReservedNameUtils.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BatchingImplBase.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildChoose.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildEngine.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildItem.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildItemGroup.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildItemGroupCollection.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildProperty.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildPropertyGroup.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildPropertyGroupCollection.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildSettings.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildTask.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\BuildWhen.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ChangeType.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ColorResetter.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ColorSetter.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConditionAndExpression.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConditionExpression.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConditionFactorExpresion.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConditionFunctionExpression.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConditionNotExpression.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConditionOrExpression.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConditionParser.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConditionRelationalExpression.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConditionTokenizer.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ConsoleLogger.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\DirectoryScanner.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\Engine.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\EventSource.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\Expression.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ExpressionCollection.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ExpressionParseException.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\FileLogger.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\GroupingCollection.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\Import.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ImportCollection.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ImportedProject.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\InternalLoggerException.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\InvalidProjectFileException.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\IReference.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\ItemReference.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\MetadataReference.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\Project.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\PropertyPosition.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\PropertyReference.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\SolutionParser.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\Target.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\TargetBatchingImpl.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\TargetCollection.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\TaskBatchingImpl.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\TaskDatabase.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\TaskEngine.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\Token.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\UsingTask.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\UsingTaskCollection.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\Utilities.cs" />
-    <Compile Include="Microsoft.Build.BuildEngine\WriteHandler.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
-</Project>
\ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp
deleted file mode 100644 (file)
index 0cc9ace..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<Project name="Microsoft.Build.Engine.Test" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
-  <Configurations active="Debug">
-    <Configuration name="Debug" ctype="DotNetProjectConfiguration">
-      <Output directory="./bin/Debug" assembly="Microsoft.Build.Engine.Test" />
-      <Build debugmode="True" target="Library" />
-      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
-      <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
-    </Configuration>
-    <Configuration name="Release" ctype="DotNetProjectConfiguration">
-      <Output directory="./bin/Release" assembly="Microsoft.Build.Engine.Test" />
-      <Build debugmode="False" target="Library" />
-      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
-      <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
-    </Configuration>
-  </Configurations>
-  <DeployTargets />
-  <DeploymentInformation strategy="File">
-    <excludeFiles />
-  </DeploymentInformation>
-  <Contents>
-    <File name="./Microsoft.Build.BuildEngine/InternalLoggerExceptionTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/InvalidProjectFileExceptionTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/EngineTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/ProjectTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/BuildItemTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/UtilitiesTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/BuildPropertyTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/BuildPropertyGroupTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/BuildPropertyGroupCollectionTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/UsingTaskCollectionTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/UsingTaskTest.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Microsoft.Build.BuildEngine/Consts.cs" subtype="Code" buildaction="Compile" />
-  </Contents>
-  <References>
-    <ProjectReference type="Gac" localcopy="True" refto="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
-    <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-    <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-    <ProjectReference type="Gac" localcopy="True" refto="Microsoft.Build.Engine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-    <ProjectReference type="Gac" localcopy="True" refto="Microsoft.Build.Framework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-    <ProjectReference type="Gac" localcopy="True" refto="Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  </References>
-</Project>
\ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds
deleted file mode 100644 (file)
index bc65d10..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<Combine name="Microsoft.Build.Engine.Test" fileversion="2.0">
-  <Configurations active="Debug">
-    <Configuration name="Debug" ctype="CombineConfiguration">
-      <Entry build="True" name="Microsoft.Build.Engine.Test" configuration="Debug" />
-    </Configuration>
-    <Configuration name="Release" ctype="CombineConfiguration">
-      <Entry build="True" name="Microsoft.Build.Engine.Test" configuration="Debug" />
-    </Configuration>
-  </Configurations>
-  <DeployTargets />
-  <StartMode startupentry="Microsoft.Build.Engine.Test" single="True">
-    <Execute type="None" entry="Microsoft.Build.Engine.Test" />
-  </StartMode>
-  <Entries>
-    <Entry filename="./Microsoft.Build.Engine.Test.mdp" />
-  </Entries>
-</Combine>
\ No newline at end of file
index 51c3da6cfbf3ff0f779d3b5d4facac81819f1574..c3c8dacabc5c4d3e19f5c2142195cffff4297174 100644 (file)
@@ -357,6 +357,24 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
                        Assert.IsNull (proj.EvaluatedProperties ["A"], "A1");
                }
 
+               [Test]
+               public void TestCondition_References ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <A Condition=""$([System.String]::new('test').StartsWith(`te`))"">valid</A>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("valid", proj.GetEvaluatedProperty ("A"), "#1");
+               }
 
                [Test]
                public void TestHasTrailingSlash1 ()
index ee93c4b932d47924a461760dc727b8081bdc2c26..3a07eb289fb81ffaa4a12840e0e0504ff9972831 100755 (executable)
@@ -1402,6 +1402,8 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
                }
 
                [Test]
+               // Fails on wrench
+               [Category ("NotWorking")]
                public void TestItemsWithWildcards ()
                {
                        Engine engine = new Engine (Consts.BinPath);
@@ -1476,6 +1478,8 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
                }
 
                [Test]
+               // Fails on wrench
+               [Category ("NotWorking")]
                public void TestReservedMetadata ()
                {
                        Engine engine = new Engine (Consts.BinPath);
index fba19683c18aeb799a09d5f4eaa23888737574e8..795a71230663dc1bc363989138e1b4d6ec189947 100644 (file)
@@ -160,6 +160,37 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
                        Assert.AreEqual (DateTime.Now.ToString ("yyyy.MM.dd"), proj.GetEvaluatedProperty ("Prop1"), "#1");
                }
 
+               [Test]
+               public void InstanceMemberOnStaticProperty ()
+               {
+                       string documentString = @"
+                                       <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                               <PropertyGroup>
+                                                       <Prop1>$([System.DateTime]::Now.Year)</Prop1>
+                                               </PropertyGroup>
+                                       </Project>
+                               ";
+
+                       proj.LoadXml (documentString);
+                       Assert.AreEqual (DateTime.Now.Year.ToString (), proj.GetEvaluatedProperty ("Prop1"), "#1");
+               }
+
+               [Test]
+               public void InstanceMembersOnStaticMethod ()
+               {
+                       string documentString = @"
+                                       <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                               <PropertyGroup>
+                                                       <Prop1>$([System.String]::Concat('a', 'bb', 'c').Length.GetHashCode ())</Prop1>
+
+                                               </PropertyGroup>
+                                       </Project>
+                               ";
+
+                       proj.LoadXml (documentString);
+                       Assert.AreEqual (4.GetHashCode ().ToString (), proj.GetEvaluatedProperty ("Prop1"), "#1");
+               }
+
                [Test]
                public void MSBuildPropertyFunctions ()
                {
@@ -175,6 +206,23 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
 
                        proj.LoadXml (documentString);
                        Assert.AreEqual ("6.6", proj.GetEvaluatedProperty ("Prop1"), "#1");
-               }               
+               }
+
+               [Test]
+               public void Constructor ()
+               {
+                       string documentString = @"
+                                       <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                               <PropertyGroup>
+                                                       <NumberOne>0.6</NumberOne>
+                                                       <NumberTwo>6</NumberTwo>
+                                                       <Prop1>$([System.String]::new('value').EndsWith ('ue'))</Prop1>
+                                               </PropertyGroup>
+                                       </Project>
+                               ";
+
+                       proj.LoadXml (documentString);
+                       Assert.AreEqual ("True", proj.GetEvaluatedProperty ("Prop1"), "#1");
+               }
        }
 }
index e11230333de0b57a9eaec3b1b61aa008388f44ed..64b5a4134b70d3d34011aadd4a6af19e74900a7d 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 134fdb51ff93a47a3ceca48df45a7adfb48e1241..a811de97c38850fab72db3b2ac1bad0d5a68fa8a 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Managed.Windows.Forms/System.Windows.Forms-net_4_5.csproj">\r
       <Project>{B102F27C-1A07-487F-BA5B-D5155D201112}</Project>\r
-      <Name>Managed.Windows.Forms\System.Windows.Forms-net_4_5</Name>\r
+      <Name>System.Windows.Forms-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Build.Utilities/Microsoft.Build.Utilities-net_4_5.csproj">\r
       <Project>{6E1C7BDE-7B9E-47B0-A7B2-1561822FE922}</Project>\r
-      <Name>Microsoft.Build.Utilities\Microsoft.Build.Utilities-net_4_5</Name>\r
+      <Name>Microsoft.Build.Utilities-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Build.Framework/Microsoft.Build.Framework-net_4_5.csproj">\r
       <Project>{DA3B9FEE-8FBD-4587-B760-65420765256A}</Project>\r
-      <Name>Microsoft.Build.Framework\Microsoft.Build.Framework-net_4_5</Name>\r
+      <Name>Microsoft.Build.Framework-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_5.csproj">\r
       <Project>{54DFC5A7-7C1D-4BA5-A0F7-F0B312E1E076}</Project>\r
-      <Name>Microsoft.Build.Engine\Microsoft.Build.Engine-net_4_5</Name>\r
+      <Name>Microsoft.Build.Engine-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.XBuild.Tasks/Mono.XBuild.Tasks-net_4_5.csproj">\r
       <Project>{73FB1B7E-09F9-4E7F-A63A-C407A93BCA59}</Project>\r
-      <Name>Mono.XBuild.Tasks\Mono.XBuild.Tasks-net_4_5</Name>\r
+      <Name>Mono.XBuild.Tasks-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1fc961b72dc1f56a4865b6a55bb1c583ef706087..2833e27fda1227ab3a49ddbc0f21c82908c3410e 100644 (file)
@@ -57,9 +57,15 @@ namespace Microsoft.Build.Tasks {
                                else
                                        commandLine.AppendSwitch ("/delaysign-");
                        commandLine.AppendSwitchIfNotNull ("/description:", Description);
-                       if (EmbedResources != null)
-                               foreach (ITaskItem item in EmbedResources)
-                                       commandLine.AppendSwitchIfNotNull ("/embed:", item.ItemSpec);
+                       if (EmbedResources != null) {
+                               foreach (ITaskItem item in EmbedResources) {
+                                       string logical_name = item.GetMetadata ("LogicalName");
+                                       if (!string.IsNullOrEmpty (logical_name))
+                                               commandLine.AppendSwitchIfNotNull ("/embed:", string.Format ("{0},{1}", item.ItemSpec, logical_name));
+                                       else
+                                               commandLine.AppendSwitchIfNotNull ("/embed:", item.ItemSpec);
+                               }
+                       }
                        commandLine.AppendSwitchIfNotNull ("/evidence:", EvidenceFile);
                        commandLine.AppendSwitchIfNotNull ("/fileversion:", FileVersion);
                        commandLine.AppendSwitchIfNotNull ("/flags:", Flags);
index 142e73eddeb802dc009295d558a072bb7957652a..06b04b2670caab0922c550dc1946059571470c88 100644 (file)
@@ -25,8 +25,6 @@
 // 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_2_0
-
 using System;
 using System.IO;
 using Microsoft.Build.Framework;
@@ -102,12 +100,12 @@ namespace Microsoft.Build.Tasks {
                        //
                        if (References != null)
                                foreach (ITaskItem item in References) {
-                                       string aliases = item.GetMetadata ("Aliases") ?? String.Empty;
-                                       aliases = aliases.Trim ();
-                                       if (aliases.Length > 0)
-                                               commandLine.AppendSwitchIfNotNull ("/reference:" + aliases + "=", item.ItemSpec);
-                                       else
+                                       string aliases = item.GetMetadata ("Aliases");
+                                       if (!string.IsNullOrEmpty (aliases)) {
+                                               AddAliasesReference (commandLine, aliases, item.ItemSpec);
+                                       } else {
                                                commandLine.AppendSwitchIfNotNull ("/reference:", item.ItemSpec);
+                                       }
                                }
 
                        if (ResponseFiles != null)
@@ -125,6 +123,21 @@ namespace Microsoft.Build.Tasks {
                                commandLine.AppendSwitchIfNotNull ("/win32res:", Win32Resource);
                }
 
+               static void AddAliasesReference (CommandLineBuilderExtension commandLine, string aliases, string reference)
+               {
+                       foreach (var alias in aliases.Split (',')) {
+                               var a = alias.Trim ();
+                               if (a.Length == null)
+                                       continue;
+
+                               var r = "/reference:";
+                               if (!string.Equals (a, "global", StringComparison.OrdinalIgnoreCase))
+                                       r += a + "=";
+
+                               commandLine.AppendSwitchIfNotNull (r, reference);
+                       }
+               }
+
                [MonoTODO]
                protected override bool CallHostObjectToExecute ()
                {
@@ -232,4 +245,3 @@ namespace Microsoft.Build.Tasks {
        }
 }
 
-#endif
index 7b92594d0b894ec9851372f3899ce0a710fc00e3..56f9ea36813e00b7d3b6b822eaa39372f026b613 100644 (file)
@@ -27,6 +27,7 @@
 
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using Microsoft.Build.BuildEngine;
 using Microsoft.Build.Framework;
 using Microsoft.Build.Tasks;
@@ -287,6 +288,20 @@ namespace MonoTests.Microsoft.Build.Tasks {
                        Assert.AreEqual ("/embed:a /embed:b", clbe.ToString (), "A1");
                }
 
+               [Test]
+               public void TestEmbedResourcesWithLogicalName ()
+               {
+                       ALExtended ale = new ALExtended ();
+                       CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();
+                       var dict = new Dictionary<string, string> ();
+                       dict ["LogicalName"] = "value";
+
+                       ale.EmbedResources = new ITaskItem [2] { new TaskItem ("a", dict), new TaskItem ("b", dict) };
+                       ale.ARFC (clbe);
+
+                       Assert.AreEqual ("/embed:a,value /embed:b,value", clbe.ToString (), "A1");
+               }
+
                [Test]
                public void TestEvidenceFile ()
                {
index 846f47e627f72d3274d70bbab043e857f63f38f5..711bdb26afc536c33d6956c2263eb699d4857e0d 100644 (file)
@@ -433,6 +433,24 @@ namespace MonoTests.Microsoft.Build.Tasks {
                        Assert.AreEqual (String.Empty, c2.ToString (), "A2");
                }
 
+               [Test]
+               public void TestReferencesAlias ()
+               {
+                       CscExtended csc = new CscExtended ();
+                       CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
+                       CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();
+
+                       TaskItem ti1 = new TaskItem ("A");
+                       ti1.SetMetadata ("Aliases", "r1,global,r2");
+
+                       csc.References = new ITaskItem[2] { ti1, new TaskItem ("B") };
+                       csc.ARFC (c1);
+                       csc.ACLC (c2);
+
+                       Assert.AreEqual ("/reference:r1=A /reference:A /reference:r2=A /reference:B", c1.ToString (), "A1");
+                       Assert.AreEqual (String.Empty, c2.ToString (), "A2");
+               }
+
                [Test]
                public void TestResponseFiles ()
                {
index b4c72efa977eb388f111593db3c3fc8a9e0d52f6..f68c6db23ea1b6e0e298fd5610d8da793a23ca3f 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Build.Framework/Microsoft.Build.Framework-net_4_5.csproj">\r
       <Project>{DA3B9FEE-8FBD-4587-B760-65420765256A}</Project>\r
-      <Name>Microsoft.Build.Framework\Microsoft.Build.Framework-net_4_5</Name>\r
+      <Name>Microsoft.Build.Framework-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c50ddf774c0c4f5bfba0319c0f217eedf91f8f25..1a8fac12b7c7c396b3dccb87b97ce000c4cb3183 100644 (file)
@@ -328,8 +328,13 @@ namespace Microsoft.Build.Utilities
                                }
                        }
                }
-               
-               protected void AppendTextUnquoted (string textToAppend)
+
+#if NET_4_0
+               public
+#else
+               protected
+#endif
+               void AppendTextUnquoted (string textToAppend)
                {
                        commandLine.Append (textToAppend);
                }
index 7717a1f9ee0d608fe62350c9225413d29f5f93ef..f3aa310c09b00323c8952f631e32ecd9f0bd9de7 100644 (file)
@@ -190,9 +190,9 @@ namespace Microsoft.Build.Utilities
                                                              string targetFrameworkProfile)
                {
                        var path = Path.Combine (xbuildFxDir, targetFrameworkIdentifier);
-                       if (targetFrameworkVersion != null) {
+                       if (!string.IsNullOrEmpty (targetFrameworkVersion)) {
                                path = Path.Combine (path, targetFrameworkVersion);
-                               if (targetFrameworkProfile != null)
+                               if (!string.IsNullOrEmpty (targetFrameworkProfile))
                                        path = Path.Combine (path, "Profile", targetFrameworkProfile);
                        }
                        if (!Directory.Exists (path))
@@ -200,7 +200,6 @@ namespace Microsoft.Build.Utilities
                        var flist = Path.Combine (path, "RedistList", "FrameworkList.xml");
                        if (!File.Exists (flist))
                                return null;
-                       
                        var xml = XmlReader.Create (flist);
                        xml.MoveToContent ();
                        var targetFxDir = xml.GetAttribute ("TargetFrameworkDirectory");
index b1a3758e98012e9862b68bcf0d790ab2040661d5..4e2248a2d48fcba9e145f7ac13231938b0d50b7e 100644 (file)
@@ -2,4 +2,5 @@ Microsoft.Build.Utilities/CommandLineBuilderTest.cs
 Microsoft.Build.Utilities/LoggerTest.cs
 Microsoft.Build.Utilities/TaskItemTest.cs
 Microsoft.Build.Utilities/TaskLoggingHelperTest.cs
+Microsoft.Build.Utilities/ToolLocationHelperTest.cs
 Microsoft.Build.Utilities/ToolTaskTest.cs
diff --git a/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolLocationHelperTest.cs b/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolLocationHelperTest.cs
new file mode 100644 (file)
index 0000000..fbb567d
--- /dev/null
@@ -0,0 +1,21 @@
+#if NET_4_0
+using System;
+using NUnit.Framework;
+using Microsoft.Build.Utilities;
+
+namespace MonoTests.Microsoft.Build.Utilities
+{
+       [TestFixture]
+       public class ToolLocationHelperTest
+       {
+               [Test]
+               [Category ("NotWorking")] // this test needs extra xbuild testing settings, as the target framework path is different.
+               public void GetPathToStandardLibraries ()
+               {
+                       Assert.IsTrue (!string.IsNullOrEmpty (ToolLocationHelper.GetPathToStandardLibraries (".NETFramework", "v4.0", null)), "std path");
+                       Assert.IsTrue (!string.IsNullOrEmpty (ToolLocationHelper.GetPathToStandardLibraries (".NETFramework", "v4.0", string.Empty)), "empty Profile path");
+               }
+       }
+}
+
+#endif
index bd043e993e328fc008818e9d3ca2ed94046f49b3..b35509f52474b274a9d00c566849dac6080f40f3 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_5.csproj">\r
       <Project>{54DFC5A7-7C1D-4BA5-A0F7-F0B312E1E076}</Project>\r
-      <Name>Microsoft.Build.Engine\Microsoft.Build.Engine-net_4_5</Name>\r
+      <Name>Microsoft.Build.Engine-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Build.Framework/Microsoft.Build.Framework-net_4_5.csproj">\r
       <Project>{DA3B9FEE-8FBD-4587-B760-65420765256A}</Project>\r
-      <Name>Microsoft.Build.Framework\Microsoft.Build.Framework-net_4_5</Name>\r
+      <Name>Microsoft.Build.Framework-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index d7d5d77249b84d51a3addaae52efc374236b95fd..c9bcf5cdda457d2088c965ed40352687b90bd87d 100644 (file)
@@ -533,6 +533,8 @@ namespace Microsoft.Build.Construction
                                 var item = CreateItemGroupElement ();
                                 AppendChild (item);
                                 return item;
+                       case "ImportGroup":
+                                return AddImportGroup ();
                         case "Import":
                                 return AddImport (null);
                         case "Target":
index 4c7766573345d4e87e62c1ea0c32f4a3a88440d4..4170fa00253e29343e428b1e8bcd9534e5b8ca7c 100644 (file)
@@ -494,6 +494,11 @@ namespace Microsoft.Build.Evaluation
                                });
                        yield return create ("MSBuildToolsPath", () => toolset.ToolsPath);
                        yield return create ("MSBuildToolsVersion", () => toolset.ToolsVersion);
+
+                       // This is an implementation specific special property for this Microsoft.Build.dll to differentiate
+                       // the build from Microsoft.Build.Engine.dll. It is significantly used in some *.targets file we share
+                       // between old and new build engine.
+                       yield return create ("MonoUseMicrosoftBuildDll", () => "True");
                }
                
                // These are required for reserved property, represents dynamically changing property values.
index cb6badde216a5e527227485786bdaf11c1d7c2b8..00d9802134c05a47e92b9b9ebe35938ed2918bdc 100644 (file)
@@ -164,7 +164,7 @@ namespace Microsoft.Build.Execution
                                // FIXME: this is kind of workaround for unavoidable issue that PLATFORM=* is actually given
                                // on some platforms and that prevents setting default "PLATFORM=AnyCPU" property.
                                if (!string.Equals ("PLATFORM", (string) p.Key, StringComparison.OrdinalIgnoreCase))
-                                       this.properties [(string) p.Key] = new ProjectPropertyInstance ((string) p.Key, false, (string) p.Value);
+                                       this.properties [(string) p.Key] = new ProjectPropertyInstance ((string) p.Key, true, (string) p.Value);
                        foreach (var p in global_properties)
                                this.properties [p.Key] = new ProjectPropertyInstance (p.Key, false, p.Value);
                        var tools = projects.GetToolset (tools_version) ?? projects.GetToolset (projects.DefaultToolsVersion);
@@ -256,7 +256,7 @@ namespace Microsoft.Build.Execution
 
                void EvaluateItems (ProjectRootElement xml, IEnumerable<ProjectElement> elements)
                {
-                       foreach (var child in elements) {
+                       foreach (var child in elements.Reverse ()) {
                                var ige = child as ProjectItemGroupElement;
                                if (ige != null) {
                                        foreach (var p in ige.Items) {
@@ -435,6 +435,7 @@ namespace Microsoft.Build.Execution
                        var parameters = new BuildParameters (projects) {
                                ForwardingLoggers = remoteLoggers,
                                Loggers = loggers,
+                               DefaultToolsVersion = projects.DefaultToolsVersion,
                        };
                        var requestData = new BuildRequestData (this, targets ?? DefaultTargets.ToArray ());
                        var result = manager.Build (parameters, requestData);
index 4540fa0f31245f2bc87a32d079f58153c59bd94c..4dc8b32c94dd1859634ea69cfadc238bdc8300cb 100644 (file)
@@ -37,6 +37,7 @@ using Microsoft.Build.Exceptions;
 using System.Globalization;
 using Microsoft.Build.Construction;
 using Microsoft.Build.Internal.Expressions;
+using System.Xml;
 
 namespace Microsoft.Build.Internal
 {
@@ -121,17 +122,23 @@ namespace Microsoft.Build.Internal
                        
                        try {
                                
-                               var initialPropertiesFormatted = "Initial Properties:\n" + string.Join (Environment.NewLine, project.Properties.OrderBy (p => p.Name).Select (p => string.Format ("{0} = {1}", p.Name, p.EvaluatedValue)).ToArray ());
-                               LogMessageEvent (new BuildMessageEventArgs (initialPropertiesFormatted, null, null, MessageImportance.Low));
+                               var initialGlobalPropertiesFormatted = "Initial Global Properties:\n" + string.Join (Environment.NewLine, project.Properties.OrderBy (p => p.Name).Where (p => p.IsImmutable).Select (p => string.Format ("{0} = {1}", p.Name, p.EvaluatedValue)).ToArray ());
+                               LogMessageEvent (new BuildMessageEventArgs (initialGlobalPropertiesFormatted, null, null, MessageImportance.Low));
+                               var initialProjectPropertiesFormatted = "Initial Project Properties:\n" + string.Join (Environment.NewLine, project.Properties.OrderBy (p => p.Name).Where (p => !p.IsImmutable).Select (p => string.Format ("{0} = {1}", p.Name, p.EvaluatedValue)).ToArray ());
+                               LogMessageEvent (new BuildMessageEventArgs (initialProjectPropertiesFormatted, null, null, MessageImportance.Low));
                                var initialItemsFormatted = "Initial Items:\n" + string.Join (Environment.NewLine, project.Items.OrderBy (i => i.ItemType).Select (i => string.Format ("{0} : {1}", i.ItemType, i.EvaluatedInclude)).ToArray ());
                                LogMessageEvent (new BuildMessageEventArgs (initialItemsFormatted, null, null, MessageImportance.Low));
                                
                                // null targets -> success. empty targets -> success(!)
+                               foreach (var targetName in (request.ProjectInstance.InitialTargets).Where (t => t != null))
+                                       BuildTargetByName (targetName, args);
                                if (request.TargetNames == null)
-                                       args.Result.OverallResult = BuildResultCode.Success;
+                                       args.Result.OverallResult = args.CheckCancel () ? BuildResultCode.Failure : args.Result.ResultsByTarget.Any (p => p.Value.ResultCode == TargetResultCode.Failure) ? BuildResultCode.Failure : BuildResultCode.Success;
                                else {
-                                       foreach (var targetName in (args.TargetNames ?? request.TargetNames).Where (t => t != null))
-                                               BuildTargetByName (targetName, args);
+                                       foreach (var targetName in (args.TargetNames ?? request.TargetNames).Where (t => t != null)) {
+                                               if (!BuildTargetByName (targetName, args))
+                                                       break;
+                                       }
                        
                                        // FIXME: check .NET behavior, whether cancellation always results in failure.
                                        args.Result.OverallResult = args.CheckCancel () ? BuildResultCode.Failure : args.Result.ResultsByTarget.Any (p => p.Value.ResultCode == TargetResultCode.Failure) ? BuildResultCode.Failure : BuildResultCode.Success;
@@ -253,6 +260,7 @@ namespace Microsoft.Build.Internal
                                                        var value = args.Project.ExpandString (p.Value);
                                                        project.SetProperty (p.Name, value);
                                                }
+                                               continue;
                                        }
 
                                        var ii = child as ProjectItemGroupTaskInstance;
@@ -264,6 +272,7 @@ namespace Microsoft.Build.Internal
                                                                continue;
                                                        project.AddItem (item.ItemType, project.ExpandString (item.Include));
                                                }
+                                               continue;
                                        }
                                        
                                        var task = child as ProjectTaskInstance;
@@ -275,7 +284,14 @@ namespace Microsoft.Build.Internal
                                                }
                                                if (!RunBuildTask (target, task, targetResult, args))
                                                        return false;
+                                               continue;
                                        }
+
+                                       var onError = child as ProjectOnErrorInstance;
+                                       if (onError != null)
+                                               continue; // evaluated under catch clause.
+
+                                       throw new NotSupportedException (string.Format ("Unexpected Target element children \"{0}\"", child.GetType ()));
                                }
                        } catch (Exception ex) {
                                // fallback task specified by OnError element
@@ -452,7 +468,7 @@ namespace Microsoft.Build.Internal
                        }
                        public void SetMetadataValueLiteral (string metadataName, string metadataValue)
                        {
-                               metadata [metadataName] = ProjectCollection.Unescape (metadataValue);
+                               metadata [metadataName] = WindowsCompatibilityExtensions.NormalizeFilePath (ProjectCollection.Unescape (metadataValue));
                        }
                        public IDictionary CloneCustomMetadataEscaped ()
                        {
@@ -490,7 +506,7 @@ namespace Microsoft.Build.Internal
                        }
                        public void SetMetadata (string metadataName, string metadataValue)
                        {
-                               metadata [metadataName] = metadataValue;
+                               metadata [metadataName] = WindowsCompatibilityExtensions.NormalizeFilePath (metadataValue);
                        }
                        public string ItemSpec { get; set; }
                        public int MetadataCount {
@@ -574,13 +590,16 @@ namespace Microsoft.Build.Internal
                // To NOT reuse this IBuildEngine instance for different build, we create another BuildManager and BuildSubmisson and then run it.
                public bool BuildProjectFile (string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs, string toolsVersion)
                {
+                       toolsVersion = string.IsNullOrEmpty (toolsVersion) ? project.ToolsVersion : toolsVersion;
                        var globalPropertiesThatMakeSense = new Dictionary<string,string> ();
                        foreach (DictionaryEntry p in globalProperties)
                                globalPropertiesThatMakeSense [(string) p.Key] = (string) p.Value;
-                       var result = new BuildManager ().Build (this.submission.BuildManager.OngoingBuildParameters.Clone (), new BuildRequestData (projectFileName, globalPropertiesThatMakeSense, toolsVersion, targetNames, null));
-                       foreach (var p in result.ResultsByTarget)
-                               targetOutputs [p.Key] = p.Value.Items;
-                       return result.OverallResult == BuildResultCode.Success;
+                       var projectToBuild = new ProjectInstance (ProjectRootElement.Create (XmlReader.Create (projectFileName)), globalPropertiesThatMakeSense, toolsVersion, Projects);
+                       IDictionary<string,TargetResult> outs;
+                       var ret = projectToBuild.Build (targetNames ?? new string [] {"Build"}, Projects.Loggers, out outs);
+                       foreach (var p in outs)
+                               targetOutputs [p.Key] = p.Value.Items ?? new ITaskItem [0];
+                       return ret;
                }
 
                public bool BuildProjectFilesInParallel (string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IDictionary[] targetOutputsPerProject, string[] toolsVersion, bool useResultsCache, bool unloadProjectsOnCompletion)
index 587db74962197a4ec4e43b7a99f8e7e0df9e3241..6cd0b1670e2b26e1605d448fbfe7ead97fbf6f27 100644 (file)
@@ -212,6 +212,16 @@ namespace Microsoft.Build.Internal.Expressions
                        get { return string.Format ("%([{0}].[{1}])", ItemType, Metadata); }
                }
        }
+
+       partial class QuotedExpression : Expression
+       {
+               public char QuoteChar { get; set; }
+               public ExpressionList Contents { get; set; }
+
+               public override string ExpressionString {
+                       get { return QuoteChar + string.Concat (Contents.Select (e => e.ExpressionString)).Replace (QuoteChar.ToString (), "\\" + QuoteChar) + QuoteChar; }
+               }
+       }
        
        partial class StringLiteral : Expression
        {
index 696447c88422330b3940241aee66b08dda60910c..7fbd1cf5542ac6b9cc64bbce8c75feec9168041b 100644 (file)
@@ -346,12 +346,12 @@ namespace Microsoft.Build.Internal.Expressions
                                                var args = Access.Arguments.Select (e => e.EvaluateAsObject (context)).ToArray ();
                                                var method = FindMethod (type, Access.Name.Name, args);
                                                if (method == null)
-                                                       throw new InvalidProjectFileException (Location, string.Format ("access to undefined static method '{0}' of '{1}' at {2}", Access.Name.Name, Access.Target.EvaluateAsString (context), Location));
+                                                       throw new InvalidProjectFileException (Location, string.Format ("access to undefined static method '{0}' of '{1}' at {2}", Access.Name.Name, type, Location));
                                                return method.Invoke (null, AdjustArgsForCall (method, args));
                                        } else {
                                                var prop = type.GetProperty (Access.Name.Name);
                                                if (prop == null)
-                                                       throw new InvalidProjectFileException (Location, string.Format ("access to undefined static property '{0}' of '{1}' at {2}", Access.Name.Name, Access.Target.EvaluateAsString (context), Location));
+                                                       throw new InvalidProjectFileException (Location, string.Format ("access to undefined static property '{0}' of '{1}' at {2}", Access.Name.Name, type, Location));
                                                return prop.GetValue (null, null);
                                        }
                                }
@@ -491,6 +491,30 @@ namespace Microsoft.Build.Internal.Expressions
                        return EvaluateAsString (context);
                }
        }
+
+       partial class QuotedExpression : Expression
+       {
+               public override string EvaluateAsString (EvaluationContext context)
+               {
+                       return QuoteChar + EvaluateAsStringWithoutQuote (context) + QuoteChar;
+               }
+
+               public string EvaluateAsStringWithoutQuote (EvaluationContext context)
+               {
+                       return string.Concat (Contents.Select (e => e.EvaluateAsString (context)));
+               }
+
+               public override bool EvaluateAsBoolean (EvaluationContext context)
+               {
+                       var ret = EvaluateAsStringWithoutQuote (context);
+                       return EvaluateStringAsBoolean (context, ret);
+               }
+
+               public override object EvaluateAsObject (EvaluationContext context)
+               {
+                       return EvaluateAsStringWithoutQuote (context);
+               }
+       }
        
        partial class FunctionCallExpression : Expression
        {
index a8c7dc4d61d94660b3788d06d8d021366dc0627c..73bac64445e11fa5b98bf225bc1d56867c3fb7c8 100644 (file)
@@ -60,14 +60,13 @@ namespace Microsoft.Build.Internal.Expressions
                        while (start < end) {
                                int bak = start;
                                ret.Add (ParseSingle (ref start, end));
-                               SkipSpaces (ref start);
                                if (bak == start)
                                        throw new Exception ("Parser failed to progress token position: " + source);
                        }
                        return ret;
                }
                
-               static readonly char [] token_starters = "$@%(),".ToCharArray ();
+               static readonly char [] token_starters = "$@%(),'\"".ToCharArray ();
                
                Expression ParseSingle (ref int start, int end)
                {
@@ -101,7 +100,23 @@ namespace Microsoft.Build.Internal.Expressions
                                        ret = EvaluateItemExpression (start, last);
                                start = last + 1;
                                return ret;
-                               
+                       
+                       case '\'':
+                       case '"':
+                               var quoteChar = source [start];
+                               start++;
+                               last = FindMatchingCloseQuote (quoteChar, start, end);
+                               if (last < 0) {
+                                       if (validation_type == ExpressionValidationType.StrictBoolean)
+                                               throw new InvalidProjectFileException (string.Format ("expression did not have matching ')' since index {0} in \"{1}\"", start, source));
+                                       else {
+                                               start--;
+                                               goto default; // treat as raw literal to the section end
+                                       }
+                               }
+                               ret = new QuotedExpression () { QuoteChar = quoteChar, Contents = Parse (start, last) };
+                               start = last + 1;
+                               return ret;
                        // Below (until default) are important only for Condition evaluation
                        case '(':
                                if (validation_type == ExpressionValidationType.LaxString)
@@ -134,7 +149,7 @@ namespace Microsoft.Build.Internal.Expressions
                                return ret;
                        }
                }
-               
+
                int FindMatchingCloseParen (int start, int end)
                {
                        int n = 0;
@@ -148,7 +163,21 @@ namespace Microsoft.Build.Internal.Expressions
                        }
                        return -1; // invalid
                }
-               
+
+               int FindMatchingCloseQuote (char quote, int start, int end)
+               {
+                       int n = 0;
+                       for (int i = start; i < end; i++) {
+                               if (i < end + 1 && source [i] == '\\' && (source [i + 1] == quote || source [i + 1] == '\\'))
+                                       n += 2;
+                               else if (source [i] == quote) {
+                                       if (n-- == 0)
+                                               return i;
+                               }
+                       }
+                       return -1; // invalid
+               }
+
                static readonly string spaces = " \t\r\n";
                
                void SkipSpaces (ref int start)
@@ -166,6 +195,7 @@ namespace Microsoft.Build.Internal.Expressions
                                // property access without member specification
                                int parenAt = source.IndexOf ('(', start, end - start);
                                string name = parenAt < 0 ? source.Substring (start, end - start) : source.Substring (start, parenAt - start);
+                               name = name.Trim ();
                                var access = new PropertyAccess () {
                                        Name = new NameToken () { Name = name },
                                        TargetType = PropertyTargetType.Object
@@ -181,6 +211,7 @@ namespace Microsoft.Build.Internal.Expressions
                                int mstart = dotAt + 1;
                                int parenAt = source.IndexOf ('(', mstart, end - mstart);
                                string name = parenAt < 0 ? source.Substring (mstart, end - mstart) : source.Substring (mstart, parenAt - mstart);
+                               name = name.Trim ();
                                var access = new PropertyAccess () {
                                        Name = new NameToken () { Name = name },
                                        TargetType = PropertyTargetType.Object,
@@ -196,10 +227,11 @@ namespace Microsoft.Build.Internal.Expressions
                                string type = source.Substring (start, colonsAt - start);
                                if (type.Length < 2 || type [0] != '[' || type [type.Length - 1] != ']')
                                        throw new InvalidProjectFileException (string.Format ("Static function call misses appropriate type name surrounded by '[' and ']' at {0} in \"{1}\"", start, source));
-                               type = type.Substring (1, type.Length - 2);
+                               type = type.Substring (1, type.Length - 2).Trim ();
                                start = colonsAt + 2;
                                int parenAt = source.IndexOf ('(', start, end - start);
                                string member = parenAt < 0 ? source.Substring (start, end - start) : source.Substring (start, parenAt - start);
+                               member = member.Trim ();
                                if (member.Length == 0)
                                        throw new InvalidProjectFileException ("Static member name is missing");
                                var access = new PropertyAccess () {
@@ -228,6 +260,7 @@ namespace Microsoft.Build.Internal.Expressions
                                        if (source [start] != ',')
                                                throw new InvalidProjectFileException (string.Format ("invalid function call arguments specification. ',' is expected, got '{0}'", source [start]));
                                        start++;
+                                       SkipSpaces (ref start);
                                }
                                args.Add (ParseSingle (ref start, end));
                        } while (true);
index 700a41663d3b77777c48d5fc8408383a625bab50..2430ecce09e216623f78c3ce002958c1000117b1 100644 (file)
@@ -40,6 +40,10 @@ namespace MonoTests.Microsoft.Build.Evaluation
        public class ProjectCollectionTest
        {
                [Test]
+#if NET_4_0
+               // BXC #20961
+               [Category ("NotWorking")]
+#endif
                public void GlobalProperties ()
                {
                        var g = ProjectCollection.GlobalProjectCollection;
index ed81f8155d20254955d95e0075c83a14c0b029ce..f5f880a0b5f144386569be2c7c4d434448d19068 100644 (file)
@@ -173,6 +173,10 @@ namespace MonoTests.Microsoft.Build.Evaluation
                }
                
                [Test]
+#if NET_4_0
+               // BXC #20961
+               [Category ("NotWorking")]
+#endif
                public void BuildCSharpTargetBuild ()
                {
             string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
@@ -254,6 +258,10 @@ namespace MonoTests.Microsoft.Build.Evaluation
                }
                
                [Test]
+#if NET_4_0
+               // BXC #20961
+               [Category ("NotWorking")]
+#endif
                public void CreateProjectInstance ()
                {
             string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
@@ -270,6 +278,10 @@ namespace MonoTests.Microsoft.Build.Evaluation
                }
                
                [Test]
+#if NET_4_0
+               // BXC #20961
+               [Category ("NotWorking")]
+#endif
                public void LoadCaseInsensitive ()
                {
             string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
index 44157a84444609638e8a2cdd30acbc9949d64d76..30524ffd278796c7ef394688d75ba8aa7a133af4 100644 (file)
@@ -291,6 +291,56 @@ namespace MonoTests.Microsoft.Build.Execution
                        Assert.IsNotNull (p, "#1");
                        Assert.AreEqual ("False", p.EvaluatedValue, "#2");
                }
+
+               [Test]
+               public void ConditionalExpression ()
+               {
+                       string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+       <PropertyGroup>
+               <NoCompilerStandardLib>true</NoCompilerStandardLib>
+                <ResolveAssemblyReferencesDependsOn>$(ResolveAssemblyReferencesDependsOn);_AddCorlibReference</ResolveAssemblyReferencesDependsOn>
+        </PropertyGroup>
+</Project>";
+                       var xml = XmlReader.Create (new StringReader (project_xml));
+                       var root = ProjectRootElement.Create (xml);
+                       root.FullPath = "ProjectInstanceTest.ConditionalExpression.proj";
+                       var proj = new ProjectInstance (root);
+                       var p = proj.GetProperty ("ResolveAssemblyReferencesDependsOn");
+                       Assert.IsNotNull (p, "#1");
+                       Assert.AreEqual (";_AddCorlibReference", p.EvaluatedValue, "#2");
+               }
+
+               [Test]
+               [Category ("NotWorking")] // until we figure out why it fails on wrench.
+               public void ItemsInTargets ()
+               {
+                       string project_xml = @"<Project DefaultTargets='Default' xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+       <Target Name='Default'>
+               <PropertyGroup>
+                       <_ExplicitMSCorlibPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll</_ExplicitMSCorlibPath>
+               </PropertyGroup>
+               <ItemGroup>
+                       <_ExplicitReference
+                               Include='$(_ExplicitMSCorlibPath)'
+                               Condition='Exists($(_ExplicitMSCorlibPath))'>
+                               <Private>false</Private>
+                       </_ExplicitReference>
+               </ItemGroup>
+       </Target>
+       <Import Project='$(MSBuildBinPath)\\Microsoft.CSharp.targets' />
+</Project>";
+                       var xml = XmlReader.Create (new StringReader (project_xml));
+                       var root = ProjectRootElement.Create (xml);
+                       root.FullPath = "ProjectInstanceTest.ConditionalExpression.proj";
+                       var proj = new ProjectInstance (root, null, "4.0", ProjectCollection.GlobalProjectCollection);
+                       proj.Build ();
+                       // make sure the property value expansion is done successfully.
+                       Assert.IsTrue (!string.IsNullOrEmpty (proj.GetPropertyValue ("_ExplicitMSCorlibPath")), "premise: propertyValue by ToolLocationHelper func call");
+                       var items = proj.GetItems ("_ExplicitReference");
+                       // make sure items are stored after build.
+                       Assert.IsTrue (items.Any (), "items.Any");
+                       Assert.IsTrue (!string.IsNullOrEmpty (items.First ().EvaluatedInclude), "item.EvaluatedInclude");
+               }
        }
        
        namespace SubNamespace
index ebd662e249f2c9432fd597943e2d57ce6b63aa5d..16694f762259e988ad895a1025af0578f29fbef7 100644 (file)
@@ -335,6 +335,22 @@ namespace MonoTests.Microsoft.Build.Internal
                        var result = p.Build (new ILogger [] { new ConsoleLogger (LoggerVerbosity.Minimal, sw.WriteLine, null, null)});
                        Assert.IsTrue (result, "#1: " + sw);
                }
+
+               [Test]
+               public void FunctionCall ()
+               {
+                       string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+  <Target Name='Foo'>
+    <Warning Text=""$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll'"" />
+  </Target>
+</Project>";
+                       var xml = XmlReader.Create (new StringReader (project_xml));
+                       var root = ProjectRootElement.Create (xml);
+                       var p = new ProjectInstance (root, null, "4.0", ProjectCollection.GlobalProjectCollection);
+                       var sw = new StringWriter ();
+                       var result = p.Build (new ILogger [] { new ConsoleLogger (LoggerVerbosity.Minimal, sw.WriteLine, null, null)});
+                       Assert.IsTrue (result, "#1: " + sw);
+               }
        }
 }
 
index 38006848872ca74d049901d12780664f93b254c4..36f0ad6dbba0c061ce9f8a1b25dff847e5b88456 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.CSharp/Mono.CSharp-net_4_5.csproj">\r
       <Project>{811AC316-9CC2-497D-A45E-7B6B1E0E481B}</Project>\r
-      <Name>Mono.CSharp\Mono.CSharp-net_4_5</Name>\r
+      <Name>Mono.CSharp-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 6014172763413aa97180bca1f3c89857bda826a4..fdc3b194187581f48189bd1261a50b8e3aebf1bd 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index a840d891af82fb1bd2ff70bd2d804ea7d8c3618a..2077c59c4ff0d1cc2fa54ad5706d30ab95dc4150 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 270d7a4b83b2fdc7412f02d006df0c91c4b319d5..a4783febcaa27f38f02f6b992816b1af7597e3aa 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 9fb2df1c2c8cb6ea9e69eb243833f082d43cc272..c3cdc5974a0fd5d11fb9edb5c3a773f150ff4db2 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index bd0167efbf026ec84cb9d7125973fc78d5f0f85b..970aa33443d459a23509d782e18ede555c9b8ab1 100644 (file)
@@ -98,5 +98,13 @@ namespace MonoTests.EvaluatorTest
                        Evaluator.Run ("struct B { public string foo; public int bar; }");
                        Evaluator.Run ("B aStruct = new B { foo = \"foo\", bar = 1 };");
                }
+
+               [Test]
+               public void NestedType ()
+               {
+                       Evaluator.Run ("class A { class B { } }");
+                       Evaluator.Run ("var x = new A ();");
+
+               }
        }
 }
\ No newline at end of file
index 116f8fed010852b28272d33552e15b2488eb51f2..7781cfdbf7593dc0a2e5fdc4e02c2dcc8b426bb8 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1eff46c1ec19e6c177469166a5e07290c456db03..57cb86cd8b0e855c9f6ee28749240cd5e39766c0 100644 (file)
@@ -161,10 +161,10 @@ namespace Cairo {
                        }
                }
 
-               [Obsolete ("Use SetSourceRGBA method")]
+               [Obsolete ("Use SetSourceColor method")]
                public Color Color {
                        set {
-                               NativeMethods.cairo_set_source_rgba (handle, value.R, value.G, value.B, value.A);
+                               SetSourceColor (value);
                        }
                }
 
@@ -280,6 +280,12 @@ namespace Cairo {
                        }
                }
 
+               public bool HasCurrentPoint {
+                       get {
+                               return NativeMethods.cairo_has_current_point (handle);
+                       }
+               }
+
                [Obsolete ("Use GetTarget/SetTarget")]
                public Cairo.Surface Target {
                        set {
@@ -331,6 +337,11 @@ namespace Cairo {
                        get { return NativeMethods.cairo_get_reference_count (handle); }
                }
 
+               public void SetSourceColor (Color color)
+               {
+                       NativeMethods.cairo_set_source_rgba (handle, color.R, color.G, color.B, color.A);
+               }
+
                public void SetSourceRGB (double r, double g, double b)
                {
                        NativeMethods.cairo_set_source_rgb (handle, r, g, b);
@@ -548,6 +559,11 @@ namespace Cairo {
                        NativeMethods.cairo_reset_clip (handle);
                }
 
+               public bool InClip (double x, double y)
+               {
+                       return NativeMethods.cairo_in_clip (handle, x, y);
+               }
+
                public bool InStroke (double x, double y)
                {
                        return NativeMethods.cairo_in_stroke (handle, x, y);
index c53f0009c0019c37312a8f0bc1517fc60665ee71..8509c6db25f03d121ce15aab46d36f870955f792 100644 (file)
@@ -258,6 +258,10 @@ namespace Cairo
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_glyph_path (IntPtr cr, IntPtr glyphs, int num_glyphs);
                
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               [return: MarshalAs (UnmanagedType.U1)]
+               internal static extern bool cairo_has_current_point (IntPtr cr);
+
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_identity_matrix (IntPtr cr);
                
@@ -292,6 +296,10 @@ namespace Cairo
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern int cairo_image_surface_get_width  (IntPtr surface);
 
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               [return: MarshalAs (UnmanagedType.U1)]
+               internal static extern bool cairo_in_clip (IntPtr cr, double x, double y);
+
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                [return: MarshalAs (UnmanagedType.U1)]
                internal static extern bool cairo_in_fill (IntPtr cr, double x, double y);
index 558d6dcd1cef2e4d40a2df4cf9843ff368592ae2..8c1b0c48e5ab10cd6b7b335d65335ecdff5ce600 100644 (file)
     <AssemblyName>Mono.Cecil.Mdb</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../mono.snk</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Cecil/Mono.Cecil-net_4_5.csproj">\r
       <Project>{F6DD456E-ADE4-419D-997F-41ECA0CE79F7}</Project>\r
-      <Name>Mono.Cecil\Mono.Cecil-net_4_5</Name>\r
+      <Name>Mono.Cecil-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 69e43221eb5ff99617c9c8fbdf89b47dcd69389c..5810015d5b98ccb2c3a4c737a29229c58bd9fd30 100644 (file)
     <AssemblyName>Mono.Cecil</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../mono.snk</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 3bbef32483608446191ad697fefc815de83c555d..7f50fed785f370836a6b43a407d5609122f88bf8 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Cecil/Mono.Cecil-net_4_5.csproj">\r
       <Project>{F6DD456E-ADE4-419D-997F-41ECA0CE79F7}</Project>\r
-      <Name>Mono.Cecil\Mono.Cecil-net_4_5</Name>\r
+      <Name>Mono.Cecil-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Cecil.Mdb/Mono.Cecil.Mdb-net_4_5.csproj">\r
       <Project>{9ABB7BB9-5EA1-4081-B205-5658A602C1F5}</Project>\r
-      <Name>Mono.Cecil.Mdb\Mono.Cecil.Mdb-net_4_5</Name>\r
+      <Name>Mono.Cecil.Mdb-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 3155074eb5b879140773043c43f8659cdc4f7b3c..5c2bd0b31361e1dfedc61b4c62d35dabfa4b477f 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 8dca41b2659885eb98a620d241ad29067b7f22fa..226f6e668101fdadb2fb681f5a3c34e342a1e8db 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Transactions/System.Transactions-net_4_5.csproj">\r
       <Project>{AF2BBF50-AB57-4CA1-8EF5-2B54C7418434}</Project>\r
-      <Name>System.Transactions\System.Transactions-net_4_5</Name>\r
+      <Name>System.Transactions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 567d6bc1bfb58c935fe7b5a4088ad193ba46e25a..d2ef1f6316506238873624a00af6f19eea7c7ec1 100644 (file)
@@ -652,11 +652,37 @@ namespace Mono.Data.Sqlite
       return UnsafeNativeMethods.sqlite3_aggregate_count(context);\r
     }\r
 \r
+#if MONOTOUCH\r
+    class FunctionData {\r
+      public SQLiteCallback Func;\r
+      public SQLiteCallback FuncStep;\r
+      public SQLiteFinalCallback FuncFinal;\r
+    }\r
+#endif\r
+\r
     internal override void CreateFunction(string strFunction, int nArgs, bool needCollSeq, SQLiteCallback func, SQLiteCallback funcstep, SQLiteFinalCallback funcfinal)\r
     {\r
       int n;\r
 \r
-#if !SQLITE_STANDARD\r
+#if MONOTOUCH\r
+      var data = new FunctionData();\r
+      data.Func = func;\r
+      data.FuncStep = funcstep;\r
+      data.FuncFinal = funcfinal;\r
+      SQLiteCallback func_callback = func == null ? null : new SQLiteCallback(scalar_callback);\r
+      SQLiteCallback funcstep_callback = funcstep == null ? null : new SQLiteCallback(step_callback);\r
+      SQLiteFinalCallback funcfinal_callback = funcfinal == null ? null : new SQLiteFinalCallback(final_callback);\r
+\r
+      IntPtr user_data;\r
+      user_data = GCHandle.ToIntPtr(GCHandle.Alloc(data));\r
+      n = UnsafeNativeMethods.sqlite3_create_function_v2(_sql, ToUTF8(strFunction), nArgs, 4, user_data, func_callback, funcstep_callback, funcfinal_callback, destroy_callback);\r
+\r
+      if (n == 0) {\r
+        // sqlite3_create_function_v2 will call 'destroy_callback' if it fails, so we need to recreate the gchandle here.\r
+        user_data = GCHandle.ToIntPtr(GCHandle.Alloc(data));\r
+        n = UnsafeNativeMethods.sqlite3_create_function_v2(_sql, ToUTF8(strFunction), nArgs, 1, user_data, func_callback, funcstep_callback, funcfinal_callback, destroy_callback);\r
+      }\r
+#elif !SQLITE_STANDARD\r
       n = UnsafeNativeMethods.sqlite3_create_function_interop(_sql, ToUTF8(strFunction), nArgs, 4, IntPtr.Zero, func, funcstep, funcfinal, (needCollSeq == true) ? 1 : 0);\r
       if (n == 0) n = UnsafeNativeMethods.sqlite3_create_function_interop(_sql, ToUTF8(strFunction), nArgs, 1, IntPtr.Zero, func, funcstep, funcfinal, (needCollSeq == true) ? 1 : 0);\r
 #else\r
@@ -673,6 +699,38 @@ namespace Mono.Data.Sqlite
       if (n > 0) throw new SqliteException(n, SQLiteLastError());\r
     }\r
 \r
+#if MONOTOUCH\r
+    [MonoTouch.MonoPInvokeCallback(typeof(SQLiteCallback))]\r
+    internal static void scalar_callback(IntPtr context, int nArgs, IntPtr argsptr)\r
+    {\r
+      var handle = GCHandle.FromIntPtr (UnsafeNativeMethods.sqlite3_user_data(context));\r
+      var func = (FunctionData)handle.Target;\r
+      func.Func(context, nArgs, argsptr);\r
+    }\r
+\r
+    [MonoTouch.MonoPInvokeCallback(typeof(SQLiteCallback))]\r
+    internal static void step_callback(IntPtr context, int nArgs, IntPtr argsptr)\r
+    {\r
+      var handle = GCHandle.FromIntPtr(UnsafeNativeMethods.sqlite3_user_data(context));\r
+      var func = (FunctionData)handle.Target;\r
+      func.FuncStep(context, nArgs, argsptr);\r
+    }\r
+\r
+    [MonoTouch.MonoPInvokeCallback(typeof(SQLiteFinalCallback))]\r
+    internal static void final_callback(IntPtr context)\r
+    {\r
+      var handle = GCHandle.FromIntPtr(UnsafeNativeMethods.sqlite3_user_data(context));\r
+      var func = (FunctionData)handle.Target;\r
+      func.FuncFinal(context);\r
+    }\r
+\r
+    [MonoTouch.MonoPInvokeCallback(typeof(SQLiteFinalCallback))]\r
+    internal static void destroy_callback(IntPtr context)\r
+    {\r
+      GCHandle.FromIntPtr(context).Free();\r
+    }\r
+#endif\r
+\r
     internal override int ContextCollateCompare(CollationEncodingEnum enc, IntPtr context, string s1, string s2)\r
     {\r
 #if !SQLITE_STANDARD\r
index 7e5c153906d13553975c0d4fa4cd8a6ee5bea346..bde7bdeb3dafee0e39a050753dff01fdc5887be8 100644 (file)
@@ -141,6 +141,13 @@ namespace Mono.Data.Sqlite
 #endif\r
     internal static extern int sqlite3_create_function(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal);\r
 \r
+#if !PLATFORM_COMPACTFRAMEWORK\r
+               [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
+#else\r
+               [DllImport(SQLITE_DLL)]\r
+#endif\r
+               internal static extern int sqlite3_create_function_v2(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal, SQLiteFinalCallback fdestroy);\r
+\r
 #if !PLATFORM_COMPACTFRAMEWORK\r
     [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
 #else\r
@@ -692,7 +699,14 @@ namespace Mono.Data.Sqlite
     [DllImport(SQLITE_DLL)]\r
 #endif\r
     internal static extern int sqlite3_config (SQLiteConfig config);\r
-               \r
+\r
+#if !PLATFORM_COMPACTFRAMEWORK\r
+               [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
+#else\r
+               [DllImport(SQLITE_DLL)]\r
+#endif\r
+               internal static extern IntPtr sqlite3_user_data (IntPtr context);\r
+\r
 #if !PLATFORM_COMPACTFRAMEWORK\r
     [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]\r
 #else\r
index 55038e926fcc51b6dd6842363f0dfd436655eecd..294a591a81c23c74947a2f5606ef8a89fb2993b1 100644 (file)
@@ -43,5 +43,27 @@ namespace MonoTests.Mono.Data.Sqlite
                                return string.Compare (param1, param2);
                        }
                }
+
+               [SqliteFunction(Name = "TestScalar", FuncType = FunctionType.Scalar)]
+               public class TestScalar : SqliteFunction
+               {
+                       public override object Invoke (object[] args)
+                       {
+                               return null;
+                       }
+               }
+
+               [SqliteFunction(Name = "TestAggregate", FuncType = FunctionType.Aggregate)]
+               public class TestAggregate : SqliteFunction
+               {
+                       public override void Step(object[] args, int stepNumber, ref object contextData)
+                       {
+                       }
+
+                       public override object Final (object contextData)
+                       {
+                               return null;
+                       }
+               }
        }
 }
index 4d8ab1edf1f34fb3a8c84c7a9ea3973e85343659..d54e8b0c829f2ef9e3a779e24947efc0d08afa3e 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 57e2b054b131b37aaa199943227d0bc840a2865d..1c4dd2792a7ff8f0fcc29eda6d231ac2c7daa429 100644 (file)
@@ -8,6 +8,11 @@ LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:Mono.Cecil.dll /r:System.Core.dll
 
 TEST_MCS_FLAGS = /r:Mono.Cecil.dll /r:System.dll /r:System.Core.dll
 
+VALID_TEST_PROFILE := $(filter net_4_5, $(PROFILE))
+
+# The test exe is not profile specific, and compiling a 2.0 will make the 4.5 tests fail
+ifdef VALID_TEST_PROFILE
+
 test-local: dtest-app.exe dtest-excfilter.exe
 
 dtest-app.exe: Test/dtest-app.cs
@@ -16,6 +21,13 @@ dtest-app.exe: Test/dtest-app.cs
 dtest-excfilter.exe: Test/dtest-excfilter.il
        MONO_PATH=$(topdir)/class/lib/$(PROFILE) $(INTERNAL_ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
 
+else
+
+NO_TEST=1
+check:
+
+endif
+
 CLEAN_FILES = dtest-app.exe dtest-app.exe.mdb dtest-excfilter.exe dtest-excfilter.exe.mdb
 
 EXTRA_DISTFILES = \
index 083c66e6e9a5dbc812acb5272855b5241731061d..c61490cd1a5afd0bfa47b4474a3cdb823a812802 100644 (file)
     <AssemblyName>Mono.Debugger.Soft</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../mono.snk</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Cecil/Mono.Cecil-net_4_5.csproj">\r
       <Project>{F6DD456E-ADE4-419D-997F-41ECA0CE79F7}</Project>\r
-      <Name>Mono.Cecil\Mono.Cecil-net_4_5</Name>\r
+      <Name>Mono.Cecil-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 6d196aabbab374ff4ff9f70ce974cd3e7c9210eb..14bf701f46fa8cae6f7082e63c161f91e010a553 100644 (file)
@@ -157,7 +157,9 @@ namespace Mono.Debugger.Soft
        enum InvokeFlags {
                NONE = 0x0,
                DISABLE_BREAKPOINTS = 0x1,
-               SINGLE_THREADED = 0x2
+               SINGLE_THREADED = 0x2,
+               OUT_THIS = 0x4,
+               OUT_ARGS = 0x8,
        }
 
        enum ElementType {
@@ -404,8 +406,7 @@ namespace Mono.Debugger.Soft
 
                static readonly bool EnableConnectionLogging = !String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MONO_SDB_LOG"));
                static int ConnectionId;
-               readonly StreamWriter LoggingStream = EnableConnectionLogging ? 
-                       new StreamWriter (string.Format ("/tmp/sdb_conn_log_{0}", ConnectionId++), false) : null;
+               readonly StreamWriter LoggingStream;
 
                /*
                 * Th version of the wire-protocol implemented by the library. The library
@@ -415,7 +416,7 @@ namespace Mono.Debugger.Soft
                 * with newer runtimes, and vice versa.
                 */
                internal const int MAJOR_VERSION = 2;
-               internal const int MINOR_VERSION = 34;
+               internal const int MINOR_VERSION = 35;
 
                enum WPSuspendPolicy {
                        NONE = 0,
@@ -1068,6 +1069,19 @@ namespace Mono.Debugger.Soft
                        reply_cbs = new Dictionary<int, ReplyCallback> ();
                        reply_cb_counts = new Dictionary<int, int> ();
                        reply_packets_monitor = new Object ();
+                       if (EnableConnectionLogging) {
+                               var path = Environment.GetEnvironmentVariable ("MONO_SDB_LOG");
+                               if (path.Contains ("{0}")) {
+                                       //C:\SomeDir\sdbLog{0}.txt -> C:\SomeDir\sdbLog1.txt
+                                       LoggingStream = new StreamWriter (string.Format (path, ConnectionId++), false);
+                               } else if (Path.HasExtension (path)) {
+                                       //C:\SomeDir\sdbLog.txt -> C:\SomeDir\sdbLog1.txt
+                                       LoggingStream = new StreamWriter (Path.GetDirectoryName (path) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension (path) + ConnectionId++ + "." + Path.GetExtension (path), false);
+                               } else {
+                                       //C:\SomeDir\sdbLog -> C:\SomeDir\sdbLog1
+                                       LoggingStream = new StreamWriter (path + ConnectionId++, false);
+                               }
+                       }
                }
                
                protected abstract int TransportReceive (byte[] buf, int buf_offset, int len);
@@ -1432,18 +1446,18 @@ namespace Mono.Debugger.Soft
                //
                public void StartBuffering () {
                        buffer_packets = true;
-                       if (Version.AtLeast (3, 34))
+                       if (Version.AtLeast (2, 34))
                                VM_StartBuffering ();
                }
 
                public void StopBuffering () {
-                       if (Version.AtLeast (3, 34))
+                       if (Version.AtLeast (2, 34))
                                VM_StopBuffering ();
                        buffer_packets = false;
 
                        WritePackets (buffered_packets);
                        if (EnableConnectionLogging) {
-                               LoggingStream.WriteLine (String.Format ("Sent {1} packets.", buffered_packets.Count));
+                               LoggingStream.WriteLine (String.Format ("Sent {0} packets.", buffered_packets.Count));
                                LoggingStream.Flush ();
                        }
                        buffered_packets.Clear ();
@@ -1655,24 +1669,39 @@ namespace Mono.Debugger.Soft
                        }
                }
 
-               internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ErrorCode error, object state);
+               internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state);
+
+               void read_invoke_res (PacketReader r, out ValueImpl v, out ValueImpl exc, out ValueImpl out_this, out ValueImpl[] out_args) {
+                       int resflags = r.ReadByte ();
+                       v = null;
+                       exc = null;
+                       out_this = null;
+                       out_args = null;
+                       if (resflags == 0) {
+                               exc = r.ReadValue ();
+                       } else {
+                               v = r.ReadValue ();
+                               if ((resflags & 2) != 0)
+                                       out_this = r.ReadValue ();
+                               if ((resflags & 4) != 0) {
+                                       int nargs = r.ReadInt ();
+                                       out_args = new ValueImpl [nargs];
+                                       for (int i = 0; i < nargs; ++i)
+                                               out_args [i] = r.ReadValue ();
+                               }
+                       }
+               }
 
                internal int VM_BeginInvokeMethod (long thread, long method, ValueImpl this_arg, ValueImpl[] arguments, InvokeFlags flags, InvokeMethodCallback callback, object state) {
                        return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHOD, new PacketWriter ().WriteId (thread).WriteInt ((int)flags).WriteId (method).WriteValue (this_arg).WriteInt (arguments.Length).WriteValues (arguments), delegate (PacketReader r) {
-                                       ValueImpl v, exc;
+                                       ValueImpl v, exc, out_this = null;
+                                       ValueImpl[] out_args = null;
 
                                        if (r.ErrorCode != 0) {
-                                               callback (null, null, (ErrorCode)r.ErrorCode, state);
+                                               callback (null, null, null, null, (ErrorCode)r.ErrorCode, state);
                                        } else {
-                                               if (r.ReadByte () == 0) {
-                                                       exc = r.ReadValue ();
-                                                       v = null;
-                                               } else {
-                                                       v = r.ReadValue ();
-                                                       exc = null;
-                                               }
-
-                                               callback (v, exc, 0, state);
+                                               read_invoke_res (r, out v, out exc, out out_this, out out_args);
+                                               callback (v, exc, out_this, out_args, 0, state);
                                        }
                                }, 1);
                }
@@ -1690,20 +1719,14 @@ namespace Mono.Debugger.Soft
                                w.WriteValues (arguments [i]);
                        }
                        return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHODS, w, delegate (PacketReader r) {
-                                       ValueImpl v, exc;
+                                       ValueImpl v, exc, out_this = null;
+                                       ValueImpl[] out_args = null;
 
                                        if (r.ErrorCode != 0) {
-                                               callback (null, null, (ErrorCode)r.ErrorCode, state);
+                                               callback (null, null, null, null, (ErrorCode)r.ErrorCode, state);
                                        } else {
-                                               if (r.ReadByte () == 0) {
-                                                       exc = r.ReadValue ();
-                                                       v = null;
-                                               } else {
-                                                       v = r.ReadValue ();
-                                                       exc = null;
-                                               }
-
-                                               callback (v, exc, 0, state);
+                                               read_invoke_res (r, out v, out exc, out out_this, out out_args);
+                                               callback (v, exc, out_this, out_args, 0, state);
                                        }
                                }, methods.Length);
                }
@@ -1983,21 +2006,20 @@ namespace Mono.Debugger.Soft
                        return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
                }
 
-               internal FrameInfo[] Thread_GetFrameInfo (long id, int start_frame, int length) {
-                       var res = SendReceive (CommandSet.THREAD, (int)CmdThread.GET_FRAME_INFO, new PacketWriter ().WriteId (id).WriteInt (start_frame).WriteInt (length));
-                       int count = res.ReadInt ();
-
-                       var frames = new FrameInfo [count];
-                       for (int i = 0; i < count; ++i) {
-                               var f = new FrameInfo ();
-                               f.id = res.ReadInt ();
-                               f.method = res.ReadId ();
-                               f.il_offset = res.ReadInt ();
-                               f.flags = (StackFrameFlags)res.ReadByte ();
-                               frames [i] = f;
-                       }
-
-                       return frames;
+               internal void Thread_GetFrameInfo (long id, int start_frame, int length, Action<FrameInfo[]> resultCallaback) {
+                       Send (CommandSet.THREAD, (int)CmdThread.GET_FRAME_INFO, new PacketWriter ().WriteId (id).WriteInt (start_frame).WriteInt (length), (res) => {
+                               int count = res.ReadInt ();
+                               var frames = new FrameInfo[count];
+                               for (int i = 0; i < count; ++i) {
+                                       var f = new FrameInfo ();
+                                       f.id = res.ReadInt ();
+                                       f.method = res.ReadId ();
+                                       f.il_offset = res.ReadInt ();
+                                       f.flags = (StackFrameFlags)res.ReadByte ();
+                                       frames [i] = f;
+                               }
+                               resultCallaback (frames);
+                       }, 1);
                }
 
                internal int Thread_GetState (long id) {
index e0175f36bdfe9ee6adacf79dc0c25723a9c9e99d..b4d6073819c359f1c98a9c3c57d32135afb3f1a1 100644 (file)
@@ -23,67 +23,347 @@ namespace Mono.Debugger.Soft
                        // IL_0008:  br         IL_000d
                        // IL_000d:  ldloc.0
                        // IL_000e:  ret
+                       // ... or returns a simple constant:
+                       // IL_0000:  ldc.i4 1024
+                       // IL_0005:  conv.i8
+                       // IL_0006:  ret
                        if (args != null && args.Length != 0)
-                               throw new NotSupportedException ();                             
+                               throw new NotSupportedException ();
+
                        if (method.IsStatic || method.DeclaringType.IsValueType || this_val == null || !(this_val is ObjectMirror))
                                throw new NotSupportedException ();
 
                        var instructions = body.Instructions;
-                       if (instructions.Count > 16)
+                       if (instructions.Count < 1 || instructions.Count > 16)
                                throw new NotSupportedException ();
 
-                       Value[] stack = new Value [16];
+                       var stack = new Value [16];
+                       var ins = instructions [0];
                        Value locals_0 = null;
-                       Value res = null;
-
-                       int sp = 0;
                        int ins_count = 0;
-                       var ins = instructions [0];
+                       int sp = 0;
+
                        while (ins != null) {
                                if (ins_count > 16)
                                        throw new NotImplementedException ();
-                               ins_count ++;
+
                                var next = ins.Next;
+                               ins_count++;
 
                                var op = ins.OpCode;
                                if (op == OpCodes.Nop) {
                                } else if (op == OpCodes.Ldarg_0) {
-                                       if (sp > 0)
+                                       if (sp != 0)
                                                throw new NotSupportedException ();
+
                                        stack [sp++] = this_val;
                                } else if (op == OpCodes.Ldfld) {
                                        if (sp != 1)
                                                throw new NotSupportedException ();
-                                       var obj = (ObjectMirror)stack [--sp];
-                                       var field = (FieldInfoMirror)ins.Operand;
+
+                                       var obj = (ObjectMirror) stack [--sp];
+                                       var field = (FieldInfoMirror) ins.Operand;
                                        try {
                                                stack [sp++] = obj.GetValue (field);
                                        } catch (ArgumentException) {
                                                throw new NotSupportedException ();
                                        }
+                               } else if (op == OpCodes.Ldc_I4_0) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, 0);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_1) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, 1);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_2) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, 2);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_3) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, 3);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_4) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, 4);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_5) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, 5);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_6) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, 6);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_7) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, 7);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_8) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, 8);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_M1) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, -1);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I4_S) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_I8) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_R4) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Ldc_R8) {
+                                       if (sp != 0)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand);
+                                       } catch (ArgumentException) {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_I) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt32 (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_I1) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToSByte (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_U1) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToByte (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_I2) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt16 (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_U2) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt16 (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_I4) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt32 (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_U4) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt32 (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_I8) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt64 (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_U8) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt64 (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_R4) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToSingle (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
+                               } else if (op == OpCodes.Conv_R8) {
+                                       if (sp != 1)
+                                               throw new NotSupportedException ();
+
+                                       try {
+                                               var primitive = (PrimitiveValue) stack [--sp];
+                                               stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToDouble (primitive.Value));
+                                       } catch {
+                                               throw new NotSupportedException ();
+                                       }
                                } else if (op == OpCodes.Stloc_0) {
                                        if (sp != 1)
                                                throw new NotSupportedException ();
+
                                        locals_0 = stack [--sp];
                                } else if (op == OpCodes.Br) {
-                                       next = (ILInstruction)ins.Operand;
+                                       next = (ILInstruction) ins.Operand;
                                } else if (op == OpCodes.Ldloc_0) {
                                        if (sp != 0)
                                                throw new NotSupportedException ();
+
                                        stack [sp++] = locals_0;
                                } else if (op == OpCodes.Ret) {
-                                       if (sp == 0)
-                                               res = null;
-                                       else
-                                               res = stack [--sp];
-                                       break;
+                                       if (sp > 0) {
+                                               var res = stack [--sp];
+
+                                               var primitive = res as PrimitiveValue;
+                                               if (method.ReturnType.IsPrimitive && primitive != null) {
+                                                       // cast the primitive value to the return type
+                                                       try {
+                                                               switch (method.ReturnType.CSharpName) {
+                                                               case "double": res = new PrimitiveValue (method.VirtualMachine, Convert.ToDouble (primitive.Value)); break;
+                                                               case "float": res = new PrimitiveValue (method.VirtualMachine, Convert.ToSingle (primitive.Value)); break;
+                                                               case "ulong": res = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt64 (primitive.Value)); break;
+                                                               case "long": res = new PrimitiveValue (method.VirtualMachine, Convert.ToInt64 (primitive.Value)); break;
+                                                               case "uint": res = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt32 (primitive.Value)); break;
+                                                               case "int": res = new PrimitiveValue (method.VirtualMachine, Convert.ToInt32 (primitive.Value)); break;
+                                                               case "ushort": res = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt16 (primitive.Value)); break;
+                                                               case "short": res = new PrimitiveValue (method.VirtualMachine, Convert.ToInt16 (primitive.Value)); break;
+                                                               case "sbyte": res = new PrimitiveValue (method.VirtualMachine, Convert.ToSByte (primitive.Value)); break;
+                                                               case "byte": res = new PrimitiveValue (method.VirtualMachine, Convert.ToByte (primitive.Value)); break;
+                                                               case "char": res = new PrimitiveValue (method.VirtualMachine, Convert.ToChar (primitive.Value)); break;
+                                                               case "bool": res = new PrimitiveValue (method.VirtualMachine, Convert.ToBoolean (primitive.Value)); break;
+                                                               }
+                                                       } catch {
+                                                               throw new NotSupportedException ();
+                                                       }
+                                               }
+
+                                               return res;
+                                       }
+
+                                       return null;
                                } else {
                                        throw new NotSupportedException ();
                                }
+
                                ins = next;
                        }
 
-                       return res;
+                       return null;
                }
        }
 }
index bc064795083b1d1232816253da528760b6a6812a..5ca987ec69495c7d68293c8fdcae1c81ea68d84b 100644 (file)
@@ -13,6 +13,15 @@ namespace Mono.Debugger.Soft
                /*
                 * Only resume the target thread during the invoke
                 */
-               SingleThreaded = 2
+               SingleThreaded = 2,
+               /*
+                * Return the changed receiver when invoking
+                * a valuetype method.
+                */
+               ReturnOutThis = 4,
+               /*
+                * Return the values of out arguments
+                */
+               ReturnOutArgs = 8
        }
 }
index f3eedccaf5b24592ce35e5b1cc1c0af05df033ac..d83e3a1a4813052efc3bd3654aa3e6858aa66d38 100644 (file)
@@ -8,6 +8,22 @@ using System.Threading.Tasks;
 
 namespace Mono.Debugger.Soft
 {
+       public class InvokeResult {
+               public Value Result { get; set; }
+               //
+               // The value of the receiver after the call for calls to valuetype methods or null.
+               // Only set when using the InvokeOptions.ReturnOutThis flag.
+               // Since protocol version 2.35
+               //
+               public Value OutThis { get; set; }
+               //
+               // The value of the arguments after the call
+               // Only set when using the InvokeOptions.ReturnOutArgs flag.
+               // Since protocol version 2.35
+               //
+               public Value[] OutArgs { get; set; }
+       }
+
        public class ObjectMirror : Value {
                TypeMirror type;
                AppDomainMirror domain;
@@ -149,6 +165,10 @@ namespace Mono.Debugger.Soft
                        return EndInvokeMethodInternal (asyncResult);
                }
 
+               public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+                       return  ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+               }
+
 #if NET_4_5
                public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
                        var tcs = new TaskCompletionSource<Value> ();
@@ -164,6 +184,21 @@ namespace Mono.Debugger.Soft
                                        }, null);
                        return tcs.Task;
                }
+
+               public Task<InvokeResult> InvokeMethodAsyncWithResult (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
+                       var tcs = new TaskCompletionSource<InvokeResult> ();
+                       BeginInvokeMethod (thread, method, arguments, options, iar =>
+                                       {
+                                               try {
+                                                       tcs.SetResult (EndInvokeMethodInternalWithResult (iar));
+                                               } catch (OperationCanceledException) {
+                                                       tcs.TrySetCanceled ();
+                                               } catch (Exception ex) {
+                                                       tcs.TrySetException (ex);
+                                               }
+                                       }, null);
+                       return tcs.Task;
+               }
 #endif
 
                //
@@ -223,6 +258,14 @@ namespace Mono.Debugger.Soft
                                get; set;
                        }
 
+                       public ValueImpl OutThis {
+                               get; set;
+                       }
+
+                       public ValueImpl[] OutArgs {
+                               get; set;
+                       }
+
                        public ValueImpl Exception {
                                get; set;
                        }
@@ -260,16 +303,20 @@ namespace Mono.Debugger.Soft
                                f |= InvokeFlags.DISABLE_BREAKPOINTS;
                        if ((options & InvokeOptions.SingleThreaded) != 0)
                                f |= InvokeFlags.SINGLE_THREADED;
+                       if ((options & InvokeOptions.ReturnOutThis) != 0)
+                               f |= InvokeFlags.OUT_THIS;
+                       if ((options & InvokeOptions.ReturnOutArgs) != 0)
+                               f |= InvokeFlags.OUT_ARGS;
 
                        InvokeAsyncResult r = new InvokeAsyncResult { AsyncState = state, AsyncWaitHandle = new ManualResetEvent (false), VM = vm, Thread = thread, Callback = callback };
-
+                       thread.InvalidateFrames ();
                        r.ID = vm.conn.VM_BeginInvokeMethod (thread.Id, method.Id, this_obj != null ? vm.EncodeValue (this_obj) : vm.EncodeValue (vm.CreateValue (null)), vm.EncodeValues (arguments), f, InvokeCB, r);
 
                        return r;
                }
 
                // This is called when the result of an invoke is received
-               static void InvokeCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) {
+               static void InvokeCB (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state) {
                        InvokeAsyncResult r = (InvokeAsyncResult)state;
 
                        if (error != 0) {
@@ -279,6 +326,9 @@ namespace Mono.Debugger.Soft
                                r.Exception = exc;
                        }
 
+                       r.OutThis = out_this;
+                       r.OutArgs = out_args;
+
                        r.IsCompleted = true;
                        ((ManualResetEvent)r.AsyncWaitHandle).Set ();
 
@@ -286,7 +336,7 @@ namespace Mono.Debugger.Soft
                                r.Callback.BeginInvoke (r, null, null);
                }
 
-           internal static Value EndInvokeMethodInternal (IAsyncResult asyncResult) {
+           internal static InvokeResult EndInvokeMethodInternalWithResult (IAsyncResult asyncResult) {
                        if (asyncResult == null)
                                throw new ArgumentNullException ("asyncResult");
 
@@ -301,18 +351,30 @@ namespace Mono.Debugger.Soft
                                } catch (CommandException ex) {
                                        if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT)
                                                throw new ArgumentException ("Incorrect number or types of arguments", "arguments");
-                                       else
-                                               throw;
+
+                                       throw;
                                }
                                throw new NotImplementedException ();
                        } else {
                                if (r.Exception != null)
                                        throw new InvocationException ((ObjectMirror)r.VM.DecodeValue (r.Exception));
-                               else
-                                       return r.VM.DecodeValue (r.Value);
+
+                               Value out_this = null;
+                               if (r.OutThis != null)
+                                       out_this = r.VM.DecodeValue (r.OutThis);
+                               Value[] out_args = null;
+                               if (r.OutArgs != null)
+                                       out_args = r.VM.DecodeValues (r.OutArgs);
+
+                               return new InvokeResult () { Result = r.VM.DecodeValue (r.Value), OutThis = out_this, OutArgs = out_args };
                        }
                }
 
+           internal static Value EndInvokeMethodInternal (IAsyncResult asyncResult) {
+                       InvokeResult res = EndInvokeMethodInternalWithResult (asyncResult);
+                       return res.Result;
+               }
+
            internal static void EndInvokeMultipleInternal (IAsyncResult asyncResult) {
                        if (asyncResult == null)
                                throw new ArgumentNullException ("asyncResult");
@@ -370,13 +432,14 @@ namespace Mono.Debugger.Soft
                        var args = new List<ValueImpl[]> ();
                        for (int i = 0; i < methods.Length; ++i)
                                args.Add (vm.EncodeValues (arguments [i]));
+                       thread.InvalidateFrames ();
                        r.ID = vm.conn.VM_BeginInvokeMethods (thread.Id, mids, this_obj != null ? vm.EncodeValue (this_obj) : vm.EncodeValue (vm.CreateValue (null)), args, f, InvokeMultipleCB, r);
 
                        return r;
                }
 
                // This is called when the result of an invoke is received
-               static void InvokeMultipleCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) {
+               static void InvokeMultipleCB (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state) {
                        var r = (InvokeAsyncResult)state;
 
                        Interlocked.Decrement (ref r.NumPending);
index 696f6493f4043a726e058dcc41365c9c62290975..2ba50c84d4c4831d6b044e47400c7ec2a5cb6f09 100644 (file)
@@ -22,8 +22,11 @@ namespace Mono.Debugger.Soft
                public override bool Equals (object obj) {
                        if (value == obj)
                                return true;
-                       if (obj != null && obj is PrimitiveValue)
-                               return value == (obj as PrimitiveValue).Value;
+
+                       var primitive = obj as PrimitiveValue;
+                       if (primitive != null)
+                               return value == primitive.Value;
+
                        return base.Equals (obj);
                }
 
@@ -52,5 +55,9 @@ namespace Mono.Debugger.Soft
                public Value EndInvokeMethod (IAsyncResult asyncResult) {
                        return ObjectMirror.EndInvokeMethodInternal (asyncResult);
                }
+
+               public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+                       return  ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+               }
        }
 }
\ No newline at end of file
index b6e43eb4e23b569b6a58ee4df29db52b863a8c2a..1aa1a4ef5eecf9042ebcdab4e300494328ba5a58 100644 (file)
@@ -1,5 +1,8 @@
 using System;
 using System.Collections.Generic;
+#if NET_4_5
+using System.Threading.Tasks;
+#endif
 
 namespace Mono.Debugger.Soft
 {
@@ -83,7 +86,53 @@ namespace Mono.Debugger.Soft
                }
 
                public Value EndInvokeMethod (IAsyncResult asyncResult) {
-                       return ObjectMirror.EndInvokeMethodInternal (asyncResult);
+                       var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+                       var outThis = result.OutThis as StructMirror;
+                       if (outThis != null) {
+                               SetFields (outThis.Fields);
+                       }
+                       return result.Result;
+               }
+
+               public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+                       var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+                       var outThis = result.OutThis as StructMirror;
+                       if (outThis != null) {
+                               SetFields (outThis.Fields);
+                       }
+                       return result;
+               }
+
+#if NET_4_5
+               public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
+                       var tcs = new TaskCompletionSource<Value> ();
+                       BeginInvokeMethod (thread, method, arguments, options, iar =>
+                                       {
+                                               try {
+                                                       tcs.SetResult (EndInvokeMethod (iar));
+                                               } catch (OperationCanceledException) {
+                                                       tcs.TrySetCanceled ();
+                                               } catch (Exception ex) {
+                                                       tcs.TrySetException (ex);
+                                               }
+                                       }, null);
+                       return tcs.Task;
+               }
+
+               public Task<InvokeResult> InvokeMethodAsyncWithResult (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
+                       var tcs = new TaskCompletionSource<InvokeResult> ();
+                       BeginInvokeMethod (thread, method, arguments, options, iar =>
+                                       {
+                                               try {
+                                                       tcs.SetResult (ObjectMirror.EndInvokeMethodInternalWithResult (iar));
+                                               } catch (OperationCanceledException) {
+                                                       tcs.TrySetCanceled ();
+                                               } catch (Exception ex) {
+                                                       tcs.TrySetException (ex);
+                                               }
+                                       }, null);
+                       return tcs.Task;
                }
+#endif
        }
 }
index 38c733ccaf5e07e60681abcd77cf7c58be440608..541118d66d6cc1ad4b6c4f0f8bdc681891d68b58 100644 (file)
@@ -7,7 +7,12 @@ namespace Mono.Debugger.Soft
        public class ThreadMirror : ObjectMirror
        {
                string name;
+               bool cacheInvalid = true;
+               bool fetching;
+               object fetchingLocker = new object ();
+               ManualResetEvent fetchingEvent = new ManualResetEvent (false);
                ThreadInfo info;
+               StackFrame[] frames;
 
                internal ThreadMirror (VirtualMachine vm, long id) : base (vm, id) {
                }
@@ -15,22 +20,58 @@ namespace Mono.Debugger.Soft
                internal ThreadMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id, type, domain) {
                }
 
-               // FIXME: Cache, invalidate when the thread/runtime is resumed
                public StackFrame[] GetFrames () {
-                       FrameInfo[] frame_info = vm.conn.Thread_GetFrameInfo (id, 0, -1);
+                       FetchFrames (true);
+                       fetchingEvent.WaitOne ();
+                       return frames;
+               }
 
-                       var frames = new List<StackFrame> ();
+               internal void InvalidateFrames () {
+                       cacheInvalid = true;
+               }
 
-                       for (int i = 0; i < frame_info.Length; ++i) {
-                               FrameInfo info = (FrameInfo)frame_info [i];
-                               MethodMirror method = vm.GetMethod (info.method);
-                               var f = new StackFrame (vm, info.id, this, method, info.il_offset, info.flags);
-                               if (!(f.IsNativeTransition && !NativeTransitions))
-                                       frames.Add (f);
+               internal void FetchFrames (bool mustFetch = false) {
+                       lock (fetchingLocker) {
+                               if (fetching || !cacheInvalid)
+                                       return;
+                               cacheInvalid = false;
+                               fetching = true;
+                               fetchingEvent.Reset ();
                        }
+                       vm.conn.Thread_GetFrameInfo (id, 0, -1, (frame_info) => {
+                               var framesList = new List<StackFrame> ();
+                               for (int i = 0; i < frame_info.Length; ++i) {
+                                       var frameInfo = (FrameInfo)frame_info [i];
+                                       var method = vm.GetMethod (frameInfo.method);
+                                       var f = new StackFrame (vm, frameInfo.id, this, method, frameInfo.il_offset, frameInfo.flags);
+                                       if (!(f.IsNativeTransition && !NativeTransitions))
+                                               framesList.Add (f);
+                               }
+                               lock (fetchingLocker) {
+                                       vm.AddThreadToInvalidateList (this);
+                                       fetching = false;
+                                       //In case it was invalidated during waiting for response from
+                                       //runtime and mustFetch was set refetch
+                                       if (cacheInvalid && mustFetch) {
+                                               FetchFrames (mustFetch);
+                                               return;
+                                       }
+                                       frames = framesList.ToArray ();
+                                       fetchingEvent.Set ();
+                               }
+                       });
+               }
 
-                       return frames.ToArray ();
-           }
+               public static void FetchFrames(IList<ThreadMirror> threads)
+               {
+                       if (threads.Count == 0)
+                               return;
+                       threads [0].vm.conn.StartBuffering ();
+                       foreach (var thread in threads) {
+                               thread.FetchFrames ();
+                       }
+                       threads [0].vm.conn.StopBuffering ();
+               }
 
                public string Name {
                        get {
@@ -38,7 +79,7 @@ namespace Mono.Debugger.Soft
                                        name = vm.conn.Thread_GetName (id);
                                return name;
                        }
-           }
+               }
 
                public new long Id {
                        get {
@@ -111,8 +152,8 @@ namespace Mono.Debugger.Soft
                        } catch (CommandException ex) {
                                if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT)
                                        throw new ArgumentException ("loc doesn't refer to a location in the current method of this thread.", "loc");
-                               else
-                                       throw;
+
+                               throw;
                        }
                }
     }
index 437689163ec93171b5fee5fdd4525562fdb88520..3970f2a57684af7e7bc02bee7f1517ebdbcd1df7 100644 (file)
@@ -806,6 +806,10 @@ namespace Mono.Debugger.Soft
                        return ObjectMirror.EndInvokeMethodInternal (asyncResult);
                }
 
+               public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+                       return  ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+               }
+
 #if NET_4_5
                public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
                        var tcs = new TaskCompletionSource<Value> ();
index 61ee11c18314fb401424ade351529c4fa6e29d81..ee5806d4722a6cce409547d9e0095f0a8764c63e 100644 (file)
@@ -121,12 +121,13 @@ namespace Mono.Debugger.Soft
 
                public void Resume () {
                        try {
+                               InvalidateThreadAndFrameCaches ();
                                conn.VM_Resume ();
                        } catch (CommandException ex) {
                                if (ex.ErrorCode == ErrorCode.NOT_SUSPENDED)
                                        throw new VMNotSuspendedException ();
-                               else
-                                       throw;
+
+                               throw;
                        }
            }
 
@@ -151,12 +152,44 @@ namespace Mono.Debugger.Soft
                        conn.ForceDisconnect ();
                }
 
+               HashSet<ThreadMirror> threadsToInvalidate = new HashSet<ThreadMirror> ();
+               ThreadMirror[] threadCache;
+               object threadCacheLocker = new object ();
+
+               void InvalidateThreadAndFrameCaches () {
+                       lock (threadsToInvalidate) {
+                               foreach (var thread in threadsToInvalidate)
+                                       thread.InvalidateFrames ();
+                               threadsToInvalidate.Clear ();
+                       }
+                       lock (threadCacheLocker) {
+                               threadCache = null;
+                       }
+               }
+
+               internal void InvalidateThreadCache () {
+                       lock (threadCacheLocker) {
+                               threadCache = null;
+                       }
+               }
+
+               internal void AddThreadToInvalidateList (ThreadMirror threadMirror)
+               {
+                       lock (threadsToInvalidate) {
+                               threadsToInvalidate.Add (threadMirror);
+                       }
+               }
+
                public IList<ThreadMirror> GetThreads () {
-                       long[] ids = vm.conn.VM_GetThreads ();
-                       ThreadMirror[] res = new ThreadMirror [ids.Length];
-                       for (int i = 0; i < ids.Length; ++i)
-                               res [i] = GetThread (ids [i]);
-                       return res;
+                       lock (threadCacheLocker) {
+                               if (threadCache == null) {
+                                       long[] ids = vm.conn.VM_GetThreads ();
+                                       threadCache = new ThreadMirror [ids.Length];
+                                       for (int i = 0; i < ids.Length; ++i)
+                                               threadCache [i] = GetThread (ids [i]);
+                               }
+                               return threadCache;
+                       }
                }
 
                // Same as the mirrorOf methods in JDI
@@ -675,9 +708,11 @@ namespace Mono.Debugger.Soft
                                        vm.notify_vm_event (EventType.VMDeath, suspend_policy, req_id, thread_id, null, ei.ExitCode);
                                        break;
                                case EventType.ThreadStart:
+                                       vm.InvalidateThreadCache ();
                                        l.Add (new ThreadStartEvent (vm, req_id, id));
                                        break;
                                case EventType.ThreadDeath:
+                                       vm.InvalidateThreadCache ();
                                        l.Add (new ThreadDeathEvent (vm, req_id, id));
                                        break;
                                case EventType.AssemblyLoad:
@@ -718,8 +753,6 @@ namespace Mono.Debugger.Soft
                                case EventType.UserLog:
                                        l.Add (new UserLogEvent (vm, req_id, thread_id, ei.Level, ei.Category, ei.Message));
                                        break;
-                               default:
-                                       break;
                                }
                        }
                        
index a057455538db9b900fb411aaabcd600a2efd1cac..3c9b2877c21c617f2ebb292b48568995923b28b5 100644 (file)
@@ -81,6 +81,7 @@ public struct AStruct {
        public string s;
        public byte k;
        public IntPtr j;
+       public int l;
 
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        public int foo (int val) {
@@ -106,6 +107,11 @@ public struct AStruct {
        public IntPtr invoke_return_intptr () {
                return j;
        }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public void invoke_mutate () {
+               l = 5;
+       }
 }
 
 public class GClass<T> {
@@ -953,6 +959,11 @@ public class Tests : TestsBase, ITest2
                return 42;
        }
 
+       public void invoke_out (out int foo, out int[] arr) {
+               foo = 5;
+               arr = new int [10];
+       }
+
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        public static void exceptions () {
                try {
index 9d6e5c412714d23c76f0a9c839d23212b0bd889e..9a671202a82027cf99d0b9ded34611eb72772d33 100644 (file)
@@ -2110,6 +2110,21 @@ public class DebuggerTests
                        Assert.AreEqual ("Exception", ex.Exception.Type.Name);
                }
 
+#if NET_4_5
+               // out argument
+               m = t.GetMethod ("invoke_out");
+               var out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) }, InvokeOptions.ReturnOutArgs);
+               var out_args = out_task.Result.OutArgs;
+               AssertValue (5, out_args [0]);
+               Assert.IsTrue (out_args [1] is ArrayMirror);
+               Assert.AreEqual (10, (out_args [1] as ArrayMirror).Length);
+
+               // without ReturnOutArgs flag
+               out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) });
+               out_args = out_task.Result.OutArgs;
+               Assert.IsNull (out_args);
+#endif
+
                // newobj
                m = t.GetMethod (".ctor");
                v = t.InvokeMethod (e.Thread, m, null);
@@ -2212,6 +2227,24 @@ public class DebuggerTests
                m = t.GetMethod ("invoke_return_int");
                v = s.InvokeMethod (e.Thread, m, null);
                AssertValue (42, v);
+
+#if NET_4_5
+               // Invoke a method which changes state
+               s = frame.GetArgument (1) as StructMirror;
+               t = s.Type;
+               m = t.GetMethod ("invoke_mutate");
+               var task = s.InvokeMethodAsyncWithResult (e.Thread, m, null, InvokeOptions.ReturnOutThis);
+               var out_this = task.Result.OutThis as StructMirror;
+               AssertValue (5, out_this ["l"]);
+
+               // Without the ReturnOutThis flag
+               s = frame.GetArgument (1) as StructMirror;
+               t = s.Type;
+               m = t.GetMethod ("invoke_mutate");
+               task = s.InvokeMethodAsyncWithResult (e.Thread, m, null);
+               out_this = task.Result.OutThis as StructMirror;
+               Assert.AreEqual (null, out_this);
+#endif
        }
 
        [Test]
index da0eaa1a1a70b3f1955e3e6d8760ee71e85a624f..6083b3d0ebc54324eae817eff2196d81598409c0 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib-net_4_5.csproj">\r
       <Project>{0B587DBA-BA92-4B92-821A-AA200C612A7E}</Project>\r
-      <Name>ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib-net_4_5</Name>\r
+      <Name>ICSharpCode.SharpZipLib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 91984c92bf22e5a7b40c5a0a437d0898c5147ddf..0e98d81156edb84ef5db1b16b034c768699c3046 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Posix/Mono.Posix-net_4_5.csproj">\r
       <Project>{85A9B29B-58FF-4FBE-8998-B0A89AC22880}</Project>\r
-      <Name>Mono.Posix\Mono.Posix-net_4_5</Name>\r
+      <Name>Mono.Posix-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 5747dcd2ba9564f61a7bc9614d295ef8a6779a6c..9870cab073c851d5ffd6b1eafb01f0e3e8831b06 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Messaging/System.Messaging-net_4_5.csproj">\r
       <Project>{1CBEC0FC-5926-42FA-A0CF-A19617FABB78}</Project>\r
-      <Name>System.Messaging\System.Messaging-net_4_5</Name>\r
+      <Name>System.Messaging-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Messaging/Mono.Messaging-net_4_5.csproj">\r
       <Project>{DDCC93B5-9425-4E9A-95DC-3400D0028508}</Project>\r
-      <Name>Mono.Messaging\Mono.Messaging-net_4_5</Name>\r
+      <Name>Mono.Messaging-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../RabbitMQ.Client/src/client/RabbitMQ.Client-net_4_5.csproj">\r
       <Project>{55AA0C89-63D9-438E-A139-3ED9F72AE295}</Project>\r
-      <Name>client\RabbitMQ.Client-net_4_5</Name>\r
+      <Name>RabbitMQ.Client-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 38b4bc70bdaab846a142ec658d1af79a8aa6d423..1288172ab1d5c84ef511405364962d01ebcde8b5 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index f3d1d0fe30bbe2ff9f7254d10b4e68b119858639..bc2f7b6a2f3e1d52c83af9310f9c540e408c7a69 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
diff --git a/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/IMonoTaskScheduler.xml b/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/IMonoTaskScheduler.xml
deleted file mode 100644 (file)
index 7ea9123..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<Type Name="IMonoTaskScheduler" FullName="Mono.Threading.Tasks.IMonoTaskScheduler">
-  <TypeSignature Language="C#" Value="public interface IMonoTaskScheduler" />
-  <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IMonoTaskScheduler" />
-  <AssemblyInfo>
-    <AssemblyName>Mono.Parallel</AssemblyName>
-    <AssemblyVersion>4.0.0.0</AssemblyVersion>
-  </AssemblyInfo>
-  <Interfaces />
-  <Docs>
-    <summary>The normal way to use another scheduler with ParalleFx is by creating a new type subclassing <see cref="T:System.Threading.Tasks.TaskScheduler" />. However Mono's ParallelFx has a few specifities which aren't captured by the base API. Developpers can thus also implement this interface with their custom scheduler for better Mono integration.</summary>
-    <remarks>The changes added by implementing this interface are totally non-breaking and the assembly will still work perfectly with .NET ParallelFx provided you implement correctly <see cref="T:System.Threading.Tasks.TaskScheduler" /> correctly.</remarks>
-  </Docs>
-  <Members>
-    <Member MemberName="ParticipateUntil">
-      <MemberSignature Language="C#" Value="public void ParticipateUntil (System.Threading.Tasks.Task task);" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ParticipateUntil(class System.Threading.Tasks.Task task) cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Void</ReturnType>
-      </ReturnValue>
-      <Parameters>
-        <Parameter Name="task" Type="System.Threading.Tasks.Task" />
-      </Parameters>
-      <Docs>
-        <param name="task">The task to wait on.</param>
-        <summary>This method will be called when a thread decides to wait on a task completion. Developpers are free to simply wait on the supplied Task or provide a smarter cooperative waiting mechanism.</summary>
-        <remarks>A simple waiting mechanism can be achieved via the following pattern:
-
-<example><code lang="C#">
-public void PartiticipateUntil (Task task)
-{
-       ManualResetEventSlim evt = new ManualResetEventSlim (false);
-       task.ContinueWith (_ =&gt; evt.Set (), TaskContinuationOptions.ExecuteSynchronously);
-       evt.Wait ();
-}
-  </code></example></remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="ParticipateUntil">
-      <MemberSignature Language="C#" Value="public bool ParticipateUntil (System.Threading.Tasks.Task task, System.Threading.ManualResetEventSlim predicateEvt, int millisecondsTimeout);" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool ParticipateUntil(class System.Threading.Tasks.Task task, class System.Threading.ManualResetEventSlim predicateEvt, int32 millisecondsTimeout) cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Boolean</ReturnType>
-      </ReturnValue>
-      <Parameters>
-        <Parameter Name="task" Type="System.Threading.Tasks.Task" />
-        <Parameter Name="predicateEvt" Type="System.Threading.ManualResetEventSlim" />
-        <Parameter Name="millisecondsTimeout" Type="System.Int32" />
-      </Parameters>
-      <Docs>
-        <param name="task">Task to wait on.</param>
-        <param name="predicateEvt">Additional preemptive conditions for stopping the waiting.</param>
-        <param name="millisecondsTimeout">An countdown specifying the maximum amount of time the method can last before returning.</param>
-        <summary>This method will be called when a thread decides to wait on a task completion or a set of condition summarized via the given <see cref="T:System.Threading.ManualResetEventSlim" />. Developpers are free to simply wait on the supplied Task/event or provide a smarter cooperative waiting mechanism.</summary>
-        <returns>
-          <see langword="true" /> if the method returns because of either event was set or timeout was reached, <see langword="false" /> if the task completed.</returns>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-  </Members>
-</Type>
diff --git a/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/MonoTaskExtensions.xml b/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/MonoTaskExtensions.xml
deleted file mode 100644 (file)
index f11a56c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<Type Name="MonoTaskExtensions" FullName="Mono.Threading.Tasks.MonoTaskExtensions">
-  <TypeSignature Language="C#" Value="public static class MonoTaskExtensions" />
-  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed MonoTaskExtensions extends System.Object" />
-  <AssemblyInfo>
-    <AssemblyName>Mono.Parallel</AssemblyName>
-    <AssemblyVersion>4.0.0.0</AssemblyVersion>
-  </AssemblyInfo>
-  <Base>
-    <BaseTypeName>System.Object</BaseTypeName>
-  </Base>
-  <Interfaces />
-  <Docs>
-    <summary>Provide public wrappers around internal methods used in Mono implementation of <see cref="T:System.Threading.Tasks.Task" /> type.</summary>
-    <remarks>These extensions are targeted at developers coding custom schedulers so that they can tap into the specificities of the Mono implementation.</remarks>
-  </Docs>
-  <Members>
-    <Member MemberName="Execute">
-      <MemberSignature Language="C#" Value="public static void Execute (this System.Threading.Tasks.Task task, Action&lt;System.Threading.Tasks.Task&gt; childWorkAdder);" />
-      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Execute(class System.Threading.Tasks.Task task, class System.Action`1&lt;class System.Threading.Tasks.Task&gt; childWorkAdder) cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Void</ReturnType>
-      </ReturnValue>
-      <Parameters>
-        <Parameter Name="task" Type="System.Threading.Tasks.Task" RefType="this" />
-        <Parameter Name="childWorkAdder" Type="System.Action&lt;System.Threading.Tasks.Task&gt;" />
-      </Parameters>
-      <Docs>
-        <param name="task">Task to run.</param>
-        <param name="childWorkAdder">Action that will be called with the Task that is being scheduled while above Task is executed as a parameter.</param>
-        <summary>Execute a <see cref="T:System.Threading.Tasks.Task" /> body and track any other Task scheduling during it which is then passed to the supplied action for specific scheduling.</summary>
-        <remarks>
-          <block subset="none" type="note">
-            <para>
-       If the inner Task that is scheduled has been created with TaskCreationOptions.PreferFairness, the supplied action won't be called and instead the Task will be scheduled normally on the current <see cref="T:System.Threading.Tasks.TaskScheduler" /></para>
-          </block>
-
-The following example retrieve a task from a local deque, execute it and add any eventual child Task created/scheduled to its local deque using PushBottom (safe since we are on the same thread the whole time).
-
-<example><code lang="C#">
-       Task task;
-       IConcurrentDeque&lt;Task&gt; deque = new CyclicDeque&lt;Task&gt; ();
-
-       if (deque.PopBottom (out task) == PopResult.Succeed))
-               task.Execute (deque.PushBottom);
-  </code></example></remarks>
-      </Docs>
-    </Member>
-  </Members>
-</Type>
diff --git a/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/ThreadWorker.xml b/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/ThreadWorker.xml
deleted file mode 100644 (file)
index 0063297..0000000
+++ /dev/null
@@ -1,351 +0,0 @@
-<Type Name="ThreadWorker" FullName="Mono.Threading.Tasks.ThreadWorker">
-  <TypeSignature Language="C#" Value="public class ThreadWorker : IDisposable" />
-  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ThreadWorker extends System.Object implements class System.IDisposable" />
-  <AssemblyInfo>
-    <AssemblyName>Mono.Parallel</AssemblyName>
-    <AssemblyVersion>4.0.0.0</AssemblyVersion>
-  </AssemblyInfo>
-  <Base>
-    <BaseTypeName>System.Object</BaseTypeName>
-  </Base>
-  <Interfaces>
-    <Interface>
-      <InterfaceName>System.IDisposable</InterfaceName>
-    </Interface>
-  </Interfaces>
-  <Docs>
-    <summary>This class wraps a <see cref="T:System.Threading.Thread" /> to provide a suitable ParallelFx worker (i.e. something that process <see cref="T:System.Threading.Tasks.Task" />).</summary>
-    <remarks>To be added.</remarks>
-  </Docs>
-  <Members>
-    <Member MemberName=".ctor">
-      <MemberSignature Language="C#" Value="public ThreadWorker (Mono.Threading.Tasks.ThreadWorker[] others, int workerPosition, System.Collections.Concurrent.IProducerConsumerCollection&lt;System.Threading.Tasks.Task&gt; sharedWorkQueue, Mono.Threading.Tasks.IConcurrentDeque&lt;System.Threading.Tasks.Task&gt; dDeque, System.Threading.ThreadPriority priority, System.Threading.ManualResetEvent handle);" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class Mono.Threading.Tasks.ThreadWorker[] others, int32 workerPosition, class System.Collections.Concurrent.IProducerConsumerCollection`1&lt;class System.Threading.Tasks.Task&gt; sharedWorkQueue, class Mono.Threading.Tasks.IConcurrentDeque`1&lt;class System.Threading.Tasks.Task&gt; dDeque, valuetype System.Threading.ThreadPriority priority, class System.Threading.ManualResetEvent handle) cil managed" />
-      <MemberType>Constructor</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <Parameters>
-        <Parameter Name="others" Type="Mono.Threading.Tasks.ThreadWorker[]" />
-        <Parameter Name="workerPosition" Type="System.Int32" />
-        <Parameter Name="sharedWorkQueue" Type="System.Collections.Concurrent.IProducerConsumerCollection&lt;System.Threading.Tasks.Task&gt;" />
-        <Parameter Name="dDeque" Type="Mono.Threading.Tasks.IConcurrentDeque&lt;System.Threading.Tasks.Task&gt;" />
-        <Parameter Name="priority" Type="System.Threading.ThreadPriority" />
-        <Parameter Name="handle" Type="System.Threading.ManualResetEvent" />
-      </Parameters>
-      <Docs>
-        <param name="others">This is an array containing all other workers created. It's necessary if you want worker cooperating together for getting extra work.</param>
-        <param name="workerPosition">The position in the previous array where this worker will be placed.</param>
-        <param name="sharedWorkQueue">This is the global data structures that holds the Task when the system starts and is not yet bootstraped. It's also where tasks end up if they are executed with fairness enabled.</param>
-        <param name="dDeque">The personnal instance of a deque type used by the worker when storing the tasks its responsible of and letting other workers retrieve them.</param>
-        <param name="priority">The priority of the underlying thread.</param>
-        <param name="handle">This is a handle shared (ideally) by all workers to synchronize and deep sleep when there is no more work to do. Setting the handle will wake them up.</param>
-        <summary>Build a new worker instance.</summary>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="AutoReference">
-      <MemberSignature Language="C#" Value="public static Mono.Threading.Tasks.ThreadWorker AutoReference { get; set; }" />
-      <MemberSignature Language="ILAsm" Value=".property class Mono.Threading.Tasks.ThreadWorker AutoReference" />
-      <MemberType>Property</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>Mono.Threading.Tasks.ThreadWorker</ReturnType>
-      </ReturnValue>
-      <Docs>
-        <summary>This [ThreadStatic] field is automatically updated when WorkerMethod method run so that you can check if you are making a re-entrant call on the same thread.</summary>
-        <value>To be added.</value>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="ChildWorkAdder">
-      <MemberSignature Language="C#" Value="protected virtual void ChildWorkAdder (System.Threading.Tasks.Task t);" />
-      <MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance void ChildWorkAdder(class System.Threading.Tasks.Task t) cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Void</ReturnType>
-      </ReturnValue>
-      <Parameters>
-        <Parameter Name="t" Type="System.Threading.Tasks.Task" />
-      </Parameters>
-      <Docs>
-        <param name="t">Task being scheduled</param>
-        <summary>This method is called when the currently executing Task tries to schedule another Task as part of its computation. This method allows to redirect the scheduling to a specific place.</summary>
-        <remarks>By default the supplied task is added to the ThreadWorker deque via the PushBottom operation.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Deque">
-      <MemberSignature Language="C#" Value="protected Mono.Threading.Tasks.IConcurrentDeque&lt;System.Threading.Tasks.Task&gt; Deque { get; }" />
-      <MemberSignature Language="ILAsm" Value=".property instance class Mono.Threading.Tasks.IConcurrentDeque`1&lt;class System.Threading.Tasks.Task&gt; Deque" />
-      <MemberType>Property</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>Mono.Threading.Tasks.IConcurrentDeque&lt;System.Threading.Tasks.Task&gt;</ReturnType>
-      </ReturnValue>
-      <Docs>
-        <summary>Allow access to the <see cref="T:Mono.Threading.Tasks.IConcurrentDeque&lt;T&gt;" /> used by the ThreadWorker.</summary>
-        <value>To be added.</value>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Dispose">
-      <MemberSignature Language="C#" Value="public virtual void Dispose ();" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Void</ReturnType>
-      </ReturnValue>
-      <Parameters />
-      <Docs>
-        <summary>To be added.</summary>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Equals">
-      <MemberSignature Language="C#" Value="public virtual bool Equals (Mono.Threading.Tasks.ThreadWorker other);" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Equals(class Mono.Threading.Tasks.ThreadWorker other) cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Boolean</ReturnType>
-      </ReturnValue>
-      <Parameters>
-        <Parameter Name="other" Type="Mono.Threading.Tasks.ThreadWorker" />
-      </Parameters>
-      <Docs>
-        <param name="other">To be added.</param>
-        <summary>To be added.</summary>
-        <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Equals">
-      <MemberSignature Language="C#" Value="public override bool Equals (object obj);" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object obj) cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Boolean</ReturnType>
-      </ReturnValue>
-      <Parameters>
-        <Parameter Name="obj" Type="System.Object" />
-      </Parameters>
-      <Docs>
-        <param name="obj">To be added.</param>
-        <summary>To be added.</summary>
-        <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Finished">
-      <MemberSignature Language="C#" Value="public bool Finished { get; }" />
-      <MemberSignature Language="ILAsm" Value=".property instance bool Finished" />
-      <MemberType>Property</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Boolean</ReturnType>
-      </ReturnValue>
-      <Docs>
-        <summary>Tells if the underlying thread has exited or not.</summary>
-        <value>To be added.</value>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="GetHashCode">
-      <MemberSignature Language="C#" Value="public override int GetHashCode ();" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Int32</ReturnType>
-      </ReturnValue>
-      <Parameters />
-      <Docs>
-        <summary>To be added.</summary>
-        <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Id">
-      <MemberSignature Language="C#" Value="public int Id { get; }" />
-      <MemberSignature Language="ILAsm" Value=".property instance int32 Id" />
-      <MemberType>Property</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Int32</ReturnType>
-      </ReturnValue>
-      <Docs>
-        <summary>Return the Id of the underlying thread used by the ThreadWorker.</summary>
-        <value>To be added.</value>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="InitializeUnderlyingThread">
-      <MemberSignature Language="C#" Value="protected virtual void InitializeUnderlyingThread ();" />
-      <MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void InitializeUnderlyingThread() cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Void</ReturnType>
-      </ReturnValue>
-      <Parameters />
-      <Docs>
-        <summary>To be added.</summary>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Others">
-      <MemberSignature Language="C#" Value="protected Mono.Threading.Tasks.ThreadWorker[] Others { get; }" />
-      <MemberSignature Language="ILAsm" Value=".property instance class Mono.Threading.Tasks.ThreadWorker[] Others" />
-      <MemberType>Property</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>Mono.Threading.Tasks.ThreadWorker[]</ReturnType>
-      </ReturnValue>
-      <Docs>
-        <summary>Returns the array of existing ThreadWorker that been initially supplied.</summary>
-        <value>To be added.</value>
-        <remarks>If you are iterating the array, make sure you skip the current instance of ThreadWorker with value of <see cref="P:Mono.Threading.Tasks.ThreadWorker.WorkerPosition" /></remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Priority">
-      <MemberSignature Language="C#" Value="protected System.Threading.ThreadPriority Priority { get; }" />
-      <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Threading.ThreadPriority Priority" />
-      <MemberType>Property</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Threading.ThreadPriority</ReturnType>
-      </ReturnValue>
-      <Docs>
-        <summary>The priority the underlying thread is running with.</summary>
-        <value>To be added.</value>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Pulse">
-      <MemberSignature Language="C#" Value="public virtual void Pulse ();" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Pulse() cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Void</ReturnType>
-      </ReturnValue>
-      <Parameters />
-      <Docs>
-        <summary>To be added.</summary>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="Stop">
-      <MemberSignature Language="C#" Value="public virtual void Stop ();" />
-      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Stop() cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Void</ReturnType>
-      </ReturnValue>
-      <Parameters />
-      <Docs>
-        <summary>Stop the underlying thread of this ThreadWorker.</summary>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="WaitHandle">
-      <MemberSignature Language="C#" Value="protected System.Threading.ManualResetEvent WaitHandle { get; }" />
-      <MemberSignature Language="ILAsm" Value=".property instance class System.Threading.ManualResetEvent WaitHandle" />
-      <MemberType>Property</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Threading.ManualResetEvent</ReturnType>
-      </ReturnValue>
-      <Docs>
-        <summary>Acces the WaitHandle normally shared by all your ThreadWorker instances to deep sleep or otherwise synchronize on.</summary>
-        <value>To be added.</value>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="WorkerMethod">
-      <MemberSignature Language="C#" Value="protected virtual bool WorkerMethod ();" />
-      <MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance bool WorkerMethod() cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Boolean</ReturnType>
-      </ReturnValue>
-      <Parameters />
-      <Docs>
-        <summary>This is the method executed by WorkerMethod to do the actual processing of tasks.</summary>
-        <returns>
-          <see langword="true" /> if the method processed a <see cref="T:System.Threading.Tasks.Task" /> while it ran, <see langword="false" /> otherwise.</returns>
-        <remarks>By default this method applies the following algorithm:
-<list type="bullet"><item><term>Check if the global data structures contains task and fetch as much as possible into its own deque</term></item><item><term>Execute whatever its deque contains</term></item><item><term>Do a couple of pass over the other workers to try to steal some work to do</term></item></list></remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="WorkerMethodWrapper">
-      <MemberSignature Language="C#" Value="protected virtual void WorkerMethodWrapper ();" />
-      <MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void WorkerMethodWrapper() cil managed" />
-      <MemberType>Method</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Void</ReturnType>
-      </ReturnValue>
-      <Parameters />
-      <Docs>
-        <summary>This is the method executed by the underlying thread.</summary>
-        <remarks>By default this method consists of a while loop calling repeatedly <see cref="M:Mono.Threading.Tasks.ThreadWorker.WorkerMethodWrapper()" /> and sleeping accordingly when there is no more work to do.</remarks>
-      </Docs>
-    </Member>
-    <Member MemberName="WorkerPosition">
-      <MemberSignature Language="C#" Value="protected int WorkerPosition { get; }" />
-      <MemberSignature Language="ILAsm" Value=".property instance int32 WorkerPosition" />
-      <MemberType>Property</MemberType>
-      <AssemblyInfo>
-        <AssemblyVersion>4.0.0.0</AssemblyVersion>
-      </AssemblyInfo>
-      <ReturnValue>
-        <ReturnType>System.Int32</ReturnType>
-      </ReturnValue>
-      <Docs>
-        <summary>Position of the current instance in the <see cref="P:Mono.Threading.Tasks.ThreadWorker.Others" /> array.</summary>
-        <value>To be added.</value>
-        <remarks>To be added.</remarks>
-      </Docs>
-    </Member>
-  </Members>
-</Type>
index ab8e4e299475db81f4b6a67de52c7dc81f9ce902..6739a805613cd76aea79f0b047bf833dedb05a3d 100644 (file)
     <Namespace Name="Mono.Threading.Tasks">
       <Type Name="CyclicDeque`1" DisplayName="CyclicDeque&lt;T&gt;" Kind="Class" />
       <Type Name="IConcurrentDeque`1" DisplayName="IConcurrentDeque&lt;T&gt;" Kind="Interface" />
-      <Type Name="IMonoTaskScheduler" Kind="Interface" />
-      <Type Name="MonoTaskExtensions" Kind="Class" />
       <Type Name="PopResult" Kind="Enumeration" />
-      <Type Name="ThreadWorker" Kind="Class" />
     </Namespace>
   </Types>
   <Title>Mono.Parallel</Title>
-  <ExtensionMethods>
-    <ExtensionMethod>
-      <Targets>
-        <Target Type="T:System.Threading.Tasks.Task" />
-      </Targets>
-      <Member MemberName="Execute">
-        <MemberSignature Language="C#" Value="public static void Execute (this System.Threading.Tasks.Task task, Action&lt;System.Threading.Tasks.Task&gt; childWorkAdder);" />
-        <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Execute(class System.Threading.Tasks.Task task, class System.Action`1&lt;class System.Threading.Tasks.Task&gt; childWorkAdder) cil managed" />
-        <MemberType>ExtensionMethod</MemberType>
-        <ReturnValue>
-          <ReturnType>System.Void</ReturnType>
-        </ReturnValue>
-        <Parameters>
-          <Parameter Name="task" Type="System.Threading.Tasks.Task" RefType="this" />
-          <Parameter Name="childWorkAdder" Type="System.Action&lt;System.Threading.Tasks.Task&gt;" />
-        </Parameters>
-        <Docs>
-          <param name="task">Task to run.</param>
-          <param name="childWorkAdder">Action that will be called with the Task that is being scheduled while above Task is executed as a parameter.</param>
-          <summary>Execute a <see cref="T:System.Threading.Tasks.Task" /> body and track any other Task scheduling during it which is then passed to the supplied action for specific scheduling.</summary>
-        </Docs>
-        <Link Type="Mono.Threading.Tasks.MonoTaskExtensions" Member="M:Mono.Threading.Tasks.MonoTaskExtensions.Execute(System.Threading.Tasks.Task,System.Action{System.Threading.Tasks.Task})" />
-      </Member>
-    </ExtensionMethod>
-  </ExtensionMethods>
 </Overview>
index 32e4b884550a873c91c4d75311b8f34483f69ebe..ea5494f2652f87d36fcc151f31c7a2620c8abca2 100644 (file)
     <Compile Include="..\corlib\System.Threading\AtomicBoolean.cs" />\r
     <Compile Include="Assembly\AssemblyInfo.cs" />\r
     <Compile Include="Mono.Collections.Concurrent\ConcurrentSkipList.cs" />\r
-    <Compile Include="Mono.Threading.Tasks\FixedTaskScheduler.cs" />\r
-    <Compile Include="Mono.Threading.Tasks\MonoTaskExtensions.cs" />\r
-    <Compile Include="Mono.Threading.Tasks\MonoTaskScheduler.cs" />\r
-    <Compile Include="Mono.Threading.Tasks\ThreadWorker.cs" />\r
     <Compile Include="Mono.Threading\CSnzi.cs" />\r
     <Compile Include="Mono.Threading\ReaderWriterLockSlimmer.cs" />\r
     <Compile Include="Mono.Threading\Snzi.cs" />\r
index 47b2dd4eb311dae54dcf5b631e2d20d93a2dfeb5..e423ebce5a57b22237d7df74fb40f6c3a06cd1f1 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
     <Compile Include="..\corlib\System.Threading\AtomicBoolean.cs" />\r
     <Compile Include="Assembly\AssemblyInfo.cs" />\r
     <Compile Include="Mono.Collections.Concurrent\ConcurrentSkipList.cs" />\r
-    <Compile Include="Mono.Threading.Tasks\FixedTaskScheduler.cs" />\r
-    <Compile Include="Mono.Threading.Tasks\MonoTaskExtensions.cs" />\r
-    <Compile Include="Mono.Threading.Tasks\MonoTaskScheduler.cs" />\r
-    <Compile Include="Mono.Threading.Tasks\ThreadWorker.cs" />\r
     <Compile Include="Mono.Threading\CSnzi.cs" />\r
     <Compile Include="Mono.Threading\ReaderWriterLockSlimmer.cs" />\r
     <Compile Include="Mono.Threading\Snzi.cs" />\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1f3081a8ae93fdc38751180c6dd1a93e25103a5a..28b7af76fa1dfbd38eb2622a25f17e8e1ada2f5d 100644 (file)
@@ -46,8 +46,6 @@
   <ItemGroup>\r
     <Compile Include="Test\Mono.Collections.Concurrent\CollectionStressTestHelper.cs" />\r
     <Compile Include="Test\Mono.Collections.Concurrent\ConcurrentSkipListTests.cs" />\r
-    <Compile Include="Test\Mono.Threading.Tasks\MonoTaskExtensionsTests.cs" />\r
-    <Compile Include="Test\Mono.Threading.Tasks\MonoTaskSchedulerTests.cs" />\r
     <Compile Include="Test\Mono.Threading\ParallelTestHelper.cs" />\r
     <Compile Include="Test\Mono.Threading\SnziTests.cs" />\r  </ItemGroup>\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
index 4b4dd8ee8000f81a15bdccc02da8aaffc8ab6261..837a9e3b6df48935dea5836776fc06e09982840a 100644 (file)
@@ -46,8 +46,6 @@
   <ItemGroup>\r
     <Compile Include="Test\Mono.Collections.Concurrent\CollectionStressTestHelper.cs" />\r
     <Compile Include="Test\Mono.Collections.Concurrent\ConcurrentSkipListTests.cs" />\r
-    <Compile Include="Test\Mono.Threading.Tasks\MonoTaskExtensionsTests.cs" />\r
-    <Compile Include="Test\Mono.Threading.Tasks\MonoTaskSchedulerTests.cs" />\r
     <Compile Include="Test\Mono.Threading\ParallelTestHelper.cs" />\r
     <Compile Include="Test\Mono.Threading\SnziTests.cs" />\r  </ItemGroup>\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
index 31f320c2ce8f30469d315a27345a3c0e8eb56054..57ec8a4604adb5df29510703824f95278a0572a7 100644 (file)
@@ -11,7 +11,3 @@ Mono.Threading/ReaderWriterLockSlimmer.cs
 ../corlib/System.Threading.Tasks/CyclicDeque.cs
 ../corlib/System.Threading.Tasks/IConcurrentDeque.cs
 ../corlib/System.Threading.Tasks/PopResult.cs
-Mono.Threading.Tasks/ThreadWorker.cs
-Mono.Threading.Tasks/MonoTaskExtensions.cs
-Mono.Threading.Tasks/MonoTaskScheduler.cs
-Mono.Threading.Tasks/FixedTaskScheduler.cs
index 19baf2d77430d96fbe9f0e8feaa5f9028ebcc448..1eb8276dbde5a7eae4bf842def1b68edff5afaea 100644 (file)
@@ -2,5 +2,3 @@ Mono.Collections.Concurrent/CollectionStressTestHelper.cs
 Mono.Collections.Concurrent/ConcurrentSkipListTests.cs
 Mono.Threading/ParallelTestHelper.cs
 Mono.Threading/SnziTests.cs
-Mono.Threading.Tasks/MonoTaskExtensionsTests.cs
-Mono.Threading.Tasks/MonoTaskSchedulerTests.cs
diff --git a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/FixedTaskScheduler.cs b/mcs/class/Mono.Parallel/Mono.Threading.Tasks/FixedTaskScheduler.cs
deleted file mode 100644 (file)
index da656a5..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-// Scheduler.cs
-//
-// Copyright (c) 2008 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION 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;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Concurrent;
-
-namespace Mono.Threading.Tasks
-{
-       public class FixedTaskScheduler: TaskScheduler, IMonoTaskScheduler
-       {
-               readonly IProducerConsumerCollection<Task> workQueue;
-               readonly ThreadWorker[]        workers;
-               readonly ManualResetEvent      pulseHandle = new ManualResetEvent (false);
-
-               public FixedTaskScheduler ()
-                       : this (Environment.ProcessorCount, ThreadPriority.Normal)
-               {
-                       
-               }
-               
-               public FixedTaskScheduler (int maxWorker, ThreadPriority priority)
-               {
-                       workQueue = new ConcurrentQueue<Task> ();
-                       workers = new ThreadWorker [maxWorker];
-                       
-                       for (int i = 0; i < maxWorker; i++) {
-                               workers [i] = new ThreadWorker (workers, i, workQueue, new CyclicDeque<Task> (), priority, pulseHandle);
-                               workers [i].Pulse ();
-                       }
-               }
-
-               protected override void QueueTask (Task t)
-               {
-                       // Add to the shared work pool
-                       workQueue.TryAdd (t);
-                       // Wake up some worker if they were asleep
-                       PulseAll ();
-               }
-
-               public void MonoParticipateUntil (Task task)
-               {
-                       if (task.IsCompleted)
-                               return;
-
-                       ManualResetEventSlim evt = new ManualResetEventSlim (false);
-                       task.ContinueWith (_ => evt.Set (), TaskContinuationOptions.ExecuteSynchronously);
-                       if (evt.IsSet || task.IsCompleted)
-                               return;
-                       
-                       ParticipateUntilInternal (task, evt, -1);
-               }
-               
-               public bool MonoParticipateUntil (Task task, ManualResetEventSlim evt, int millisecondsTimeout)
-               {
-                       if (task.IsCompleted)
-                               return false;
-
-                       bool isFromPredicate = true;
-                       task.ContinueWith (_ => { isFromPredicate = false; evt.Set (); }, TaskContinuationOptions.ExecuteSynchronously);
-
-                       ParticipateUntilInternal (task, evt, millisecondsTimeout);
-
-                       if (task.IsCompleted)
-                               return false;
-
-                       return isFromPredicate;
-               }
-               
-               public void ParticipateUntilInternal (Task self, ManualResetEventSlim evt, int millisecondsTimeout)
-               {
-                       ThreadWorker.ParticipativeWorkerMethod (self, evt, millisecondsTimeout, workQueue, workers, pulseHandle, (a, b) => true);
-               }
-
-               static bool TaskCompletedPredicate (Task self)
-               {
-                       return self.IsCompleted;
-               }
-               
-               public void PulseAll ()
-               {
-                       pulseHandle.Set ();
-               }
-               
-               public void Dispose ()
-               {
-                       foreach (ThreadWorker w in workers)
-                               w.Dispose ();
-               }
-
-               #region Scheduler dummy stubs
-               protected override System.Collections.Generic.IEnumerable<Task> GetScheduledTasks ()
-               {
-                       throw new System.NotImplementedException();
-               }
-
-               protected override bool TryDequeue (Task task)
-               {
-                       throw new System.NotImplementedException();
-               }
-
-               protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued)
-               {
-                       task.Execute (null);
-                       return true;
-               }
-               
-               public override int MaximumConcurrencyLevel {
-                       get {
-                               return base.MaximumConcurrencyLevel;
-                       }
-               }
-               #endregion
-       }
-}
-#endif
diff --git a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskExtensions.cs b/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskExtensions.cs
deleted file mode 100644 (file)
index 1b52857..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// 
-// MonoTaskExtensions.cs
-//  
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-// 
-// Copyright (c) 2011 Jérémie "Garuma" Laval
-// 
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION 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;
-using System.Threading.Tasks;
-using System.Reflection;
-
-namespace Mono.Threading.Tasks
-{
-       public static class MonoTaskExtensions
-       {
-               readonly static Action<Task, Action<Task>> internalExecute = null;
-
-               static MonoTaskExtensions ()
-               {
-                       // Initialize internal execute
-                       var method = typeof(Task).GetMethod ("Execute", BindingFlags.Instance | BindingFlags.NonPublic);
-                       internalExecute = (Action<Task, Action<Task>>)Delegate.CreateDelegate (typeof(Action<Task, Action<Task>>), method);
-               }
-
-               // Allow external worker to call into the otherwise internal corresponding method of Task
-               public static void Execute (this Task task, Action<Task> childWorkAdder)
-               {
-                       internalExecute (task, childWorkAdder);
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskScheduler.cs b/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskScheduler.cs
deleted file mode 100644 (file)
index a21c323..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// 
-// MonoTaskScheduler.cs
-//  
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-// 
-// Copyright (c) 2011 Jérémie "Garuma" Laval
-// 
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION 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;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Mono.Threading.Tasks
-{
-       public interface IMonoTaskScheduler
-       {
-               void MonoParticipateUntil (Task task);
-               bool MonoParticipateUntil (Task task, ManualResetEventSlim predicateEvt, int millisecondsTimeout);
-       }
-}
-
-#endif
diff --git a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/ThreadWorker.cs b/mcs/class/Mono.Parallel/Mono.Threading.Tasks/ThreadWorker.cs
deleted file mode 100644 (file)
index 575763c..0000000
+++ /dev/null
@@ -1,421 +0,0 @@
-// ThreadWorker.cs
-//
-// Copyright (c) 2008 Jérémie "Garuma" Laval
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION 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;
-using System.Threading;
-using System.Collections.Concurrent;
-using System.Threading.Tasks;
-using Watch = System.Diagnostics.Stopwatch;
-
-namespace Mono.Threading.Tasks
-{
-       public class ThreadWorker : IDisposable
-       {
-               Thread workerThread;
-
-               /* This field is used when a TheadWorker have to call Task.Wait
-                * which bring him back here with the static WorkerMethod although
-                * it's more optimized for him to continue calling its own WorkerMethod
-                */
-               [ThreadStatic]
-               static ThreadWorker autoReference;
-               
-               readonly IConcurrentDeque<Task> dDeque;
-               readonly ThreadWorker[]         others;
-               readonly ManualResetEvent       waitHandle;
-               readonly IProducerConsumerCollection<Task> sharedWorkQueue;
-               readonly ThreadPriority         threadPriority;
-
-               // Flag to tell if workerThread is running
-               int started = 0; 
-               
-               readonly int  workerLength;
-               readonly int  workerPosition;
-               const    int  maxRetry = 3;
-               
-               const int sleepThreshold = 100;
-               int deepSleepTime = 8;
-               readonly Action<Task> adder;
-
-               Task currentTask;
-               
-               public ThreadWorker (ThreadWorker[] others,
-                                    int workerPosition,
-                                    IProducerConsumerCollection<Task> sharedWorkQueue,
-                                    IConcurrentDeque<Task> dDeque,
-                                    ThreadPriority priority,
-                                    ManualResetEvent handle)
-               {
-                       this.others          = others;
-                       this.dDeque          = dDeque;
-                       this.sharedWorkQueue = sharedWorkQueue;
-                       this.workerLength    = others.Length;
-                       this.workerPosition  = workerPosition;
-                       this.waitHandle      = handle;
-                       this.threadPriority  = priority;
-                       this.adder           = new Action<Task> (ChildWorkAdder);
-
-                       InitializeUnderlyingThread ();
-               }
-
-               protected virtual void InitializeUnderlyingThread ()
-               {
-                       this.workerThread = new Thread (WorkerMethodWrapper);
-       
-                       this.workerThread.IsBackground = true;
-                       this.workerThread.Priority = threadPriority;
-                       this.workerThread.Name = "ParallelFxThreadWorker";
-               }
-
-               public virtual void Dispose ()
-               {
-                       Stop ();
-                       if (workerThread.ThreadState != ThreadState.Stopped)
-                               workerThread.Abort ();
-               }
-
-               public virtual void Pulse ()
-               {
-                       if (started == 1)
-                               return;
-
-                       // If the thread was stopped then set it in use and restart it
-                       int result = Interlocked.Exchange (ref started, 1);
-                       if (result != 0)
-                               return;
-
-                       if (this.workerThread.ThreadState != ThreadState.Unstarted) {
-                               InitializeUnderlyingThread ();
-                       }
-
-                       workerThread.Start ();
-               }
-
-               public virtual void Stop ()
-               {
-                       // Set the flag to stop so that the while in the thread will stop
-                       // doing its infinite loop.
-                       started = 0;
-               }
-
-               // This is the actual method called in the Thread
-               protected virtual void WorkerMethodWrapper ()
-               {
-                       int sleepTime = 0;
-                       autoReference = this;
-                       bool wasWokenUp = false;
-                       
-                       // Main loop
-                       while (started == 1) {
-                               bool result = false;
-
-                               result = WorkerMethod ();
-                               if (!result && wasWokenUp)
-                                       waitHandle.Reset ();
-                               wasWokenUp = false;
-
-                               Thread.Yield ();
-
-                               if (result) {
-                                       deepSleepTime = 8;
-                                       sleepTime = 0;
-                                       continue;
-                               }
-
-                               // If we are spinning too much, have a deeper sleep
-                               if (++sleepTime > sleepThreshold && sharedWorkQueue.Count == 0) {
-                                       wasWokenUp = waitHandle.WaitOne ((deepSleepTime = deepSleepTime >= 0x4000 ? 0x4000 : deepSleepTime << 1));
-                               }
-                       }
-
-                       started = 0;
-               }
-
-               // Main method, used to do all the logic of retrieving, processing and stealing work.
-               protected virtual bool WorkerMethod ()
-               {
-                       bool result = false;
-                       bool hasStolenFromOther;
-
-                       do {
-                               hasStolenFromOther = false;
-                               
-                               Task value;
-                               
-                               // We fill up our work deque concurrently with other ThreadWorker
-                               while (sharedWorkQueue.Count > 0) {
-                                       waitHandle.Set ();
-
-                                       while (sharedWorkQueue.TryTake (out value)) {
-                                               dDeque.PushBottom (value);
-                                       }
-
-                                       // Now we process our work
-                                       while (dDeque.PopBottom (out value) == PopResult.Succeed) {
-                                               waitHandle.Set ();
-                                               ExecuteTask (value, ref result);
-                                       }
-                               }
-
-                               // When we have finished, steal from other worker
-                               ThreadWorker other;
-                               
-                               // Repeat the operation a little so that we can let other things process.
-                               for (int j = 0; j < maxRetry; ++j) {
-                                       int len = workerLength + workerPosition;
-                                       // Start stealing with the ThreadWorker at our right to minimize contention
-                                       for (int it = workerPosition + 1; it < len; ++it) {
-                                               int i = it % workerLength;
-                                               if ((other = others [i]) == null || other == this)
-                                                       continue;
-                                               
-                                               // Maybe make this steal more than one item at a time, see TODO.
-                                               while (other.dDeque.PopTop (out value) == PopResult.Succeed) {
-                                                       if (!hasStolenFromOther)
-                                                               waitHandle.Set ();
-
-                                                       hasStolenFromOther = true;
-                                                       ExecuteTask (value, ref result);
-                                               }
-                                       }
-                               }
-                       } while (sharedWorkQueue.Count > 0 || hasStolenFromOther);
-                       
-                       return result;
-               }
-
-               void ExecuteTask (Task value, ref bool result)
-               {
-                       if (value == null)
-                               return;
-
-                       var saveCurrent = currentTask;
-                       currentTask = value;
-                       value.Execute (adder);
-                       result = true;
-                       currentTask = saveCurrent;
-               }
-
-               // Almost same as above but with an added predicate and treating one item at a time. 
-               // It's used by Scheduler Participate(...) method for special waiting case like
-               // Task.WaitAll(someTasks) or Task.WaitAny(someTasks)
-               // Predicate should be really fast and not blocking as it is called a good deal of time
-               // Also, the method skip tasks that are LongRunning to avoid blocking (Task are not LongRunning by default)
-               public static void ParticipativeWorkerMethod (Task self,
-                                                             ManualResetEventSlim predicateEvt,
-                                                             int millisecondsTimeout,
-                                                             IProducerConsumerCollection<Task> sharedWorkQueue,
-                                                             ThreadWorker[] others,
-                                                             ManualResetEvent evt,
-                                                             Func<Task, Task, bool> checkTaskFitness)
-               {
-                       const int stage1 = 5, stage2 = 0;
-                       int tries = 50;
-                       WaitHandle[] handles = null;
-                       Watch watch = Watch.StartNew ();
-                       if (millisecondsTimeout == -1)
-                               millisecondsTimeout = int.MaxValue;
-                       bool aggressive = false;
-                       bool hasAutoReference = autoReference != null;
-                       Action<Task> adder = null;
-
-                       while (!predicateEvt.IsSet && watch.ElapsedMilliseconds < millisecondsTimeout && !self.IsCompleted) {
-                               // We try to execute the self task as it may be the simplest way to unlock
-                               // the situation
-                               if (self.Status == TaskStatus.WaitingToRun) {
-                                       self.Execute (hasAutoReference ? autoReference.adder : (Action<Task>)null);
-                                       if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout)
-                                               return;
-                               }
-
-                               Task value;
-                               
-                               // If we are in fact a normal ThreadWorker, use our own deque
-                               if (hasAutoReference) {
-                                       var enumerable = autoReference.dDeque.GetEnumerable ();
-                                       if (adder == null)
-                                               adder = hasAutoReference ? autoReference.adder : (Action<Task>)null;
-
-                                       if (enumerable != null) {
-                                               foreach (var t in enumerable) {
-                                                       if (t == null)
-                                                               continue;
-
-                                                       if (checkTaskFitness (self, t))
-                                                               t.Execute (adder);
-
-                                                       if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout)
-                                                               return;
-                                               }
-                                       }
-                               }
-
-                               int count = sharedWorkQueue.Count;
-
-                               // Dequeue only one item as we have restriction
-                               while (--count >= 0 && sharedWorkQueue.TryTake (out value) && value != null) {
-                                       evt.Set ();
-                                       if (checkTaskFitness (self, value) || aggressive)
-                                               value.Execute (null);
-                                       else {
-                                               if (autoReference == null)
-                                                       sharedWorkQueue.TryAdd (value);
-                                               else
-                                                       autoReference.dDeque.PushBottom (value);
-                                               evt.Set ();
-                                       }
-
-                                       if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout)
-                                               return;
-                               }
-
-                               // First check to see if we comply to predicate
-                               if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout)
-                                       return;
-                               
-                               // Try to complete other work by stealing since our desired tasks may be in other worker
-                               ThreadWorker other;
-                               for (int i = 0; i < others.Length; i++) {
-                                       if ((other = others [i]) == autoReference || other == null)
-                                               continue;
-
-                                       if (other.dDeque.PopTop (out value) == PopResult.Succeed && value != null) {
-                                               evt.Set ();
-                                               if (checkTaskFitness (self, value) || aggressive)
-                                                       value.Execute (null);
-                                               else {
-                                                       if (autoReference == null)
-                                                               sharedWorkQueue.TryAdd (value);
-                                                       else
-                                                               autoReference.dDeque.PushBottom (value);
-                                                       evt.Set ();
-                                               }
-                                       }
-
-                                       if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout)
-                                               return;
-                               }
-
-                               /* Waiting is split in 4 phases
-                                *   - until stage 1 we simply yield the thread to let others add data
-                                *   - between stage 1 and stage2 we use ManualResetEventSlim light waiting mechanism
-                                *   - after stage2 we fall back to the heavier WaitHandle waiting mechanism
-                                *   - if really the situation isn't evolving after a couple of sleep, we disable
-                                *     task fitness check altogether
-                                */
-                               if (--tries > stage1)
-                                       Thread.Yield ();
-                               else if (tries >= stage2)
-                                       predicateEvt.Wait (ComputeTimeout (5, millisecondsTimeout, watch));
-                               else {
-                                       if (tries == stage2 - 1)
-                                               handles = new [] { predicateEvt.WaitHandle, evt };
-                                       System.Threading.WaitHandle.WaitAny (handles, ComputeTimeout (1000, millisecondsTimeout, watch));
-                                       if (tries == stage2 - 10)
-                                               aggressive = true;
-                               }
-                       }
-               }
-
-               public static ThreadWorker AutoReference {
-                       get {
-                               return autoReference;
-                       }
-                       set {
-                               autoReference = value;
-                       }
-               }
-
-               protected IConcurrentDeque<Task> Deque {
-                       get {
-                               return dDeque;
-                       }
-               }
-
-               protected ThreadWorker[] Others {
-                       get {
-                               return others;
-                       }
-               }
-
-               protected ManualResetEvent WaitHandle {
-                       get {
-                               return waitHandle;
-                       }
-               }
-
-               protected ThreadPriority Priority {
-                       get {
-                               return threadPriority;
-                       }
-               }
-
-               protected int WorkerPosition {
-                       get {
-                               return workerPosition;
-                       }
-               }
-
-               protected virtual void ChildWorkAdder (Task t)
-               {
-                       dDeque.PushBottom (t);
-                       waitHandle.Set ();
-               }
-
-               static int ComputeTimeout (int proposed, int timeout, Watch watch)
-               {
-                       return timeout == int.MaxValue ? proposed : System.Math.Min (proposed, System.Math.Max (0, (int)(timeout - watch.ElapsedMilliseconds)));
-               }
-               
-               public bool Finished {
-                       get {
-                               return started == 0;
-                       }
-               }
-
-               public int Id {
-                       get {
-                               return workerThread.ManagedThreadId;
-                       }
-               }
-               
-               public virtual bool Equals (ThreadWorker other)
-               {
-                       return (other == null) ? false : object.ReferenceEquals (this.dDeque, other.dDeque);    
-               }
-               
-               public override bool Equals (object obj)
-               {
-                       ThreadWorker temp = obj as ThreadWorker;
-                       return temp == null ? false : Equals (temp);
-               }
-               
-               public override int GetHashCode ()
-               {
-                       return workerThread.ManagedThreadId.GetHashCode ();
-               }
-       }
-}
-#endif
diff --git a/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskExtensionsTests.cs b/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskExtensionsTests.cs
deleted file mode 100644 (file)
index 62f939b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-// 
-// MonoTaskExtensionsTests.cs
-//  
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-// 
-// Copyright (c) 2011 Jérémie "Garuma" Laval
-// 
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION 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;
-using System.Threading;
-using System.Threading.Tasks;
-
-using Mono.Threading.Tasks;
-
-using NUnit.Framework;
-
-namespace MonoTests.Mono.Threading.Tasks
-{
-       [TestFixtureAttribute]
-       public class MonoTaskExtensionsTests
-       {
-               [Test]
-               public void SimpleExecutionTest ()
-               {
-                       bool executed = false;
-                       Task t = new Task (() => executed = true);
-                       t.Execute (delegate {});
-
-                       Assert.IsTrue (executed);
-               }
-
-               [Test]
-               public void ExecutionWithChildCreationTest ()
-               {
-                       bool executed = false;
-                       bool childRetrieved = false;
-
-                       Task t = new Task (() => { Task.Factory.StartNew (() => Console.WriteLine ("execution")); executed = true; });
-                       t.Execute ((child) => childRetrieved = child != null);
-
-                       Assert.IsTrue (executed);
-                       Assert.IsTrue (childRetrieved);
-               }
-       }
-}
-
-#endif
diff --git a/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskSchedulerTests.cs b/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskSchedulerTests.cs
deleted file mode 100644 (file)
index 31d3b61..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-// 
-// MonoTaskSchedulerTests.cs
-//  
-// Author:
-//       Jérémie "Garuma" Laval <jeremie.laval@gmail.com>
-// 
-// Copyright (c) 2011 Jérémie "Garuma" Laval
-// 
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION 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;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-using Mono.Threading.Tasks;
-
-using NUnit.Framework;
-
-namespace MonoTests.Mono.Threading.Tasks
-{
-       [TestFixtureAttribute]
-       public class MonoTaskSchedulerTests
-       {
-               class DummyScheduler : TaskScheduler, IMonoTaskScheduler
-               {
-                       public bool ParticipateMethod1 {
-                               get; set;
-                       }
-
-                       public bool ParticipateMethod2 {
-                               get; set;
-                       }
-
-                       protected override IEnumerable<Task> GetScheduledTasks ()
-                       {
-                               return Enumerable.Empty<Task> ();
-                       }
-
-                       protected override void QueueTask (Task task)
-                       {
-                               
-                       }
-
-                       protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued)
-                       {
-                               throw new NotSupportedException ();
-                       }
-
-                       public void MonoParticipateUntil (Task task)
-                       {
-                               ParticipateMethod1 = true;
-                       }
-
-                       public bool MonoParticipateUntil (Task task, ManualResetEventSlim predicateEvt, int millisecondsTimeout)
-                       {
-                               ParticipateMethod2 = true;
-                               return true;
-                       }
-               }
-
-               [Test]
-               public void MethodRegisteringTest ()
-               {
-                       DummyScheduler sched = new DummyScheduler ();
-
-                       Task t = new Task (delegate { Thread.Sleep (100); });
-                       t.Start (sched);
-                       t.Wait ();
-
-                       Assert.IsTrue (sched.ParticipateMethod1);
-               }
-
-               [Test]
-               public void Method2RegisteringTest ()
-               {
-                       DummyScheduler sched = new DummyScheduler ();
-
-                       Task t = new Task (delegate { Thread.Sleep (100); });
-                       t.Start (sched);
-                       t.Wait (100);
-
-                       Assert.IsTrue (sched.ParticipateMethod2);
-               }
-
-       }
-}
-
-#endif
index 1161ee4ce8b05f89cc4904ed54595d4911dfda2f..b0a8c4cb312c9739a21d38a6df02988bf874d664 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 7ba53e922bf7d1dd53db2206246a8281c522af7c..0b8f1e6fa028cea47e904a1fbb9ce1a061dbc9c7 100644 (file)
@@ -2842,7 +2842,7 @@ namespace Mono.Unix.Native {
                        ee.events = events;
                        ee.fd = fd;
 
-                       return sys_epoll_ctl (epfd, op, fd, ref ee);
+                       return epoll_ctl (epfd, op, fd, ref ee);
                }
 
                public static int epoll_wait (int epfd, EpollEvent [] events, int max_events, int timeout)
@@ -2860,7 +2860,7 @@ namespace Mono.Unix.Native {
                private static extern int sys_epoll_create1 (EpollFlags flags);
 
                [DllImport (LIBC, SetLastError=true, EntryPoint="epoll_ctl")]
-               private static extern int sys_epoll_ctl (int epfd, EpollOp op, int fd, ref EpollEvent ee);
+               public static extern int epoll_ctl (int epfd, EpollOp op, int fd, ref EpollEvent ee);
 
                [DllImport (LIBC, SetLastError=true, EntryPoint="epoll_wait")]
                private static extern int sys_epoll_wait (int epfd, EpollEvent [] ee, int maxevents, int timeout);
index fa7a6d50843cbabd92e2d10803829b7de7fa54f2..1b8525bd30d0cdda14fed059ceb337657c11a9b8 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
@@ -83,7 +84,7 @@
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 0c0f4a628139d8d0ce73a35f629bae913a73556c..1de32f0bb99eefaa164040a8c31f92b9be5bae84 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-bare-net_4_5.csproj">\r
       <Project>{91CDF14E-F60F-4AB7-BC9D-5CBD7E669076}</Project>\r
-      <Name>System\System-bare-net_4_5</Name>\r
+      <Name>System-bare-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index a00ab1b55a33083eacf78a41b8539ce2a691e653..3da8463338b3f21468e6b54c4b8acd309676e3b2 100644 (file)
     <Compile Include="Test\Mono.Security.Protocol.Ntlm\Type1MessageTest.cs" />\r
     <Compile Include="Test\Mono.Security.Protocol.Ntlm\Type2MessageTest.cs" />\r
     <Compile Include="Test\Mono.Security.Protocol.Ntlm\Type3MessageTest.cs" />\r
+    <Compile Include="Test\Mono.Security.X509.Extensions\AuthorityKeyIdentifierExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\BasicConstraintsExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\ExtendedKeyUsageExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\KeyUsageExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\SubjectAltNameExtensionTest.cs" />\r
+    <Compile Include="Test\Mono.Security.X509.Extensions\SubjectKeyIdentifierExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509\PKCS12Test.cs" />\r
     <Compile Include="Test\Mono.Security.X509\X501NameTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509\X509CertificateTest.cs" />\r
index 4b1f0c56c9a71a7ca7d84694aa39021a8d6b4123..fa6828bdb8a461df196e64bf44774c8fcb7be391 100644 (file)
     <Compile Include="Test\Mono.Security.Protocol.Ntlm\Type1MessageTest.cs" />\r
     <Compile Include="Test\Mono.Security.Protocol.Ntlm\Type2MessageTest.cs" />\r
     <Compile Include="Test\Mono.Security.Protocol.Ntlm\Type3MessageTest.cs" />\r
+    <Compile Include="Test\Mono.Security.X509.Extensions\AuthorityKeyIdentifierExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\BasicConstraintsExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\ExtendedKeyUsageExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\KeyUsageExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\SubjectAltNameExtensionTest.cs" />\r
+    <Compile Include="Test\Mono.Security.X509.Extensions\SubjectKeyIdentifierExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509\PKCS12Test.cs" />\r
     <Compile Include="Test\Mono.Security.X509\X501NameTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509\X509CertificateTest.cs" />\r
index 27e8ad50ba5804add70d49516384b6627646c093..9f6dd3aab9c7f7bc086348d1e5edae69ef4a990c 100644 (file)
     <Compile Include="Test\Mono.Security.Protocol.Ntlm\Type1MessageTest.cs" />\r
     <Compile Include="Test\Mono.Security.Protocol.Ntlm\Type2MessageTest.cs" />\r
     <Compile Include="Test\Mono.Security.Protocol.Ntlm\Type3MessageTest.cs" />\r
+    <Compile Include="Test\Mono.Security.X509.Extensions\AuthorityKeyIdentifierExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\BasicConstraintsExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\ExtendedKeyUsageExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\KeyUsageExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509.Extensions\SubjectAltNameExtensionTest.cs" />\r
+    <Compile Include="Test\Mono.Security.X509.Extensions\SubjectKeyIdentifierExtensionTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509\PKCS12Test.cs" />\r
     <Compile Include="Test\Mono.Security.X509\X501NameTest.cs" />\r
     <Compile Include="Test\Mono.Security.X509\X509CertificateTest.cs" />\r
index 3fae43a49268cf3aa3d7c35580e7980253949a6c..38b1dea8de92589abbc76003df5fe9d53a55034f 100644 (file)
@@ -156,9 +156,9 @@ namespace Mono.Security.Cryptography {
                // clear keys
                protected override void Dispose(bool disposing) {
                        if (!m_Disposed) {
-                               m_P.Clear();
-                               m_G.Clear();
-                               m_X.Clear();
+                               if (m_P != null) m_P.Clear();
+                               if (m_G != null) m_G.Clear();
+                               if (m_X != null) m_X.Clear();
                        }
                        m_Disposed = true;
                }
index 9c406a200c73b9c557c78bac455378663640b2a3..5d798ac5d22188b21bbd7d9c6aae6bbe7e1cf1ec 100644 (file)
@@ -303,6 +303,10 @@ namespace Mono.Security.Cryptography {
        
                        e = new BigInteger (parameters.Exponent);
                        n = new BigInteger (parameters.Modulus);
+                       
+                       //reset all private key values to null
+                       d = dp = dq = qInv = p = q = null;
+                       
                        // only if the private key is present
                        if (parameters.D != null)
                                d = new BigInteger (parameters.D);
index fb6f940a1ecbc9f4355bf11602c330229ed75bda..858ee1e7e59895c7cbe55cee79deb47da343127c 100644 (file)
@@ -87,6 +87,18 @@ namespace Mono.Security.X509.Extensions {
                        }
                }
 
+               protected override void Encode ()
+               {
+                       ASN1 seq = new ASN1 (0x30);
+                       if (aki == null) {
+                               throw new InvalidOperationException ("Invalid AuthorityKeyIdentifier extension");
+                       }
+
+                       seq.Add (new ASN1 (0x80, aki));
+                       extnValue = new ASN1 (0x04);
+                       extnValue.Add (seq);
+               }
+
                public override string Name {
                        get { return "Authority Key Identifier"; }
                }
@@ -97,6 +109,7 @@ namespace Mono.Security.X509.Extensions {
                                        return null;
                                return (byte[]) aki.Clone (); 
                        }
+                       set { aki = value; }
                }
 
                public override string ToString () 
index 945111675e3b95e3169422f01a56d1c099bba9a7..8f15c28e34a13d7595f53f073b46fcec1cd19743 100644 (file)
@@ -75,6 +75,17 @@ namespace Mono.Security.X509.Extensions {
                        ski = sequence.Value;
                }
 
+               protected override void Encode ()
+               {
+                       if (ski == null) {
+                               throw new InvalidOperationException ("Invalid SubjectKeyIdentifier extension");
+                       }
+
+                       var seq = new ASN1 (0x04, ski);
+                       extnValue = new ASN1 (0x04);
+                       extnValue.Add (seq);
+               }
+
                public override string Name {
                        get { return "Subject Key Identifier"; }
                }
@@ -85,6 +96,7 @@ namespace Mono.Security.X509.Extensions {
                                        return null;
                                return (byte[]) ski.Clone (); 
                        }
+                       set { ski = value; }
                }
 
                public override string ToString () 
index 16777e98972ecb045e113c3c24db2d312980a8ae..9d5ac35f66a98d80bdbb38d92bb63566bca9a5a1 100644 (file)
@@ -37,7 +37,9 @@ Mono.Security.X509/X501NameTest.cs
 Mono.Security.X509/X509CertificateTest.cs
 Mono.Security.X509/X509CrlTest.cs
 Mono.Security.X509/X520AttributesTest.cs
+Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtensionTest.cs
 Mono.Security.X509.Extensions/KeyUsageExtensionTest.cs
 Mono.Security.X509.Extensions/ExtendedKeyUsageExtensionTest.cs
 Mono.Security.X509.Extensions/BasicConstraintsExtensionTest.cs
 Mono.Security.X509.Extensions/SubjectAltNameExtensionTest.cs
+Mono.Security.X509.Extensions/SubjectKeyIdentifierExtensionTest.cs
index 10b8a12339d3a4d4508cf8f357f0fb91c069222a..5b30c72f2e4492b9b9503d72017dd0d983ba74dd 100644 (file)
@@ -545,5 +545,25 @@ namespace MonoTests.Mono.Security.Cryptography {
                        byte [] bytes = Convert.FromBase64String (b64);
                        rsa.DecryptValue (bytes);
                }
+               
+               [Test]
+               public void Bug18482 ()
+               {
+                       RSAManaged privateRsa = new RSAManaged ();
+                       privateRsa.FromXmlString (MonoXml384);
+                       
+                       var rsaParameters = privateRsa.ExportParameters (false);
+                       
+                       RSAManaged publicRsa = new RSAManaged ();
+                       
+                       //Generates a key pair with private key values
+                       publicRsa.ExportParameters (false);
+                       
+                       //Sets public key values and should reset private key values
+                       publicRsa.ImportParameters (rsaParameters);
+                       
+                       //Should export valid parameters without throwing an exception.
+                       publicRsa.ExportParameters (false);
+               }
        }
 }
diff --git a/mcs/class/Mono.Security/Test/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtensionTest.cs b/mcs/class/Mono.Security/Test/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtensionTest.cs
new file mode 100644 (file)
index 0000000..e095df4
--- /dev/null
@@ -0,0 +1,122 @@
+//
+// AuthorityKeyIdentifierExtensionTest.cs - NUnit Test Cases for 
+//     Mono.Security.X509.Extensions.AuthorityKeyIdentifierExtension
+//
+// Authors:
+//     Lex Li  <support@lextm.com>
+//
+// Copyright (C) 2014 Lex Li
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+using System;
+using Mono.Security.X509.Extensions;
+using NUnit.Framework;
+
+namespace MonoTests.Mono.Security.X509.Extensions
+{
+       [TestFixture]
+       public class AuthorityKeyIdentifierExtensionTest
+       {
+               private void Empty (AuthorityKeyIdentifierExtension aki)
+               {
+                       Assert.IsFalse (aki.Critical, "Critical");
+                       Assert.AreEqual ("2.5.29.35", aki.Oid, "Oid");
+                       Assert.IsNotNull (aki.Name, "Name");
+                       Assert.IsFalse (aki.Name == aki.Oid, "Name!=Oid");
+                       Assert.AreEqual (new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       }, aki.Identifier, "Identifier");
+               }
+
+               [Test]
+               public void Constructor_Empty ()
+               {
+                       AuthorityKeyIdentifierExtension aki = new AuthorityKeyIdentifierExtension ();
+                       aki.Identifier = new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       };
+                       Empty (aki);
+               }
+
+               [Test]
+               public void Constructor_Extension ()
+               {
+                       AuthorityKeyIdentifierExtension ext = new AuthorityKeyIdentifierExtension ();
+                       ext.Identifier = new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       };
+                       AuthorityKeyIdentifierExtension aki = new AuthorityKeyIdentifierExtension (ext);
+                       Empty (aki);
+               }
+
+               [Test]
+               public void Constructor_ASN1 ()
+               {
+                       AuthorityKeyIdentifierExtension ext = new AuthorityKeyIdentifierExtension ();
+                       ext.Identifier = new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       };
+                       AuthorityKeyIdentifierExtension aki = new AuthorityKeyIdentifierExtension (ext.ASN1);
+                       Empty (aki);
+               }
+
+               [Test]
+               public void AuthorityKeyIdentifier_Critical ()
+               {
+                       AuthorityKeyIdentifierExtension aki = new AuthorityKeyIdentifierExtension ();
+                       aki.Critical = true;
+                       aki.Identifier = new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       };
+                       Assert.AreEqual ("30-22-06-03-55-1D-23-01-01-FF-04-18-30-16-80-14-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00", BitConverter.ToString (aki.GetBytes ()), "GetBytes");
+
+                       AuthorityKeyIdentifierExtension aki2 = new AuthorityKeyIdentifierExtension (aki.ASN1);
+                       Assert.IsTrue (aki2.Critical, "Critical");
+                       Assert.AreEqual (new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       }, aki2.Identifier, "Identifier");
+               }
+
+               [Test]
+               [ExpectedException (typeof(InvalidOperationException))]
+               public void EmptyIdentifier ()
+               {
+                       AuthorityKeyIdentifierExtension ext = new AuthorityKeyIdentifierExtension ();
+                       AuthorityKeyIdentifierExtension aki = new AuthorityKeyIdentifierExtension (ext);
+                       Empty (aki);
+               }
+       }
+}
diff --git a/mcs/class/Mono.Security/Test/Mono.Security.X509.Extensions/SubjectKeyIdentifierExtensionTest.cs b/mcs/class/Mono.Security/Test/Mono.Security.X509.Extensions/SubjectKeyIdentifierExtensionTest.cs
new file mode 100644 (file)
index 0000000..5acdd73
--- /dev/null
@@ -0,0 +1,122 @@
+//
+// SubjectKeyIdentifierExtensionTest.cs - NUnit Test Cases for 
+//     Mono.Security.X509.Extensions.SubjectKeyIdentifierExtension
+//
+// Authors:
+//     Lex Li  <support@lextm.com>
+//
+// Copyright (C) 2014 Lex Li
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+using System;
+using Mono.Security.X509.Extensions;
+using NUnit.Framework;
+
+namespace MonoTests.Mono.Security.X509.Extensions
+{
+       [TestFixture]
+       public class SubjectKeyIdentifierExtensionTest
+       {
+               private void Empty (SubjectKeyIdentifierExtension ski)
+               {
+                       Assert.IsFalse (ski.Critical, "Critical");
+                       Assert.AreEqual ("2.5.29.14", ski.Oid, "Oid");
+                       Assert.IsNotNull (ski.Name, "Name");
+                       Assert.IsFalse (ski.Name == ski.Oid, "Name!=Oid");
+                       Assert.AreEqual (new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       }, ski.Identifier, "Identifier");
+               }
+
+               [Test]
+               public void Constructor_Empty ()
+               {
+                       SubjectKeyIdentifierExtension ski = new SubjectKeyIdentifierExtension ();
+                       ski.Identifier = new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       };
+                       Empty (ski);
+               }
+
+               [Test]
+               public void Constructor_Extension ()
+               {
+                       SubjectKeyIdentifierExtension ext = new SubjectKeyIdentifierExtension ();
+                       ext.Identifier = new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       };
+                       SubjectKeyIdentifierExtension ski = new SubjectKeyIdentifierExtension (ext);
+                       Empty (ski);
+               }
+
+               [Test]
+               public void Constructor_ASN1 ()
+               {
+                       SubjectKeyIdentifierExtension ext = new SubjectKeyIdentifierExtension ();
+                       ext.Identifier = new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       };
+                       SubjectKeyIdentifierExtension ski = new SubjectKeyIdentifierExtension (ext.ASN1);
+                       Empty (ski);
+               }
+
+               [Test]
+               public void AuthorityKeyIdentifier_Critical ()
+               {
+                       SubjectKeyIdentifierExtension ski = new SubjectKeyIdentifierExtension ();
+                       ski.Critical = true;
+                       ski.Identifier = new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       };
+                       Assert.AreEqual ("30-20-06-03-55-1D-0E-01-01-FF-04-16-04-14-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00", BitConverter.ToString (ski.GetBytes ()), "GetBytes");
+
+                       SubjectKeyIdentifierExtension ski2 = new SubjectKeyIdentifierExtension (ski.ASN1);
+                       Assert.IsTrue (ski2.Critical, "Critical");
+                       Assert.AreEqual (new byte[] {
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00,
+                               0x00, 0x00, 0x00, 0x00, 0x00
+                       }, ski2.Identifier, "Identifier");
+               }
+
+               [Test]
+               [ExpectedException (typeof(InvalidOperationException))]
+               public void EmptyIdentifier ()
+               {
+                       SubjectKeyIdentifierExtension ext = new SubjectKeyIdentifierExtension ();
+                       SubjectKeyIdentifierExtension ski = new SubjectKeyIdentifierExtension (ext);
+                       Empty (ski);
+               }
+       }
+}
index 1c5d3c8655f444c6ed917c6dde41c71deba610cf..14595b380787265c3e41be215b2c0f28105392c0 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index f7b41bb32cdbfb49a031611272f45103e9d18d05..f74e4b7e54dfa770d3512cc13c6028eeb36e48ac 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
@@ -73,7 +74,7 @@
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 318b19b20b56fc51ae0f10acb67f2b867eafec55..998b16d4bbd397b8053f0690d66ff342c5b8811f 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 7bb9cb88199c806700af7d51a7d70b6412233d77..965e4b4975233fe5428bbdbdc43bf8ee204bf3c5 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1fb94134719e825f959b014e0571d8411529b8dd..2de21cef819d122122c6c14794bb98594dec6630 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index a388fd751bead4a85b42beff026adedad5ddeba4..f2d7caef871ec1d0cd13caa5d12c62582d521be3 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index ce84b0fd4c8d042abcdb1928ab0e55f586899942..13b2303bdad90ab1bd30c400016459bfcd3734bb 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 903039d5b80d7b098741a8beebe548926cffce4f..222ab037c1ea297db5ca01057826ed8a3002d597 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 9ae7d6af649831b57db4af3b7edab6cb59c5ad3e..8d3bca2afa34a4fd78d2b4adca923e034bd83c14 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../../../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 5072270d8f163d54f087bb53de3572c8780f98ae..ac779fcd516ac6b124bcc046f3a16e52dbaf5f0b 100644 (file)
@@ -22,10 +22,8 @@ src/ComponentModel/Microsoft/Internal/GenerationServices.cs
 src/ComponentModel/Microsoft/Internal/Runtime/Serialization/SerializationServices.cs
 src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.cs
 src/ComponentModel/Microsoft/Internal/Collections/WeakReferenceCollection.cs
-src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs
 src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.CollectionOfObject.cs
 src/ComponentModel/Microsoft/Internal/Collections/EnumerableCardinality.cs
-src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs
 src/ComponentModel/System/LazyOfTTMetadata.cs
 src/ComponentModel/System/ComponentModel/Composition/PartMetadataAttribute.cs
 src/ComponentModel/System/ComponentModel/Composition/ExceptionBuilder.cs
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs
deleted file mode 100644 (file)
index 0326931..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-// -----------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation.  All rights reserved.
-// -----------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using Microsoft.Internal;
-
-// This is using the desktop namespace for ReadOnlyDictionary, the source code is in Microsoft\Internal\Collections to keep it seperate from the main MEF codebase.
-namespace System.Collections.ObjectModel
-{
-    
-    [DebuggerDisplay("Count = {Count}")]
-    [DebuggerTypeProxy(typeof(ReadOnlyDictionaryDebuggerProxy<,>))]
-    internal sealed partial class ReadOnlyDictionary<TKey, TValue> : IDictionary<TKey, TValue>
-    {
-        private readonly IDictionary<TKey, TValue> _innerDictionary;
-
-        public ReadOnlyDictionary(IDictionary<TKey, TValue> dictionary)
-        {
-            this._innerDictionary = dictionary ?? new Dictionary<TKey, TValue>(0);
-        }
-
-        public int Count
-        {
-            get { return this._innerDictionary.Count; }
-        }
-
-        public bool IsReadOnly
-        {
-            get { return true; }
-        }
-
-        public ICollection<TKey> Keys
-        {
-            get { return this._innerDictionary.Keys; }
-        }
-
-        public TValue this[TKey key]
-        {
-            get { return this._innerDictionary[key]; }
-            set { throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); }
-        }
-
-        public ICollection<TValue> Values
-        {
-            get { return this._innerDictionary.Values; }
-        }
-
-        public bool Contains(KeyValuePair<TKey, TValue> item)
-        {
-            return this._innerDictionary.Contains(item);
-        }
-
-        public bool ContainsKey(TKey key)
-        {
-            return this._innerDictionary.ContainsKey(key);
-        }
-
-        public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
-        {
-            this._innerDictionary.CopyTo(array, arrayIndex);
-        }
-
-        public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
-        {
-            return this._innerDictionary.GetEnumerator();
-        }
-
-        public bool TryGetValue(TKey key, out TValue value)
-        {
-            return this._innerDictionary.TryGetValue(key, out value);
-        }
-
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return this._innerDictionary.GetEnumerator();
-        }
-
-        void IDictionary<TKey, TValue>.Add(TKey key, TValue value)
-        {
-            throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
-        }
-
-        void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
-        {
-            throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
-        }
-
-        void ICollection<KeyValuePair<TKey, TValue>>.Clear()
-        {
-            throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
-        }
-
-        bool IDictionary<TKey, TValue>.Remove(TKey key)
-        {
-            throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
-        }
-
-        bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
-        {
-            throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
-        }
-    }
-}
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs
deleted file mode 100644 (file)
index 9dda8f4..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// -----------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation.  All rights reserved.
-// -----------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using Microsoft.Internal;
-
-namespace System.Collections.ObjectModel
-{
-
-    // NOTE: This type cannot be a nested proxy of ReadOnlyDictionary due to a bug 
-    // in the Visual Studio Debugger which causes it to ignore nested generic proxies.
-    internal class ReadOnlyDictionaryDebuggerProxy<TKey, TValue>
-    {
-        private readonly ReadOnlyDictionary<TKey, TValue> _dictionary;
-        
-        public ReadOnlyDictionaryDebuggerProxy(ReadOnlyDictionary<TKey, TValue> dictionary)
-        {
-            Requires.NotNull(dictionary, "dictionary");
-            
-            _dictionary = dictionary;
-        }
-
-        [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
-        public KeyValuePair<TKey, TValue>[] Items
-        {
-            // NOTE: This shouldn't be cached, so that on every query of
-            // the current value of the underlying dictionary is respected.
-            get { return this._dictionary.ToArray(); }
-        }
-    }
-}
index 491ad795085e50a1ae44d8337e36ad94967dc3fb..9b6a7217eb1d210a862e1c3d269954a02f39d45e 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 34e4a621000703295655ce71bfab22bfd9c80ade..c0b799cf8b2245eeff47d91ad3235112b7dbe2c9 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 9cd827887cfbd802586976907fddc8330ba99525..ec4da6c37ab628498a0d3b54529edc228ba06c3d 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index b52020dc0be4f5892ac95a00315cb89ab85f7885..a4c37a0fd4530e8ab6d6839095dfb5ecbf3fb42a 100644 (file)
@@ -1,12 +1,14 @@
 thisdir = class/System.Configuration
 SUBDIRS =
+
 include ../../build/rules.make
 
 LIBRARY = System.Configuration.dll
 
 LOCAL_MCS_FLAGS = -lib:$(secxml_libdir) -lib:$(bare_libdir)
+test_remove = $(LOCAL_MCS_FLAGS)
 LIB_MCS_FLAGS = -r:$(corlib) -r:System.dll -r:System.Xml.dll -r:System.Security.dll -nowarn:618 
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) 
 
 include ../../build/library.make
 
index ab5314c23ae018c46111b14691d965699c907b51..c4858d21b4113605309728db0e5805c61e581c58 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-secxml-net_4_5.csproj">\r
       <Project>{46F151F2-A422-4A1B-9D29-2E148CE73629}</Project>\r
-      <Name>System\System-secxml-net_4_5</Name>\r
+      <Name>System-secxml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-bare-net_4_5.csproj">\r
       <Project>{21FB091E-0F84-479E-AB16-6503D36852F9}</Project>\r
-      <Name>System.XML\System.Xml-bare-net_4_5</Name>\r
+      <Name>System.Xml-bare-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Security/System.Security-net_4_5.csproj">\r
       <Project>{B55E59B2-31CA-438B-ADB8-4B9A9A547830}</Project>\r
-      <Name>System.Security\System.Security-net_4_5</Name>\r
+      <Name>System.Security-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index b7cf6b04c72093539233a2f2a9a619887d59faa5..73f12afc504a0aaea142992804e9cb6eb5c2ecb6 100644 (file)
@@ -37,14 +37,17 @@ using Microsoft.Win32.SafeHandles;
 namespace Microsoft.Win32.SafeHandles
 {
        public sealed class SafeMemoryMappedViewHandle : SafeBuffer {
-               internal SafeMemoryMappedViewHandle (IntPtr handle, long size) : base (true) {
-                       this.handle = handle;
+               IntPtr mmap_handle;
+
+               internal SafeMemoryMappedViewHandle (IntPtr mmap_handle, IntPtr base_address, long size) : base (true) {
+                       this.mmap_handle = mmap_handle;
+                       this.handle = base_address;
                        Initialize ((ulong)size);
                }
 
                protected override bool ReleaseHandle () {
                        if (this.handle != (IntPtr) (-1))
-                               return MemoryMapImpl.Unmap (this.handle, ByteLength);
+                               return MemoryMapImpl.Unmap (this.mmap_handle);
                        throw new NotImplementedException ();
                }
        }
index 3808b8457ab5cd2c8cc46454eb461e0366ecce72..d749c862b5d95e60f5b8a03379aec66cd6c6a985 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Posix/Mono.Posix-net_4_5.csproj">\r
       <Project>{85A9B29B-58FF-4FBE-8998-B0A89AC22880}</Project>\r
-      <Name>Mono.Posix\Mono.Posix-net_4_5</Name>\r
+      <Name>Mono.Posix-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index fa259cd1e078314c300ae08a6f392f6bd362457e..2d1945f82ce041891c5d10035d6dcb7705647d62 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Posix/Mono.Posix-net_4_5.csproj">\r
       <Project>{85A9B29B-58FF-4FBE-8998-B0A89AC22880}</Project>\r
-      <Name>Mono.Posix\Mono.Posix-net_4_5</Name>\r
+      <Name>Mono.Posix-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 20973c00c6549f335cc00dce8069ff044925efc7..feaaa5ab98493990f371a852f448aaddf549e297 100644 (file)
@@ -25,7 +25,6 @@
 // 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;
@@ -33,425 +32,84 @@ using System.IO;
 using System.Collections.Generic;
 using Microsoft.Win32.SafeHandles;
 using System.Runtime.InteropServices;
-
-
-#if !MOBILE
-using Mono.Unix.Native;
-using Mono.Unix;
-#else
 using System.Runtime.CompilerServices;
-#endif
+
 
 namespace System.IO.MemoryMappedFiles
 {
-#if !MOBILE
-       internal static class MemoryMapImpl {
-               //
-               // Turns the FileMode into the first half of open(2) flags
-               //
-               static OpenFlags ToUnixMode (FileMode mode)
-               {
-                       switch (mode){
-                       case FileMode.CreateNew:
-                               return OpenFlags.O_CREAT | OpenFlags.O_EXCL;
-                               
-                       case FileMode.Create:
-                               return OpenFlags.O_CREAT | OpenFlags.O_TRUNC;
-                               
-                       case FileMode.OpenOrCreate:
-                               return OpenFlags.O_CREAT;
-                               
-                       case FileMode.Truncate:
-                               return OpenFlags.O_TRUNC;
-                               
-                       case FileMode.Append:
-                               return OpenFlags.O_APPEND;
-                       default:
-                       case FileMode.Open:
-                               return 0;
-                       }
-               }
-
-               //
-               // Turns the MemoryMappedFileAccess into the second half of open(2) flags
-               //
-               static OpenFlags ToUnixMode (MemoryMappedFileAccess access)
-               {
-                       switch (access){
-                       case MemoryMappedFileAccess.CopyOnWrite:
-                       case MemoryMappedFileAccess.ReadWriteExecute:
-                       case MemoryMappedFileAccess.ReadWrite:
-                               return OpenFlags.O_RDWR;
-                               
-                       case MemoryMappedFileAccess.Write:
-                               return OpenFlags.O_WRONLY;
-
-                       case MemoryMappedFileAccess.ReadExecute:
-                       case MemoryMappedFileAccess.Read:
-                       default:
-                               return OpenFlags.O_RDONLY;
-                       }
-               }
-
-               static MmapProts ToUnixProts (MemoryMappedFileAccess access)
-               {
-                       switch (access){
-                       case MemoryMappedFileAccess.ReadWrite:
-                               return MmapProts.PROT_WRITE | MmapProts.PROT_READ;
-                               
-                       case MemoryMappedFileAccess.Write:
-                               return MmapProts.PROT_WRITE;
-                               
-                       case MemoryMappedFileAccess.CopyOnWrite:
-                               return MmapProts.PROT_WRITE | MmapProts.PROT_READ;
-                               
-                       case MemoryMappedFileAccess.ReadExecute:
-                               return MmapProts.PROT_EXEC;
-                               
-                       case MemoryMappedFileAccess.ReadWriteExecute:
-                               return MmapProts.PROT_WRITE | MmapProts.PROT_READ | MmapProts.PROT_EXEC;
-                               
-                       case MemoryMappedFileAccess.Read:
-                       default:
-                               return MmapProts.PROT_READ;
-                       }
-               }
-
-               internal static int Open (string path, FileMode mode, ref long capacity, MemoryMappedFileAccess access)
-               {
-                       if (MonoUtil.IsUnix){
-                               Stat buf;
-                               if (Syscall.stat (path, out buf) == -1)
-                                       UnixMarshal.ThrowExceptionForLastError ();
-
-                               if (capacity == 0) {
-                                       // Special files such as FIFOs, sockets, and devices can
-                                       // have a size of 0. Specifying a capacity for these
-                                       // also makes little sense, so don't do the check if the
-                                       // file is one of these.
-                                       if (buf.st_size == 0 &&
-                                               (buf.st_mode & (FilePermissions.S_IFCHR |
-                                                               FilePermissions.S_IFBLK |
-                                                               FilePermissions.S_IFIFO |
-                                                               FilePermissions.S_IFSOCK)) == 0) {
-                                               throw new ArgumentException ("A positive capacity must be specified for a Memory Mapped File backed by an empty file.");
-                                       }
-
-                                       capacity = buf.st_size;
-                               } else if (capacity < buf.st_size) {
-                                       throw new ArgumentException ("The capacity may not be smaller than the file size.");
-                               }
-
-                               int fd = Syscall.open (path, ToUnixMode (mode) | ToUnixMode (access), FilePermissions.DEFFILEMODE);
-
-                               if (fd == -1)
-                                       UnixMarshal.ThrowExceptionForLastError ();
-                               return fd;
-                       }
-
-                       throw new NotImplementedException ();
-               }
-               
-               internal static void CloseFD (int fd) {
-                       Syscall.close (fd);
-               }
-
-               internal static void Flush (int fd) {
-                       if (MonoUtil.IsUnix)
-                               Syscall.fsync (fd);
-                       else
-                               throw new NotImplementedException ("Not implemented on Windows");
-                       
-               }
-
-               static int pagesize;
-
-               internal static unsafe void Map (int file_handle, long offset, ref long size, MemoryMappedFileAccess access, out IntPtr map_addr, out int offset_diff)
-               {
-                       if (!MonoUtil.IsUnix)
-                               throw new NotImplementedException ("Not implemented on windows.");
-
-                       if (pagesize == 0)
-                               pagesize = Syscall.getpagesize ();
-
-                       Stat buf;
-                       Syscall.fstat (file_handle, out buf);
-                       long fsize = buf.st_size;
-
-                       if (size == 0 || size > fsize)
-                               size = fsize;
-                       
-                       // Align offset
-                       long real_offset = offset & ~(pagesize - 1);
-
-                       offset_diff = (int)(offset - real_offset);
-
-                       // FIXME: Need to determine the unix fd for the file, Handle is only
-                       // equal to it by accident
-                       //
-                       // The new API no longer uses FileStream everywhere, but exposes instead
-                       // the filename (with one exception), we could move this API to use
-                       // file descriptors instead of the FileStream plus its Handle.
-                       //
-                       map_addr = Syscall.mmap (IntPtr.Zero, (ulong) size,
-                                                ToUnixProts (access),
-                                                access == MemoryMappedFileAccess.CopyOnWrite ? MmapFlags.MAP_PRIVATE : MmapFlags.MAP_SHARED,
-                                                file_handle, real_offset);
-
-                       if (map_addr == (IntPtr)(-1))
-                               throw new IOException ("mmap failed for fd#" + file_handle + "(" + offset + ", " + size + ")");
-               }
-
-               internal static bool Unmap (IntPtr map_addr, ulong map_size)
-               {
-                       if (!MonoUtil.IsUnix)
-                               return false;
-                       return Syscall.munmap (map_addr, map_size) == 0;
-               }
-
-               static void ConfigureUnixFD (IntPtr handle, HandleInheritability h)
-               {
-                       // TODO: Mono.Posix is lacking O_CLOEXEC definitions for fcntl.
-               }
-
-
-               [DllImport("kernel32", SetLastError = true)]
-               static extern bool SetHandleInformation (IntPtr hObject, int dwMask, int dwFlags);
-               static void ConfigureWindowsFD (IntPtr handle, HandleInheritability h)
-               {
-                       SetHandleInformation (handle, 1 /* FLAG_INHERIT */, h == HandleInheritability.None ? 0 : 1);
-               }
-               
-               internal static void ConfigureFD (IntPtr handle, HandleInheritability inheritability)
-               {
-                       if (MonoUtil.IsUnix)
-                               ConfigureUnixFD (handle, inheritability);
-                       else
-                               ConfigureWindowsFD (handle, inheritability);
-               }
-
-       }
-#else
        internal static class MemoryMapImpl {
-               [DllImport ("libc")]
-               static extern int fsync (int fd);
-
-               [DllImport ("libc")]
-               static extern int close (int fd);
-
-               [DllImport ("libc")]
-               static extern int fcntl (int fd, int cmd, int arg0);
-
-               //XXX check if android off_t is 64bits or not. on iOS / darwin it is.
-               [DllImport ("libc")]
-               static extern IntPtr mmap (IntPtr addr, IntPtr len, int prot, int flags, int fd, long offset);
-
-               [DllImport ("libc")]
-               static extern int munmap (IntPtr addr, IntPtr size);
-
-               [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);
+               static extern IntPtr OpenFileInternal (string path, FileMode mode, string mapName, out long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, out int error);
 
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               static extern long mono_filesize_from_fd (int fd);
+               static extern IntPtr OpenHandleInternal (IntPtr handle, string mapName, out long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, out int error);
 
-               //Values valid on iOS/OSX and android ndk r6
-               const int F_GETFD = 1;
-               const int F_SETFD = 2;
-               const int FD_CLOEXEC = 1;
-               const int DEFFILEMODE = 0x666;
-
-               const int O_RDONLY = 0x0;
-               const int O_WRONLY = 0x1;
-               const int O_RDWR   = 0x2;
-
-               const int PROT_READ  = 0x1;
-               const int PROT_WRITE = 0x2;
-               const int PROT_EXEC  = 0x4;
-
-               const int MAP_PRIVATE = 0x2;
-               const int MAP_SHARED  = 0x1;
-
-               const int EINVAL = 22;
-
-#if MONODROID
-               const int O_CREAT = 0x040;
-               const int O_TRUNC = 0x080;
-               const int O_EXCL  = 0x200;
-
-               const int ENAMETOOLONG = 63;
-#else
-               /* MONOTOUCH - usr/include/sys/fcntl.h */
-               const int O_CREAT = 0x0200;
-               const int O_TRUNC = 0x0400;
-               const int O_EXCL  = 0x0800;
-
-               // usr/include/sys/errno.h
-               const int ENAMETOOLONG = 63;
-#endif
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               internal extern static void CloseMapping (IntPtr handle);
 
-               static int ToUnixMode (FileMode mode)
-               {
-                       switch (mode) {
-                       case FileMode.CreateNew:
-                               return O_CREAT | O_EXCL;
-                               
-                       case FileMode.Create:
-                               return O_CREAT | O_TRUNC;
-                               
-                       case FileMode.OpenOrCreate:
-                               return O_CREAT;
-                               
-                       case FileMode.Truncate:
-                               return O_TRUNC;
-                       default:
-                       case FileMode.Open:
-                               return 0;
-                       }
-               }
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               internal extern static void Flush (IntPtr file_handle);
 
-               //
-               // Turns the MemoryMappedFileAccess into the second half of open(2) flags
-               //
-               static int ToUnixMode (MemoryMappedFileAccess access)
-               {
-                       switch (access) {
-                       case MemoryMappedFileAccess.CopyOnWrite:
-                       case MemoryMappedFileAccess.ReadWriteExecute:
-                       case MemoryMappedFileAccess.ReadWrite:
-                               return O_RDWR;
-                               
-                       case MemoryMappedFileAccess.Write:
-                               return O_WRONLY;
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               internal extern static void ConfigureHandleInheritability (IntPtr handle, HandleInheritability inheritability);
 
-                       case MemoryMappedFileAccess.ReadExecute:
-                       case MemoryMappedFileAccess.Read:
-                       default:
-                               return O_RDONLY;
-                       }
-               }
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               internal extern static bool Unmap (IntPtr mmap_handle);
 
-               static int ToUnixProts (MemoryMappedFileAccess access)
-               {
-                       switch (access){
-                       case MemoryMappedFileAccess.ReadWrite:
-                               return PROT_WRITE | PROT_READ;
-                               
-                       case MemoryMappedFileAccess.Write:
-                               return PROT_WRITE;
-                               
-                       case MemoryMappedFileAccess.CopyOnWrite:
-                               return PROT_WRITE | PROT_READ;
-                               
-                       case MemoryMappedFileAccess.ReadExecute:
-                               return PROT_EXEC;
-                               
-                       case MemoryMappedFileAccess.ReadWriteExecute:
-                               return PROT_WRITE | PROT_READ | PROT_EXEC;
-                               
-                       case MemoryMappedFileAccess.Read:
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               extern static int MapInternal (IntPtr handle, long offset, ref long size, MemoryMappedFileAccess access, out IntPtr mmap_handle, out IntPtr base_address);
+
+               internal static void Map (IntPtr handle, long offset, ref long size, MemoryMappedFileAccess access, out IntPtr mmap_handle, out IntPtr base_address)
+               {
+                       int error = MapInternal (handle, offset, ref size, access, out mmap_handle, out base_address);
+                       if (error != 0)
+                               throw CreateException (error, "<none>");
+               }
+
+               static Exception CreateException (int error, string path) {
+                       switch (error){
+                       case 1:
+                               return new ArgumentException ("A positive capacity must be specified for a Memory Mapped File backed by an empty file.");
+                       case 2:
+                               return new ArgumentOutOfRangeException ("The capacity may not be smaller than the file size.");
+                       case 3:
+                               return new FileNotFoundException (path);
+                       case 4:
+                               return new IOException ("The file already exists");
+                       case 5:
+                               return new PathTooLongException ();
+                       case 6:
+                               return new IOException ("Could not open file");
+                       case 7:
+                               return new ArgumentException ("Capacity must be bigger than zero for non-file mappings");
+                       case 8:
+                               return new ArgumentException ("Invalid FileMode value.");
+                       case 9:
+                               return new IOException ("Could not map file");
                        default:
-                               return PROT_READ;
-                       }
-               }
-
-               static void ThrowErrorFromErrno (int errno) 
-               {
-                       switch (errno) {
-                       case EINVAL:            throw new ArgumentException ();
-                       case ENAMETOOLONG:      throw new PathTooLongException ();
-                       default: throw new IOException ("Failed with errno " + errno);
+                               return new IOException ("Failed with unknown error code " + error);
                        }
                }
 
-               internal static int Open (string path, FileMode mode, ref long capacity, MemoryMappedFileAccess access)
-               {
-                       long file_size = mono_filesize_from_path (path);
-                       if (file_size < 0)
-                               throw new FileNotFoundException (path);
-
-                       if (capacity > file_size)
-                               throw new ArgumentException ("capacity");
-
-                       int fd = open (path, ToUnixMode (mode) | ToUnixMode (access), DEFFILEMODE);
-
-                       if (fd == -1)
-                               ThrowErrorFromErrno (Marshal.GetLastWin32Error ());
-                       return fd;
-               }
-
-               internal static void CloseFD (int fd)
-               {
-                       close (fd);
-               }
-
-               internal static void Flush (int fd)
-               {
-                       fsync (fd);
-               }
-
-               internal static bool Unmap (IntPtr map_addr, ulong map_size)
-               {
-                       return munmap (map_addr, (IntPtr)map_size) == 0;
-               }
-
-               static int pagesize;
-
-               internal static unsafe void Map (int file_handle, long offset, ref long size, MemoryMappedFileAccess access, out IntPtr map_addr, out int offset_diff)
+               internal static IntPtr OpenFile (string path, FileMode mode, string mapName, out long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options)
                {
-                       if (pagesize == 0)
-                               pagesize = getpagesize ();
-
-                       long fsize = mono_filesize_from_fd (file_handle);
-                       if (fsize < 0)
-                               throw new FileNotFoundException ();
-
-                       if (size == 0 || size > fsize)
-                               size = fsize;
-                       
-                       // Align offset
-                       long real_offset = offset & ~(pagesize - 1);
-
-                       offset_diff = (int)(offset - real_offset);
-
-                       map_addr = mmap (IntPtr.Zero, (IntPtr) size,
-                                                ToUnixProts (access),
-                                                access == MemoryMappedFileAccess.CopyOnWrite ? MAP_PRIVATE : MAP_SHARED,
-                                                file_handle, real_offset);
-
-                       if (map_addr == (IntPtr)(-1))
-                               throw new IOException ("mmap failed for fd#" + file_handle + "(" + offset + ", " + size + ")");
+                       int error = 0;
+                       IntPtr res = OpenFileInternal (path, mode, mapName, out capacity, access, options, out error);
+                       if (error != 0)
+                               throw CreateException (error, path);
+                       return res;
                }
 
-               internal static void ConfigureFD (IntPtr handle, HandleInheritability inheritability)
+               internal static IntPtr OpenHandle (IntPtr handle, string mapName, out long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options)
                {
-                       int fd = (int)handle;
-                       int flags = fcntl (fd, F_GETFD, 0);
-                       if (inheritability == HandleInheritability.None)
-                               flags &= ~FD_CLOEXEC;
-                       else
-                               flags |= FD_CLOEXEC;
-                       fcntl (fd, F_SETFD, flags);
+                       int error = 0;
+                       IntPtr res = OpenHandleInternal (handle, mapName, out capacity, access, options, out error);
+                       if (error != 0)
+                               throw CreateException (error, "<none>");
+                       return res;
                }
-
        }
-#endif
+
 
        public class MemoryMappedFile : IDisposable {
                MemoryMappedFileAccess fileAccess;
@@ -466,7 +124,7 @@ namespace System.IO.MemoryMappedFiles
                //
                FileStream stream;
                bool keepOpen;
-               int unix_fd;
+               IntPtr handle;
 
                public static MemoryMappedFile CreateFromFile (string path)
                {
@@ -475,7 +133,21 @@ namespace System.IO.MemoryMappedFiles
 
                public static MemoryMappedFile CreateFromFile (string path, FileMode mode)
                {
-                       return CreateFromFile (path, mode, null, 0, MemoryMappedFileAccess.ReadWrite);
+                       long capacity = 0;
+                       if (path == null)
+                               throw new ArgumentNullException ("path");
+                       if (path.Length == 0)
+                               throw new ArgumentException ("path");
+                       if (mode == FileMode.Append)
+                               throw new ArgumentException ("mode");
+
+                       IntPtr handle = MemoryMapImpl.OpenFile (path, mode, null, out capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages);
+
+                       return new MemoryMappedFile () {
+                               handle = handle,
+                               fileAccess = MemoryMappedFileAccess.ReadWrite,
+                               fileCapacity = capacity
+                       };
                }
 
                public static MemoryMappedFile CreateFromFile (string path, FileMode mode, string mapName)
@@ -501,26 +173,21 @@ namespace System.IO.MemoryMappedFiles
                        if (capacity < 0)
                                throw new ArgumentOutOfRangeException ("capacity");
 
-                       int fd = MemoryMapImpl.Open (path, mode, ref capacity, access);
+                       IntPtr handle = MemoryMapImpl.OpenFile (path, mode, mapName, out capacity, access, MemoryMappedFileOptions.DelayAllocatePages);
                        
                        return new MemoryMappedFile () {
-                               unix_fd = fd,
+                               handle = handle,
                                fileAccess = access,
                                name = mapName,
                                fileCapacity = capacity
                        };
                }
 
-#if MOBILE
-               public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access,
-                                                              HandleInheritability inheritability,
-                                                              bool leaveOpen)
-#else
+
                [MonoLimitation ("memoryMappedFileSecurity is currently ignored")]
                public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access,
                                                               MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability inheritability,
                                                               bool leaveOpen)
-#endif
                {
                        if (fileStream == null)
                                throw new ArgumentNullException ("fileStream");
@@ -529,86 +196,92 @@ namespace System.IO.MemoryMappedFiles
                        if ((!MonoUtil.IsUnix && capacity == 0 && fileStream.Length == 0) || (capacity > fileStream.Length))
                                throw new ArgumentException ("capacity");
 
-                       MemoryMapImpl.ConfigureFD (fileStream.Handle, inheritability);
+                       IntPtr handle = MemoryMapImpl.OpenHandle (fileStream.Handle, mapName, out capacity, access, MemoryMappedFileOptions.DelayAllocatePages);
+                       
+                       MemoryMapImpl.ConfigureHandleInheritability (handle, inheritability);
                                
                        return new MemoryMappedFile () {
-                               stream = fileStream,
+                               handle = handle,
                                fileAccess = access,
                                name = mapName,
                                fileCapacity = capacity,
+
+                               stream = fileStream,
                                keepOpen = leaveOpen
                        };
                }
 
-               [MonoLimitation ("CreateNew requires that mapName be a file name on Unix")]
+
+               static MemoryMappedFile CoreShmCreate (string mapName, long capacity, MemoryMappedFileAccess access,
+                                                         MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity,
+                                                         HandleInheritability inheritability, FileMode mode)
+               {
+                       if (mapName != null && mapName.Length == 0)
+                               throw new ArgumentException ("mapName");
+                       if (capacity < 0)
+                               throw new ArgumentOutOfRangeException ("capacity");
+
+                       IntPtr handle = MemoryMapImpl.OpenFile (null, mode, mapName, out capacity, access, options);
+                       
+                       return new MemoryMappedFile () {
+                               handle = handle,
+                               fileAccess = access,
+                               name = mapName,
+                               fileCapacity = capacity
+                       };                      
+               }
+
+               [MonoLimitation ("Named mappings scope is process local")]
                public static MemoryMappedFile CreateNew (string mapName, long capacity)
                {
-#if MOBILE
-                       return CreateNew (mapName, capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages, 0);
-#else
-                       return CreateNew (mapName, capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages, null, 0);
-#endif
+                       return CreateNew (mapName, capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None);
                }
 
-               [MonoLimitation ("CreateNew requires that mapName be a file name on Unix")]
+               [MonoLimitation ("Named mappings scope is process local")]
                public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access) 
                {
-#if MOBILE
-                       return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, 0);
-#else
-                       return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, 0);
-#endif
+                       return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None);
                }
 
-#if MOBILE
-               public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access,
-                                                         MemoryMappedFileOptions options, 
-                                                         HandleInheritability handleInheritability)
-#else
-               [MonoLimitation ("CreateNew requires that mapName be a file name on Unix; options and memoryMappedFileSecurity are ignored")]
+               [MonoLimitation ("Named mappings scope is process local; options and memoryMappedFileSecurity are ignored")]
                public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access,
                                                          MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity,
                                                          HandleInheritability inheritability)
-#endif
                {
-                       return CreateFromFile (mapName, FileMode.CreateNew, mapName, capacity, access);
+                       return CoreShmCreate (mapName, capacity, access, options, memoryMappedFileSecurity, inheritability, FileMode.CreateNew);
                }
 
-               [MonoLimitation ("CreateOrOpen requires that mapName be a file name on Unix")]
+               [MonoLimitation ("Named mappings scope is process local")]
                public static MemoryMappedFile CreateOrOpen (string mapName, long capacity)
                {
                        return CreateOrOpen (mapName, capacity, MemoryMappedFileAccess.ReadWrite);
                }
 
-               [MonoLimitation ("CreateOrOpen requires that mapName be a file name on Unix")]
+               [MonoLimitation ("Named mappings scope is process local")]
                public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access)
                {
-                       return CreateFromFile (mapName, FileMode.OpenOrCreate, mapName, capacity, access); 
+                       return CreateOrOpen (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None);
                }
 
-               [MonoTODO]
-#if MOBILE
-               public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, HandleInheritability inheritability)
-#else
+               [MonoLimitation ("Named mappings scope is process local")]
                public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability inheritability)
-#endif
                {
-                       throw new NotImplementedException ();
+                       return CoreShmCreate (mapName, capacity, access, options, memoryMappedFileSecurity, inheritability, FileMode.OpenOrCreate);
                }
 
-               [MonoTODO]
+               [MonoLimitation ("Named mappings scope is process local")]
                public static MemoryMappedFile OpenExisting (string mapName)
                {
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]
+               [MonoLimitation ("Named mappings scope is process local")]
                public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights)
                {
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]
+               [MonoLimitation ("Named mappings scope is process local")]
                public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights, HandleInheritability inheritability)
                {
                        throw new NotImplementedException ();
@@ -616,7 +289,7 @@ namespace System.IO.MemoryMappedFiles
 
                public MemoryMappedViewStream CreateViewStream ()
                {
-                       return CreateViewStream (0, 0);
+                       return CreateViewStream (0, 0);//FIXME this is wrong
                }
 
                public MemoryMappedViewStream CreateViewStream (long offset, long size)
@@ -626,7 +299,7 @@ namespace System.IO.MemoryMappedFiles
 
                public MemoryMappedViewStream CreateViewStream (long offset, long size, MemoryMappedFileAccess access)
                {
-                       return new MemoryMappedViewStream (stream != null ? (int)stream.Handle : unix_fd, offset, size, access);
+                       return new MemoryMappedViewStream (handle, offset, size, access);
                }
 
                public MemoryMappedViewAccessor CreateViewAccessor ()
@@ -641,9 +314,7 @@ namespace System.IO.MemoryMappedFiles
 
                public MemoryMappedViewAccessor CreateViewAccessor (long offset, long size, MemoryMappedFileAccess access)
                {
-                       int file_handle = stream != null ? (int) stream.Handle : unix_fd;
-                       
-                       return new MemoryMappedViewAccessor (file_handle, offset, size, access);
+                       return new MemoryMappedViewAccessor (handle, offset, size, access);
                }
 
                MemoryMappedFile ()
@@ -661,17 +332,15 @@ namespace System.IO.MemoryMappedFiles
                                if (stream != null){
                                        if (keepOpen == false)
                                                stream.Close ();
-                                       unix_fd = -1;
                                        stream = null;
                                }
-                               if (unix_fd != -1) {
-                                       MemoryMapImpl.CloseFD (unix_fd);
-                                       unix_fd = -1;
+                               if (handle != IntPtr.Zero) {
+                                       MemoryMapImpl.CloseMapping (handle);
+                                       handle = IntPtr.Zero;
                                }
                        }
                }
 
-#if !MOBILE
                [MonoTODO]
                public MemoryMappedFileSecurity GetAccessControl ()
                {
@@ -683,7 +352,6 @@ namespace System.IO.MemoryMappedFiles
                {
                        throw new NotImplementedException ();
                }
-#endif
 
                [MonoTODO]
                public SafeMemoryMappedFileHandle SafeMemoryMappedFileHandle {
index 0535337210d4297a24a44074269833d6f9e402df..c66acdb55c6cd6fd24bbbb9de684bd0bccd59141 100644 (file)
@@ -36,14 +36,12 @@ using Microsoft.Win32.SafeHandles;
 namespace System.IO.MemoryMappedFiles
 {
        public sealed class MemoryMappedViewAccessor : UnmanagedMemoryAccessor, IDisposable {
-               int file_handle;
-               IntPtr mmap_addr;
-               SafeMemoryMappedViewHandle handle;
+               IntPtr mmap_handle;
+               SafeMemoryMappedViewHandle safe_handle;
 
-               internal MemoryMappedViewAccessor (int file_handle, long offset, long size, MemoryMappedFileAccess access)
+               internal MemoryMappedViewAccessor (IntPtr handle, long offset, long size, MemoryMappedFileAccess access)
                {
-                       this.file_handle = file_handle;
-                       Create (offset, size, access);
+                       Create (handle, offset, size, access);
                }
 
                static FileAccess ToFileAccess (MemoryMappedFileAccess access)
@@ -64,19 +62,19 @@ namespace System.IO.MemoryMappedFiles
                        }
                }
                
-               unsafe void Create (long offset, long size, MemoryMappedFileAccess access)
+               unsafe void Create (IntPtr handle, long offset, long size, MemoryMappedFileAccess access)
                {
-                       int offset_diff;
+                       IntPtr base_address;
 
-                       MemoryMapImpl.Map (file_handle, offset, ref size, access, out mmap_addr, out offset_diff);
+                       MemoryMapImpl.Map (handle, offset, ref size, access, out mmap_handle, out base_address);
+                       safe_handle = new SafeMemoryMappedViewHandle (mmap_handle, base_address, size);
 
-                       handle = new SafeMemoryMappedViewHandle ((IntPtr)((long)mmap_addr + offset_diff), size);
-                       Initialize (handle, 0, size, ToFileAccess (access));
+                       Initialize (safe_handle, 0, size, ToFileAccess (access));
                }
 
                public SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle {
                        get {
-                               return handle;
+                               return safe_handle;
                        }
                }
 
@@ -91,7 +89,7 @@ namespace System.IO.MemoryMappedFiles
 
                public void Flush ()
                {
-                       MemoryMapImpl.Flush (file_handle);
+                       MemoryMapImpl.Flush (mmap_handle);
                }
        }
 }
index 0f6aa75dc4203b5a8fd36c184ab853add906a805..651e2d0d262449e04229a281fd4bd3ff86ba26ef 100644 (file)
@@ -35,15 +35,12 @@ using Microsoft.Win32.SafeHandles;
 namespace System.IO.MemoryMappedFiles
 {
        public sealed class MemoryMappedViewStream : UnmanagedMemoryStream {
-               IntPtr mmap_addr;
-               ulong mmap_size;
+               IntPtr mmap_handle;
                object monitor;
-               int fd;
                
-               internal MemoryMappedViewStream (int fd, long offset, long size, MemoryMappedFileAccess access) {
-                       this.fd = fd;
+               internal MemoryMappedViewStream (IntPtr handle, long offset, long size, MemoryMappedFileAccess access) {
                        monitor = new Object ();
-                       CreateStream (fd, offset, size, access);
+                       CreateStream (handle, offset, size, access);
                }
 
                public SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle { 
@@ -52,13 +49,13 @@ namespace System.IO.MemoryMappedFiles
                        }
                }
 
-               unsafe void CreateStream (int fd, long offset, long size, MemoryMappedFileAccess access)
+               unsafe void CreateStream (IntPtr handle, long offset, long size, MemoryMappedFileAccess access)
                {
-                       int offset_diff;
-                       mmap_size = (ulong) size;
-                       MemoryMapImpl.Map (fd, offset, ref size, access, out mmap_addr, out offset_diff);
-                       FileAccess faccess;
+                       IntPtr base_address;
+
+                       MemoryMapImpl.Map (handle, offset, ref size, access, out mmap_handle, out base_address);
 
+                       FileAccess faccess;
                        switch (access) {
                        case MemoryMappedFileAccess.ReadWrite:
                                faccess = FileAccess.ReadWrite;
@@ -72,23 +69,23 @@ namespace System.IO.MemoryMappedFiles
                        default:
                                throw new NotImplementedException ("access mode " + access + " not supported.");
                        }
-                       Initialize ((byte*)mmap_addr + offset_diff, size, size, faccess);
+                       Initialize ((byte*)base_address, size, size, faccess);
                }
                 
                protected override void Dispose (bool disposing)
                {
                        base.Dispose (disposing);
                        lock (monitor) {
-                               if (mmap_addr != (IntPtr)(-1)) {
-                                       MemoryMapImpl.Unmap (mmap_addr, mmap_size);
-                                       mmap_addr = (IntPtr)(-1);
+                               if (mmap_handle != (IntPtr)(-1)) {
+                                       MemoryMapImpl.Unmap (mmap_handle);
+                                       mmap_handle = (IntPtr)(-1);
                                }
                        }
                }
 
                public override void Flush ()
                {
-                       MemoryMapImpl.Flush (fd);
+                       MemoryMapImpl.Flush (mmap_handle);
                }
        }
 }
index 96a5fe1f8e3f7d10c24b84cda5d57a66d17c14d6..d1d639b9a140e6826d5d19c4590e443dbf89609c 100644 (file)
@@ -230,18 +230,23 @@ namespace System.Linq.Parallel
                                var implementerToken = options.ImplementerToken;
 
                                try {
+                                       // Avoid cache thrashing of locals array
+                                       var local = locals [index];
+
                                        if (seedFunc == null) {
                                                if (!enumerator.MoveNext ())
                                                        return;
-                                               locals[index] = (U)(object)enumerator.Current;
+                                               local = (U)(object)enumerator.Current;
                                        }
 
                                        while (enumerator.MoveNext ()) {
                                                if (implementerToken.IsCancellationRequested)
                                                        break;
                                                token.ThrowIfCancellationRequested ();
-                                               locals[index] = localCall (locals[index], enumerator.Current);
+                                               local = localCall (local, enumerator.Current);
                                        }
+
+                                       locals [index] = local;
                                } finally {
                                        enumerator.Dispose ();
                                }
index 8047da25ee2487acab23f7a589e464ce9fb39416..21aba946c55611c2524a3c177837105290339131 100644 (file)
@@ -51,6 +51,13 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
                        Assert.IsTrue (thrown);
                }
 
+               static int named_index;
+               static String MkNamedMapping ()
+               {
+                       return "test-" + named_index++;
+               }
+
+
                static string tempDir = Path.Combine (Path.GetTempPath (), typeof (MemoryMappedFileTest).FullName);
 
                string fname;
@@ -92,6 +99,43 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
                        }
                }
 
+               [Test]
+               public void CreateNew ()
+               {
+                       // This must succeed
+                       MemoryMappedFile.CreateNew (Path.Combine (tempDir, "createNew.test"), 8192);
+               }
+
+               [Test]
+               [ExpectedException (typeof (IOException))]
+               public void CreateNew_OnExistingFile ()
+               {
+                       // This must succeed
+                       MemoryMappedFile.CreateNew (Path.Combine (tempDir, "createNew.test"), 8192);
+                       
+                       // This should fail, the file exists
+                       MemoryMappedFile.CreateNew (Path.Combine (tempDir, "createNew.test"), 8192);
+               }
+
+               // Call this twice, it should always work
+               [Test]
+               public void CreateOrOpen_Multiple ()
+               {
+                       MemoryMappedFile.CreateOrOpen (Path.Combine (tempDir, "createOrOpen.test"), 8192);
+                       MemoryMappedFile.CreateOrOpen (Path.Combine (tempDir, "createOrOpen.test"), 8192);
+               }
+
+               [Test]
+               [ExpectedException(typeof(ArgumentOutOfRangeException))]
+               public void CreateFromFileWithSmallerCapacityThanFile ()
+               {
+                       var f = Path.Combine (tempDir, "8192-file");
+                       File.WriteAllBytes (f, new byte [8192]);
+
+                       // We are requesting fewer bytes to map.
+                       MemoryMappedFile.CreateFromFile (f, FileMode.Open, "myMap", 4192);
+               }
+       
                [Test]
                public void CreateFromFile_Null () {
                        AssertThrows<ArgumentNullException> (delegate () {
@@ -169,6 +213,109 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
                                Assert.AreEqual ("Hello", s);
                        }
                }
+
+
+               [Test]
+               public void NamedMappingToInvalidFile ()
+               {
+                       var fileName = Path.Combine (tempDir, "temp_file_123");
+               if (File.Exists (fileName))
+                   File.Delete (fileName);
+               var memoryMappedFile90 = MemoryMappedFile.CreateNew (fileName, 4194304, MemoryMappedFileAccess.ReadWrite);
+               memoryMappedFile90.CreateViewStream (4186112, 3222, MemoryMappedFileAccess.Write);
+               }
+
+               [Test]
+               public void CreateTheSameAreaTwiceShouldFail ()
+               {
+                       var name = MkNamedMapping ();
+                       using (var m0 = MemoryMappedFile.CreateNew(name, 4096, MemoryMappedFileAccess.ReadWrite)) {
+                               try {
+                                       using (var m1 = MemoryMappedFile.CreateNew (name, 4096, MemoryMappedFileAccess.ReadWrite)) {
+                                               Assert.Fail ("Must fail");
+                                       }
+                               } catch (IOException) {}
+                       }
+               }
+
+               [Test]
+               public void MapAFileToAMemoryAreaShouldFail ()
+               {
+                       var name = MkNamedMapping ();
+                       using (var m0 = MemoryMappedFile.CreateNew(name, 4096, MemoryMappedFileAccess.ReadWrite)) {
+                               try {
+                                       using (var m1 = MemoryMappedFile.CreateFromFile (fname, FileMode.OpenOrCreate, name)) {
+                                               Assert.Fail ("Must fail");
+                                       }
+                               } catch (IOException) {}
+                       }
+               }
+
+               [Test]
+               public void NamedMappingsShareMemoryArea ()
+               {
+                       var name = MkNamedMapping ();
+                       using (var m0 = MemoryMappedFile.CreateNew(name, 4096, MemoryMappedFileAccess.ReadWrite)) {
+                               using (var m1 = MemoryMappedFile.CreateOrOpen (name, 4096, MemoryMappedFileAccess.ReadWrite)) {
+                                       using (MemoryMappedViewAccessor v0 = m0.CreateViewAccessor (), v1 = m1.CreateViewAccessor ()) {
+                                               v0.Write (10, 0x12345);
+                                               Assert.AreEqual (0x12345, v1.ReadInt32 (10));
+                                       }
+                               }
+                       }
+               }
+
+               [Test]
+               public void NamedFileCanBeOpen ()
+               {
+                       var name = MkNamedMapping ();
+                       using (var sw = new FileStream (fname, FileMode.Open)) {
+                               byte[] b = new byte[20];
+                               for (int i = 0; i < 20; ++i)
+                                       b[i] = 0xFF;
+                               sw.Write (b, 0, 20);
+                       }
+
+                       using (var m0 = MemoryMappedFile.CreateFromFile (fname, FileMode.Open, name)) {
+                               using (var m1 = MemoryMappedFile.CreateOrOpen (name, 4096)) {
+                                       using (MemoryMappedViewAccessor v0 = m0.CreateViewAccessor (), v1 = m1.CreateViewAccessor ()) {
+                                               v0.Write (10, 0x11223344);
+                                               Assert.AreEqual (0x11223344, v1.ReadInt32 (10));
+                                       }
+                               }
+                       }
+               }
+
+               [Test]
+               public void MapAtEdgeOfPage ()
+               {
+                       using (var f = new FileStream (fname, FileMode.Open)) {
+                               var b = new byte [4096];
+                               for (int i = 0; i < 4096; ++i)
+                                       b[i] = 0xAA;
+                               for (int i = 0; i < 2; ++i)
+                                       f.Write (b, 0, 4096);
+                       }
+                       var m0 = MemoryMappedFile.CreateFromFile (fname, FileMode.Open);
+                       var v0 = m0.CreateViewAccessor (500, 4096);
+                       var v1 = m0.CreateViewAccessor (0, 4096 * 2);
+                       for (int i = 0; i < 4096; ++i) {
+                               Assert.AreEqual (0xAA, v1.ReadByte (i + 500));
+                               v0.Write (i, (byte)0xFF);
+                               Assert.AreEqual (0xFF, v1.ReadByte (i + 500));
+                       }
+               }
+
+               [Test]
+               public void DoubleAccountingInOffsetCalculation ()
+               {
+                       var memoryMappedFile90 = MemoryMappedFile.CreateNew (MkNamedMapping (), 4194304, MemoryMappedFileAccess.ReadWrite);
+                       var stream = memoryMappedFile90.CreateViewStream (4186112, 3222, MemoryMappedFileAccess.Write);
+                       using (var tw = new StreamWriter(stream))
+                       {
+                               tw.WriteLine ("Hello World!");
+                       }
+               }
        }
 }
 
index ba66db603d70144b0c00cc7b9b8e793a5d854f54..a63481f69d6cde7414f0753bbd4a153b4a3c6764 100644 (file)
@@ -93,6 +93,7 @@ System.IO.MemoryMappedFiles/MemoryMappedFile.cs
 System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
 System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
 System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
+System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
 System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
 System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
 Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
index 1ee118c3084ad33a43340de872e0cbf7d2eb63ca..a8c627360dab6b08e5b73c6bfed6f83cbfc0c5e5 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1d6b5f7d052eab5b46e5bd1f13b9b55dc8faead9..adae7bd5664bd96aa5281df9e056ddb00bad7b14 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index b2f14dc0d5d072cfc33a80bcbf5ef1c33ca59a3c..a045f9fbc5fdb19fe1cfc9cf47eff62bebf5ccd1 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.EnterpriseServices/System.EnterpriseServices-net_4_5.csproj">\r
       <Project>{773D8BA7-9A88-49AC-81C9-740436270588}</Project>\r
-      <Name>System.EnterpriseServices\System.EnterpriseServices-net_4_5</Name>\r
+      <Name>System.EnterpriseServices-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 25ca6f3fe68bcc05c8141a7a2a2b915af8a6c515..82ad0c24860d92e8317c2a4befa3510f9400845b 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Xml.Linq/System.Xml.Linq-net_4_5.csproj">\r
       <Project>{8328796E-8A15-4972-8F1E-2F15E7D57C42}</Project>\r
-      <Name>System.Xml.Linq\System.Xml.Linq-net_4_5</Name>\r
+      <Name>System.Xml.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../WindowsBase/WindowsBase-net_4_5.csproj">\r
       <Project>{8E6ED7D5-3B08-4A83-905E-8FB4CF0C160D}</Project>\r
-      <Name>WindowsBase\WindowsBase-net_4_5</Name>\r
+      <Name>WindowsBase-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index fcd40b1d6f989fd78553ca5cb7d5320567d45dfe..d0b2c9d8aa5bb63996debb474a2173e5beed2a46 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel.Web/System.ServiceModel.Web-net_4_5.csproj">\r
       <Project>{BD4DF654-42EE-40E8-A3F4-8A80959E7879}</Project>\r
-      <Name>System.ServiceModel.Web\System.ServiceModel.Web-net_4_5</Name>\r
+      <Name>System.ServiceModel.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data.Services.Client/System.Data.Services.Client-net_4_5.csproj">\r
       <Project>{E9B87AE3-9A05-4146-83CC-082BE32D8EB2}</Project>\r
-      <Name>System.Data.Services.Client\System.Data.Services.Client-net_4_5</Name>\r
+      <Name>System.Data.Services.Client-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel.Activation/System.ServiceModel.Activation-net_4_5.csproj">\r
       <Project>{E537F31B-BCB7-4935-ABF3-DF2FAC48DCB3}</Project>\r
-      <Name>System.ServiceModel.Activation\System.ServiceModel.Activation-net_4_5</Name>\r
+      <Name>System.ServiceModel.Activation-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 3208718e7da3d2f2f594d725979c5527cbd750f5..256da0cfa142545c2a0d0605ba51a6284d2342c1 100644 (file)
@@ -136,10 +136,10 @@ namespace Mono.Data.SqlExpressions {
 
                        string str = sb.ToString ();
 
-                       if (str.IndexOf(".") == -1)
-                               return Int64.Parse (str);
-                       else
-                               return double.Parse (str);
+                       if (str.IndexOf ('.') < 0)
+                               return Int64.Parse (str, CultureInfo.InvariantCulture);
+
+                       return double.Parse (str, CultureInfo.InvariantCulture);
                }
 
                private char ProcessEscapes(char c)
@@ -327,7 +327,7 @@ namespace Mono.Data.SqlExpressions {
 
                        case '#':
                                string date = ReadString ('#');
-                               val = DateTime.Parse (date);
+                               val = DateTime.Parse (date, CultureInfo.InvariantCulture);
                                return Token.DateLiteral;
 
                        case '\'':
index 0497bb8647807fd3e20bccae0701be4b5c69c3fd..95dead37499f066bc460e7be0cb115b2c6bea82f 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.EnterpriseServices/System.EnterpriseServices-net_4_5.csproj">\r
       <Project>{773D8BA7-9A88-49AC-81C9-740436270588}</Project>\r
-      <Name>System.EnterpriseServices\System.EnterpriseServices-net_4_5</Name>\r
+      <Name>System.EnterpriseServices-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Data.Tds/Mono.Data.Tds-net_4_5.csproj">\r
       <Project>{CB7949AC-5FA7-4FAB-893A-8FAF436BF514}</Project>\r
-      <Name>Mono.Data.Tds\Mono.Data.Tds-net_4_5</Name>\r
+      <Name>Mono.Data.Tds-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Transactions/System.Transactions-net_4_5.csproj">\r
       <Project>{AF2BBF50-AB57-4CA1-8EF5-2B54C7418434}</Project>\r
-      <Name>System.Transactions\System.Transactions-net_4_5</Name>\r
+      <Name>System.Transactions-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 166be8d8f482c2d43a70a053bd28468406ec3e11..7e7cedae6f2c7a2d70205841edcdaf48bdc8304d 100644 (file)
@@ -474,7 +474,7 @@ namespace System.Data {
                public string Expression {\r
                        get { return _expression; }\r
                        set {\r
-                               if (value == null)\r
+                               if (value == null || value.Trim () == string.Empty)\r
                                        value = String.Empty;\r
 \r
                                CompileExpression (value);\r
index 6b6299f41a82c490d4a0e79d244fbc197633cfd9..f3fa2a8e77c18d2c4a9bd50b60a1bb2f62bc8dea 100644 (file)
@@ -134,10 +134,7 @@ namespace System.Data {
                public object this [string columnName] {
                        get { return this [columnName, DataRowVersion.Default]; }
                        set {
-                               DataColumn column = _table.Columns [columnName];
-                               if (column == null)
-                                       throw new ArgumentException ("The column '" + columnName +
-                                               "' does not belong to the table : " + _table.TableName);
+                               DataColumn column = GetColumn (columnName);
                                this [column.Ordinal] = value;
                        }
                }
@@ -202,10 +199,7 @@ namespace System.Data {
                /// </summary>
                public object this [string columnName, DataRowVersion version] {
                        get {
-                               DataColumn column = _table.Columns [columnName];
-                               if (column == null)
-                                       throw new ArgumentException ("The column '" + columnName +
-                                               "' does not belong to the table : " + _table.TableName);
+                               DataColumn column = GetColumn (columnName);
                                return this [column.Ordinal, version];
                        }
                }
@@ -1248,7 +1242,7 @@ namespace System.Data {
                /// </summary>
                public bool IsNull (string columnName)
                {
-                       return IsNull (Table.Columns [columnName]);
+                       return IsNull (GetColumn (columnName));
                }
 
                /// <summary>
@@ -1257,6 +1251,17 @@ namespace System.Data {
                /// </summary>
                public bool IsNull (DataColumn column, DataRowVersion version)
                {
+                       if (column == null)
+                               throw new ArgumentNullException ("column");
+
+                       // use the expresion if there is one
+                       if (column.Expression != String.Empty) {
+                               // FIXME: how does this handle 'version'?
+                               // TODO: Can we avoid the Eval each time by using the cached value?
+                               object o = column.CompiledExpression.Eval (this);
+                               return o == null && o == DBNull.Value;
+                       }
+
                        return column.DataContainer.IsNull (IndexFromVersion (version));
                }
 
@@ -1692,5 +1697,15 @@ namespace System.Data {
                        }
                }
 #endif // NET_2_0
+
+               DataColumn GetColumn (string columnName)
+               {
+                       DataColumn column = _table.Columns [columnName];
+
+                       if (column == null)
+                               throw new ArgumentException ("The column '" + columnName + "' does not belong to the table " + _table.TableName);
+
+                       return column;
+               }
        }
 }
index f0f68c3207c7dc7ca93acbb8fee081136593397a..096c72fd1cff63293bdc026c5de9b94e93688c18 100644 (file)
@@ -542,6 +542,23 @@ namespace MonoTests.System.Data
                        Assert.AreEqual(sExpression,dc.Expression, "dce#2");                            
                }
 
+               [Test]
+               public void Expression_Whitespace ()
+               {
+                       DataColumn dc = new DataColumn ("ColName", typeof(string));
+
+                       string plainWhitespace = "    ";
+                       string surroundWhitespace = "  'abc'  ";
+
+                       Assert.AreEqual (string.Empty, dc.Expression, "dce#1");
+
+                       dc.Expression = plainWhitespace;
+                       Assert.AreEqual (string.Empty, dc.Expression, "dce#2");
+
+                       dc.Expression = surroundWhitespace;
+                       Assert.AreEqual (surroundWhitespace, dc.Expression, "dce#3");
+               }
+
                [Test]
                public void Expression_Exceptions()
                {
index 14333e2201ad4599e3d68507d6cc19c4a6a4b380..4dc0d77495e8178801e83aa7ce4f0c293605bcc5 100644 (file)
@@ -2125,6 +2125,59 @@ namespace MonoTests.System.Data
 #endregion
                }
 
+               [Test]
+               public void IsNull_BeforeGetValue ()
+               {
+                       DataTable table = new DataTable ();
+
+                       // add the row, with the value in the column
+                       DataColumn staticColumn = table.Columns.Add ("static", typeof(string), null); // static
+                       DataRow row = table.Rows.Add ("the value");
+                       Assert.IsFalse (row.IsNull ("static"), "static null check failed");
+                       Assert.AreEqual ("the value", row ["static"], "static value check failed");
+
+                       // add the first derived column
+                       DataColumn firstColumn = table.Columns.Add ("first", typeof(string), "static"); // first -> static
+                       Assert.IsFalse (row.IsNull ("first"), "first level null check failed");
+                       Assert.AreEqual ("the value", row ["first"], "first level value check failed");
+
+                       // add the second level of related
+                       DataColumn secondColumn = table.Columns.Add ("second", typeof(string), "first"); // second -> first -> static
+                       Assert.IsFalse (row.IsNull ("second"), "second level null check failed");
+                       Assert.AreEqual ("the value", row ["second"], "second level value check failed");
+               }
+
+               [Test]
+               public void IsNull_NullValueArguments ()
+               {
+                       DataTable table = new DataTable ();
+
+                       // add the row, with the value in the column
+                       DataColumn staticColumn = table.Columns.Add ("static", typeof(string), null);
+                       DataRow row = table.Rows.Add ("the value");
+
+                       try {
+                               row.IsNull ((string)null);
+                               Assert.Fail ("expected an arg null exception for passing a null string");
+                       } catch (ArgumentNullException) {
+                               // do nothing as null columns aren't allowed
+                       }
+
+                       try {
+                               row.IsNull ("");
+                               Assert.Fail ("expected an arg exception for passing an empty string");
+                       } catch (ArgumentException) {
+                               // do nothing as we can't find a col with no name
+                       }
+
+                       try {
+                               row.IsNull (null, DataRowVersion.Default);
+                               Assert.Fail ("null column with version check failed");
+                       } catch (ArgumentNullException) {
+                               // do nothing as null columns aren't allowed
+                       }
+               }
+
                [Test] public void Item()
                {
                        // init table with columns
index b8c4ad723029560e38590d8db53a0cea32410551..dcc8c7392f0a4a5ec9069f40f522eee9e2e7c358 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Managed.Windows.Forms/System.Windows.Forms-net_4_5.csproj">\r
       <Project>{B102F27C-1A07-487F-BA5B-D5155D201112}</Project>\r
-      <Name>Managed.Windows.Forms\System.Windows.Forms-net_4_5</Name>\r
+      <Name>System.Windows.Forms-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Accessibility/Accessibility-net_4_5.csproj">\r
       <Project>{FACE8136-C95A-4788-90B2-DB0ECF7A020A}</Project>\r
-      <Name>Accessibility\Accessibility-net_4_5</Name>\r
+      <Name>Accessibility-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 0c7d629b8cfffed9a5236039a5fef7a829c9f3d9..566b6a2222b74c0577403745e9ee557fbc063303 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.DirectoryServices/System.DirectoryServices-net_4_5.csproj">\r
       <Project>{EC4E43E7-63C0-4D64-8B7A-E00C097872A5}</Project>\r
-      <Name>System.DirectoryServices\System.DirectoryServices-net_4_5</Name>\r
+      <Name>System.DirectoryServices-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1544be525e6b51fc4ed0b0ea7e5cde67def76af7..5c6cebd8b824f4cf6558df8ddfcbb0a69b3fd3ad 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Novell.Directory.Ldap/Novell.Directory.Ldap-net_4_5.csproj">\r
       <Project>{E6070FFA-2CBA-4C24-99C1-63A4F5052821}</Project>\r
-      <Name>Novell.Directory.Ldap\Novell.Directory.Ldap-net_4_5</Name>\r
+      <Name>Novell.Directory.Ldap-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 0fda4a534e1714fa7e72103d50f30e857bd14fe9..d67485ff8c28652775732e919d44ab1d284c16c5 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Managed.Windows.Forms/System.Windows.Forms-net_4_5.csproj">\r
       <Project>{B102F27C-1A07-487F-BA5B-D5155D201112}</Project>\r
-      <Name>Managed.Windows.Forms\System.Windows.Forms-net_4_5</Name>\r
+      <Name>System.Windows.Forms-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 445b593b05c7a84648811a5dc4d332ba7ec0f7eb..4d0789ccd4dff5ce1002fd0e62f41f53953f2fb5 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 827bdee0881b82eb3f42d9b18bc5f9052eda5709..6e18fe690df20ea4287a77756ad21a1e29f34e86 100644 (file)
@@ -1744,7 +1744,7 @@ namespace System.Drawing
                                if (GDIPlus.Display == IntPtr.Zero) {
                                        GDIPlus.Display = GDIPlus.XOpenDisplay (IntPtr.Zero);
                                        if (GDIPlus.Display == IntPtr.Zero)
-                                               throw new NotSupportedException ("Could not open display (X-Server required. Check you DISPLAY environment variable)");
+                                               throw new NotSupportedException ("Could not open display (X-Server required. Check your DISPLAY environment variable)");
                                }
                                if (hwnd == IntPtr.Zero) {
                                        hwnd = GDIPlus.XRootWindow (GDIPlus.Display, GDIPlus.XDefaultScreen (GDIPlus.Display));
index b07e5b9415d05a428c05f907c7834cc2baf7b5ea..444e1e6066e765db76f854651ffc19418122af1d 100644 (file)
@@ -28,6 +28,7 @@
 
 
 using System;
+using System.IO;
 using System.Drawing;
 using System.Drawing.Imaging;
 using System.Drawing.Drawing2D;
@@ -125,6 +126,7 @@ namespace MonoTests.System.Drawing.Drawing2D
                        // save the drawing
                        string file =  "TestHatchBrush" + getOutSufix() + ".png";
                        bmp.Save (file, ImageFormat.Png);
+                       File.Delete (file);
                }
 
                private void Constructors ()
index 784e19b0edebf23ad4f7a3eb890553feaaa021b7..dcca275389db39b44af0396ed25b6aeb85583c75 100644 (file)
@@ -27,6 +27,7 @@
 //
 
 using System;
+using System.IO;
 using System.Drawing;
 using System.Drawing.Imaging;
 using System.Security.Permissions;
@@ -114,6 +115,8 @@ namespace MonoTests.System.Drawing.Imaging {
 
                private void Bug80323 (Color c)
                {
+                       string fileName = String.Format ("80323-{0}.png", c.ToArgb ().ToString ("X"));
+
                        // test case from bug #80323
                        ColorMatrix cm = new ColorMatrix (new float[][] {
                                new float[]     {1,     0,      0,      0,      0}, //R
@@ -138,12 +141,14 @@ namespace MonoTests.System.Drawing.Imaging {
                                                        g.DrawImage (bmp, new Rectangle (0, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, null);
                                                        g.DrawImage (bmp, new Rectangle (100, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, ia);
                                                }
-                                               b.Save (String.Format ("80323-{0}.png", c.ToArgb ().ToString ("X")));
+                                               b.Save (fileName);
                                                Assert.AreEqual (Color.FromArgb (255, 255, 155, 155), b.GetPixel (50, 50), "50,50");
                                                Assert.AreEqual (Color.FromArgb (255, 255, 205, 205), b.GetPixel (150, 50), "150,50");
                                        }
                                }
                        }
+
+                       File.Delete (fileName);
                }
        
                [Test]
index 71a1033dd425f9add0841b445a6281c8b229f1a8..3f2cec0d706099e094f39316e7f57bacd8e45b89 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 5bb647f3bc950746d9b06d843b757e23e1b72555..c0d00ac30bdc7f7c350176bfa11c2bbc9a364eec 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Transactions/System.Transactions-net_4_5.csproj">\r
       <Project>{AF2BBF50-AB57-4CA1-8EF5-2B54C7418434}</Project>\r
-      <Name>System.Transactions\System.Transactions-net_4_5</Name>\r
+      <Name>System.Transactions-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index eae409618af20b25f83753a17c4678f04834a27d..3825d4cb606c2a41caf1202d1dda6b1889061260 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.IO.Compression/System.IO.Compression-net_4_5.csproj">\r
       <Project>{BDF04E30-60D9-4279-A1DF-3291328A5AFD}</Project>\r
-      <Name>System.IO.Compression\System.IO.Compression-net_4_5</Name>\r
+      <Name>System.IO.Compression-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c19d32943e7314a5e1800a72a6fe62b1d7d63490..22c83d5bb2e4d03ebeddb47f348755765068212b 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index ea7f6d3818be08611bc30123c16abd1fc668f566..8158dfd757b5cd2186e391564aea801d97654f6f 100644 (file)
@@ -58,6 +58,8 @@ namespace MonoTests.System.IO.Compression
                                var nullEntry = archive.GetEntry("nonexisting");
                                Assert.IsNull(nullEntry);
                        }
+
+                       File.Delete ("test.zip");
                }
 
                [Test]
@@ -75,6 +77,8 @@ namespace MonoTests.System.IO.Compression
 
                                Assert.Fail();
                        }
+
+                       File.Delete ("test.zip");
                }
 
                [Test]
@@ -90,6 +94,8 @@ namespace MonoTests.System.IO.Compression
                                var nullEntry = archive.GetEntry("nonexisting");
                                Assert.IsNull(nullEntry);
                        }
+
+                       File.Delete ("test.zip");
                }
 
                [Test]
@@ -104,6 +110,8 @@ namespace MonoTests.System.IO.Compression
 
                                var foo = entry.Open();
                        }
+
+                       File.Delete ("test.zip");
                }
 
                [Test]
@@ -125,6 +133,8 @@ namespace MonoTests.System.IO.Compression
                                var entry = archive.GetEntry("foo.txt");
                                Assert.IsNull(entry);
                        }
+
+                       File.Delete ("delete.zip");
                }
 
                [Test]
@@ -146,6 +156,8 @@ namespace MonoTests.System.IO.Compression
                                var entry = archive.GetEntry("foo.txt");
                                Assert.IsNull(entry);
                        }
+
+                       File.Delete ("delete.zip");
                }
 
                [Test]
@@ -157,6 +169,8 @@ namespace MonoTests.System.IO.Compression
                                var entry = archive.CreateEntry("foo.txt");
                                using (var stream = entry.Open())
                                {
+                                       using (var streamWriter = new StreamWriter(stream))
+                                               streamWriter.Write("foo");
                                }
                        }
 
@@ -165,7 +179,14 @@ namespace MonoTests.System.IO.Compression
                        {
                                var entry = archive.GetEntry("foo.txt");
                                Assert.IsNotNull(entry);
+
+                               var streamReader = new StreamReader(entry.Open());
+                               var text = streamReader.ReadToEnd();
+
+                               Assert.AreEqual("foo", text);
                        }
+
+                       File.Delete ("create.zip");
                }
 
                [Test]
@@ -184,6 +205,8 @@ namespace MonoTests.System.IO.Compression
                                Assert.AreEqual("foobar/bar.txt", entries[3].FullName);
                                Assert.AreEqual("foobar/foo.txt", entries[4].FullName);
                        }
+
+                       File.Delete ("test.zip");
                }
 
                [Test]
@@ -202,6 +225,8 @@ namespace MonoTests.System.IO.Compression
                                Assert.AreEqual("foobar/bar.txt", entries[3].FullName);
                                Assert.AreEqual("foobar/foo.txt", entries[4].FullName);
                        }
+
+                       File.Delete ("test.zip");
                }
 
                [Test]
@@ -219,6 +244,8 @@ namespace MonoTests.System.IO.Compression
                                
                                Assert.Fail();                          
                        }
+
+                       File.Delete ("test.zip");
                }
        }
 }
index acfb8f3f2a2c15cc4e64cac577766c579b84f9a9..cd783b8eb0c84b33b3f5a7492afb2496b28afde6 100644 (file)
@@ -112,15 +112,9 @@ namespace System.IO.Compression
                        if (Archive.Mode == ZipArchiveMode.Create && openStream != null)
                                throw new IOException("The archive for this entry was opened with the Create mode, and this entry has already been written to.");
 
-                       var memoryStream = new MemoryStream();
-                       openStream = memoryStream;
+                       openStream = entry.OpenEntryStream();
 
-                       if (Archive.Mode == ZipArchiveMode.Read || Archive.Mode == ZipArchiveMode.Update)
-                               entry.WriteTo(memoryStream);
-
-                       memoryStream.Seek(0, SeekOrigin.Begin);
-
-                       return memoryStream;
+                       return openStream;
                }
        }
 }
index dd82f0b0e78cce59ff4d1737fcd381d09fb5db45..afb8ae891aed83e8729913495a87727fc25410fc 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Security/System.Security-net_4_5.csproj">\r
       <Project>{B55E59B2-31CA-438B-ADB8-4B9A9A547830}</Project>\r
-      <Name>System.Security\System.Security-net_4_5</Name>\r
+      <Name>System.Security-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.IdentityModel/System.IdentityModel-net_4_5.csproj">\r
       <Project>{F056C062-E467-4989-9366-440E8CD23C0C}</Project>\r
-      <Name>System.IdentityModel\System.IdentityModel-net_4_5</Name>\r
+      <Name>System.IdentityModel-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 38fd187fdd5b799fcb561d800f753564ad85b7f3..17888b5d370f7f50c64a4024c6ca87bea6f6f668 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Security/System.Security-net_4_5.csproj">\r
       <Project>{B55E59B2-31CA-438B-ADB8-4B9A9A547830}</Project>\r
-      <Name>System.Security\System.Security-net_4_5</Name>\r
+      <Name>System.Security-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_5.csproj">\r
       <Project>{B4E6806D-1B38-4CEE-8ADB-2D0A4D1AF25F}</Project>\r
-      <Name>System.Web.ApplicationServices\System.Web.ApplicationServices-net_4_5</Name>\r
+      <Name>System.Web.ApplicationServices-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index f978549ad5d2d9bb0eafe75b490efbb54bec5ff8..dd2198f4914af0d25408244d7c9b666e0f150851 100644 (file)
     <AssemblyName>System.Json.Microsoft</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.CSharp/Microsoft.CSharp-net_4_5.csproj">\r
       <Project>{D554618C-5D38-413A-82BA-7A70B6FC61A3}</Project>\r
-      <Name>Microsoft.CSharp\Microsoft.CSharp-net_4_5</Name>\r
+      <Name>Microsoft.CSharp-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 3fda9997b13caea5a91869bbe58f0d03c4b12434..ad056809095a25cabab06bbc1a0224d9a5daeed5 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 64518785b87351fa6797c4bdfd8feb170df85a57..5d47eb4a4e6b6875a8cc103d914b56ee10cac2f4 100644 (file)
@@ -163,7 +163,16 @@ namespace System.Json
                                        return (string) value;
                                throw new NotImplementedException ("GetFormattedString from value type " + value.GetType ());
                        case JsonType.Number:
-                               return ((IFormattable) value).ToString ("G", NumberFormatInfo.InvariantInfo);
+                               string s;
+                               if (value is float || value is double)
+                                       // Use "round-trip" format
+                                       s = ((IFormattable) value).ToString ("R", NumberFormatInfo.InvariantInfo);
+                               else
+                                       s = ((IFormattable) value).ToString ("G", NumberFormatInfo.InvariantInfo);
+                               if (s == "NaN" || s == "Infinity" || s == "-Infinity")
+                                       return "\"" + s + "\"";
+                               else
+                                       return s;
                        default:
                                throw new InvalidOperationException ();
                        }
index 1d16b88e3f40407f1994efc04735c38bc269fada..d703edd5512c5c6427f43f78a2975f8600f5edd5 100644 (file)
@@ -1,6 +1,7 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.Globalization;
 using System.IO;
 using System.Linq;
 using System.Runtime.Serialization.Json;
@@ -218,8 +219,8 @@ namespace System.Json
                                if (src [i] == '"' || src [i] == '\\') {
                                        sb.Append (src, start, i - start);
                                        sb.Append ('\\');
-                                       sb.Append (src [i++]);
-                                       start = i;
+                                       sb.Append (src [i]);
+                                       start = i + 1;
                                }
                        sb.Append (src, start, src.Length - start);
                        return sb.ToString ();
@@ -328,70 +329,70 @@ namespace System.Json
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToBoolean (((JsonPrimitive) value).Value);
+                       return Convert.ToBoolean (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator byte (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToByte (((JsonPrimitive) value).Value);
+                       return Convert.ToByte (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator char (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToChar (((JsonPrimitive) value).Value);
+                       return Convert.ToChar (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator decimal (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToDecimal (((JsonPrimitive) value).Value);
+                       return Convert.ToDecimal (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator double (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToDouble (((JsonPrimitive) value).Value);
+                       return Convert.ToDouble (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator float (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToSingle (((JsonPrimitive) value).Value);
+                       return Convert.ToSingle (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator int (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToInt32 (((JsonPrimitive) value).Value);
+                       return Convert.ToInt32 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator long (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToInt64 (((JsonPrimitive) value).Value);
+                       return Convert.ToInt64 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator sbyte (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToSByte (((JsonPrimitive) value).Value);
+                       return Convert.ToSByte (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator short (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToInt16 (((JsonPrimitive) value).Value);
+                       return Convert.ToInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator string (JsonValue value)
@@ -405,21 +406,21 @@ namespace System.Json
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToUInt16 (((JsonPrimitive) value).Value);
+                       return Convert.ToUInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator ulong (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToUInt64(((JsonPrimitive) value).Value);
+                       return Convert.ToUInt64(((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator ushort (JsonValue value)
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       return Convert.ToUInt16 (((JsonPrimitive) value).Value);
+                       return Convert.ToUInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
                }
 
                public static implicit operator DateTime (JsonValue value)
index 2459c1fc3ad0f27478d902ffaccc6f2ec3f0d371..02dd106dfd8b82a5b3f3f9bf2ea71663d7aead57 100644 (file)
@@ -11,6 +11,8 @@ using System;
 using System.IO;
 using System.Text;
 using System.Json;
+using System.Globalization;
+using System.Threading;
 
 namespace MonoTests.System
 {
@@ -24,6 +26,14 @@ namespace MonoTests.System
                        Assert.AreEqual (1, j.Count, "itemcount");
                        Assert.AreEqual (JsonType.String, j ["a"].JsonType, "type");
                        Assert.AreEqual ("b", (string) j ["a"], "value");
+
+                       JsonValue.Parse ("[{ \"a\": \"b\",}]");
+               }
+
+               [Test]
+               public void LoadWithTrailingComma2 ()
+               {
+                       JsonValue.Parse ("[{ \"a\": \"b\",}]");
                }
 
                // Test that we correctly serialize JsonArray with null elements.
@@ -35,5 +45,141 @@ namespace MonoTests.System
                        var str = j.ToString ();
                        Assert.AreEqual (str, "[1, 2, 3, null]");
                }
+
+               [Test]
+               public void QuoteEscapeBug_20869 () 
+               {
+                       Assert.AreEqual ((new JsonPrimitive ("\"\"")).ToString (), "\"\\\"\\\"\"");
+               }
+
+               void ExpectError (string s)
+               {
+                       try {
+                               JsonValue.Parse (s);
+                               Assert.Fail ("Expected ArgumentException for `" + s + "'");
+                       } catch (ArgumentException) {
+                       }
+               }
+
+               // Test whether an exception is thrown for invalid JSON
+               [Test]
+               public void CheckErrors () 
+               {
+                       ExpectError (@"-");
+                       ExpectError (@"- ");
+                       ExpectError (@"1.");
+                       ExpectError (@"1. ");
+                       ExpectError (@"1e+");
+                       ExpectError (@"1 2");
+                       ExpectError (@"077");
+
+                       ExpectError (@"[1,]");
+
+                       //ExpectError (@"{""a"":1,}"); // Not valid JSON, allowed anyway
+               }
+
+               // Parse a json string and compare to the expected value
+               void CheckDouble (double expected, string json)
+               {
+                       double jvalue = (double) JsonValue.Parse (json);
+                       Assert.AreEqual (expected, jvalue);
+               }
+
+               // Convert a number to json and parse the string, then compare the result to the original value
+               void CheckDouble (double number)
+               {
+                       double jvalue = (double) JsonValue.Parse (new JsonPrimitive (number).ToString ());
+                       Assert.AreEqual (number, jvalue); // should be exactly the same
+               }
+
+               [Test]
+               public void CheckNumbers () 
+               {
+                       CheckDouble (0, "0");
+                       CheckDouble (0, "-0");
+                       CheckDouble (0, "0.00");
+                       CheckDouble (0, "-0.00");
+                       CheckDouble (1, "1");
+                       CheckDouble (1.1, "1.1");
+                       CheckDouble (-1, "-1");
+                       CheckDouble (-1.1, "-1.1");
+                       CheckDouble (1e-10, "1e-10");
+                       CheckDouble (1e+10, "1e+10");
+                       CheckDouble (1e-30, "1e-30");
+                       CheckDouble (1e+30, "1e+30");
+
+                       CheckDouble (1, "\"1\"");
+                       CheckDouble (1.1, "\"1.1\"");
+                       CheckDouble (-1, "\"-1\"");
+                       CheckDouble (-1.1, "\"-1.1\"");
+
+                       CheckDouble (double.NaN, "\"NaN\"");
+                       CheckDouble (double.PositiveInfinity, "\"Infinity\"");
+                       CheckDouble (double.NegativeInfinity, "\"-Infinity\"");
+
+                       ExpectError ("NaN");
+                       ExpectError ("Infinity");
+                       ExpectError ("-Infinity");
+
+                       Assert.AreEqual ("1.1", new JsonPrimitive (1.1).ToString ());
+                       Assert.AreEqual ("-1.1", new JsonPrimitive (-1.1).ToString ());
+                       Assert.AreEqual ("1E-20", new JsonPrimitive (1e-20).ToString ());
+                       Assert.AreEqual ("1E+20", new JsonPrimitive (1e+20).ToString ());
+                       Assert.AreEqual ("1E-30", new JsonPrimitive (1e-30).ToString ());
+                       Assert.AreEqual ("1E+30", new JsonPrimitive (1e+30).ToString ());
+                       Assert.AreEqual ("\"NaN\"", new JsonPrimitive (double.NaN).ToString ());
+                       Assert.AreEqual ("\"Infinity\"", new JsonPrimitive (double.PositiveInfinity).ToString ());
+                       Assert.AreEqual ("\"-Infinity\"", new JsonPrimitive (double.NegativeInfinity).ToString ());
+
+                       Assert.AreEqual ("1E-30", JsonValue.Parse ("1e-30").ToString ());
+                       Assert.AreEqual ("1E+30", JsonValue.Parse ("1e+30").ToString ());
+
+                       CheckDouble (1);
+                       CheckDouble (1.1);
+                       CheckDouble (1.25);
+                       CheckDouble (-1);
+                       CheckDouble (-1.1);
+                       CheckDouble (-1.25);
+                       CheckDouble (1e-20);
+                       CheckDouble (1e+20);
+                       CheckDouble (1e-30);
+                       CheckDouble (1e+30);
+                       CheckDouble (3.1415926535897932384626433);
+                       CheckDouble (3.1415926535897932384626433e-20);
+                       CheckDouble (3.1415926535897932384626433e+20);
+                       CheckDouble (double.NaN);
+                       CheckDouble (double.PositiveInfinity);
+                       CheckDouble (double.NegativeInfinity);
+                       CheckDouble (double.MinValue);
+                       CheckDouble (double.MaxValue);
+
+                       // A number which needs 17 digits (see http://stackoverflow.com/questions/6118231/why-do-i-need-17-significant-digits-and-not-16-to-represent-a-double)
+                       CheckDouble (18014398509481982.0);
+
+                       // Values around the smallest positive decimal value
+                       CheckDouble (1.123456789e-29);
+                       CheckDouble (1.123456789e-28);
+
+                       CheckDouble (1.1E-29, "0.000000000000000000000000000011");
+                       // This is being parsed as a decimal and rounded to 1e-28, even though it can be more accurately be represented by a double
+                       //CheckDouble (1.1E-28, "0.00000000000000000000000000011");
+               }
+
+               // Retry the test with different locales
+               [Test]
+               public void CheckNumbersCulture () 
+               {
+                       CultureInfo old = Thread.CurrentThread.CurrentCulture;
+                       try {
+                               Thread.CurrentThread.CurrentCulture = new CultureInfo ("en");
+                               CheckNumbers ();
+                               Thread.CurrentThread.CurrentCulture = new CultureInfo ("fr");
+                               CheckNumbers ();
+                               Thread.CurrentThread.CurrentCulture = new CultureInfo ("de");
+                               CheckNumbers ();
+                       } finally {
+                               Thread.CurrentThread.CurrentCulture = old;
+                       }
+               }
        }
 }
index ec51f9f7ba8492ea65edb31c60398267ba19e3ec..4204826702f98f5a8229583ac9d31ee165efc08e 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration.Install/System.Configuration.Install-net_4_5.csproj">\r
       <Project>{E6E1740E-37DD-487C-8947-F1C0612D4738}</Project>\r
-      <Name>System.Configuration.Install\System.Configuration.Install-net_4_5</Name>\r
+      <Name>System.Configuration.Install-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 081f4191aa5f02157e49d7ce06c83eaa022942d5..2754b9d6738924410b1fb942699bc2623fd91259 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration.Install/System.Configuration.Install-net_4_5.csproj">\r
       <Project>{E6E1740E-37DD-487C-8947-F1C0612D4738}</Project>\r
-      <Name>System.Configuration.Install\System.Configuration.Install-net_4_5</Name>\r
+      <Name>System.Configuration.Install-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Managed.Windows.Forms/System.Windows.Forms-net_4_5.csproj">\r
       <Project>{B102F27C-1A07-487F-BA5B-D5155D201112}</Project>\r
-      <Name>Managed.Windows.Forms\System.Windows.Forms-net_4_5</Name>\r
+      <Name>System.Windows.Forms-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Messaging/Mono.Messaging-net_4_5.csproj">\r
       <Project>{DDCC93B5-9425-4E9A-95DC-3400D0028508}</Project>\r
-      <Name>Mono.Messaging\Mono.Messaging-net_4_5</Name>\r
+      <Name>Mono.Messaging-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index b738a48bc640b7895fc9da587c41d228a06d471e..1241af63ff618173deffb7c6e7fbce03e62aff8f 100644 (file)
     <AssemblyName>System.Net.Http.Formatting</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Net.Http/System.Net.Http-net_4_5.csproj">\r
       <Project>{E36C154B-A0AC-4721-B06A-AFE31D357CE5}</Project>\r
-      <Name>System.Net.Http\System.Net.Http-net_4_5</Name>\r
+      <Name>System.Net.Http-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Xml.Linq/System.Xml.Linq-net_4_5.csproj">\r
       <Project>{8328796E-8A15-4972-8F1E-2F15E7D57C42}</Project>\r
-      <Name>System.Xml.Linq\System.Xml.Linq-net_4_5</Name>\r
+      <Name>System.Xml.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 612cafa47423b53c2c2ca628b1074c918edfff98..238097aeb249bf8bfc5c629fe2386f830c908ff7 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Net.Http/System.Net.Http-net_4_5.csproj">\r
       <Project>{E36C154B-A0AC-4721-B06A-AFE31D357CE5}</Project>\r
-      <Name>System.Net.Http\System.Net.Http-net_4_5</Name>\r
+      <Name>System.Net.Http-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 6ff2417947c49bd549450e1e9c951ed5b9fd1f82..06d2ae9c4e40a3333a1e2f6a644c71b99efdaeca 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 2458975d687bdf829f78a8a325d8ea2d0ae11233..fe940df8962e028a666a9ddb4429813d11157812 100644 (file)
@@ -34,6 +34,7 @@ namespace System.Net.Http
        public abstract class DelegatingHandler : HttpMessageHandler
        {
                bool disposed;
+               HttpMessageHandler handler;
                
                protected DelegatingHandler ()
                {
@@ -47,13 +48,24 @@ namespace System.Net.Http
                        InnerHandler = innerHandler;
                }
                
-               public HttpMessageHandler InnerHandler { get; set; }
+               public HttpMessageHandler InnerHandler {
+                       get {
+                               return handler;
+                       }
+                       set {
+                               if (value == null)
+                                       throw new ArgumentNullException ("InnerHandler");
+
+                               handler = value;
+                       }
+               }
                
                protected override void Dispose (bool disposing)
                {
                        if (disposing && !disposed) {
                                disposed = true;
-                               InnerHandler.Dispose ();
+                               if (InnerHandler != null)
+                                       InnerHandler.Dispose ();
                        }
                        
                        base.Dispose (disposing);
index fd9e444f7edad524ffa41fde1a4bd6ec1cbba5cf..7f74497c60b8c83e56306dc25118c185f98764fe 100644 (file)
@@ -327,6 +327,11 @@ namespace System.Net.Http
 
                                var stream = await wrequest.GetRequestStreamAsync ().ConfigureAwait (false);
                                await request.Content.CopyToAsync (stream).ConfigureAwait (false);
+                       } else if (HttpMethod.Post.Equals (request.Method) || HttpMethod.Put.Equals (request.Method) || HttpMethod.Delete.Equals (request.Method)) {
+                               // Explicitly set this to make sure we're sending a "Content-Length: 0" header.
+                               // This fixes the issue that's been reported on the forums:
+                               // http://forums.xamarin.com/discussion/17770/length-required-error-in-http-post-since-latest-release
+                               wrequest.ContentLength = 0;
                        }
 
                        HttpWebResponse wresponse = null;
index e5ce8f75050aa04794f336e16578f3531904236a..29d4d75f5e3dc304b1e9e760d302ddf9830c272e 100644 (file)
@@ -1,3 +1,4 @@
+System.Net.Http/DelegatingHandlerTest.cs
 System.Net.Http/ByteArrayContentTest.cs
 System.Net.Http/FormUrlEncodedContentTest.cs
 System.Net.Http/HttpClientHandlerTest.cs
diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/DelegatingHandlerTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/DelegatingHandlerTest.cs
new file mode 100644 (file)
index 0000000..d6812e7
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// DelegatingHandlerTest.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2014 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 NUnit.Framework;
+using System.Net.Http;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace MonoTests.System.Net.Http
+{
+       [TestFixture]
+       public class DelegatingHandlerTest
+       {
+               class DefaultHandler : DelegatingHandler
+               {
+               }
+
+
+               [Test]
+               public void DisposeTest ()
+               {
+                       var handler = new DefaultHandler ();
+                       handler.Dispose ();
+               }
+
+               [Test]
+               public void InnerHandler_Invalid ()
+               {
+                       var handler = new DefaultHandler ();
+                       try {
+                               handler.InnerHandler = null;
+                               Assert.Fail ("#1");
+                       } catch (ArgumentNullException) {
+                       }
+               }
+       }
+}
index edcd18fe2a424337b28762a7cd6b020d59afe185..d2871f60875b7ebafd8245f2958370f0f0bb40af 100644 (file)
@@ -533,6 +533,38 @@ namespace MonoTests.System.Net.Http
                        }
                }
 
+               [Test]
+               public void Send_Complete_NoContent ()
+               {
+                       foreach (var method in new HttpMethod[] { HttpMethod.Post, HttpMethod.Put, HttpMethod.Delete }) {
+                               bool? failed = null;
+                               var listener = CreateListener (l => {
+                                       try {
+                                               var request = l.Request;
+
+                                               Assert.AreEqual (2, request.Headers.Count, "#1");
+                                               Assert.AreEqual ("0", request.Headers ["Content-Length"], "#1b");
+                                               Assert.AreEqual (method.Method, request.HttpMethod, "#2");
+                                               failed = false;
+                                       } catch {
+                                               failed = true;
+                                       }
+                               });
+
+                               try {
+                                       var client = new HttpClient ();
+                                       var request = new HttpRequestMessage (method, LocalServer);
+                                       var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result;
+
+                                       Assert.AreEqual ("", response.Content.ReadAsStringAsync ().Result, "#100");
+                                       Assert.AreEqual (HttpStatusCode.OK, response.StatusCode, "#101");
+                                       Assert.AreEqual (false, failed, "#102");
+                               } finally {
+                                       listener.Close ();
+                               }
+                       }
+               }
+
                [Test]
                public void Send_Complete_Error ()
                {
index 5a61b0f57ed29b9a09988a086ae4287c32dacc3d..5aebaa0add7f7c1fafff803a91eb2d89de085a08 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index aa973986ecc94e174047909718c8f96252a1e254..58b950df3a6766957f3fb871b5629714d954a56a 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index b067997cb7ca810c88674b9f236cdce8adcc57fd..329f91eed1fc43d8ff8f0f4f52ab16320b22032d 100644 (file)
@@ -315,12 +315,14 @@ namespace System.Numerics {
                                        word = (uint)sub;
                                        borrow = (uint)(sub >> 32) & 0x1u;
 
-                                       data [data.Length - 1] = ~word & store_mask;
+                                       if ((~word & store_mask) == 0)
+                                               data = Resize (data, data.Length - 1);
+                                       else
+                                               data [data.Length - 1] = ~word & store_mask;
                                }
                                if (borrow != 0) //FIXME I believe this can't happen, can someone write a test for it?
                                        throw new Exception ("non zero final carry");
                        }
-
                }
 
                public bool IsEven {
index 4aa0ffbd029d7182e8ce1a137baf1fef4c6ac3b5..817d13e40c18e84b240a9df1a85223468d2d227f 100644 (file)
@@ -550,13 +550,18 @@ namespace MonoTests.System.Numerics
                {
                        long[] values = new long [] {
                                0, long.MinValue, long.MaxValue, -1, 1L + int.MaxValue, -1L + int.MinValue, 0x1234, 0xFFFFFFFFL, 0x1FFFFFFFFL, -0xFFFFFFFFL, -0x1FFFFFFFFL,
-                               0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L };
+                               0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L, 4294967295L, -4294967295L, 4294967296L, -4294967296L };
                        foreach (var val in values) {
-                               var a = new BigInteger (val);
-                               var b = new BigInteger (a.ToByteArray ());
-
-                               Assert.AreEqual (val, (long)a, "#a_" + val);
-                               Assert.AreEqual (val, (long)b, "#b_" + val);
+                               try {
+                                       var a = new BigInteger (val);
+                                       var b = new BigInteger (a.ToByteArray ());
+
+                                       Assert.AreEqual (val, (long)a, "#a_" + val);
+                                       Assert.AreEqual (val, (long)b, "#b_" + val);
+                                       Assert.AreEqual (a, b, "#a  == #b (" + val + ")");
+                               } catch (Exception e) {
+                                       Assert.Fail ("could not roundtrip {0}", val);
+                               }
                        }
                }
 
index 48eef1e1fb7609af6245cda48a53ca4ee4bd8e29..c3d05c0943ed5799e308c99a393398196fe04b9e 100644 (file)
     <AssemblyName>System.Reactive.Core</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 8f52a18a013c92c904adf61d1f0ac79d54cf2c56..6e9d230ecf6fde88caaccda5acc05f4df0fe93fc 100644 (file)
     <AssemblyName>System.Reactive.Debugger</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Core/System.Reactive.Core-net_4_5.csproj">\r
       <Project>{4EF3C775-C516-4897-AB1D-DC9F8862A4D9}</Project>\r
-      <Name>System.Reactive.Core\System.Reactive.Core-net_4_5</Name>\r
+      <Name>System.Reactive.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Linq/System.Reactive.Linq-net_4_5.csproj">\r
       <Project>{EE831E49-3F84-4A05-9417-A9C8BD36E164}</Project>\r
-      <Name>System.Reactive.Linq\System.Reactive.Linq-net_4_5</Name>\r
+      <Name>System.Reactive.Linq-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 6392053ad62a2bf7beeb5319bf7faf1a8437c506..ecd5ef66c38bb5669ca94d2b58e4e8d672809adf 100644 (file)
     <AssemblyName>System.Reactive.Experimental</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Core/System.Reactive.Core-net_4_5.csproj">\r
       <Project>{4EF3C775-C516-4897-AB1D-DC9F8862A4D9}</Project>\r
-      <Name>System.Reactive.Core\System.Reactive.Core-net_4_5</Name>\r
+      <Name>System.Reactive.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Linq/System.Reactive.Linq-net_4_5.csproj">\r
       <Project>{EE831E49-3F84-4A05-9417-A9C8BD36E164}</Project>\r
-      <Name>System.Reactive.Linq\System.Reactive.Linq-net_4_5</Name>\r
+      <Name>System.Reactive.Linq-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 5173cf1de09d2d2fc49e18635ed907e09c37e36c..c7590b4de86e4a47edcc7a31ea38744e29b20fa1 100644 (file)
     <AssemblyName>System.Reactive.Interfaces</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1fb3317c962ee330e6982c3a4a7c88649ae8b2ce..48c5cb1f74049a69b9a6f1b8f630f6fdf2403cc1 100644 (file)
     <AssemblyName>System.Reactive.Linq</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Core/System.Reactive.Core-net_4_5.csproj">\r
       <Project>{4EF3C775-C516-4897-AB1D-DC9F8862A4D9}</Project>\r
-      <Name>System.Reactive.Core\System.Reactive.Core-net_4_5</Name>\r
+      <Name>System.Reactive.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 0ec36c38e1188fb5b83780fa79d5b3103ae4cd57..55671c8cbf9ce459125a2953e412476155c47edc 100644 (file)
     <AssemblyName>System.Reactive.Observable.Aliases</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Core/System.Reactive.Core-net_4_5.csproj">\r
       <Project>{4EF3C775-C516-4897-AB1D-DC9F8862A4D9}</Project>\r
-      <Name>System.Reactive.Core\System.Reactive.Core-net_4_5</Name>\r
+      <Name>System.Reactive.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Linq/System.Reactive.Linq-net_4_5.csproj">\r
       <Project>{EE831E49-3F84-4A05-9417-A9C8BD36E164}</Project>\r
-      <Name>System.Reactive.Linq\System.Reactive.Linq-net_4_5</Name>\r
+      <Name>System.Reactive.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Providers/System.Reactive.Providers-net_4_5.csproj">\r
       <Project>{8D27108A-3DD4-46D7-917E-7833A3C4D479}</Project>\r
-      <Name>System.Reactive.Providers\System.Reactive.Providers-net_4_5</Name>\r
+      <Name>System.Reactive.Providers-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c00a435d988c51c04eccdb020452c23ca0a60277..2fc9e385a4506bf4fce8534158aac707c73b0c08 100644 (file)
     <AssemblyName>System.Reactive.PlatformServices</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Core/System.Reactive.Core-net_4_5.csproj">\r
       <Project>{4EF3C775-C516-4897-AB1D-DC9F8862A4D9}</Project>\r
-      <Name>System.Reactive.Core\System.Reactive.Core-net_4_5</Name>\r
+      <Name>System.Reactive.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Linq/System.Reactive.Linq-net_4_5.csproj">\r
       <Project>{EE831E49-3F84-4A05-9417-A9C8BD36E164}</Project>\r
-      <Name>System.Reactive.Linq\System.Reactive.Linq-net_4_5</Name>\r
+      <Name>System.Reactive.Linq-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 841b297835087ed007a3fa2e527b30eb4a227964..f39a6e823bceb7ad3f6cd85fd22addf9e7f157bb 100644 (file)
     <AssemblyName>System.Reactive.Providers</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Core/System.Reactive.Core-net_4_5.csproj">\r
       <Project>{4EF3C775-C516-4897-AB1D-DC9F8862A4D9}</Project>\r
-      <Name>System.Reactive.Core\System.Reactive.Core-net_4_5</Name>\r
+      <Name>System.Reactive.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Linq/System.Reactive.Linq-net_4_5.csproj">\r
       <Project>{EE831E49-3F84-4A05-9417-A9C8BD36E164}</Project>\r
-      <Name>System.Reactive.Linq\System.Reactive.Linq-net_4_5</Name>\r
+      <Name>System.Reactive.Linq-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 62a25babdfce4ce18361cf11512aaa9ca9beb9c4..a9647c3b7371f29e514992b057f13b498df4ad4e 100644 (file)
     <AssemblyName>System.Reactive.Runtime.Remoting</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Core/System.Reactive.Core-net_4_5.csproj">\r
       <Project>{4EF3C775-C516-4897-AB1D-DC9F8862A4D9}</Project>\r
-      <Name>System.Reactive.Core\System.Reactive.Core-net_4_5</Name>\r
+      <Name>System.Reactive.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Linq/System.Reactive.Linq-net_4_5.csproj">\r
       <Project>{EE831E49-3F84-4A05-9417-A9C8BD36E164}</Project>\r
-      <Name>System.Reactive.Linq\System.Reactive.Linq-net_4_5</Name>\r
+      <Name>System.Reactive.Linq-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1a495e4ae0622368b10fb8925cd7804aa2b03d41..639e9d73a77c469cb9f6d4025b50b61a950f45c8 100644 (file)
     <AssemblyName>System.Reactive.Windows.Forms</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Core/System.Reactive.Core-net_4_5.csproj">\r
       <Project>{4EF3C775-C516-4897-AB1D-DC9F8862A4D9}</Project>\r
-      <Name>System.Reactive.Core\System.Reactive.Core-net_4_5</Name>\r
+      <Name>System.Reactive.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Linq/System.Reactive.Linq-net_4_5.csproj">\r
       <Project>{EE831E49-3F84-4A05-9417-A9C8BD36E164}</Project>\r
-      <Name>System.Reactive.Linq\System.Reactive.Linq-net_4_5</Name>\r
+      <Name>System.Reactive.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Managed.Windows.Forms/System.Windows.Forms-net_4_5.csproj">\r
       <Project>{B102F27C-1A07-487F-BA5B-D5155D201112}</Project>\r
-      <Name>Managed.Windows.Forms\System.Windows.Forms-net_4_5</Name>\r
+      <Name>System.Windows.Forms-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 2141b412e481137d3a2a66700d607184b0170cea..85c8cddba105435a3270e687ead50240b77fca6c 100644 (file)
     <AssemblyName>System.Reactive.Windows.Threading</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../reactive.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_5.csproj">\r
       <Project>{EFA38650-CE13-4BF3-993D-70B238DB1C9E}</Project>\r
-      <Name>System.Reactive.Interfaces\System.Reactive.Interfaces-net_4_5</Name>\r
+      <Name>System.Reactive.Interfaces-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Core/System.Reactive.Core-net_4_5.csproj">\r
       <Project>{4EF3C775-C516-4897-AB1D-DC9F8862A4D9}</Project>\r
-      <Name>System.Reactive.Core\System.Reactive.Core-net_4_5</Name>\r
+      <Name>System.Reactive.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Reactive.Linq/System.Reactive.Linq-net_4_5.csproj">\r
       <Project>{EE831E49-3F84-4A05-9417-A9C8BD36E164}</Project>\r
-      <Name>System.Reactive.Linq\System.Reactive.Linq-net_4_5</Name>\r
+      <Name>System.Reactive.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../WindowsBase/WindowsBase-net_4_5.csproj">\r
       <Project>{8E6ED7D5-3B08-4A83-905E-8FB4CF0C160D}</Project>\r
-      <Name>WindowsBase\WindowsBase-net_4_5</Name>\r
+      <Name>WindowsBase-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index aaca2b059f5ec410b6ba8af5d3e5ca2d3164a09b..40003195c3e8384ebc1a0fd12e056b6d3987a725 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 2c9cafb0f6ac5221956feb618ed7141d8940751d..39b66d9ca19773855a920f1617a0f6ba03c94347 100644 (file)
@@ -1254,7 +1254,7 @@ namespace MonoTests.System.Runtime.Caching
                                                        
                                // add some short duration entries
                                for (int i = 0; i < HEAP_RESIZE_SHORT_ENTRIES; i++) {
-                                       var expireAt = DateTimeOffset.Now.AddSeconds (1);
+                                       var expireAt = DateTimeOffset.Now.AddSeconds (3);
                                        mc.Add ("short-" + i, i.ToString (), expireAt);
                                }
                                
@@ -1262,20 +1262,20 @@ namespace MonoTests.System.Runtime.Caching
                                                        
                                // add some long duration entries                               
                                for (int i = 0; i < HEAP_RESIZE_LONG_ENTRIES; i++) {
-                                       var expireAt = DateTimeOffset.Now.AddSeconds (10);
+                                       var expireAt = DateTimeOffset.Now.AddSeconds (12);
                                        mc.Add ("long-" + i, i.ToString (), expireAt);
                                }                                                                                                                       
                                
                                Assert.AreEqual (HEAP_RESIZE_LONG_ENTRIES + HEAP_RESIZE_SHORT_ENTRIES, mc.GetCount(), "#CS3");
                                
                                // wait for the cache thread to expire the short duration items, this will also shrink the size of the cache
-                               global::System.Threading.Thread.Sleep (3 * 1000);
+                               global::System.Threading.Thread.Sleep (5 * 1000);
                                
                                Assert.AreEqual (HEAP_RESIZE_LONG_ENTRIES, mc.GetCount (), "#CS4");     
                                
                                // add some new items into the cache, this will grow the cache again
                                for (int i = 0; i < HEAP_RESIZE_LONG_ENTRIES; i++) {                            
-                                       mc.Add("final-" + i, i.ToString (), DateTimeOffset.Now.AddSeconds (2));
+                                       mc.Add("final-" + i, i.ToString (), DateTimeOffset.Now.AddSeconds (4));
                                }                       
                                
                                Assert.AreEqual (HEAP_RESIZE_LONG_ENTRIES + HEAP_RESIZE_LONG_ENTRIES, mc.GetCount (), "#CS5");  
index cbeccdbf9801ca7b9edbd9c8f6d2b5debd41c3df..e8cfc440b4699a6a99e38cc4daa5d3a699d13024 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Xml.Linq/System.Xml.Linq-net_4_5.csproj">\r
       <Project>{8328796E-8A15-4972-8F1E-2F15E7D57C42}</Project>\r
-      <Name>System.Xml.Linq\System.Xml.Linq-net_4_5</Name>\r
+      <Name>System.Xml.Linq-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 244d5504fffb741ca2785e5673f88a1443e604e4..82d13338a769e3a2ebcce0b46f1dfc876dd3b174 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap-net_4_5.csproj">\r
       <Project>{B12AABBC-30D1-4885-BF3F-A53B970F68FB}</Project>\r
-      <Name>System.Runtime.Serialization.Formatters.Soap\System.Runtime.Serialization.Formatters.Soap-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization.Formatters.Soap-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 83f5eeff79a1e4d45f3ba82f9369c265bc525826..9ca8bba321d6f5aa872a886f0b2232079b2906fd 100644 (file)
@@ -218,7 +218,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
                                        try {
                                                if (!threadPool.RunThread (new ThreadStart (reader.ProcessMessages)))
                                                        socket.Close ();
-                                       } catch (Exception) 
+                                       } catch (Exception e
                                        {
 #if DEBUG
                                                Console.WriteLine("Exception caught in TcpServerChannel.WaitForConnections during start process message: {0} {1}", e.GetType(), e.Message);
@@ -226,7 +226,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
                                        }
                                }
                        }
-                       catch (Exception)
+                       catch (Exception e)
                        {
 #if DEBUG
                                Console.WriteLine("Exception caught in TcpServerChannel.WaitForConnections, stop channel's thread : {0} {1}", e.GetType(), e.Message);
index 52954456e5cb5675db267145c203b48f65860007..aa99a6554872244ad712418160a8fe74aa1ab473 100644 (file)
@@ -169,7 +169,7 @@ namespace System.Runtime.Remoting.Channels
                                try {
                                        work ();
                                }
-                               catch (Exception)
+                               catch (Exception ex)
                                {
 #if DEBUG
                                        Console.WriteLine("The exception was caught during RemotingThreadPool.PoolThread - work: {0}, {1}", ex.GetType(), ex.Message);
index 27813db136caac4be7d986d68bd7a477b71e9de0..b9862693a57901d29bd93629f141a4dd4b4db59f 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index fe1c9a98ead526ec887a211fb53160fc247b47bc..ef8b730315a13a09c119f1971a28e1965ccd1406 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 5808c10c4c56d94a9b2ede0e2a3d65c29227ac67..95e35b0a09fad0355a6b1e267c8f632213ba1c14 100755 (executable)
@@ -566,9 +566,14 @@ namespace System.Runtime.Serialization
                }
 #endif
 
-               private bool IsAny() {
+               private bool IsAny ()
+               {
                        var xpa = type.GetCustomAttribute<XmlSchemaProviderAttribute> (true);
-                       return xpa.IsAny;
+
+                       if (xpa != null)
+                               return xpa.IsAny;
+
+                       return false;
                }
        }
 }
index 3ba1539f43aab3b924268ea102de27efd318348f..d97385f225c49bf9293297830374beebb9192ea9 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-secxml-net_4_5.csproj">\r
       <Project>{46F151F2-A422-4A1B-9D29-2E148CE73629}</Project>\r
-      <Name>System\System-secxml-net_4_5</Name>\r
+      <Name>System-secxml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-bare-net_4_5.csproj">\r
       <Project>{21FB091E-0F84-479E-AB16-6503D36852F9}</Project>\r
-      <Name>System.XML\System.Xml-bare-net_4_5</Name>\r
+      <Name>System.Xml-bare-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 22073a2cfb2a423684909f05725a722b2f80e93a..7f34560859a042dc4b6ebec7092160230e223a1c 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel/System.ServiceModel-plainservice-net_4_5.csproj">\r
       <Project>{0E3CFD7E-2F93-4B5B-B7FA-2AEBE0F850C0}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-plainservice-net_4_5</Name>\r
+      <Name>System.ServiceModel-plainservice-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c0971d9e4aa9dc5b9e86a3f683dab831d688a23d..e97737daecdb24e5c3db445c11eee0e8d767a9cc 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Xml.Linq/System.Xml.Linq-net_4_5.csproj">\r
       <Project>{8328796E-8A15-4972-8F1E-2F15E7D57C42}</Project>\r
-      <Name>System.Xml.Linq\System.Xml.Linq-net_4_5</Name>\r
+      <Name>System.Xml.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index ef0e827376e270087a9bcce88ae395403a02f248..318ef05c74bfc1a020d825eb592392e8a6058e8f 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 891be5db3ee2b0c44fa287bbad83c4e0e9b6e818..2d11b1727aec81a2f5f1b1296e1b4336c19296f4 100644 (file)
@@ -26,7 +26,7 @@ namespace System.Runtime.Serialization.Json
                {
                        object v = ReadCore ();
                        SkipSpaces ();
-                       if (r.Read () >= 0)
+                       if (ReadChar () >= 0)
                                throw JsonError (String.Format ("extra characters in JSON input"));
                        return v;
                }
@@ -68,8 +68,10 @@ namespace System.Runtime.Serialization.Json
                                }
                                while (true) {
                                        SkipSpaces ();
-                                       if (PeekChar () == '}')
+                                       if (PeekChar () == '}') {
+                                               ReadChar ();
                                                break;
+                                       }
                                        string name = ReadStringLiteral ();
                                        SkipSpaces ();
                                        Expect (':');
@@ -160,98 +162,89 @@ namespace System.Runtime.Serialization.Json
                // It could return either int, long or decimal, depending on the parsed value.
                object ReadNumericLiteral ()
                {
+                       var sb = new StringBuilder ();
+                       
                        bool negative = false;
                        if (PeekChar () == '-') {
                                negative = true;
-                               ReadChar ();
-                               if (PeekChar () < 0)
-                                       throw JsonError ("Invalid JSON numeric literal; extra negation");
+                               sb.Append ((char) ReadChar ());
                        }
 
                        int c;
-                       decimal val = 0;
                        int x = 0;
                        bool zeroStart = PeekChar () == '0';
                        for (; ; x++) {
                                c = PeekChar ();
                                if (c < '0' || '9' < c)
                                        break;
-                               val = val * 10 + (c - '0');
-                               ReadChar ();
-                               if (zeroStart && x == 1 && c == '0')
-                                       throw JsonError ("leading multiple zeros are not allowed");
+                               sb.Append ((char) ReadChar ());
+                               if (zeroStart && x == 1)
+                                       throw JsonError ("leading zeros are not allowed");
                        }
+                       if (x == 0) // Reached e.g. for "- "
+                               throw JsonError ("Invalid JSON numeric literal; no digit found");
 
                        // fraction
-
                        bool hasFrac = false;
-                       decimal frac = 0;
                        int fdigits = 0;
                        if (PeekChar () == '.') {
                                hasFrac = true;
-                               ReadChar ();
+                               sb.Append ((char) ReadChar ());
                                if (PeekChar () < 0)
                                        throw JsonError ("Invalid JSON numeric literal; extra dot");
-                               decimal d = 10;
                                while (true) {
                                        c = PeekChar ();
                                        if (c < '0' || '9' < c)
                                                break;
-                                       ReadChar ();
-                                       frac += (c - '0') / d;
-                                       d *= 10;
+                                       sb.Append ((char) ReadChar ());
                                        fdigits++;
                                }
                                if (fdigits == 0)
                                        throw JsonError ("Invalid JSON numeric literal; extra dot");
                        }
-                       frac = Decimal.Round (frac, fdigits);
 
                        c = PeekChar ();
                        if (c != 'e' && c != 'E') {
                                if (!hasFrac) {
-                                       if (negative && int.MinValue <= -val ||
-                                           !negative && val <= int.MaxValue)
-                                               return (int) (negative ? -val : val);
-                                       if (negative && long.MinValue <= -val ||
-                                           !negative && val <= long.MaxValue)
-                                               return (long) (negative ? -val : val);
+                                       int valueInt;
+                                       if (int.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueInt))
+                                               return valueInt;
+                                       
+                                       long valueLong;
+                                       if (long.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueLong))
+                                               return valueLong;
+                                       
+                                       ulong valueUlong;
+                                       if (ulong.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueUlong))
+                                               return valueUlong;
                                }
-                               var v = val + frac;
-                               return negative ? -v : v;
-                       }
-
-                       // exponent
-
-                       ReadChar ();
-
-                       int exp = 0;
-                       if (PeekChar () < 0)
-                               throw new ArgumentException ("Invalid JSON numeric literal; incomplete exponent");
+                               decimal valueDecimal;
+                               if (decimal.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueDecimal) && valueDecimal != 0)
+                                       return valueDecimal;
+                       } else {
+                               // exponent
+                               sb.Append ((char) ReadChar ());
+                               if (PeekChar () < 0)
+                                       throw new ArgumentException ("Invalid JSON numeric literal; incomplete exponent");
                        
-                       bool negexp = false;
-                       c = PeekChar ();
-                       if (c == '-') {
-                               ReadChar ();
-                               negexp = true;
-                       }
-                       else if (c == '+')
-                               ReadChar ();
-
-                       if (PeekChar () < 0)
-                               throw JsonError ("Invalid JSON numeric literal; incomplete exponent");
-                       while (true) {
                                c = PeekChar ();
-                               if (c < '0' || '9' < c)
-                                       break;
-                               exp = exp * 10 + (c - '0');
-                               ReadChar ();
+                               if (c == '-') {
+                                       sb.Append ((char) ReadChar ());
+                               }
+                               else if (c == '+')
+                                       sb.Append ((char) ReadChar ());
+
+                               if (PeekChar () < 0)
+                                       throw JsonError ("Invalid JSON numeric literal; incomplete exponent");
+                               while (true) {
+                                       c = PeekChar ();
+                                       if (c < '0' || '9' < c)
+                                               break;
+                                       sb.Append ((char) ReadChar ());
+                               }
                        }
-                       // it is messy to handle exponent, so I just use Decimal.Parse() with assured JSON format.
-                       if (negexp)
-                               return new Decimal ((double) (val + frac) / Math.Pow (10, exp));
-                       int [] bits = Decimal.GetBits (val + frac);
-                       return new Decimal (bits [0], bits [1], bits [2], negative, (byte) exp);
+
+                       return double.Parse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture);
                }
 
                StringBuilder vb = new StringBuilder ();
index 9ccf447e5bf927c49f9d28a133f3208254b409e6..9ea5bf907d66c683dec2965e5ddf5fe930b370aa 100644 (file)
@@ -121,21 +121,21 @@ namespace System.Runtime.Serialization.Json
                                        writer.WriteString (qn.Namespace);
                                } else if (TypeMap.IsDictionary (type)) {
                                        writer.WriteAttributeString ("type", "array");
-                                       var itemGetter = type.GetProperty ("Item");
-                                       var keysGetter = type.GetProperty ("Keys");
-                                       var argarr = new object [1];
-                                       foreach (object o in (IEnumerable) keysGetter.GetValue (graph, null)) {
-                                               writer.WriteStartElement ("item");
-                                               writer.WriteAttributeString ("type", "object");
-                                               // outputting a KeyValuePair as <Key .. /><Value ... />
-                                               writer.WriteStartElement ("Key");
-                                               WriteObjectContent (o, false, !(graph is Array && type.GetElementType () != typeof (object)));
-                                               writer.WriteEndElement ();
-                                               writer.WriteStartElement ("Value");
-                                               argarr [0] = o;
-                                               WriteObjectContent (itemGetter.GetValue (graph, argarr), false, !(graph is Array && type.GetElementType () != typeof (object)));
-                                               writer.WriteEndElement ();
-                                               writer.WriteEndElement ();
+                                       bool otn = !(graph is Array && type.GetElementType () != typeof (object));
+                                       var d = graph as IDictionary;
+                                       if (d != null) {
+                                               // Optimize the IDictionary case to avoid reflection
+                                               foreach (object k in d.Keys)
+                                                       WriteItem (k, d [k], otn);
+                                       } else {
+                                               // we can't typecast to IDictionary<,> and can't use dynamic for iOS support
+                                               var itemGetter = GetDictionaryProperty (type, "Item");
+                                               var keysGetter = GetDictionaryProperty (type, "Keys");
+                                               var argarr = new object [1];
+                                               foreach (object o in (IEnumerable) keysGetter.GetValue (graph, null)) {
+                                                       argarr [0] = o;
+                                                       WriteItem (o, itemGetter.GetValue (graph, argarr), otn);
+                                               }
                                        }
                                } else if (graph is Array || TypeMap.IsEnumerable (type)) {
                                        writer.WriteAttributeString ("type", "array");
@@ -162,6 +162,36 @@ throw new InvalidDataContractException (String.Format ("Type {0} cannot be seria
                        }
                }
 
+               void WriteItem (object key, object value, bool outputTypeName)
+               {
+                       writer.WriteStartElement ("item");
+                       writer.WriteAttributeString ("type", "object");
+                       // outputting a KeyValuePair as <Key .. /><Value ... />
+                       writer.WriteStartElement ("Key");
+                       WriteObjectContent (key, false, outputTypeName);
+                       writer.WriteEndElement ();
+                       writer.WriteStartElement ("Value");
+                       WriteObjectContent (value, false, outputTypeName);
+                       writer.WriteEndElement ();
+                       writer.WriteEndElement ();
+               }
+
+               PropertyInfo GetDictionaryProperty (Type type, string propertyName)
+               {
+                       var p = type.GetProperty (propertyName);
+                       if (p != null)
+                               return p;
+                       // check explicit - but the generic names might differ, e.g. TKey,TValue vs T,V
+                       var ap = type.GetProperties (BindingFlags.Instance | BindingFlags.NonPublic);
+                       foreach (var cp in ap) {
+                               if (!cp.Name.EndsWith (propertyName, StringComparison.Ordinal))
+                                       continue;
+                               if (cp.Name.StartsWith ("System.Collections.Generic.IDictionary<", StringComparison.Ordinal))
+                                       return cp;
+                       }
+                       return null;
+               }
+
                string FormatTypeName (Type type)
                {
                        return String.Format ("{0}:#{1}", type.Name, type.Namespace);
index b74e00fa02ce27174a47a389cfca81ae629ab33e..9bbf869afb323a9b6ed92eb6d0c49dd6a07242a7 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Extensions/System.Web.Extensions-net_4_5.csproj">\r
       <Project>{74D281D8-F725-4D79-B218-2DFCCFD44FA2}</Project>\r
-      <Name>System.Web.Extensions\System.Web.Extensions-net_4_5</Name>\r
+      <Name>System.Web.Extensions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel.Activation/System.ServiceModel.Activation-net_4_5.csproj">\r
       <Project>{E537F31B-BCB7-4935-ABF3-DF2FAC48DCB3}</Project>\r
-      <Name>System.ServiceModel.Activation\System.ServiceModel.Activation-net_4_5</Name>\r
+      <Name>System.ServiceModel.Activation-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 7bcb40ccf8f8774cd82ff7effe091a1d0e5fab39..68d9fb6a083ce21a6a60b36523769bf4afbd47ba 100644 (file)
@@ -1453,7 +1453,24 @@ namespace MonoTests.System.Runtime.Serialization.Json
                        Assert.AreEqual (1, dict.Count, "#2");
                        Assert.AreEqual ("value", dict ["key"], "#3");
                }
-               
+
+               [Test]
+               public void ExplicitCustomDictionarySerialization ()
+               {
+                       var dict = new MyExplicitDictionary<string,string> ();
+                       dict.Add ("key", "value");
+                       var serializer = new DataContractJsonSerializer (dict.GetType ());
+                       var stream = new MemoryStream ();
+                       serializer.WriteObject (stream, dict);
+                       stream.Position = 0;
+
+                       Assert.AreEqual ("[{\"Key\":\"key\",\"Value\":\"value\"}]", new StreamReader (stream).ReadToEnd (), "#1");
+                       stream.Position = 0;
+                       dict = (MyExplicitDictionary<string,string>) serializer.ReadObject (stream);
+                       Assert.AreEqual (1, dict.Count, "#2");
+                       Assert.AreEqual ("value", dict ["key"], "#3");
+               }
+
                [Test]
                public void Bug13485 ()
                {
@@ -2113,6 +2130,91 @@ public class MyDictionary<K, V> : System.Collections.Generic.IDictionary<K, V>
        }
 }
 
+public class MyExplicitDictionary<K, V> : IDictionary<K, V> {
+
+       Dictionary<K,V> dic = new Dictionary<K,V> ();
+
+       public void Add (K key, V value)
+       {
+               dic.Add (key,  value);
+       }
+
+       public bool ContainsKey (K key)
+       {
+               return dic.ContainsKey (key);
+       }
+
+       ICollection<K> IDictionary<K, V>.Keys {
+               get { return dic.Keys; }
+       }
+
+       public bool Remove (K key)
+       {
+               return dic.Remove (key);
+       }
+
+       public bool TryGetValue (K key, out V value)
+       {
+               return dic.TryGetValue (key, out value);
+       }
+
+       ICollection<V> IDictionary<K, V>.Values {
+               get { return dic.Values; }
+       }
+
+       public V this [K key] {
+               get { return dic [key]; }
+               set { dic [key] = value; }
+       }
+
+       IEnumerator IEnumerable.GetEnumerator ()
+       {
+               return dic.GetEnumerator ();
+       }
+
+       ICollection<KeyValuePair<K,V>> Coll {
+               get { return (ICollection<KeyValuePair<K,V>>) dic; }
+       }
+
+       public void Add (KeyValuePair<K, V> item)
+       {
+               Coll.Add (item);
+       }
+
+       public void Clear ()
+       {
+               dic.Clear ();
+       }
+
+       public bool Contains (KeyValuePair<K, V> item)
+       {
+               return Coll.Contains (item);
+       }
+
+       public void CopyTo (KeyValuePair<K, V> [] array, int arrayIndex)
+       {
+               Coll.CopyTo (array, arrayIndex);
+       }
+
+       public int Count {
+               get { return dic.Count; }
+       }
+
+       public bool IsReadOnly {
+               get { return Coll.IsReadOnly; }
+       }
+
+       public bool Remove (KeyValuePair<K, V> item)
+       {
+               return Coll.Remove (item);
+       }
+
+       public IEnumerator<KeyValuePair<K, V>> GetEnumerator ()
+       {
+               return Coll.GetEnumerator ();
+       }
+}
+
 [DataContract]
 public class Bug13485Type
 {
index cf1038dac22e3e1be442878d3d1b5205c5cd0848..99376fbcd64aa04eb89028734708cbfe73102a38 100644 (file)
@@ -45,7 +45,7 @@ namespace MonoTests.System.ServiceModel.Web
                [Category("NotWorking")]\r
                public void ServiceDebugBehaviorTest () {\r
 \r
-                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/"));\r
+                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/"));\r
                        ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding");\r
 \r
                        Assert.AreEqual (true, host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageEnabled, "HttpHelpPageEnabled #1");\r
@@ -63,7 +63,7 @@ namespace MonoTests.System.ServiceModel.Web
                [Category ("NotWorking")]\r
                public void WebHttpBehaviorTest1 () {\r
 \r
-                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/"));\r
+                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/"));\r
                        ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding");\r
                        ServiceEndpoint basicHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new BasicHttpBinding (), "BasicHttpBinding");\r
 \r
@@ -83,7 +83,7 @@ namespace MonoTests.System.ServiceModel.Web
                [Category("NotWorking")]\r
                public void WebHttpBehaviorTest2 () {\r
 \r
-                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/"));\r
+                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/"));\r
                        ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding");\r
                        MyWebHttpBehavior behavior = new MyWebHttpBehavior ();\r
                        behavior.ApplyDispatchBehaviorBegin += delegate {\r
@@ -103,7 +103,7 @@ namespace MonoTests.System.ServiceModel.Web
                [Test]\r
                public void ServiceBaseUriTest () {\r
 \r
-                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/"));\r
+                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/"));\r
                        Assert.AreEqual (0, host.Description.Endpoints.Count, "no endpoints yet");\r
                        host.Open ();\r
                        Assert.AreEqual (1, host.Description.Endpoints.Count, "default endpoint after open");\r
@@ -136,4 +136,4 @@ namespace MonoTests.System.ServiceModel.Web
 \r
        }\r
 }\r
-#endif
\ No newline at end of file
+#endif\r
index 02d12751dc38961d4e9bc8c843c87d820be5b009..033b2cdb0c58a08e89653d2bf3c34d00b4c1e20b 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Security/System.Security-net_4_5.csproj">\r
       <Project>{B55E59B2-31CA-438B-ADB8-4B9A9A547830}</Project>\r
-      <Name>System.Security\System.Security-net_4_5</Name>\r
+      <Name>System.Security-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.IdentityModel/System.IdentityModel-net_4_5.csproj">\r
       <Project>{F056C062-E467-4989-9366-440E8CD23C0C}</Project>\r
-      <Name>System.IdentityModel\System.IdentityModel-net_4_5</Name>\r
+      <Name>System.IdentityModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.IdentityModel.Selectors/System.IdentityModel.Selectors-net_4_5.csproj">\r
       <Project>{AB4F77BB-4340-4A79-9B66-EF5B4221E1F2}</Project>\r
-      <Name>System.IdentityModel.Selectors\System.IdentityModel.Selectors-net_4_5</Name>\r
+      <Name>System.IdentityModel.Selectors-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Transactions/System.Transactions-net_4_5.csproj">\r
       <Project>{AF2BBF50-AB57-4CA1-8EF5-2B54C7418434}</Project>\r
-      <Name>System.Transactions\System.Transactions-net_4_5</Name>\r
+      <Name>System.Transactions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Messaging/System.Messaging-net_4_5.csproj">\r
       <Project>{1CBEC0FC-5926-42FA-A0CF-A19617FABB78}</Project>\r
-      <Name>System.Messaging\System.Messaging-net_4_5</Name>\r
+      <Name>System.Messaging-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Services/System.Web.Services-net_4_5.csproj">\r
       <Project>{251DB111-FEE1-4080-8411-0AD1CC9BA94B}</Project>\r
-      <Name>System.Web.Services\System.Web.Services-net_4_5</Name>\r
+      <Name>System.Web.Services-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_5.csproj">\r
       <Project>{B4E6806D-1B38-4CEE-8ADB-2D0A4D1AF25F}</Project>\r
-      <Name>System.Web.ApplicationServices\System.Web.ApplicationServices-net_4_5</Name>\r
+      <Name>System.Web.ApplicationServices-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel.Activation/System.ServiceModel.Activation-net_4_5.csproj">\r
       <Project>{E537F31B-BCB7-4935-ABF3-DF2FAC48DCB3}</Project>\r
-      <Name>System.ServiceModel.Activation\System.ServiceModel.Activation-net_4_5</Name>\r
+      <Name>System.ServiceModel.Activation-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 4dda1162f5c7c7091bdd63f1fcd3c0e6219cc185..56c41fea352a5f9d411c503e900168990d7ac707 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Security/System.Security-net_4_5.csproj">\r
       <Project>{B55E59B2-31CA-438B-ADB8-4B9A9A547830}</Project>\r
-      <Name>System.Security\System.Security-net_4_5</Name>\r
+      <Name>System.Security-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.IdentityModel/System.IdentityModel-net_4_5.csproj">\r
       <Project>{F056C062-E467-4989-9366-440E8CD23C0C}</Project>\r
-      <Name>System.IdentityModel\System.IdentityModel-net_4_5</Name>\r
+      <Name>System.IdentityModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.IdentityModel.Selectors/System.IdentityModel.Selectors-net_4_5.csproj">\r
       <Project>{AB4F77BB-4340-4A79-9B66-EF5B4221E1F2}</Project>\r
-      <Name>System.IdentityModel.Selectors\System.IdentityModel.Selectors-net_4_5</Name>\r
+      <Name>System.IdentityModel.Selectors-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Transactions/System.Transactions-net_4_5.csproj">\r
       <Project>{AF2BBF50-AB57-4CA1-8EF5-2B54C7418434}</Project>\r
-      <Name>System.Transactions\System.Transactions-net_4_5</Name>\r
+      <Name>System.Transactions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Messaging/System.Messaging-net_4_5.csproj">\r
       <Project>{1CBEC0FC-5926-42FA-A0CF-A19617FABB78}</Project>\r
-      <Name>System.Messaging\System.Messaging-net_4_5</Name>\r
+      <Name>System.Messaging-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Services/System.Web.Services-net_4_5.csproj">\r
       <Project>{251DB111-FEE1-4080-8411-0AD1CC9BA94B}</Project>\r
-      <Name>System.Web.Services\System.Web.Services-net_4_5</Name>\r
+      <Name>System.Web.Services-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_5.csproj">\r
       <Project>{B4E6806D-1B38-4CEE-8ADB-2D0A4D1AF25F}</Project>\r
-      <Name>System.Web.ApplicationServices\System.Web.ApplicationServices-net_4_5</Name>\r
+      <Name>System.Web.ApplicationServices-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 50ae808fcbd680be813ba1b64265e5abb64379ad..d145ed18e4fe67e2615776797ac57b5ab59228ea 100644 (file)
@@ -52,11 +52,7 @@ namespace System.ServiceModel.Channels
                                        MessageEncoder = CreateEncoder<TChannel> (mbe);
                                        continue;
                                }
-#if NET_2_1
-                               var cbe = be as HttpCookieContainerBindingElement;
-                               if (cbe != null)
-                                       cookie_manager = cbe.GetProperty<IHttpCookieContainerManager> (ctx);
-#elif NET_4_0
+#if NET_2_1 || NET_4_0
                                var tbe = be as HttpTransportBindingElement;
                                if (tbe != null)
                                        cookie_manager = tbe.GetProperty<IHttpCookieContainerManager> (ctx);
index 8f0be289fda52f3862bce040258dfe6cf38f76b3..35cd408af1a7953de60d787143a636879379fee7 100644 (file)
@@ -69,7 +69,7 @@ namespace MonoTests.System.ServiceModel.Description
                        Assert.AreEqual (MessageVersion.Soap12WSAddressing10, b.GetProperty<MessageVersion> (new BindingParameterCollection ()), "#6");
 
                        var host = new ServiceHost (typeof (MetadataExchange));
-                       host.AddServiceEndpoint (typeof (IMetadataExchange), MetadataExchangeBindings.CreateMexHttpBinding (), CreateUri ("http://localhost:8080"));
+                       host.AddServiceEndpoint (typeof (IMetadataExchange), MetadataExchangeBindings.CreateMexHttpBinding (), CreateUri ("http://localhost:30158"));
                        host.Open ();
                        try {
                                // it still does not rewrite MessageVersion.None. It's rather likely ServiceMetadataExtension which does overwriting.
@@ -96,7 +96,7 @@ namespace MonoTests.System.ServiceModel.Description
                        Assert.AreEqual(Uri.UriSchemeHttps, b.Scheme, "#8");
 
                        var host = new ServiceHost(typeof(MetadataExchange));
-                       host.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexHttpsBinding(), CreateUri("https://localhost:8080"));
+                       host.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexHttpsBinding(), CreateUri("https://localhost:30158"));
                        host.Open();
                        try
                        {
index 38bece2f990797fb71982cffafa1dc41c11b68c2..a4a22cb18d2431d467147b983992944fa0d2e5ba 100644 (file)
@@ -56,7 +56,7 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void InitializeRuntime1 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) {
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "e1");
                                host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true });
 
@@ -93,10 +93,10 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void InitializeRuntime2 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) {
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
-                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex_and_help") });
-                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = new Uri ("http://localhost:8080/mex_and_help");
+                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex_and_help") });
+                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = new Uri ("http://localhost:30158/mex_and_help");
 
                                Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1");
 
@@ -125,10 +125,10 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void InitializeRuntime3 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) {
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
-                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") });
-                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = new Uri ("http://localhost:8080/help");
+                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") });
+                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = new Uri ("http://localhost:30158/help");
 
                                Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1");
 
@@ -176,9 +176,9 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void InitializeRuntime4 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) {
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
-                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") });
+                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") });
                                host.Description.Behaviors.Remove<ServiceDebugBehavior> ();
 
                                Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1");
@@ -204,7 +204,7 @@ namespace MonoTests.System.ServiceModel.Description
                                Assert.AreEqual (0, ed.FilterPriority, "FilterPriority");
 
                                EndpointAddress ea = ed.EndpointAddress;
-                               Assert.AreEqual (new Uri ("http://localhost:8080/mex"), ea.Uri, "Uri");
+                               Assert.AreEqual (new Uri ("http://localhost:30158/mex"), ea.Uri, "Uri");
 
                                DispatchRuntime dr = ed.DispatchRuntime;
                                Assert.AreEqual (1, dr.Operations.Count, "Operations.Count");
@@ -221,9 +221,9 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void ServiceMetadataExtension1 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) {
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
-                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") });
+                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") });
                                host.Description.Behaviors.Remove<ServiceDebugBehavior> ();
 
                                host.Open ();
@@ -237,9 +237,9 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void ServiceMetadataExtension2 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) {
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
-                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") });
+                               host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") });
                                host.Description.Behaviors.Remove<ServiceDebugBehavior> ();
 
                                ServiceMetadataExtension extension = new ServiceMetadataExtension ();
index adff5706c8dccf61d96feb0cb84948936ed57422..3607b4f2a02858c19731a6c55b4c1226786e131c 100644 (file)
@@ -53,7 +53,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                        // free to change if MS implementation does not make 
                        // sense.
                        DispatchRuntime r = new EndpointDispatcher (
-                               new EndpointAddress ("http://localhost:8080"), "IFoo", "urn:foo").DispatchRuntime;
+                               new EndpointAddress ("http://localhost:30158"), "IFoo", "urn:foo").DispatchRuntime;
                        Assert.AreEqual (AuditLogLocation.Default,
                                         r.SecurityAuditLogLocation, "#1");
 
@@ -153,7 +153,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
 
                void TestInstanceBehavior (MessageInspectBehavior b, string expected, Result actual, int invocations)
                {
-                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:8080"));
+                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158"));
                        try {
                                h.AddServiceEndpoint (typeof (IAllActions).FullName, new BasicHttpBinding (), "AllActions");
                                h.Description.Behaviors.Add (b);
@@ -167,7 +167,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                                                Assert.AreEqual (typeof (AllActions), ed.DispatchRuntime.Type, "Type property: " + ed.ContractName);
                                        }
                                }
-                               AllActionsProxy p = new AllActionsProxy (new BasicHttpBinding () { SendTimeout = TimeSpan.FromSeconds (5), ReceiveTimeout = TimeSpan.FromSeconds (5) }, new EndpointAddress ("http://localhost:8080/AllActions"));
+                               AllActionsProxy p = new AllActionsProxy (new BasicHttpBinding () { SendTimeout = TimeSpan.FromSeconds (5), ReceiveTimeout = TimeSpan.FromSeconds (5) }, new EndpointAddress ("http://localhost:30158/AllActions"));
 
                                for (int i = 0; i < invocations; ++i)
                                        p.Get (10);
index a6bc6c5e6fc158c4b49b640646cbccddbb2ac561..593ded1b011ad12caddc022a8e01259000a4d0e3 100644 (file)
@@ -30,6 +30,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
                }
 
                [Test]
+               [Category ("NotWorking")]
                public void CloseTest ()
                {
                        cprs.Open ();
@@ -79,6 +80,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
 
                [Test]
                [ExpectedException (typeof (InvalidOperationException))]
+               [Category ("NotWorking")]
                public void OpenTest4 ()
                {
                        cprs.Open ();
index 427127e9468379bc521de683b55515859fa1c161..70efef2761cbe03739ced20a4c172d9f86f0ee5c 100644 (file)
@@ -483,12 +483,12 @@ namespace MonoTests.System.ServiceModel
                        var host = new ServiceHost (typeof (OneWayService));
                        host.AddServiceEndpoint (typeof (IOneWayService),
                                new BasicHttpBinding (),
-                               new Uri ("http://localhost:8080"));
+                               new Uri ("http://localhost:30158"));
                        host.Open ();
                        try {
                                var cf = new ChannelFactory<IOneWayService> (
                                        new BasicHttpBinding (),
-                                       new EndpointAddress ("http://localhost:8080"));
+                                       new EndpointAddress ("http://localhost:30158"));
                                var ch = cf.CreateChannel ();
                                ch.GiveMessage ("test");
                                
index a5684e24b5f9a67d0ce28ba62f03057681ab170d..d73d516cbbb1c341b565695eb7c3f7ae35ffad34 100644 (file)
@@ -159,7 +159,7 @@ namespace MonoTests.System.ServiceModel
 
                [Test]
                public void ChannelDispatchers_NoDebug () {
-                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:8080"));
+                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158"));
                        h.AddServiceEndpoint (typeof (AllActions).FullName, new BasicHttpBinding (), "address");
 
                        ServiceDebugBehavior b = h.Description.Behaviors.Find<ServiceDebugBehavior> ();
@@ -173,7 +173,7 @@ namespace MonoTests.System.ServiceModel
                        Assert.IsTrue (channelDispatcher.Endpoints.Count == 1, "#2");
                        EndpointAddressMessageFilter filter = channelDispatcher.Endpoints [0].AddressFilter as EndpointAddressMessageFilter;
                        Assert.IsNotNull (filter, "#3");
-                       Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:8080/address")), "#4");
+                       Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:30158/address")), "#4");
                        Assert.IsFalse (filter.IncludeHostNameInComparison, "#5");
                        Assert.IsTrue (channelDispatcher.Endpoints [0].ContractFilter is MatchAllMessageFilter, "#6");
                        } finally {
@@ -183,11 +183,11 @@ namespace MonoTests.System.ServiceModel
 
                [Test]
                public void ChannelDispatchers_WithDebug () {
-                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:8080"));
+                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158"));
                        h.AddServiceEndpoint (typeof (AllActions).FullName, new BasicHttpBinding (), "address");
                        ServiceMetadataBehavior b = new ServiceMetadataBehavior ();
                        b.HttpGetEnabled = true;
-                       b.HttpGetUrl = new Uri( "http://localhost:8080" );
+                       b.HttpGetUrl = new Uri( "http://localhost:30158" );
                        h.Description.Behaviors.Add (b);
                        h.Open ();
 
@@ -197,7 +197,7 @@ namespace MonoTests.System.ServiceModel
                        Assert.IsTrue (channelDispatcher.Endpoints.Count == 1, "#3");
                        EndpointAddressMessageFilter filter = channelDispatcher.Endpoints [0].AddressFilter as EndpointAddressMessageFilter;
                        Assert.IsNotNull (filter, "#4");
-                       Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:8080")), "#5");
+                       Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:30158")), "#5");
                        Assert.IsFalse (filter.IncludeHostNameInComparison, "#6");
                        Assert.IsTrue (channelDispatcher.Endpoints [0].ContractFilter is MatchAllMessageFilter, "#7");
                        h.Close ();
@@ -207,7 +207,7 @@ namespace MonoTests.System.ServiceModel
                public void SpecificActionTest ()
                {
                        //EndpointDispatcher d = new EndpointDispatcher(
-                       ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:8080"));
+                       ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:30158"));
                        h.AddServiceEndpoint (typeof (Action1Interface), new BasicHttpBinding (), "address");
                                                
                        h.Open ();
@@ -222,7 +222,7 @@ namespace MonoTests.System.ServiceModel
                [Test]
                public void InitializeRuntimeBehaviors1 () {
                        HostState st = new HostState ();
-                       ServiceHost h = new ServiceHost (typeof (SpecificAction2), new Uri ("http://localhost:8080"));
+                       ServiceHost h = new ServiceHost (typeof (SpecificAction2), new Uri ("http://localhost:30158"));
                        h.AddServiceEndpoint (typeof (SpecificAction2), new BasicHttpBinding (), "temp");                       
 
                        h.Description.Behaviors.Add (new MyServiceBehavior (st, h));
@@ -241,7 +241,7 @@ namespace MonoTests.System.ServiceModel
                [Test]
                public void InitializeRuntimeBehaviors2 () {
                        HostState st = new HostState ();
-                       ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:8080"));
+                       ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:30158"));
                        h.AddServiceEndpoint (typeof (Action1Interface), new BasicHttpBinding (), "temp");
                        h.AddServiceEndpoint (typeof (Action2Interface), new BasicHttpBinding (), "temp2");
 
@@ -368,7 +368,7 @@ namespace MonoTests.System.ServiceModel
                public void AddServiceEndpoint_Directly ()
                {
                        var host = new ServiceHost (typeof (DummyService));
-                       var address = new EndpointAddress ("http://localhost:8080");
+                       var address = new EndpointAddress ("http://localhost:30158");
                        var binding = new BasicHttpBinding ();
                        var contract = ContractDescription.GetContract (typeof (IDummyService));
                        host.AddServiceEndpoint (new ServiceEndpoint (contract, binding, address));
@@ -389,7 +389,7 @@ namespace MonoTests.System.ServiceModel
                public void AddServiceEndpoint_Directly_NullBinding ()
                {
                        var host = new ServiceHost (typeof (DummyService));
-                       var address = new EndpointAddress ("http://localhost:8080");
+                       var address = new EndpointAddress ("http://localhost:30158");
                        var contract = ContractDescription.GetContract (typeof (IDummyService));
                        host.AddServiceEndpoint (new ServiceEndpoint (contract, null, address));
                }
@@ -407,7 +407,7 @@ namespace MonoTests.System.ServiceModel
                public void AddServiceEndpoint_Directly_ContractMismatch ()
                {
                        var host = new ServiceHost (typeof (DummyService));
-                       var address = new EndpointAddress ("http://localhost:8080");
+                       var address = new EndpointAddress ("http://localhost:30158");
                        var binding = new BasicHttpBinding ();
                        var contract = ContractDescription.GetContract (typeof (INotImplementedService));
                        host.AddServiceEndpoint (new ServiceEndpoint (contract, binding, address));
index f2da407498226a3bb8841918d9b92655a3e3adf7..c5e60dafff8dd1d49785ca70539e356f59b576b8 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration.Install/System.Configuration.Install-net_4_5.csproj">\r
       <Project>{E6E1740E-37DD-487C-8947-F1C0612D4738}</Project>\r
-      <Name>System.Configuration.Install\System.Configuration.Install-net_4_5</Name>\r
+      <Name>System.Configuration.Install-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Managed.Windows.Forms/System.Windows.Forms-net_4_5.csproj">\r
       <Project>{B102F27C-1A07-487F-BA5B-D5155D201112}</Project>\r
-      <Name>Managed.Windows.Forms\System.Windows.Forms-net_4_5</Name>\r
+      <Name>System.Windows.Forms-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index dfc446c783d965fe966cfd16896837d18609deda..6587d3f69e3cb098a4974be68720cad764755a44 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 264b9bf89a0d8365acabc4e121fa0b861e943c52..923da35dfdd69cf5f9fca832bbbd9f48c3cc0934 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 95b6c8ce5366fd73e293bfba2c016b839a290d90..6c1c6451c8facb7048ee859a6dc8720624ae753c 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 58e77cdc12287302b26198566441dcec03868a9e..1fb3e263dcc5a061733bc91c6349bd5b2cf4394f 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 1a3158d1d9166468cf8c20c7925e9888a894eaf6..282b542e457271aab48c2a21c8a43db724163601 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_5.csproj">\r
       <Project>{63EC4158-FFAC-4867-8003-CF6054C8DF0B}</Project>\r
-      <Name>System.ComponentModel.DataAnnotations\System.ComponentModel.DataAnnotations-net_4_5</Name>\r
+      <Name>System.ComponentModel.DataAnnotations-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data.Linq/System.Data.Linq-net_4_5.csproj">\r
       <Project>{8AC5471F-9515-4D01-87B9-7974F2CBD6F1}</Project>\r
-      <Name>System.Data.Linq\System.Data.Linq-net_4_5</Name>\r
+      <Name>System.Data.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Extensions/System.Web.Extensions-net_4_5.csproj">\r
       <Project>{74D281D8-F725-4D79-B218-2DFCCFD44FA2}</Project>\r
-      <Name>System.Web.Extensions\System.Web.Extensions-net_4_5</Name>\r
+      <Name>System.Web.Extensions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Abstractions/System.Web.Abstractions-net_4_5.csproj">\r
       <Project>{94BD3939-6937-47AA-86CF-5C3E4C59E272}</Project>\r
-      <Name>System.Web.Abstractions\System.Web.Abstractions-net_4_5</Name>\r
+      <Name>System.Web.Abstractions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Routing/System.Web.Routing-net_4_5.csproj">\r
       <Project>{A28F2A14-901C-452C-82B6-75ECE5C7E714}</Project>\r
-      <Name>System.Web.Routing\System.Web.Routing-net_4_5</Name>\r
+      <Name>System.Web.Routing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_5.csproj">\r
       <Project>{B4E6806D-1B38-4CEE-8ADB-2D0A4D1AF25F}</Project>\r
-      <Name>System.Web.ApplicationServices\System.Web.ApplicationServices-net_4_5</Name>\r
+      <Name>System.Web.ApplicationServices-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 86d96d5ea3a8b656a92ff2f8d6402fe3c6a5085e..a2c55b0b2d9b7c6e1a0bbc2fc4c7200e893bd4e0 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Design/System.Design-net_4_5.csproj">\r
       <Project>{D4E6A482-761B-4B41-8B63-C930CA84D268}</Project>\r
-      <Name>System.Design\System.Design-net_4_5</Name>\r
+      <Name>System.Design-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Managed.Windows.Forms/System.Windows.Forms-net_4_5.csproj">\r
       <Project>{B102F27C-1A07-487F-BA5B-D5155D201112}</Project>\r
-      <Name>Managed.Windows.Forms\System.Windows.Forms-net_4_5</Name>\r
+      <Name>System.Windows.Forms-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c70a18fb35279a7e1170a02759e864d3b1e0f37a..2aaa88beb04088706b0779295521c3e588dee337 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data.Linq/System.Data.Linq-net_4_5.csproj">\r
       <Project>{8AC5471F-9515-4D01-87B9-7974F2CBD6F1}</Project>\r
-      <Name>System.Data.Linq\System.Data.Linq-net_4_5</Name>\r
+      <Name>System.Data.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Services/System.Web.Services-net_4_5.csproj">\r
       <Project>{251DB111-FEE1-4080-8411-0AD1CC9BA94B}</Project>\r
-      <Name>System.Web.Services\System.Web.Services-net_4_5</Name>\r
+      <Name>System.Web.Services-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.EnterpriseServices/System.EnterpriseServices-net_4_5.csproj">\r
       <Project>{773D8BA7-9A88-49AC-81C9-740436270588}</Project>\r
-      <Name>System.EnterpriseServices\System.EnterpriseServices-net_4_5</Name>\r
+      <Name>System.EnterpriseServices-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_5.csproj">\r
       <Project>{B4E6806D-1B38-4CEE-8ADB-2D0A4D1AF25F}</Project>\r
-      <Name>System.Web.ApplicationServices\System.Web.ApplicationServices-net_4_5</Name>\r
+      <Name>System.Web.ApplicationServices-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index f8f65c52e8b2c8091b76fa7e62a32e94b84f6f6c..70e6fc9bebd955960d0fdc9d9d2f213d37bf26e6 100644 (file)
@@ -180,16 +180,20 @@ namespace System.Web.Script.Serialization
                                return c.ConvertFrom (obj);
                        }
 
-                       /*
-                        * Take care of the special case whereas in JSON an empty string ("") really means 
-                        * an empty value 
-                        * (see: https://bugzilla.novell.com/show_bug.cgi?id=328836)
-                        */
-                       if ((targetType.IsGenericType) && (targetType.GetGenericTypeDefinition() == typeof(Nullable<>)))
-                       {
-                               string s = obj as String;
-                               if (String.IsNullOrEmpty(s))
+                       if ((targetType.IsGenericType) && (targetType.GetGenericTypeDefinition () == typeof (Nullable<>))) {
+                               if (obj is String) {
+                                       /*
+                                        * Take care of the special case whereas in JSON an empty string ("") really means 
+                                        * an empty value 
+                                        * (see: https://bugzilla.novell.com/show_bug.cgi?id=328836)
+                                        */
+                                       if(String.IsNullOrEmpty ((String)obj))
                                                return null;
+                               } else if (c.CanConvertFrom (typeof (string))) {
+                                       TypeConverter objConverter = TypeDescriptor.GetConverter (obj);
+                                       string s = objConverter.ConvertToInvariantString (obj);
+                                       return c.ConvertFromInvariantString (s);
+                               }
                        }
 
                        return Convert.ChangeType (obj, targetType);
index 5883104a95ea894d3da7243815b4396ec45f012e..995590eeb2ec6cf0c5370555a82f0e304a7babeb 100644 (file)
@@ -1365,5 +1365,28 @@ namespace MonoTests.System.Web.Script.Serialization
                        var ret2vad = (IDictionary<string,object>) ret2va [0];
                        Assert.AreEqual ("subval", ret2vad ["subkey"], "#2.4");
                }
+               
+               class ClassWithNullableEnum
+               {
+                       public MyEnum? Value { get; set; }
+               }
+               
+               [Test]
+               public void DeserializeNullableEnum ()
+               {               
+                       var jsonValues = new Dictionary<string, MyEnum?> {
+                               { "{\"Value\":0}", MyEnum.AAA},
+                               { "{\"Value\":\"0\"}", MyEnum.AAA},
+                               { "{\"Value\":null}", null}
+                       };
+                       
+                       var ser = new JavaScriptSerializer ();
+                       
+                       foreach (var kv in jsonValues)
+                       {
+                               var obj = ser.Deserialize<ClassWithNullableEnum> (kv.Key);
+                               Assert.AreEqual (kv.Value, obj.Value);
+                       }
+               }
        }
 }
index c606cfe80344bb41e19820bd51286b2b13c7c89a..59f0bb25a35fd0da3ec991e706a2d95e909df64e 100644 (file)
     <AssemblyName>System.Web.Http.SelfHost</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Net.Http/System.Net.Http-net_4_5.csproj">\r
       <Project>{E36C154B-A0AC-4721-B06A-AFE31D357CE5}</Project>\r
-      <Name>System.Net.Http\System.Net.Http-net_4_5</Name>\r
+      <Name>System.Net.Http-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.IdentityModel/System.IdentityModel-net_4_5.csproj">\r
       <Project>{F056C062-E467-4989-9366-440E8CD23C0C}</Project>\r
-      <Name>System.IdentityModel\System.IdentityModel-net_4_5</Name>\r
+      <Name>System.IdentityModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Http/System.Web.Http-net_4_5.csproj">\r
       <Project>{2EFF8684-99DB-4DD6-B3BC-7E7AA42A15FC}</Project>\r
-      <Name>System.Web.Http\System.Web.Http-net_4_5</Name>\r
+      <Name>System.Web.Http-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Net.Http.Formatting/System.Net.Http.Formatting-net_4_5.csproj">\r
       <Project>{BFBE5444-4F21-45CF-929E-C8FBEF302F5E}</Project>\r
-      <Name>System.Net.Http.Formatting\System.Net.Http.Formatting-net_4_5</Name>\r
+      <Name>System.Net.Http.Formatting-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 76ad7746a321b3ae43460c23737b526ff0cb2d33..2bbb825c2c065c7f658464088ea7c1bd13936ba6 100644 (file)
     <AssemblyName>System.Web.Http.WebHost</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Net.Http/System.Net.Http-net_4_5.csproj">\r
       <Project>{E36C154B-A0AC-4721-B06A-AFE31D357CE5}</Project>\r
-      <Name>System.Net.Http\System.Net.Http-net_4_5</Name>\r
+      <Name>System.Net.Http-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.IdentityModel/System.IdentityModel-net_4_5.csproj">\r
       <Project>{F056C062-E467-4989-9366-440E8CD23C0C}</Project>\r
-      <Name>System.IdentityModel\System.IdentityModel-net_4_5</Name>\r
+      <Name>System.IdentityModel-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Http/System.Web.Http-net_4_5.csproj">\r
       <Project>{2EFF8684-99DB-4DD6-B3BC-7E7AA42A15FC}</Project>\r
-      <Name>System.Web.Http\System.Web.Http-net_4_5</Name>\r
+      <Name>System.Web.Http-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Net.Http.Formatting/System.Net.Http.Formatting-net_4_5.csproj">\r
       <Project>{BFBE5444-4F21-45CF-929E-C8FBEF302F5E}</Project>\r
-      <Name>System.Net.Http.Formatting\System.Net.Http.Formatting-net_4_5</Name>\r
+      <Name>System.Net.Http.Formatting-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Routing/System.Web.Routing-net_4_5.csproj">\r
       <Project>{A28F2A14-901C-452C-82B6-75ECE5C7E714}</Project>\r
-      <Name>System.Web.Routing\System.Web.Routing-net_4_5</Name>\r
+      <Name>System.Web.Routing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Web.Infrastructure/Microsoft.Web.Infrastructure-net_4_5.csproj">\r
       <Project>{50DC9191-2D18-4EDB-A929-4ECAB7981A1C}</Project>\r
-      <Name>Microsoft.Web.Infrastructure\Microsoft.Web.Infrastructure-net_4_5</Name>\r
+      <Name>Microsoft.Web.Infrastructure-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c4fd0979fb8ef1c8788f67991e17ac586fa8079e..eea2585d2a000a1bbcdd473fb5141992f3760274 100644 (file)
     <AssemblyName>System.Web.Http</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Net.Http/System.Net.Http-net_4_5.csproj">\r
       <Project>{E36C154B-A0AC-4721-B06A-AFE31D357CE5}</Project>\r
-      <Name>System.Net.Http\System.Net.Http-net_4_5</Name>\r
+      <Name>System.Net.Http-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_5.csproj">\r
       <Project>{63EC4158-FFAC-4867-8003-CF6054C8DF0B}</Project>\r
-      <Name>System.ComponentModel.DataAnnotations\System.ComponentModel.DataAnnotations-net_4_5</Name>\r
+      <Name>System.ComponentModel.DataAnnotations-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Net.Http.Formatting/System.Net.Http.Formatting-net_4_5.csproj">\r
       <Project>{BFBE5444-4F21-45CF-929E-C8FBEF302F5E}</Project>\r
-      <Name>System.Net.Http.Formatting\System.Net.Http.Formatting-net_4_5</Name>\r
+      <Name>System.Net.Http.Formatting-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Caching/System.Runtime.Caching-net_4_5.csproj">\r
       <Project>{CB3E9225-3DFF-4930-BFED-1E8AE5319C32}</Project>\r
-      <Name>System.Runtime.Caching\System.Runtime.Caching-net_4_5</Name>\r
+      <Name>System.Runtime.Caching-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj">\r
       <Project>{08FF4C26-9C12-433D-AE90-43370046387A}</Project>\r
-      <Name>System.Runtime.Serialization\System.Runtime.Serialization-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data.Linq/System.Data.Linq-net_4_5.csproj">\r
       <Project>{8AC5471F-9515-4D01-87B9-7974F2CBD6F1}</Project>\r
-      <Name>System.Data.Linq\System.Data.Linq-net_4_5</Name>\r
+      <Name>System.Data.Linq-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index a29e32126a38a952d3bfe5a11eb878ddb954ad47..81adf78d9ef02f217945c2dfd982f1b7399eea02 100644 (file)
     <AssemblyName>dummy-System.Web.Mvc</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Abstractions/System.Web.Abstractions-net_4_5.csproj">\r
       <Project>{94BD3939-6937-47AA-86CF-5C3E4C59E272}</Project>\r
-      <Name>System.Web.Abstractions\System.Web.Abstractions-net_4_5</Name>\r
+      <Name>System.Web.Abstractions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Routing/System.Web.Routing-net_4_5.csproj">\r
       <Project>{A28F2A14-901C-452C-82B6-75ECE5C7E714}</Project>\r
-      <Name>System.Web.Routing\System.Web.Routing-net_4_5</Name>\r
+      <Name>System.Web.Routing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Extensions/System.Web.Extensions-net_4_5.csproj">\r
       <Project>{74D281D8-F725-4D79-B218-2DFCCFD44FA2}</Project>\r
-      <Name>System.Web.Extensions\System.Web.Extensions-net_4_5</Name>\r
+      <Name>System.Web.Extensions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_5.csproj">\r
       <Project>{63EC4158-FFAC-4867-8003-CF6054C8DF0B}</Project>\r
-      <Name>System.ComponentModel.DataAnnotations\System.ComponentModel.DataAnnotations-net_4_5</Name>\r
+      <Name>System.ComponentModel.DataAnnotations-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data.Linq/System.Data.Linq-net_4_5.csproj">\r
       <Project>{8AC5471F-9515-4D01-87B9-7974F2CBD6F1}</Project>\r
-      <Name>System.Data.Linq\System.Data.Linq-net_4_5</Name>\r
+      <Name>System.Data.Linq-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 02938c10901781def230c8126e667e7976f25374..8c4cef06e96fa8c9f3d18f535d970fcb0e067eec 100644 (file)
     <AssemblyName>System.Web.Mvc</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Web.Infrastructure/Microsoft.Web.Infrastructure-net_4_5.csproj">\r
       <Project>{50DC9191-2D18-4EDB-A929-4ECAB7981A1C}</Project>\r
-      <Name>Microsoft.Web.Infrastructure\Microsoft.Web.Infrastructure-net_4_5</Name>\r
+      <Name>Microsoft.Web.Infrastructure-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Abstractions/System.Web.Abstractions-net_4_5.csproj">\r
       <Project>{94BD3939-6937-47AA-86CF-5C3E4C59E272}</Project>\r
-      <Name>System.Web.Abstractions\System.Web.Abstractions-net_4_5</Name>\r
+      <Name>System.Web.Abstractions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Routing/System.Web.Routing-net_4_5.csproj">\r
       <Project>{A28F2A14-901C-452C-82B6-75ECE5C7E714}</Project>\r
-      <Name>System.Web.Routing\System.Web.Routing-net_4_5</Name>\r
+      <Name>System.Web.Routing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Extensions/System.Web.Extensions-net_4_5.csproj">\r
       <Project>{74D281D8-F725-4D79-B218-2DFCCFD44FA2}</Project>\r
-      <Name>System.Web.Extensions\System.Web.Extensions-net_4_5</Name>\r
+      <Name>System.Web.Extensions-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_5.csproj">\r
       <Project>{63EC4158-FFAC-4867-8003-CF6054C8DF0B}</Project>\r
-      <Name>System.ComponentModel.DataAnnotations\System.ComponentModel.DataAnnotations-net_4_5</Name>\r
+      <Name>System.ComponentModel.DataAnnotations-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data.Linq/System.Data.Linq-net_4_5.csproj">\r
       <Project>{8AC5471F-9515-4D01-87B9-7974F2CBD6F1}</Project>\r
-      <Name>System.Data.Linq\System.Data.Linq-net_4_5</Name>\r
+      <Name>System.Data.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Caching/System.Runtime.Caching-net_4_5.csproj">\r
       <Project>{CB3E9225-3DFF-4930-BFED-1E8AE5319C32}</Project>\r
-      <Name>System.Runtime.Caching\System.Runtime.Caching-net_4_5</Name>\r
+      <Name>System.Runtime.Caching-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Razor/System.Web.Razor-net_4_5.csproj">\r
       <Project>{FF61AB24-4492-47FA-B4D3-8D961113DD08}</Project>\r
-      <Name>System.Web.Razor\System.Web.Razor-net_4_5</Name>\r
+      <Name>System.Web.Razor-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.WebPages.Razor/System.Web.WebPages.Razor-net_4_5.csproj">\r
       <Project>{4E601800-644F-49B2-B1C9-60D3489AAC38}</Project>\r
-      <Name>System.Web.WebPages.Razor\System.Web.WebPages.Razor-net_4_5</Name>\r
+      <Name>System.Web.WebPages.Razor-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.WebPages/System.Web.WebPages-net_4_5.csproj">\r
       <Project>{FFDF7B0A-BD62-4E39-8A80-A42B560149C5}</Project>\r
-      <Name>System.Web.WebPages\System.Web.WebPages-net_4_5</Name>\r
+      <Name>System.Web.WebPages-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 9a1e71f3c97febdd8fd02b1aa56de2f274919d48..a3e10f1629b9a200bfbada9ff1f10211958fd9c3 100644 (file)
     <AssemblyName>System.Web.Razor</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 244f90cc4e9bac50c765b4b9f47ecc16e234bb0a..e145f1dcacb046657a4275c5a73014d4e4242c97 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Abstractions/System.Web.Abstractions-net_4_5.csproj">\r
       <Project>{94BD3939-6937-47AA-86CF-5C3E4C59E272}</Project>\r
-      <Name>System.Web.Abstractions\System.Web.Abstractions-net_4_5</Name>\r
+      <Name>System.Web.Abstractions-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 23e0b0cc31486eceb8e7a3690c4db1360c3bd174..d52fbb6bd6db215e81c770f1996bc9eccca52e9e 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.EnterpriseServices/System.EnterpriseServices-net_4_5.csproj">\r
       <Project>{773D8BA7-9A88-49AC-81C9-740436270588}</Project>\r
-      <Name>System.EnterpriseServices\System.EnterpriseServices-net_4_5</Name>\r
+      <Name>System.EnterpriseServices-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-plainweb-net_4_5.csproj">\r
       <Project>{21892B00-1C9F-44F3-AE4C-A6A9A210CEC7}</Project>\r
-      <Name>System.Web\System.Web-plainweb-net_4_5</Name>\r
+      <Name>System.Web-plainweb-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 077c0420f7c1c642361491c20dc79e74ccea6a51..2f7b47b18e3ebf155ed8ca827576443304cb6753 100644 (file)
     <AssemblyName>System.Web.WebPages.Deployment</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Web.Infrastructure/Microsoft.Web.Infrastructure-net_4_5.csproj">\r
       <Project>{50DC9191-2D18-4EDB-A929-4ECAB7981A1C}</Project>\r
-      <Name>Microsoft.Web.Infrastructure\Microsoft.Web.Infrastructure-net_4_5</Name>\r
+      <Name>Microsoft.Web.Infrastructure-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c346b1f19a62506f19fac6de147f8df532127727..185ea68b67a1e72caa6153d19e926152aeeb2475 100644 (file)
     <AssemblyName>System.Web.WebPages.Razor</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.WebPages/System.Web.WebPages-net_4_5.csproj">\r
       <Project>{FFDF7B0A-BD62-4E39-8A80-A42B560149C5}</Project>\r
-      <Name>System.Web.WebPages\System.Web.WebPages-net_4_5</Name>\r
+      <Name>System.Web.WebPages-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Razor/System.Web.Razor-net_4_5.csproj">\r
       <Project>{FF61AB24-4492-47FA-B4D3-8D961113DD08}</Project>\r
-      <Name>System.Web.Razor\System.Web.Razor-net_4_5</Name>\r
+      <Name>System.Web.Razor-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index d9a6840eb0173995dc438d12187c2ec8289d4751..b4bb9b73a6ef446837eed5fc1d30b8f74b24587a 100644 (file)
     <AssemblyName>System.Web.WebPages</AssemblyName>\r
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>../winfx.pub</AssemblyOriginatorKeyFile>
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.CSharp/Microsoft.CSharp-net_4_5.csproj">\r
       <Project>{D554618C-5D38-413A-82BA-7A70B6FC61A3}</Project>\r
-      <Name>Microsoft.CSharp\Microsoft.CSharp-net_4_5</Name>\r
+      <Name>Microsoft.CSharp-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Microsoft.Web.Infrastructure/Microsoft.Web.Infrastructure-net_4_5.csproj">\r
       <Project>{50DC9191-2D18-4EDB-A929-4ECAB7981A1C}</Project>\r
-      <Name>Microsoft.Web.Infrastructure\Microsoft.Web.Infrastructure-net_4_5</Name>\r
+      <Name>Microsoft.Web.Infrastructure-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_5.csproj">\r
       <Project>{63EC4158-FFAC-4867-8003-CF6054C8DF0B}</Project>\r
-      <Name>System.ComponentModel.DataAnnotations\System.ComponentModel.DataAnnotations-net_4_5</Name>\r
+      <Name>System.ComponentModel.DataAnnotations-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data.Linq/System.Data.Linq-net_4_5.csproj">\r
       <Project>{8AC5471F-9515-4D01-87B9-7974F2CBD6F1}</Project>\r
-      <Name>System.Data.Linq\System.Data.Linq-net_4_5</Name>\r
+      <Name>System.Data.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.WebPages.Deployment/System.Web.WebPages.Deployment-net_4_5.csproj">\r
       <Project>{CFBE1EF0-4B98-4752-9F6A-4D61CF9DA0EF}</Project>\r
-      <Name>System.Web.WebPages.Deployment\System.Web.WebPages.Deployment-net_4_5</Name>\r
+      <Name>System.Web.WebPages.Deployment-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Razor/System.Web.Razor-net_4_5.csproj">\r
       <Project>{FF61AB24-4492-47FA-B4D3-8D961113DD08}</Project>\r
-      <Name>System.Web.Razor\System.Web.Razor-net_4_5</Name>\r
+      <Name>System.Web.Razor-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Xml.Linq/System.Xml.Linq-net_4_5.csproj">\r
       <Project>{8328796E-8A15-4972-8F1E-2F15E7D57C42}</Project>\r
-      <Name>System.Xml.Linq\System.Xml.Linq-net_4_5</Name>\r
+      <Name>System.Xml.Linq-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c55b89a4a21602bb7f4a04d966be97db10d24711..787662b4184549c387b62070dcba435b725de71f 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.EnterpriseServices/System.EnterpriseServices-net_4_5.csproj">\r
       <Project>{773D8BA7-9A88-49AC-81C9-740436270588}</Project>\r
-      <Name>System.EnterpriseServices\System.EnterpriseServices-net_4_5</Name>\r
+      <Name>System.EnterpriseServices-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap-net_4_5.csproj">\r
       <Project>{B12AABBC-30D1-4885-BF3F-A53B970F68FB}</Project>\r
-      <Name>System.Runtime.Serialization.Formatters.Soap\System.Runtime.Serialization.Formatters.Soap-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization.Formatters.Soap-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Data.Sqlite/Mono.Data.Sqlite-net_4_5.csproj">\r
       <Project>{41476FBD-C1CB-4B3C-8078-3281EB1E0EAB}</Project>\r
-      <Name>Mono.Data.Sqlite\Mono.Data.Sqlite-net_4_5</Name>\r
+      <Name>Mono.Data.Sqlite-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_5.csproj">\r
       <Project>{B4E6806D-1B38-4CEE-8ADB-2D0A4D1AF25F}</Project>\r
-      <Name>System.Web.ApplicationServices\System.Web.ApplicationServices-net_4_5</Name>\r
+      <Name>System.Web.ApplicationServices-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.Services/System.Web.Services-net_4_5.csproj">\r
       <Project>{251DB111-FEE1-4080-8411-0AD1CC9BA94B}</Project>\r
-      <Name>System.Web.Services\System.Web.Services-net_4_5</Name>\r
+      <Name>System.Web.Services-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index c0740c7185b39c7be69c24e80578460a28367ad2..5f49197e3f6a3919a03a6464f6544bf0a93af6e6 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.EnterpriseServices/System.EnterpriseServices-net_4_5.csproj">\r
       <Project>{773D8BA7-9A88-49AC-81C9-740436270588}</Project>\r
-      <Name>System.EnterpriseServices\System.EnterpriseServices-net_4_5</Name>\r
+      <Name>System.EnterpriseServices-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap-net_4_5.csproj">\r
       <Project>{B12AABBC-30D1-4885-BF3F-A53B970F68FB}</Project>\r
-      <Name>System.Runtime.Serialization.Formatters.Soap\System.Runtime.Serialization.Formatters.Soap-net_4_5</Name>\r
+      <Name>System.Runtime.Serialization.Formatters.Soap-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Mono.Data.Sqlite/Mono.Data.Sqlite-net_4_5.csproj">\r
       <Project>{41476FBD-C1CB-4B3C-8078-3281EB1E0EAB}</Project>\r
-      <Name>Mono.Data.Sqlite\Mono.Data.Sqlite-net_4_5</Name>\r
+      <Name>Mono.Data.Sqlite-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_5.csproj">\r
       <Project>{B4E6806D-1B38-4CEE-8ADB-2D0A4D1AF25F}</Project>\r
-      <Name>System.Web.ApplicationServices\System.Web.ApplicationServices-net_4_5</Name>\r
+      <Name>System.Web.ApplicationServices-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index ad18b88a3c4400cb6e3001539283f2a0057820ee..2491c9035d1985800a69c257ab282dbb5e2708d8 100644 (file)
@@ -446,7 +446,7 @@ namespace System.Web
                }
 
                [MonoTODO ("Not implemented")]
-               public void AddCacheDependency (CacheDependency[] dependencies)
+               public void AddCacheDependency (params CacheDependency[] dependencies)
                {
                        throw new NotImplementedException ();
                }
index 82ce306f60b238aa6d071cf7f98acb278c00d963..8b7bfcadf75a41aa4ff9e35cd3d8b40e9d1afecc 100644 (file)
@@ -195,6 +195,7 @@ namespace System.Web
                        mimeTypes.Add ("htx", "text/html");
                        mimeTypes.Add ("ice", "x-conference/x-cooltalk");
                        mimeTypes.Add ("ico", "image/x-icon");
+                       mimeTypes.Add ("ics", "text/calendar");
                        mimeTypes.Add ("idc", "text/plain");
                        mimeTypes.Add ("ief", "image/ief");
                        mimeTypes.Add ("iefs", "image/ief");
@@ -271,11 +272,11 @@ namespace System.Web
                        mimeTypes.Add ("mme", "application/base64");
                        mimeTypes.Add ("mny", "application/x-msmoney");
                        mimeTypes.Add ("mod", "audio/mod");
-                       mimeTypes.Add ("moov", "video/quicktime");
-                       mimeTypes.Add ("movie", "video/x-sgi-movie");
                        mimeTypes.Add ("mov", "video/quicktime");
+                       mimeTypes.Add ("movie", "video/x-sgi-movie");
+                       mimeTypes.Add ("moov", "video/quicktime");
                        mimeTypes.Add ("mp2", "video/mpeg");
-                       mimeTypes.Add ("mp3", "audio/mpeg3");
+                       mimeTypes.Add ("mp3", "audio/mpeg");
                        mimeTypes.Add ("mp4", "video/mp4");
                        //mimeTypes.Add ("mp4a", "audio/mp4");  // A common but unofficial alternative to m4a
                        mimeTypes.Add ("mpa", "audio/mpeg");
index d2bd8ce643fe21533181b7c2b4af7b769abe6d0d..1440358de4ddb1fa5130ec46390c13853a64c04e 100644 (file)
@@ -135,8 +135,8 @@ namespace MonoTests.System.Web.Caching
                static readonly byte[] badSubstitutionResponseElement = { 0x0, 0x1, 0x0, 0x0, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC, 0x2, 0x0, 0x0, 0x0, 0x4D, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2C, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x30, 0x2C, 0x20, 0x43, 0x75, 0x6C, 0x74, 0x75, 0x72, 0x65, 0x3D, 0x6E, 0x65, 0x75, 0x74, 0x72, 0x61, 0x6C, 0x2C, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x4B, 0x65, 0x79, 0x54, 0x6F, 0x6B, 0x65, 0x6E, 0x3D, 0x62, 0x30, 0x33, 0x66, 0x35, 0x66, 0x37, 0x66, 0x31, 0x31, 0x64, 0x35, 0x30, 0x61, 0x33, 0x61, 0x5, 0x1, 0x0, 0x0, 0x0, 0x2E, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2E, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6E, 0x67, 0x2E, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6F, 0x6E, 0x52, 0x65, 0x73, 0x70, 0x6F, 0x6E, 0x73, 0x65, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x2, 0x0, 0x0, 0x0, 0xF, 0x5F, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4E, 0x61, 0x6D, 0x65, 0xB, 0x5F, 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, 0x4E, 0x61, 0x6D, 0x65, 0x1, 0x1, 0x2, 0x0, 0x0, 0x0, 0x6, 0x3, 0x0, 0x0, 0x0, 0x41, 0x4D, 0x6F, 0x6E, 0x6F, 0x54, 0x65, 0x73, 0x74, 0x73, 0x2E, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2E, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6E, 0x67, 0x2E, 0x4F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2C, 0x20, 0x44, 0x6F, 0x74, 0x4E, 0x65, 0x74, 0x34, 0x5F, 0x4E, 0x55, 0x6E, 0x69, 0x74, 0x5F, 0x54, 0x65, 0x73, 0x74, 0x73, 0x6, 0x4, 0x0, 0x0, 0x0, 0x1C, 0x44, 0x75, 0x6D, 0x6D, 0x79, 0x42, 0x61, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6F, 0x6E, 0x43, 0x61, 0x6C, 0x6C, 0x62, 0x61, 0x63, 0x6B, 0xB, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
 #else
                #if NET_4_5
-               static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x1,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x9,0x6,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x7,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x8,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0x9,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xA,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
-               static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x3,0x4,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x9,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xA,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xB,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xC,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xD,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
+               static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1C,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x6F,0x6E,0x6F,0x4D,0x65,0x74,0x68,0x6F,0x64,0x9,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x8,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x9,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0xA,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xB,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x4,0x7,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x6,0x0,0x0,0x0,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x4,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0xA,0x0,0x0,0x0,0x9,0xB,0x0,0x0,0x0,0x9,0x4,0x0,0x0,0x0,0x6,0xC,0x0,0x0,0x0,0x3F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
+               static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x3,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x4,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x1C,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x6F,0x6E,0x6F,0x4D,0x65,0x74,0x68,0x6F,0x64,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x9,0x9,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0xA,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xB,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xC,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xD,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xE,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x4,0x9,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x6,0x0,0x0,0x0,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x4,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0xD,0x0,0x0,0x0,0x9,0xE,0x0,0x0,0x0,0x9,0x4,0x0,0x0,0x0,0x6,0xF,0x0,0x0,0x0,0x42,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
                #else
                static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x1,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x9,0x6,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x7,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x8,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0x9,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xA,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
                static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x3,0x4,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x9,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xA,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xB,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xC,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xD,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
@@ -208,7 +208,7 @@ namespace MonoTests.System.Web.Caching
                        AssertExtensions.AreEqual (bytes, substitutionResponseElement, "#B3");
 
                        bytes = SerializeElement (sreBad);
-                       AssertExtensions.AreEqual (bytes, badSubstitutionResponseElement, "#B3");
+                       AssertExtensions.AreEqual (bytes, badSubstitutionResponseElement, "#B4");
                }
 
                [Test]
index db2ea356666c7db136e76e8197b34d47855c4d7e..1990089323b5c5624ea56b797d003398692f1577 100644 (file)
@@ -165,7 +165,6 @@ namespace MonoTests.System.Web.UI.Adapters
                        pd.SaveStateComplete = RenderPostBackEvent_OnSaveStateComplete;
                        t.Invoker = new PageInvoker (pd);
                        string html = t.Run ();
-                       File.WriteAllText("response.html", html);
                }
                
                public static void RenderPostBackEvent_OnSaveStateComplete (Page p)
index 0b1254fa5ea893be677c4e74d039c91de9eef0ef..03ced5c391837048052e254aa0072c9373ce4733 100644 (file)
@@ -18,11 +18,6 @@ namespace MonoTests.SystemWeb.Framework
 {
        internal class MyHost : MarshalByRefObject
        {
-               AutoResetEvent _done;
-               AutoResetEvent _doNext;
-               WebTest _currentTest;
-               Exception _e;
-
                #region MyData
                class MyData
                {
@@ -30,40 +25,12 @@ namespace MonoTests.SystemWeb.Framework
                        public Exception exception;
                }
                #endregion
-               
-               public MyHost ()
-               {
-                       _done = new AutoResetEvent (false);
-                       _doNext = new AutoResetEvent (false);
-                       ThreadPool.QueueUserWorkItem (new WaitCallback (param => {
-                               try {
-                                       AsyncRun (param);
-                               } catch {}
-                               }), null);
-               }
 
                public AppDomain AppDomain
                { get { return AppDomain.CurrentDomain; } }
                
                public WebTest Run (WebTest t)
                {
-                       _currentTest = t;
-                       _doNext.Set ();
-                       _done.WaitOne ();
-                       if (_e != null) {
-                               Exception e = _e;
-                               _e = null;
-                               throw e;
-                       }
-                       return t;
-               }
-
-               void AsyncRun (object param)
-               {
-                       for (;;) {
-                       _doNext.WaitOne ();
-                       try {
-                       WebTest t = _currentTest;
                        HttpWorkerRequest wr = t.Request.CreateWorkerRequest ();
                        MyData data = GetMyData (wr);
                        data.currentTest = t;
@@ -74,12 +41,8 @@ namespace MonoTests.SystemWeb.Framework
                        
                        if (data.exception != null)
                                RethrowException (data.exception);
-                       } catch (Exception e) {
-                               _e = e;
-                       }
-
-                       _done.Set ();
-                       }
+                       
+                       return t;
                }
 
                private static void RethrowException (Exception inner)
index 6af625e39451d5cab86f31139be5d33d62bc66db..462d298f6bd3e26e9611f5be6919169f8d174e5c 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Drawing/System.Drawing-net_4_5.csproj">\r
       <Project>{CB1CB976-AA54-4553-B0E7-05665B199EC4}</Project>\r
-      <Name>System.Drawing\System.Drawing-net_4_5</Name>\r
+      <Name>System.Drawing-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../Managed.Windows.Forms/System.Windows.Forms-net_4_5.csproj">\r
       <Project>{B102F27C-1A07-487F-BA5B-D5155D201112}</Project>\r
-      <Name>Managed.Windows.Forms\System.Windows.Forms-net_4_5</Name>\r
+      <Name>System.Windows.Forms-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 134d7ffb49a75839094fe3b978a4a2fde7c6d6f9..e480fac38b741a68362a7d1b3ddf14938a678ef7 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 2160578776c31fc576d2664c0e0f05dcf94b9946..c52a56468ffe7eace41f8bd470fb029c2ec83a35 100644 (file)
@@ -65,8 +65,8 @@ EXTRA_DISTFILES = \
        $(xmlfiles_files:%=Test/XmlFiles/%) \
        $(nist_dom_files:%=Test/System.Xml/nist_dom/%)
 
-System.Xml.XPath/Parser.cs: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
-       (cd System.Xml.XPath; $(topdir)/../jay/jay -ct < $(topdir)/../jay/skeleton.cs Parser.jay >> Parser.cs)
+System.Xml.XPath/$(PROFILE)_Parser.cs: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
+       (cd System.Xml.XPath; $(topdir)/../jay/jay -ct < $(topdir)/../jay/skeleton.cs Parser.jay >> $(PROFILE)_Parser.cs)
 
 Mono.Xml.Xsl/$(PROFILE)_PatternParser.jay: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
        sed "s/\%start Expr/\%start Pattern/" $< >$@
@@ -80,12 +80,12 @@ Mono.Xml.Xsl/$(PROFILE)_PatternTokenizer.cs: System.Xml.XPath/Tokenizer.cs
        cat $< >>$@
 
 ifneq (moonlight_raw, $(PROFILE))
-BUILT_SOURCES = System.Xml.XPath/Parser.cs \
+BUILT_SOURCES = System.Xml.XPath/$(PROFILE)_Parser.cs \
        Mono.Xml.Xsl/$(PROFILE)_PatternParser.cs \
        Mono.Xml.Xsl/$(PROFILE)_PatternTokenizer.cs
 
 CLEAN_FILES = Test/XmlFiles/xsl/result.xml \
-       System.Xml.XPath/Parser.cs \
+       System.Xml.XPath/$(PROFILE)_Parser.cs \
        Mono.Xml.Xsl/$(PROFILE)_PatternParser.cs \
        Mono.Xml.Xsl/$(PROFILE)_PatternTokenizer.cs
 endif
index bce17f5f00b7679272a9e4f0c343c5529ec96a02..d253b4ea411b9017e6c657af3a1b2a91863a8dce 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
@@ -472,11 +473,11 @@ type $(ProjectDir)\System.Xml.XPath\Tokenizer.cs >> $(ProjectDir)\Mono.Xml.Xsl\P
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-bare-net_4_5.csproj">\r
       <Project>{91CDF14E-F60F-4AB7-BC9D-5CBD7E669076}</Project>\r
-      <Name>System\System-bare-net_4_5</Name>\r
+      <Name>System-bare-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index e39b9a75b43aead3c0480d6a9e41e19364030189..ea6fcbeb89d213eeeed4cbd19b35de53428ac1b9 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
@@ -472,15 +473,15 @@ type $(ProjectDir)\System.Xml.XPath\Tokenizer.cs >> $(ProjectDir)\Mono.Xml.Xsl\P
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-bare-net_4_5.csproj">\r
       <Project>{91CDF14E-F60F-4AB7-BC9D-5CBD7E669076}</Project>\r
-      <Name>System\System-bare-net_4_5</Name>\r
+      <Name>System-bare-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index ac16218ced330daca06dd545e6c5eb5f140adf8d..9affbc6415d3ba82f58bd0669a9c303ee0e9505e 100644 (file)
@@ -1 +1 @@
-/Parser.cs
+/*_Parser.cs
index bb8030264e0872e94f09e941af5669a43f702e91..a93760ee12c09c87afc1928991256fef90348d63 100644 (file)
@@ -494,12 +494,12 @@ namespace System.Xml
                void IDisposable.Dispose() 
 #endif
                {
-                       Dispose (false);
+                       Dispose (true);
                }
 
                protected virtual void Dispose (bool disposing)
                {
-                       if (ReadState != ReadState.Closed)
+                       if (disposing && ReadState != ReadState.Closed)
                                Close ();
                }
 #endif
index 04ad2dda799eb57bf577178edc817da7c2f6aaec..17d16132910a38e6aacef44903aa9ce0825a79d4 100644 (file)
@@ -18,7 +18,7 @@ TEST_EXTRA_DISTFILES = \
        Test/XmlFiles/*.xml \
        Test/XmlFiles/*.xaml
 
-VALID_PROFILE := $(filter 4, $(FRAMEWORK_VERSION_MAJOR))
+VALID_PROFILE := $(filter 4 monodroid monotouch, $(FRAMEWORK_VERSION_MAJOR))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.Xaml.dll
 NO_INSTALL = yes
index ff55aefc7cfce3cd0c12432529bee0e83f114e24..003f0c789e3ecdcda5dc9688b6305468f4d7624e 100755 (executable)
@@ -31,9 +31,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property, Inherited = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class AmbientAttribute : Attribute
        {
        }
index 7a99b7960109e1d9d2c506a388ed240e41b45f41..e3da18695d97aeefc5d9cee223dd7a70d965a7ef 100755 (executable)
@@ -32,9 +32,7 @@ namespace System.Windows.Markup
 {
        [MarkupExtensionReturnType (typeof (Array))]
        [ContentProperty ("Items")]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)]
-#endif
        public class ArrayExtension : MarkupExtension
        {
                public ArrayExtension ()
@@ -62,9 +60,7 @@ namespace System.Windows.Markup
                public Type Type { get; set; }
 
                IList items;
-#if !NET_2_1
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
-#endif
                public IList Items {
                        get { return items; }
                }
index 69a8b3f0ba6530be8d9db315f9c647b3f7a1f770..7708fe7c07849e2b000375c84225a1ed013e5120 100755 (executable)
@@ -25,9 +25,7 @@ using System;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class ConstructorArgumentAttribute : Attribute
        {
                public ConstructorArgumentAttribute (string argumentName)
index f772a2bd82e4e748d32e8ec9ff3c6b04515817cb..5b3c078b70d85cc8d1f698ed7b16725a015ec6c7 100755 (executable)
@@ -29,9 +29,7 @@ namespace System.Windows.Markup
        // member regardless of this attribute.
 
        [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class ContentPropertyAttribute : Attribute
        {
                public ContentPropertyAttribute ()
index 12e10c5e151921c836a62e533c76bd5dce1fb032..d64a2a9645b2f88bed2dd535a6a76efb4a0ef87e 100755 (executable)
@@ -25,9 +25,7 @@ using System;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class ContentWrapperAttribute : Attribute
        {
                public ContentWrapperAttribute (Type contentWrapper)
@@ -36,7 +34,8 @@ namespace System.Windows.Markup
                }
                
                public Type ContentWrapper { get; private set; }
-#if !NET_2_1
+
+#if !__MOBILE__
                public override Object TypeId {
                        get { return this; }
                }
index 5556e7f43c103ab96d99d4e57f6f256f98cea47a..720a3517dcc49b4b9bbb9bb7396f47fd624d2565 100755 (executable)
@@ -28,9 +28,7 @@ using System.Globalization;
 
 namespace System.Windows.Markup
 {
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public class DateTimeValueSerializer : ValueSerializer
        {
                const DateTimeStyles styles = DateTimeStyles.RoundtripKind | DateTimeStyles.NoCurrentDateDefault | DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite;
index f49ce4fb5be40643e422297b50b1b05ba510a7d3..361df14ed60e75cb5955d3b6fb42eadf600e8d47 100755 (executable)
@@ -25,9 +25,7 @@ using System;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class DependsOnAttribute : Attribute
        {
                public DependsOnAttribute (string name)
@@ -37,7 +35,7 @@ namespace System.Windows.Markup
                
                public string Name { get; private set; }
 
-#if !NET_2_1
+#if !__MOBILE__
                // really? I doubt it should be overriden.
                public override Object TypeId {
                        get { return this; }
index df7f4482bdc199f357c92fc1fadc15660fc84a9d..1664fe23a8d51f2700610ffd50b83085bac7c897 100755 (executable)
@@ -25,9 +25,7 @@ using System;
 namespace System.Windows.Markup
 {
        [AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class DictionaryKeyPropertyAttribute : Attribute
        {
                public DictionaryKeyPropertyAttribute (string name)
index 8b143b9279149fa91c7d4904747b7094321f9a67..5e6081628fdb13caddd3b5391de9aa8328c8f284 100755 (executable)
@@ -28,9 +28,7 @@ using System.Xaml.Schema;
 
 namespace System.Windows.Markup
 {
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public interface IComponentConnector
        {
                void Connect (int connectionId, object target);
index 5c142ec0afa5204aa127983fc5c3f13791ae29ab..3035a7cbc17324750544f38ebe2b83381fdb47c8 100644 (file)
@@ -25,9 +25,7 @@ using System.Collections.Generic;
 
 namespace System.Windows.Markup
 {
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public interface INameScope
        {
                object FindName (string name);
index 65c124bfc36bf9e09c79171198914e7cb412e4e2..6a44ce005d189037525d6cabb8d170eb3dce1736 100755 (executable)
@@ -28,9 +28,7 @@ using System.Xaml.Schema;
 
 namespace System.Windows.Markup
 {
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)]
-#endif
        public interface IProvideValueTarget
        {
                object TargetObject { get; }
index 7ace4b70cd736c0c0b8c75461f803a147216dfdc..252ab6964cda7925c825eeb720ecbe1f0d82b80a 100755 (executable)
@@ -28,9 +28,7 @@ using System.Xaml.Schema;
 
 namespace System.Windows.Markup
 {
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationCore_3_5)]
-#endif
        public interface IUriContext
        {
                Uri BaseUri { get; set; }
index 011c32e983a0a9da52a02a58ddd3df8bf69c2130..bfc1e0a37203e95fa42961dd257e40cc3575e4e0 100644 (file)
@@ -29,9 +29,7 @@ using System.Xaml;
 
 namespace System.Windows.Markup
 {
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public interface IValueSerializerContext : ITypeDescriptorContext, IServiceProvider
        {
                ValueSerializer GetValueSerializerFor (PropertyDescriptor descriptor);
index c78be09747135aaae652a9e1c940e2bcda68a4ca..563387c84211e53ffcb5b7c0fac342cb50bfd3ea 100755 (executable)
@@ -28,9 +28,7 @@ using System.Xaml.Schema;
 
 namespace System.Windows.Markup
 {
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public interface IXamlTypeResolver
        {
                Type Resolve (string qualifiedTypeName);
index 9277a3ca7ac14b7305c7b343d1a5e4aa6d0f618e..f79cefd6e02637aa2f0722a33568535c1e3b49a4 100644 (file)
@@ -29,9 +29,7 @@ using System.Xaml.Schema;
 
 namespace System.Windows.Markup
 {
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public abstract class MarkupExtension
        {
                public abstract object ProvideValue (IServiceProvider serviceProvider);
index 3ecd55b20011f6fb95f9fa4dc6bd5052204ba1a3..8e33e017cfcc6a86c08b5466e9ba5bf07ed4d2a9 100755 (executable)
@@ -25,9 +25,7 @@ using System;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class NameScopePropertyAttribute : Attribute
        {
                public NameScopePropertyAttribute (string name)
index 9aef4b4d78fd9c5da192941e53ec5f8eafbd0979..19cd2cbf598b4b8dc763ca9d219e87e2297272fe 100755 (executable)
@@ -29,9 +29,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [MarkupExtensionReturnType (typeof (Object))]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)]
-#endif
        public class NullExtension : MarkupExtension
        {
                public override Object ProvideValue (IServiceProvider serviceProvider)
index 392968b4328338b00f767251371260fc383d2dce..040f1945a7a9a1ecc97621c2830175c0d39cd212 100755 (executable)
@@ -25,9 +25,7 @@ using System;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Assembly)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class RootNamespaceAttribute : Attribute
        {
                public RootNamespaceAttribute (string nameSpace)
index ccd2cbc95bf58b69619384af455ba5279a889a2e..44c3706b5026fb8547a09b54503f373fde658979 100755 (executable)
@@ -25,9 +25,7 @@ using System;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Class)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class RuntimeNamePropertyAttribute : Attribute
        {
                public RuntimeNamePropertyAttribute (string name)
index 465ba56521d6da30e1d76969e4564e073c5b7057..24df4f5a1694468cabab72d8a500e71f74f5680c 100755 (executable)
@@ -30,9 +30,7 @@ namespace System.Windows.Markup
 {
        [MarkupExtensionReturnType (typeof (object))]
        [TypeConverter (typeof (StaticExtensionConverter))]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)]
-#endif
        public class StaticExtension : MarkupExtension
        {
                public StaticExtension ()
index bf4309d6e337ea94cdb4dc6327819411f3e2307a..371e3e06f8e5d1578d5d9052bb85f3a68d00c3b3 100755 (executable)
@@ -31,9 +31,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class TrimSurroundingWhitespaceAttribute : Attribute
        {
        }
index 00af705581e3121c87b840498a40d6376ef09335..42da7a137836bac58988c6cc4200e543b47a131f 100755 (executable)
@@ -30,9 +30,7 @@ namespace System.Windows.Markup
 {
        [MarkupExtensionReturnType (typeof (Type))]
        [TypeConverter (typeof (TypeExtensionConverter))]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)]
-#endif
        public class TypeExtension : MarkupExtension
        {
                public TypeExtension ()
@@ -56,9 +54,7 @@ namespace System.Windows.Markup
                [ConstructorArgument ("type")]
                [DefaultValue (null)]
                public Type Type { get; set; }
-#if !NET_2_1
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
-#endif
                public string TypeName { get; set; }
 
                public override object ProvideValue (IServiceProvider serviceProvider)
index bd66ca26145c91bd05ed25560d486ddf24473925..1898e16a207b84122475034f0ce1467f9d7a5882 100755 (executable)
@@ -31,9 +31,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Class, AllowMultiple = false)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class UidPropertyAttribute : Attribute
        {
                public UidPropertyAttribute (string name)
index bee7ad659082bfcd2ccacf44197927aa1933a538..45adefabec71d38fcf1084da7983d6856481c8ec 100644 (file)
@@ -32,24 +32,19 @@ using System.Xaml.Schema;
 
 namespace System.Windows.Markup
 {
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public abstract class ValueSerializer
        {
-#if !NET_2_1
                public static ValueSerializer GetSerializerFor (PropertyDescriptor descriptor)
                {
                        return GetSerializerFor (descriptor, null);
                }
-#endif
 
                public static ValueSerializer GetSerializerFor (Type type)
                {
                        return GetSerializerFor (type, null);
                }
 
-#if !NET_2_1
                // untested
                public static ValueSerializer GetSerializerFor (PropertyDescriptor descriptor, IValueSerializerContext context)
                {
@@ -63,7 +58,6 @@ namespace System.Windows.Markup
                                return new TypeConverterValueSerializer (tc);
                        return null;
                }
-#endif
 
                public static ValueSerializer GetSerializerFor (Type type, IValueSerializerContext context)
                {
index fdb4e951e2f2527594f71d7e1d6b9140d46ddb54..37dec5262a98df3de8018529b445576e60bef55e 100755 (executable)
@@ -31,9 +31,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Interface, AllowMultiple = false, Inherited = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class ValueSerializerAttribute : Attribute
        {
                public ValueSerializerAttribute (string valueSerializerTypeName)
index 893d79c1aa39e64409cca53bec99ff72185a9b6a..36cdf56aa285d65788ba72ef340c8abf98de3532 100755 (executable)
@@ -31,9 +31,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class WhitespaceSignificantCollectionAttribute : Attribute
        {
        }
index 18978a84645a4d8b8e08a9ba1fb92e56a832dc04..4789120383bcd68f58744e8c1bab6cad5cb87797 100755 (executable)
@@ -31,9 +31,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Class, AllowMultiple = false)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class XmlLangPropertyAttribute : Attribute
        {
                public XmlLangPropertyAttribute (string name)
index e77ae3597265dd4dfd5f97f8314acf36314c010c..0e16db2f15d641427a2105f327c69836d84a8ed8 100755 (executable)
@@ -31,9 +31,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class XmlnsCompatibleWithAttribute : Attribute
        {
                public XmlnsCompatibleWithAttribute (string oldNamespace, string newNamespace)
index 078623fb0822be5851a1c87a95edc74b34e84e45..81be2dae73ddd196c5fe91c52666b4d752c79244 100755 (executable)
@@ -31,9 +31,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class XmlnsDefinitionAttribute : Attribute
        {
                public XmlnsDefinitionAttribute (string xmlNamespace, string clrNamespace)
index 4bdf0d97aff4e1b90f6f892bae76a59a0bf9a8c0..c907c8eb427ea73da73311c2448ec497a41fb8aa 100755 (executable)
@@ -31,9 +31,7 @@ using System.Xaml.Schema;
 namespace System.Windows.Markup
 {
        [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
-#if !NET_2_1
        [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)]
-#endif
        public sealed class XmlnsPrefixAttribute : Attribute
        {
                public XmlnsPrefixAttribute (string xmlNamespace, string prefix)
index efe48c7846119cc6a95390b23b62ae7303ae79a4..7e4b8875fcf5f275b36157f24f7943a7b43bf720 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index e65e23faf1f3392431a8ec8a2a5e3e952ba1876d..10e1858726177069929565e30c18bb6fd5664b0f 100644 (file)
@@ -27,9 +27,7 @@ using System.Runtime.Serialization;
 
 namespace System.Xaml
 {
-#if !NET_2_1
        [Serializable]
-#endif
        public class XamlDuplicateMemberException : XamlException
        {
                public XamlDuplicateMemberException ()
@@ -54,25 +52,21 @@ namespace System.Xaml
                {
                }
 
-#if !NET_2_1
                protected XamlDuplicateMemberException (SerializationInfo info, StreamingContext context)
                        : base (info, context)
                {
                        DuplicateMember = (XamlMember) info.GetValue ("member", typeof (XamlMember));
                        ParentType = (XamlType) info.GetValue ("type", typeof (XamlType));
                }
-#endif
 
                public XamlMember DuplicateMember { get; set; }
                public XamlType ParentType { get; set; }
 
-#if !NET_2_1
                public override void GetObjectData (SerializationInfo info, StreamingContext context)
                {
                        base.GetObjectData (info, context);
                        info.AddValue ("member", DuplicateMember);
                        info.AddValue ("type", ParentType);
                }
-#endif
        }
 }
index ecccbb4ced54312cbc6e6ed09d7a5cf6e47b4799..669b2245ece833c08f7a92bc5a00746e40421a3b 100644 (file)
@@ -27,9 +27,7 @@ using System.Runtime.Serialization;
 
 namespace System.Xaml
 {
-#if !NET_2_1
        [Serializable]
-#endif
        public class XamlException : Exception
        {
                public XamlException ()
@@ -63,14 +61,12 @@ namespace System.Xaml
                        LinePosition = linePosition;
                }
 
-#if !NET_2_1
                protected XamlException (SerializationInfo info, StreamingContext context)
                        : base (info, context)
                {
                        LineNumber = info.GetInt32 ("lineNumber");
                        LinePosition = info.GetInt32 ("linePosition");
                }
-#endif
 
                public int LineNumber { get; protected internal set; }
                public int LinePosition { get; protected internal set; }
@@ -78,12 +74,10 @@ namespace System.Xaml
                        get { return FormatLine (base.Message, LineNumber, LinePosition); }
                }
 
-#if !NET_2_1
                public override void GetObjectData (SerializationInfo info, StreamingContext context)
                {
                        info.AddValue ("lineNumber", LineNumber);
                        info.AddValue ("linePosition", LinePosition);
                }
-#endif
        }
 }
index a24cffe420ac2bd04e0092a3e8e4aa9f30dd83ea..d98aa4c4df23df17263f16ad387601ba1d9e1fbe 100644 (file)
@@ -27,9 +27,7 @@ using System.Runtime.Serialization;
 
 namespace System.Xaml
 {
-#if !NET_2_1
        [Serializable]
-#endif
        public class XamlInternalException : XamlException
        {
                public XamlInternalException ()
@@ -47,11 +45,9 @@ namespace System.Xaml
                {
                }
 
-#if !NET_2_1
                protected XamlInternalException (SerializationInfo info, StreamingContext context)
                        : base (info, context)
                {
                }
-#endif
        }
 }
index 7b85eb322d577a0c6f99de799d8cdc0603d9fe61..ad03cbf628324356cdb88b0c3942e3d793b5ee48 100644 (file)
@@ -166,7 +166,6 @@ namespace System.Xaml
                        get { return directive_ns ?? (DeclaringType == null ? null : DeclaringType.PreferredXamlNamespace); }
                }
                
-#if !NET_2_1
                public DesignerSerializationVisibility SerializationVisibility {
                        get {
                                var c= GetCustomAttributeProvider ();
@@ -174,7 +173,6 @@ namespace System.Xaml
                                return a != null ? a.Visibility : DesignerSerializationVisibility.Visible;
                        }
                }
-#endif
 
                public bool IsAttachable {
                        get { return is_attachable; }
index 89c64fe1adc83fedab9a497f348976f0af97467d..0bad880d68deecb2e0b1f408568315ae16db8888 100644 (file)
@@ -27,9 +27,7 @@ using System.Runtime.Serialization;
 
 namespace System.Xaml
 {
-#if !NET_2_1
        [Serializable]
-#endif
        public class XamlObjectReaderException : XamlException
        {
                public XamlObjectReaderException ()
@@ -47,11 +45,9 @@ namespace System.Xaml
                {
                }
 
-#if !NET_2_1
                protected XamlObjectReaderException (SerializationInfo info, StreamingContext context)
                        : base (info, context)
                {
                }
-#endif
        }
 }
index b5ce0b3b803ff0a528ff2fd5957ef18cf5ec6cdb..17708cc03444f98232f6030c33a39ff923c49a9c 100644 (file)
@@ -27,9 +27,7 @@ using System.Runtime.Serialization;
 
 namespace System.Xaml
 {
-#if !NET_2_1
        [Serializable]
-#endif
        public class XamlObjectWriterException : XamlException
        {
                public XamlObjectWriterException ()
@@ -47,11 +45,9 @@ namespace System.Xaml
                {
                }
 
-#if !NET_2_1
                protected XamlObjectWriterException (SerializationInfo info, StreamingContext context)
                        : base (info, context)
                {
                }
-#endif
        }
 }
index 4ecbe75e6f75bdc37341dbf99ccb4705e0b59eba..a46dded4edf8500536004b3de4e61e6420d3f66c 100644 (file)
@@ -25,7 +25,7 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Reflection;
 using System.Windows.Markup;
-#if !NET_2_1
+#if !__MOBILE__
 using System.Xaml.Permissions;
 #endif
 using System.Xaml.Schema;
@@ -42,7 +42,7 @@ namespace System.Xaml
                        : base (settings)
                {
                        var s = settings;
-#if !NET_2_1
+#if !__MOBILE__
                        AccessLevel = s.AccessLevel;
 #endif
                        AfterBeginInitHandler = s.AfterBeginInitHandler;
@@ -65,7 +65,7 @@ namespace System.Xaml
                public EventHandler<XamlObjectEventArgs> BeforePropertiesHandler { get; set; }
                public EventHandler<XamlSetValueEventArgs> XamlSetValueHandler { get; set; }
 
-#if !NET_2_1
+#if !__MOBILE__
                [MonoTODO ("Ignored")]
                public XamlAccessLevel AccessLevel { get; set; }
 #endif
index 1ae1667b53aff90d1e498b087153449d47cae067..4bb8340a48a274fcdc9e3e5c153e05cc5c6af772 100644 (file)
@@ -27,9 +27,7 @@ using System.Runtime.Serialization;
 
 namespace System.Xaml
 {
-#if !NET_2_1
        [Serializable]
-#endif
        public class XamlParseException : XamlException
        {
                public XamlParseException ()
@@ -47,11 +45,9 @@ namespace System.Xaml
                {
                }
 
-#if !NET_2_1
                protected XamlParseException (SerializationInfo info, StreamingContext context)
                        : base (info, context)
                {
                }
-#endif
        }
 }
index de31e46de241b8dc2f9b85963f6208523579c49a..64cf91ea71cf19d1458917afd429de2f5ac76472 100644 (file)
@@ -57,10 +57,8 @@ namespace System.Xaml
                {
                        if (referenceAssemblies != null)
                                reference_assemblies = new List<Assembly> (referenceAssemblies);
-#if !NET_2_1
                        else
                                AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoaded;
-#endif
 
                        if (settings == null)
                                return;
@@ -69,13 +67,11 @@ namespace System.Xaml
                        SupportMarkupExtensionsWithDuplicateArity = settings.SupportMarkupExtensionsWithDuplicateArity;
                }
 
-#if !NET_2_1
                ~XamlSchemaContext ()
                {
                        if (reference_assemblies == null)
                                AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoaded;
                }
-#endif
 
                IList<Assembly> reference_assemblies;
 
@@ -255,7 +251,6 @@ namespace System.Xaml
                        return compat_nss.TryGetValue (xamlNamespace, out compatibleNamespace);
                }
 
-#if !NET_2_1
                void OnAssemblyLoaded (object o, AssemblyLoadEventArgs e)
                {
                        if (reference_assemblies != null)
@@ -270,8 +265,7 @@ namespace System.Xaml
                        if (all_xaml_types != null)
                                FillAllXamlTypes (e.LoadedAssembly);
                }
-#endif
-               
+
                // cache updater methods
                void FillXamlNamespaces (Assembly ass)
                {
index 9681927b39be70ccc824c14961d0a2cf4c9544a3..78de4f8e4822f8b855c84365dc49d9f224f23bfc 100644 (file)
@@ -27,9 +27,7 @@ using System.Runtime.Serialization;
 
 namespace System.Xaml
 {
-#if !NET_2_1
        [Serializable]
-#endif
        public class XamlSchemaException : XamlException
        {
                public XamlSchemaException ()
@@ -47,11 +45,9 @@ namespace System.Xaml
                {
                }
 
-#if !NET_2_1
                protected XamlSchemaException (SerializationInfo info, StreamingContext context)
                        : base (info, context)
                {
                }
-#endif
        }
 }
index cf686d8506f63060df7d16da6f4d368076c01327..c8026d195a452f5607331bd1422937c8fcdcd0b9 100755 (executable)
@@ -71,13 +71,11 @@ namespace System.Xaml
                        return sw.ToString ();
                }
 
-#if !NET_2_1
                public static void Save (string fileName, object instance)
                {
                        using (var xw = XmlWriter.Create (fileName, new XmlWriterSettings () { OmitXmlDeclaration = true, Indent = true }))
                                Save (xw, instance);
                }
-#endif
 
                public static void Save (Stream stream, object instance)
                {
index d784b9df2d0baea103b6c753897508808c90f70f..ffa402cc7dfc3d6a2bf0d8c2284a7d1a21203be4 100644 (file)
@@ -27,9 +27,7 @@ using System.Runtime.Serialization;
 
 namespace System.Xaml
 {
-#if !NET_2_1
        [Serializable]
-#endif
        public class XamlXmlWriterException : XamlException
        {
                public XamlXmlWriterException ()
@@ -47,11 +45,9 @@ namespace System.Xaml
                {
                }
 
-#if !NET_2_1
                protected XamlXmlWriterException (SerializationInfo info, StreamingContext context)
                        : base (info, context)
                {
                }
-#endif
        }
 }
index ea39aaa2447547753c089afac61ab68949e5f353..ee628c2c5fbe8ab65c38694afff240991c219a94 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index df66098df76fe8b50ea71e69a79d6f19429fdd93..0fe3b0dd4428a9cb1ff6e7c0114700ba952c3eee 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.ServiceModel/System.ServiceModel-net_4_5.csproj">\r
       <Project>{F2156C09-C377-4945-A690-39CFBF3319B3}</Project>\r
-      <Name>System.ServiceModel\System.ServiceModel-net_4_5</Name>\r
+      <Name>System.ServiceModel-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 31b70df4c5256b47edee9b82c579452ab9eaa99f..26714d1f7bb7aa7ddf712111488f575d7e427147 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index e28d9a90cdadf4b9a00f427bc68c41e0248b00a2..8367ee9e16b6491a7e06acc4cc6c55f98b0de58a 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="System-secxml-net_4_5.csproj">\r
       <Project>{46F151F2-A422-4A1B-9D29-2E148CE73629}</Project>\r
-      <Name>System\System-secxml-net_4_5</Name>\r
+      <Name>System-secxml-net_4_5</Name>\r
       <Aliases>PrebuiltSystem</Aliases>    </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
       <Aliases>MonoSecurity</Aliases>    </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index e531d22607cec03e602cef34a300738424dec6de..2e69308ad30648fa52b784f6600e590a5557874e 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-bare-net_4_5.csproj">\r
       <Project>{21FB091E-0F84-479E-AB16-6503D36852F9}</Project>\r
-      <Name>System.XML\System.Xml-bare-net_4_5</Name>\r
+      <Name>System.Xml-bare-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="System-bare-net_4_5.csproj">\r
       <Project>{91CDF14E-F60F-4AB7-BC9D-5CBD7E669076}</Project>\r
-      <Name>System\System-bare-net_4_5</Name>\r
+      <Name>System-bare-net_4_5</Name>\r
       <Aliases>PrebuiltSystem</Aliases>    </ProjectReference>\r
     <ProjectReference Include="../Mono.Security/Mono.Security-net_4_5.csproj">\r
       <Project>{D68D4FED-CA32-4800-A628-58BAE485562C}</Project>\r
-      <Name>Mono.Security\Mono.Security-net_4_5</Name>\r
+      <Name>Mono.Security-net_4_5</Name>\r
       <Aliases>MonoSecurity</Aliases>    </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index b4c0ce8b69b1cb2ba325bf0bd81adaa229b173eb..181b91dbbc9bced4f86b7669fd27b2b40d5ab51b 100644 (file)
@@ -248,7 +248,14 @@ namespace System.ComponentModel {
 
                void Item_PropertyChanged (object item, PropertyChangedEventArgs args)
                {
-                       OnListChanged (new ListChangedEventArgs (ListChangedType.ItemChanged, base.IndexOf ((T) item)) );
+                       var property_info = item.GetType ().GetProperty (args.PropertyName);
+
+                       if (property_info != null) {
+                               OnListChanged (new ListChangedEventArgs (ListChangedType.ItemChanged, base.IndexOf ((T) item),
+                                                       new ReflectionPropertyDescriptor (property_info)) );
+                       } else {
+                               OnListChanged (new ListChangedEventArgs (ListChangedType.ItemChanged, base.IndexOf ((T) item)) );
+                       }
                }
 
                protected virtual void OnAddingNew (AddingNewEventArgs e)
index 829deecedab5ff38be7963375f1f423835da19e7..4188a96c3219b620c513237872baf041d2755ea0 100644 (file)
@@ -550,8 +550,12 @@ namespace System.Net.Mail {
                                MailAddress from = message.From;
                                if (from == null)
                                        from = defaultFrom;
-                               
-                               SendHeader (HeaderName.Date, DateTime.Now.ToString ("ddd, dd MMM yyyy HH':'mm':'ss zzz", DateTimeFormatInfo.InvariantInfo));
+
+                               string dt = DateTime.Now.ToString("ddd, dd MMM yyyy HH':'mm':'ss zzz", DateTimeFormatInfo.InvariantInfo);
+                               // remove ':' from time zone offset (e.g. from "+01:00")
+                               dt = dt.Remove(dt.Length - 3, 1);
+                               SendHeader(HeaderName.Date, dt);
+
                                SendHeader (HeaderName.From, EncodeAddress(from));
                                SendHeader (HeaderName.To, EncodeAddresses(message.To));
                                if (message.CC.Count > 0)
@@ -762,7 +766,7 @@ namespace System.Net.Mail {
 
                static void SendMailAsyncCompletedHandler (TaskCompletionSource<object> source, AsyncCompletedEventArgs e, SendCompletedEventHandler handler, SmtpClient client)
                {
-                       if (handler != e.UserState)
+                       if ((object) handler != e.UserState)
                                return;
 
                        client.SendCompleted -= handler;
index 249a55b0f4c797b5da567437f68bf79d7c6e180e..feeaec42d509f4abba613260d93cf180fd9b7b71 100644 (file)
@@ -85,8 +85,15 @@ namespace System.Net.NetworkInformation {
                public ushort sll_hatype;
                public byte   sll_pkttype;
                public byte   sll_halen;
-
+#if MONODROID
+               // In MonoDroid the structure has larger space allocated for the address part since there exist
+               // addresses (Infiniband, ipv6 tunnels) which exceed the standard 8 bytes. In fact, glibc's
+               // getifaddrs implementation also uses the bigger size, but for compatibility with other libc
+               // implementations we use the standard address size
+               [MarshalAs (UnmanagedType.ByValArray, SizeConst=24)]
+#else
                [MarshalAs (UnmanagedType.ByValArray, SizeConst=8)]
+#endif
                public byte[] sll_addr;
        }
 
@@ -96,11 +103,18 @@ namespace System.Net.NetworkInformation {
                PRONET = 4,
                ATM = 19,
                SLIP = 256,
+               CSLIP = 257,
+               SLIP6 = 258,
+               CSLIP6 = 259,
                PPP = 512,
                LOOPBACK = 772,
                FDDI = 774,
                TUNNEL = 768,
-               TUNNEL6 = 769
+               TUNNEL6 = 769,
+               SIT = 776, // IPv6-in-IPv4 tunnel
+               IPDDP = 777, // IP over DDP tunnel
+               IPGRE = 778, // GRE over IP
+               IP6GRE = 823 // GRE over IPv6
        }
 }
 
index 940a993f7c77301121cc9be6601008b89b52a6b3..840fc5310309e5e35058f84622745aba2bcc2640 100644 (file)
@@ -79,4 +79,23 @@ namespace System.Net.NetworkInformation {
                LOOPBACK = 0x18,
                FDDI = 0xf
        }
+
+       internal enum MacOsInterfaceFlags {
+               IFF_UP = 0x1,                           /* interface is up */
+               IFF_BROADCAST = 0x2,            /* broadcast address valid */
+               IFF_DEBUG = 0x4,                        /* turn on debugging */
+               IFF_LOOPBACK = 0x8,                     /* is a loopback net */
+               IFF_POINTOPOINT = 0x10,         /* interface is point-to-point link */
+               IFF_NOTRAILERS = 0x20,          /* avoid use of trailers */
+               IFF_RUNNING = 0x40,                     /* resources allocated */
+               IFF_NOARP = 0x80,                       /* no address resolution protocol */
+               IFF_PROMISC = 0x100,            /* receive all packets */
+               IFF_ALLMULTI = 0x200,           /* receive all multicast packets */
+               IFF_OACTIVE = 0x400,            /* transmission in progress */
+               IFF_SIMPLEX = 0x800,            /* can't hear own transmissions */
+               IFF_LINK0 = 0x1000,                     /* per link layer defined bit */
+               IFF_LINK1 = 0x2000,                     /* per link layer defined bit */
+               IFF_LINK2 = 0x4000,                     /* per link layer defined bit */
+               IFF_MULTICAST = 0x8000          /* supports multicast */
+       }
 }
index 4ad2720909fd6c0ee99c6a6b767745d501638639..edaa12dafb3aef8dbe606e78e59bc48ffb6aec4d 100644 (file)
@@ -238,11 +238,29 @@ namespace System.Net.NetworkInformation {
                        get { return iface_path; }
                }
                
+               static int GetInterfaceAddresses (out IntPtr ifap)
+               {
+#if MONODROID
+                       return AndroidPlatform.GetInterfaceAddresses (out ifap);
+#else
+                       return getifaddrs (out ifap);
+#endif
+               }
+
+               static void FreeInterfaceAddresses (IntPtr ifap)
+               {
+#if MONODROID
+                       AndroidPlatform.FreeInterfaceAddresses (ifap);
+#else
+                       freeifaddrs (ifap);
+#endif
+               }
+               
                public static NetworkInterface [] ImplGetAllNetworkInterfaces ()
                {
                        var interfaces = new Dictionary <string, LinuxNetworkInterface> ();
                        IntPtr ifap;
-                       if (getifaddrs (out ifap) != 0)
+                       if (GetInterfaceAddresses (out ifap) != 0)
                                throw new SystemException ("getifaddrs() failed");
 
                        try {
@@ -254,6 +272,7 @@ namespace System.Net.NetworkInformation {
                                        int       index = -1;
                                        byte[]    macAddress = null;
                                        NetworkInterfaceType type = NetworkInterfaceType.Unknown;
+                                       int       nullNameCount = 0;
 
                                        if (addr.ifa_addr != IntPtr.Zero) {
                                                sockaddr_in sockaddr = (sockaddr_in) Marshal.PtrToStructure (addr.ifa_addr, typeof (sockaddr_in));
@@ -295,6 +314,9 @@ namespace System.Net.NetworkInformation {
                                                                                break;
                                                                        
                                                                        case LinuxArpHardware.SLIP:
+                                                                       case LinuxArpHardware.CSLIP:
+                                                                       case LinuxArpHardware.SLIP6:
+                                                                       case LinuxArpHardware.CSLIP6:
                                                                                type = NetworkInterfaceType.Slip;
                                                                                break;
                                                                        
@@ -311,9 +333,11 @@ namespace System.Net.NetworkInformation {
                                                                                type = NetworkInterfaceType.Fddi;
                                                                                break;
 
+                                                                       case LinuxArpHardware.SIT:
+                                                                       case LinuxArpHardware.IPDDP:
+                                                                       case LinuxArpHardware.IPGRE:
+                                                                       case LinuxArpHardware.IP6GRE:
                                                                        case LinuxArpHardware.TUNNEL6:
-                                                                               goto case LinuxArpHardware.TUNNEL;
-                                                                               
                                                                        case LinuxArpHardware.TUNNEL:
                                                                                type = NetworkInterfaceType.Tunnel;
                                                                                break;
@@ -324,6 +348,9 @@ namespace System.Net.NetworkInformation {
 
                                        LinuxNetworkInterface iface = null;
 
+                                       if (String.IsNullOrEmpty (name))
+                                               name = "\0" + (++nullNameCount).ToString ();
+                                       
                                        if (!interfaces.TryGetValue (name, out iface)) {
                                                iface = new LinuxNetworkInterface (name);
                                                interfaces.Add (name, iface);
@@ -344,7 +371,7 @@ namespace System.Net.NetworkInformation {
                                        next = addr.ifa_next;
                                }
                        } finally {
-                               freeifaddrs (ifap);
+                               FreeInterfaceAddresses (ifap);
                        }
 
                        NetworkInterface [] result = new NetworkInterface [interfaces.Count];
@@ -446,6 +473,8 @@ namespace System.Net.NetworkInformation {
                const int AF_INET  = 2;
                const int AF_INET6 = 30;
                const int AF_LINK  = 18;
+
+               private uint _ifa_flags;
                
                public static NetworkInterface [] ImplGetAllNetworkInterfaces ()
                {
@@ -465,6 +494,7 @@ namespace System.Net.NetworkInformation {
                                        NetworkInterfaceType type = NetworkInterfaceType.Unknown;
 
                                        if (addr.ifa_addr != IntPtr.Zero) {
+                                               // optain IPAddress
                                                MacOsStructs.sockaddr sockaddr = (MacOsStructs.sockaddr) Marshal.PtrToStructure (addr.ifa_addr, typeof (MacOsStructs.sockaddr));
 
                                                if (sockaddr.sa_family == AF_INET6) {
@@ -478,7 +508,10 @@ namespace System.Net.NetworkInformation {
                                                        sockaddrdl.Read (addr.ifa_addr);
 
                                                        macAddress = new byte [(int) sockaddrdl.sdl_alen];
+                                                       // copy mac address from sdl_data field starting at last index pos of interface name into array macaddress, starting
+                                                       // at index 0
                                                        Array.Copy (sockaddrdl.sdl_data, sockaddrdl.sdl_nlen, macAddress, 0, Math.Min (macAddress.Length, sockaddrdl.sdl_data.Length - sockaddrdl.sdl_nlen));
+
                                                        index = sockaddrdl.sdl_index;
 
                                                        int hwtype = (int) sockaddrdl.sdl_type;
@@ -515,14 +548,17 @@ namespace System.Net.NetworkInformation {
 
                                        MacOsNetworkInterface iface = null;
 
+                                       // create interface if not already present
                                        if (!interfaces.TryGetValue (name, out iface)) {
-                                               iface = new MacOsNetworkInterface (name);
+                                               iface = new MacOsNetworkInterface (name, addr.ifa_flags);
                                                interfaces.Add (name, iface);
                                        }
 
+                                       // if a new address has been found, add it
                                        if (!address.Equals (IPAddress.None))
                                                iface.AddAddress (address);
 
+                                       // set link layer info, if iface has macaddress or is loopback device
                                        if (macAddress != null || type == NetworkInterfaceType.Loopback)
                                                iface.SetLinkLayerInfo (index, macAddress, type);
 
@@ -541,9 +577,10 @@ namespace System.Net.NetworkInformation {
                        return result;
                }
                
-               MacOsNetworkInterface (string name)
+               MacOsNetworkInterface (string name, uint ifa_flags)
                        : base (name)
                {
+                       _ifa_flags = ifa_flags;
                }
 
                public override IPInterfaceProperties GetIPProperties ()
@@ -562,13 +599,16 @@ namespace System.Net.NetworkInformation {
 
                public override OperationalStatus OperationalStatus {
                        get {
+                               if(((MacOsInterfaceFlags)_ifa_flags & MacOsInterfaceFlags.IFF_UP) == MacOsInterfaceFlags.IFF_UP){
+                                       return OperationalStatus.Up;
+                               }
                                return OperationalStatus.Unknown;
                        }
                }
 
                public override bool SupportsMulticast {
                        get {
-                               return false;
+                               return ((MacOsInterfaceFlags)_ifa_flags & MacOsInterfaceFlags.IFF_MULTICAST) == MacOsInterfaceFlags.IFF_MULTICAST;
                        }
                }
        }
index 609583a73f2336df00026d379a6d90a0ceb3209d..a7eeb67d883c73ab90fdb7e57a87c096b633c452 100644 (file)
@@ -231,7 +231,7 @@ namespace System.Net.Sockets
                        else if (op == SocketAsyncOperation.Disconnect)
                                args.DisconnectCallback (ares);
                        else if (op == SocketAsyncOperation.Connect)
-                               args.ConnectCallback ();
+                               args.ConnectCallback (ares);
                        /*
                        else if (op == Socket.SocketOperation.ReceiveMessageFrom)
                        else if (op == Socket.SocketOperation.SendPackets)
@@ -254,10 +254,12 @@ namespace System.Net.Sockets
                        }
                }
 
-               void ConnectCallback ()
+               void ConnectCallback (IAsyncResult ares)
                {
                        try {
-                               SocketError = (SocketError) Worker.result.error;
+                               curSocket.EndConnect (ares);
+                       } catch (SocketException se) {
+                               SocketError = se.SocketErrorCode;
                        } finally {
                                OnCompleted (this);
                        }
index 11a7eda8a45ee9b9ae8631201dcf2a76a9313f9a..7616b88c788087763599527518712eaf4a1c3ae0 100644 (file)
@@ -1253,7 +1253,7 @@ namespace System.Net.Sockets {
                                throw new SocketException (error);
                        }
 
-                       if (socket_type == SocketType.Dgram && (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any)))
+                       if (socket_type == SocketType.Dgram && ep != null && (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any)))
                                connected = false;
                        else
                                connected = true;
index 3778c740538ffde77005774f0408e68a27f87b69..bfa085885e6228f0c17b30a8f5635b7e7863f32e 100644 (file)
@@ -196,7 +196,30 @@ namespace System.Net.WebSockets
                                underlyingSocket.Send (sendBuffer, 0, buffer.Count + headerLength, SocketFlags.None);
                        });
                }
+               
+               const int messageTypeText = 1;
+               const int messageTypeBinary = 2;
+               const int messageTypeClose = 8;
 
+               static WebSocketMessageType WireToMessageType (byte msgType)
+               {
+                       
+                       if (msgType == messageTypeText)
+                               return WebSocketMessageType.Text;
+                       if (msgType == messageTypeBinary)
+                               return WebSocketMessageType.Binary;
+                       return WebSocketMessageType.Close;
+               }
+
+               static byte MessageTypeToWire (WebSocketMessageType type)
+               {
+                       if (type == WebSocketMessageType.Text)
+                               return messageTypeText;
+                       if (type == WebSocketMessageType.Binary)
+                               return messageTypeBinary;
+                       return messageTypeClose;
+               }
+               
                public override Task<WebSocketReceiveResult> ReceiveAsync (ArraySegment<byte> buffer, CancellationToken cancellationToken)
                {
                        EnsureWebSocketConnected ();
@@ -208,7 +231,7 @@ namespace System.Net.WebSockets
                                var isLast = (headerBuffer[0] >> 7) > 0;
                                var isMasked = (headerBuffer[1] >> 7) > 0;
                                int mask = 0;
-                               var type = (WebSocketMessageType)(headerBuffer[0] & 0xF);
+                               var type = WireToMessageType ((byte)(headerBuffer[0] & 0xF));
                                long length = headerBuffer[1] & 0x7F;
                                int offset = 0;
                                if (length == 126) {
@@ -279,7 +302,7 @@ namespace System.Net.WebSockets
 
                int WriteHeader (WebSocketMessageType type, ArraySegment<byte> buffer, bool endOfMessage)
                {
-                       var opCode = (byte)type;
+                       var opCode = MessageTypeToWire (type);
                        var length = buffer.Count;
 
                        headerBuffer[0] = (byte)(opCode | (endOfMessage ? 0 : 0x80));
index 50cbc003c0f7c254cdcf1506a723ba8530542c91..f6cb2fc2a86d32a40a437aad5e5ff75cb23927eb 100644 (file)
@@ -35,9 +35,9 @@ namespace System.Net.WebSockets
 {
        public enum WebSocketMessageType
        {
-               Text = 1,
-               Binary = 2,
-               Close = 8
+               Text = 0,
+               Binary = 1,
+               Close = 2
        }
 }
 
index 1337fce4fce9193765564d733120d94946db8a5e..addcc28907b34daf68df5df074737ff54133e8f3 100644 (file)
@@ -39,6 +39,7 @@ namespace System.Net
        {
                enum State {
                        None,
+                       PartialSize,
                        Body,
                        BodyFinished,
                        Trailer
@@ -139,9 +140,9 @@ namespace System.Net
                
                void InternalWrite (byte [] buffer, ref int offset, int size)
                {
-                       if (state == State.None) {
+                       if (state == State.None || state == State.PartialSize) {
                                state = GetChunkSize (buffer, ref offset, size);
-                               if (state == State.None)
+                               if (state == State.PartialSize)
                                        return;
                                
                                saved.Length = 0;
@@ -262,7 +263,7 @@ namespace System.Net
                                        ThrowProtocolViolation ("Cannot parse chunk size.");
                                }
 
-                               return State.None;
+                               return State.PartialSize;
                        }
 
                        chunkRead = 0;
index be618771eb9ee0ad5b37fdd9157da238b21f6fb1..f570a7396506149012bed764229b3562da8d7c98 100644 (file)
@@ -181,7 +181,7 @@ namespace System.Net
                        }
 
                        value = header.Substring (beginQ, pos - beginQ);
-                       pos += 2;
+                       pos += useQuote ? 2 : 1;
                        return true;
                }
        }
index 9dbf4857ab9f986353530ccc74739d0a27e7bbb5..c86790164a3159eadb5ea451cbe26f53ca70248d 100644 (file)
@@ -1328,9 +1328,9 @@ namespace System.Net
                        });
                }
 
-               SimpleAsyncResult SetWriteStreamInner (SimpleAsyncCallback callback)
+               void SetWriteStreamInner (SimpleAsyncCallback callback)
                {
-                       return SimpleAsyncResult.Run (result => {
+                       SimpleAsyncResult.Run (result => {
                                if (bodyBuffer != null) {
                                        // The body has been written and buffered. The request "user"
                                        // won't write it again, so we must do it.
index 1a5e89ec0a36e8571f3750c8f7091ff635d8b5b1..45740306db54d46b6c7ebb44c3b1ed35a169c786 100644 (file)
@@ -3,7 +3,7 @@
 //  
 // Author: Jeffrey Stedfast <jeff@xamarin.com>
 // 
-// Copyright (c) 2012 Xamarin Inc.
+// Copyright (c) 2012-2014 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
@@ -83,7 +83,7 @@ namespace System.Net
                }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static IntPtr CFRelease (IntPtr handle);
+               extern static void CFRelease (IntPtr handle);
 
                void Release ()
                {
@@ -110,7 +110,7 @@ namespace System.Net
                public CFArray (IntPtr handle, bool own) : base (handle, own) { }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static IntPtr CFArrayCreate (IntPtr allocator, IntPtr values, int numValues, IntPtr callbacks);
+               extern static IntPtr CFArrayCreate (IntPtr allocator, IntPtr values, /* CFIndex */ IntPtr numValues, IntPtr callbacks);
                static readonly IntPtr kCFTypeArrayCallbacks;
 
                static CFArray ()
@@ -132,7 +132,7 @@ namespace System.Net
                                throw new ArgumentNullException ("values");
 
                        fixed (IntPtr *pv = values) {
-                               IntPtr handle = CFArrayCreate (IntPtr.Zero, (IntPtr) pv, values.Length, kCFTypeArrayCallbacks);
+                               IntPtr handle = CFArrayCreate (IntPtr.Zero, (IntPtr) pv, (IntPtr) values.Length, kCFTypeArrayCallbacks);
 
                                return new CFArray (handle, false);
                        }
@@ -151,18 +151,18 @@ namespace System.Net
                }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static int CFArrayGetCount (IntPtr handle);
+               extern static /* CFIndex */ IntPtr CFArrayGetCount (IntPtr handle);
 
                public int Count {
-                       get { return CFArrayGetCount (Handle); }
+                       get { return (int) CFArrayGetCount (Handle); }
                }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static IntPtr CFArrayGetValueAtIndex (IntPtr handle, int index);
+               extern static IntPtr CFArrayGetValueAtIndex (IntPtr handle, /* CFIndex */ IntPtr index);
 
                public IntPtr this[int index] {
                        get {
-                               return CFArrayGetValueAtIndex (Handle, index);
+                               return CFArrayGetValueAtIndex (Handle, (IntPtr) index);
                        }
                }
        }
@@ -172,7 +172,8 @@ namespace System.Net
                public CFNumber (IntPtr handle, bool own) : base (handle, own) { }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static bool CFNumberGetValue (IntPtr handle, int type, out bool value);
+               [return: MarshalAs (UnmanagedType.I1)]
+               extern static bool CFNumberGetValue (IntPtr handle, /* CFNumberType */ IntPtr type, [MarshalAs (UnmanagedType.I1)] out bool value);
 
                public static bool AsBool (IntPtr handle)
                {
@@ -181,7 +182,7 @@ namespace System.Net
                        if (handle == IntPtr.Zero)
                                return false;
 
-                       CFNumberGetValue (handle, 1, out value);
+                       CFNumberGetValue (handle, (IntPtr) 1, out value);
 
                        return value;
                }
@@ -192,7 +193,8 @@ namespace System.Net
                }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static bool CFNumberGetValue (IntPtr handle, int type, out int value);
+               [return: MarshalAs (UnmanagedType.I1)]
+               extern static bool CFNumberGetValue (IntPtr handle, /* CFNumberType */ IntPtr type, out int value);
 
                public static int AsInt32 (IntPtr handle)
                {
@@ -201,7 +203,8 @@ namespace System.Net
                        if (handle == IntPtr.Zero)
                                return 0;
 
-                       CFNumberGetValue (handle, 9, out value);
+                       // 9 == kCFNumberIntType == C int
+                       CFNumberGetValue (handle, (IntPtr) 9, out value);
 
                        return value;
                }
@@ -213,12 +216,12 @@ namespace System.Net
        }
 
        internal struct CFRange {
-               public int Location, Length;
+               public IntPtr Location, Length;
                
                public CFRange (int loc, int len)
                {
-                       Location = loc;
-                       Length = len;
+                       Location = (IntPtr) loc;
+                       Length = (IntPtr) len;
                }
        }
 
@@ -229,7 +232,7 @@ namespace System.Net
                public CFString (IntPtr handle, bool own) : base (handle, own) { }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static IntPtr CFStringCreateWithCharacters (IntPtr alloc, IntPtr chars, int length);
+               extern static IntPtr CFStringCreateWithCharacters (IntPtr alloc, IntPtr chars, /* CFIndex */ IntPtr length);
 
                public static CFString Create (string value)
                {
@@ -237,7 +240,7 @@ namespace System.Net
 
                        unsafe {
                                fixed (char *ptr = value) {
-                                       handle = CFStringCreateWithCharacters (IntPtr.Zero, (IntPtr) ptr, value.Length);
+                                       handle = CFStringCreateWithCharacters (IntPtr.Zero, (IntPtr) ptr, (IntPtr) value.Length);
                                }
                        }
 
@@ -248,14 +251,14 @@ namespace System.Net
                }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static int CFStringGetLength (IntPtr handle);
+               extern static /* CFIndex */ IntPtr CFStringGetLength (IntPtr handle);
 
                public int Length {
                        get {
                                if (str != null)
                                        return str.Length;
 
-                               return CFStringGetLength (Handle);
+                               return (int) CFStringGetLength (Handle);
                        }
                }
 
@@ -270,7 +273,7 @@ namespace System.Net
                        if (handle == IntPtr.Zero)
                                return null;
                        
-                       int len = CFStringGetLength (handle);
+                       int len = (int) CFStringGetLength (handle);
                        
                        if (len == 0)
                                return string.Empty;
index 26578856fae1beb3bc182f186d22811ce8103be5..66cdc7296feca5dbcbccaa586ad7deceeaf7d01f 100644 (file)
@@ -264,7 +264,6 @@ namespace System.Net
                                        throw new ArgumentException ("value");                          
 
                                maxServicePoints = value;
-                               RecycleServicePoints ();
                        }
                }
 
@@ -329,9 +328,6 @@ namespace System.Net
                        if (address == null)
                                throw new ArgumentNullException ("address");
 
-                       if ((servicePoints.Count % 4) == 0)
-                               RecycleServicePoints ();
-
                        var origAddress = new Uri (address.Scheme + "://" + address.Authority);
                        
                        bool usesProxy = false;
@@ -378,41 +374,6 @@ namespace System.Net
                        return sp;
                }
                
-               // Internal Methods
-
-               static void RecycleServicePoints ()
-               {
-                       lock (servicePoints) {
-                               var toRemove = new ArrayList ();
-                               var idleList = new SortedDictionary<DateTime, ServicePoint> ();
-                               IDictionaryEnumerator e = servicePoints.GetEnumerator ();
-                               while (e.MoveNext ()) {
-                                       ServicePoint sp = (ServicePoint) e.Value;
-                                       DateTime idleSince;
-                                       if (sp.CheckAvailableForRecycling (out idleSince)) {
-                                               toRemove.Add (e.Key);
-                                               continue;
-                                       }
-
-                                       while (idleList.ContainsKey (idleSince))
-                                               idleSince = idleSince.AddMilliseconds (1);
-                                       idleList.Add (idleSince, sp);
-                               }
-                               
-                               for (int i = 0; i < toRemove.Count; i++) 
-                                       servicePoints.Remove (toRemove [i]);
-
-                               if (maxServicePoints == 0 || servicePoints.Count <= maxServicePoints)
-                                       return;
-
-                               // get rid of the ones with the longest idle time
-                               foreach (var sp in idleList.Values) {
-                                       if (servicePoints.Count <= maxServicePoints)
-                                               break;
-                                       servicePoints.Remove (sp);
-                               }
-                       }
-               }
 #if SECURITY_DEP
                internal class ChainValidationHelper {
                        object sender;
index 42c94e0c14dd138e669f6ec0508b929e5d92590b..b18d2adf34a12d089e466a006cb031a7c5ccf7e4 100644 (file)
@@ -1,5 +1,5 @@
 //
-// System.Net.WebAsyncResult
+// SimpleAsyncResult.cs
 //
 // Authors:
 //     Gonzalo Paniagua Javier (gonzalo@ximian.com)
@@ -63,7 +63,7 @@ namespace System.Net
                        };
                }
 
-               public static SimpleAsyncResult Run (SimpleAsyncFunc func, SimpleAsyncCallback callback)
+               public static void Run (SimpleAsyncFunc func, SimpleAsyncCallback callback)
                {
                        var result = new SimpleAsyncResult (callback);
                        try {
@@ -72,12 +72,11 @@ namespace System.Net
                        } catch (Exception ex) {
                                result.SetCompleted (true, ex);
                        }
-                       return result;
                }
 
-               public static SimpleAsyncResult RunWithLock (object locker, SimpleAsyncFunc func, SimpleAsyncCallback callback)
+               public static void RunWithLock (object locker, SimpleAsyncFunc func, SimpleAsyncCallback callback)
                {
-                       return Run (inner => {
+                       Run (inner => {
                                bool running = func (inner);
                                if (running)
                                        Monitor.Exit (locker);
@@ -105,7 +104,6 @@ namespace System.Net
                {
                        callbackDone = false;
                        exc = null;
-                       exc = null;
                        lock (locker) {
                                isCompleted = false;
                                if (handle != null)
@@ -161,18 +159,10 @@ namespace System.Net
                {
                        if (!callbackDone && cb != null) {
                                callbackDone = true;
-//                             if (true || synch)
-                                       cb (this);
-//                             else
-//                                     ThreadPool.QueueUserWorkItem (CB, null);
+                               cb (this);
                        }
                }
 
-               void CB (object unused)
-               {
-                       cb (this);
-               }
-
                internal void WaitUntilComplete ()
                {
                        if (IsCompleted)
index 7ee338a0a266516d4ed107fcff2920b4d9cd99bd..97f9759dcc32f9675611404754a0cf6fc02eadcf 100644 (file)
@@ -1405,10 +1405,12 @@ namespace System.Net
                                                string data2 = UploadString ((Uri) args [0], (string) args [1], (string) args [2]);
                                                OnUploadStringCompleted (
                                                        new UploadStringCompletedEventArgs (data2, null, false, args [3]));
-                                       } catch (ThreadInterruptedException){
-                                               OnUploadStringCompleted (
-                                                       new UploadStringCompletedEventArgs (null, null, true, args [3]));
                                        } catch (Exception e){
+                                               if (e is ThreadInterruptedException || e.InnerException is ThreadInterruptedException) {
+                                                       OnUploadStringCompleted (
+                                                               new UploadStringCompletedEventArgs (null, null, true, args [3]));
+                                                       return;
+                                               }
                                                OnUploadStringCompleted (
                                                        new UploadStringCompletedEventArgs (null, e, false, args [3]));
                                        }});
index 54af1f449942e2ce96a96cd846085dde9ef7dbf6..0f35c49b3e4f35978e5f90a1a25de789657e056f 100644 (file)
@@ -356,8 +356,6 @@ namespace System.Net
 
                        byte [] buffer = new byte [1024];
                        MemoryStream ms = new MemoryStream ();
-                       bool gotStatus = false;
-                       WebHeaderCollection headers = null;
 
                        while (true) {
                                int n = stream.Read (buffer, 0, 1024);
@@ -369,7 +367,8 @@ namespace System.Net
                                ms.Write (buffer, 0, n);
                                int start = 0;
                                string str = null;
-                               headers = new WebHeaderCollection ();
+                               bool gotStatus = false;
+                               WebHeaderCollection headers = new WebHeaderCollection ();
                                while (ReadLine (ms.GetBuffer (), ref start, (int) ms.Length, ref str)) {
                                        if (str == null) {
                                                int contentLen = 0;
@@ -399,13 +398,22 @@ namespace System.Net
                                                continue;
                                        }
 
-                                       int spaceidx = str.IndexOf (' ');
-                                       if (spaceidx == -1) {
+                                       string[] parts = str.Split (' ');
+                                       if (parts.Length < 2) {
                                                HandleError (WebExceptionStatus.ServerProtocolViolation, null, "ReadHeaders2");
                                                return null;
                                        }
 
-                                       status = (int) UInt32.Parse (str.Substring (spaceidx + 1, 3));
+                                       if (String.Compare (parts [0], "HTTP/1.1", true) == 0)
+                                               Data.ProxyVersion = HttpVersion.Version11;
+                                       else if (String.Compare (parts [0], "HTTP/1.0", true) == 0)
+                                               Data.ProxyVersion = HttpVersion.Version10;
+                                       else {
+                                               HandleError (WebExceptionStatus.ServerProtocolViolation, null, "ReadHeaders2");
+                                               return null;
+                                       }
+
+                                       status = (int)UInt32.Parse (parts [1]);
                                        gotStatus = true;
                                }
                        }
@@ -841,6 +849,8 @@ namespace System.Net
                                string header = (sPoint.UsesProxy) ? "Proxy-Connection" : "Connection";
                                string cncHeader = (Data.Headers != null) ? Data.Headers [header] : null;
                                bool keepAlive = (Data.Version == HttpVersion.Version11 && this.keepAlive);
+                               if (Data.ProxyVersion != null && Data.ProxyVersion != HttpVersion.Version11)
+                                       keepAlive = false;
                                if (cncHeader != null) {
                                        cncHeader = cncHeader.ToLower ();
                                        keepAlive = (this.keepAlive && cncHeader.IndexOf ("keep-alive", StringComparison.Ordinal) != -1);
index 216b57f16c7547a2ef9d14f2fa155ee986fc39f8..77d19540be16bfa46129a8ce540a491513a472bf 100644 (file)
@@ -39,6 +39,7 @@ namespace System.Net
                public string StatusDescription;
                public WebHeaderCollection Headers;
                public Version Version;
+               public Version ProxyVersion;
                public Stream stream;
                public string[] Challenge;
                ReadState _readState;
index 0348aeebe4213ab89381860ab52ef1a0a83230b1..5e142154f913704bd614466144dbe5da559aa014 100644 (file)
@@ -70,14 +70,16 @@ namespace System.Net
                        //TODO: abort requests or wait for them to finish
                        lock (sPoint) {
                                closing = true;
-                               foreach (var cnc in connections) {
-                                       if (cnc.Connection == null)
-                                               continue;
-                                       cnc.Connection.Close (false);
-                                       cnc.Connection = null;
+                               var iter = connections.First;
+                               while (iter != null) {
+                                       var cnc = iter.Value.Connection;
+                                       var node = iter;
+                                       iter = iter.Next;
+
+                                       connections.Remove (node);
+                                       cnc.Close (false);
                                        OnConnectionClosed ();
                                }
-                               connections.Clear ();
                        }
                }
 
@@ -120,7 +122,7 @@ namespace System.Net
                ConnectionState FindIdleConnection ()
                {
                        foreach (var cnc in connections) {
-                               if (cnc.Busy  || cnc.Connection == null)
+                               if (cnc.Busy)
                                        continue;
 
                                connections.Remove (cnc);
@@ -140,7 +142,7 @@ namespace System.Net
                                return cnc.Connection;
                        }
 
-                       if (sPoint.ConnectionLimit > connections.Count) {
+                       if (sPoint.ConnectionLimit > connections.Count || connections.Count == 0) {
                                created = true;
                                cnc = new ConnectionState (this);
                                connections.AddFirst (cnc);
@@ -177,14 +179,11 @@ namespace System.Net
                                }
 
                                int count = 0;
-                               for (var node = connections.First; node != null; node = node.Next) {
-                                       var cnc = node.Value;
-
-                                       if (cnc.Connection == null) {
-                                               connections.Remove (node);
-                                               OnConnectionClosed ();
-                                               continue;
-                                       }
+                               var iter = connections.First;
+                               while (iter != null) {
+                                       var cnc = iter.Value;
+                                       var node = iter;
+                                       iter = iter.Next;
 
                                        ++count;
                                        if (cnc.Busy)
@@ -205,7 +204,7 @@ namespace System.Net
                                        if (connectionsToClose == null)
                                                connectionsToClose = new List<WebConnection> ();
                                        connectionsToClose.Add (cnc.Connection);
-                                       cnc.Connection = null;
+                                       connections.Remove (node);
                                }
 
                                recycled = connections.Count == 0;
@@ -224,7 +223,10 @@ namespace System.Net
                }
 
                class ConnectionState : IWebConnectionState {
-                       public WebConnection Connection;
+                       public WebConnection Connection {
+                               get;
+                               private set;
+                       }
 
                        public WebConnectionGroup Group {
                                get;
index 25c101a7d01153c4df971951aaea1f800f2a019f..b946654f329dfbf3bb9e78bfce8161dde8730c83 100644 (file)
@@ -633,9 +633,9 @@ namespace System.Net
                {
                }
 
-               internal SimpleAsyncResult SetHeadersAsync (bool setInternalLength, SimpleAsyncCallback callback)
+               internal void SetHeadersAsync (bool setInternalLength, SimpleAsyncCallback callback)
                {
-                       return SimpleAsyncResult.Run (r => SetHeadersAsync (r, setInternalLength), callback);
+                       SimpleAsyncResult.Run (r => SetHeadersAsync (r, setInternalLength), callback);
                }
 
                bool SetHeadersAsync (SimpleAsyncResult result, bool setInternalLength)
@@ -715,7 +715,7 @@ namespace System.Net
                                        WebExceptionStatus.ServerProtocolViolation, null);
                        }
 
-                       var ret = SetHeadersAsync (true, inner => {
+                       SetHeadersAsync (true, inner => {
                                if (inner.GotException) {
                                        result.SetCompleted (inner.CompletedSynchronously, inner.Exception);
                                        return;
index efd394ef5e851dffbc0c05d85b6b7228d954e750..4dc4e0a1560032964690910ab9ac72473df08d26 100644 (file)
@@ -1,5 +1,5 @@
 // Copyright (C) 2010 Novell, Inc (http://www.novell.com)
-// Copyright 2012 Xamarin Inc.
+// Copyright 2012-2014 Xamarin Inc.
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -42,26 +42,27 @@ namespace System.Security.Cryptography.X509Certificates {
                extern static IntPtr SecCertificateCreateWithData (IntPtr allocator, IntPtr nsdataRef);
                
                [DllImport (SecurityLibrary)]
-               extern static int SecTrustCreateWithCertificates (IntPtr certOrCertArray, IntPtr policies, out IntPtr sectrustref);
+               extern static /* OSStatus */ int SecTrustCreateWithCertificates (IntPtr certOrCertArray, IntPtr policies, out IntPtr sectrustref);
                
                [DllImport (SecurityLibrary)]
-               extern static IntPtr SecPolicyCreateSSL (bool server, IntPtr cfStringHostname);
+               extern static IntPtr SecPolicyCreateSSL ([MarshalAs (UnmanagedType.I1)] bool server, IntPtr cfStringHostname);
                
                [DllImport (SecurityLibrary)]
-               extern static int SecTrustEvaluate (IntPtr secTrustRef, out SecTrustResult secTrustResultTime);
+               extern static /* OSStatus */ int SecTrustEvaluate (IntPtr secTrustRef, out SecTrustResult secTrustResultTime);
 
                [DllImport (CoreFoundationLibrary, CharSet=CharSet.Unicode)]
-               extern static IntPtr CFStringCreateWithCharacters (IntPtr allocator, string str, int count);
+               extern static IntPtr CFStringCreateWithCharacters (IntPtr allocator, string str, /* CFIndex */ IntPtr count);
 
                [DllImport (CoreFoundationLibrary)]
-               unsafe extern static IntPtr CFDataCreate (IntPtr allocator, byte *bytes, IntPtr length);
+               unsafe extern static IntPtr CFDataCreate (IntPtr allocator, byte *bytes, /* CFIndex */ IntPtr length);
 
                [DllImport (CoreFoundationLibrary)]
-               unsafe extern static void CFRelease (IntPtr handle);
+               extern static void CFRelease (IntPtr handle);
 
                [DllImport (CoreFoundationLibrary)]
-               extern static IntPtr CFArrayCreate (IntPtr allocator, IntPtr values, IntPtr numValues, IntPtr callbacks);
-               
+               extern static IntPtr CFArrayCreate (IntPtr allocator, IntPtr values, /* CFIndex */ IntPtr numValues, IntPtr callbacks);
+
+               // uint32_t
                public enum SecTrustResult {
                        Invalid,
                        Proceed,
@@ -125,7 +126,7 @@ namespace System.Security.Cryptography.X509Certificates {
                                                return SecTrustResult.Deny;
                                }
                                certArray = FromIntPtrs (secCerts);
-                               host = CFStringCreateWithCharacters (IntPtr.Zero, hostName, hostName.Length);
+                               host = CFStringCreateWithCharacters (IntPtr.Zero, hostName, (IntPtr) hostName.Length);
                                sslsecpolicy = SecPolicyCreateSSL (true, host);
 
                                int code = SecTrustCreateWithCertificates (certArray, sslsecpolicy, out sectrust);
index 701b4c534d015d7d1b9d3d543a73ecbaeda61b6b..229999df7182959f1bb4f7dc8c4e950b1028ec7f 100644 (file)
@@ -428,7 +428,19 @@ namespace System.Security.Cryptography.X509Certificates {
 
                private MX.X509Certificate ImportPkcs12 (byte[] rawData, string password)
                {
-                       MX.PKCS12 pfx = (password == null) ? new MX.PKCS12 (rawData) : new MX.PKCS12 (rawData, password);
+                       MX.PKCS12 pfx = null;
+                       if (string.IsNullOrEmpty (password)) {
+                               try {
+                                       // Support both unencrypted PKCS#12..
+                                       pfx = new MX.PKCS12 (rawData, (string)null);
+                               } catch {
+                                       // ..and PKCS#12 encrypted with an empty password
+                                       pfx = new MX.PKCS12 (rawData, string.Empty);
+                               }
+                       } else {
+                               pfx = new MX.PKCS12 (rawData, password);
+                       }
+
                        if (pfx.Certificates.Count == 0) {
                                // no certificate was found
                                return null;
index 45adf27af71cab8fbdc631893eac34ae7266b84a..e2e89448d18c80e02e9a17b116b8e040054e4541 100644 (file)
@@ -38,12 +38,15 @@ using MSX = Mono.Security.X509;
 namespace System {
 
        internal static class AndroidPlatform {
-
+               delegate int GetInterfaceAddressesDelegate (out IntPtr ifap);
+               delegate void FreeInterfaceAddressesDelegate (IntPtr ifap);
+               
 #if SECURITY_DEP
                static readonly Converter<List <byte[]>, bool> trustEvaluateSsl;
 #endif  // SECURITY_DEP
                static readonly Func<IWebProxy> getDefaultProxy;
-
+               static readonly GetInterfaceAddressesDelegate getInterfaceAddresses;
+               static readonly FreeInterfaceAddressesDelegate freeInterfaceAddresses;
 
                static AndroidPlatform ()
                {
@@ -60,6 +63,16 @@ namespace System {
                                typeof (Func<IWebProxy>), t, "GetDefaultProxy",
                                ignoreCase:false,
                                throwOnBindFailure:true);
+
+                       getInterfaceAddresses = (GetInterfaceAddressesDelegate)Delegate.CreateDelegate (
+                               typeof (GetInterfaceAddressesDelegate), t, "GetInterfaceAddresses",
+                               ignoreCase: false,
+                               throwOnBindFailure: false);
+                       
+                       freeInterfaceAddresses = (FreeInterfaceAddressesDelegate)Delegate.CreateDelegate (
+                               typeof (FreeInterfaceAddressesDelegate), t, "FreeInterfaceAddresses",
+                               ignoreCase: false,
+                               throwOnBindFailure: false);
                }
 
 #if SECURITY_DEP
@@ -76,6 +89,23 @@ namespace System {
                {
                        return getDefaultProxy ();
                }
+
+               internal static int GetInterfaceAddresses (out IntPtr ifap)
+               {
+                       ifap = IntPtr.Zero;
+                       if (getInterfaceAddresses == null)
+                               return -1;
+
+                       return getInterfaceAddresses (out ifap);
+               }
+
+               internal static void FreeInterfaceAddresses (IntPtr ifap)
+               {
+                       if (freeInterfaceAddresses == null)
+                               return;
+
+                       freeInterfaceAddresses (ifap);
+               }
        }
 }
 #endif  // MONODROID
index 33f8326b2d6e9041d793afd58945e5239378669a..fc7b97836493f36ea00a8608723d484a7c62c2f0 100644 (file)
@@ -246,6 +246,7 @@ System.Net.Sockets/TcpClientTest.cs
 System.Net.Sockets/TcpListenerTest.cs
 System.Net.Sockets/SocketTest.cs
 System.Net.Sockets/SocketAsyncEventArgsTest.cs
+System.Net.Sockets/SocketConnectAsyncTest.cs
 System.Net.Sockets/UdpClientTest.cs
 System.Net.Sockets/SocketAsyncTest.cs
 System.Net.Mail/LinkedResourceTest.cs
index 92a6253db915b6bc3d0d3643689b8ae02f134512..43faa5cc10712ab55fccc52d944734a78468a49c 100644 (file)
@@ -639,6 +639,62 @@ namespace MonoTests.System.ComponentModel
                        
                        Assert.AreEqual (1, count, "1");
                }
+
+               private class Person : INotifyPropertyChanged
+               {
+                       private string _lastName;
+                       private string _firstName;
+
+                       public string FirstName {
+                               get { return _firstName; }
+                               set {
+                                       _firstName = value;
+                                       OnPropertyChanged ("FirstName"); // string matches property name
+                               }
+                       }
+
+                       public string LastName {
+                               get { return _lastName; }
+                               set {
+                                       _lastName = value;
+                                       OnPropertyChanged ("Apepe"); // string doesn't match property name
+                               }
+                       }
+
+                       public event PropertyChangedEventHandler PropertyChanged;
+
+                       protected virtual void OnPropertyChanged (string propertyName = null)
+                       {
+                               PropertyChangedEventHandler handler = PropertyChanged;
+                               if (handler != null)
+                                       handler (this, new PropertyChangedEventArgs (propertyName));
+                       }
+               }
+
+               [Test] // https://bugzilla.xamarin.com/show_bug.cgi?id=20672
+               public void Bug20672 ()
+               {
+                       string changedPropertyName = string.Empty;
+                       bool isEventRaised = false;
+                       bool? hasPropertyDescriptor = false;
+
+                       var persons = new BindingList<Person>();
+                       persons.Add (new Person() { FirstName = "Stefaan", LastName = "de Vogelaere" });
+                       persons.Add (new Person() { FirstName = "Christophe", LastName = "De Langhe" });
+                       persons.ListChanged += (object sender, ListChangedEventArgs e) => {
+                           isEventRaised = true;
+                           hasPropertyDescriptor = e.PropertyDescriptor != null;
+                       };
+
+                       //if the OnPropertyChanged string matches a valid property name, PropertyDescriptor should be generated
+                       persons[0].FirstName = "Stefan";
+                       Assert.IsTrue (isEventRaised);
+                       Assert.IsTrue ((bool) hasPropertyDescriptor, "#1");
+
+                       //if the OnPropertyChanged string doesn't match a valid property name, no PropertyDescriptor should be generated
+                       persons[0].LastName = "de le Vulu";
+                       Assert.IsFalse ((bool) hasPropertyDescriptor, "#2");
+               }
        }
 }
 
diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs
new file mode 100644 (file)
index 0000000..99c4804
--- /dev/null
@@ -0,0 +1,133 @@
+using System;
+using System.Collections;
+using System.Threading;
+using System.Net;
+using System.Net.Sockets;
+using NUnit.Framework;
+
+namespace MonoTests.System.Net.Sockets
+{
+       [TestFixture]
+       public class SocketConnectAsyncTest
+       {
+               Socket serverSocket;
+               Socket clientSocket;
+               SocketAsyncEventArgs clientSocketAsyncArgs;
+               ManualResetEvent readyEvent;
+               ManualResetEvent mainEvent;
+               Exception error;
+
+               [TestFixtureSetUp]
+               public void SetUp ()
+               {
+                       readyEvent = new ManualResetEvent (false);
+                       mainEvent = new ManualResetEvent (false);
+               }
+
+               [TestFixtureTearDown]
+               public void TearDown ()
+               {
+                       readyEvent.Close ();
+                       mainEvent.Close ();
+               }
+
+               void StartServer()
+               {
+                       readyEvent.Reset();
+                       mainEvent.Reset();
+                       ThreadPool.QueueUserWorkItem (_ => DoWork ());
+                       readyEvent.WaitOne ();
+               }
+
+               void StopServer()
+               {
+                       if (serverSocket != null)
+                               serverSocket.Close ();
+               }
+
+               void DoWork ()
+               {
+                       serverSocket = new Socket (
+                               AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                       serverSocket.Bind (new IPEndPoint (IPAddress.Loopback, 0));
+                       serverSocket.Listen (1);
+
+                       var async = new SocketAsyncEventArgs ();
+                       async.Completed += (s,e) => OnAccepted (e);
+
+                       readyEvent.Set ();
+
+                       if (!serverSocket.AcceptAsync (async))
+                               OnAccepted (async);
+               }
+
+               void OnAccepted (SocketAsyncEventArgs e)
+               {
+                       var acceptSocket = e.AcceptSocket;
+                       mainEvent.Set ();
+               }
+
+               [Test]
+               [Category("Test")]
+               public void Connect ()
+               {
+                       StartServer();
+
+                       EndPoint serverEndpoint = serverSocket.LocalEndPoint;
+
+                       var m = new ManualResetEvent (false);
+                       var e = new SocketAsyncEventArgs ();
+
+                       clientSocket = new Socket (
+                               AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                       clientSocketAsyncArgs = new SocketAsyncEventArgs();
+                       clientSocketAsyncArgs.RemoteEndPoint = serverEndpoint;
+                       clientSocketAsyncArgs.Completed += (s,o) => {
+                               if (o.SocketError != SocketError.Success)
+                                       error = new SocketException ((int)o.SocketError);
+                               m.Set ();
+                       };
+                       bool res = clientSocket.ConnectAsync(clientSocketAsyncArgs);
+                       if (res) {
+                               if (!m.WaitOne (1500))
+                                       throw new TimeoutException ();
+                       }
+
+                       if (!mainEvent.WaitOne (1500))
+                               throw new TimeoutException ();
+                       if (error != null)
+                               throw error;
+
+                       m.Reset ();
+                       mainEvent.Reset ();
+
+                       StopServer();
+
+                       // Try again to non-listening endpoint, expect error
+
+                       error = null;
+                       clientSocket = new Socket (
+                               AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                       clientSocketAsyncArgs = new SocketAsyncEventArgs ();
+                       clientSocketAsyncArgs.RemoteEndPoint = serverEndpoint;
+                       clientSocketAsyncArgs.Completed += (s,o) => {
+                               if (o.SocketError != SocketError.Success)
+                                       error = new SocketException ((int)o.SocketError);
+                               m.Set ();
+                       };
+                       res = clientSocket.ConnectAsync (clientSocketAsyncArgs);
+                       if (res) {
+                               if (!m.WaitOne (1500))
+                                       throw new TimeoutException ();
+                       }
+
+                       Assert.IsTrue (error != null, "Connect - no error");
+                       SocketException socketException = (SocketException)error;
+                       Assert.IsTrue(socketException.ErrorCode == (int)SocketError.ConnectionRefused); 
+       
+                       m.Reset ();
+                       mainEvent.Reset ();
+               }
+
+       }
+}
\ No newline at end of file
index 0ae72b4c29ac57ce57fafde17a909f16b88df913..b6ddbf164a5e04ef05fc2d35b59923c2f82abef6 100755 (executable)
@@ -1648,7 +1648,15 @@ namespace MonoTests.System.Net.Sockets
                {
                        Socket sock = (Socket)asyncResult.AsyncState;
                        
-                       sock.EndConnect (asyncResult);
+                       try {
+                               sock.EndConnect (asyncResult);
+                       } catch (Exception e) {
+                               Console.WriteLine ("BCCallback exception:");
+                               Console.WriteLine (e);
+
+                               throw;
+                       }
+
                        BCConnected = true;
                        
                        BCCalledBack.Set ();
@@ -1783,9 +1791,22 @@ namespace MonoTests.System.Net.Sockets
                        /* Longer wait here, because the ms runtime
                         * takes a lot longer to not connect
                         */
-                       if (BCCalledBack.WaitOne (10000, false) == false) {
+                       /*
+                       if (BCCalledBack.WaitOne (30000, false) == false) {
                                Assert.Fail ("BeginConnectMultiple wait failed");
                        }
+                       */
+
+                       var sw = new global::System.Diagnostics.Stopwatch ();
+                       sw.Start ();
+
+                       BCCalledBack.WaitOne ();
+
+                       sw.Stop ();
+                       Console.WriteLine (sw.ElapsedMilliseconds);
+
+                       if (sw.ElapsedMilliseconds > 30000)
+                               Assert.Fail ("BeginConnectMultiple wait failed");
                        
                        Assert.AreEqual (true, BCConnected, "BeginConnectMultiple #1");
                        Assert.AreEqual (AddressFamily.InterNetwork, sock.RemoteEndPoint.AddressFamily, "BeginConnectMultiple #2");
index c91939192234478aca44e95dca7340697a387eba..488518c38bd2873b44812dfea5f69dad18c536be 100644 (file)
@@ -74,6 +74,13 @@ namespace MonoTests.System.Net.Sockets {
                        //Assert.AreEqual (32, client.Ttl, "#A:Ttl");
 #endif
 
+#if NET_2_0
+                       if (!Socket.OSSupportsIPv6)
+#else
+                       if (!Socket.SupportsIPv6)
+#endif
+                               Assert.Ignore ("IPv6 not enabled.");
+
                        client = new MyUdpClient (AddressFamily.InterNetworkV6);
                        s = client.Client;
                        Assert.IsNotNull (s, "#B:Client");
@@ -297,6 +304,13 @@ namespace MonoTests.System.Net.Sockets {
                                Assert.AreEqual (AddressFamily.InterNetwork, localEP.AddressFamily, "#A:Client:LocalEndPoint/AddressFamily");
                        }
 
+#if NET_2_0
+                       if (!Socket.OSSupportsIPv6)
+#else
+                       if (!Socket.SupportsIPv6)
+#endif
+                               Assert.Ignore ("IPv6 not enabled.");
+
                        using (MyUdpClient client = new MyUdpClient (IPEndPoint.MaxPort, AddressFamily.InterNetworkV6))
                        {
                                s = client.Client;
@@ -656,6 +670,13 @@ namespace MonoTests.System.Net.Sockets {
                [Test] // JoinMulticastGroup (Int32, IPAddress)
                public void JoinMulticastGroup2_Socket_Closed ()
                {
+#if NET_2_0
+                       if (!Socket.OSSupportsIPv6)
+#else
+                       if (!Socket.SupportsIPv6)
+#endif
+                               Assert.Ignore ("IPv6 not enabled.");
+
                        IPAddress mcast_addr = null;
 
                        UdpClient client = new UdpClient (new IPEndPoint (IPAddress.IPv6Any, 1234));
index abff4e15a9aaf9b117bc9d6e288ad11e1ee2cfda..f499921e47eeee0b3fc74a589ea75098a453f02a 100644 (file)
@@ -144,7 +144,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "GET / HTTP/1.1\r\n\r\n"); // No host
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 400"));
+                       StringAssert.StartsWith ("HTTP/1.1 400", response);
                }
 
                [Test]
@@ -155,7 +155,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n"); // no prefix
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 400"));
+                       StringAssert.StartsWith ("HTTP/1.1 400", response);
                }
 
                [Test]
@@ -192,7 +192,7 @@ namespace MonoTests.System.Net {
                                string response = Receive (ns, 512);
                                ns.Close ();
                                listener.Close ();
-                               Assert.AreEqual (true, response.StartsWith ("HTTP/1.1 400"), String.Format ("Failed on {0}", (int) b));
+                               StringAssert.StartsWith ("HTTP/1.1 400", response, String.Format ("Failed on {0}", (int) b));
                        }
                }
 
@@ -204,7 +204,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "POST /test4/ HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n"); // length required
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 411"));
+                       StringAssert.StartsWith ("HTTP/1.1 411", response);
                }
 
                [Test]
@@ -215,7 +215,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nTransfer-Encoding: pepe\r\n\r\n"); // not implemented
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 501"));
+                       StringAssert.StartsWith ("HTTP/1.1 501", response);
                }
 
                [Test]
@@ -227,7 +227,7 @@ namespace MonoTests.System.Net {
                        Send (ns, "POST /test6/ HTTP/1.1\r\nHost: 127.0.0.1\r\nTransfer-Encoding: identity\r\n\r\n");
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 501"));
+                       StringAssert.StartsWith ("HTTP/1.1 501", response);
                }
 
                [Test]
@@ -241,8 +241,8 @@ namespace MonoTests.System.Net {
                        ctx.Response.Close ();
                        string response = Receive (ns, 1024);
                        ns.Close ();
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 200"));
-                       Assert.IsTrue (-1 != response.IndexOf ("Transfer-Encoding: chunked"));
+                       StringAssert.StartsWith ("HTTP/1.1 200", response);
+                       StringAssert.Contains ("Transfer-Encoding: chunked", response);
                }
 
                [Test]
@@ -257,7 +257,7 @@ namespace MonoTests.System.Net {
                        ctx.Response.Close ();
                        string response = Receive (ns, 512);
                        ns.Close ();
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 200"));
+                       StringAssert.StartsWith ("HTTP/1.1 200", response);
                        Assert.IsTrue (-1 == response.IndexOf ("Transfer-Encoding: chunked"));
                }
 
@@ -272,7 +272,7 @@ namespace MonoTests.System.Net {
                        string response = ReceiveWithTimeout (ns, 512, 1000, out timeout);
                        ns.Close ();
                        Assert.IsFalse (timeout);
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 411"));
+                       StringAssert.StartsWith ("HTTP/1.1 411", response);
                }
 
                [Test]
@@ -287,7 +287,7 @@ namespace MonoTests.System.Net {
                        string response = ReceiveWithTimeout (ns, 512, 1000, out timeout);
                        ns.Close ();
                        Assert.IsFalse (timeout);
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 411"));
+                       StringAssert.StartsWith ("HTTP/1.1 411", response);
                }
 
                [Test]
@@ -300,7 +300,7 @@ namespace MonoTests.System.Net {
                        ns.GetSocket ().Shutdown (SocketShutdown.Send);
                        string input = Receive (ns, 512);
                        ns.Close ();
-                       Assert.IsTrue (input.StartsWith ("HTTP/1.1 400"));
+                       StringAssert.StartsWith ("HTTP/1.1 400", input);
                }
 
                [Test]
@@ -313,7 +313,7 @@ namespace MonoTests.System.Net {
                        ns.GetSocket ().Shutdown (SocketShutdown.Send);
                        string input = Receive (ns, 512);
                        ns.Close ();
-                       Assert.IsTrue (input.StartsWith ("HTTP/1.1 400"));
+                       StringAssert.StartsWith ("HTTP/1.1 400", input);
                }
 
                [Test]
@@ -326,7 +326,7 @@ namespace MonoTests.System.Net {
                        ns.GetSocket ().Shutdown (SocketShutdown.Send);
                        string input = Receive (ns, 512);
                        ns.Close ();
-                       Assert.IsTrue (input.StartsWith ("HTTP/1.1 400"));
+                       StringAssert.StartsWith ("HTTP/1.1 400", input);
                }
 
                HttpListenerRequest test14_request;
@@ -418,8 +418,8 @@ namespace MonoTests.System.Net {
                        ctx.Response.Close ();
                        string response = Receive (ns, 1024);
                        ns.Close ();
-                       Assert.IsTrue (response.StartsWith ("HTTP/1.1 200"));
-                       Assert.IsTrue (-1 != response.IndexOf ("Transfer-Encoding: chunked"));
+                       StringAssert.StartsWith ("HTTP/1.1 200", response);
+                       StringAssert.Contains ("Transfer-Encoding: chunked", response);
                }
 
                [Test]
@@ -723,11 +723,11 @@ namespace MonoTests.System.Net {
                public void ClosePort ()
                {
                        var h = new HttpListener ();
-                       h.Prefixes.Add ("http://127.0.0.1:8080/");
+                       h.Prefixes.Add ("http://127.0.0.1:30158/");
                        h.Start ();
                        h.BeginGetContext (null, null);
                        h.Stop ();
-                       TcpListener t = new TcpListener (IPAddress.Parse ("127.0.0.1"), 8080);
+                       TcpListener t = new TcpListener (IPAddress.Parse ("127.0.0.1"), 30158);
                        t.Start ();
                        t.Stop ();
                }
index f0826d1c9902938fe975f2a12554f06926ef5876..ccf2484dfdddf2db7e554b5b4176c004fc9f9a94 100644 (file)
@@ -1472,7 +1472,7 @@ namespace MonoTests.System.Net
                        }
                }
 
-               void TestTimeOut (string url)
+               void TestTimeOut (string url, WebExceptionStatus expectedExceptionStatus)
                {
                        var timeoutWorker = new TimeoutTestHelper (url, three_seconds_in_milliseconds);
                        var threadStart = new ThreadStart (timeoutWorker.LaunchWebRequest);
@@ -1492,15 +1492,14 @@ namespace MonoTests.System.Net
                                Assert.Fail ("Should not be reached, timeout exception was not thrown and webrequest managed to retrieve an incorrect body: " + timeoutWorker.Body);
                        }
 
-                       Assert.IsNotNull (timeoutWorker.Exception,
-                                         "Timeout exception was not thrown");
+                       Assert.IsNotNull (timeoutWorker.Exception, "Exception was not thrown");
 
                        var webEx = timeoutWorker.Exception as WebException;
                        Assert.IsNotNull (webEx, "Exception thrown should be WebException, but was: " +
                                          timeoutWorker.Exception.GetType ().FullName);
 
-                       Assert.AreEqual (webEx.Status, WebExceptionStatus.Timeout,
-                                        "WebException was thrown, but with a wrong status (should be timeout): " + webEx.Status);
+                       Assert.AreEqual (expectedExceptionStatus, webEx.Status,
+                                        "WebException was thrown, but with a wrong status (should be " + expectedExceptionStatus + "): " + webEx.Status);
 
                        Assert.IsFalse (timeoutWorker.End > (timeoutWorker.Start + TimeSpan.FromMilliseconds (three_seconds_in_milliseconds + 500)),
                                        "Timeout exception should have been thrown shortly after timeout is reached, however it was at least half-second late");
@@ -1516,18 +1515,19 @@ namespace MonoTests.System.Net
                        {
                                responder.Start ();
 
-                               TestTimeOut (url);
+                               TestTimeOut (url, WebExceptionStatus.Timeout);
 
                                responder.Stop ();
                        }
                }
 
                [Test] // 2nd possible case of https://bugzilla.novell.com/show_bug.cgi?id=MONO74177
-               public void TestTimeoutPropertyWithServerThatDoesntExist ()
+               public void TestTimeoutWithEndpointThatDoesntExistThrowsConnectFailureBeforeTimeout ()
                {
-                       string url = "http://10.128.200.100:8271/"; // some endpoint that is unlikely to exist
+                       string url = "http://127.0.0.1:8271/"; // some endpoint that is unlikely to exist
 
-                       TestTimeOut (url);
+                       // connecting to a non-existing endpoint should throw a ConnectFailure before the timeout is reached
+                       TestTimeOut (url, WebExceptionStatus.ConnectFailure);
                }
 
                const string response_of_timeout_handler = "RESPONSE_OF_TIMEOUT_HANDLER";
@@ -2319,7 +2319,7 @@ namespace MonoTests.System.Net
 
                void DoRequest (Action<HttpWebRequest, EventWaitHandle> request)
                {
-                       int port = rand.Next (20000, 65535);
+                       int port = 30158;
 
                        ManualResetEvent completed = new ManualResetEvent (false);
                        Uri address = new Uri (string.Format ("http://localhost:{0}", port));
@@ -2333,7 +2333,7 @@ namespace MonoTests.System.Net
 
                void DoRequest (Action<HttpWebRequest, EventWaitHandle> request, Action<HttpListenerContext> processor)
                {
-                       int port = rand.Next (20000, 65535);
+                       int port = 30158;
 
                        ManualResetEvent [] completed = new ManualResetEvent [2];
                        completed [0] = new ManualResetEvent (false);
index 3505926f41074e31c559b69c2187940f9fd475ef..48722d45510fd03642ce0aad7ff725e25529587c 100644 (file)
@@ -2156,5 +2156,97 @@ namespace MonoTests.System.Net
                        // and return the same instance as WebRequest.DefaultWebProxy
                        Assert.AreSame (wc.Proxy, WebRequest.DefaultWebProxy);
                }
+                
+#if NET_4_5
+               [Test]
+               public void UploadStringAsyncCancelEvent ()
+               {
+                       UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
+                       {
+
+                               webClient.UploadStringCompleted += (sender, args) =>
+                               {
+                                       if (args.Cancelled)
+                                               cancelEvent.Set ();
+                               };
+
+                               webClient.UploadStringAsync (uri, "PUT", "text");
+                       });
+               }
+
+               [Test]
+               public void UploadDataAsyncCancelEvent ()
+               {
+                       UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
+                       {
+                               webClient.UploadDataCompleted += (sender, args) =>
+                               {
+                                       if (args.Cancelled)
+                                               cancelEvent.Set ();
+                               };
+
+                               webClient.UploadDataAsync (uri, "PUT", new byte[] { });
+                       });
+               }
+               
+               [Test]
+               public void UploadValuesAsyncCancelEvent ()
+               {
+                       UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
+                       {
+                               webClient.UploadValuesCompleted += (sender, args) =>
+                               {
+                                       if (args.Cancelled)
+                                               cancelEvent.Set ();
+                               };
+
+                               webClient.UploadValuesAsync (uri, "PUT", new NameValueCollection ());
+                       });
+               }
+
+               [Test]
+               public void UploadFileAsyncCancelEvent ()
+               {
+                       UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
+                       {
+                               string tempFile = Path.Combine (_tempFolder, "upload.tmp");
+                               File.Create (tempFile).Close ();
+
+                               webClient.UploadFileCompleted += (sender, args) =>
+                               {
+                                       if (args.Cancelled)
+                                               cancelEvent.Set ();
+                               };
+
+                               webClient.UploadFileAsync (uri, "PUT", tempFile);
+                       });
+               }
+#endif
+
+#if NET_4_0
+               public void UploadAsyncCancelEventTest (Action<WebClient, Uri, EventWaitHandle> uploadAction)
+               {
+                       var ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       string url = "http://" + IPAddress.Loopback + ":8000/test/";
+
+                       using (var responder = new SocketResponder (ep, EchoRequestHandler))
+                       {
+                               responder.Start ();
+
+                               var webClient = new WebClient ();
+
+                               var cancellationTokenSource = new CancellationTokenSource ();
+                               cancellationTokenSource.Token.Register (webClient.CancelAsync);
+
+                               var cancelEvent = new ManualResetEvent (false);
+
+                               uploadAction.Invoke (webClient, new Uri (url), cancelEvent);
+
+                               cancellationTokenSource.Cancel ();
+
+                               Assert.IsTrue (cancelEvent.WaitOne (1000));
+                       }
+               }
+#endif
        }
 }
index 19a7c19f82126a787143c28fdb89daf1b66116bb..9fceaca05cac364bf580c8b503efd8b7f5465e22 100644 (file)
@@ -286,6 +286,23 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates {
                        0x89, 0x53, 0xBD, 0x10, 0xAA, 0x1E, 0xC6, 0x41, 0x7C, 0x71, 0xCA, 0x47, 0x79, 0x60, 0x95, 0x2E, 0xAB, 0xF6, 0x17, 0xBE, 0x1D, 0xF1, 0x05, 0xAD, 0x76, 0xD8, 0xBB, 0xF2, 0xBB, 0x36, 0xEE, 0xCD, 0xAA, 0xBC, 0xBA, 0xBE, 0x94, 0x42, 0x9A, 0xA8, 0xEE, 0xE5, 0x93, 0x5C, 0x3C, 0x23, 0xE2, 0x75, 0xD3, 0x59, 0xB4, 0xB3, 0xC4, 0x01, 0xBB, 0xC9, 0x05, 0xFE, 0xFA, 0x1B, 0x31, 0x7A, 0x15, 0x29, 0x91, 0xE6, 0xB9, 0xB2, 0x1E, 0xF9, 0x36, 0xC5, 0x17, 0xB9, 0x9D, 0x32, 0x0D, 0x0D, 0x80, 0x4A, 0x0D, 0x14, 0xB4, 0xDF, 0x89, 0x3A, 0x4B, 0xCA, 0x4B, 0xDE, 0xF8, 0xC0, 0x1B, 0xA6, 0x6D, 0xD9, 0x19, 0xFB, 0x0E, 0x02, 
                        0x22, 0x82, 0x8E, 0x25, 0x8E, 0x9F, 0xD5, 0x7B, 0xB6, 0x14, 0x15, 0x08, 0x61, 0xCD, 0xA6, 0xB3, 0x0F, 0xC8, 0xE8, 0xF9, 0xEE, 0xDB, 0xAF, 0x25, 0x40, 0x01, 0x85, 0x0E, 0x89, 0x0D, 0x0D, 0x85, 0xA6, 0xA3, 0xC9, 0x65, 0x64, 0x8A, 0xD1, 0xF7, 0x55, 0xF9, 0x31, 0x24, 0x41, 0x30, 0x3B, 0x30, 0x1F, 0x30, 0x07, 0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x04, 0x14, 0xD4, 0x77, 0x3F, 0x92, 0xB6, 0xA6, 0x1B, 0xD5, 0x7F, 0xC1, 0x1B, 0x93, 0xB3, 0x6E, 0x87, 0x67, 0x80, 0xE7, 0x4C, 0x7C, 0x04, 0x14, 0x58, 0x4C, 0x92, 0xDD, 0x0B, 0xEF, 0x09, 0x35, 0xE0, 0x06, 0x33, 0x54, 0xB2, 0xA8, 0x8E, 0x0C, 0x60, 0x67, 
                        0xB5, 0x0F, 0x02, 0x02, 0x07, 0xD0 };
+                       
+               public static byte[] openssl_emptypwd_pfx = { 0x30, 0x82, 0x06, 0x19, 0x02, 0x01, 0x03, 0x30, 0x82, 0x05, 0xDF, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x01, 0xA0, 0x82, 0x05, 0xD0, 0x04, 0x82, 0x05, 0xCC, 0x30, 0x82, 0x05, 0xC8, 0x30, 0x82, 0x02, 0xC7, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x06, 0xA0, 0x82, 0x02, 0xB8, 0x30, 0x82, 0x02, 0xB4, 0x02, 0x01, 0x00, 0x30, 0x82, 0x02, 0xAD, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x01, 0x30, 0x1C, 0x06, 0x0A, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x0C, 0x01, 0x06, 0x30, 0x0E, 0x04, 0x08, 0xE4, 0x0A, 0x2F, 0x48, 0xE6, 0x07, 0x62, 
+                       0x5D, 0x02, 0x02, 0x08, 0x00, 0x80, 0x82, 0x02, 0x80, 0x35, 0x6F, 0x44, 0xFA, 0xA8, 0x0D, 0x41, 0xBA, 0x1A, 0xAE, 0xB1, 0xFB, 0xA4, 0xBB, 0x91, 0x28, 0x75, 0x19, 0xF8, 0x1C, 0x0E, 0xB4, 0xCE, 0x2A, 0x5C, 0x28, 0x2E, 0x34, 0x6F, 0x9B, 0x5F, 0x94, 0x16, 0x33, 0xE0, 0x36, 0x50, 0x5D, 0x47, 0x74, 0x42, 0x4E, 0xCC, 0xA0, 0x7F, 0x8C, 0x32, 0x26, 0x7A, 0x5F, 0x24, 0xB1, 0xEB, 0xD8, 0x2C, 0xE3, 0x6D, 0xC2, 0x3C, 0xBC, 0x3B, 0x0A, 0x78, 0x39, 0x88, 0x24, 0x9E, 0x94, 0x15, 0xC3, 0x43, 0xE0, 0x25, 0x31, 0x3F, 0xB0, 0xDA, 0xF8, 0x4E, 0x37, 0x56, 0xD4, 0xAE, 0x75, 0x28, 0x30, 0x67, 0x5F, 0xBF, 0xF9, 0x7D, 
+                       0xDC, 0xF6, 0x1A, 0x02, 0xF0, 0x65, 0xBF, 0x0A, 0x4D, 0x39, 0x16, 0xC7, 0x57, 0x9A, 0xA1, 0x7C, 0xF0, 0x4B, 0xDD, 0x0E, 0xAF, 0x4E, 0xA9, 0xC8, 0x85, 0x89, 0xCB, 0xB8, 0xD3, 0x96, 0x5F, 0x0C, 0xCB, 0x85, 0xBD, 0xEB, 0x11, 0x00, 0x3B, 0x34, 0xB6, 0x6B, 0xCE, 0x32, 0x75, 0x09, 0x8C, 0x09, 0x3B, 0x13, 0x9D, 0x9F, 0xC1, 0x72, 0x8F, 0xC5, 0x9E, 0x90, 0x89, 0x7C, 0x3A, 0x64, 0xC2, 0x27, 0xD5, 0xF5, 0x6B, 0x23, 0x2C, 0x32, 0xEF, 0xB4, 0x2C, 0x09, 0x0F, 0x65, 0xF4, 0xE4, 0xDC, 0xC3, 0x1F, 0x00, 0xF4, 0x77, 0xB0, 0x3B, 0x08, 0xA5, 0x59, 0xFA, 0x50, 0xAF, 0x9D, 0x9D, 0x22, 0x80, 0xC6, 0x6E, 0xF8, 0xA7, 
+                       0xB7, 0x03, 0x2A, 0x64, 0x37, 0x9C, 0xFB, 0x0D, 0x9D, 0xEF, 0xEC, 0x81, 0xDD, 0xEE, 0x17, 0xA9, 0x8D, 0xA1, 0x9D, 0x06, 0x0F, 0x51, 0x1E, 0x21, 0xF6, 0xEB, 0x10, 0x20, 0x99, 0xE6, 0x8D, 0x23, 0xDC, 0x27, 0xD5, 0xF5, 0xAF, 0x02, 0x07, 0xBE, 0x85, 0x7E, 0x11, 0x5D, 0x87, 0xEB, 0x49, 0xCA, 0xA1, 0xDB, 0x10, 0xB6, 0x18, 0x7C, 0x52, 0x07, 0x08, 0x99, 0xAF, 0x37, 0x15, 0x0E, 0x72, 0xB4, 0x0A, 0x5B, 0x88, 0x70, 0xCF, 0x24, 0xF4, 0xB3, 0x38, 0x99, 0x21, 0x2E, 0xB2, 0x98, 0x79, 0x28, 0x2E, 0x23, 0x1F, 0x9A, 0x20, 0xA7, 0x62, 0xC4, 0x31, 0x82, 0x35, 0x59, 0xFD, 0xAB, 0x7F, 0xE6, 0x6C, 0x9A, 0xE6, 0x4D, 
+                       0x3E, 0xE3, 0xA7, 0x3E, 0xAE, 0x6F, 0xCA, 0xD2, 0x3A, 0x9B, 0x31, 0x1B, 0x96, 0xA9, 0x25, 0xB5, 0x25, 0x47, 0x57, 0xCF, 0x7C, 0x5F, 0x1E, 0x5C, 0x38, 0xB9, 0x24, 0xB2, 0xA5, 0x50, 0xB1, 0x3F, 0xAC, 0x3C, 0x77, 0x53, 0xC7, 0xC8, 0x3B, 0x95, 0xD4, 0x37, 0x30, 0x6E, 0xE6, 0x39, 0x2E, 0x53, 0x09, 0x30, 0x9B, 0x35, 0x1C, 0x74, 0x31, 0x46, 0x67, 0xC5, 0x6E, 0x4D, 0x35, 0x8F, 0x61, 0xC5, 0xA4, 0xD4, 0xBA, 0xE1, 0x47, 0xC7, 0x1D, 0x94, 0x75, 0x6B, 0xFA, 0xAE, 0x2E, 0xDC, 0xB4, 0xA7, 0x64, 0xFA, 0x14, 0x68, 0x14, 0xA0, 0x81, 0x96, 0xD9, 0xC0, 0x2A, 0xFD, 0xEE, 0x78, 0xFE, 0xB6, 0x38, 0xC9, 0x1B, 0xF7, 
+                       0x05, 0xC1, 0x4C, 0xF1, 0x21, 0x53, 0x62, 0x17, 0xED, 0x1D, 0xF7, 0x34, 0x92, 0xD4, 0xDD, 0xD7, 0xF0, 0xA7, 0x90, 0x34, 0xBE, 0x26, 0x86, 0x26, 0x67, 0x3B, 0x40, 0xC6, 0x4C, 0x6A, 0x26, 0xD9, 0x2A, 0x4E, 0x58, 0xEF, 0x86, 0x80, 0x8B, 0x6D, 0x40, 0xCD, 0x40, 0xFD, 0x7B, 0xD9, 0x1C, 0xC4, 0x24, 0x94, 0x4A, 0xFB, 0xFC, 0xB9, 0xF8, 0xE6, 0x95, 0x82, 0x0D, 0x02, 0xE3, 0x53, 0xC9, 0x28, 0xBD, 0x60, 0x65, 0x76, 0x0F, 0xF0, 0xFE, 0x23, 0xF6, 0x8A, 0xB6, 0xB3, 0xD4, 0x51, 0xC2, 0xE5, 0xB4, 0x3A, 0x10, 0x0D, 0x25, 0x7C, 0xC9, 0xCC, 0x11, 0x45, 0x7C, 0xC0, 0x1F, 0x82, 0x52, 0xCA, 0xE8, 0x25, 0x53, 0xCE, 
+                       0x92, 0x67, 0xEC, 0xA2, 0x04, 0xE1, 0x58, 0x7B, 0xE6, 0xF2, 0xA2, 0x5D, 0x74, 0x46, 0xD5, 0x9A, 0x6F, 0x70, 0x60, 0xC4, 0x99, 0xB2, 0x29, 0xF9, 0x60, 0x19, 0x89, 0x37, 0xB3, 0xE5, 0x97, 0xCD, 0x9E, 0xD4, 0x53, 0x0B, 0xD6, 0xB5, 0xC6, 0xFA, 0x8D, 0x0F, 0x96, 0x65, 0x78, 0xE9, 0xC0, 0x84, 0x38, 0x26, 0xD9, 0xA5, 0x27, 0x62, 0xFC, 0x2A, 0x79, 0xCF, 0x7F, 0xC9, 0xFC, 0xBC, 0x41, 0x29, 0x9C, 0xD8, 0x3B, 0x37, 0x54, 0xA0, 0x39, 0x78, 0x21, 0x3A, 0x9C, 0x51, 0xE0, 0x30, 0x18, 0xA4, 0x56, 0x61, 0x13, 0x9C, 0x1C, 0x01, 0x35, 0x96, 0x19, 0x4B, 0xAF, 0xD0, 0xFE, 0x95, 0xF1, 0xC1, 0xBB, 0x6A, 0xBC, 0x2C, 
+                       0x39, 0x21, 0x38, 0xB4, 0xB9, 0x10, 0x27, 0xD6, 0x04, 0xC5, 0xE4, 0xC3, 0x2C, 0xB8, 0x0B, 0xEC, 0xB3, 0x28, 0x32, 0x50, 0x02, 0x4E, 0xE4, 0xE9, 0x11, 0x4C, 0x38, 0x87, 0x3D, 0x7F, 0x54, 0xA2, 0x1D, 0xFF, 0x4B, 0x07, 0x0A, 0xE7, 0x42, 0x08, 0x48, 0x54, 0x3C, 0x7B, 0xE4, 0xF4, 0x2D, 0x98, 0x16, 0x30, 0x82, 0x02, 0xF9, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x01, 0xA0, 0x82, 0x02, 0xEA, 0x04, 0x82, 0x02, 0xE6, 0x30, 0x82, 0x02, 0xE2, 0x30, 0x82, 0x02, 0xDE, 0x06, 0x0B, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x0C, 0x0A, 0x01, 0x02, 0xA0, 0x82, 0x02, 0xA6, 0x30, 0x82, 0x02, 
+                       0xA2, 0x30, 0x1C, 0x06, 0x0A, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x0C, 0x01, 0x03, 0x30, 0x0E, 0x04, 0x08, 0x8C, 0xA8, 0xAE, 0x70, 0xEB, 0x90, 0xF9, 0xB7, 0x02, 0x02, 0x08, 0x00, 0x04, 0x82, 0x02, 0x80, 0xA7, 0x49, 0x1D, 0x10, 0xDD, 0x5C, 0xE8, 0xD5, 0x2F, 0x55, 0xAB, 0x62, 0x21, 0x13, 0x64, 0x32, 0xA8, 0xED, 0xFF, 0x8A, 0xE2, 0x5F, 0xCE, 0x74, 0x89, 0x1C, 0x9F, 0x73, 0x02, 0x99, 0x85, 0xE4, 0xF8, 0x21, 0xE1, 0xAA, 0x64, 0x72, 0x95, 0xEC, 0xA0, 0x2E, 0xA9, 0x90, 0x35, 0x51, 0x82, 0x9B, 0x28, 0xDC, 0x0C, 0x47, 0xCD, 0x5C, 0x08, 0x0C, 0x49, 0x8D, 0x06, 0x70, 0x97, 0xF5, 0x4C, 0x48, 0x43, 
+                       0xDC, 0x84, 0xC4, 0x6C, 0x4F, 0x55, 0xD9, 0x86, 0x16, 0x39, 0x31, 0x22, 0x0C, 0x12, 0x55, 0x76, 0x0E, 0xBC, 0x57, 0x66, 0x0D, 0xB3, 0xC0, 0xAB, 0x87, 0x6B, 0x85, 0x20, 0x4D, 0x69, 0x57, 0xAF, 0x44, 0xAB, 0x76, 0x15, 0xA7, 0xAA, 0x07, 0xA9, 0xD8, 0x82, 0x4C, 0x79, 0xA5, 0x62, 0x6D, 0x2E, 0x6C, 0x99, 0xE6, 0xE8, 0x6E, 0xD0, 0x12, 0x85, 0x98, 0x63, 0xEA, 0xC7, 0x07, 0x8C, 0x4B, 0xEB, 0x46, 0x2A, 0xE0, 0x94, 0xAA, 0x0C, 0x19, 0xFA, 0xD6, 0x93, 0x80, 0x7B, 0x20, 0x74, 0x1D, 0xB8, 0xB9, 0x76, 0xEB, 0x93, 0x9A, 0x32, 0x76, 0xA4, 0x93, 0x13, 0x54, 0x71, 0x23, 0xBC, 0x93, 0x26, 0x32, 0x11, 0x4F, 0xFB, 
+                       0x61, 0xD1, 0xD7, 0x15, 0x2F, 0x6F, 0x8C, 0xF9, 0x42, 0x0F, 0xE4, 0x24, 0x20, 0xA8, 0x22, 0x0C, 0x04, 0xFB, 0x1A, 0xB6, 0xF8, 0x89, 0xF7, 0x89, 0xF5, 0xD7, 0x46, 0xB6, 0x7C, 0xE0, 0x72, 0x22, 0x53, 0xD3, 0x23, 0x27, 0x98, 0xCC, 0x8E, 0xF8, 0xA8, 0x58, 0xC7, 0x36, 0x69, 0x0D, 0xF2, 0x20, 0x84, 0x83, 0x2D, 0x7A, 0xA9, 0xA5, 0x8D, 0x41, 0x62, 0xA6, 0x99, 0xAE, 0xBC, 0x92, 0xB0, 0x7B, 0xF6, 0x9A, 0x84, 0x37, 0x2B, 0x16, 0x9A, 0xD7, 0x46, 0x97, 0xB8, 0x72, 0x1B, 0xCC, 0x9F, 0xE7, 0xDD, 0x54, 0x83, 0x33, 0x42, 0xE5, 0x55, 0xEA, 0xC1, 0xC0, 0x00, 0xDE, 0xE8, 0x13, 0xB4, 0x7B, 0x9F, 0x0D, 0xAD, 0xF4, 
+                       0xB9, 0xA8, 0xEA, 0x54, 0xDF, 0x44, 0xF1, 0x67, 0xB7, 0x32, 0x0F, 0x84, 0x39, 0xEF, 0x75, 0xE2, 0xBC, 0x21, 0xA3, 0x71, 0x2E, 0xC3, 0x36, 0xE9, 0x9F, 0x2C, 0x6F, 0x35, 0x94, 0x2B, 0x51, 0x9A, 0xB3, 0xA7, 0xDD, 0xA1, 0x02, 0xF9, 0x14, 0x74, 0x58, 0x36, 0x7C, 0x86, 0x5E, 0xD1, 0xAE, 0x77, 0xA7, 0x3E, 0x38, 0x93, 0xB4, 0x50, 0x5F, 0x1E, 0x35, 0xC7, 0x77, 0xA9, 0x24, 0x28, 0xD2, 0xED, 0x9F, 0x8A, 0x67, 0xB6, 0x94, 0x8C, 0xF5, 0x69, 0x19, 0x1B, 0x3C, 0xAA, 0x39, 0x5D, 0x40, 0x6A, 0x33, 0x5A, 0xDA, 0x69, 0x24, 0x59, 0x99, 0x04, 0x90, 0x3E, 0xB3, 0xDE, 0xDC, 0xCB, 0x59, 0x35, 0xEF, 0x1B, 0xC1, 0x68, 
+                       0xCD, 0x20, 0x0E, 0x22, 0x94, 0xB7, 0xFC, 0x5B, 0xC0, 0x17, 0x38, 0x3E, 0xB5, 0x9C, 0xBA, 0x78, 0x94, 0xB2, 0x10, 0x05, 0x21, 0x30, 0x4B, 0x2F, 0x8B, 0xF1, 0x8D, 0xFC, 0x2A, 0xBF, 0x89, 0x4E, 0xE1, 0xF9, 0xBF, 0x3C, 0xCF, 0xAA, 0xB1, 0xEC, 0x39, 0x59, 0x9A, 0xE9, 0x07, 0xE1, 0xA0, 0xAA, 0x91, 0x7C, 0x09, 0xF1, 0xD5, 0xD9, 0xA3, 0xF1, 0x0E, 0xD2, 0xBD, 0xE8, 0x65, 0x83, 0xDB, 0xE4, 0x03, 0xFA, 0x19, 0x56, 0x00, 0x3F, 0x3E, 0x94, 0x03, 0xAD, 0x4D, 0x00, 0x7C, 0x47, 0x2C, 0x88, 0x88, 0x53, 0x7C, 0xF2, 0x7B, 0x2A, 0x5A, 0xCB, 0x44, 0x93, 0x4F, 0xDA, 0xE3, 0x2E, 0xC3, 0x1F, 0x4E, 0x14, 0x52, 0x1B, 
+                       0x33, 0x5F, 0xB7, 0xCD, 0x1D, 0xB1, 0xDE, 0xFE, 0xE8, 0xCF, 0xC2, 0xEE, 0xEB, 0xA6, 0x79, 0xF5, 0x0C, 0x21, 0x71, 0x95, 0xE1, 0x52, 0xBF, 0x76, 0xD5, 0x35, 0x43, 0x0E, 0xB6, 0x9B, 0x36, 0x34, 0x4E, 0x07, 0xF9, 0x29, 0x34, 0x44, 0x52, 0x15, 0xCC, 0x71, 0x5C, 0x5F, 0x89, 0x32, 0x32, 0x5B, 0x76, 0x8E, 0x08, 0x55, 0x46, 0xD5, 0x4A, 0x78, 0xEB, 0xB2, 0x9A, 0x39, 0xF9, 0xE6, 0xD7, 0x54, 0xE8, 0x59, 0x85, 0x09, 0x2B, 0xE8, 0x2D, 0x5E, 0x7F, 0x09, 0x8F, 0xA2, 0x65, 0x82, 0x54, 0x93, 0x17, 0x56, 0x51, 0x4F, 0x93, 0x2F, 0x92, 0x47, 0x3C, 0x7A, 0x2D, 0x45, 0x45, 0x67, 0x03, 0x02, 0x0C, 0x0B, 0xA4, 0x2A, 
+                       0x25, 0x22, 0x2F, 0x8E, 0x87, 0x04, 0x78, 0x12, 0x5C, 0x80, 0x1E, 0xF9, 0x0D, 0xC1, 0x5B, 0x06, 0x4D, 0x43, 0x1D, 0x13, 0x6C, 0xDB, 0x3D, 0xD2, 0x1C, 0x94, 0xA3, 0xBB, 0x62, 0xEB, 0x4F, 0x78, 0xC9, 0x43, 0x5E, 0x5F, 0x84, 0xCB, 0xE8, 0x31, 0x5F, 0xE9, 0xB7, 0xA9, 0xEA, 0x4A, 0xF2, 0xAB, 0x1E, 0x37, 0x7C, 0xAF, 0xE4, 0xF0, 0x4E, 0x3F, 0x6A, 0xA9, 0x04, 0xAB, 0x20, 0x44, 0xFD, 0x81, 0x47, 0x9F, 0x86, 0xF3, 0x59, 0xA5, 0x2A, 0x3D, 0x60, 0xB1, 0xF7, 0x31, 0x25, 0x30, 0x23, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x15, 0x31, 0x16, 0x04, 0x14, 0x30, 0x29, 0x69, 0x4B, 0x22, 0xB2, 
+                       0xEE, 0x6A, 0xEC, 0x9B, 0x78, 0x44, 0x9E, 0x51, 0x0F, 0x7C, 0x34, 0x8D, 0xBA, 0x33, 0x30, 0x31, 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14, 0xC7, 0xDD, 0xD6, 0xA5, 0xC4, 0x14, 0xB6, 0x24, 0xF9, 0x03, 0xB9, 0xB6, 0xA3, 0x5A, 0x4A, 0x09, 0x51, 0x18, 0x5A, 0x19, 0x04, 0x08, 0x35, 0xB5, 0x1D, 0xC3, 0x17, 0x45, 0x8B, 0x92, 0x02, 0x02, 0x08, 0x00 };
 
                public const string base64_cert = @"-----BEGIN CERTIFICATE-----
 MIIBxTCCATKgAwIBAgIQx3WuSFObHp5EgBXKeBVHaTAJBgUrDgMCHQUAMCUxIzAh
@@ -1252,6 +1269,12 @@ WYpnKQqsKIzlSqv9wwXs7B1iA7ZdvHk3TAnSnLP1o2H7ME05UnZPKCvraONdezon
                        CheckPkcs12 (new X509Certificate2 (farscape_strong_path_pfx, "farscape"));
                }
 
+               [Test]
+               public void Pkcs12_6_Properties ()
+               {
+                       CheckPkcs12 (new X509Certificate2 (openssl_emptypwd_pfx));
+               }
+
                private void CheckBase64 (X509Certificate2 x)
                {
                        // note: the raw data is still the DER encoded ASN.1 (not the base64 string)
index dad8c60651c7440f725e5357bd8ee66e1d7e28ee..4757d762f807ab9f1127c9d895dc4317f1e40a9d 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Web/System.Web-net_4_5.csproj">\r
       <Project>{B489C3DE-3ED3-4EDC-B42B-82B38E101857}</Project>\r
-      <Name>System.Web\System.Web-net_4_5</Name>\r
+      <Name>System.Web-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 8c652ad6245b924feafecb9be8ade582b8e593ea..211e9cd6824475b600515683d8a9c433e68f009c 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Data/System.Data-net_4_5.csproj">\r
       <Project>{9A33954F-57A8-4D75-B1D8-0F81808A0DD4}</Project>\r
-      <Name>System.Data\System.Data-net_4_5</Name>\r
+      <Name>System.Data-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 8e02384f58f00960e473c9c83bf7b90d76f5301b..d6586ab4d5e18d7b349e5e0e04a99fa9d29e7805 100644 (file)
@@ -165,7 +165,7 @@ namespace System.IO.Packaging {
                                if (node.Attributes["TargetMode"] != null)
                                        mode = (TargetMode) Enum.Parse (typeof(TargetMode), node.Attributes ["TargetMode"].Value);
                                
-                               CreateRelationship (new Uri (node.Attributes["Target"].Value.ToString(), UriKind.Relative),
+                               CreateRelationship (new Uri (node.Attributes["Target"].Value.ToString(), UriKind.RelativeOrAbsolute),
                                                    mode,
                                                    node.Attributes["Type"].Value.ToString (),
                                                    node.Attributes["Id"].Value.ToString (),
index a0f2aa67669d8d96794a391ade8c2581f0f70aa8..b9184aac0552aca5a365666f9d6a63d55cd5cd7f 100644 (file)
@@ -257,7 +257,14 @@ namespace System.IO.Packaging
                        if (ContentType != null)
                        coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "contentType", NSPackageProperties)).InnerXml = ContentType;
                        if (Created.HasValue)
-                               coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "created", NSDcTerms)).InnerXml = Created.Value.ToString ();
+                       {
+                               XmlAttribute att = doc.CreateAttribute ("xsi", "type", NSXsi);
+                               att.Value = "dcterms:W3CDTF";
+                               
+                               XmlNode created = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "created", NSDcTerms));
+                               created.Attributes.Append (att);
+                               created.InnerXml = Created.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z";
+                       }
                        if (Creator != null)
                                coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dc", "creator", NSDc)).InnerXml = Creator;
                        if (Description != null)
@@ -271,7 +278,11 @@ namespace System.IO.Packaging
                        if (LastModifiedBy != null)
                                coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastModifiedBy", NSPackageProperties)).InnerXml = LastModifiedBy;
                        if (LastPrinted.HasValue)
-                               coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastPrinted", NSPackageProperties)).InnerXml = LastPrinted.Value.ToString ();
+                       {
+                               XmlNode lastPrinted = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastPrinted", NSPackageProperties));
+
+                               lastPrinted.InnerXml = LastPrinted.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z"; 
+                       }
                        if (Revision != null)
                                coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "revision", NSPackageProperties)).InnerXml = Revision;
                        if (Subject != null)
@@ -288,7 +299,7 @@ namespace System.IO.Packaging
                                
                                XmlNode modified = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "modified", NSDcTerms));
                                modified.Attributes.Append (att);
-                               modified.InnerXml = Modified.Value.ToString ();
+                               modified.InnerXml = Modified.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z";
                        }
                        
                        doc.WriteContentTo (writer);
index fb0244d6eb9502f5d648fecf2009df1664502c30..59f1f11e325efd8837a54305a66a712e73b8b217 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Xaml/System.Xaml-net_4_5.csproj">\r
       <Project>{F574F9BD-1838-4C13-8722-7D6D33DE1781}</Project>\r
-      <Name>System.Xaml\System.Xaml-net_4_5</Name>\r
+      <Name>System.Xaml-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index e716ed1a06086eb00e59baf9dc8f9e606cd66200..f3126697a04cb47d362f8ed2af7a02a6a3e6a2fc 100644 (file)
@@ -134,7 +134,7 @@ $(vtsdir)/$(PROFILE)_TestLib/%/Address.dll: $(vtsdir)/VersionTolerantSerializati
        @mkdir -p $(dir $@)
        $(CSCOMPILE) -target:library -r:$(corlib) -warn:0 -out:$@ $^
 
-$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll
+$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(test_nunit_dep)
        $(CSCOMPILE) $(test_nunit_ref) -warn:0 -r:$(corlib) \
                -r:$(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \
                $(vtsdir)/BinarySerializationOverVersions.cs -out:$@
index e5a26ce28d3577b53d240dec40c7b0e96d189f9e..8098cdbc5828bfd6e7cd188e3bab68dd4127b619 100644 (file)
@@ -262,7 +262,11 @@ namespace System.Collections.Concurrent
 
                bool ICollection<KeyValuePair<TKey,TValue>>.Contains (KeyValuePair<TKey, TValue> pair)
                {
-                       return ContainsKey (pair.Key);
+                       TValue value;
+                       if (!TryGetValue (pair.Key, out value))
+                               return false;
+
+                       return EqualityComparer<TValue>.Default.Equals (value, pair.Value);
                }
 
                public KeyValuePair<TKey,TValue>[] ToArray ()
index d19cc4cec7d405515b9e0219798a29af7da44e4a..ea8984394b46030245c00440b404dd639de7b2e9 100644 (file)
@@ -97,12 +97,13 @@ namespace System.Collections.Concurrent
                public bool TryDequeue (out T result)
                {
                        result = default (T);
+                       Node oldNext = null;
                        bool advanced = false;
 
                        while (!advanced) {
                                Node oldHead = head;
                                Node oldTail = tail;
-                               Node oldNext = oldHead.Next;
+                               oldNext = oldHead.Next;
                                
                                if (oldHead == head) {
                                        // Empty case ?
@@ -122,6 +123,8 @@ namespace System.Collections.Concurrent
                                }
                        }
 
+                       oldNext.Value = default (T);
+
                        Interlocked.Decrement (ref count);
 
                        return true;
@@ -129,14 +132,24 @@ namespace System.Collections.Concurrent
                
                public bool TryPeek (out T result)
                {
-                       Node first = head.Next; 
+                       result = default (T);
+                       bool update = true;
+                       
+                       while (update)
+                       {
+                               Node oldHead = head;
+                               Node oldNext = oldHead.Next;
 
-                       if (first == null) {
-                               result = default (T);
-                               return false;
-                       }
+                               if (oldNext == null) {
+                                       result = default (T);
+                                       return false;
+                               }
 
-                       result = first.Value;
+                               result = oldNext.Value;
+                               
+                               //check if head has been updated
+                               update = head != oldHead;
+                       }
                        return true;
                }
                
index 74ee14d9a5206e350cf9cc47e52652d5213ae9e7..9fcc74756275f7479ada654bd9a56bcca46f8e83 100644 (file)
@@ -79,7 +79,7 @@ namespace System.Collections.Generic {
                //             to be ORed with HASH_FLAG before comparing it with the save hashcode.
                // "touchedSlots" and "emptySlot" manage the free space in the heap 
 
-               const int INITIAL_SIZE = 10;
+               const int INITIAL_SIZE = 4;
                const float DEFAULT_LOAD_FACTOR = (90f / 100);
                const int NO_SLOT = -1;
                const int HASH_FLAG = -2147483648;
@@ -233,22 +233,25 @@ namespace System.Collections.Generic {
                }
 
                public Dictionary (int capacity)
+                       : this (capacity, null)
                {
-                       Init (capacity, null);
                }
 
                public Dictionary (IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer)
                {
                        if (dictionary == null)
                                throw new ArgumentNullException ("dictionary");
-                       int capacity = dictionary.Count;
-                       Init (capacity, comparer);
+
+                       Init (dictionary.Count, comparer);
                        foreach (KeyValuePair<TKey, TValue> entry in dictionary)
                                this.Add (entry.Key, entry.Value);
                }
 
                public Dictionary (int capacity, IEqualityComparer<TKey> comparer)
                {
+                       if (capacity < 0)
+                               throw new ArgumentOutOfRangeException ("capacity");
+
                        Init (capacity, comparer);
                }
 
@@ -257,22 +260,16 @@ namespace System.Collections.Generic {
                        serialization_info = info;
                }
 
-               private void Init (int capacity, IEqualityComparer<TKey> hcp)
+               void Init (int capacity, IEqualityComparer<TKey> hcp)
                {
-                       if (capacity < 0)
-                               throw new ArgumentOutOfRangeException ("capacity");
-                       this.hcp = (hcp != null) ? hcp : EqualityComparer<TKey>.Default;
-                       if (capacity == 0)
-                               capacity = INITIAL_SIZE;
+                       this.hcp = hcp ?? EqualityComparer<TKey>.Default;
 
-                       /* Modify capacity so 'capacity' elements can be added without resizing */
-                       capacity = (int)(capacity / DEFAULT_LOAD_FACTOR) + 1;
-                       
+                       capacity = Math.Max (1, (int)(capacity / DEFAULT_LOAD_FACTOR));
                        InitArrays (capacity);
-                       generation = 0;
                }
                
-               private void InitArrays (int size) {
+               void InitArrays (int size)
+               {
                        table = new int [size];
 
                        linkSlots = new Link [size];
@@ -456,6 +453,9 @@ namespace System.Collections.Generic {
 
                public void Clear ()
                {
+                       if (count == 0)
+                               return;
+
                        count = 0;
                        // clear the hash table
                        Array.Clear (table, 0, table.Length);
index 0911f8152c4827f7fdafb5f2dd993d302a651da0..cad54a4d553f71ff2141c8227c880d16332a2add 100644 (file)
@@ -37,7 +37,7 @@ using System.Runtime.InteropServices;
 using System.Runtime.Serialization;
 using System.Security;
 
-#if !NET_2_1
+#if !MOBILE
 using System.Security.AccessControl;
 #endif
 
@@ -93,7 +93,6 @@ namespace System.IO {
                        }
                }
 
-#if !NET_2_1
                public bool IsReadOnly {
                        get {
                                if (!Exists)
@@ -138,7 +137,6 @@ namespace System.IO {
                        // handling this exception to work properly.
                        throw new NotSupportedException (Locale.GetText ("File encryption isn't supported on any file system."));
                }
-#endif
 
                public long Length {
                        get {
@@ -265,15 +263,10 @@ namespace System.IO {
 
                public override string ToString ()
                {
-#if NET_2_1
-                       // for Moonlight we *never* return paths, since ToString is not [SecurityCritical] we simply return the Name
-                       return Name;
-#else
                        return OriginalPath;
-#endif
                }
 
-#if !NET_2_1
+#if !MOBILE
                public FileSecurity GetAccessControl ()
                {
                        return File.GetAccessControl (FullPath); 
index 578a7ab057673f1f8f249cceb1e7199cbc8dd16f..64b5bf4bde5f15acdb540f1a7eca630bb05606d6 100644 (file)
@@ -44,19 +44,17 @@ using System.Security;
 using System.Security.Permissions;
 using System.Diagnostics.SymbolStore;
 
+#if !NET_4_5
+using TypeInfo = System.Type;
+#endif
+
 namespace System.Reflection.Emit
 {
        [ComVisible (true)]
        [ComDefaultInterface (typeof (_TypeBuilder))]
        [ClassInterface (ClassInterfaceType.None)]
        [StructLayout (LayoutKind.Sequential)]
-       public sealed class TypeBuilder :
-#if NET_4_5
-               TypeInfo
-#else
-               Type
-#endif
-               , _TypeBuilder
+       public sealed class TypeBuilder : TypeInfo, _TypeBuilder
        {
 #pragma warning disable 169            
                #region Sync with reflection.h
@@ -82,7 +80,7 @@ namespace System.Reflection.Emit
                private IntPtr generic_container;
                private GenericTypeParameterBuilder[] generic_params;
                private RefEmitPermissionSet[] permissions;
-               private Type created;
+               private TypeInfo created;
                #endregion
 #pragma warning restore 169            
                
@@ -727,7 +725,7 @@ namespace System.Reflection.Emit
                }
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               private extern Type create_runtime_class (TypeBuilder tb);
+               private extern TypeInfo create_runtime_class (TypeBuilder tb);
 
                private bool is_nested_in (Type t)
                {
@@ -753,8 +751,16 @@ namespace System.Reflection.Emit
 
                        return false;
            }
+
+               public Type CreateType ()
+               {
+                       return CreateTypeInfo ();
+               }
                
-               public Type CreateType()
+#if NET_4_5
+               public
+#endif
+               TypeInfo CreateTypeInfo ()
                {
                        /* handle nesting_type */
                        if (createTypeCalled)
index ca849bd6ad734c4072df313078e035ccd12a0c88..e1fa6e36ecd7ee84141d23b499b82a34c687edc3 100644 (file)
@@ -32,30 +32,58 @@ namespace System.Security.Claims
 {
        public static class ClaimTypes
        {
+               public const string Actor = "http://schemas.xmlsoap.org/ws/2009/09/identity/claims/actor";
+
                public const string Anonymous = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/anonymous";
 
                public const string Authentication = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authentication";
 
+               public const string AuthenticationInstant = "http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant";
+
+               public const string AuthenticationMethod = "http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod";
+
                public const string AuthorizationDecision = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authorizationdecision";
 
+               public const string ClaimsType2005Namespace = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims";
+
+               public const string ClaimsType2009Namespace = "http://schemas.xmlsoap.org/ws/2009/09/identity/claims";
+
+               public const string ClaimsTypeNamespace = "http://schemas.microsoft.com/ws/2008/06/identity/claims";
+
+               public const string CookiePath = "http://schemas.microsoft.com/ws/2008/06/identity/claims/cookiepath";
+
                public const string Country = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country";
 
                public const string DateOfBirth = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth";
 
+               public const string DenyOnlyPrimaryGroup = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarygroup";
+
+               public const string DenyOnlyPrimarySid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarysid";
+
                public const string DenyOnlySid = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/denyonlysid";
 
                public const string Dns = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dns";
 
-               public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress";
+               public const string Dsa = "http://schemas.microsoft.com/ws/2008/06/identity/claims/dsa";
+
+               public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/email";
+
+               public const string Expiration = "http://schemas.microsoft.com/ws/2008/06/identity/claims/expiration";
+
+               public const string Expired = "http://schemas.microsoft.com/ws/2008/06/identity/claims/expired";
 
                public const string Gender = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender";
 
                public const string GivenName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname";
 
+               public const string GroupSid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid";
+
                public const string Hash = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/hash";
 
                public const string HomePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone";
 
+               public const string IsPersistent = "http://schemas.microsoft.com/ws/2008/06/identity/claims/ispersistent";
+
                public const string Locality = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality";
 
                public const string MobilePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone";
@@ -70,8 +98,16 @@ namespace System.Security.Claims
 
                public const string PPID = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier";
 
+               public const string PrimaryGroupSid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarygroupsid";
+
+               public const string PrimarySid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid";
+
+               public const string Role = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role";
+
                public const string Rsa = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/rsa";
 
+               public const string SerialNumber = "http://schemas.microsoft.com/ws/2008/06/identity/claims/serialnumber";
+
                public const string Sid = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid";
 
                public const string Spn = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/spn";
@@ -90,9 +126,15 @@ namespace System.Security.Claims
 
                public const string Uri = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/uri";
 
+               public const string UserData = "http://schemas.microsoft.com/ws/2008/06/identity/claims/userdata";
+
+               public const string Version = "http://schemas.microsoft.com/ws/2008/06/identity/claims/version";
+
                public const string Webpage = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage";
 
+               public const string WindowsAccountName = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname";
+
                public const string X500DistinguishedName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/x500distinguishedname";
        }
 }
-#endif
\ No newline at end of file
+#endif
index 76dc9da4e4c95461aedc9812fc74dd4bf81476fe..24066a1da8552ccf8683b6ea2851c21caa4359fe 100644 (file)
@@ -43,11 +43,16 @@ namespace System.Security.Claims {
                
                List<Claim> claims;
                ClaimsIdentity actor;
+               string auth_type;
 
                public ClaimsIdentity ()
                        : this (claims: null, authenticationType: null, nameType: null, roleType: null)
                { }
                
+               public ClaimsIdentity(IEnumerable<Claim> claims)
+                       : this (claims: claims, authenticationType: null, nameType: null, roleType: null)
+               { }
+               
                public ClaimsIdentity (string authenticationType)
                        : this (claims: null, authenticationType: authenticationType, nameType: null, roleType: null)
                { }
@@ -69,12 +74,12 @@ namespace System.Security.Claims {
                {
                        claims = claims == null ? new List<Claim> (): new List<Claim> (claims);
                        
-                       AuthenticationType = authenticationType;
-
                        // Special case: if empty, set to null.
                        if (authenticationType == "")
-                               AuthenticationType = null;
-                       
+                               auth_type = null;
+                       else
+                               auth_type = authenticationType;
+
                        NameClaimType = nameType == null ? DefaultNameClaimType : nameType;
                        RoleClaimType = roleType == null ? DefaultRoleClaimType : roleType;
                }
@@ -96,12 +101,15 @@ namespace System.Security.Claims {
                                foreach (var c in ci.Claims)
                                        this.claims.Add (c);
                                
-                               foreach (var c in claims)
-                                       this.claims.Add (c);
                                Label = ci.Label;
                                NameClaimType = ci.NameClaimType;
                                RoleClaimType = ci.RoleClaimType;
-                               AuthenticationType = ci.AuthenticationType;
+                               auth_type = ci.AuthenticationType;
+                       }
+
+                       if (claims != null) {
+                               foreach (var c in claims)
+                                       this.claims.Add (c);
                        }
                }
 
@@ -130,7 +138,11 @@ namespace System.Security.Claims {
                        }
                }
 
-               public virtual string AuthenticationType { get; private set; }
+               public virtual string AuthenticationType {
+                       get {
+                               return auth_type;
+                       }
+               }
                public object BootstrapContext { get; set; }
                public string Label { get; set; }
                public virtual string Name {
@@ -259,4 +271,4 @@ namespace System.Security.Claims {
                }
        }
 }
-#endif
\ No newline at end of file
+#endif
index d3827b8d1a2f7718c6a17c64c4b4e7b34bf29503..cf1fe29e9d169336f6f5f44626175cf92b928822 100644 (file)
@@ -59,14 +59,16 @@ namespace System.Security.Claims {
                        if (identities == null)
                                throw new ArgumentNullException ("identities");
                        
-                       identities = new List<ClaimsIdentity> (identities);
+                       this.identities = new List<ClaimsIdentity> (identities);
                }
 
                public ClaimsPrincipal (IIdentity identity)
                {
                        if (identity == null)
                                throw new ArgumentNullException ("identity");
-                       // TODO
+
+                       identities = new List<ClaimsIdentity> ();
+                       identities.Add (new ClaimsIdentity (identity));
                }
 
                public ClaimsPrincipal (IPrincipal principal)
@@ -187,4 +189,4 @@ namespace System.Security.Claims {
                
        }
 }
-#endif
\ No newline at end of file
+#endif
index 3fe5c6aaaeaa22bbdbaab78fbb64d71cb6765623..0e5339969afddd3d84ff67f9d554f448f69c204d 100644 (file)
@@ -38,7 +38,7 @@ namespace System.Security.Cryptography {
        [ComVisible (true)]
        public class CryptographicException : SystemException, _Exception {
                public CryptographicException ()
-                       : base (Locale.GetText ("Error occured during a cryptographic operation."))
+                       : base (Locale.GetText ("Error occurred during a cryptographic operation."))
                {
                        // default to CORSEC_E_CRYPTO
                        // defined as EMAKEHR(0x1430) in CorError.h
index 7720e8e8512875ceef5d561acb3ad4f24952b764..3f5d52e92a3ede26748b7bd4e5b839c3053fcbb9 100644 (file)
@@ -38,7 +38,7 @@ namespace System.Security.Cryptography {
        public class CryptographicUnexpectedOperationException : CryptographicException {
 
                public CryptographicUnexpectedOperationException ()
-                       : base (Locale.GetText ("Unexpected error occured during a cryptographic operation."))
+                       : base (Locale.GetText ("Unexpected error occurred during a cryptographic operation."))
                {
                        // Default to CORSEC_E_CRYPTO_UNEX_OPER (CorError.h)
                        HResult = unchecked ((int)0x80131431);
index 38eff7631fd81d10b58c802486b9762918e9d50f..3ecf21bc4f54d255359c64f76dc4cf5a3ec6cd50 100644 (file)
@@ -60,7 +60,7 @@ namespace System.Text
                        if (bytesUnknown == null)
                                throw new ArgumentNullException ("bytesUnknown");
                        if (fallback_assigned && Remaining != 0)
-                               throw new ArgumentException ("Reentrant Fallback method invocation occured. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten.");
+                               throw new ArgumentException ("Reentrant Fallback method invocation occurred. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten.");
                        if (index < 0 || bytesUnknown.Length < index)
                                throw new ArgumentOutOfRangeException ("index");
                        fallback_assigned = true;
index 7bf94251ac9467a9e1f623269eb30c5c98eae079..736537e68d87263e0165eb4a1f2f98919643fcb7 100644 (file)
@@ -69,7 +69,7 @@ namespace System.Text
                private bool Fallback (int index)
                {
                        if (fallback_assigned && Remaining != 0)
-                               throw new ArgumentException ("Reentrant Fallback method invocation occured. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten.");
+                               throw new ArgumentException ("Reentrant Fallback method invocation occurred. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten.");
                        if (index < 0)
                                throw new ArgumentOutOfRangeException ("index");
                        fallback_assigned = true;
index 1c352ff7d3e79b0b42c02b1d07924bec50807f99..54fe237c79383a4c4eb8d9ca65e37d7a5d014b50 100644 (file)
 
 #if NET_4_0
 using System;
-using System.Threading;
 
 namespace System.Threading
 {
        public struct CancellationTokenRegistration: IDisposable, IEquatable<CancellationTokenRegistration>
        {
-               int id;
-               CancellationTokenSource source;
+               readonly int id;
+               readonly CancellationTokenSource source;
                
                internal CancellationTokenRegistration (int id, CancellationTokenSource source)
                {
@@ -52,7 +51,7 @@ namespace System.Threading
                #region IEquatable<CancellationTokenRegistration> implementation
                public bool Equals (CancellationTokenRegistration other)
                {
-                       return this.id == other.id && this.source == other.source;
+                       return id == other.id && source == other.source;
                }
                
                public static bool operator== (CancellationTokenRegistration left, CancellationTokenRegistration right)
@@ -73,7 +72,7 @@ namespace System.Threading
 
                public override bool Equals (object obj)
                {
-                       return (obj is CancellationTokenRegistration) ? Equals ((CancellationTokenRegistration)obj) : false;
+                       return (obj is CancellationTokenRegistration) && Equals ((CancellationTokenRegistration)obj);
                }
        }
 }
index 067cd64d6f6181ddcd1899d6eea85bcac34acf34..769ba549db1219fbf164c3068d011650a51cd953 100644 (file)
@@ -40,7 +40,7 @@ namespace System
        public class AggregateException : Exception
        {
                List<Exception> innerExceptions = new List<Exception> ();
-               const string defaultMessage = "One or more errors occured";
+               const string defaultMessage = "One or more errors occurred";
                
                public AggregateException () : base (defaultMessage)
                {
@@ -63,7 +63,7 @@ namespace System
                }
                
                public AggregateException (params Exception[] innerExceptions)
-                       : this (string.Empty, innerExceptions)
+                       : this (defaultMessage, innerExceptions)
                {
                }
                
index 5a2483dcc3e4a488fdced9fb979e2152b9963ba5..75e3d6a855fb792cbb38121ea95bec8dec8deba9 100644 (file)
@@ -27,6 +27,7 @@
 //
 
 #if MONODROID
+using System.Reflection;
 using System.Threading;
 
 namespace System {
@@ -35,20 +36,26 @@ namespace System {
 
                static readonly Func<SynchronizationContext> getDefaultSyncContext;
                static readonly Func<string> getDefaultTimeZone;
+               static readonly Func<TimeZone> getCurrentSystemTimeZone;
 
                static AndroidPlatform ()
                {
+                       Type androidRuntime = Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true);
+
                        getDefaultSyncContext = (Func<SynchronizationContext>)
                                Delegate.CreateDelegate (typeof(Func<SynchronizationContext>), 
-                                               Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true)
-                                               .GetMethod ("GetDefaultSyncContext", 
+                                               androidRuntime.GetMethod ("GetDefaultSyncContext",
                                                        System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic));
 
                        getDefaultTimeZone = (Func<string>)
                                Delegate.CreateDelegate (typeof(Func<string>), 
-                                               Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true)
-                                               .GetMethod ("GetDefaultTimeZone", 
+                                               androidRuntime.GetMethod ("GetDefaultTimeZone",
                                                        System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic));
+
+                       MethodInfo mi = androidRuntime.GetMethod ("GetCurrentSystemTimeZone",
+                                       System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
+                       if (mi != null)
+                               getCurrentSystemTimeZone = (Func<TimeZone>) Delegate.CreateDelegate (typeof(Func<TimeZone>), mi);
                }
 
                internal static SynchronizationContext GetDefaultSyncContext ()
@@ -60,6 +67,13 @@ namespace System {
                {
                        return getDefaultTimeZone ();
                }
+
+               internal static TimeZone GetCurrentSystemTimeZone ()
+               {
+                       if (getCurrentSystemTimeZone == null)
+                               return null;
+                       return getCurrentSystemTimeZone ();
+               }
        }
 }
 #endif
index b3272b16a96fd72a8feadcedef41ad267b0642df..519b8d1a09a4d649aeedf51e9275ef2bb8edcd91 100644 (file)
@@ -1480,9 +1480,9 @@ namespace System
                        return false;
                }
                
-               private static void qsort (Array keys, Array items, int low0, int high0, IComparer comparer)
+               unsafe static void qsort (Array keys, Array items, int low0, int high0, IComparer comparer)
                {
-                       QSortStack[] stack = new QSortStack[32];
+                       QSortStack* stack = stackalloc QSortStack [32];
                        const int QSORT_THRESHOLD = 7;
                        int high, low, mid, i, k;
                        object key, hi, lo;
@@ -1934,9 +1934,9 @@ namespace System
                        return false;
                }
                
-               private static void qsort<T, U> (T[] keys, U[] items, int low0, int high0) where T : IComparable<T>
+               unsafe static void qsort<T, U> (T[] keys, U[] items, int low0, int high0) where T : IComparable<T>
                {
-                       QSortStack[] stack = new QSortStack[32];
+                       QSortStack* stack = stackalloc QSortStack [32];
                        const int QSORT_THRESHOLD = 7;
                        int high, low, mid, i, k;
                        int sp = 1;
@@ -2043,9 +2043,9 @@ namespace System
                }               
 
                // Specialized version for items==null
-               private static void qsort<T> (T[] keys, int low0, int high0) where T : IComparable<T>
+               unsafe static void qsort<T> (T[] keys, int low0, int high0) where T : IComparable<T>
                {
-                       QSortStack[] stack = new QSortStack[32];
+                       QSortStack* stack = stackalloc QSortStack [32];
                        const int QSORT_THRESHOLD = 7;
                        int high, low, mid, i, k;
                        int sp = 1;
@@ -2232,9 +2232,9 @@ namespace System
                        return false;
                }
                
-               private static void qsort<K, V> (K [] keys, V [] items, int low0, int high0, IComparer<K> comparer)
+               unsafe static void qsort<K, V> (K [] keys, V [] items, int low0, int high0, IComparer<K> comparer)
                {
-                       QSortStack[] stack = new QSortStack[32];
+                       QSortStack* stack = stackalloc QSortStack [32];
                        const int QSORT_THRESHOLD = 7;
                        int high, low, mid, i, k;
                        IComparable<K> gcmp;
@@ -2378,9 +2378,9 @@ namespace System
                }
 
                // Specialized version for items==null
-               private static void qsort<K> (K [] keys, int low0, int high0, IComparer<K> comparer)
+               unsafe static void qsort<K> (K [] keys, int low0, int high0, IComparer<K> comparer)
                {
-                       QSortStack[] stack = new QSortStack[32];
+                       QSortStack* stack = stackalloc QSortStack [32];
                        const int QSORT_THRESHOLD = 7;
                        int high, low, mid, i, k;
                        IComparable<K> gcmp;
@@ -2535,9 +2535,9 @@ namespace System
                        return false;
                }
                
-               private static void qsort<T> (T [] array, int low0, int high0, Comparison<T> compare)
+               unsafe static void qsort<T> (T [] array, int low0, int high0, Comparison<T> compare)
                {
-                       QSortStack[] stack = new QSortStack[32];
+                       QSortStack* stack = stackalloc QSortStack [32];
                        const int QSORT_THRESHOLD = 7;
                        int high, low, mid, i, k;
                        int sp = 1;
index 6a5f71471288ad27e8c3a262b4c84637f5af6dae..d14271c623a0965ce9f5c9e75411b05e2f2fe293 100644 (file)
@@ -4,7 +4,7 @@
 // Authors:
 //     Sebastien Pouliot  <sebastien@xamarin.com>
 //
-// Copyright 2012-2013 Xamarin Inc. All rights reserved.
+// Copyright 2012-2014 Xamarin Inc. All rights reserved.
 //
 
 #if FULL_AOT_RUNTIME
@@ -23,7 +23,7 @@ namespace System {
                        extern static void monotouch_log (string s);
 
                        [DllImport ("/usr/lib/libSystem.dylib")]
-                       extern static int write (int fd, byte [] buffer, int n);
+                       extern static /* ssize_t */ IntPtr write (int fd, byte [] buffer, /* size_t */ IntPtr n);
                        
                        StringBuilder sb;
                        
@@ -39,7 +39,8 @@ namespace System {
                        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)
+                               var len = (IntPtr) b.Length;
+                               while ((int) write (1, b, len) == -1 && Marshal.GetLastWin32Error () == /* EINTR*/ 4)
                                        ;
                        }
                        
index c3da055efc02589a97da57a0fc3d9f8d0ca52e81..30bc6f8edf82b05deb1da4e8a2ebc8a2cacd389c 100644 (file)
@@ -214,6 +214,10 @@ namespace System
                        "yyyy/MMMM",
                };
 
+               private static readonly string[] ExoticAndNonStandardFormats = new string[] {
+                       "ddMMMyyyy"
+               };
+
                private enum Which 
                {
                        Day,
@@ -927,6 +931,9 @@ namespace System
                        if (ParseExact (s, dfi.GetAllDateTimePatternsInternal (), dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception))
                                return true;
 
+                       if (ParseExact (s, ExoticAndNonStandardFormats, dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception))
+                               return true;
+
                        if (!setExceptionOnError)
                                return false;
                        
index 507153c421aa2432b48f47c7eddacc499c4639ba..8b9ade4dd46b7159f2295bbba42f1caee1910819 100644 (file)
@@ -5,12 +5,11 @@
 //   Miguel de Icaza (miguel@ximian.com)
 //   Daniel Stodden (stodden@in.tum.de)
 //   Dietmar Maurer (dietmar@ximian.com)
+//   Marek Safar (marek.safar@gmail.com)
 //
 // (C) Ximian, Inc.  http://www.ximian.com
-//
-
-//
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright 2014 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
@@ -41,9 +40,11 @@ using System.Runtime.InteropServices;
 namespace System
 {
        /* Contains the rarely used fields of Delegate */
-       class DelegateData {
+       sealed class DelegateData
+       {
                public Type target_type;
                public string method_name;
+               public bool curried_first_arg;
        }
 
        [ClassInterface (ClassInterfaceType.AutoDual)]
@@ -230,6 +231,8 @@ namespace System
                                        return null;
 
                        bool argsMatch;
+                       DelegateData delegate_data = new DelegateData ();
+
                        if (target != null) {
                                if (!method.IsStatic) {
                                        argsMatch = arg_type_match_this (target.GetType (), method.DeclaringType, true);
@@ -238,7 +241,9 @@ namespace System
                                } else {
                                        argsMatch = arg_type_match (target.GetType (), args [0].ParameterType);
                                        for (int i = 1; i < args.Length; i++)
-                                               argsMatch &= arg_type_match (delargs [i - 1].ParameterType, args [i].ParameterType);                                    
+                                               argsMatch &= arg_type_match (delargs [i - 1].ParameterType, args [i].ParameterType);
+
+                                       delegate_data.curried_first_arg = true;
                                }
                        } else {
                                if (!method.IsStatic) {
@@ -259,6 +264,8 @@ namespace System
                                                argsMatch = !(args [0].ParameterType.IsValueType || args [0].ParameterType.IsByRef) && allowClosed;
                                                for (int i = 0; i < delargs.Length; i++)
                                                        argsMatch &= arg_type_match (delargs [i].ParameterType, args [i + 1].ParameterType);
+
+                                               delegate_data.curried_first_arg = true;
                                        } else {
                                                argsMatch = true;
                                                for (int i = 0; i < args.Length; i++)
@@ -276,6 +283,8 @@ namespace System
                        Delegate d = CreateDelegate_internal (type, target, method, throwOnBindFailure);
                        if (d != null)
                                d.original_method_info = method;
+                       if (delegate_data != null)
+                               d.data = delegate_data;
                        return d;
                }
 
@@ -398,6 +407,21 @@ namespace System
                        return DynamicInvokeImpl (args);
                }
 
+               void InitializeDelegateData ()
+               {
+                       DelegateData delegate_data = new DelegateData ();
+                       if (method_info.IsStatic) {
+                               if (m_target != null) {
+                                       delegate_data.curried_first_arg = true;
+                               } else {
+                                       MethodInfo invoke = GetType ().GetMethod ("Invoke");
+                                       if (invoke.GetParametersCount () + 1 == method_info.GetParametersCount ())
+                                               delegate_data.curried_first_arg = true;
+                               }
+                       }
+                       this.data = delegate_data;
+               }
+
                protected virtual object DynamicInvokeImpl (object[] args)
                {
                        if (Method == null) {
@@ -408,20 +432,34 @@ namespace System
                                method_info = m_target.GetType ().GetMethod (data.method_name, mtypes);
                        }
 
-                       if (Method.IsStatic && (args != null ? args.Length : 0) == Method.GetParametersCount () - 1) {
+                       var target = m_target;
+                       if (this.data == null)
+                               InitializeDelegateData ();
+
+                       if (Method.IsStatic) {
+                               //
                                // The delegate is bound to m_target
-                               if (args != null) {
-                                       object[] newArgs = new object [args.Length + 1];
-                                       args.CopyTo (newArgs, 1);
-                                       newArgs [0] = m_target;
-                                       args = newArgs;
-                               } else {
-                                       args = new object [] { m_target };
+                               //
+                               if (data.curried_first_arg) {
+                                       if (args == null) {
+                                               args = new [] { target };
+                                       } else {
+                                               Array.Resize (ref args, args.Length + 1);
+                                               Array.Copy (args, 0, args, 1, args.Length - 1);
+                                               args [0] = target;
+                                       }
+
+                                       target = null;
+                               }
+                       } else {
+                               if (m_target == null && args != null && args.Length > 0) {
+                                       target = args [0];
+                                       Array.Copy (args, 1, args, 0, args.Length - 1);
+                                       Array.Resize (ref args, args.Length - 1);
                                }
-                               return Method.Invoke (null, args);
                        }
 
-                       return Method.Invoke (m_target, args);
+                       return Method.Invoke (target, args);
                }
 
                public virtual object Clone ()
@@ -440,8 +478,13 @@ namespace System
                                        /* Uncommon case */
                                        if (d.data != null && data != null)
                                                return (d.data.target_type == data.target_type && d.data.method_name == data.method_name);
-                                       else
+                                       else {
+                                               if (d.data != null)
+                                                       return d.data.target_type == null;
+                                               if (data != null)
+                                                       return data.target_type == null;
                                                return false;
+                                       }
                                }
                                return true;
                        }
index c36dbc7de7c496712d2a25a8ab1ec26cc93b12a5..74d704422d2b24bc746a13823b2eabc799965525 100644 (file)
@@ -46,7 +46,7 @@ namespace System
                {
                        string type;
                        string assembly;
-                       public object target;
+                       object target;
                        string targetTypeAssembly;
                        string targetTypeName;
                        string methodName;
@@ -64,15 +64,18 @@ namespace System
                                methodName = del.Method.Name;
                        }
 
-                       public Delegate DeserializeDelegate (SerializationInfo info)
+                       public Delegate DeserializeDelegate (SerializationInfo info, int index)
                        {
                                object realTarget = null;
                                if (target != null)
                                        realTarget = info.GetValue (target.ToString(), typeof(object));
 
+                               var key = "method" + index;
+                               var method = info.HasKey (key) ? (MethodInfo)info.GetValue (key, typeof (MethodInfo)) : null;
+
                                Assembly dasm = Assembly.Load (assembly);
                                Type dt = dasm.GetType (type);
-                               Delegate del;
+
                                if (realTarget != null) {
 #if !DISABLE_REMOTING
                                        if (RemotingServices.IsTransparentProxy (realTarget)) {
@@ -86,15 +89,16 @@ namespace System
                                                        throw new RemotingException ("Unexpected proxy type.");
                                        }
 #endif
-                                       del = Delegate.CreateDelegate (dt, realTarget, methodName);
-                               }
-                               else {
-                                       Assembly tasm = Assembly.Load (targetTypeAssembly);
-                                       Type tt = tasm.GetType (targetTypeName);
-                                       del = Delegate.CreateDelegate (dt, tt, methodName);
+                                       return method == null ?
+                                               Delegate.CreateDelegate (dt, realTarget, methodName) :
+                                               Delegate.CreateDelegate (dt, realTarget, method);
                                }
 
-                               return del;
+                               if (method != null)
+                                       return Delegate.CreateDelegate (dt, realTarget, method);
+
+                               Type tt2 = Assembly.Load (targetTypeAssembly).GetType (targetTypeName);
+                               return Delegate.CreateDelegate (dt, tt2, methodName);
                        }
                }
 
@@ -112,14 +116,14 @@ namespace System
 
                        // Deserializes and combines the delegates
                        if (count == 1) 
-                               _delegate = entryChain.DeserializeDelegate (info);
+                               _delegate = entryChain.DeserializeDelegate (info, 0);
                        else
                        {
                                Delegate[] delegates = new Delegate[count];
                                entry = entryChain;
                                for (int n=0; n<count; n++)
                                {
-                                       delegates[n] = entry.DeserializeDelegate (info);
+                                       delegates[n] = entry.DeserializeDelegate (info, n);
                                        entry = entry.delegateEntry;
                                }
                                _delegate = Delegate.Combine (delegates);
@@ -145,6 +149,8 @@ namespace System
                                lastEntry = entry;
                                if (del.Target != null)
                                        info.AddValue (targetLabel, del.Target);
+
+                               info.AddValue ("method" + n, del.Method);
                        }
                        info.SetType (typeof (DelegateSerializationHolder));
                }
index ecf2ed189815cec3f6271bac2324ee8ac3d50279..3597660bb093d24d33aff6a88e495bb12f04f012 100644 (file)
@@ -628,7 +628,11 @@ namespace System
 
                        result = default (TEnum);
 
-                       if (value == null || value.Trim ().Length == 0)
+                       if (value == null)
+                               return false;
+
+                       value = value.Trim ();
+                       if (value.Length == 0)
                                return false;
 
                        return Parse (tenum_type, value, ignoreCase, out result);
index 13d63ccc129d66740dc1148e997d36aa5b2b7d46..122606212391a547dfc5f8b65547016ab8c02fe1 100644 (file)
@@ -715,7 +715,7 @@ namespace System {
                        return GetLogicalDrivesInternal ();
                }
 
-#if !NET_2_1
+#if !MOBILE
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private static extern void internalBroadcastSettingChange ();
 
@@ -826,10 +826,24 @@ namespace System {
                                throw new ArgumentException ("target");
                        }
                }
+#else
+               public static void SetEnvironmentVariable (string variable, string value)
+               {
+                       if (variable == null)
+                               throw new ArgumentNullException ("variable");
+                       if (variable == String.Empty)
+                               throw new ArgumentException ("String cannot be of zero length.", "variable");
+                       if (variable.IndexOf ('=') != -1)
+                               throw new ArgumentException ("Environment variable name cannot contain an equal character.", "variable");
+                       if (variable[0] == '\0')
+                               throw new ArgumentException ("The first char in the string is the null character.", "variable");
 
+                       InternalSetEnvironmentVariable (variable, value);
+               }
+#endif
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                internal static extern void InternalSetEnvironmentVariable (string variable, string value);
-#endif
+
                [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode=true)]
                public static void FailFast (string message)
                {
index 981a2f01ffc0baed23d1aa5526f6344508f7896a..39ff76d15f8b21a1b7e374be0ea2fb3988cea0f3 100644 (file)
@@ -31,6 +31,7 @@
 
 using System.Globalization;
 using System.Threading;
+using System.Runtime.CompilerServices;
 
 namespace System {
        
@@ -77,12 +78,10 @@ namespace System {
 
                public int CompareTo (int value)
                {
-                       if (m_value == value)
-                               return 0;
-                       if (m_value > value)
-                               return 1;
-                       else
-                               return -1;
+                       return
+                               m_value == value ? 0 :
+                               m_value > value ? 1 :
+                               -1;
                }
 
                public bool Equals (int obj)
index 43c7181f8b86fd979fd8dc7b31037cf8c55a7b8c..cea224133e4ab73ff1dbd3560b1f764d942c57aa 100644 (file)
@@ -73,7 +73,11 @@ namespace System
                                
                                lock (tz_lock) {
                                        if (tz == null || Math.Abs (now - timezone_check) > TimeSpan.TicksPerMinute) {
-                                               tz = new CurrentSystemTimeZone (now);
+#if MONODROID
+                                               tz = AndroidPlatform.GetCurrentSystemTimeZone ();
+                                               if (tz == null)
+#endif
+                                                       tz = new CurrentSystemTimeZone (now);
                                                timezone_check = now;
 
                                                currentTimeZone = tz;
index 698a25588f63abdaca2e1f7553533ca6fc5e512a..e38c904590094c4d205afd198fea736b31ea4bdd 100644 (file)
@@ -353,6 +353,19 @@ namespace MonoTests.System.Collections.Concurrent
                        } catch (ArgumentNullException ex) {
                        }
                }
+               
+               [Test]
+               public void ContainsKeyPairTest ()
+               {
+                       var validKeyPair = new KeyValuePair<string, string> ("key", "validValue");
+                       var wrongKeyPair = new KeyValuePair<string, string> ("key", "wrongValue");
+
+                       IDictionary<string, string> dict = new ConcurrentDictionary<string, string> ();
+                       dict.Add (validKeyPair);
+
+                       Assert.IsTrue (dict.Contains (validKeyPair));
+                       Assert.IsFalse (dict.Contains (wrongKeyPair));
+               }
        }
 }
 #endif
index b0006440afaa97429b21a4fb107623b8df43573b..91436a05b2127ccce3817228f27378facd793db7 100644 (file)
@@ -30,6 +30,7 @@ using System.Collections.Generic;
 using System.Collections.Concurrent;
 
 using NUnit.Framework;
+using MonoTests.System.Threading.Tasks;
 
 namespace MonoTests.System.Collections.Concurrent
 {
@@ -115,6 +116,34 @@ namespace MonoTests.System.Collections.Concurrent
                        CollectionStressTestHelper.RemoveStressTest (new ConcurrentQueue<int> (), CheckOrderingType.InOrder);
                }
                
+               [Test]
+               public void StressTryPeekTestCase ()
+               {
+                       ParallelTestHelper.Repeat (delegate {
+                               var queue = new ConcurrentQueue<object> ();
+                               queue.Enqueue (new object());
+                               
+                               const int threads = 10;
+                               int threadCounter = 0;
+                               bool success = true;
+                               
+                               ParallelTestHelper.ParallelStressTest (queue, (q) => {
+                                       int threadId = Interlocked.Increment (ref threadCounter);
+                                       object temp;
+                                       if (threadId < threads)
+                                       {
+                                               while (queue.TryPeek (out temp))
+                                                       if (temp == null)
+                                                               success = false;
+                                       } else {
+                                               queue.TryDequeue (out temp);
+                                       }
+                               }, threads);
+                               
+                               Assert.IsTrue (success, "TryPeek returned unexpected null value.");
+                       }, 10);
+               }
+               
                [Test]
                public void CountTestCase()
                {
@@ -215,6 +244,30 @@ namespace MonoTests.System.Collections.Concurrent
                {
                        queue.CopyTo (new int[3], 0);
                }
+
+               static WeakReference CreateWeakReference (object obj)
+               {
+                       return new WeakReference (obj);
+               }
+
+               [Test]
+               // This depends on precise stack scanning
+               [Category ("NotWorking")]
+               public void TryDequeueReferenceTest ()
+               {
+                       var obj = new Object ();
+                       var weakReference = CreateWeakReference(obj);
+                       var queue = new ConcurrentQueue<object> ();
+
+                       queue.Enqueue (obj);
+                       queue.TryDequeue (out obj);
+                       obj = null;
+
+                       GC.Collect ();
+                       GC.WaitForPendingFinalizers ();
+
+                       Assert.IsFalse (weakReference.IsAlive);
+               }
        }
 }
 #endif
index ab281cb8178e86179e861f1fb4f0b1b811e6cbb8..eabe77e48e5a10ca0774747cefa503236a330793 100644 (file)
@@ -783,6 +783,51 @@ namespace MonoTests.System.Reflection
                        var m = GetType ().GetMethod ("Bug12856");
                        Assert.AreEqual ("System.Nullable`1[System.Int32] Bug12856()", m.ToString (), "#1");
                }
+
+#if !MONOTOUCH
+               class GenericClass<T>
+               {
+                       public void Method ()
+                       {
+                               T lv = default(T);
+                               Console.WriteLine(lv);
+                       }
+
+                       public void Method2<K> (T a0, K a1)
+                       {
+                               T var0 = a0;
+                               K var1 = a1;
+                               Console.WriteLine (var0);
+                               Console.WriteLine (var1);
+                       }
+               }
+
+               [Test]
+               public void TestLocalVariableTypes ()
+               {
+                       var typeofT = typeof (GenericClass<>).GetGenericArguments () [0];
+                       var typeofK = typeof (GenericClass<>).GetMethod ("Method2").GetGenericArguments () [0];
+
+                       var type = typeof (GenericClass<>).GetMethod("Method").GetMethodBody().LocalVariables[0].LocalType;
+                       Assert.AreEqual (typeofT, type);
+                       Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType);
+
+                       type = typeof (GenericClass<>).GetMethod("Method2").GetMethodBody().LocalVariables[0].LocalType;
+                       Assert.AreEqual (typeofT, type);
+                       Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType);
+
+                       type = typeof (GenericClass<>).GetMethod("Method2").GetMethodBody().LocalVariables[1].LocalType;
+                       Assert.AreEqual (typeofK, type);
+                       Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType);
+
+                       type = typeof (GenericClass<int>).GetMethod("Method2").GetMethodBody().LocalVariables[0].LocalType;
+                       Assert.AreEqual (typeof (int), type);
+
+                       type = typeof (GenericClass<int>).GetMethod("Method2").GetMethodBody().LocalVariables[1].LocalType;
+                       Assert.AreEqual (typeofK, type);
+                       Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType);
+               }
+#endif
        }
        
 #if NET_2_0
index 1b3fc898891626f83e6a790ba587834eb3cab641..92d19fe367eddda5638228faa7783c32bd345114 100644 (file)
@@ -196,9 +196,13 @@ namespace MonoTests.System.Runtime.CompilerServices {
                if (GC.MaxGeneration == 0) /*Boehm doesn't handle ephemerons */
                        Assert.Ignore ("Not working on Boehm.");
                var cwt = new ConditionalWeakTable <object,object> ();
-               List<object> keepAlive;
-               List<WeakReference> keys;
-               FillStuff (cwt, out keepAlive, out keys);
+               List<object> keepAlive = null;
+               List<WeakReference> keys = null;
+               Thread t = new Thread (delegate () {
+                               FillStuff (cwt, out keepAlive, out keys);
+                       });
+               t.Start ();
+               t.Join ();
 
                GC.Collect ();
 
index a403d5287e2d6af53add6c41d825a641bea42ae6..5237e377e38c80d9a73ce149db5dde8934bdc428 100644 (file)
@@ -44,14 +44,15 @@ namespace MonoTests.System.Runtime.CompilerServices
                class Scheduler : TaskScheduler
                {
                        string name;
+                       int ic, qc;
 
                        public Scheduler (string name)
                        {
                                this.name = name;
                        }
 
-                       public int InlineCalls { get; set; }
-                       public int QueueCalls { get; set; }
+                       public int InlineCalls { get { return ic; } }
+                       public int QueueCalls { get { return qc; } }
 
                        protected override IEnumerable<Task> GetScheduledTasks ()
                        {
@@ -60,7 +61,7 @@ namespace MonoTests.System.Runtime.CompilerServices
 
                        protected override void QueueTask (Task task)
                        {
-                               ++QueueCalls;
+                               Interlocked.Increment (ref qc);
                                ThreadPool.QueueUserWorkItem (o => {
                                        TryExecuteTask (task);
                                });
@@ -68,7 +69,7 @@ namespace MonoTests.System.Runtime.CompilerServices
 
                        protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued)
                        {
-                               ++InlineCalls;
+                               Interlocked.Increment (ref ic);
                                return false;
                        }
                }
@@ -102,6 +103,7 @@ namespace MonoTests.System.Runtime.CompilerServices
 
                string progress;
                SynchronizationContext sc;
+               ManualResetEvent mre;
 
                [SetUp]
                public void Setup ()
@@ -176,7 +178,7 @@ namespace MonoTests.System.Runtime.CompilerServices
                        Assert.IsTrue (t.Wait (3000), "#0");
                        Assert.AreEqual (0, t.Result, "#1");
                        Assert.AreEqual (0, b.InlineCalls, "#2b");
-                       Assert.AreEqual (2, a.QueueCalls, "#3a");
+                       Assert.IsTrue (a.QueueCalls == 1 || a.QueueCalls == 2, "#3a");
                        Assert.AreEqual (1, b.QueueCalls, "#3b");
                }
 
@@ -270,12 +272,15 @@ namespace MonoTests.System.Runtime.CompilerServices
                [Test]
                public void CompletionOnDifferentCustomSynchronizationContext ()
                {
+                       mre = new ManualResetEvent (false);
                        progress = "";
                        var syncContext = new SingleThreadSynchronizationContext ();
                        SynchronizationContext.SetSynchronizationContext (syncContext);
 
                        syncContext.Post (delegate {
-                               Go2 (syncContext);
+                               Task t = new Task (delegate() { });
+                               Go2 (syncContext, t);
+                               t.Start ();
                        }, null);
 
                        // Custom message loop
@@ -286,21 +291,30 @@ namespace MonoTests.System.Runtime.CompilerServices
                                Thread.Sleep (0);
                        }
 
-                       Assert.AreEqual ("132", progress);
+                       Assert.AreEqual ("13xa2", progress);
                }
 
-               async void Go2 (SynchronizationContext ctx)
+               async void Go2 (SynchronizationContext ctx, Task t)
                {
-                       await Wait2 (ctx);
+                       await Wait2 (ctx, t);
 
-                       progress += "2";
+                       progress += "a";
+
+                       if (mre.WaitOne (5000))
+                               progress += "2";
+                       else
+                               progress += "b";
                }
 
-               async Task Wait2 (SynchronizationContext ctx)
+               async Task Wait2 (SynchronizationContext ctx, Task t)
                {
-                       await Task.Delay (10); // Force block suspend/return
+                       await t; // Force block suspend/return
 
-                       ctx.Post (l => progress += "3", null);
+                       ctx.Post (l => {
+                               progress += "3";
+                               mre.Set ();
+                               progress += "x";
+                       }, null);
 
                        progress += "1";
 
index da8bb8ee432c77be3b80a1b177af87543c3c5fe1..90b2d3f73fc386c099bbace95e4a1f82707e1ba2 100644 (file)
@@ -18,6 +18,7 @@ using System.Runtime.Remoting.Proxies;
 using System.Runtime.Remoting.Messaging;
 using System.Collections;
 using NUnit.Framework;
+using System.Text;
 
 namespace MonoTests.System.Runtime.Serialization
 {
@@ -41,6 +42,41 @@ namespace MonoTests.System.Runtime.Serialization
                        RemotingServices.Disconnect (mt);
                }
 
+#if !MONOTOUCH
+               [Test]
+               public void DelegateSerializationTest ()
+               {
+                       var a = new DelegateSerialization ();
+                       a.E += HandleE1;
+
+                       var d2 = Delegate.CreateDelegate (typeof(Func<StringBuilder, int>), "val", typeof(SerializationTest).GetMethod ("HandleE2"));
+                       a.E += (Func<StringBuilder, int>) d2;
+
+                       using (var ms = new MemoryStream ()) {
+                               var fmt = new BinaryFormatter ();
+                               fmt.Serialize (ms, a);
+                               ms.Flush ();
+
+                               ms.Seek (0, SeekOrigin.Begin);
+                               var a2 = (DelegateSerialization) fmt.Deserialize (ms);
+                               a2.Test ();
+                       }
+               }
+#endif
+
+               static int HandleE1 (StringBuilder arg)
+               {
+                       arg.Append ("E1");
+                       return 1;
+               }
+
+               public static int HandleE2 (object o, StringBuilder arg)
+               {
+                       arg.Append ("E2|");
+                       arg.Append (o);
+                       return 2;
+               }
+
                void WriteData ()
                {
                        StreamingContext context = new StreamingContext (StreamingContextStates.Other);
@@ -814,5 +850,17 @@ namespace MonoTests.System.Runtime.Serialization
                public int x;
        }
 
+       [Serializable]
+       class DelegateSerialization
+       {
+               public event Func<StringBuilder, int> E;
+
+               public void Test ()
+               {
+                       var sb = new StringBuilder ();
+                       Assert.AreEqual (2, E (sb), "#1");
+                       Assert.AreEqual ("E1E2|val", sb.ToString (), "#2");
+               }
+       }
 
 }
index 1f6be893342298d64c730dd186ce4a6a56b5a378..df382b17008f85d45b7f6bec89e8b133efb2a526 100644 (file)
@@ -276,7 +276,7 @@ namespace MonoTests.System.Threading.Tasks
                                        tasks[i] = Task.Factory.StartNew (delegate { Thread.Sleep (0); });
                                }
 
-                               Assert.IsTrue (Task.WaitAll (tasks, 2000));
+                               Assert.IsTrue (Task.WaitAll (tasks, 5000));
                        }
                }
 
@@ -904,7 +904,11 @@ namespace MonoTests.System.Threading.Tasks
                                args.SetObserved ();
                        };
                        var inner = new ApplicationException ();
-                       Task.Factory.StartNew (() => { throw inner; });
+                       Thread t = new Thread (delegate () {
+                                       Task.Factory.StartNew (() => { Console.WriteLine ("HIT!"); throw inner; });
+                               });
+                       t.Start ();
+                       t.Join ();
                        Thread.Sleep (1000);
                        GC.Collect ();
                        Thread.Sleep (1000);
@@ -1928,6 +1932,7 @@ namespace MonoTests.System.Threading.Tasks
                }
 
                [Test]
+               [Category("NotWorking")]
                public void TaskContinuationChainLeak()
                {
                        // Start cranking out tasks, starting each new task upon completion of and from inside the prior task.
index d8c1299efe2a8425734b3449e829e87ec698be85..5bf805aae0b6e0264998d15c63b8d01f5768c77a 100644 (file)
@@ -90,9 +90,9 @@ namespace MonoTests.System.Threading
                        int called = 0;
                        var cts = new CancellationTokenSource ();
                        cts.Token.Register (() => called++);
-                       cts.CancelAfter (20);
+                       cts.CancelAfter (50);
                        cts.Dispose ();
-                       Thread.Sleep (50);
+                       Thread.Sleep (100);
                        Assert.AreEqual (0, called, "#1");
                }
 
index 0e7b294f3b9495c29fef8db2a6b71faf1be62475..343e723be82e8b6ce8bf0145a4e4a57c93a78482 100644 (file)
@@ -1216,6 +1216,15 @@ namespace MonoTests.System
                        DateTime.Parse ("Sat,,, 01,,, Oct,,, ,,,1994 03:00:00", CultureInfo.InvariantCulture);
                }
 
+               [Test]
+               public void TryParse_Bug11630 ()
+               {
+                       DateTime parsed;
+
+                       Assert.IsTrue (DateTime.TryParse ("10Feb2013", out parsed));
+                       Assert.AreEqual (new DateTime (2013, 2, 10), parsed);
+               }
+
                [Test]
                [ExpectedException (typeof (FormatException))]
                public void Parse_CommaAfterHours ()
index ddfc099b73d747a675834ebb8a185976ad16a201..e45efdbd1a370cb1d46c416fbb6dd1ef30e64969 100644 (file)
@@ -1116,20 +1116,68 @@ namespace MonoTests.System
                                typeof (Action),
                                this.GetType ().GetMethod ("Banga"));
                }
-#if !MONOTOUCH
+
                [Test] // #664205
-               public void DynamicInvokeNullTarget ()
+               public void DynamicInvokeClosedStatic ()
                {
-                       var method = new DynamicMethod ("test", typeof (int), new [] { typeof (object) }, true);
-                       var il = method.GetILGenerator ();
-                       il.Emit (OpCodes.Ldc_I4, 42);
-                       il.Emit (OpCodes.Ret);
+                       var d1 = Delegate.CreateDelegate (typeof(Func<int>), null, typeof(DelegateTest).GetMethod ("DynamicInvokeClosedStaticDelegate_CB"));
+                       Assert.AreEqual (1, d1.DynamicInvoke (), "#1");
+
+                       var d2 = Delegate.CreateDelegate (typeof(Func<int>), "arg", typeof(DelegateTest).GetMethod ("DynamicInvokeClosedStaticDelegate_CB"));
+                       Assert.AreEqual (2, d2.DynamicInvoke (), "#2");
+               }
+
+               public static int DynamicInvokeClosedStaticDelegate_CB (string instance)
+               {
+                       switch (instance) {
+                       case null:
+                               return 1;
+                       case "arg":
+                               return 2;
+                       default:
+                               Assert.Fail ();
+                               return -1;
+                       }
+               }
 
-                       var @delegate = method.CreateDelegate (typeof (Func<int>), null);
+               [Test]
+               public void DynamicInvokeOpenInstanceDelegate ()
+               {
+                       var d1 = Delegate.CreateDelegate (typeof (Func<DelegateTest, int>), typeof(DelegateTest).GetMethod ("DynamicInvokeOpenInstanceDelegate_CB"));
+                       Assert.AreEqual (5, d1.DynamicInvoke (new DelegateTest ()), "#1");
 
-                       Assert.AreEqual (42, (int) @delegate.DynamicInvoke ());
+                       var d3 = (Func<DelegateTest, int>) d1;
+                       Assert.AreEqual (5, d3 (null), "#2");
                }
-#endif
+
+               public int DynamicInvokeOpenInstanceDelegate_CB ()
+               {
+                       return 5;
+               }
+
+               [Test]
+               public void DynamicInvoke_InvalidArguments ()
+               {
+                       Delegate d = new Func<int, int> (TestMethod);
+
+                       try {
+                               d.DynamicInvoke (null);
+                               Assert.Fail ("#1");
+                       } catch (TargetParameterCountException) {
+                       }
+
+                       try {
+                               d.DynamicInvoke (new object [0]);
+                               Assert.Fail ("#2");
+                       } catch (TargetParameterCountException) {
+                       }
+               }
+
+               public static int TestMethod (int i)
+               {
+                       throw new NotSupportedException ();
+               }
+
 #endif
                public static void CreateDelegateOfStaticMethodBoundToNull_Helper (object[] args) {}
 
@@ -1329,17 +1377,56 @@ namespace MonoTests.System
                        } catch (ArgumentException) {}
                }
 
-        private static Func<Int32, Int32, bool> Int32D = (x, y) => (x & y) == y;
-
                [Test]
                public void EnumBaseTypeConversion () {
+                       Func<int, int, bool> dm = Int32D2;
                        var d =
-                               Delegate.CreateDelegate(typeof (Func<StringComparison,
-                                                                                               StringComparison, bool>), Int32D.Method) as
+                               Delegate.CreateDelegate(typeof (Func<StringComparison, StringComparison, bool>), dm.Method) as
                                Func<StringComparison, StringComparison, bool>; 
                        Assert.IsTrue (d (0, 0));
                }
 
+#if !MONOTOUCH
+               public static void DynInvokeWithClosedFirstArg (object a, object b)
+               {
+               }
+
+               [Test]
+               public void DynamicInvokeClosedOverNullDelegate () {
+                       var dm = new DynamicMethod ("test", typeof (Delegate), null);
+                       var il = dm.GetILGenerator ();
+                       il.Emit (OpCodes.Ldnull);
+                       il.Emit (OpCodes.Ldftn, GetType ().GetMethod ("DynInvokeWithClosedFirstArg"));
+                       il.Emit (OpCodes.Newobj, typeof (Action<object>).GetConstructors ()[0]);
+                       il.Emit (OpCodes.Ret);
+
+                       var f = (Func <object>) dm.CreateDelegate (typeof (Func <object>));
+                       Action<object> ac = (Action<object>)f();
+                       ac.DynamicInvoke (new object[] { "oi" });
+                       ac.DynamicInvoke (new object[] { null });
+               }
+
+               [Test]
+               public void DynamicInvokeFirstArgBoundDelegate () {
+                       var dm = new DynamicMethod ("test", typeof (Delegate), null);
+                       var il = dm.GetILGenerator ();
+                       il.Emit (OpCodes.Ldstr, "test");
+                       il.Emit (OpCodes.Ldftn, GetType ().GetMethod ("DynInvokeWithClosedFirstArg"));
+                       il.Emit (OpCodes.Newobj, typeof (Action<object>).GetConstructors ()[0]);
+                       il.Emit (OpCodes.Ret);
+
+                       var f = (Func <object>) dm.CreateDelegate (typeof (Func <object>));
+                       Action<object> ac = (Action<object>)f();
+                       ac.DynamicInvoke (new object[] { "oi" });
+                       ac.DynamicInvoke (new object[] { null });
+               }
+#endif
+
+               static bool Int32D2 (int x, int y)
+               {
+                       return (x & y) == y; 
+               }
+
                public class B {
 
                        public virtual string retarg3 (string s) {
index 4425baaaf85096fb16deaf3dfc370f7116bef921..8b6823ac1013396ef58fb0d23f905e5557d07032 100644 (file)
@@ -740,6 +740,10 @@ namespace MonoTests.System
                        success = Enum.TryParse<TestingEnum> ("is", true, out result);
                        Assert.AreEqual (true, success, "#D1");
                        Assert.AreEqual (TestingEnum.Is, result, "#D2");
+
+                       success = Enum.TryParse<TestingEnum> ("  Is  ", out result);
+                       Assert.AreEqual (true, success, "#E1");
+                       Assert.AreEqual (TestingEnum.Is, result, "#E2");
                }
 #endif
 
index 01885f9767cb6ebdd1d66a124741d7068b87b820..6fb77f4d0fe0105c6296ee86666a626a7ff01598 100644 (file)
@@ -273,6 +273,7 @@ namespace MonoTests.System
                public void ConcurrentInitialization ()
                {
                        var init = new AutoResetEvent (false);
+                       var e1_set = new AutoResetEvent (false);
 
                        var lazy = new Lazy<string> (() => {
                                init.Set ();
@@ -286,6 +287,7 @@ namespace MonoTests.System
                                        string value = lazy.Value;
                                } catch (Exception ex) {
                                        e1 = ex;
+                                       e1_set.Set ();
                                }
                        });
                        thread.Start ();
@@ -306,8 +308,9 @@ namespace MonoTests.System
                                e3 = ex;
                        }
 
-                       Assert.AreSame (e1, e2, "#2");
-                       Assert.AreSame (e1, e3, "#3");
+                       Assert.IsTrue (e1_set.WaitOne (3000), "#2");
+                       Assert.AreSame (e1, e2, "#3");
+                       Assert.AreSame (e1, e3, "#4");
                }
 
        }
index 20fc57d86ca0b62202d7bb5995864715ea27fd65..43e03fbfa33674b15669ac0e96e7cdbe64ccd6ae 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
index c15c6137786a511569b25f0f4e809a630dd4dd10..04353c4546900bc12021ea0b7fa92a0fa6ea1eaa 100644 (file)
@@ -63,14 +63,21 @@ namespace Monodoc.Generators.Html
 
                public string Htmlize (XmlReader ecma_xml, XsltArgumentList args)
                {
-                       EnsureTransform ();
-               
-                       var output = new StringBuilder ();
-                       ecma_transform.Transform (ecma_xml, 
-                                                 args, 
-                                                 XmlWriter.Create (output, ecma_transform.OutputSettings),
-                                                 CreateDocumentResolver ());
-                       return output.ToString ();
+                       try{
+                               EnsureTransform ();
+                       
+                               var output = new StringBuilder ();
+                               ecma_transform.Transform (ecma_xml, 
+                                                         args, 
+                                                         XmlWriter.Create (output, ecma_transform.OutputSettings),
+                                                         CreateDocumentResolver ());
+                               return output.ToString ();
+                       }
+                       catch(Exception x)
+                       {
+                               var msg = x.ToString ();
+                               return msg;
+                       }
                }
                
                protected virtual XmlResolver CreateDocumentResolver ()
@@ -81,21 +88,14 @@ namespace Monodoc.Generators.Html
 
                public string Export (Stream stream, Dictionary<string, string> extraArgs)
                {
-                       return Htmlize (XmlReader.Create (WrapStream (new StreamReader (stream), extraArgs)), extraArgs);
+                       return Htmlize (XmlReader.Create (new StreamReader(stream)), extraArgs);
                }
 
                public string Export (string input, Dictionary<string, string> extraArgs)
                {
-                       return Htmlize (XmlReader.Create (WrapStream (new StringReader (input), extraArgs)), extraArgs);
+                       return Htmlize (XmlReader.Create (new StringReader(input)), extraArgs);
                }
 
-               TextReader WrapStream (TextReader initialReader, Dictionary<string, string> renderArgs)
-               {
-                       string show;
-                       if (renderArgs.TryGetValue ("show", out show) && show == "namespace")
-                               return new AvoidCDataTextReader (initialReader);
-                       return initialReader;
-               }
                
                static void EnsureTransform ()
                {
@@ -329,81 +329,5 @@ namespace Monodoc.Generators.Html
                        }
                }
        }
-
-       public class AvoidCDataTextReader : TextReader
-       {
-               static readonly char[] CDataPattern = new[] {
-                       '<', '!', '[', 'C', 'D', 'A', 'T', 'A', '['
-               };
-               static readonly char[] CDataClosingPattern = new[] {
-                       ']', ']', '>'
-               };
-               TextReader wrappedReader;
-               char[] backingArray = new char[9]; // "<![CDATA[".Length
-               int currentIndex = -1;
-               int eofIndex = -1;
-               bool inCData;
-
-               public AvoidCDataTextReader (TextReader wrappedReader)
-               {
-                       this.wrappedReader = wrappedReader;
-               }
-
-               public override int Peek ()
-               {
-                       if (!EnsureBuffer ())
-                               return -1;
-                       return (int)backingArray[currentIndex];
-               }
-
-               public override int Read ()
-               {
-                       if (!EnsureBuffer ())
-                               return -1;
-                       var result = (int)backingArray[currentIndex];
-                       var next = wrappedReader.Read ();
-                       if (next == -1 && eofIndex == -1)
-                               eofIndex = currentIndex;
-                       else
-                               backingArray[currentIndex] = (char)next;
-                       currentIndex = (currentIndex + 1) % backingArray.Length;
-                       return result;
-               }
-
-               void ReadLength (int length)
-               {
-                       for (int i = 0; i < length; i++)
-                               Read ();
-               }
-
-               bool EnsureBuffer ()
-               {
-                       if (currentIndex == -1) {
-                               currentIndex = 0;
-                               var read = wrappedReader.ReadBlock (backingArray, 0, backingArray.Length);
-                               if (read < backingArray.Length)
-                                       eofIndex = read;
-                               return read > 0;
-                       } else if (currentIndex == eofIndex) {
-                               return false;
-                       }
-                       if (!inCData && PatternDetect (CDataPattern)) {
-                               inCData = true;
-                               ReadLength (CDataPattern.Length);
-                               return EnsureBuffer ();
-                       }
-                       if (inCData && PatternDetect (CDataClosingPattern)) {
-                               inCData = false;
-                               ReadLength (CDataClosingPattern.Length);
-                               return EnsureBuffer ();
-                       }
-
-                       return true;
-               }
-
-               bool PatternDetect (char[] pattern)
-               {
-                       return backingArray[currentIndex] == pattern[0] && Enumerable.Range (1, pattern.Length - 1).All (i => backingArray[(currentIndex + i) % backingArray.Length] == pattern[i]);
-               }
-       }
+               
 }
index 23bf89778c8ec9afabbda5da38e7bc280361b05a..7a866432d63f96cc93c8f9c0028671ea0075bbbb 100644 (file)
@@ -49,7 +49,7 @@ namespace Monodoc.Providers
                                ObjectEntryToParams (inner, out caption, out element);
                                // Don't add if the backing file doesn't exist
                                if (!File.Exists (element)) {
-                                       Console.Error.WriteLine ("File `{0}' referenced in TOC but it doesn't exist.", element);
+                                       Console.Error.WriteLine ("Warning: File `{0}' referenced in TOC but it doesn't exist. It will be ignored.", element);
                                        continue;
                                }
                                using (var file = File.OpenRead (element))
diff --git a/mcs/class/monodoc/Test/Monodoc.Generators/AvoidCDataTextReaderTests.cs b/mcs/class/monodoc/Test/Monodoc.Generators/AvoidCDataTextReaderTests.cs
deleted file mode 100644 (file)
index 5ab8e84..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Xml;
-using System.Collections.Generic;
-
-using NUnit.Framework;
-
-using Monodoc;
-using Monodoc.Generators;
-using Monodoc.Generators.Html;
-
-namespace MonoTests.Monodoc.Generators
-{
-       [TestFixture]
-       public class AvoidCDataTextReaderTest
-       {
-               void AssertSameInputOutput (string expected, string input)
-               {
-                       var processed = new AvoidCDataTextReader (new StringReader (input)).ReadToEnd ();
-                       Assert.AreEqual (expected, processed);
-               }
-
-               [Test]
-               public void NoCDataXmlTest ()
-               {
-                       var input = @"<elements><summary>Addressbook APIs.</summary><remarks /><class name=""ABAddressBook"" fullname=""MonoTouch.AddressBook.ABAddressBook"" assembly=""monotouch""><summary>
-      Provides access to the system Address Book.
-    </summary></class></elements>";
-
-                       AssertSameInputOutput (input, input);
-               }
-
-               [Test]
-               public void WithCDataXmlTest ()
-               {
-                       var input = @"<elements><summary>Addressbook APIs.</summary><remarks /><class name=""ABAddressBook"" fullname=""MonoTouch.AddressBook.ABAddressBook"" assembly=""monotouch""><summary><![CDATA[
-      Provides access to the system Address Book.]]>
-    </summary></class></elements>";
-
-                       AssertSameInputOutput (input.Replace ("<![CDATA[", string.Empty).Replace ("]]>", string.Empty), input);
-               }
-
-               [Test]
-               public void PartialCDataXmlTest ()
-               {
-                       var input = @"<elements><summary>Addressbook APIs.</summary><remarks /><class name=""ABAddressBook"" fullname=""MonoTouch.AddressBook.ABAddressBook"" assembly=""monotouch""><summary><![CDA[
-      Provides access to the system Address Book.]]>
-    </summary></class></elements>";
-
-                       AssertSameInputOutput (input, input);
-               }
-
-               [Test]
-               public void FinishWithPartialCDataXmlTest ()
-               {
-                       var input = @"<elements><summary>Addressbook APIs.</summary><remarks /><class name=""ABAddressBook"" fullname=""MonoTouch.AddressBook.ABAddressBook"" assembly=""monotouch""><summary>
-      Provides access to the system Address Book.
-    </summary></class></elements><![CDA[";
-
-                       AssertSameInputOutput (input, input);
-               }
-
-               [Test]
-               public void FinishWithCDataXmlTest ()
-               {
-                       var input = @"<elements><summary>Addressbook APIs.</summary><remarks /><class name=""ABAddressBook"" fullname=""MonoTouch.AddressBook.ABAddressBook"" assembly=""monotouch""><summary>
-      Provides access to the system Address Book.
-    </summary></class></elements><![CDATA[";
-
-                       AssertSameInputOutput (input.Replace ("<![CDATA[", string.Empty), input);
-               }
-
-               [Test]
-               public void EmptyInputTest ()
-               {
-                       AssertSameInputOutput (string.Empty, string.Empty);
-               }
-
-               [Test]
-               public void LimitedInputTest ()
-               {
-                       AssertSameInputOutput ("foo", "foo");
-               }
-       }
-}
index 7b709f70f53b195636691fad0cfc8764e11622bc..d412797a8ff57e7317ecd776acdb014113c4fea9 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
   <ItemGroup>\r
     <ProjectReference Include="../corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib-net_4_5.csproj">\r
       <Project>{0B587DBA-BA92-4B92-821A-AA200C612A7E}</Project>\r
-      <Name>ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib-net_4_5</Name>\r
+      <Name>ICSharpCode.SharpZipLib-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System/System-net_4_5.csproj">\r
       <Project>{FFAC0B73-D997-493B-9C62-27656CD858BB}</Project>\r
-      <Name>System\System-net_4_5</Name>\r
+      <Name>System-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_5.csproj">\r
       <Project>{D92530F4-3F2B-4351-BD21-9D6BEE6D2A4E}</Project>\r
-      <Name>System.Core\System.Core-net_4_5</Name>\r
+      <Name>System.Core-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.XML/System.Xml-net_4_5.csproj">\r
       <Project>{2951DEC2-4393-4A78-83F9-42EB39CB708F}</Project>\r
-      <Name>System.XML\System.Xml-net_4_5</Name>\r
+      <Name>System.Xml-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Xml.Linq/System.Xml.Linq-net_4_5.csproj">\r
       <Project>{8328796E-8A15-4972-8F1E-2F15E7D57C42}</Project>\r
-      <Name>System.Xml.Linq\System.Xml.Linq-net_4_5</Name>\r
+      <Name>System.Xml.Linq-net_4_5</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../System.Configuration/System.Configuration-net_4_5.csproj">\r
       <Project>{D52A2CEA-245E-4877-950E-3EAC5F541B8E}</Project>\r
-      <Name>System.Configuration\System.Configuration-net_4_5</Name>\r
+      <Name>System.Configuration-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index b5af3b71a048f0191190b9b0a7704a9be14dc852..b806b8fb6e970302dd755c331a070e831781639a 100644 (file)
@@ -6,4 +6,3 @@ Monodoc/SettingsTest.cs
 Monodoc.Generators/RawGeneratorTests.cs
 Monodoc/NodeTest.cs
 Monodoc/RootTreeTest.cs
-Monodoc.Generators/AvoidCDataTextReaderTests.cs
diff --git a/mcs/errors/CS0012-23-lib.il b/mcs/errors/CS0012-23-lib.il
new file mode 100644 (file)
index 0000000..2f99677
--- /dev/null
@@ -0,0 +1,26 @@
+.assembly extern mscorlib
+{
+}
+
+.assembly extern System.Core
+{
+}
+
+.assembly extern 'CS0012-lib-missing'
+{
+}
+
+.assembly 'CS0012-23-lib'
+{
+  .hash algorithm 0x00008004
+  .ver 0:0:0:0
+}
+
+.module 'CS0012-23-lib.dll'
+
+
+.class public abstract auto ansi sealed beforefieldinit B
+       extends [mscorlib]System.Object
+{
+  .field  public static valuetype ['CS0012-lib-missing']Struct`1<int32>[] ArrayMember
+}
diff --git a/mcs/errors/CS1607-3-lib.cs b/mcs/errors/CS1607-3-lib.cs
deleted file mode 100644 (file)
index 3066cf9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyVersion ("1.0.0.0")]
-[assembly: AssemblyCulture ("en-US")]
-
-public class Lang
-{
-}
diff --git a/mcs/errors/CS8009-lib.cs b/mcs/errors/CS8009-lib.cs
new file mode 100644 (file)
index 0000000..3066cf9
--- /dev/null
@@ -0,0 +1,10 @@
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyVersion ("1.0.0.0")]
+[assembly: AssemblyCulture ("en-US")]
+
+public class Lang
+{
+}
index dc76a1cd6f707393242c72c7e5cb5622e91c83c2..f994abac1ea394d1af4d5f194ee41dff18791ee7 100644 (file)
@@ -21,7 +21,7 @@ DISTFILES = \
        $(wildcard dlls/second/*.cs)
 
 TEST_SUPPORT_FILES = \
-       CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \
+       CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0012-23-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \
        CS0103-2-lib.dll CS0118-2-lib.dll CS0122-8-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0122-19-lib.dll CS0122-35-lib.dll CS0122-36-lib.dll CS0143-lib.dll CS0144-3-lib.dll CS0165-19-lib.dll \
        CS0205-3-lib.dll CS0246-29-lib.dll CS0229-3-lib.dll CS0229-4-lib.dll CS0266-25-lib.dll \
        CS0315-2-lib.dll \
@@ -32,9 +32,10 @@ TEST_SUPPORT_FILES = \
        CS0730-lib.dll CS0731-1-lib.dll CS0731-2-lib.dll \
        CS1070-lib.dll \
        CS1540-15-lib.dll CS1540-17-lib.dll CS1542-lib.dll CS1577-lib.dll \
-       CS1607-3-lib.dll CS1683-lib.dll CS1684-lib.dll CS1685-2-lib.dll \
+       CS1683-lib.dll CS1684-lib.dll CS1685-2-lib.dll \
        dlls/first/CS1701-lib.dll dlls/second/CS1701-lib.dll CS1701-lib.dll dlls/first/CS1702-lib.dll dlls/second/CS1702-lib.dll CS1702-lib.dll dlls/first/CS1705-lib.dll dlls/second/CS1705-lib.dll CS1705-lib.dll \
        CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \
+       CS8009-lib.dll \
        CSFriendAssembly-lib.dll \
        dlls/first/CS1703-lib.dll dlls/first/CS1704-lib.dll \
        dlls/second/CS1703-lib.dll dlls/second/CS1704-lib.dll
diff --git a/mcs/errors/cs0012-23.cs b/mcs/errors/cs0012-23.cs
new file mode 100644 (file)
index 0000000..a8b454a
--- /dev/null
@@ -0,0 +1,11 @@
+// CS0012: The type `Struct`1<int>' is defined in an assembly that is not referenced. Consider adding a reference to assembly `CS0012-lib-missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
+// Line: 9
+// Compiler options: -r:CS0012-23-lib.dll
+
+public class C
+{
+       public static void Main ()
+       {
+               var val = B.ArrayMember;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0023-20.cs b/mcs/errors/cs0023-20.cs
new file mode 100644 (file)
index 0000000..ffde8ad
--- /dev/null
@@ -0,0 +1,13 @@
+// CS0023: The `?' operator cannot be applied to operand of type `int'
+// Line: 11
+
+using System;
+
+class C
+{
+       static void Main()
+       {
+               int k = 0;
+               var r = k?.ToString ();
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0023-21.cs b/mcs/errors/cs0023-21.cs
new file mode 100644 (file)
index 0000000..98f0c06
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0023: The `?' operator cannot be applied to operand of type `int*'
+// Line: 10
+// Compiler options: -unsafe
+
+class C
+{
+       unsafe static void Main ()
+       {
+               int* arr = null;
+               var v2 = arr?.ToString ();
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0023-22.cs b/mcs/errors/cs0023-22.cs
new file mode 100644 (file)
index 0000000..ce5c0b2
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0023: The `?' operator cannot be applied to operand of type `null'
+// Line: 8
+
+class C
+{
+       static void Main ()
+       {
+               var res = null?[0];
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0023-23.cs b/mcs/errors/cs0023-23.cs
new file mode 100644 (file)
index 0000000..ae7db34
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0023: The `?' operator cannot be applied to operand of type `void'
+// Line: 10
+
+using System;
+
+class C
+{
+       static void Main ()
+       {
+               var v = Console.WriteLine ()?[0];
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0070-2.cs b/mcs/errors/cs0070-2.cs
new file mode 100644 (file)
index 0000000..95f9cdb
--- /dev/null
@@ -0,0 +1,24 @@
+// CS0070: The event `A.evt' can only appear on the left hand side of += or -= when used outside of the type `A'
+// Line: 22
+
+using System;
+
+public static class EventExtensions
+{
+       public static void Raise (this EventHandler h)
+       {
+       }
+}
+
+public class A
+{
+       public event EventHandler evt;
+}
+
+public class B : A
+{
+       public void Run()
+       {
+               Action a = () => evt.Raise ();
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0100-8.cs b/mcs/errors/cs0100-8.cs
new file mode 100644 (file)
index 0000000..8248511
--- /dev/null
@@ -0,0 +1,7 @@
+// CS100: The parameter name `obj' is a duplicate
+// Line: 6
+
+abstract class C
+{
+       public abstract int this [object obj, object obj] => 1;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0102-99.cs b/mcs/errors/cs0102-99.cs
deleted file mode 100644 (file)
index b07a246..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// CS0102: The type `Part' already contains a definition for `arg'
-// Line: 6
-
-partial class Part
-{
-       int arg;
-}
-
-partial class Part(int arg)
-{
-}
\ No newline at end of file
diff --git a/mcs/errors/cs0103-13.cs b/mcs/errors/cs0103-13.cs
new file mode 100644 (file)
index 0000000..891a155
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0103: The name `value' does not exist in the current context
+// Line: 8
+
+class X (double value)
+{
+       public static double Prop {
+               get {
+                       return value;
+               }
+       }
+}
+
diff --git a/mcs/errors/cs0103-14.cs b/mcs/errors/cs0103-14.cs
new file mode 100644 (file)
index 0000000..80f1e62
--- /dev/null
@@ -0,0 +1,10 @@
+// C0103: The name `s' does not exist in the current context
+// Line: 7
+
+class Test(string s)
+{
+       public Test ()
+               : this (s)
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0121-25.cs b/mcs/errors/cs0121-25.cs
new file mode 100644 (file)
index 0000000..4461673
--- /dev/null
@@ -0,0 +1,33 @@
+// CS0121: The call is ambiguous between the following methods or properties: `A.B.X.Test(int)' and `A.C.X.Test(int)'
+// Line: 31
+
+using A.B.X;
+using A.C.X;
+
+namespace A.B
+{
+       static class X
+       {
+               public static void Test (int o)
+               {
+               }
+       }
+}
+
+namespace A.C
+{
+       static class X
+       {
+               public static int Test (int o)
+               {
+               }
+       }
+}
+
+class M
+{
+       public static void Main ()
+       {
+               Test (0);
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0127-2.cs b/mcs/errors/cs0127-2.cs
deleted file mode 100644 (file)
index 1b36551..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// CS0127: `C.GetValue()': A return keyword must not be followed by any expression when method returns void
-// Line: 11
-
-using System;
-using System.Threading.Tasks;
-
-class C
-{
-       public async void GetValue()
-       {
-               return await Task.FromResult(100);
-       }
-}
diff --git a/mcs/errors/cs0127-3.cs b/mcs/errors/cs0127-3.cs
deleted file mode 100644 (file)
index 5e39cb9..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// CS0127: `System.Action': A return keyword must not be followed by any expression when delegate returns void
-// Line: 10
-
-using System;
-
-class C
-{
-       public void Test ()
-       {
-               Action a = () => { return Skip (); };
-       }
-       
-       void Skip ()
-       {
-       }
-}
diff --git a/mcs/errors/cs0127-4.cs b/mcs/errors/cs0127-4.cs
deleted file mode 100644 (file)
index 64e3f96..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// CS0127: `D': A return keyword must not be followed by any expression when delegate returns void
-// Line: 9
-
-delegate void D (int x);
-
-class X {
-       static void Main ()
-       {
-               D d6 = delegate (int x) { return x; }; // Return type mismatch.
-       }
-}
diff --git a/mcs/errors/cs0133-6.cs b/mcs/errors/cs0133-6.cs
new file mode 100644 (file)
index 0000000..a523169
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0133: The expression being assigned to `o' must be constant
+// Line: 8
+
+class X
+{
+       void Foo ()
+       {
+               const object o = "" ?? null;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0133-7.cs b/mcs/errors/cs0133-7.cs
new file mode 100644 (file)
index 0000000..10d82d9
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0133: The expression being assigned to `o' must be constant
+// Line: 8
+
+class X
+{
+       void Foo ()
+       {
+               const object o = null ?? "";
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0136-18.cs b/mcs/errors/cs0136-18.cs
new file mode 100644 (file)
index 0000000..20630a4
--- /dev/null
@@ -0,0 +1,13 @@
+// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else
+// Line: 11
+
+using System;
+
+class A (Func<int, int> barg)
+{
+}
+
+class B (int arg) 
+       : A ((arg) => 1)
+{
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0136-19.cs b/mcs/errors/cs0136-19.cs
new file mode 100644 (file)
index 0000000..ae9e0f6
--- /dev/null
@@ -0,0 +1,13 @@
+// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else
+// Line: 11
+
+using System;
+
+partial class PC
+{
+    Func<int, int> f = (arg) => 1;
+}
+
+partial class PC (int arg) 
+{
+}
\ No newline at end of file
index ea0010ea51301fac2a3495d8082a18363eaf395c..8264e8dbf297cf66fce084e0393766a264e6447c 100644 (file)
@@ -1,5 +1,6 @@
 // CS0138: `System.Console' is a type not a namespace. A using namespace directive can only be applied to namespaces
 // Line: 5
+// Compiler options: -langversion:5
 
 using System;
 using System.Console;
diff --git a/mcs/errors/cs0151-3.cs b/mcs/errors/cs0151-3.cs
new file mode 100644 (file)
index 0000000..7644373
--- /dev/null
@@ -0,0 +1,19 @@
+// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type
+// Line: 15
+
+struct X 
+{
+    public static implicit operator int (X x)
+    {
+        return 1;
+    }
+
+       static void Main ()
+       {
+               X? x = null;
+               switch (x) {
+               default:
+                       break;
+               }
+       }
+}
diff --git a/mcs/errors/cs0151-4.cs b/mcs/errors/cs0151-4.cs
new file mode 100644 (file)
index 0000000..0e45b1a
--- /dev/null
@@ -0,0 +1,30 @@
+// CS0151: A switch expression of type `S1?' cannot be converted to an integral type, bool, char, string, enum or nullable type
+// Line: 24
+
+using System;
+
+struct S1
+{
+       public static implicit operator int? (S1? s)
+       {
+               throw new ApplicationException ();
+       }
+
+       public static implicit operator int (S1? s)
+       {
+               throw new ApplicationException ();
+       }
+}
+
+class C
+{
+       public static int Main ()
+       {
+               S1? s1 = new S1 ();
+               switch (s1)
+               {
+                       default:
+                               return 1;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0151-5.cs b/mcs/errors/cs0151-5.cs
new file mode 100644 (file)
index 0000000..3995a28
--- /dev/null
@@ -0,0 +1,19 @@
+// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type
+// Line: 19
+
+struct X 
+{
+       public static implicit operator int? (X x)
+       {
+               return 1;
+       }
+
+       static void Main ()
+       {
+               X? x = null;
+               switch (x) {
+               default:
+                       break;
+               }
+       }
+}
diff --git a/mcs/errors/cs0181-2.cs b/mcs/errors/cs0181-2.cs
new file mode 100644 (file)
index 0000000..6334606
--- /dev/null
@@ -0,0 +1,18 @@
+// CS0181: Attribute constructor parameter has type `int[][]', which is not a valid attribute parameter type
+// Line: 13
+
+using System;
+
+class TestAttribute: Attribute
+{
+       public TestAttribute (int[][] o) {}
+}
+
+public class E
+{
+       [Test (null)]
+       public static void Main ()
+       {
+               System.Reflection.MethodBase.GetCurrentMethod().GetCustomAttributes (true);
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0181-3.cs b/mcs/errors/cs0181-3.cs
new file mode 100644 (file)
index 0000000..6e2f5b6
--- /dev/null
@@ -0,0 +1,21 @@
+// CS0181: Attribute constructor parameter has type `System.Enum', which is not a valid attribute parameter type
+// Line: 18
+
+using System;
+
+enum E
+{ 
+       Value
+}
+
+class AAttribute : Attribute
+{ 
+       public AAttribute (Enum e)
+       {
+       }
+}
+
+[A (E.Value)]
+class Test
+{
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0181-4.cs b/mcs/errors/cs0181-4.cs
new file mode 100644 (file)
index 0000000..80ed562
--- /dev/null
@@ -0,0 +1,16 @@
+// CS0181: Attribute constructor parameter has type `System.Attribute', which is not a valid attribute parameter type
+// Line: 6
+
+using System;
+
+[BAttribute (null)]
+public class BAttribute : Attribute
+{
+       public BAttribute (Attribute a)
+       {
+       }
+       
+       public static void Main ()
+       {
+       }
+}
diff --git a/mcs/errors/cs0181.cs b/mcs/errors/cs0181.cs
new file mode 100644 (file)
index 0000000..f04342c
--- /dev/null
@@ -0,0 +1,15 @@
+// CS0181: Attribute constructor parameter has type `int[,]', which is not a valid attribute parameter type
+// Line: 13
+
+using System;
+
+class TestAttribute: Attribute
+{
+    public TestAttribute (int[,] i) {}
+}
+
+public class E
+{
+    [Test (null)]
+    public void Method () {}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0182-10.cs b/mcs/errors/cs0182-10.cs
deleted file mode 100644 (file)
index 1ce2d2f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
-// Line: 13
-
-using System;
-
-class TestAttribute: Attribute
-{
-       public TestAttribute (int[][] o) {}
-}
-
-public class E
-{
-       [Test (null)]
-       public static void Main ()
-       {
-               System.Reflection.MethodBase.GetCurrentMethod().GetCustomAttributes (true);
-       }
-}
\ No newline at end of file
diff --git a/mcs/errors/cs0182-12.cs b/mcs/errors/cs0182-12.cs
deleted file mode 100644 (file)
index 2827f63..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
-// Line: 18
-
-using System;
-
-enum E
-{ 
-       Value
-}
-
-class AAttribute : Attribute
-{ 
-       public AAttribute (Enum e)
-       {
-       }
-}
-
-[A (E.Value)]
-class Test
-{
-}
\ No newline at end of file
diff --git a/mcs/errors/cs0182-13.cs b/mcs/errors/cs0182-13.cs
deleted file mode 100644 (file)
index 8c764b2..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
-// Line: 6
-
-using System;
-
-[BAttribute (null)]
-public class BAttribute : Attribute
-{
-       public BAttribute (Attribute a)
-       {
-       }
-       
-       public static void Main ()
-       {
-       }
-}
diff --git a/mcs/errors/cs0182-2.cs b/mcs/errors/cs0182-2.cs
deleted file mode 100644 (file)
index b988a04..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
-// Line: 13
-
-using System;
-
-class TestAttribute: Attribute
-{
-    public TestAttribute (int[,] i) {}
-}
-
-public class E
-{
-    [Test (null)]
-    public void Method () {}
-}
\ No newline at end of file
diff --git a/mcs/errors/cs0253-3.cs b/mcs/errors/cs0253-3.cs
new file mode 100644 (file)
index 0000000..0cf7968
--- /dev/null
@@ -0,0 +1,15 @@
+// CS0253: Possible unintended reference comparison. Consider casting the right side expression to type `System.Action' to get value comparison
+// Line: 13
+// Compiler options: -warnaserror
+
+using System;
+
+class MainClass
+{
+       public static void Main ()
+       {
+               Action a = null;
+               object b = null;
+               var x = a == b;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0429-5.cs b/mcs/errors/cs0429-5.cs
new file mode 100644 (file)
index 0000000..1cc67a2
--- /dev/null
@@ -0,0 +1,26 @@
+// CS0429: Unreachable expression code detected
+// Line: 24
+// Compiler options: -warnaserror
+
+using System;
+
+struct S
+{
+}
+
+class C
+{
+       public static implicit operator S (C c)
+       {
+               return new S ();
+       }
+}
+
+class Program
+{
+       static void Main ()
+       {
+               C c = new C ();
+               Console.WriteLine (c ?? new S ());
+       }
+}
diff --git a/mcs/errors/cs0457-4.cs b/mcs/errors/cs0457-4.cs
new file mode 100644 (file)
index 0000000..787db3a
--- /dev/null
@@ -0,0 +1,27 @@
+// CS0457: Ambiguous user defined operators `D.implicit operator D(System.Action)' and `D.explicit operator D(Foo)' when converting from `method group' to `D'
+// Line: 25
+
+using System;
+
+public delegate void Foo ();
+
+class D
+{
+       public static implicit operator D (Action d)
+       {
+               return new D ();
+       }
+
+       public static explicit operator D (Foo d)
+       {
+               return new D ();
+       }
+}
+
+class Program
+{
+       static void Main()
+       {
+               D d = (D) Main;
+       }
+}
diff --git a/mcs/errors/cs0545-2.cs b/mcs/errors/cs0545-2.cs
new file mode 100644 (file)
index 0000000..61d3887
--- /dev/null
@@ -0,0 +1,16 @@
+// CS0545: `B.Prop': cannot override because `A.Prop' does not have accessible get accessor
+// Line: 13
+
+public class A
+{
+       public virtual string Prop {
+               set; private get;
+       }  
+}
+public class B : A
+{
+       sealed override public string Prop {
+               set { }
+       }   
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0546-2.cs b/mcs/errors/cs0546-2.cs
new file mode 100644 (file)
index 0000000..4cec448
--- /dev/null
@@ -0,0 +1,16 @@
+// CS0546: `B.Prop': cannot override because `A.Prop' does not have accessible set accessor
+// Line: 13
+
+public class A
+{
+       public virtual string Prop {
+               get; private set;
+       }
+}
+public class B : A
+{
+       sealed override public string Prop {
+               get { return ""; }
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0573-2.cs b/mcs/errors/cs0573-2.cs
deleted file mode 100644 (file)
index 50836de..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// CS0573: `A.a': Structs cannot have instance field initializers
-// Line: 5
-
-partial struct A {
-       int a = 1;
-}
diff --git a/mcs/errors/cs0573.cs b/mcs/errors/cs0573.cs
deleted file mode 100644 (file)
index deec3ea..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// CS0573: `A.a': Structs cannot have instance field initializers
-// Line: 5
-struct A {
-       int a = 1;
-}
-
-class D {
-       static void Main ()
-       {
-               A [] a = new A [10];
-
-       }
-}
diff --git a/mcs/errors/cs0579-9.cs b/mcs/errors/cs0579-9.cs
new file mode 100644 (file)
index 0000000..43461af
--- /dev/null
@@ -0,0 +1,22 @@
+// CS0579: The attribute `TestAttributesCollecting.A' cannot be applied multiple times
+// Line: 19
+
+using System;
+
+namespace TestAttributesCollecting
+{
+       class A : Attribute
+       {
+               public A (int a)
+               {
+               }
+       }
+
+       partial class G1<[A (1)]T>
+       {
+       }
+
+       partial class G1<[A (2)]T>
+       {
+       }
+}
diff --git a/mcs/errors/cs0591-2.cs b/mcs/errors/cs0591-2.cs
new file mode 100644 (file)
index 0000000..31df043
--- /dev/null
@@ -0,0 +1,9 @@
+// CS0591: Invalid value for argument to `System.Runtime.InteropServices.GuidAttribute' attribute
+// Line: 6
+
+using System.Runtime.InteropServices;
+
+[Guid ("aaa")]
+class X {
+static void Main () {}
+}
diff --git a/mcs/errors/cs0591-3.cs b/mcs/errors/cs0591-3.cs
new file mode 100644 (file)
index 0000000..8254a5b
--- /dev/null
@@ -0,0 +1,15 @@
+// CS0591: Invalid value for argument to `System.Runtime.InteropServices.DllImportAttribute' attribute
+// Line: 8
+
+using System.Runtime.InteropServices;
+using System;
+
+class X {
+       [DllImport ("")]
+       extern static void Blah ();
+
+    static void Main (string [] args)
+    {
+    }
+
+}
diff --git a/mcs/errors/cs0591-4.cs b/mcs/errors/cs0591-4.cs
new file mode 100644 (file)
index 0000000..adf1ff5
--- /dev/null
@@ -0,0 +1,15 @@
+// CS0591: Invalid value for argument to `System.Runtime.InteropServices.DllImportAttribute' attribute
+// Line: 8
+
+using System.Runtime.InteropServices;
+using System;
+
+class X {
+       [DllImport (null)]
+       extern static void Blah ();
+
+    static void Main (string [] args)
+    {
+    }
+
+}
diff --git a/mcs/errors/cs0591-5.cs b/mcs/errors/cs0591-5.cs
new file mode 100644 (file)
index 0000000..964dca9
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0591: Invalid value for argument to `System.Runtime.CompilerServices.MethodImplAttribute' attribute
+// Line: 8
+
+using System.Runtime.CompilerServices;
+
+class Test
+{
+       [MethodImplAttribute(445)]
+       public void test ()
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0591-6.cs b/mcs/errors/cs0591-6.cs
new file mode 100644 (file)
index 0000000..b9a4b2e
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0591: Invalid value for argument to `System.Runtime.CompilerServices.MethodImplAttribute' attribute
+// Line: 8
+
+using System.Runtime.CompilerServices;
+
+class Program
+{
+       [MethodImpl((MethodImplOptions)255)]
+       void Foo()
+       {
+       }
+}
\ No newline at end of file
index 8d5dc46a009b77d70729d320d33cc9c1ea8ad7a7..6ffbe846b0f59517a4abf63508b47b71cdf672c4 100644 (file)
@@ -1,4 +1,4 @@
-// CS0591: Invalid value for argument to `System.AttributeUsage' attribute
+// CS0591: Invalid value for argument to `System.AttributeUsageAttribute' attribute
 // Line: 4
 
 [System.AttributeUsage(0)]
diff --git a/mcs/errors/cs0647-10.cs b/mcs/errors/cs0647-10.cs
deleted file mode 100644 (file)
index aa5c0e3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// CS0647: Error during emitting `System.Runtime.InteropServices.MarshalAsAttribute' attribute. The reason is `Specified unmanaged type is only valid on fields'
-// Line: 10
-
-using System;
-using System.Runtime.InteropServices;
-
-public class main {
-
-    [DllImport("libname", EntryPoint = "scumbag")]
-    static extern int scumbag(ref int X, [MarshalAs(UnmanagedType.ByValArray)] ref byte[] fb);
-}
diff --git a/mcs/errors/cs0647-11.cs b/mcs/errors/cs0647-11.cs
deleted file mode 100644 (file)
index aa5c0e3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// CS0647: Error during emitting `System.Runtime.InteropServices.MarshalAsAttribute' attribute. The reason is `Specified unmanaged type is only valid on fields'
-// Line: 10
-
-using System;
-using System.Runtime.InteropServices;
-
-public class main {
-
-    [DllImport("libname", EntryPoint = "scumbag")]
-    static extern int scumbag(ref int X, [MarshalAs(UnmanagedType.ByValArray)] ref byte[] fb);
-}
diff --git a/mcs/errors/cs0647-12.cs b/mcs/errors/cs0647-12.cs
deleted file mode 100644 (file)
index f1d8370..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty or null'
-// Line: 8
-
-using System.Runtime.InteropServices;
-using System;
-
-class X {
-       [DllImport ("")]
-       extern static void Blah ();
-
-    static void Main (string [] args)
-    {
-    }
-
-}
diff --git a/mcs/errors/cs0647-13.cs b/mcs/errors/cs0647-13.cs
deleted file mode 100644 (file)
index 96751a1..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty or null'
-// Line: 8
-
-using System.Runtime.InteropServices;
-using System;
-
-class X {
-       [DllImport (null)]
-       extern static void Blah ();
-
-    static void Main (string [] args)
-    {
-    }
-
-}
diff --git a/mcs/errors/cs0647-15.cs b/mcs/errors/cs0647-15.cs
deleted file mode 100644 (file)
index 104d2db..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value'
-// Line: 8
-
-using System.Runtime.CompilerServices;
-
-class Test
-{
-       [MethodImplAttribute(445)]
-       public void test ()
-       {
-       }
-}
\ No newline at end of file
diff --git a/mcs/errors/cs0647-16.cs b/mcs/errors/cs0647-16.cs
deleted file mode 100644 (file)
index 41c3e05..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// CS0647: Error during emitting `System.Reflection.AssemblyCultureAttribute' attribute. The reason is `The executables cannot be satelite assemblies, remove the attribute or keep it empty'
-// Line: 7
-
-using System;
-using System.Reflection;
-
-[assembly: AssemblyCulture("es")]
-[assembly: AssemblyVersion("1.2.3456.7")]
-
-namespace NS 
-{
-       class MyClass 
-       {
-               static void Main ()
-               {
-                       Console.WriteLine (typeof(MyClass).Assembly.FullName);
-               }
-       }
-}
diff --git a/mcs/errors/cs0647-17.cs b/mcs/errors/cs0647-17.cs
deleted file mode 100644 (file)
index 88117de..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Cs0647: Error during emitting `System.Reflection.AssemblyVersionAttribute' attribute. The reason is `Specified version `0.0.0.80420' is not valid'
-// Line: 7
-
-using System;
-using System.Reflection;
-
-[assembly: AssemblyVersion ("0.0.0.80420")]
-
-public class Test {
-
-       public static int Main ()
-       {
-               return 1;
-       }
-}
diff --git a/mcs/errors/cs0647-18.cs b/mcs/errors/cs0647-18.cs
deleted file mode 100644 (file)
index ce57d73..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// CS0647: Error during emitting `System.Reflection.AssemblyVersionAttribute' attribute. The reason is `Specified version `2.0.*.*' is not valid'
-// Line: 6
-
-using System.Reflection;
-
-[assembly: AssemblyVersion("2.0.*.*")]
diff --git a/mcs/errors/cs0647-19.cs b/mcs/errors/cs0647-19.cs
deleted file mode 100644 (file)
index 25b0400..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// CS0647: Error during emitting `System.Reflection.AssemblyVersionAttribute' attribute. The reason is `Specified version `2.*' is not valid'
-// Line: 6
-
-using System.Reflection;
-
-[assembly: AssemblyVersion("2.*")]
diff --git a/mcs/errors/cs0647-2.cs b/mcs/errors/cs0647-2.cs
deleted file mode 100644 (file)
index 5e05cfb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// CS0647: Error during emitting `System.Security.Permissions.SecurityPermissionAttribute' attribute. The reason is `SecurityAction `Demand' is not valid for this declaration'
-// Line : 10
-
-using System;
-using System.Security;
-using System.Security.Permissions;
-
-[assembly: SecurityPermission (SecurityAction.Demand, SkipVerification=true)]
-
-class Test
-{
-       static void Main () {}
-}
diff --git a/mcs/errors/cs0647-20.cs b/mcs/errors/cs0647-20.cs
deleted file mode 100644 (file)
index 2b03f1c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value'
-// Line: 8
-
-using System.Runtime.CompilerServices;
-
-class Program
-{
-       [MethodImpl((MethodImplOptions)255)]
-       void Foo()
-       {
-       }
-}
\ No newline at end of file
diff --git a/mcs/errors/cs0647-3.cs b/mcs/errors/cs0647-3.cs
deleted file mode 100644 (file)
index 272855d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// CS0647: Error during emitting `System.Security.Permissions.SecurityPermissionAttribute' attribute. The reason is `SecurityAction `RequestMinimum' is not valid for this declaration'
-// Line : 10
-
-using System;
-using System.Security;
-using System.Security.Permissions;
-
-public class Program {
-
-       [SecurityPermission (SecurityAction.RequestMinimum, ControlPrincipal=true, Flags=SecurityPermissionFlag.ControlPrincipal)]
-       static public void Main (string[] args)
-       {
-       }
-}
diff --git a/mcs/errors/cs0647-4.cs b/mcs/errors/cs0647-4.cs
deleted file mode 100644 (file)
index d799cee..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent'
-// Line : 10
-
-using System;
-using System.Security;
-using System.Security.Permissions;
-
-public class Program {
-
-       [DebugPermission (SecurityAction.RequestMinimum)]
-        public int i;
-}
-
-[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
-[Serializable]
-public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
-
-       public DebugPermissionAttribute (SecurityAction action)
-               : base (action)
-       {
-       }
-        
-       public override IPermission CreatePermission ()
-       {
-               return null;
-       }
-}
diff --git a/mcs/errors/cs0647-5.cs b/mcs/errors/cs0647-5.cs
deleted file mode 100644 (file)
index 20917f3..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent'
-// Line : 11
-
-using System;
-using System.Security;
-using System.Security.Permissions;
-
-public class Program {
-        public delegate int DisplayHandler (string msg);
-     
-       [DebugPermission (SecurityAction.RequestMinimum)]
-        public event DisplayHandler OnShow;
-}
-
-[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
-[Serializable]
-public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
-
-       public DebugPermissionAttribute (SecurityAction action)
-               : base (action)
-       {
-       }
-        
-       public override IPermission CreatePermission ()
-       {
-               return null;
-       }
-}
diff --git a/mcs/errors/cs0647-6.cs b/mcs/errors/cs0647-6.cs
deleted file mode 100644 (file)
index 9e7c37e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent'
-// Line : 11
-
-using System;
-using System.Security;
-using System.Security.Permissions;
-
-public class Program {
-
-        [return: DebugPermission (SecurityAction.LinkDemand)]
-        public int Show (string message)
-        {
-                return 2;
-        }    
-}
-
-[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
-[Serializable]
-public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
-
-       public DebugPermissionAttribute (SecurityAction action)
-               : base (action)
-       {
-       }
-        
-       public override IPermission CreatePermission ()
-       {
-               return null;
-       }
-}
diff --git a/mcs/errors/cs0647-7.cs b/mcs/errors/cs0647-7.cs
deleted file mode 100644 (file)
index 314fafe..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent'
-// Line : 11
-
-using System;
-using System.Security;
-using System.Security.Permissions;
-
-public class Program {
-
-        [DebugPermission (SecurityAction.LinkDemand)]
-        public int Show
-        {
-            get {
-                return 2;
-            }
-        }    
-}
-
-[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
-[Serializable]
-public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
-
-       public DebugPermissionAttribute (SecurityAction action)
-               : base (action)
-       {
-       }
-        
-       public override IPermission CreatePermission ()
-       {
-               return null;
-       }
-}
diff --git a/mcs/errors/cs0647-9.cs b/mcs/errors/cs0647-9.cs
deleted file mode 100644 (file)
index a7a1b38..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// CS0647: Error during emitting `System.Security.Permissions.PrincipalPermissionAttribute' attribute. The reason is `SecurityAction is out of range'
-// Line : 10
-
-using System;
-using System.Security;
-using System.Security.Permissions;
-
-public class Program {
-
-       [PrincipalPermission ((SecurityAction)100, Name="Poupou")]
-       public virtual void Show (string message)
-       {
-       }
-}
diff --git a/mcs/errors/cs0647.cs b/mcs/errors/cs0647.cs
deleted file mode 100644 (file)
index 154bfff..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// CS0647: Error during emitting `System.Runtime.InteropServices.GuidAttribute' attribute. The reason is `Invalid Guid format: aaa'
-// Line: 6
-
-using System.Runtime.InteropServices;
-
-[Guid ("aaa")]
-class X {
-static void Main () {}
-}
diff --git a/mcs/errors/cs0657-23.cs b/mcs/errors/cs0657-23.cs
new file mode 100644 (file)
index 0000000..2e6f6a6
--- /dev/null
@@ -0,0 +1,14 @@
+// CS0657: `field' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `param'. All attributes in this section will be ignored
+// Line: 9
+// Compiler options: -warnaserror
+
+using System;
+
+public class FieldAttribute : System.Attribute
+{
+}
+
+class X ([field:FieldAttribute] int foo)
+{
+       int v = foo;
+}
index 94c1f8510b9e0a78215697af9170e55777e8b4d5..eea4c130ea12f84ecf8d1f8ab3c658af097503b6 100644 (file)
@@ -1,6 +1,5 @@
-// CS0837: The `as' operator cannot be applied to a lambda expression or anonymous method
-// Line: 15
-
+// CS0837: The `as' operator cannot be applied to a lambda expression, anonymous method, or method group
+// Line: 14
 
 class X
 {
diff --git a/mcs/errors/cs0837-3.cs b/mcs/errors/cs0837-3.cs
new file mode 100644 (file)
index 0000000..de7ffd2
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group
+// Line: 10
+
+using System;
+class Test
+{
+       static void Main ()
+       {
+               var res = Main is object;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0837-4.cs b/mcs/errors/cs0837-4.cs
new file mode 100644 (file)
index 0000000..bc11afa
--- /dev/null
@@ -0,0 +1,13 @@
+// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group
+// Line: 11
+
+using System;
+using System.Linq.Expressions;
+
+class C
+{
+       public static void Main ()
+       {
+               Expression<Func<bool>> e = () => "1".ToString is string;
+       }
+}
\ No newline at end of file
index 7c56fd1addd7876801dc13bdd621c41075eedbde..c2ca9b8732a39a51df24cbb41c5f52ba217fa2c1 100644 (file)
@@ -1,4 +1,4 @@
-// CS0837: The `is' operator cannot be applied to a lambda expression or anonymous method
+// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group
 // Line: 8
 
 class X
diff --git a/mcs/errors/cs0840.cs b/mcs/errors/cs0840.cs
deleted file mode 100644 (file)
index bc4ee41..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// CS0840: `Test.Property.get' must have a body because it is not marked abstract or extern. The property can be automatically implemented when you define both accessors
-// Line: 7
-
-
-public abstract class Test
-{
-       public string Property { get; }
-}
diff --git a/mcs/errors/cs1061-15.cs b/mcs/errors/cs1061-15.cs
new file mode 100644 (file)
index 0000000..15b3864
--- /dev/null
@@ -0,0 +1,11 @@
+// CS1061: Type `int' does not contain a definition for `GetValueOrDefault' and no extension method `GetValueOrDefault' of type `int' could be found. Are you missing an assembly reference?
+// Line: 9
+
+class C
+{
+       static void Main ()
+       {
+               int? i = 4;
+               var m = i?.GetValueOrDefault ();
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1501-16.cs b/mcs/errors/cs1501-16.cs
new file mode 100644 (file)
index 0000000..4dcbe3e
--- /dev/null
@@ -0,0 +1,14 @@
+// CS1501: No overload for method `Block' takes `2' arguments
+// Line: 12
+
+class X
+{
+       public static void Block (object type, object variables, params object[] expressions)
+       {
+       }
+
+       public static void Main ()
+       {
+               Block (variables: null, expressions: null);
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1501-17.cs b/mcs/errors/cs1501-17.cs
new file mode 100644 (file)
index 0000000..ac57564
--- /dev/null
@@ -0,0 +1,14 @@
+// CS1501: No overload for method `Foo' takes `0' arguments
+// Line: 12
+
+class C
+{
+    static void Foo (string foo, params object [] moreFoo)
+    {
+    }
+
+    static void Main ()
+    {
+        Foo ();
+    }
+}
\ No newline at end of file
index 87f9e86f9a6306a1b53268ce3ee46d5c09313e69..dc8b7ce4da0f2ae64648fe8c2c5d2f76720adb5f 100644 (file)
@@ -1,4 +1,4 @@
-// CS1525: Unexpected symbol `}', expecting `(' or `{'
+// CS1525: Unexpected symbol `}', expecting `(', `{', or `=>'
 // Line: 6
 
 class MyClass
diff --git a/mcs/errors/cs1593-5.cs b/mcs/errors/cs1593-5.cs
new file mode 100644 (file)
index 0000000..6055fee
--- /dev/null
@@ -0,0 +1,27 @@
+// CS1593: Delegate `System.Action<System.Threading.Tasks.Task>' does not take `0' arguments
+// Line: 17
+
+using System;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+
+namespace CrashRepro.Core
+{
+       public class X
+       {               
+               async void Foo ()
+               {
+                       var pushes = await Run ().ContinueWith (l =>
+                       {
+                               for (int i = 0; i < 1; ++i)
+                                       Run ().ContinueWith(() => { });
+                       });
+               }
+
+               Task Run ()
+               {
+                       return null;
+               }
+       }
+}
+
diff --git a/mcs/errors/cs1607-2.cs b/mcs/errors/cs1607-2.cs
deleted file mode 100644 (file)
index 2d0c3de..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// CS1607: The version number `1.*' specified for `AssemblyFileVersion' is invalid
-// Line: 7
-// Compiler options: -warnaserror
-
-using System.Reflection;
-
-[assembly: AssemblyFileVersion ("1.*")]
diff --git a/mcs/errors/cs1607-3.cs b/mcs/errors/cs1607-3.cs
deleted file mode 100644 (file)
index 9268dfd..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// CS1607: Referenced assembly `CS1607-3-lib' has different culture setting of `en-US'
-// Line: 0
-// Compiler options: -r:CS1607-3-lib.dll -warnaserror
-
-using System;
-
-class Program
-{
-       static void Main ()
-       {
-               Console.WriteLine (typeof (Lang));
-       }
-}
index 6feb97925c79bb29e9e52577c2058724f8df774d..88f9c12deca51b8d214bd2e87c42b18b4efa6746 100644 (file)
@@ -1,3 +1,3 @@
-// CS1617: Invalid -langversion option `ISO'. It must be `ISO-1', `ISO-2', `3', `4', `5', `Default' or `Future'
+// CS1617: Invalid -langversion option `ISO'. It must be `ISO-1', `ISO-2', Default or value in range 1 to 6
 // Line: 0
 // Compiler options: -langversion:ISO
index ce867d1e71cdb59574562de4f94ffd663c657e8f..fe4e494dd375f2c7fd5d60a6c2e82e5578d0d7c8 100644 (file)
@@ -1,4 +1,4 @@
-// CS1644: Feature `automatically implemented properties' cannot be used because it is not part of the C# 2.0 language specification
+// CS1644: Feature `auto-implemented properties' cannot be used because it is not part of the C# 2.0 language specification
 // Line: 7
 // Compiler options: -langversion:ISO-2
 
diff --git a/mcs/errors/cs1644-35.cs b/mcs/errors/cs1644-35.cs
new file mode 100644 (file)
index 0000000..c97b37d
--- /dev/null
@@ -0,0 +1,17 @@
+// CS1644: Feature `exception filter' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 14
+// Compiler options: -langversion:5
+
+using System;
+
+class X
+{
+       public static void Main ()
+       {
+               int x = 4;
+               try {
+                       throw null;
+               } catch (Exception) if (x > 0) {
+               }
+       }
+}
diff --git a/mcs/errors/cs1644-36.cs b/mcs/errors/cs1644-36.cs
new file mode 100644 (file)
index 0000000..df2d30b
--- /dev/null
@@ -0,0 +1,8 @@
+// CS1644: Feature `auto-implemented property initializer' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C
+{
+       public static int P { get; } = 4;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1644-37.cs b/mcs/errors/cs1644-37.cs
new file mode 100644 (file)
index 0000000..37c997f
--- /dev/null
@@ -0,0 +1,7 @@
+// CS1644: Feature `primary constructor' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C (int arg)
+{
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1644-38.cs b/mcs/errors/cs1644-38.cs
new file mode 100644 (file)
index 0000000..0adbe60
--- /dev/null
@@ -0,0 +1,8 @@
+// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C
+{
+       int Prop => 3;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1644-39.cs b/mcs/errors/cs1644-39.cs
new file mode 100644 (file)
index 0000000..877c248
--- /dev/null
@@ -0,0 +1,8 @@
+// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C
+{
+       int M () => 0;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1644-40.cs b/mcs/errors/cs1644-40.cs
new file mode 100644 (file)
index 0000000..43ea9b0
--- /dev/null
@@ -0,0 +1,8 @@
+// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C
+{
+       int this [long arg] => -9;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1644-41.cs b/mcs/errors/cs1644-41.cs
new file mode 100644 (file)
index 0000000..0891786
--- /dev/null
@@ -0,0 +1,12 @@
+// CS1644: Feature `null propagating operator' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 10
+// Compiler options: -langversion:5
+
+class C
+{
+       static void Main ()
+       {
+               object o = null;
+               string s = o?.ToString ();
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1644-42.cs b/mcs/errors/cs1644-42.cs
new file mode 100644 (file)
index 0000000..aea12a8
--- /dev/null
@@ -0,0 +1,12 @@
+// CS1644: Feature `null propagating operator' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 10
+// Compiler options: -langversion:5
+
+class C
+{
+       static void Main ()
+       {
+               string[] a = null;
+               var s = a?[0];
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1650-3.cs b/mcs/errors/cs1650-3.cs
new file mode 100644 (file)
index 0000000..e0cfa0c
--- /dev/null
@@ -0,0 +1,19 @@
+// CS1650: Fields of static readonly field `C<T>.t' cannot be assigned to (except in a static constructor or a variable initializer)
+// Line: 17
+
+using System;
+
+interface I
+{
+       int X { get; set; }
+}
+
+class C<T> where T : struct, I
+{
+       static readonly T t;
+
+       public static void Foo ()
+       {
+               t.X = 42;
+       }
+}
index 4b2021994cd0981194e2c11040e74fe2fcce492c..975a2f2c7ac193c7dc538ccb7d9a60dc3e4d5d15 100644 (file)
@@ -1,4 +1,4 @@
-// CS1700: Assembly reference `MyAssemblyName, Version=' is invalid and cannot be resolved
+// CS1700: Friend assembly reference `MyAssemblyName, Version=' is invalid and cannot be resolved
 // Line: 8
 // Compiler options: -warnaserror -warn:3
 
diff --git a/mcs/errors/cs1953.cs b/mcs/errors/cs1953.cs
deleted file mode 100644 (file)
index ba5dbad..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// CS1953: An expression tree cannot contain an expression with method group
-// Line: 11
-
-using System;
-using System.Linq.Expressions;
-
-class C
-{
-       public static void Main ()
-       {
-               Expression<Func<bool>> e = () => "1".ToString is string;
-       }
-}
\ No newline at end of file
diff --git a/mcs/errors/cs1984.cs b/mcs/errors/cs1984.cs
deleted file mode 100644 (file)
index cf99841..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// CS1984: The `await' operator cannot be used in the body of a finally clause
-// Line: 13
-
-using System;
-using System.Threading.Tasks;
-
-class C
-{
-       public async Task Test ()
-       {
-               try {
-               } finally {
-                       await Call ();
-               }
-       }
-       
-       static Task Call ()
-       {
-               return null;
-       }
-}
diff --git a/mcs/errors/cs1985-2.cs b/mcs/errors/cs1985-2.cs
deleted file mode 100644 (file)
index 788d0e7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// CS1985: The `await' operator cannot be used in a catch clause
-// Line: 18
-
-using System;
-using System.Threading.Tasks;
-
-class X
-{
-       public static void Main ()
-       {
-       }
-
-       static async Task Test ()
-       {
-               int x = 4;
-               try {
-                       throw null;
-               } catch (NullReferenceException) if (await Foo ()) {
-                       return;
-               }
-       }
-
-       static Task<bool> Foo ()
-       {
-               throw new NotImplementedException ();
-       }
-}
\ No newline at end of file
diff --git a/mcs/errors/cs1985.cs b/mcs/errors/cs1985.cs
deleted file mode 100644 (file)
index 62d3642..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// CS1985: The `await' operator cannot be used in a catch clause
-// Line: 13
-
-using System;
-using System.Threading.Tasks;
-
-class C
-{
-       public async Task Test ()
-       {
-               try {
-               } catch {
-                       await Call ();
-               }
-       }
-       
-       static Task Call ()
-       {
-               return null;
-       }
-}
diff --git a/mcs/errors/cs1997-2.cs b/mcs/errors/cs1997-2.cs
deleted file mode 100644 (file)
index 9f8c533..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// CS1997: `System.Func<System.Threading.Tasks.Task>': A return keyword must not be followed by an expression when async delegate returns `Task'. Consider using `Task<T>' return type
-// Line: 12
-
-using System;
-using System.Threading.Tasks;
-
-class Test
-{
-       public static void Main()
-       {
-               Func<Task> t = async delegate {
-                       return null;
-               };
-
-               return;
-       }
-}
index e0e7caa4fb83d0723af18a2b26ef2ef1623fbb09..f6ac27d07eb4402e26c3a066472f827eb97a15c2 100644 (file)
@@ -1,4 +1,4 @@
-// CS4017: The CallerMemberName attribute cannot be applied because there is no standard conversion from `int' to `byte'
+// CS4017: The CallerLineNumberAttribute attribute cannot be applied because there is no standard conversion from `int' to `byte'
 // Line: 8
 
 using System.Runtime.CompilerServices;
diff --git a/mcs/errors/cs4024.cs b/mcs/errors/cs4024.cs
new file mode 100644 (file)
index 0000000..d3360ed
--- /dev/null
@@ -0,0 +1,17 @@
+// CS4024: The CallerLineNumberAttribute applied to parameter `x' will have no effect because it applies to a member that is used in context that do not allow optional arguments
+// Line: 14
+// Compiler options: -warnaserror
+
+using System.Runtime.CompilerServices;
+
+partial class D
+{
+       partial void Foo (int x = 2);
+}
+
+partial class D
+{
+       partial void Foo ([CallerLineNumber] int x)
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs4025.cs b/mcs/errors/cs4025.cs
new file mode 100644 (file)
index 0000000..6e9f203
--- /dev/null
@@ -0,0 +1,17 @@
+// CS4025: The CallerFilePath applied to parameter `x' will have no effect because it applies to a member that is used in context that do not allow optional arguments
+// Line: 14
+// Compiler options: -warnaserror
+
+using System.Runtime.CompilerServices;
+
+partial class D
+{
+       partial void Foo (string x = "x");
+}
+
+partial class D
+{
+       partial void Foo ([CallerFilePath] string x)
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs4026.cs b/mcs/errors/cs4026.cs
new file mode 100644 (file)
index 0000000..9497700
--- /dev/null
@@ -0,0 +1,17 @@
+// CS4026: The CallerMemberName applied to parameter `x' will have no effect because it applies to a member that is used in context that do not allow optional arguments
+// Line: 14
+// Compiler options: -warnaserror
+
+using System.Runtime.CompilerServices;
+
+partial class D
+{
+       partial void Foo (string x = "x");
+}
+
+partial class D
+{
+       partial void Foo ([CallerMemberName] string x)
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs4029.cs b/mcs/errors/cs4029.cs
new file mode 100644 (file)
index 0000000..14fce4f
--- /dev/null
@@ -0,0 +1,19 @@
+// CS4029: Cannot return an expression of type `void'
+// Line: 15
+
+using System;
+using System.Threading.Tasks;
+
+class C
+{
+       static void Foo<T> (Func<Task<T>> f)
+       {
+       }
+
+       static void Main ()
+       {
+               Foo (async () => {
+                       return await Task.Factory.StartNew (() => { });
+               });
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7007.cs b/mcs/errors/cs7007.cs
new file mode 100644 (file)
index 0000000..a343757
--- /dev/null
@@ -0,0 +1,9 @@
+// CS7007: `X' is not a static class. A using namespace directive can only be applied to static classes or namespace
+// Line: 5
+// Compiler options: -langversion:6
+
+using X;
+
+class X
+{
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7023-2.cs b/mcs/errors/cs7023-2.cs
new file mode 100644 (file)
index 0000000..ee14e24
--- /dev/null
@@ -0,0 +1,10 @@
+// CS7023: The second operand of `is' or `as' operator cannot be static type `X'
+// Line: 8
+
+static class X
+{
+       public static void Main ()
+       {
+               var v = null is X;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7023.cs b/mcs/errors/cs7023.cs
new file mode 100644 (file)
index 0000000..dae17ca
--- /dev/null
@@ -0,0 +1,10 @@
+// CS7023: The second operand of `is' or `as' operator cannot be static type `X'
+// Line: 8
+
+static class X
+{
+       public static void Main ()
+       {
+               var v = null as X;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7025.cs b/mcs/errors/cs7025.cs
new file mode 100644 (file)
index 0000000..59eca47
--- /dev/null
@@ -0,0 +1,13 @@
+// CS7025: Inconsistent accessibility: event type `System.Action<I>' is less accessible than event `C.E'
+// Line: 8
+
+using System;
+
+public class C
+{
+       public event Action<I> E;
+}
+
+interface I
+{
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7030.cs b/mcs/errors/cs7030.cs
new file mode 100644 (file)
index 0000000..01abf11
--- /dev/null
@@ -0,0 +1,6 @@
+// CS7030: Friend assembly reference cannot have `null' value
+// Line: 6
+
+using System.Runtime.CompilerServices;
+
+[assembly: InternalsVisibleTo (null)]
diff --git a/mcs/errors/cs7034-2.cs b/mcs/errors/cs7034-2.cs
new file mode 100644 (file)
index 0000000..b769869
--- /dev/null
@@ -0,0 +1,6 @@
+// CS7034: The specified version string `2.0.*.*' does not conform to the required format - major[.minor[.build[.revision]]]
+// Line: 6
+
+using System.Reflection;
+
+[assembly: AssemblyVersion("2.0.*.*")]
diff --git a/mcs/errors/cs7034-3.cs b/mcs/errors/cs7034-3.cs
new file mode 100644 (file)
index 0000000..a406b0f
--- /dev/null
@@ -0,0 +1,6 @@
+// CS7034: The specified version string `2.*' does not conform to the required format - major[.minor[.build[.revision]]]
+// Line: 6
+
+using System.Reflection;
+
+[assembly: AssemblyVersion("2.*")]
diff --git a/mcs/errors/cs7034.cs b/mcs/errors/cs7034.cs
new file mode 100644 (file)
index 0000000..071535b
--- /dev/null
@@ -0,0 +1,15 @@
+// CS7034: The specified version string `0.0.0.80420' does not conform to the required format - major[.minor[.build[.revision]]]
+// Line: 7
+
+using System;
+using System.Reflection;
+
+[assembly: AssemblyVersion ("0.0.0.80420")]
+
+public class Test {
+
+       public static int Main ()
+       {
+               return 1;
+       }
+}
diff --git a/mcs/errors/cs7035.cs b/mcs/errors/cs7035.cs
new file mode 100644 (file)
index 0000000..0d27cb0
--- /dev/null
@@ -0,0 +1,7 @@
+// CS7035: The specified version string `1.*' does not conform to the recommended format major.minor.build.revision
+// Line: 7
+// Compiler options: -warnaserror
+
+using System.Reflection;
+
+[assembly: AssemblyFileVersion ("1.*")]
diff --git a/mcs/errors/cs7042-2.cs b/mcs/errors/cs7042-2.cs
new file mode 100644 (file)
index 0000000..a70c129
--- /dev/null
@@ -0,0 +1,10 @@
+// CS7042: The DllImport attribute cannot be applied to a method that is generic or contained in a generic type
+// Line: 9
+
+using System.Runtime.InteropServices;
+
+public class C
+{
+       [DllImport ("my.dll")]
+       static extern void Foo<T> ();
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7042.cs b/mcs/errors/cs7042.cs
new file mode 100644 (file)
index 0000000..efebf84
--- /dev/null
@@ -0,0 +1,10 @@
+// CS7042: The DllImport attribute cannot be applied to a method that is generic or contained in a generic type
+// Line: 9
+
+using System.Runtime.InteropServices;
+
+public class C<T>
+{
+       [DllImport ("my.dll")]
+       static extern void Foo ();
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7049.cs b/mcs/errors/cs7049.cs
new file mode 100644 (file)
index 0000000..91114e8
--- /dev/null
@@ -0,0 +1,14 @@
+// CS7049: Security attribute `System.Security.Permissions.PrincipalPermissionAttribute' has an invalid SecurityAction value `100'
+// Line: 10
+
+using System;
+using System.Security;
+using System.Security.Permissions;
+
+public class Program {
+
+       [PrincipalPermission ((SecurityAction)100, Name="Poupou")]
+       public virtual void Show (string message)
+       {
+       }
+}
diff --git a/mcs/errors/cs7050.cs b/mcs/errors/cs7050.cs
new file mode 100644 (file)
index 0000000..6909f18
--- /dev/null
@@ -0,0 +1,13 @@
+// CS7050: SecurityAction value `System.Security.Permissions.SecurityAction' is invalid for security attributes applied to an assembly
+// Line: 10
+
+using System;
+using System.Security;
+using System.Security.Permissions;
+
+[assembly: SecurityPermission (SecurityAction.Demand, SkipVerification=true)]
+
+class Test
+{
+       static void Main () {}
+}
diff --git a/mcs/errors/cs7051.cs b/mcs/errors/cs7051.cs
new file mode 100644 (file)
index 0000000..2d18f11
--- /dev/null
@@ -0,0 +1,14 @@
+// CS7051: SecurityAction value `System.Security.Permissions.SecurityAction' is invalid for security attributes applied to a type or a method
+// Line: 10
+
+using System;
+using System.Security;
+using System.Security.Permissions;
+
+public class Program {
+
+       [SecurityPermission (SecurityAction.RequestMinimum, ControlPrincipal=true, Flags=SecurityPermissionFlag.ControlPrincipal)]
+       static public void Main (string[] args)
+       {
+       }
+}
diff --git a/mcs/errors/cs7055-2.cs b/mcs/errors/cs7055-2.cs
new file mode 100644 (file)
index 0000000..f2c15a8
--- /dev/null
@@ -0,0 +1,11 @@
+// CS7055: Unmanaged type `ByValArray' is only valid for fields
+// Line: 10
+
+using System;
+using System.Runtime.InteropServices;
+
+public class main {
+
+    [DllImport("libname", EntryPoint = "scumbag")]
+    static extern int scumbag(ref int X, [MarshalAs(UnmanagedType.ByValArray)] ref byte[] fb);
+}
diff --git a/mcs/errors/cs7055.cs b/mcs/errors/cs7055.cs
new file mode 100644 (file)
index 0000000..f2c15a8
--- /dev/null
@@ -0,0 +1,11 @@
+// CS7055: Unmanaged type `ByValArray' is only valid for fields
+// Line: 10
+
+using System;
+using System.Runtime.InteropServices;
+
+public class main {
+
+    [DllImport("libname", EntryPoint = "scumbag")]
+    static extern int scumbag(ref int X, [MarshalAs(UnmanagedType.ByValArray)] ref byte[] fb);
+}
diff --git a/mcs/errors/cs7059.cs b/mcs/errors/cs7059.cs
new file mode 100644 (file)
index 0000000..f19fd02
--- /dev/null
@@ -0,0 +1,19 @@
+// CS7059: Executables cannot be satellite assemblies. Remove the attribute or keep it empty
+// Line: 7
+
+using System;
+using System.Reflection;
+
+[assembly: AssemblyCulture("es")]
+[assembly: AssemblyVersion("1.2.3456.7")]
+
+namespace NS 
+{
+       class MyClass 
+       {
+               static void Main ()
+               {
+                       Console.WriteLine (typeof(MyClass).Assembly.FullName);
+               }
+       }
+}
diff --git a/mcs/errors/cs7070-2.cs b/mcs/errors/cs7070-2.cs
new file mode 100644 (file)
index 0000000..e618405
--- /dev/null
@@ -0,0 +1,28 @@
+// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations
+// Line: 11
+
+using System;
+using System.Security;
+using System.Security.Permissions;
+
+public class Program {
+        public delegate int DisplayHandler (string msg);
+     
+       [DebugPermission (SecurityAction.RequestMinimum)]
+        public event DisplayHandler OnShow;
+}
+
+[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
+[Serializable]
+public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
+
+       public DebugPermissionAttribute (SecurityAction action)
+               : base (action)
+       {
+       }
+        
+       public override IPermission CreatePermission ()
+       {
+               return null;
+       }
+}
diff --git a/mcs/errors/cs7070-3.cs b/mcs/errors/cs7070-3.cs
new file mode 100644 (file)
index 0000000..907993d
--- /dev/null
@@ -0,0 +1,32 @@
+// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations
+// Line: 11
+
+using System;
+using System.Security;
+using System.Security.Permissions;
+
+public class Program {
+
+        [DebugPermission (SecurityAction.LinkDemand)]
+        public int Show
+        {
+            get {
+                return 2;
+            }
+        }    
+}
+
+[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
+[Serializable]
+public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
+
+       public DebugPermissionAttribute (SecurityAction action)
+               : base (action)
+       {
+       }
+        
+       public override IPermission CreatePermission ()
+       {
+               return null;
+       }
+}
diff --git a/mcs/errors/cs7070-4.cs b/mcs/errors/cs7070-4.cs
new file mode 100644 (file)
index 0000000..a2c43a5
--- /dev/null
@@ -0,0 +1,30 @@
+// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations
+// Line: 11
+
+using System;
+using System.Security;
+using System.Security.Permissions;
+
+public class Program {
+
+        [return: DebugPermission (SecurityAction.LinkDemand)]
+        public int Show (string message)
+        {
+                return 2;
+        }    
+}
+
+[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
+[Serializable]
+public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
+
+       public DebugPermissionAttribute (SecurityAction action)
+               : base (action)
+       {
+       }
+        
+       public override IPermission CreatePermission ()
+       {
+               return null;
+       }
+}
diff --git a/mcs/errors/cs7070.cs b/mcs/errors/cs7070.cs
new file mode 100644 (file)
index 0000000..599a180
--- /dev/null
@@ -0,0 +1,27 @@
+// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations
+// Line: 10
+
+using System;
+using System.Security;
+using System.Security.Permissions;
+
+public class Program {
+
+       [DebugPermission (SecurityAction.RequestMinimum)]
+        public int i;
+}
+
+[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
+[Serializable]
+public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
+
+       public DebugPermissionAttribute (SecurityAction action)
+               : base (action)
+       {
+       }
+        
+       public override IPermission CreatePermission ()
+       {
+               return null;
+       }
+}
diff --git a/mcs/errors/cs7080.cs b/mcs/errors/cs7080.cs
new file mode 100644 (file)
index 0000000..4da5075
--- /dev/null
@@ -0,0 +1,12 @@
+// CS7080: The CallerMemberNameAttribute applied to parameter `o' will have no effect. It is overridden by the CallerFilePathAttribute
+// Line: 9
+// Compiler options: -warnaserror
+
+using System.Runtime.CompilerServices;
+
+class D
+{
+       void Foo ([CallerMemberName, CallerFilePath] object o = null)
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7081.cs b/mcs/errors/cs7081.cs
new file mode 100644 (file)
index 0000000..20597c1
--- /dev/null
@@ -0,0 +1,12 @@
+// CS7081: The CallerMemberNameAttribute applied to parameter `o' will have no effect. It is overridden by the CallerLineNumberAttribute
+// Line: 9
+// Compiler options: -warnaserror
+
+using System.Runtime.CompilerServices;
+
+class D
+{
+       void Foo ([CallerMemberName, CallerLineNumber] object o = null)
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7082.cs b/mcs/errors/cs7082.cs
new file mode 100644 (file)
index 0000000..1b02bd5
--- /dev/null
@@ -0,0 +1,12 @@
+// CS7082: The CallerFilePathAttribute applied to parameter `o' will have no effect. It is overridden by the CallerLineNumberAttribute
+// Line: 9
+// Compiler options: -warnaserror
+
+using System.Runtime.CompilerServices;
+
+class D
+{
+       void Foo ([CallerFilePath, CallerLineNumber] object o = null)
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7083-2.cs b/mcs/errors/cs7083-2.cs
new file mode 100644 (file)
index 0000000..14d378f
--- /dev/null
@@ -0,0 +1,10 @@
+// CS7083: Expression must be implicitly convertible to Boolean or its type `C' must define operator `false'
+// Line: 8
+
+class C
+{
+       dynamic M (dynamic d)
+       {
+               return this && d;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7083.cs b/mcs/errors/cs7083.cs
new file mode 100644 (file)
index 0000000..5f359c3
--- /dev/null
@@ -0,0 +1,10 @@
+// CS7083: Expression must be implicitly convertible to Boolean or its type `C' must define operator `true'
+// Line: 8
+
+class C
+{
+       dynamic M (dynamic d)
+       {
+               return this || d;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs7094.cs b/mcs/errors/cs7094.cs
new file mode 100644 (file)
index 0000000..93cd637
--- /dev/null
@@ -0,0 +1,15 @@
+// CS7094: The `await' operator cannot be used in the filter expression of a catch clause
+// Line: 12
+
+using System.Threading.Tasks;
+
+class Test
+{
+       async static Task M1 ()
+       {
+               try {
+               }
+               catch if (await Task.Factory.StartNew (() => false)) {
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8009.cs b/mcs/errors/cs8009.cs
new file mode 100644 (file)
index 0000000..851e066
--- /dev/null
@@ -0,0 +1,13 @@
+// CS8009: Referenced assembly `CS8009-lib' has different culture setting of `en-US'
+// Line: 0
+// Compiler options: -r:CS8009-lib.dll -warnaserror
+
+using System;
+
+class Program
+{
+       static void Main ()
+       {
+               Console.WriteLine (typeof (Lang));
+       }
+}
diff --git a/mcs/errors/cs8030-2.cs b/mcs/errors/cs8030-2.cs
new file mode 100644 (file)
index 0000000..231f211
--- /dev/null
@@ -0,0 +1,11 @@
+// CS8030: Anonymous function or lambda expression converted to a void returning delegate cannot return a value
+// Line: 9
+
+delegate void D (int x);
+
+class X {
+       static void Main ()
+       {
+               D d6 = delegate (int x) { return x; }; // Return type mismatch.
+       }
+}
diff --git a/mcs/errors/cs8030-3.cs b/mcs/errors/cs8030-3.cs
new file mode 100644 (file)
index 0000000..1ff2894
--- /dev/null
@@ -0,0 +1,13 @@
+// CS8030: Anonymous function or lambda expression converted to a void returning delegate cannot return a value
+// Line: 11
+
+using System;
+using System.Threading.Tasks;
+
+class C
+{
+       public async void GetValue()
+       {
+               return await Task.FromResult(100);
+       }
+}
diff --git a/mcs/errors/cs8030.cs b/mcs/errors/cs8030.cs
new file mode 100644 (file)
index 0000000..4f2751c
--- /dev/null
@@ -0,0 +1,16 @@
+// CS8030: Anonymous function or lambda expression converted to a void returning delegate cannot return a value
+// Line: 10
+
+using System;
+
+class C
+{
+       public void Test ()
+       {
+               Action a = () => { return Skip (); };
+       }
+       
+       void Skip ()
+       {
+       }
+}
diff --git a/mcs/errors/cs8031.cs b/mcs/errors/cs8031.cs
new file mode 100644 (file)
index 0000000..dbb83bc
--- /dev/null
@@ -0,0 +1,17 @@
+// CS8031: Async lambda expression or anonymous method converted to a `Task' cannot return a value. Consider returning `Task<T>'
+// Line: 12
+
+using System;
+using System.Threading.Tasks;
+
+class Test
+{
+       public static void Main()
+       {
+               Func<Task> t = async delegate {
+                       return null;
+               };
+
+               return;
+       }
+}
diff --git a/mcs/errors/cs8036.cs b/mcs/errors/cs8036.cs
new file mode 100644 (file)
index 0000000..5969480
--- /dev/null
@@ -0,0 +1,10 @@
+// CS9001: Only one part of a partial type can declare primary constructor parameters
+// Line: 8
+
+partial class Part(int arg)
+{
+}
+
+partial class Part(int arg)
+{
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8037.cs b/mcs/errors/cs8037.cs
new file mode 100644 (file)
index 0000000..ea40954
--- /dev/null
@@ -0,0 +1,9 @@
+// CS9002: `S.S(long)': Instance constructor of type with primary constructor must specify `this' constructor initializer
+// Line: 6
+
+class S (int arg)
+{
+       public S (long l)
+       {
+       }
+}
diff --git a/mcs/errors/cs8038.cs b/mcs/errors/cs8038.cs
new file mode 100644 (file)
index 0000000..76dc746
--- /dev/null
@@ -0,0 +1,6 @@
+// CS8038: Primary constructor of type `Test<T>' has parameter of same name as type parameter `T'
+// Line: 4
+
+class Test<T>(T T) 
+{
+}
diff --git a/mcs/errors/cs8039.cs b/mcs/errors/cs8039.cs
new file mode 100644 (file)
index 0000000..7793ffd
--- /dev/null
@@ -0,0 +1,6 @@
+// CS8039: Primary constructor of type `Test' has parameter of same name as containing type
+// Line: 4
+
+class Test(object Test) 
+{
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8041.cs b/mcs/errors/cs8041.cs
new file mode 100644 (file)
index 0000000..fa403dd
--- /dev/null
@@ -0,0 +1,13 @@
+// CS8041: Primary constructor already has a body
+// Line: 10
+
+class C (int arg)
+{
+       {
+               arg = 1;
+       }
+
+       {
+               arg = 2;
+       }
+}
diff --git a/mcs/errors/cs8043.cs b/mcs/errors/cs8043.cs
new file mode 100644 (file)
index 0000000..b7f9da8
--- /dev/null
@@ -0,0 +1,10 @@
+// CS8043: `S.S(long)': Structs with primary constructor cannot specify default constructor initializer
+// Line: 6
+
+struct S (int x)
+{
+       public S (long x)
+               : this ()
+       {
+       }
+}
diff --git a/mcs/errors/cs8049.cs b/mcs/errors/cs8049.cs
new file mode 100644 (file)
index 0000000..0689057
--- /dev/null
@@ -0,0 +1,11 @@
+// CS8049: Implemented interfaces cannot have arguments
+// Line: 6
+
+using System;
+
+class ID () : IDisposable ()
+{
+       public void Dispose ()
+       {
+       }
+}
diff --git a/mcs/errors/cs8050.cs b/mcs/errors/cs8050.cs
new file mode 100644 (file)
index 0000000..2f4b88b
--- /dev/null
@@ -0,0 +1,7 @@
+// CS8050: `C.P': Only auto-implemented properties can have initializers
+// Line: 6
+
+abstract class C
+{
+       public abstract int P { get; } = 4;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8051.cs b/mcs/errors/cs8051.cs
new file mode 100644 (file)
index 0000000..7935efb
--- /dev/null
@@ -0,0 +1,7 @@
+// CS8051: Auto-implemented property `Test.Property' must have set accessor or initializer
+// Line: 6
+
+public abstract class Test
+{
+       public string Property { get; }
+}
diff --git a/mcs/errors/cs8052.cs b/mcs/errors/cs8052.cs
new file mode 100644 (file)
index 0000000..bccf015
--- /dev/null
@@ -0,0 +1,7 @@
+// CS8052: Auto-implemented property `V.P' must have get accessor
+// Line: 6
+
+class V
+{
+       public object P { set; } = 1;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8053.cs b/mcs/errors/cs8053.cs
new file mode 100644 (file)
index 0000000..319835f
--- /dev/null
@@ -0,0 +1,7 @@
+// CS8053: `I.P': Properties inside interfaces cannot have initializers
+// Line: 6
+
+interface I
+{
+       int P { get; } = 4;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8054-2.cs b/mcs/errors/cs8054-2.cs
new file mode 100644 (file)
index 0000000..e633f17
--- /dev/null
@@ -0,0 +1,6 @@
+// CS0573: `A.a': Structs without explicit constructors cannot contain members with initializers
+// Line: 5
+
+partial struct A {
+       int a = 1;
+}
diff --git a/mcs/errors/cs8054-3.cs b/mcs/errors/cs8054-3.cs
new file mode 100644 (file)
index 0000000..b06047f
--- /dev/null
@@ -0,0 +1,6 @@
+// CS0573: `A.a': Structs without explicit constructors cannot contain members with initializers
+// Line: 5
+
+struct A {
+       int a = 1;
+}
diff --git a/mcs/errors/cs8054.cs b/mcs/errors/cs8054.cs
new file mode 100644 (file)
index 0000000..4b8fc2e
--- /dev/null
@@ -0,0 +1,7 @@
+// CS8054: `S.P': Structs without explicit constructors cannot contain members with initializers
+// Line: 6
+
+struct S
+{
+       public decimal P { get; } = -3;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs8072-2.cs b/mcs/errors/cs8072-2.cs
new file mode 100644 (file)
index 0000000..f9f2a1b
--- /dev/null
@@ -0,0 +1,16 @@
+// CS8072: An expression tree cannot contain a null propagating operator
+// Line: 14
+
+using System;
+using System.Linq.Expressions;
+
+public class C
+{
+       public void TestMethod () { }
+
+       static void Main ()
+       {
+               C c = null;
+               Expression<Action> e = () => c?.TestMethod ();
+       }
+}
diff --git a/mcs/errors/cs8072.cs b/mcs/errors/cs8072.cs
new file mode 100644 (file)
index 0000000..e53e906
--- /dev/null
@@ -0,0 +1,14 @@
+// CS8072: An expression tree cannot contain a null propagating operator
+// Line: 11
+
+using System;
+using System.Linq.Expressions;
+
+class C
+{
+       static int Main ()
+       {
+               Expression<Func<string, char?>> e = l => l?[1];
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs9001.cs b/mcs/errors/cs9001.cs
deleted file mode 100644 (file)
index 5969480..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// CS9001: Only one part of a partial type can declare primary constructor parameters
-// Line: 8
-
-partial class Part(int arg)
-{
-}
-
-partial class Part(int arg)
-{
-}
\ No newline at end of file
diff --git a/mcs/errors/cs9002.cs b/mcs/errors/cs9002.cs
deleted file mode 100644 (file)
index ea40954..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// CS9002: `S.S(long)': Instance constructor of type with primary constructor must specify `this' constructor initializer
-// Line: 6
-
-class S (int arg)
-{
-       public S (long l)
-       {
-       }
-}
diff --git a/mcs/errors/cs9003.cs b/mcs/errors/cs9003.cs
deleted file mode 100644 (file)
index 00780bc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// CS9003: Primary constructor of type `Test<T>' has parameter of same name as type parameter `T'
-// Line: 4
-
-class Test<T>(T T) 
-{
-}
diff --git a/mcs/errors/cs9004.cs b/mcs/errors/cs9004.cs
deleted file mode 100644 (file)
index d367928..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// CS9004: Primary constructor of type `Test' has parameter of same name as containing type
-// Line: 4
-
-class Test(object Test) 
-{
-}
\ No newline at end of file
diff --git a/mcs/errors/cs9005.cs b/mcs/errors/cs9005.cs
deleted file mode 100644 (file)
index 85e4c01..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// CS9005: Constructor initializer cannot access primary constructor parameters
-// Line: 7
-
-class Test(string s)
-{
-       public Test ()
-               : this (s)
-       {
-       }
-}
\ No newline at end of file
diff --git a/mcs/errors/cs9006.cs b/mcs/errors/cs9006.cs
deleted file mode 100644 (file)
index 4420f2f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// CS9006: An object reference is required to access primary constructor parameter `value'
-// Line: 8
-
-class X (double value)
-{
-       public static double Prop {
-               get {
-                       return value;
-               }
-       }
-}
-
diff --git a/mcs/errors/cs9007.cs b/mcs/errors/cs9007.cs
deleted file mode 100644 (file)
index 05e9e3d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// CS9007: Primary constructor parameter `value' is not available in this context when using ref or out modifier
-// Line: 12
-
-class X (ref double value)
-{
-       public double Prop {
-               get {
-                       return value;
-               }
-       }
-}
-
index b47867d3e33a68754ca2e1b82624d5a6897a0bcb..fcac218b1df5d647e516b280d0223fc2151eabc0 100644 (file)
@@ -256,11 +256,17 @@ unsigned n;
     return (p);
 }
 
+#ifdef __GNUC__
+#define GNUC_UNUSED __attribute__((__unused__))
+#else
+#define GNUC_UNUSED
+#endif
 
 create_file_names()
 {
     int i, len;
     char *tmpdir;
+    int mkstemp_res GNUC_UNUSED;
 
 #if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
     tmpdir = ".";
@@ -303,9 +309,9 @@ create_file_names()
     prolog_file_name[len + 5] = 'p';
     local_file_name[len + 5] = 'l';
 
-    mkstemp(action_file_name);
-    mkstemp(prolog_file_name);
-    mkstemp(local_file_name);
+    mkstemp_res = mkstemp(action_file_name);
+    mkstemp_res = mkstemp(prolog_file_name);
+    mkstemp_res = mkstemp(local_file_name);
 
     len = strlen(file_prefix);
 
index 9431e499d0c83fea6d33649604e2d2c268211085..a0cf7d9eb9a30e8251fb183d894233d9c1cd9752 100644 (file)
@@ -1321,16 +1321,28 @@ namespace Mono.CSharp {
                        return Parameters;
                }
 
-               protected override Expression DoResolve (ResolveContext ec)
+               protected override Expression DoResolve (ResolveContext rc)
                {
-                       if (ec.HasSet (ResolveContext.Options.ConstantScope)) {
-                               ec.Report.Error (1706, loc, "Anonymous methods and lambda expressions cannot be used in the current context");
+                       if (rc.HasSet (ResolveContext.Options.ConstantScope)) {
+                               rc.Report.Error (1706, loc, "Anonymous methods and lambda expressions cannot be used in the current context");
                                return null;
                        }
 
                        //
-                       // Set class type, set type
+                       // Update top-level block generated duting parsing with actual top-level block
                        //
+                       if (rc.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.BaseInitializer) && rc.CurrentMemberDefinition.Parent.PartialContainer.PrimaryConstructorParameters != null) {
+                               var tb = rc.ConstructorBlock.ParametersBlock.TopBlock;
+                               if (Block.TopBlock != tb) {
+                                       Block b = Block;
+                                       while (b.Parent != Block.TopBlock && b != Block.TopBlock)
+                                               b = b.Parent;
+
+                                       b.Parent = tb;
+                                       tb.IncludeBlock (Block, Block.TopBlock);
+                                       b.ParametersBlock.TopBlock = tb;
+                               }
+                       }
 
                        eclass = ExprClass.Value;
 
@@ -1341,7 +1353,7 @@ namespace Mono.CSharp {
                        // 
                        type = InternalType.AnonymousMethod;
 
-                       if (!DoResolveParameters (ec))
+                       if (!DoResolveParameters (rc))
                                return null;
 
                        return this;
@@ -1357,9 +1369,12 @@ namespace Mono.CSharp {
                        // nothing, as we only exist to not do anything.
                }
 
-               public static void Error_AddressOfCapturedVar (ResolveContext ec, IVariableReference var, Location loc)
+               public static void Error_AddressOfCapturedVar (ResolveContext rc, IVariableReference var, Location loc)
                {
-                       ec.Report.Error (1686, loc,
+                       if (rc.CurrentAnonymousMethod is AsyncInitializer)
+                               return;
+
+                       rc.Report.Error (1686, loc,
                                "Local variable or parameter `{0}' cannot have their address taken and be used inside an anonymous method, lambda expression or query expression",
                                var.Name);
                }
@@ -1723,6 +1738,7 @@ namespace Mono.CSharp {
                        Modifiers modifiers;
                        TypeDefinition parent = null;
                        TypeParameters hoisted_tparams = null;
+                       ParametersCompiled method_parameters = parameters;
 
                        var src_block = Block.Original.Explicit;
                        if (src_block.HasCapturedVariable || src_block.HasCapturedThis) {
@@ -1770,6 +1786,14 @@ namespace Mono.CSharp {
                                        parent = storey = ec.CurrentAnonymousMethod.Storey;
 
                                modifiers = Modifiers.STATIC | Modifiers.PRIVATE;
+
+                               //
+                               // Convert generated method to closed delegate method where unused
+                               // this argument is generated during compilation which speeds up dispatch
+                               // by about 25%
+                               //
+                               method_parameters = ParametersCompiled.Prefix (method_parameters,
+                                       new Parameter (null, null, 0, null, loc), ec.Module.Compiler.BuiltinTypes.Object);
                        }
 
                        if (storey == null && hoisted_tparams == null)
@@ -1795,7 +1819,7 @@ namespace Mono.CSharp {
 
                        return new AnonymousMethodMethod (parent,
                                this, storey, new TypeExpression (ReturnType, Location), modifiers,
-                               member_name, parameters);
+                               member_name, method_parameters);
                }
 
                protected override Expression DoResolve (ResolveContext ec)
@@ -1824,7 +1848,7 @@ namespace Mono.CSharp {
                        }
 
                        bool is_static = (method.ModFlags & Modifiers.STATIC) != 0;
-                       if (is_static && am_cache == null) {
+                       if (is_static && am_cache == null && !ec.IsStaticConstructor) {
                                //
                                // Creates a field cache to store delegate instance if it's not generic
                                //
index 13d0526cc2cd9c5a47e422bbdc2b9c763c2de9b4..f546a62adfcccb117ad10f37ef45c84e4d18d399 100644 (file)
@@ -276,6 +276,16 @@ namespace Mono.CSharp
                                ordered.Add (arg);
                        }
 
+                       public override void FlowAnalysis (FlowAnalysisContext fc, List<MovableArgument> movable = null)
+                       {
+                               foreach (var arg in ordered) {
+                                       if (arg.ArgType != Argument.AType.Out)
+                                               arg.FlowAnalysis (fc);
+                               }
+
+                               base.FlowAnalysis (fc, ordered);
+                       }
+
                        public override Arguments Emit (EmitContext ec, bool dup_args, bool prepareAwait)
                        {
                                foreach (var a in ordered) {
@@ -497,7 +507,7 @@ namespace Mono.CSharp
                        return null;
                }
 
-               public void FlowAnalysis (FlowAnalysisContext fc)
+               public virtual void FlowAnalysis (FlowAnalysisContext fc, List<MovableArgument> movable = null)
                {
                        bool has_out = false;
                        foreach (var arg in args) {
@@ -506,7 +516,14 @@ namespace Mono.CSharp
                                        continue;
                                }
 
-                               arg.FlowAnalysis (fc);
+                               if (movable == null) {
+                                       arg.FlowAnalysis (fc);
+                                       continue;
+                               }
+
+                               var ma = arg as MovableArgument;
+                               if (ma != null && !movable.Contains (ma))
+                                       arg.FlowAnalysis (fc);
                        }
 
                        if (!has_out)
index 6c99245480b93f6766af3adb8b86f5beddb78c0c..f93c0383962a4849b5613d916007241aa79a2fa1 100644 (file)
@@ -207,7 +207,7 @@ namespace Mono.CSharp
                                        return;
 
                                if (Compiler.Settings.Target == Target.Exe) {
-                                       a.Error_AttributeEmitError ("The executables cannot be satelite assemblies, remove the attribute or keep it empty");
+                                       Report.Error (7059, a.Location, "Executables cannot be satellite assemblies. Remove the attribute or keep it empty");
                                        return;
                                }
 
@@ -231,7 +231,8 @@ namespace Mono.CSharp
 
                                var vinfo = IsValidAssemblyVersion (value, true);
                                if (vinfo == null) {
-                                       a.Error_AttributeEmitError (string.Format ("Specified version `{0}' is not valid", value));
+                                       Report.Error (7034, a.Location, "The specified version string `{0}' does not conform to the required format - major[.minor[.build[.revision]]]",
+                                               value);
                                        return;
                                }
 
@@ -322,13 +323,18 @@ namespace Mono.CSharp
 
                        if (a.Type == pa.InternalsVisibleTo) {
                                string assembly_name = a.GetString ();
+                               if (assembly_name == null) {
+                                       Report.Error (7030, a.Location, "Friend assembly reference cannot have `null' value");
+                                       return;
+                               }
+
                                if (assembly_name.Length == 0)
                                        return;
 #if STATIC
                                ParsedAssemblyName aname;
                                ParseAssemblyResult r = Fusion.ParseAssemblyName (assembly_name, out aname);
                                if (r != ParseAssemblyResult.OK) {
-                                       Report.Warning (1700, 3, a.Location, "Assembly reference `{0}' is invalid and cannot be resolved",
+                                       Report.Warning (1700, 3, a.Location, "Friend assembly reference `{0}' is invalid and cannot be resolved",
                                                assembly_name);
                                        return;
                                }
@@ -353,10 +359,15 @@ namespace Mono.CSharp
                        } else if (a.Type == pa.AssemblyFileVersion) {
                                vi_product_version = a.GetString ();
                                if (string.IsNullOrEmpty (vi_product_version) || IsValidAssemblyVersion (vi_product_version, false) == null) {
-                                       Report.Warning (1607, 1, a.Location, "The version number `{0}' specified for `{1}' is invalid",
+                                       Report.Warning (7035, 1, a.Location, "The specified version string `{0}' does not conform to the recommended format major.minor.build.revision",
                                                vi_product_version, a.Name);
                                        return;
                                }
+
+                               // File version info decoding from blob is not supported
+                               var cab = new CustomAttributeBuilder ((ConstructorInfo) ctor.GetMetaInfo (), new object[] { vi_product_version });
+                               Builder.SetCustomAttribute (cab);
+                               return;
                        } else if (a.Type == pa.AssemblyProduct) {
                                vi_product = a.GetString ();
                        } else if (a.Type == pa.AssemblyCompany) {
@@ -394,8 +405,8 @@ namespace Mono.CSharp
                                }
 
                                var ci = a.Assembly.GetName ().CultureInfo;
-                               if (!ci.Equals (System.Globalization.CultureInfo.InvariantCulture)) {
-                                       Report.Warning (1607, 1, "Referenced assembly `{0}' has different culture setting of `{1}'",
+                               if (!ci.Equals (CultureInfo.InvariantCulture)) {
+                                       Report.Warning (8009, 1, "Referenced assembly `{0}' has different culture setting of `{1}'",
                                                a.Name, ci.Name);
                                }
 
index 356768d8b74ed13484ade69a1340bdf5238bc9b6..472a393739f1a8cd0f5f68576f7bc57c1ddc2547 100644 (file)
@@ -645,6 +645,7 @@ namespace Mono.CSharp {
                public override void FlowAnalysis (FlowAnalysisContext fc)
                {
                        source.FlowAnalysis (fc);
+                       ((FieldExpr) target).SetFieldAssigned (fc);
                }
                
                public bool IsDefaultInitializer {
index 7ed03d2bad47e4cdbaf8d118c1636b9b310d2756..6ffa92aa06a3f9cda8df1e97a0cbf67eaa719206 100644 (file)
@@ -74,10 +74,6 @@ namespace Mono.CSharp
 
                protected override Expression DoResolve (ResolveContext rc)
                {
-                       if (rc.HasSet (ResolveContext.Options.FinallyScope)) {
-                               rc.Report.Error (1984, loc,  "The `await' operator cannot be used in the body of a finally clause");
-                       }
-
                        if (rc.HasSet (ResolveContext.Options.LockScope)) {
                                rc.Report.Error (1996, loc,
                                        "The `await' operator cannot be used in the body of a lock statement");
@@ -244,7 +240,7 @@ namespace Mono.CSharp
                        var fe_awaiter = new FieldExpr (awaiter, loc);
                        fe_awaiter.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc);
 
-                               Label skip_continuation = ec.DefineLabel ();
+                       Label skip_continuation = ec.DefineLabel ();
 
                        using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
                                //
@@ -324,10 +320,6 @@ namespace Mono.CSharp
                                return false;
                        }
 
-                       if (bc.HasSet (ResolveContext.Options.CatchScope)) {
-                               bc.Report.Error (1985, loc, "The `await' operator cannot be used in a catch clause");
-                       }
-
                        if (!base.Resolve (bc))
                                return false;
 
@@ -447,6 +439,10 @@ namespace Mono.CSharp
                        get; set;
                }
 
+               public StackFieldExpr HoistedReturnState {
+                       get; set;
+               }
+
                public override bool IsIterator {
                        get {
                                return false;
@@ -464,9 +460,9 @@ namespace Mono.CSharp
                protected override BlockContext CreateBlockContext (BlockContext bc)
                {
                        var ctx = base.CreateBlockContext (bc);
-                       var lambda = bc.CurrentAnonymousMethod as LambdaMethod;
-                       if (lambda != null)
-                               return_inference = lambda.ReturnTypeInference;
+                       var am = bc.CurrentAnonymousMethod as AnonymousMethodBody;
+                       if (am != null)
+                               return_inference = am.ReturnTypeInference;
 
                        ctx.Set (ResolveContext.Options.TryScope);
 
@@ -478,6 +474,24 @@ namespace Mono.CSharp
                        throw new NotImplementedException ();
                }
 
+               public void EmitCatchBlock (EmitContext ec)
+               {
+                       var catch_value = LocalVariable.CreateCompilerGenerated (ec.Module.Compiler.BuiltinTypes.Exception, block, Location);
+
+                       ec.BeginCatchBlock (catch_value.Type);
+                       catch_value.EmitAssign (ec);
+
+                       ec.EmitThis ();
+                       ec.EmitInt ((int) IteratorStorey.State.After);
+                       ec.Emit (OpCodes.Stfld, storey.PC.Spec);
+
+                       ((AsyncTaskStorey) Storey).EmitSetException (ec, new LocalVariableReference (catch_value, Location));
+
+                       ec.Emit (OpCodes.Leave, move_next_ok);
+                       ec.EndExceptionBlock ();
+
+               }
+
                protected override void EmitMoveNextEpilogue (EmitContext ec)
                {
                        var storey = (AsyncTaskStorey) Storey;
@@ -509,7 +523,6 @@ namespace Mono.CSharp
                MethodSpec builder_factory;
                MethodSpec builder_start;
                PropertySpec task;
-               LocalVariable hoisted_return;
                int locals_captured;
                Dictionary<TypeSpec, List<Field>> stack_fields;
                Dictionary<TypeSpec, List<Field>> awaiter_fields;
@@ -523,11 +536,7 @@ namespace Mono.CSharp
 
                #region Properties
 
-               public LocalVariable HoistedReturn {
-                       get {
-                               return hoisted_return;
-                       }
-               }
+               public Expression HoistedReturnValue { get; set; }
 
                public TypeSpec ReturnType {
                        get {
@@ -576,7 +585,7 @@ namespace Mono.CSharp
                        return field;
                }
 
-               public Field AddCapturedLocalVariable (TypeSpec type)
+               public Field AddCapturedLocalVariable (TypeSpec type, bool requiresUninitialized = false)
                {
                        if (mutator != null)
                                type = mutator.Mutate (type);
@@ -584,7 +593,7 @@ namespace Mono.CSharp
                        List<Field> existing_fields = null;
                        if (stack_fields == null) {
                                stack_fields = new Dictionary<TypeSpec, List<Field>> ();
-                       } else if (stack_fields.TryGetValue (type, out existing_fields)) {
+                       } else if (stack_fields.TryGetValue (type, out existing_fields) && !requiresUninitialized) {
                                foreach (var f in existing_fields) {
                                        if (f.IsAvailableForReuse) {
                                                f.IsAvailableForReuse = false;
@@ -717,7 +726,7 @@ namespace Mono.CSharp
                        set_state_machine.Block.AddStatement (new StatementExpression (new Invocation (mg, args)));
 
                        if (has_task_return_type) {
-                               hoisted_return = LocalVariable.CreateCompilerGenerated (bt.TypeArguments[0], StateMachineMethod.Block, Location);
+                               HoistedReturnValue = TemporaryVariableReference.Create (bt.TypeArguments [0], StateMachineMethod.Block, Location);
                        }
 
                        return true;
@@ -810,7 +819,7 @@ namespace Mono.CSharp
                        args.Add (new Argument (awaiter, Argument.AType.Ref));
                        args.Add (new Argument (new CompilerGeneratedThis (CurrentType, Location), Argument.AType.Ref));
                        using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
-                               mg.EmitCall (ec, args);
+                               mg.EmitCall (ec, args, true);
                        }
                }
 
@@ -888,7 +897,7 @@ namespace Mono.CSharp
                        args.Add (new Argument (exceptionVariable));
 
                        using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
-                               mg.EmitCall (ec, args);
+                               mg.EmitCall (ec, args, true);
                        }
                }
 
@@ -904,15 +913,15 @@ namespace Mono.CSharp
                        };
 
                        Arguments args;
-                       if (hoisted_return == null) {
+                       if (HoistedReturnValue == null) {
                                args = new Arguments (0);
                        } else {
                                args = new Arguments (1);
-                               args.Add (new Argument (new LocalVariableReference (hoisted_return, Location)));
+                               args.Add (new Argument (HoistedReturnValue));
                        }
 
                        using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
-                               mg.EmitCall (ec, args);
+                               mg.EmitCall (ec, args, true);
                        }
                }
 
index 2152674d2da63e7d766bea3b3f36bde38a0a0b18..7318f2605931c273b9f8f094e0a7dcaed9ab672c 100644 (file)
@@ -258,19 +258,22 @@ namespace Mono.CSharp {
                        Report.Error (1970, loc, "Do not use `{0}' directly. Use `dynamic' keyword instead", GetSignatureForError ());
                }
 
-               /// <summary>
-               /// This is rather hack. We report many emit attribute error with same error to be compatible with
-               /// csc. But because csc has to report them this way because error came from ilasm we needn't.
-               /// </summary>
-               public void Error_AttributeEmitError (string inner)
+               void Error_AttributeEmitError (string inner)
                {
                        Report.Error (647, Location, "Error during emitting `{0}' attribute. The reason is `{1}'",
                                      Type.GetSignatureForError (), inner);
                }
 
+               public void Error_InvalidArgumentValue (TypeSpec attributeType)
+               {
+                       Report.Error (591, Location, "Invalid value for argument to `{0}' attribute", attributeType.GetSignatureForError ());
+               }
+
                public void Error_InvalidSecurityParent ()
                {
-                       Error_AttributeEmitError ("it is attached to invalid parent");
+                       Report.Error (7070, Location,
+                               "Security attribute `{0}' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations",
+                               Type.GetSignatureForError ());
                }
 
                Attributable Owner {
@@ -412,7 +415,7 @@ namespace Mono.CSharp {
                        return ((MethodImplOptions) value | all) == all;
                }
 
-               static bool IsValidArgumentType (TypeSpec t)
+               public static bool IsValidArgumentType (TypeSpec t)
                {
                        if (t.IsArray) {
                                var ac = (ArrayContainer) t;
@@ -831,6 +834,7 @@ namespace Mono.CSharp {
                {
                        SecurityAction action = GetSecurityActionValue ();
                        bool for_assembly = Target == AttributeTargets.Assembly || Target == AttributeTargets.Module;
+                       var c = (Constant)pos_args [0].Expr;
 
                        switch (action) {
 #pragma warning disable 618
@@ -853,11 +857,22 @@ namespace Mono.CSharp {
 #pragma warning restore 618
 
                        default:
-                               Error_AttributeEmitError ("SecurityAction is out of range");
+                               Report.Error (7049, c.Location, "Security attribute `{0}' has an invalid SecurityAction value `{1}'",
+                                       Type.GetSignatureForError (), c.GetValueAsLiteral());
                                return false;
                        }
 
-                       Error_AttributeEmitError (String.Concat ("SecurityAction `", action, "' is not valid for this declaration"));
+                       switch (Target) {
+                       case AttributeTargets.Assembly:
+                               Report.Error (7050, c.Location, "SecurityAction value `{0}' is invalid for security attributes applied to an assembly",
+                                       c.GetSignatureForError ());
+                               break;
+                       default:
+                               Report.Error (7051, c.Location, "SecurityAction value `{0}' is invalid for security attributes applied to a type or a method",
+                                       c.GetSignatureForError ());
+                               break;
+                       }
+
                        return false;
                }
 
@@ -1026,44 +1041,42 @@ namespace Mono.CSharp {
                                                                        return;
                                                                }
                                                        } else if (Type == predefined.Guid) {
+                                                               string v = ((StringConstant) arg_expr).Value;
                                                                try {
-                                                                       string v = ((StringConstant) arg_expr).Value;
                                                                        new Guid (v);
-                                                               } catch (Exception e) {
-                                                                       Error_AttributeEmitError (e.Message);
+                                                               } catch {
+                                                                       Error_InvalidArgumentValue (Type);
                                                                        return;
                                                                }
                                                        } else if (Type == predefined.AttributeUsage) {
                                                                int v = ((IntConstant) ((EnumConstant) arg_expr).Child).Value;
-                                                               if (v == 0) {
-                                                                       context.Module.Compiler.Report.Error (591, Location, "Invalid value for argument to `{0}' attribute",
-                                                                               "System.AttributeUsage");
-                                                               }
+                                                               if (v == 0)
+                                                                       Error_InvalidArgumentValue (Type);
                                                        } else if (Type == predefined.MarshalAs) {
                                                                if (pos_args.Count == 1) {
                                                                        var u_type = (UnmanagedType) System.Enum.Parse (typeof (UnmanagedType), ((Constant) pos_args[0].Expr).GetValue ().ToString ());
                                                                        if (u_type == UnmanagedType.ByValArray && !(Owner is FieldBase)) {
-                                                                               Error_AttributeEmitError ("Specified unmanaged type is only valid on fields");
+                                                                               Report.Error (7055, pos_args [0].Expr.Location, "Unmanaged type `ByValArray' is only valid for fields");
                                                                        }
                                                                }
                                                        } else if (Type == predefined.DllImport) {
                                                                if (pos_args.Count == 1 && pos_args[0].Expr is Constant) {
                                                                        var value = ((Constant) pos_args[0].Expr).GetValue () as string;
                                                                        if (string.IsNullOrEmpty (value))
-                                                                               Error_AttributeEmitError ("DllName cannot be empty or null");
+                                                                               Error_InvalidArgumentValue (Type);
                                                                }
                                                        } else if (Type == predefined.MethodImpl) {
                                                                if (pos_args.Count == 1) {
                                                                        var value = (int) ((Constant) arg_expr).GetValueAsLong ();
 
                                                                        if (!IsValidMethodImplOption (value)) {
-                                                                               Error_AttributeEmitError ("Incorrect argument value");
+                                                                               Error_InvalidArgumentValue (Type);
                                                                        }
                                                                }
                                                        }
                                                }
 
-                                               arg_expr.EncodeAttributeValue (context, encoder, pt);
+                                               arg_expr.EncodeAttributeValue (context, encoder, pt, pt);
                                        }
                                }
 
@@ -1077,7 +1090,7 @@ namespace Mono.CSharp {
 
                                                encoder.Encode (na.Key.Type);
                                                encoder.Encode (na.Value.Name);
-                                               na.Value.Expr.EncodeAttributeValue (context, encoder, na.Key.Type);
+                                               na.Value.Expr.EncodeAttributeValue (context, encoder, na.Key.Type, na.Key.Type);
                                        }
                                } else {
                                        encoder.EncodeEmptyNamedArguments ();
@@ -1527,7 +1540,7 @@ namespace Mono.CSharp {
                        Encode ((byte) 0x54); // property
                        Encode (property.MemberType);
                        Encode (property.Name);
-                       value.EncodeAttributeValue (null, this, property.MemberType);
+                       value.EncodeAttributeValue (null, this, property.MemberType, property.MemberType);
                }
 
                //
@@ -1539,7 +1552,7 @@ namespace Mono.CSharp {
                        Encode ((byte) 0x53); // field
                        Encode (field.MemberType);
                        Encode (field.Name);
-                       value.EncodeAttributeValue (null, this, field.MemberType);
+                       value.EncodeAttributeValue (null, this, field.MemberType, field.MemberType);
                }
 
                public void EncodeNamedArguments<T> (T[] members, Constant[] values) where T : MemberSpec, IInterfaceMemberSpec
@@ -1559,7 +1572,7 @@ namespace Mono.CSharp {
 
                                Encode (member.MemberType);
                                Encode (member.Name);
-                               values [i].EncodeAttributeValue (null, this, member.MemberType);
+                               values [i].EncodeAttributeValue (null, this, member.MemberType, member.MemberType);
                        }
                }
 
index bea0ee06df05bf7a2e542eacd6dd617bccbb801a..da85bf386b21c306f44105af857dec6196e43509 100644 (file)
@@ -309,10 +309,10 @@ namespace Mono.CSharp {
                                                return new StringConstant (ec.BuiltinTypes, (string)left.GetValue () + (string)right.GetValue (),
                                                        left.Location);
 
-                                       if (lt == InternalType.NullLiteral)
+                                       if (lt == InternalType.NullLiteral || left.IsNull)
                                                return new StringConstant (ec.BuiltinTypes, "" + right.GetValue (), left.Location);
 
-                                       if (rt == InternalType.NullLiteral)
+                                       if (rt == InternalType.NullLiteral || right.IsNull)
                                                return new StringConstant (ec.BuiltinTypes, left.GetValue () + "", left.Location);
 
                                        return null;
@@ -367,8 +367,8 @@ namespace Mono.CSharp {
                                                return null;
 
                                        result = result.Reduce (ec, lt);
-                                       if (result == null)
-                                               return null;
+                                       if (result == null || lt.IsEnum)
+                                               return result;
 
                                        return new EnumConstant (result, lt);
                                }
@@ -861,9 +861,22 @@ namespace Mono.CSharp {
                                                                         ((IntConstant) right).Value);
 
                                                return new IntConstant (ec.BuiltinTypes, res, left.Location);
-                                       } else {
-                                               throw new Exception ( "Unexepected modulus input: " + left);
                                        }
+
+                                       if (left is DecimalConstant) {
+                                               decimal res;
+
+                                               if (ec.ConstantCheckState)
+                                                       res = checked (((DecimalConstant) left).Value %
+                                                               ((DecimalConstant) right).Value);
+                                               else
+                                                       res = unchecked (((DecimalConstant) left).Value %
+                                                               ((DecimalConstant) right).Value);
+
+                                               return new DecimalConstant (ec.BuiltinTypes, res, left.Location);
+                                       }
+
+                                       throw new Exception ( "Unexepected modulus input: " + left);
                                } catch (DivideByZeroException){
                                        ec.Report.Error (20, loc, "Division by constant zero");
                                } catch (OverflowException){
index 36761432a51625ec32235fbaa18324d0989c536d..cda04c0e840c340724df311555d8b98032efd8bf 100644 (file)
@@ -553,7 +553,8 @@ namespace Mono.CSharp
                public int AnonymousMethodsCounter;
                public int MethodGroupsCounter;
 
-               static readonly string[] attribute_targets = new string[] { "type" };
+               static readonly string[] attribute_targets = new [] { "type" };
+               static readonly string[] attribute_targets_primary = new [] { "type", "method" };
 
                /// <remarks>
                ///  The pending methods that need to be implemented
@@ -732,6 +733,10 @@ namespace Mono.CSharp
 
                public ParametersCompiled PrimaryConstructorParameters { get; set; }
 
+               public Arguments PrimaryConstructorBaseArguments { get; set; }
+
+               public Location PrimaryConstructorBaseArgumentsStart { get; set; }
+
                public TypeParameters TypeParametersAll {
                        get {
                                return all_type_parameters;
@@ -740,7 +745,7 @@ namespace Mono.CSharp
 
                public override string[] ValidAttributeTargets {
                        get {
-                               return attribute_targets;
+                               return PrimaryConstructorParameters != null ? attribute_targets_primary : attribute_targets;
                        }
                }
 
@@ -812,9 +817,6 @@ namespace Mono.CSharp
                        if (symbol is TypeParameter) {
                                Report.Error (692, symbol.Location,
                                        "Duplicate type parameter `{0}'", symbol.GetSignatureForError ());
-                       } else if (symbol is PrimaryConstructorField && mc is TypeParameter) {
-                               Report.Error (9003, symbol.Location, "Primary constructor of type `{0}' has parameter of same name as type parameter `{1}'",
-                                       symbol.Parent.GetSignatureForError (), symbol.GetSignatureForError ());
                        } else {
                                Report.Error (102, symbol.Location,
                                        "The type `{0}' already contains a definition for `{1}'",
@@ -893,6 +895,21 @@ namespace Mono.CSharp
 
                public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
                {
+                       if (a.Target == AttributeTargets.Method) {
+                               foreach (var m in members) {
+                                       var c = m as Constructor;
+                                       if (c == null)
+                                               continue;
+
+                                       if (c.IsPrimaryConstructor) {
+                                               c.ApplyAttributeBuilder (a, ctor, cdata, pa);
+                                               return;
+                                       }
+                               }
+
+                               throw new InternalErrorException ();
+                       }
+
                        if (has_normal_indexers && a.Type == pa.DefaultMember) {
                                Report.Error (646, a.Location, "Cannot specify the `DefaultMember' attribute on type containing an indexer");
                                return;
@@ -1526,7 +1543,7 @@ namespace Mono.CSharp
 
                                if (PrimaryConstructorParameters != null) {
                                        if (PartialContainer.PrimaryConstructorParameters != null) {
-                                               Report.Error (9001, Location, "Only one part of a partial type can declare primary constructor parameters");
+                                               Report.Error (8036, Location, "Only one part of a partial type can declare primary constructor parameters");
                                        } else {
                                                PartialContainer.PrimaryConstructorParameters = PrimaryConstructorParameters;
                                        }
@@ -1559,6 +1576,10 @@ namespace Mono.CSharp
                        }
 
                        if (iface_exprs != null) {
+                               if (!PrimaryConstructorBaseArgumentsStart.IsNull) {
+                                       Report.Error (8049, PrimaryConstructorBaseArgumentsStart, "Implemented interfaces cannot have arguments");
+                               }
+
                                foreach (var iface_type in iface_exprs) {
                                        // Prevents a crash, the interface might not have been resolved: 442144
                                        if (iface_type == null)
@@ -1587,8 +1608,12 @@ namespace Mono.CSharp
                        // defined after current container
                        //
                        if (class_partial_parts != null) {
-                               foreach (var pp in class_partial_parts)
+                               foreach (var pp in class_partial_parts) {
+                                       if (pp.PrimaryConstructorBaseArguments != null)
+                                               PrimaryConstructorBaseArguments = pp.PrimaryConstructorBaseArguments;
+
                                        pp.DoDefineBaseType ();
+                               }
 
                        }
 
@@ -1775,7 +1800,7 @@ namespace Mono.CSharp
 
                protected virtual bool DoResolveTypeParameters ()
                {
-                       var tparams = CurrentTypeParameters;
+                       var tparams = MemberName.TypeParameters;
                        if (tparams == null)
                                return true;
 
@@ -1787,6 +1812,20 @@ namespace Mono.CSharp
                                        error = true;
                                        return false;
                                }
+
+                               if (IsPartialPart) {
+                                       var pc_tp = PartialContainer.CurrentTypeParameters [i];
+
+                                       tp.Create (spec, this);
+                                       tp.Define (pc_tp);
+
+                                       if (tp.OptAttributes != null) {
+                                               if (pc_tp.OptAttributes == null)
+                                                       pc_tp.OptAttributes = tp.OptAttributes;
+                                               else
+                                                       pc_tp.OptAttributes.Attrs.AddRange (tp.OptAttributes.Attrs);
+                                       }
+                               }
                        }
 
                        if (IsPartialPart) {
@@ -2539,7 +2578,7 @@ namespace Mono.CSharp
                {
                }
 
-               public Arguments PrimaryConstructorBaseArguments { get; set; }
+               public ToplevelBlock PrimaryConstructorBlock { get; set; }
 
                protected override TypeAttributes TypeAttr {
                        get {
@@ -2569,12 +2608,6 @@ namespace Mono.CSharp
                                        return;
                                }
 
-                               if (symbol is PrimaryConstructorField) {
-                                       Report.Error (9004, symbol.Location, "Primary constructor of type `{0}' has parameter of same name as containing type",
-                                               symbol.Parent.GetSignatureForError ());
-                                       return;
-                               }
-                       
                                InterfaceMemberBase imb = symbol as InterfaceMemberBase;
                                if (imb == null || !imb.IsExplicitImpl) {
                                        Report.SymbolRelatedToPreviousError (this);
@@ -2618,23 +2651,30 @@ namespace Mono.CSharp
                        // The default static constructor is private
 
                        Modifiers mods;
+                       ParametersCompiled parameters = null;
                        if (is_static) {
                                mods = Modifiers.STATIC | Modifiers.PRIVATE;
+                               parameters = ParametersCompiled.EmptyReadOnlyParameters;
                        } else {
                                mods = ((ModFlags & Modifiers.ABSTRACT) != 0) ? Modifiers.PROTECTED : Modifiers.PUBLIC;
+                               parameters = PrimaryConstructorParameters ?? ParametersCompiled.EmptyReadOnlyParameters;
                        }
 
-                       var c = new Constructor (this, MemberName.Name, mods, null, PrimaryConstructorParameters ?? ParametersCompiled.EmptyReadOnlyParameters, Location);
+                       var c = new Constructor (this, MemberName.Name, mods, null, parameters, Location);
                        if (Kind == MemberKind.Class)
                                c.Initializer = new GeneratedBaseInitializer (Location, PrimaryConstructorBaseArguments);
 
-                       if (PrimaryConstructorParameters != null)
+                       if (PrimaryConstructorParameters != null && !is_static)
                                c.IsPrimaryConstructor = true;
                        
                        AddConstructor (c, true);
-                       c.Block = new ToplevelBlock (Compiler, c.ParameterInfo, Location) {
-                               IsCompilerGenerated = true
-                       };
+                       if (PrimaryConstructorBlock == null) {
+                               c.Block = new ToplevelBlock (Compiler, parameters, Location) {
+                                       IsCompilerGenerated = true
+                               };
+                       } else {
+                               c.Block = PrimaryConstructorBlock;
+                       }
 
                        return c;
                }
@@ -2645,14 +2685,20 @@ namespace Mono.CSharp
 
                        if (PrimaryConstructorParameters != null) {
                                foreach (Parameter p in PrimaryConstructorParameters.FixedParameters) {
-                                       if ((p.ModFlags & Parameter.Modifier.RefOutMask) != 0)
-                                               continue;
-
-                                       var f = new PrimaryConstructorField (this, p);
-                                       AddField (f);
+                                       if (p.Name == MemberName.Name) {
+                                               Report.Error (8039, p.Location, "Primary constructor of type `{0}' has parameter of same name as containing type",
+                                                       GetSignatureForError ());
+                                       }
 
-                                       generated_primary_constructor.Block.AddStatement (
-                                               new StatementExpression (new PrimaryConstructorAssign (f, p), p.Location));
+                                       if (CurrentTypeParameters != null) {
+                                               for (int i = 0; i < CurrentTypeParameters.Count; ++i) {
+                                                       var tp = CurrentTypeParameters [i];
+                                                       if (p.Name == tp.Name) {
+                                                               Report.Error (8038, p.Location, "Primary constructor of type `{0}' has parameter of same name as type parameter `{1}'",
+                                                                       GetSignatureForError (), p.GetSignatureForError ());
+                                                       }
+                                               }
+                                       }
                                }
                        }
 
@@ -3035,6 +3081,20 @@ namespace Mono.CSharp
                        base.Emit ();
                }
 
+               bool HasExplicitConstructor ()
+               {
+                       foreach (var m in Members) {
+                               var c = m as Constructor;
+                               if (c == null)
+                                       continue;
+
+                               if (!c.ParameterInfo.IsEmpty)
+                                       return true;
+                       }
+
+                       return false;
+               }
+
                public override bool IsUnmanagedType ()
                {
                        if (has_unmanaged_check_done)
@@ -3090,14 +3150,15 @@ namespace Mono.CSharp
 
                public override void RegisterFieldForInitialization (MemberCore field, FieldInitializer expression)
                {
-                       if ((field.ModFlags & Modifiers.STATIC) == 0) {
-                               Report.Error (573, field.Location, "`{0}': Structs cannot have instance field initializers",
+                       if ((field.ModFlags & Modifiers.STATIC) == 0 && !HasExplicitConstructor ()) {
+                               Report.Error (8054, field.Location, "`{0}': Structs without explicit constructors cannot contain members with initializers",
                                        field.GetSignatureForError ());
+
                                return;
                        }
+
                        base.RegisterFieldForInitialization (field, expression);
                }
-
        }
 
        /// <summary>
@@ -3736,25 +3797,29 @@ namespace Mono.CSharp
                                Report.SymbolRelatedToPreviousError (MemberType);
                                if (this is Property)
                                        Report.Error (53, Location,
-                                                     "Inconsistent accessibility: property type `" +
-                                                     MemberType.GetSignatureForError () + "' is less " +
-                                                     "accessible than property `" + GetSignatureForError () + "'");
+                                               "Inconsistent accessibility: property type `" +
+                                               MemberType.GetSignatureForError () + "' is less " +
+                                               "accessible than property `" + GetSignatureForError () + "'");
                                else if (this is Indexer)
                                        Report.Error (54, Location,
-                                                     "Inconsistent accessibility: indexer return type `" +
-                                                     MemberType.GetSignatureForError () + "' is less " +
-                                                     "accessible than indexer `" + GetSignatureForError () + "'");
+                                               "Inconsistent accessibility: indexer return type `" +
+                                               MemberType.GetSignatureForError () + "' is less " +
+                                               "accessible than indexer `" + GetSignatureForError () + "'");
                                else if (this is MethodCore) {
                                        if (this is Operator)
                                                Report.Error (56, Location,
-                                                             "Inconsistent accessibility: return type `" +
-                                                             MemberType.GetSignatureForError () + "' is less " +
-                                                             "accessible than operator `" + GetSignatureForError () + "'");
+                                                       "Inconsistent accessibility: return type `" +
+                                                       MemberType.GetSignatureForError () + "' is less " +
+                                                       "accessible than operator `" + GetSignatureForError () + "'");
                                        else
                                                Report.Error (50, Location,
-                                                             "Inconsistent accessibility: return type `" +
-                                                             MemberType.GetSignatureForError () + "' is less " +
-                                                             "accessible than method `" + GetSignatureForError () + "'");
+                                                       "Inconsistent accessibility: return type `" +
+                                                       MemberType.GetSignatureForError () + "' is less " +
+                                                       "accessible than method `" + GetSignatureForError () + "'");
+                               } else if (this is Event) {
+                                       Report.Error (7025, Location,
+                                               "Inconsistent accessibility: event type `{0}' is less accessible than event `{1}'",
+                                               MemberType.GetSignatureForError (), GetSignatureForError ());
                                } else {
                                        Report.Error (52, Location,
                                                      "Inconsistent accessibility: field type `" +
index 84394c99eddcfa7ca87737d0b21d71b9df39c9e1..b346a5bbc4f43c1a6f218202b6d1bd7829086bcf 100644 (file)
@@ -155,6 +155,12 @@ namespace Mono.CSharp
                        get { return member_context.IsStatic; }
                }
 
+               public bool IsStaticConstructor {
+                       get {
+                               return member_context.IsStatic && (flags & Options.ConstructorScope) != 0;
+                       }
+               }
+
                public bool IsAnonymousStoreyMutateRequired {
                        get {
                                return CurrentAnonymousMethod != null &&
@@ -175,6 +181,12 @@ namespace Mono.CSharp
                        }
                }
 
+               public bool NotifyEvaluatorOnStore {
+                       get {
+                               return Module.Evaluator != null && Module.Evaluator.ModificationListener != null;
+                       }
+               }
+
                // Has to be used for specific emitter errors only any
                // possible resolver errors have to be reported during Resolve
                public Report Report {
@@ -204,6 +216,10 @@ namespace Mono.CSharp
                        }
                }
 
+               public LocalVariable AsyncThrowVariable { get; set; }
+
+               public List<TryFinally> TryFinallyUnwind { get; set; }
+
                #endregion
 
                public void AddStatementEpilog (IExpressionCleanup cleanupExpression)
@@ -380,9 +396,9 @@ namespace Mono.CSharp
                //
                // Creates temporary field in current async storey
                //
-               public StackFieldExpr GetTemporaryField (TypeSpec type)
+               public StackFieldExpr GetTemporaryField (TypeSpec type, bool initializedFieldRequired = false)
                {
-                       var f = AsyncTaskStorey.AddCapturedLocalVariable (type);
+                       var f = AsyncTaskStorey.AddCapturedLocalVariable (type, initializedFieldRequired);
                        var fexpr = new StackFieldExpr (f);
                        fexpr.InstanceExpression = new CompilerGeneratedThis (CurrentType, Location.Null);
                        return fexpr;
@@ -518,8 +534,16 @@ namespace Mono.CSharp
                                type = EnumSpec.GetUnderlyingType (type);
 
                        switch (type.BuiltinType) {
-                       case BuiltinTypeSpec.Type.Byte:
                        case BuiltinTypeSpec.Type.Bool:
+                               //
+                               // Workaround MSIL limitation. Load bool element as single bit,
+                               // bool array can actually store any byte value
+                               //
+                               ig.Emit (OpCodes.Ldelem_U1);
+                               ig.Emit (OpCodes.Ldc_I4_0);
+                               ig.Emit (OpCodes.Cgt_Un);
+                               break;
+                       case BuiltinTypeSpec.Type.Byte:
                                ig.Emit (OpCodes.Ldelem_U1);
                                break;
                        case BuiltinTypeSpec.Type.SByte:
@@ -734,8 +758,12 @@ namespace Mono.CSharp
                                ig.Emit (OpCodes.Ldind_U1);
                                break;
                        case BuiltinTypeSpec.Type.SByte:
+                               ig.Emit (OpCodes.Ldind_I1);
+                               break;
                        case BuiltinTypeSpec.Type.Bool:
                                ig.Emit (OpCodes.Ldind_I1);
+                               ig.Emit (OpCodes.Ldc_I4_0);
+                               ig.Emit (OpCodes.Cgt_Un);
                                break;
                        case BuiltinTypeSpec.Type.ULong:
                        case BuiltinTypeSpec.Type.Long:
@@ -955,7 +983,7 @@ namespace Mono.CSharp
                public Expression InstanceExpression;
 
                //
-               // When set leaves an extra copy of all arguments on the stack
+               // When call has to leave an extra copy of all arguments on the stack
                //
                public bool DuplicateArguments;
 
@@ -970,18 +998,27 @@ namespace Mono.CSharp
                //
                public bool HasAwaitArguments;
 
+               public bool NullShortCircuit;
+
                //
                // When dealing with await arguments the original arguments are converted
                // into a new set with hoisted stack results
                //
                public Arguments EmittedArguments;
 
+               public Label NullOperatorLabel;
+
                public void Emit (EmitContext ec, MethodSpec method, Arguments Arguments, Location loc)
                {
-                       EmitPredefined (ec, method, Arguments, loc);
+                       EmitPredefined (ec, method, Arguments, false, loc);
                }
 
-               public void EmitPredefined (EmitContext ec, MethodSpec method, Arguments Arguments, Location? loc = null)
+               public void EmitStatement (EmitContext ec, MethodSpec method, Arguments Arguments, Location loc)
+               {
+                       EmitPredefined (ec, method, Arguments, true, loc);
+               }
+
+               public void EmitPredefined (EmitContext ec, MethodSpec method, Arguments Arguments, bool statement = false, Location? loc = null)
                {
                        Expression instance_copy = null;
 
@@ -994,6 +1031,7 @@ namespace Mono.CSharp
 
                        OpCode call_op;
                        LocalTemporary lt = null;
+                       InstanceEmitter ie = new InstanceEmitter ();
 
                        if (method.IsStatic) {
                                call_op = OpCodes.Call;
@@ -1006,15 +1044,24 @@ namespace Mono.CSharp
 
                                if (HasAwaitArguments) {
                                        instance_copy = InstanceExpression.EmitToField (ec);
-                                       if (Arguments == null)
-                                               EmitCallInstance (ec, instance_copy, method.DeclaringType, call_op);
+                                       ie = new InstanceEmitter (instance_copy, IsAddressCall (instance_copy, call_op, method.DeclaringType));
+
+                                       if (Arguments == null) {
+                                               ie.EmitLoad (ec);
+                                       }
                                } else if (!InstanceExpressionOnStack) {
-                                       var instance_on_stack_type = EmitCallInstance (ec, InstanceExpression, method.DeclaringType, call_op);
+                                       ie = new InstanceEmitter (InstanceExpression, IsAddressCall (InstanceExpression, call_op, method.DeclaringType));
+                                       ie.NullShortCircuit = NullShortCircuit;
+                                       ie.Emit (ec);
+
+                                       if (NullShortCircuit) {
+                                               NullOperatorLabel = ie.NullOperatorLabel;
+                                       }
 
                                        if (DuplicateArguments) {
                                                ec.Emit (OpCodes.Dup);
                                                if (Arguments != null && Arguments.Count != 0) {
-                                                       lt = new LocalTemporary (instance_on_stack_type);
+                                                       lt = new LocalTemporary (ie.GetStackType (ec));
                                                        lt.Store (ec);
                                                        instance_copy = lt;
                                                }
@@ -1026,7 +1073,8 @@ namespace Mono.CSharp
                                EmittedArguments = Arguments.Emit (ec, DuplicateArguments, HasAwaitArguments);
                                if (EmittedArguments != null) {
                                        if (instance_copy != null) {
-                                               EmitCallInstance (ec, instance_copy, method.DeclaringType, call_op);
+                                               ie = new InstanceEmitter (instance_copy, IsAddressCall (instance_copy, call_op, method.DeclaringType));
+                                               ie.Emit (ec);
 
                                                if (lt != null)
                                                        lt.Release (ec);
@@ -1036,7 +1084,7 @@ namespace Mono.CSharp
                                }
                        }
 
-                       if (call_op == OpCodes.Callvirt && (InstanceExpression.Type.IsGenericParameter || InstanceExpression.Type.IsStruct)) {
+                       if (call_op == OpCodes.Callvirt && (InstanceExpression.Type.IsGenericParameter || InstanceExpression.Type.IsStructOrEnum)) {
                                ec.Emit (OpCodes.Constrained, InstanceExpression.Type);
                        }
 
@@ -1057,55 +1105,25 @@ namespace Mono.CSharp
                        if (method.Parameters.HasArglist) {
                                var varargs_types = GetVarargsTypes (method, Arguments);
                                ec.Emit (call_op, method, varargs_types);
-                               return;
-                       }
-
-                       //
-                       // If you have:
-                       // this.DoFoo ();
-                       // and DoFoo is not virtual, you can omit the callvirt,
-                       // because you don't need the null checking behavior.
-                       //
-                       ec.Emit (call_op, method);
-               }
-
-               static TypeSpec EmitCallInstance (EmitContext ec, Expression instance, TypeSpec declaringType, OpCode callOpcode)
-               {
-                       var instance_type = instance.Type;
-
-                       //
-                       // Push the instance expression
-                       //
-                       if ((instance_type.IsStruct && (callOpcode == OpCodes.Callvirt || (callOpcode == OpCodes.Call && declaringType.IsStruct))) ||
-                               instance_type.IsGenericParameter || declaringType.IsNullableType) {
+                       } else {
                                //
-                               // If the expression implements IMemoryLocation, then
-                               // we can optimize and use AddressOf on the
-                               // return.
+                               // If you have:
+                               // this.DoFoo ();
+                               // and DoFoo is not virtual, you can omit the callvirt,
+                               // because you don't need the null checking behavior.
                                //
-                               // If not we have to use some temporary storage for
-                               // it.
-                               var iml = instance as IMemoryLocation;
-                               if (iml != null) {
-                                       iml.AddressOf (ec, AddressOp.Load);
-                               } else {
-                                       LocalTemporary temp = new LocalTemporary (instance_type);
-                                       instance.Emit (ec);
-                                       temp.Store (ec);
-                                       temp.AddressOf (ec, AddressOp.Load);
-                               }
-
-                               return ReferenceContainer.MakeType (ec.Module, instance_type);
+                               ec.Emit (call_op, method);
                        }
 
-                       if (instance_type.IsEnum || instance_type.IsStruct) {
-                               instance.Emit (ec);
-                               ec.Emit (OpCodes.Box, instance_type);
-                               return ec.BuiltinTypes.Object;
-                       }
+                       // 
+                       // Pop the return value if there is one and stack should be empty
+                       //
+                       if (statement && method.ReturnType.Kind != MemberKind.Void)
+                               ec.Emit (OpCodes.Pop);
 
-                       instance.Emit (ec);
-                       return instance_type;
+                       if (NullShortCircuit && !DuplicateArguments) {
+                               ie.EmitResultLift (ec, method.ReturnType, statement);
+                       }
                }
 
                static MetaType[] GetVarargsTypes (MethodSpec method, Arguments arguments)
@@ -1147,5 +1165,153 @@ namespace Mono.CSharp
 
                        return true;
                }
+
+               static bool IsAddressCall (Expression instance, OpCode callOpcode, TypeSpec declaringType)
+               {
+                       var instance_type = instance.Type;
+                       return (instance_type.IsStructOrEnum && (callOpcode == OpCodes.Callvirt || (callOpcode == OpCodes.Call && declaringType.IsStruct))) ||
+                               instance_type.IsGenericParameter || declaringType.IsNullableType;
+               }
+       }
+
+       public struct InstanceEmitter
+       {
+               readonly Expression instance;
+               readonly bool addressRequired;
+               bool value_on_stack;
+
+               public bool NullShortCircuit;
+               public Label NullOperatorLabel;
+
+               public InstanceEmitter (Expression instance, bool addressLoad)
+               {
+                       this.instance = instance;
+                       this.addressRequired = addressLoad;
+                       NullShortCircuit = false;
+                       NullOperatorLabel = new Label ();
+                       value_on_stack = false;
+               }
+
+               public void Emit (EmitContext ec)
+               {
+                       Nullable.Unwrap unwrap;
+
+                       if (NullShortCircuit) {
+                               NullOperatorLabel = ec.DefineLabel ();
+                               unwrap = instance as Nullable.Unwrap;
+                       } else {
+                               unwrap = null;
+                       }
+
+                       if (unwrap != null) {
+                               unwrap.Store (ec);
+                               unwrap.EmitCheck (ec);
+                               ec.Emit (OpCodes.Brfalse, NullOperatorLabel);
+                               unwrap.Emit (ec);
+                               var tmp = ec.GetTemporaryLocal (unwrap.Type);
+                               ec.Emit (OpCodes.Stloc, tmp);
+                               ec.Emit (OpCodes.Ldloca, tmp);
+                               ec.FreeTemporaryLocal (tmp, unwrap.Type);
+                               return;
+                       }
+
+                       EmitLoad (ec);
+
+                       if (NullShortCircuit) {
+                               ec.Emit (OpCodes.Dup);
+                               ec.Emit (OpCodes.Brfalse, NullOperatorLabel);
+                       }
+
+                       value_on_stack = true;
+               }
+
+               public void EmitLoad (EmitContext ec)
+               {
+                       var instance_type = instance.Type;
+
+                       //
+                       // Push the instance expression
+                       //
+                       if (addressRequired) {
+                               //
+                               // If the expression implements IMemoryLocation, then
+                               // we can optimize and use AddressOf on the
+                               // return.
+                               //
+                               // If not we have to use some temporary storage for
+                               // it.
+                               var iml = instance as IMemoryLocation;
+                               if (iml != null) {
+                                       iml.AddressOf (ec, AddressOp.Load);
+                               } else {
+                                       LocalTemporary temp = new LocalTemporary (instance_type);
+                                       instance.Emit (ec);
+                                       temp.Store (ec);
+                                       temp.AddressOf (ec, AddressOp.Load);
+                               }
+
+                               return;
+                       }
+
+                       instance.Emit (ec);
+
+                       // Only to make verifier happy
+                       if (instance_type.IsGenericParameter && !(instance is This) && TypeSpec.IsReferenceType (instance_type)) {
+                               ec.Emit (OpCodes.Box, instance_type);
+                       } else if (instance_type.IsStructOrEnum) {
+                               ec.Emit (OpCodes.Box, instance_type);
+                       }
+               }
+
+               public void EmitResultLift (EmitContext ec, TypeSpec type, bool statement)
+               {
+                       if (!NullShortCircuit)
+                               throw new InternalErrorException ();
+
+                       bool value_rt = TypeSpec.IsValueType (type);
+                       TypeSpec lifted;
+                       if (value_rt) {
+                               if (type.IsNullableType)
+                                       lifted = type;
+                               else {
+                                       lifted = Nullable.NullableInfo.MakeType (ec.Module, type);
+                                       ec.Emit (OpCodes.Newobj, Nullable.NullableInfo.GetConstructor (lifted));
+                               }
+                       } else {
+                               lifted = null;
+                       }
+
+                       var end = ec.DefineLabel ();
+                       if (value_on_stack || !statement) {
+                               ec.Emit (OpCodes.Br_S, end);
+                       }
+
+                       ec.MarkLabel (NullOperatorLabel);
+
+                       if (value_on_stack)
+                               ec.Emit (OpCodes.Pop);
+
+                       if (!statement) {
+                               if (value_rt)
+                                       Nullable.LiftedNull.Create (lifted, Location.Null).Emit (ec);
+                               else
+                                       ec.EmitNull ();
+                       }
+
+                       ec.MarkLabel (end);
+               }
+
+               public TypeSpec GetStackType (EmitContext ec)
+               {
+                       var instance_type = instance.Type;
+
+                       if (addressRequired)
+                               return ReferenceContainer.MakeType (ec.Module, instance_type);
+
+                       if (instance_type.IsStructOrEnum)
+                               return ec.Module.Compiler.BuiltinTypes.Object;
+
+                       return instance_type;
+               }
        }
 }
index d37e0f01bf37b55a738b4cc3c8b06dcb89bfc67d..8faec94e4c91c02123070165535cd9a22a8bd734 100644 (file)
@@ -522,7 +522,7 @@ namespace Mono.CSharp {
                        return Value ? 1 : 0;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -573,7 +573,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -673,7 +673,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode ((ushort) Value);
                }
@@ -801,7 +801,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -904,7 +904,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -1017,7 +1017,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -1126,7 +1126,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -1302,7 +1302,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -1419,7 +1419,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -1550,7 +1550,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -1674,7 +1674,7 @@ namespace Mono.CSharp {
                        return base.ConvertImplicitly (type);
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -1803,7 +1803,7 @@ namespace Mono.CSharp {
                        Value = v;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        enc.Encode (Value);
                }
@@ -2088,7 +2088,7 @@ namespace Mono.CSharp {
                        ec.Emit (OpCodes.Ldstr, Value);
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        // cast to object
                        if (type != targetType)
@@ -2153,7 +2153,7 @@ namespace Mono.CSharp {
                        return base.CreateExpressionTree (ec);
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        switch (targetType.BuiltinType) {
                        case BuiltinTypeSpec.Type.Object:
@@ -2174,7 +2174,7 @@ namespace Mono.CSharp {
                                break;
                        }
 
-                       base.EncodeAttributeValue (rc, enc, targetType);
+                       base.EncodeAttributeValue (rc, enc, targetType, parameterType);
                }
 
                public override void Emit (EmitContext ec)
@@ -2314,6 +2314,11 @@ namespace Mono.CSharp {
                        }
                }
 
+               public override bool ContainsEmitWithAwait ()
+               {
+                       return side_effect.ContainsEmitWithAwait ();
+               }
+
                public override object GetValue ()
                {
                        return value.GetValue ();
@@ -2341,6 +2346,11 @@ namespace Mono.CSharp {
                        value.EmitSideEffect (ec);
                }
 
+               public override void FlowAnalysis (FlowAnalysisContext fc)
+               {
+                       side_effect.FlowAnalysis (fc);
+               }
+
                public override bool IsDefaultValue {
                        get { return value.IsDefaultValue; }
                }
index 8cbaeff0c5464d7956eebd1f5039ffa632e52e83..873c92d24ef8c000ad3c23291f68920cabc437e2 100644 (file)
@@ -664,7 +664,7 @@ namespace Mono.CSharp
 
                        ConstructorScope = 1 << 3,
 
-                       AsyncBody = 1 << 4
+                       AsyncBody = 1 << 4,
                }
 
                // utility helper for CheckExpr, UnCheckExpr, Checked and Unchecked statements
index 00be96b40a2d03c5bec51f020e2b51f8c087942b..065c9a7e3f8cc8bf7321042febe71c4798a42a82 100644 (file)
@@ -27,6 +27,15 @@ namespace Mono.CSharp {
        //
        static class Convert
        {
+               [Flags]
+               public enum UserConversionRestriction
+               {
+                       None = 0,
+                       ImplicitOnly = 1,
+                       ProbingOnly = 1 << 1,
+                       NullableSourceOnly = 1 << 2
+
+               }
                //
                // From a one-dimensional array-type S[] to System.Collections.IList<T> and base
                // interfaces of this interface, provided there is an implicit reference conversion
@@ -336,7 +345,7 @@ namespace Mono.CSharp {
                                        if (target_type.Kind == MemberKind.InternalCompilerType)
                                                return target_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic;
 
-                                       return TypeSpec.IsReferenceType (target_type);
+                                       return TypeSpec.IsReferenceType (target_type) || target_type.Kind == MemberKind.PointerType;
                                }
 
                                //
@@ -675,7 +684,7 @@ namespace Mono.CSharp {
                //
                public static bool ImplicitConversionExists (ResolveContext ec, Expression expr, TypeSpec target_type)
                {
-                       if (ImplicitStandardConversionExists (expr, target_type))
+                       if (ImplicitStandardConversionExists (ec, expr, target_type))
                                return true;
 
                        if (expr.Type == InternalType.AnonymousMethod) {
@@ -686,21 +695,27 @@ namespace Mono.CSharp {
                                return ame.ImplicitStandardConversionExists (ec, target_type);
                        }
                        
+                       // Conversion from __arglist to System.ArgIterator
+                       if (expr.Type == InternalType.Arglist)
+                               return target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec;
+
+                       return UserDefinedConversion (ec, expr, target_type,
+                               UserConversionRestriction.ImplicitOnly | UserConversionRestriction.ProbingOnly, Location.Null) != null;
+               }
+
+               public static bool ImplicitStandardConversionExists (ResolveContext rc, Expression expr, TypeSpec target_type)
+               {
                        if (expr.eclass == ExprClass.MethodGroup) {
-                               if (target_type.IsDelegate && ec.Module.Compiler.Settings.Version != LanguageVersion.ISO_1) {
+                               if (target_type.IsDelegate && rc.Module.Compiler.Settings.Version != LanguageVersion.ISO_1) {
                                        MethodGroupExpr mg = expr as MethodGroupExpr;
                                        if (mg != null)
-                                               return DelegateCreation.ImplicitStandardConversionExists (ec, mg, target_type);
+                                               return DelegateCreation.ImplicitStandardConversionExists (rc, mg, target_type);
                                }
 
                                return false;
                        }
 
-                       // Conversion from __arglist to System.ArgIterator
-                       if (expr.Type == InternalType.Arglist)
-                               return target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec;
-
-                       return UserDefinedConversion (ec, expr, target_type, true, true, Location.Null) != null;
+                       return ImplicitStandardConversionExists (expr, target_type);
                }
 
                //
@@ -911,7 +926,7 @@ namespace Mono.CSharp {
                // by making use of FindMostEncomp* methods. Applies the correct rules separately
                // for explicit and implicit conversion operators.
                //
-               static TypeSpec FindMostSpecificSource (List<MethodSpec> list, TypeSpec sourceType, Expression source, bool apply_explicit_conv_rules)
+               static TypeSpec FindMostSpecificSource (ResolveContext rc, List<MethodSpec> list, TypeSpec sourceType, Expression source, bool apply_explicit_conv_rules)
                {
                        TypeSpec[] src_types_set = null;
 
@@ -937,12 +952,16 @@ namespace Mono.CSharp {
                                var candidate_set = new List<TypeSpec> ();
 
                                foreach (TypeSpec param_type in src_types_set){
-                                       if (ImplicitStandardConversionExists (source, param_type))
+                                       if (ImplicitStandardConversionExists (rc, source, param_type))
                                                candidate_set.Add (param_type);
                                }
 
-                               if (candidate_set.Count != 0)
+                               if (candidate_set.Count != 0) {
+                                       if (source.eclass == ExprClass.MethodGroup)
+                                               return InternalType.FakeInternalType;
+
                                        return FindMostEncompassedType (candidate_set);
+                               }
                        }
 
                        //
@@ -1010,7 +1029,7 @@ namespace Mono.CSharp {
                /// </summary>
                static public Expression ImplicitUserConversion (ResolveContext ec, Expression source, TypeSpec target, Location loc)
                {
-                       return UserDefinedConversion (ec, source, target, true, false, loc);
+                       return UserDefinedConversion (ec, source, target, UserConversionRestriction.ImplicitOnly, loc);
                }
 
                /// <summary>
@@ -1018,10 +1037,10 @@ namespace Mono.CSharp {
                /// </summary>
                static Expression ExplicitUserConversion (ResolveContext ec, Expression source, TypeSpec target, Location loc)
                {
-                       return UserDefinedConversion (ec, source, target, false, false, loc);
+                       return UserDefinedConversion (ec, source, target, 0, loc);
                }
 
-               static void FindApplicableUserDefinedConversionOperators (IList<MemberSpec> operators, Expression source, TypeSpec target, bool implicitOnly, ref List<MethodSpec> candidates)
+               static void FindApplicableUserDefinedConversionOperators (ResolveContext rc, IList<MemberSpec> operators, Expression source, TypeSpec target, UserConversionRestriction restr, ref List<MethodSpec> candidates)
                {
                        if (source.Type.IsInterface) {
                                // Neither A nor B are interface-types
@@ -1043,14 +1062,17 @@ namespace Mono.CSharp {
                                        continue;
 
                                var t = op.Parameters.Types[0];
-                               if (source.Type != t && !ImplicitStandardConversionExists (source, t)) {
-                                       if (implicitOnly)
+                               if (source.Type != t && !ImplicitStandardConversionExists (rc, source, t)) {
+                                       if ((restr & UserConversionRestriction.ImplicitOnly) != 0)
                                                continue;
 
                                        if (!ImplicitStandardConversionExists (new EmptyExpression (t), source.Type))
-                                               continue;
+                                                       continue;
                                }
 
+                               if ((restr & UserConversionRestriction.NullableSourceOnly) != 0 && !t.IsNullableType)
+                                       continue;
+
                                t = op.ReturnType;
 
                                if (t.IsInterface)
@@ -1061,7 +1083,7 @@ namespace Mono.CSharp {
                                                t = Nullable.NullableInfo.GetUnderlyingType (t);
 
                                        if (!ImplicitStandardConversionExists (new EmptyExpression (t), target)) {
-                                               if (implicitOnly)
+                                               if ((restr & UserConversionRestriction.ImplicitOnly) != 0)
                                                        continue;
 
                                                if (texpr == null)
@@ -1082,7 +1104,7 @@ namespace Mono.CSharp {
                //
                // User-defined conversions
                //
-               static Expression UserDefinedConversion (ResolveContext ec, Expression source, TypeSpec target, bool implicitOnly, bool probingOnly, Location loc)
+               public static Expression UserDefinedConversion (ResolveContext rc, Expression source, TypeSpec target, UserConversionRestriction restr, Location loc)
                {
                        List<MethodSpec> candidates = null;
 
@@ -1094,6 +1116,7 @@ namespace Mono.CSharp {
                        TypeSpec target_type = target;
                        Expression source_type_expr;
                        bool nullable_source = false;
+                       var implicitOnly = (restr & UserConversionRestriction.ImplicitOnly) != 0;
 
                        if (source_type.IsNullableType) {
                                // No unwrapping conversion S? -> T for non-reference types
@@ -1119,13 +1142,13 @@ namespace Mono.CSharp {
 
                                var operators = MemberCache.GetUserOperator (source_type, Operator.OpType.Implicit, declared_only);
                                if (operators != null) {
-                                       FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, implicitOnly, ref candidates);
+                                       FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates);
                                }
 
                                if (!implicitOnly) {
                                        operators = MemberCache.GetUserOperator (source_type, Operator.OpType.Explicit, declared_only);
                                        if (operators != null) {
-                                               FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, false, ref candidates);
+                                               FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates);
                                        }
                                }
                        }
@@ -1135,13 +1158,13 @@ namespace Mono.CSharp {
 
                                var operators = MemberCache.GetUserOperator (target_type, Operator.OpType.Implicit, declared_only);
                                if (operators != null) {
-                                       FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, implicitOnly, ref candidates);
+                                       FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates);
                                }
 
                                if (!implicitOnly) {
                                        operators = MemberCache.GetUserOperator (target_type, Operator.OpType.Explicit, declared_only);
                                        if (operators != null) {
-                                               FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, false, ref candidates);
+                                               FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates);
                                        }
                                }
                        }
@@ -1163,7 +1186,7 @@ namespace Mono.CSharp {
                                // Pass original source type to find the best match against input type and
                                // not the unwrapped expression
                                //
-                               s_x = FindMostSpecificSource (candidates, source.Type, source_type_expr, !implicitOnly);
+                               s_x = FindMostSpecificSource (rc, candidates, source.Type, source_type_expr, !implicitOnly);
                                if (s_x == null)
                                        return null;
 
@@ -1183,16 +1206,18 @@ namespace Mono.CSharp {
                                        //
                                        // Unless running in probing more
                                        //
-                                       if (!probingOnly) {
-                                               MethodSpec ambig_arg = null;
+                                       if ((restr & UserConversionRestriction.ProbingOnly) == 0) {
+                                               MethodSpec ambig_arg = candidates [0];
+                                               most_specific_operator = candidates [1];
+                                               /*
                                                foreach (var candidate in candidates) {
                                                        if (candidate.ReturnType == t_x)
                                                                most_specific_operator = candidate;
                                                        else if (candidate.Parameters.Types[0] == s_x)
                                                                ambig_arg = candidate;
                                                }
-
-                                               ec.Report.Error (457, loc,
+                                               */
+                                               rc.Report.Error (457, loc,
                                                        "Ambiguous user defined operators `{0}' and `{1}' when converting from `{2}' to `{3}'",
                                                        ambig_arg.GetSignatureForError (), most_specific_operator.GetSignatureForError (),
                                                        source.Type.GetSignatureForError (), target.GetSignatureForError ());
@@ -1208,21 +1233,21 @@ namespace Mono.CSharp {
                        if (s_x != source_type) {
                                var c = source as Constant;
                                if (c != null) {
-                                       source = c.Reduce (ec, s_x);
+                                       source = c.Reduce (rc, s_x);
                                        if (source == null)
                                                c = null;
                                }
 
                                if (c == null) {
                                        source = implicitOnly ?
-                                               ImplicitConversionStandard (ec, source_type_expr, s_x, loc) :
-                                               ExplicitConversionStandard (ec, source_type_expr, s_x, loc);
+                                               ImplicitConversionStandard (rc, source_type_expr, s_x, loc) :
+                                               ExplicitConversionStandard (rc, source_type_expr, s_x, loc);
                                }
                        } else {
                                source = source_type_expr;
                        }
 
-                       source = new UserCast (most_specific_operator, source, loc).Resolve (ec);
+                       source = new UserCast (most_specific_operator, source, loc).Resolve (rc);
 
                        //
                        // Convert result type when it's different to best operator return type
@@ -1241,19 +1266,19 @@ namespace Mono.CSharp {
                                                var unwrap = Nullable.Unwrap.CreateUnwrapped (source);
 
                                                source = implicitOnly ?
-                                                       ImplicitConversionStandard (ec, unwrap, target_type, loc) :
-                                                       ExplicitConversionStandard (ec, unwrap, target_type, loc);
+                                                       ImplicitConversionStandard (rc, unwrap, target_type, loc) :
+                                                       ExplicitConversionStandard (rc, unwrap, target_type, loc);
 
                                                if (source == null)
                                                        return null;
 
                                                if (target.IsNullableType)
-                                                       source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (ec);
+                                                       source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (rc);
                                        }
                                } else {
                                        source = implicitOnly ?
-                                               ImplicitConversionStandard (ec, source, target_type, loc) :
-                                               ExplicitConversionStandard (ec, source, target_type, loc);
+                                               ImplicitConversionStandard (rc, source, target_type, loc) :
+                                               ExplicitConversionStandard (rc, source, target_type, loc);
 
                                        if (source == null)
                                                return null;
@@ -1266,7 +1291,7 @@ namespace Mono.CSharp {
                        // only non-nullable type we need to lift it manually
                        //
                        if (nullable_source && !s_x.IsNullableType)
-                               return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (ec);
+                               return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (rc);
 
                        //
                        // Target is of nullable type but source type is not, wrap the result expression
@@ -2230,6 +2255,7 @@ namespace Mono.CSharp {
                        }
                        
                        e = ExplicitUserConversion (ec, expr, target_type, loc);
+
                        if (e != null)
                                return e;                       
 
index 7736532e07c5c149bb4d2f8be881edfd0a0be6eb..693f95ce599197b0a21a67a67fcd0fea2c830cf8 100644 (file)
@@ -257,6 +257,7 @@ namespace Mono.CSharp
 %token MAKEREF
 %token ASYNC
 %token AWAIT
+%token INTERR_OPERATOR
 
 /* C# keywords which are not really keywords */
 %token GET
@@ -923,6 +924,7 @@ class_member_declaration
        | indexer_declaration
        | operator_declaration
        | constructor_declaration
+       | primary_constructor_body
        | destructor_declaration
        | type_declaration
        | attributes_without_members
@@ -936,6 +938,33 @@ class_member_declaration
          }     
        ;
 
+primary_constructor_body
+       : OPEN_BRACE
+         {
+               current_local_parameters = current_type.PrimaryConstructorParameters;
+               if (current_local_parameters == null) {
+                       report.Error (9010, GetLocation ($1), "Primary constructor body is not allowed");
+                       current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
+               }
+
+               ++lexer.parsing_block;
+               start_block (GetLocation ($1));
+         }
+         opt_statement_list block_end
+         {
+               current_local_parameters = null;
+               var t = current_type as ClassOrStruct;
+               if (t != null) {
+                       var b = (ToplevelBlock) $4;
+                       if (t.PrimaryConstructorBlock != null) {
+                               report.Error (8041, b.StartLocation, "Primary constructor already has a body");
+                       } else {
+                               t.PrimaryConstructorBlock = b;
+                       }
+               }
+         }
+       ;
+
 struct_declaration
        : opt_attributes
          opt_modifiers
@@ -1258,7 +1287,7 @@ method_declaration
 
                // Was added earlier in the case of body being eof for full ast
          }
-         method_body
+         method_body_expression_block
          {
                Method method = (Method) $1;
                method.Block = (ToplevelBlock) $3;
@@ -1413,11 +1442,36 @@ method_header
          }
        ;
 
+method_body_expression_block
+       : method_body
+       | expression_block
+       ;
+
 method_body
        : block
        | SEMICOLON             { $$ = null; }
        ;
 
+expression_block
+       : ARROW
+        {
+               if (lang_version < LanguageVersion.V_6) {
+                       FeatureIsNotAvailable (GetLocation ($1), "expression bodied members");
+               }
+
+               ++lexer.parsing_block;
+               start_block (GetLocation ($1));
+        }
+        expression SEMICOLON
+        {
+               lexer.parsing_block = 0;
+               current_block.AddStatement (new ContextualReturn ((Expression) $3));
+               var b = end_block (GetLocation ($4));
+               b.IsCompilerGenerated = true;
+               $$ = b;
+        }
+       ;
+
 opt_formal_parameter_list
        : /* empty */                   { $$ = ParametersCompiled.EmptyReadOnlyParameters; }
        | formal_parameter_list
@@ -1708,13 +1762,14 @@ arglist_modifier
                        report.Error (1669, GetLocation ($1), "__arglist is not valid in this context");
          }
        ;
-       
+
 property_declaration
        : opt_attributes
          opt_modifiers
          member_type
          member_declaration_name
          {
+               lexer.parsing_generic_declaration = false;
                if (doc_support)
                        tmpComment = Lexer.consume_doc_comment ();
          }
@@ -1742,10 +1797,57 @@ property_declaration
          CLOSE_BRACE
          {
                lbag.AppendToMember (current_property, GetLocation ($10));
+               lexer.parsing_modifiers = true;
+         }
+         opt_property_initializer
+         {
                current_property = null;
          }
+       | opt_attributes
+         opt_modifiers
+         member_type
+         member_declaration_name
+         {
+               lexer.parsing_generic_declaration = false;
+               if (doc_support)
+                       tmpComment = Lexer.consume_doc_comment ();
+               current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
+         }
+         expression_block
+         {
+               var type = (FullNamedExpression) $3;
+               var property = new Property (current_type, type, (Modifiers) $2,
+                       (MemberName) $4, (Attributes) $1);
+
+               if (type.Type != null && type.Type.Kind == MemberKind.Void)
+                       report.Error (547, GetLocation ($3), "`{0}': property or indexer cannot have void type", property.GetSignatureForError ());
+
+               property.Get = new Property.GetMethod (property, Modifiers.COMPILER_GENERATED, null, property.Location);
+               property.Get.Block = (ToplevelBlock) $6;
+
+               current_type.AddMember (property);
+
+               current_local_parameters = null;
+         }
        ;
 
+opt_property_initializer
+       : /* empty */
+       | ASSIGN
+         {
+               ++lexer.parsing_block;
+               current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
+               start_block (GetLocation ($1));
+         }
+         expression SEMICOLON
+         {
+               --lexer.parsing_block;
+               ((Property)current_property).Initializer = (Expression) $3;
+               lbag.AppendToMember (current_property, GetLocation ($1), GetLocation ($4));
+               end_block (GetLocation ($4));
+               current_local_parameters = null;
+         }
+       ;
 
 indexer_declaration
        : opt_attributes opt_modifiers
@@ -1777,24 +1879,34 @@ indexer_declaration
                }
 
                lexer.PropertyParsing = true;
+               current_local_parameters = (ParametersCompiled) $7;
          }
-         OPEN_BRACE accessor_declarations 
-         {
-               lexer.PropertyParsing = false;
-         }
-         CLOSE_BRACE
+         indexer_body
          {
+               lexer.PropertyParsing = false;
+               current_local_parameters = null;
+
                if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null)
                        ((Indexer) current_property).ParameterInfo.CheckParameters (current_property);
          
                if (doc_support)
                        current_property.DocComment = ConsumeStoredComment ();
                        
-               lbag.AppendToMember (current_property, GetLocation ($10), GetLocation ($13));
                current_property = null;                
          }
        ;
 
+indexer_body
+       : OPEN_BRACE accessor_declarations CLOSE_BRACE
+         {
+               lbag.AppendToMember (current_property, GetLocation ($1), GetLocation ($3));
+         }
+       | expression_block
+         {
+               current_property.Get = new Indexer.GetIndexerMethod (current_property, Modifiers.COMPILER_GENERATED, current_local_parameters, null, current_property.Location);
+               current_property.Get.Block = (ToplevelBlock) $1;
+         }
+       ;
 
 accessor_declarations
        : get_accessor_declaration
@@ -2017,7 +2129,7 @@ operator_declaration
        : opt_attributes opt_modifiers operator_declarator 
          {
          }
-         operator_body
+         method_body_expression_block
          {
                OperatorDeclaration decl = (OperatorDeclaration) $3;
                if (decl != null) {
@@ -2044,11 +2156,6 @@ operator_declaration
          }
        ;
 
-operator_body 
-       : block
-       | SEMICOLON { $$ = null; }
-       ; 
-
 operator_type
        : type_expression_or_array
        | VOID
@@ -3182,7 +3289,7 @@ parenthesized_expression
                $$ = new ParenthesizedExpression ((Expression) $2, GetLocation ($1));
          }
        ;
-       
+
 member_access
        : primary_expression DOT identifier_inside_body opt_type_argument_list
          {
@@ -3190,6 +3297,15 @@ member_access
                $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location);
                lbag.AddLocation ($$, GetLocation ($2));
          }
+       | primary_expression INTERR_OPERATOR DOT identifier_inside_body opt_type_argument_list
+         {
+               if (lang_version < LanguageVersion.V_6)
+                       FeatureIsNotAvailable (GetLocation ($2), "null propagating operator");
+
+               var lt = (LocatedToken) $4;
+               $$ = new NullMemberAccess ((Expression) $1, lt.Value, (TypeArguments) $5, lt.Location);
+               lbag.AddLocation ($$, GetLocation ($2), GetLocation ($3));
+         }
        | builtin_types DOT identifier_inside_body opt_type_argument_list
          {
                var lt = (LocatedToken) $3;
@@ -3445,6 +3561,17 @@ element_access
                $$ = new ElementAccess ((Expression) $1, (Arguments) $3, GetLocation ($2));
                lbag.AddLocation ($$, GetLocation ($4));
          }
+       | primary_expression INTERR_OPERATOR OPEN_BRACKET_EXPR expression_list_arguments CLOSE_BRACKET  
+         {
+               if (lang_version < LanguageVersion.V_6)
+                       FeatureIsNotAvailable (GetLocation ($2), "null propagating operator");
+
+               $$ = new ElementAccess ((Expression) $1, (Arguments) $4, GetLocation ($3)) {
+                       NullPropagating = true
+               };
+
+               lbag.AddLocation ($$, GetLocation ($2), GetLocation ($5));
+         }
        | primary_expression OPEN_BRACKET_EXPR expression_list_arguments error
          {
                Error_SyntaxError (yyToken);
@@ -4166,6 +4293,16 @@ additive_expression
 
                $$ = new Is ((Expression) $1, null, GetLocation ($2));
          }
+       | AWAIT IS type
+         {
+               var lt = (LocatedToken) $1;
+               $$ = new Is (new SimpleName (lt.Value, lt.Location), (Expression) $3, GetLocation ($2));
+         }
+       | AWAIT AS type
+         {
+               var lt = (LocatedToken) $1;
+               $$ = new As (new SimpleName (lt.Value, lt.Location), (Expression) $3, GetLocation ($2));
+         }
        ;
 
 shift_expression
@@ -4666,6 +4803,9 @@ primary_parameters
 
                // Cannot use opt_formal_parameter_list because it can be shared instance for empty parameters
                lbag.AppendToMember (current_container, GetLocation ($1), GetLocation ($3));
+
+               if (lang_version < LanguageVersion.V_6)
+                       FeatureIsNotAvailable (GetLocation ($1), "primary constructor");
          }
        ;
 
@@ -4682,14 +4822,19 @@ opt_primary_parameters_with_class_base
          {
                $$ = $1;
          }
+       | primary_parameters class_base
+         {
+               $$ = $1;
+         }
        | primary_parameters class_base OPEN_PARENS
          {
                ++lexer.parsing_block;
+               current_type.PrimaryConstructorBaseArgumentsStart = GetLocation ($3);
          }
          opt_argument_list CLOSE_PARENS
          {
-               lbag.AppendToMember (current_container, GetLocation ($3), GetLocation ($6));
-               ((Class)current_type).PrimaryConstructorBaseArguments = (Arguments) $5;
+               lbag.AppendToMember (current_container, GetLocation ($6));
+               current_type.PrimaryConstructorBaseArguments = (Arguments) $5;
                --lexer.parsing_block;
 
                $$ = $1;
@@ -6892,7 +7037,7 @@ doc_cref
          }       
        | OPERATOR overloadable_operator opt_doc_method_sig
          {
-               var p = (List<DocumentationParameter>)$3 ?? new List<DocumentationParameter> (1);
+               var p = (List<DocumentationParameter>)$3;
                module.DocumentationBuilder.ParsedParameters = p;
                module.DocumentationBuilder.ParsedOperator = (Operator.OpType) $2;
                $$ = null;
index 68ddff9873ce1a9c31e1993ab87e9899853c5948..7545043004879a4c47e97916c072cb90134512a8 100644 (file)
@@ -1260,13 +1260,8 @@ namespace Mono.CSharp
                                return Token.OP_COALESCING;
                        }
 
-                       switch (current_token) {
-                       case Token.CLOSE_PARENS:
-                       case Token.TRUE:
-                       case Token.FALSE:
-                       case Token.NULL:
-                       case Token.LITERAL:
-                               return Token.INTERR;
+                       if (d == '.') {
+                               return Token.INTERR_OPERATOR;
                        }
 
                        if (d != ' ') {
@@ -1279,7 +1274,13 @@ namespace Mono.CSharp
                        PushPosition ();
                        current_token = Token.NONE;
                        int next_token;
+                       int parens = 0;
+
                        switch (xtoken ()) {
+                       case Token.DOT:
+                       case Token.OPEN_BRACKET_EXPR:
+                               next_token = Token.INTERR_OPERATOR;
+                               break;
                        case Token.LITERAL:
                        case Token.TRUE:
                        case Token.FALSE:
@@ -1299,6 +1300,13 @@ namespace Mono.CSharp
                        case Token.COLON:
                                next_token = Token.INTERR_NULLABLE;
                                break;
+
+                       case Token.OPEN_PARENS:
+                       case Token.OPEN_PARENS_CAST:
+                       case Token.OPEN_PARENS_LAMBDA:
+                               next_token = -1;
+                               ++parens;
+                               break;
                                
                        default:
                                next_token = -1;
@@ -1317,14 +1325,19 @@ namespace Mono.CSharp
                                        
                                case Token.COLON:
                                        next_token = Token.INTERR;
-                                       break;                                                  
-                                       
+                                       break;
+
+                               case Token.OPEN_PARENS:
+                               case Token.OPEN_PARENS_CAST:
+                               case Token.OPEN_PARENS_LAMBDA:
+                                       ++parens;
+                                       goto default;
+
                                default:
                                        int ntoken;
                                        int interrs = 1;
                                        int colons = 0;
                                        int braces = 0;
-                                       int parens = 0;
                                        //
                                        // All shorcuts failed, do it hard way
                                        //
@@ -1342,9 +1355,13 @@ namespace Mono.CSharp
                                                        --braces;
                                                        continue;
                                                case Token.CLOSE_PARENS:
-                                                       if (parens > 0)
+                                                       if (parens > 0) {
                                                                --parens;
-                                                       continue;
+                                                               continue;
+                                                       }
+
+                                                       PopPosition ();
+                                                       return Token.INTERR_NULLABLE;
                                                }
 
                                                if (braces != 0)
index a5adf348a4186e0405676a21b4b05d0b211a3f3c..b083cfd46d23d36cc51f84433941f566fe6ac941 100644 (file)
@@ -446,7 +446,8 @@ namespace Mono.CSharp {
 
                public override bool ContainsEmitWithAwait ()
                {
-                       return false;
+                       var instance = method_group.InstanceExpression;
+                       return instance != null && instance.ContainsEmitWithAwait ();
                }
 
                public static Arguments CreateDelegateMethodArguments (ResolveContext rc, AParametersCollection pd, TypeSpec[] types, Location loc)
@@ -563,10 +564,15 @@ namespace Mono.CSharp {
                
                public override void Emit (EmitContext ec)
                {
-                       if (method_group.InstanceExpression == null)
+                       InstanceEmitter ie;
+                       if (method_group.InstanceExpression == null) {
+                               ie = new InstanceEmitter ();
                                ec.EmitNull ();
-                       else
-                               method_group.InstanceExpression.Emit (ec);
+                       } else {
+                               ie = new InstanceEmitter (method_group.InstanceExpression, false);
+                               ie.NullShortCircuit = method_group.NullShortCircuit;
+                               ie.Emit (ec);
+                       }
 
                        var delegate_method = method_group.BestCandidate;
 
@@ -579,6 +585,10 @@ namespace Mono.CSharp {
                        }
 
                        ec.Emit (OpCodes.Newobj, constructor_method);
+
+                       if (method_group.NullShortCircuit) {
+                               ie.EmitResultLift (ec, type, false);
+                       }
                }
 
                public override void FlowAnalysis (FlowAnalysisContext fc) {
@@ -888,17 +898,14 @@ namespace Mono.CSharp {
                        //
                        var call = new CallEmitter ();
                        call.InstanceExpression = InstanceExpr;
-                       call.EmitPredefined (ec, method, arguments, loc);
+                       call.Emit (ec, method, arguments, loc);
                }
 
                public override void EmitStatement (EmitContext ec)
                {
-                       Emit (ec);
-                       // 
-                       // Pop the return value if there is one
-                       //
-                       if (type.Kind != MemberKind.Void)
-                               ec.Emit (OpCodes.Pop);
+                       var call = new CallEmitter ();
+                       call.InstanceExpression = InstanceExpr;
+                       call.EmitStatement (ec, method, arguments, loc);
                }
 
                public override System.Linq.Expressions.Expression MakeExpression (BuilderContext ctx)
index f0386177bd4ffa2e879a8deee57f99f1ee725c80..97fe44d239d5dc4213cce585784c0fbeab194858 100644 (file)
@@ -429,6 +429,18 @@ namespace Mono.CSharp {
                {
                        return type.GetDefinition ().GetSignatureForError ();
                }
+
+               protected static bool IsNullPropagatingValid (TypeSpec type)
+               {
+                       return (TypeSpec.IsReferenceType (type) && type != InternalType.NullLiteral) || type.IsNullableType;
+               }
+
+               protected static TypeSpec LiftMemberType (ResolveContext rc, TypeSpec type)
+               {
+                       return TypeSpec.IsValueType (type) && !type.IsNullableType ?
+                               Nullable.NullableInfo.MakeType (rc.Module, type) :
+                               type;
+               }
               
                /// <summary>
                ///   Resolves an expression and performs semantic analysis on it.
@@ -540,10 +552,16 @@ namespace Mono.CSharp {
                        return c;
                }
 
-               public virtual void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public virtual void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
-                       rc.Module.Compiler.Report.Error (182, loc,
-                               "An attribute argument must be a constant expression, typeof expression or array creation expression");
+                       if (Attribute.IsValidArgumentType (parameterType)) {
+                               rc.Module.Compiler.Report.Error (182, loc,
+                                       "An attribute argument must be a constant expression, typeof expression or array creation expression");
+                       } else {
+                               rc.Module.Compiler.Report.Error (181, loc,
+                                       "Attribute constructor parameter has type `{0}', which is not a valid attribute parameter type",
+                                       targetType.GetSignatureForError ());
+                       }
                }
 
                /// <summary>
@@ -930,6 +948,11 @@ namespace Mono.CSharp {
                        ec.Report.Error (1944, loc, "An expression tree cannot contain an unsafe pointer operation");
                }
 
+               protected void Error_NullShortCircuitInsideExpressionTree (ResolveContext rc)
+               {
+                       rc.Report.Error (8072, loc, "An expression tree cannot contain a null propagating operator");
+               }
+
                public virtual void FlowAnalysis (FlowAnalysisContext fc)
                {
                }
@@ -1582,9 +1605,9 @@ namespace Mono.CSharp {
                        Child.Emit (ec);
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
-                       Child.EncodeAttributeValue (rc, enc, Child.Type);
+                       Child.EncodeAttributeValue (rc, enc, Child.Type, parameterType);
                }
 
                public override void EmitBranchable (EmitContext ec, Label label, bool on_true)
@@ -1702,16 +1725,16 @@ namespace Mono.CSharp {
                        return this;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        // Only boxing to object type is supported
                        if (targetType.BuiltinType != BuiltinTypeSpec.Type.Object) {
-                               base.EncodeAttributeValue (rc, enc, targetType);
+                               base.EncodeAttributeValue (rc, enc, targetType, parameterType);
                                return;
                        }
 
                        enc.Encode (child.Type);
-                       child.EncodeAttributeValue (rc, enc, child.Type);
+                       child.EncodeAttributeValue (rc, enc, child.Type, parameterType);
                }
 
                public override void Emit (EmitContext ec)
@@ -2113,15 +2136,15 @@ namespace Mono.CSharp {
                                return c;
                        }
 
-                       public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+                       public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                        {
                                //
                                // LAMESPEC: Reduced conditional expression is allowed as an attribute argument
                                //
                                if (orig_expr is Conditional)
-                                       child.EncodeAttributeValue (rc, enc, targetType);
+                                       child.EncodeAttributeValue (rc, enc, targetType,parameterType);
                                else
-                                       base.EncodeAttributeValue (rc, enc, targetType);
+                                       base.EncodeAttributeValue (rc, enc, targetType, parameterType);
                        }
                }
 
@@ -2754,6 +2777,15 @@ namespace Mono.CSharp {
                                        }
                                }
 
+                               var mg = NamespaceContainer.LookupStaticUsings (rc, Name, Arity, loc);
+                               if (mg != null) {
+                                       if (Arity > 0) {
+                                               targs.Resolve (rc);
+                                               mg.SetTypeArguments (rc, targs);
+                                       }
+                                       return mg;
+                               }
+
                                if (errorMode) {
                                        if (variable_found) {
                                                rc.Report.Error (841, loc, "A local variable `{0}' cannot be used before it is declared", Name);
@@ -2780,17 +2812,6 @@ namespace Mono.CSharp {
 
                                                                ct = ct.DeclaringType;
                                                        } while (ct != null);
-                                               } else {
-                                                       var cos = rc.CurrentMemberDefinition.Parent as ClassOrStruct;
-                                                       if (cos != null && cos.PrimaryConstructorParameters != null) {
-                                                               foreach (var p in cos.PrimaryConstructorParameters.FixedParameters) {
-                                                                       if (p.Name == Name) {
-                                                                               rc.Report.Error (9007, loc, "Primary constructor parameter `{0}' is not available in this context when using ref or out modifier",
-                                                                                       Name);
-                                                                               return null;
-                                                                       }
-                                                               }
-                                                       }
                                                }
 
                                                if ((restrictions & MemberLookupRestrictions.InvocableOnly) == 0) {
@@ -3147,6 +3168,8 @@ namespace Mono.CSharp {
                        get;
                }
 
+               public bool NullShortCircuit { get; set; }
+
                protected abstract TypeSpec DeclaringType {
                        get;
                }
@@ -3352,7 +3375,7 @@ namespace Mono.CSharp {
                        //
                        // Check intermediate value modification which won't have any effect
                        //
-                       if (rhs != null && InstanceExpression.Type.IsStruct) {
+                       if (rhs != null && TypeSpec.IsValueType (InstanceExpression.Type)) {
                                var fexpr = InstanceExpression as FieldExpr;
                                if (fexpr != null) {
                                        if (!fexpr.Spec.IsReadOnly || rc.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.ConstructorScope))
@@ -3490,7 +3513,7 @@ namespace Mono.CSharp {
 
                public virtual MemberExpr ResolveMemberAccess (ResolveContext ec, Expression left, SimpleName original)
                {
-                       if (left != null && left.IsNull && TypeSpec.IsReferenceType (left.Type)) {
+                       if (left != null && !NullShortCircuit && left.IsNull && TypeSpec.IsReferenceType (left.Type)) {
                                ec.Report.Warning (1720, 1, left.Location,
                                        "Expression will always cause a `{0}'", "System.NullReferenceException");
                        }
@@ -3499,30 +3522,16 @@ namespace Mono.CSharp {
                        return this;
                }
 
-               protected void EmitInstance (EmitContext ec, bool prepare_for_load)
+               protected InstanceEmitter EmitInstance (EmitContext ec, bool prepare_for_load)
                {
-                       TypeSpec instance_type = InstanceExpression.Type;
-                       if (TypeSpec.IsValueType (instance_type)) {
-                               if (InstanceExpression is IMemoryLocation) {
-                                       ((IMemoryLocation) InstanceExpression).AddressOf (ec, AddressOp.Load);
-                               } else {
-                                       // Cannot release the temporary variable when its address
-                                       // is required to be on stack for any parent
-                                       LocalTemporary t = new LocalTemporary (instance_type);
-                                       InstanceExpression.Emit (ec);
-                                       t.Store (ec);
-                                       t.AddressOf (ec, AddressOp.Store);
-                               }
-                       } else {
-                               InstanceExpression.Emit (ec);
-
-                               // Only to make verifier happy
-                               if (instance_type.IsGenericParameter && !(InstanceExpression is This) && TypeSpec.IsReferenceType (instance_type))
-                                       ec.Emit (OpCodes.Box, instance_type);
-                       }
+                       var inst = new InstanceEmitter (InstanceExpression, TypeSpec.IsValueType (InstanceExpression.Type));
+                       inst.NullShortCircuit = NullShortCircuit;
+                       inst.Emit (ec);
 
                        if (prepare_for_load)
                                ec.Emit (OpCodes.Dup);
+
+                       return inst;
                }
 
                public abstract void SetTypeArguments (ResolveContext ec, TypeArguments ta);
@@ -3819,7 +3828,10 @@ namespace Mono.CSharp {
                        if (IsConditionallyExcluded)
                                ec.Report.Error (765, loc,
                                        "Partial methods with only a defining declaration or removed conditional methods cannot be used in an expression tree");
-                       
+
+                       if (NullShortCircuit)
+                               Error_NullShortCircuitInsideExpressionTree (ec);
+
                        return new TypeOfMethod (best_candidate, loc);
                }
                
@@ -3841,11 +3853,15 @@ namespace Mono.CSharp {
                        throw new NotSupportedException ();
                }
                
-               public void EmitCall (EmitContext ec, Arguments arguments)
+               public void EmitCall (EmitContext ec, Arguments arguments, bool statement)
                {
                        var call = new CallEmitter ();
                        call.InstanceExpression = InstanceExpression;
-                       call.Emit (ec, best_candidate, arguments, loc);                 
+                       call.NullShortCircuit = NullShortCircuit;
+                       if (statement)
+                               call.EmitStatement (ec, best_candidate, arguments, loc);
+                       else
+                               call.Emit (ec, best_candidate, arguments, loc);
                }
 
                public override void Error_ValueCannotBeConverted (ResolveContext ec, TypeSpec target, bool expl)
@@ -3895,8 +3911,15 @@ namespace Mono.CSharp {
 
                        // TODO: When in probing mode do IsApplicable only and when called again do VerifyArguments for full error reporting
                        best_candidate = r.ResolveMember<MethodSpec> (ec, ref args);
-                       if (best_candidate == null)
-                               return r.BestCandidateIsDynamic ? this : null;
+                       if (best_candidate == null) {
+                               if (!r.BestCandidateIsDynamic)
+                                       return null;
+
+                               if (simple_name != null && ec.IsStatic)
+                                       InstanceExpression = ProbeIdenticalTypeName (ec, InstanceExpression, simple_name);
+
+                               return this;
+                       }
 
                        // Overload resolver had to create a new method group, all checks bellow have already been executed
                        if (r.BestCandidateNewMethodGroup != null)
@@ -3907,7 +3930,7 @@ namespace Mono.CSharp {
                                        if (best_candidate.IsExtensionMethod && args[0].Expr == InstanceExpression) {
                                                InstanceExpression = null;
                                        } else {
-                                               if (best_candidate.IsStatic && simple_name != null) {
+                                               if (simple_name != null && best_candidate.IsStatic) {
                                                        InstanceExpression = ProbeIdenticalTypeName (ec, InstanceExpression, simple_name);
                                                }
 
@@ -3945,6 +3968,9 @@ namespace Mono.CSharp {
                        if (best_candidate_return.Kind == MemberKind.Void && best_candidate.IsConditionallyExcluded (ec))
                                Methods = Excluded;
 
+                       if (NullShortCircuit)
+                               best_candidate_return = LiftMemberType (ec, best_candidate_return);
+
                        return this;
                }
 
@@ -4034,7 +4060,8 @@ namespace Mono.CSharp {
                        ProbingOnly     = 1 << 1,
                        CovariantDelegate = 1 << 2,
                        NoBaseMembers = 1 << 3,
-                       BaseMembersIncluded = 1 << 4
+                       BaseMembersIncluded = 1 << 4,
+                       GetEnumeratorLookup = 1 << 5
                }
 
                public interface IBaseMembersProvider
@@ -4235,7 +4262,6 @@ namespace Mono.CSharp {
                                if (!TypeSpecComparer.Equals (p_m.Parameters.Types, q_m.Parameters.Types))
                                        return 0;
 
-                               var orig_p = p;
                                p = p_m.ReturnType;
                                var orig_q = q;
                                q = q_m.ReturnType;
@@ -4265,33 +4291,34 @@ namespace Mono.CSharp {
                                                q = q.TypeArguments[0];
                                                p = p.TypeArguments[0];
                                        }
-                               } else if (q != p) {
+                               }
+
+                               if (q != p) {
                                        //
-                                       // LAMESPEC: Lambda expression returning dynamic type has identity (better) conversion to delegate returning object type
+                                       // An inferred return type X exists for E in the context of that parameter list, and 
+                                       // the conversion from X to Y1 is better than the conversion from X to Y2
                                        //
-                                       if (q.BuiltinType == BuiltinTypeSpec.Type.Object) {
-                                               var am_rt = am.InferReturnType (ec, null, orig_q);
-                                               if (am_rt != null && am_rt.BuiltinType == BuiltinTypeSpec.Type.Dynamic)
-                                                       return 2;
-                                       } else if (p.BuiltinType == BuiltinTypeSpec.Type.Object) {
-                                               var am_rt = am.InferReturnType (ec, null, orig_p);
-                                               if (am_rt != null && am_rt.BuiltinType == BuiltinTypeSpec.Type.Dynamic)
-                                                       return 1;
+                                       argument_type = am.InferReturnType (ec, null, orig_q);
+                                       if (argument_type == null) {
+                                               // TODO: Can this be hit?
+                                               return 1;
                                        }
+
+                                       if (argument_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic)
+                                               argument_type = ec.BuiltinTypes.Object;
                                }
+                       }
 
-                               //
-                               // The parameters are identicial and return type is not void, use better type conversion
-                               // on return type to determine better one
-                               //
-                       } else {
-                               if (argument_type == p)
-                                       return 1;
+                       if (argument_type == p)
+                               return 1;
 
-                               if (argument_type == q)
-                                       return 2;
-                       }
+                       if (argument_type == q)
+                               return 2;
 
+                       //
+                       // The parameters are identicial and return type is not void, use better type conversion
+                       // on return type to determine better one
+                       //
                        return BetterTypeConversion (ec, p, q);
                }
 
@@ -4485,11 +4512,11 @@ namespace Mono.CSharp {
                                        //
                                        // LAMESPEC:
                                        //
-                                       // void Foo (params int[]) is better than void Foo (int i = 0) for Foo ()
+                                       // void Foo (int i = 0) is better than void Foo (params int[]) for Foo ()
                                        // void Foo (string[] s, string value = null) is better than Foo (string s, params string[]) for Foo (null) or Foo ()
                                        //
                                        if (cand_param.HasDefaultValue != best_param.HasDefaultValue)
-                                               return !candidate_params;
+                                               return cand_param.HasDefaultValue;
 
                                        if (cand_param.HasDefaultValue) {
                                                ++j;
@@ -4595,7 +4622,7 @@ namespace Mono.CSharp {
                // 0 = the best, int.MaxValue = the worst
                // -1 = fatal error
                //
-               int IsApplicable (ResolveContext ec, ref Arguments arguments, int arg_count, ref MemberSpec candidate, IParametersMember pm, ref bool params_expanded_form, ref bool dynamicArgument, ref TypeSpec returnType)
+               int IsApplicable (ResolveContext ec, ref Arguments arguments, int arg_count, ref MemberSpec candidate, IParametersMember pm, ref bool params_expanded_form, ref bool dynamicArgument, ref TypeSpec returnType, bool errorMode)
                {
                        // Parameters of most-derived type used mainly for named and optional parameters
                        var pd = pm.Parameters;
@@ -4692,7 +4719,10 @@ namespace Mono.CSharp {
                                                                ++arg_count;
                                                                temp = null;
                                                        } else {
-                                                               temp = arguments[index];
+                                                               if (index == arg_count) 
+                                                                       return (i + 1) * 3;
+
+                                                               temp = arguments [index];
 
                                                                // The slot has been taken by positional argument
                                                                if (temp != null && !(temp is NamedArgument))
@@ -4785,6 +4815,13 @@ namespace Mono.CSharp {
                                                lambda_conv_msgs.ClearSession ();
 
                                        if (i_args.Length != 0) {
+                                               if (!errorMode) {
+                                                       foreach (var ta in i_args) {
+                                                               if (!ta.IsAccessible (ec))
+                                                                       return ti.InferenceScore - 10000;
+                                                       }
+                                               }
+
                                                ms = ms.MakeGenericMethod (ec, i_args);
                                        }
                                }
@@ -5138,7 +5175,7 @@ namespace Mono.CSharp {
                                                bool params_expanded_form = false;
                                                bool dynamic_argument = false;
                                                TypeSpec rt = pm.MemberType;
-                                               int candidate_rate = IsApplicable (rc, ref candidate_args, args_count, ref member, pm, ref params_expanded_form, ref dynamic_argument, ref rt);
+                                               int candidate_rate = IsApplicable (rc, ref candidate_args, args_count, ref member, pm, ref params_expanded_form, ref dynamic_argument, ref rt, error_mode);
 
                                                if (lambda_conv_msgs != null)
                                                        lambda_conv_msgs.EndSession ();
@@ -5152,13 +5189,17 @@ namespace Mono.CSharp {
                                                        if (candidate_rate < 0)
                                                                return null;
 
-                                                       best_candidate_rate = candidate_rate;
-                                                       best_candidate = member;
-                                                       best_candidate_args = candidate_args;
-                                                       best_candidate_params = params_expanded_form;
-                                                       best_candidate_dynamic = dynamic_argument;
-                                                       best_parameter_member = pm;
-                                                       best_candidate_return_type = rt;
+                                                       if ((restrictions & Restrictions.GetEnumeratorLookup) != 0 && candidate_args.Count != 0) {
+                                                               // Only parameterless methods are considered
+                                                       } else {
+                                                               best_candidate_rate = candidate_rate;
+                                                               best_candidate = member;
+                                                               best_candidate_args = candidate_args;
+                                                               best_candidate_params = params_expanded_form;
+                                                               best_candidate_dynamic = dynamic_argument;
+                                                               best_parameter_member = pm;
+                                                               best_candidate_return_type = rt;
+                                                       }
                                                } else if (candidate_rate == 0) {
                                                        //
                                                        // The member look is done per type for most operations but sometimes
@@ -5442,8 +5483,7 @@ namespace Mono.CSharp {
                        // For candidates which match on parameters count report more details about incorrect arguments
                        //
                        if (pm != null) {
-                               int unexpanded_count = ((IParametersMember) best_candidate).Parameters.HasParams ? pm.Parameters.Count - 1 : pm.Parameters.Count;
-                               if (pm.Parameters.Count == arg_count || params_expanded || unexpanded_count == arg_count) {
+                               if (pm.Parameters.Count == arg_count || params_expanded || HasUnfilledParams (best_candidate, pm, args)) {
                                        // Reject any inaccessible member
                                        if (!best_candidate.IsAccessible (rc) || !best_candidate.DeclaringType.IsAccessible (rc)) {
                                                rc.Report.SymbolRelatedToPreviousError (best_candidate);
@@ -5497,10 +5537,47 @@ namespace Mono.CSharp {
                        }
                }
 
+               static bool HasUnfilledParams (MemberSpec best_candidate, IParametersMember pm, Arguments args)
+               {
+                       var p = ((IParametersMember)best_candidate).Parameters;
+                       if (!p.HasParams)
+                               return false;
+
+                       string name = null;
+                       for (int i = p.Count - 1; i != 0; --i) {
+                               var fp = p.FixedParameters [i];
+                               if ((fp.ModFlags & Parameter.Modifier.PARAMS) == 0)
+                                       continue;
+
+                               name = fp.Name;
+                               break;
+                       }
+
+                       if (args == null)
+                               return false;
+
+                       foreach (var arg in args) {
+                               var na = arg as NamedArgument;
+                               if (na == null)
+                                       continue;
+
+                               if (na.Name == name) {
+                                       name = null;
+                                       break;
+                               }
+                       }
+
+                       if (name == null)
+                               return false;
+
+                       return args.Count + 1 == pm.Parameters.Count;
+               }
+
                bool VerifyArguments (ResolveContext ec, ref Arguments args, MemberSpec member, IParametersMember pm, bool chose_params_expanded)
                {
                        var pd = pm.Parameters;
-                       TypeSpec[] ptypes = ((IParametersMember) member).Parameters.Types;
+                       var cpd = ((IParametersMember) member).Parameters;
+                       var ptypes = cpd.Types;
 
                        Parameter.Modifier p_mod = 0;
                        TypeSpec pt = null;
@@ -5516,7 +5593,7 @@ namespace Mono.CSharp {
                                        continue;
 
                                if (p_mod != Parameter.Modifier.PARAMS) {
-                                       p_mod = pd.FixedParameters[a_idx].ModFlags;
+                                       p_mod = cpd.FixedParameters [a_idx].ModFlags;
                                        pt = ptypes[a_idx];
                                        has_unsafe_arg |= pt.IsPointer;
 
@@ -5617,7 +5694,7 @@ namespace Mono.CSharp {
                        //
                        // Fill not provided arguments required by params modifier
                        //
-                       if (params_initializers == null && pd.HasParams && arg_count + 1 == pd.Count) {
+                       if (params_initializers == null && arg_count + 1 == pd.Count) {
                                if (args == null)
                                        args = new Arguments (1);
 
@@ -5831,6 +5908,10 @@ namespace Mono.CSharp {
 
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
+                       if (NullShortCircuit) {
+                               Error_NullShortCircuitInsideExpressionTree (ec);
+                       }
+
                        return CreateExpressionTree (ec, true);
                }
 
@@ -5924,6 +6005,13 @@ namespace Mono.CSharp {
                                variable_info = var.VariableInfo.GetStructFieldInfo (Name);
                        }
 
+                       if (NullShortCircuit) {
+                               type = LiftMemberType (ec, type);
+
+                               if (InstanceExpression.IsNull)
+                                       return Constant.CreateConstantFromValue (type, null, loc);
+                       }
+
                        eclass = ExprClass.Variable;
                        return this;
                }
@@ -6018,8 +6106,11 @@ namespace Mono.CSharp {
                        return null;
                }
 
-               override public Expression DoResolveLValue (ResolveContext ec, Expression right_side)
+               public override Expression DoResolveLValue (ResolveContext ec, Expression right_side)
                {
+                       if (NullShortCircuit)
+                               throw new NotSupportedException ("null propagating operator assignment");
+
                        if (spec is FixedFieldSpec) {
                                // It could be much better error message but we want to be error compatible
                                Error_ValueAssignment (ec, right_side);
@@ -6079,7 +6170,7 @@ namespace Mono.CSharp {
                                        return;
                                }
 
-                               if (TypeSpec.IsValueType (InstanceExpression.Type))
+                               if (TypeSpec.IsValueType (InstanceExpression.Type) && InstanceExpression is VariableReference)
                                        return;
                        }
 
@@ -6130,8 +6221,11 @@ namespace Mono.CSharp {
 
                                ec.Emit (OpCodes.Ldsfld, spec);
                        } else {
+                               InstanceEmitter ie;
                                if (!prepared)
-                                       EmitInstance (ec, false);
+                                       ie = EmitInstance (ec, false);
+                               else
+                                       ie = new InstanceEmitter ();
 
                                // Optimization for build-in types
                                if (type.IsStruct && type == ec.CurrentType && InstanceExpression.Type == type) {
@@ -6146,6 +6240,10 @@ namespace Mono.CSharp {
                                                        ec.Emit (OpCodes.Volatile);
 
                                                ec.Emit (OpCodes.Ldfld, spec);
+
+                                               if (NullShortCircuit) {
+                                                       ie.EmitResultLift (ec, spec.MemberType, false);
+                                               }
                                        }
                                }
                        }
@@ -6162,16 +6260,14 @@ namespace Mono.CSharp {
                public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound)
                {
                        bool has_await_source = ec.HasSet (BuilderContext.Options.AsyncBody) && source.ContainsEmitWithAwait ();
-                       if (isCompound && !(source is DynamicExpressionStatement)) {
-                               if (has_await_source) {
-                                       if (IsInstance)
-                                               InstanceExpression = InstanceExpression.EmitToField (ec);
-                               } else {
-                                       prepared = true;
-                               }
+                       if (isCompound && !(source is DynamicExpressionStatement) && !has_await_source) {
+                               prepared = true;
                        }
 
                        if (IsInstance) {
+                               if (NullShortCircuit)
+                                       throw new NotImplementedException ("null operator assignment");
+
                                if (has_await_source)
                                        source = source.EmitToField (ec);
 
@@ -6180,7 +6276,7 @@ namespace Mono.CSharp {
 
                        source.Emit (ec);
 
-                       if (leave_copy) {
+                       if (leave_copy || ec.NotifyEvaluatorOnStore) {
                                ec.Emit (OpCodes.Dup);
                                if (!IsStatic) {
                                        temp = new LocalTemporary (this.Type);
@@ -6197,6 +6293,16 @@ namespace Mono.CSharp {
                                ec.Emit (OpCodes.Stsfld, spec);
                        else
                                ec.Emit (OpCodes.Stfld, spec);
+
+                       if (ec.NotifyEvaluatorOnStore) {
+                               if (!IsStatic)
+                                       throw new NotImplementedException ("instance field write");
+
+                               if (leave_copy)
+                                       ec.Emit (OpCodes.Dup);
+
+                               ec.Module.Evaluator.EmitValueChangedCallback (ec, Name, type, loc);
+                       }
                        
                        if (temp != null) {
                                temp.Emit (ec);
@@ -6259,7 +6365,6 @@ namespace Mono.CSharp {
                                var temp = ec.GetTemporaryLocal (type);
                                ec.Emit (OpCodes.Stloc, temp);
                                ec.Emit (OpCodes.Ldloca, temp);
-                               ec.FreeTemporaryLocal (temp, type);
                                return;
                        }
 
@@ -6385,6 +6490,10 @@ namespace Mono.CSharp {
 
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
+                       if (NullShortCircuit) {
+                               Error_NullShortCircuitInsideExpressionTree (ec);
+                       }
+
                        Arguments args;
                        if (IsSingleDimensionalArrayLength ()) {
                                args = new Arguments (1);
@@ -6452,9 +6561,14 @@ namespace Mono.CSharp {
                        // Special case: length of single dimension array property is turned into ldlen
                        //
                        if (IsSingleDimensionalArrayLength ()) {
-                               EmitInstance (ec, false);
+                               var inst = EmitInstance (ec, false);
+
                                ec.Emit (OpCodes.Ldlen);
                                ec.Emit (OpCodes.Conv_I4);
+
+                               if (NullShortCircuit)
+                                       inst.EmitResultLift (ec, ec.BuiltinTypes.Int, false);
+
                                return;
                        }
 
@@ -6510,8 +6624,15 @@ namespace Mono.CSharp {
                        call.InstanceExpression = InstanceExpression;
                        if (args == null)
                                call.InstanceExpressionOnStack = true;
+                       if (NullShortCircuit) {
+                               call.NullShortCircuit = true;
+                               call.NullOperatorLabel = null_operator_label;
+                       }
 
-                       call.Emit (ec, Setter, args, loc);
+                       if (leave_copy)
+                               call.Emit (ec, Setter, args, loc);
+                       else
+                               call.EmitStatement (ec, Setter, args, loc);
 
                        if (temp != null) {
                                temp.Emit (ec);
@@ -6576,6 +6697,7 @@ namespace Mono.CSharp {
                protected LocalTemporary temp;
                protected bool emitting_compound_assignment;
                protected bool has_await_arguments;
+               protected Label null_operator_label;
 
                protected PropertyOrIndexerExpr (Location l)
                {
@@ -6613,6 +6735,10 @@ namespace Mono.CSharp {
                                if (expr == null)
                                        return null;
 
+                               if (NullShortCircuit && !ec.HasSet (ResolveContext.Options.CompoundAssignmentScope)) {
+                                       type = LiftMemberType (ec, type);
+                               }
+
                                if (expr != this)
                                        return expr.Resolve (ec);
                        }
@@ -6625,6 +6751,9 @@ namespace Mono.CSharp {
 
                public override Expression DoResolveLValue (ResolveContext ec, Expression right_side)
                {
+                       if (NullShortCircuit)
+                               throw new NotSupportedException ("null propagating operator assignment");
+
                        if (right_side == EmptyExpression.OutAccess) {
                                // TODO: best_candidate can be null at this point
                                INamedBlockVariable variable = null;
@@ -6650,7 +6779,15 @@ namespace Mono.CSharp {
 
                        if (!ResolveSetter (ec))
                                return null;
-
+/*
+                       if (NullShortCircuit && ec.HasSet (ResolveContext.Options.CompoundAssignmentScope)) {
+                               var lifted_type = LiftMemberType (ec, type);
+                               if (type != lifted_type) {
+                                       // TODO: Workaround to disable codegen for now
+                                       return Nullable.Wrap.Create (this, lifted_type);
+                               }
+                       }
+*/
                        return this;
                }
 
@@ -6660,6 +6797,7 @@ namespace Mono.CSharp {
                public virtual void Emit (EmitContext ec, bool leave_copy)
                {
                        var call = new CallEmitter ();
+                       call.NullShortCircuit = NullShortCircuit;
                        call.InstanceExpression = InstanceExpression;
                        if (has_await_arguments)
                                call.HasAwaitArguments = true;
@@ -6674,6 +6812,9 @@ namespace Mono.CSharp {
                                has_await_arguments = true;
                        }
 
+                       if (NullShortCircuit && emitting_compound_assignment)
+                               null_operator_label = call.NullOperatorLabel;
+
                        if (leave_copy) {
                                ec.Emit (OpCodes.Dup);
                                temp = new LocalTemporary (Type);
@@ -6897,7 +7038,8 @@ namespace Mono.CSharp {
 
                        var call = new CallEmitter ();
                        call.InstanceExpression = InstanceExpression;
-                       call.Emit (ec, op, args, loc);
+                       call.NullShortCircuit = NullShortCircuit;
+                       call.EmitStatement (ec, op, args, loc);
                }
 
                #endregion
index 766bb05696b6f9e815d0b80ee621c3e1c54194f7..30c42c1af8219c5c1fb96096beed31ff414546bd 100644 (file)
@@ -24,6 +24,11 @@ using System.Linq;
 namespace Mono.CSharp
 {
 
+       /// <summary>
+       /// Experimental!
+       /// </summary>
+       public delegate void ValueModificationHandler (string variableName, int row, int column, object value);
+
        /// <summary>
        ///   Evaluator: provides an API to evaluate C# statements and
        ///   expressions dynamically.
@@ -71,6 +76,8 @@ namespace Mono.CSharp
                readonly ModuleContainer module;
                readonly ReflectionImporter importer;
                readonly CompilationSourceFile source_file;
+
+               int? listener_id;
                
                public Evaluator (CompilerContext ctx)
                {
@@ -291,6 +298,30 @@ namespace Mono.CSharp
                        return compiled;
                }
 
+               static MethodInfo listener_proxy_value;
+               internal void EmitValueChangedCallback (EmitContext ec, string name, TypeSpec type, Location loc)
+               {
+                       if (listener_id == null)
+                               listener_id = ListenerProxy.Register (ModificationListener);
+
+                       if (listener_proxy_value == null)
+                               listener_proxy_value = typeof (ListenerProxy).GetMethod ("ValueChanged");
+
+#if STATIC
+                       throw new NotSupportedException ();
+#else
+                       // object value, int row, int col, string name, int listenerId
+                       if (type.IsStructOrEnum)
+                               ec.Emit (OpCodes.Box, type);
+
+                       ec.EmitInt (loc.Row);
+                       ec.EmitInt (loc.Column);
+                       ec.Emit (OpCodes.Ldstr, name);
+                       ec.EmitInt (listener_id.Value);
+                       ec.Emit (OpCodes.Call, listener_proxy_value);
+#endif
+               }
+
                /// <summary>
                ///   Evaluates and expression or statement and returns any result values.
                /// </summary>
@@ -341,6 +372,11 @@ namespace Mono.CSharp
                                Console.WriteLine ("Interrupted!\n{0}", e);
                        } finally {
                                invoking = false;
+
+                               if (listener_id != null) {
+                                       ListenerProxy.Unregister (listener_id.Value);
+                                       listener_id = null;
+                               }
                        }
 
                        //
@@ -448,6 +484,11 @@ namespace Mono.CSharp
                        return result;
                }
 
+               /// <summary>
+               /// Experimental!
+               /// </summary>
+               public ValueModificationHandler ModificationListener { get; set; }
+
                enum InputKind {
                        EOF,
                        StatementOrExpression,
@@ -737,6 +778,7 @@ namespace Mono.CSharp
                        }
                        
                        module.EmitContainer ();
+
                        if (Report.Errors != 0){
                                if (undo != null)
                                        undo.ExecuteUndo ();
@@ -1233,10 +1275,13 @@ namespace Mono.CSharp
                        if (undo_actions == null)
                                undo_actions = new List<Action> ();
 
-                       var existing = current_container.Containers.FirstOrDefault (l => l.Basename == tc.Basename);
-                       if (existing != null) {
-                               current_container.RemoveContainer (existing);
-                               undo_actions.Add (() => current_container.AddTypeContainer (existing));
+                       if (current_container.Containers != null)
+                       {
+                               var existing = current_container.Containers.FirstOrDefault (l => l.Basename == tc.Basename);
+                               if (existing != null) {
+                                       current_container.RemoveContainer (existing);
+                                       undo_actions.Add (() => current_container.AddTypeContainer (existing));
+                               }
                        }
 
                        undo_actions.Add (() => current_container.RemoveContainer (tc));
@@ -1254,5 +1299,38 @@ namespace Mono.CSharp
                        undo_actions = null;
                }
        }
-       
+
+       static class ListenerProxy
+       {
+               static readonly Dictionary<int, ValueModificationHandler> listeners = new Dictionary<int, ValueModificationHandler> ();
+
+               static int counter;
+
+               public static int Register (ValueModificationHandler listener)
+               {
+                       lock (listeners) {
+                               var id = counter++;
+                               listeners.Add (id, listener);
+                               return id;
+                       }
+               }
+
+               public static void Unregister (int listenerId)
+               {
+                       lock (listeners) {
+                               listeners.Remove (listenerId);
+                       }
+               }
+
+               public static void ValueChanged (object value, int row, int col, string name, int listenerId)
+               {
+                       ValueModificationHandler action;
+                       lock (listeners) {
+                               if (!listeners.TryGetValue (listenerId, out action))
+                                       return;
+                       }
+
+                       action (name, row, col, value);
+               }
+       }
 }
index 28c2a117e15336a6c1e05d12560968f92c4bf84a..69ab3e79db66103f96e06ae693285551848fd164 100644 (file)
@@ -80,7 +80,7 @@ namespace Mono.CSharp
                public override void Emit (EmitContext ec)
                {
                        var call = new CallEmitter ();
-                       call.EmitPredefined (ec, oper, arguments, loc);
+                       call.Emit (ec, oper, arguments, loc);
                }
 
                public override void FlowAnalysis (FlowAnalysisContext fc)
@@ -139,7 +139,7 @@ namespace Mono.CSharp
 
                public readonly Operator Oper;
                public Expression Expr;
-               Expression enum_conversion;
+               ConvCast.Mode enum_conversion;
 
                public Unary (Operator op, Expression expr, Location loc)
                {
@@ -373,7 +373,7 @@ namespace Mono.CSharp
                                return null;
 
                        Expr = best_expr;
-                       enum_conversion = Convert.ExplicitNumericConversion (ec, new EmptyExpression (best_expr.Type), underlying_type);
+                       enum_conversion = Binary.GetEnumResultCast (underlying_type);
                        type = expr.Type;
                        return EmptyCast.Create (this, type);
                }
@@ -583,8 +583,11 @@ namespace Mono.CSharp
                        //
                        // Same trick as in Binary expression
                        //
-                       if (enum_conversion != null)
-                               enum_conversion.Emit (ec);
+                       if (enum_conversion != 0) {
+                               using (ec.With (BuilderContext.Options.CheckedScope, false)) {
+                                       ConvCast.Emit (ec, enum_conversion);
+                               }
+                       }
                }
 
                public override void EmitBranchable (EmitContext ec, Label target, bool on_true)
@@ -1143,7 +1146,7 @@ namespace Mono.CSharp
                {
                        expr = expr.Resolve (ec);
                        
-                       if (expr == null)
+                       if (expr == null || expr.Type == InternalType.ErrorType)
                                return null;
 
                        if (expr.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
@@ -1429,8 +1432,9 @@ namespace Mono.CSharp
                                return null;
 
                        if (probe_type_expr.IsStatic) {
-                               ec.Report.Error (-244, loc, "The `{0}' operator cannot be applied to an operand of a static type",
-                                       OperatorName);
+                               ec.Report.Error (7023, loc, "The second operand of `is' or `as' operator cannot be static type `{0}'",
+                                       probe_type_expr.GetSignatureForError ());
+                               return null;
                        }
                        
                        if (expr.Type.IsPointer || probe_type_expr.IsPointer) {
@@ -1439,8 +1443,8 @@ namespace Mono.CSharp
                                return null;
                        }
 
-                       if (expr.Type == InternalType.AnonymousMethod) {
-                               ec.Report.Error (837, loc, "The `{0}' operator cannot be applied to a lambda expression or anonymous method",
+                       if (expr.Type == InternalType.AnonymousMethod || expr.Type == InternalType.MethodGroup) {
+                               ec.Report.Error (837, loc, "The `{0}' operator cannot be applied to a lambda expression, anonymous method, or method group",
                                        OperatorName);
                                return null;
                        }
@@ -1448,6 +1452,11 @@ namespace Mono.CSharp
                        return this;
                }
 
+               public override void EmitSideEffect (EmitContext ec)
+               {
+                       expr.EmitSideEffect (ec);
+               }
+
                public override void FlowAnalysis (FlowAnalysisContext fc)
                {
                        expr.FlowAnalysis (fc);
@@ -1518,17 +1527,20 @@ namespace Mono.CSharp
                        }                       
                        ec.Emit (on_true ? OpCodes.Brtrue : OpCodes.Brfalse, target);
                }
-               
-               Expression CreateConstantResult (ResolveContext ec, bool result)
+
+               Expression CreateConstantResult (ResolveContext rc, bool result)
                {
                        if (result)
-                               ec.Report.Warning (183, 1, loc, "The given expression is always of the provided (`{0}') type",
+                               rc.Report.Warning (183, 1, loc, "The given expression is always of the provided (`{0}') type",
                                        probe_type_expr.GetSignatureForError ());
                        else
-                               ec.Report.Warning (184, 1, loc, "The given expression is never of the provided (`{0}') type",
+                               rc.Report.Warning (184, 1, loc, "The given expression is never of the provided (`{0}') type",
                                        probe_type_expr.GetSignatureForError ());
 
-                       return ReducedExpression.Create (new BoolConstant (ec.BuiltinTypes, result, loc), this);
+                       var c = new BoolConstant (rc.BuiltinTypes, result, loc);
+                       return expr.IsSideEffectFree ?
+                               ReducedExpression.Create (c, this) :
+                               new SideEffectConstant (c, this, loc);
                }
 
                protected override Expression DoResolve (ResolveContext ec)
@@ -2610,7 +2622,9 @@ namespace Mono.CSharp
                public override void FlowAnalysis (FlowAnalysisContext fc)
                {
                        if ((oper & Operator.LogicalMask) == 0) {
+                               fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
                                left.FlowAnalysis (fc);
+                               fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
                                right.FlowAnalysis (fc);
                                return;
                        }
@@ -2955,15 +2969,15 @@ namespace Mono.CSharp
 
                                                if ((oper & Operator.BitwiseMask) != 0) {
                                                        expr = EmptyCast.Create (expr, type);
-                                                       AddEnumResultCast (type);
+                                                       enum_conversion = GetEnumResultCast (type);
 
                                                        if (oper == Operator.BitwiseAnd && left.Type.IsEnum && right.Type.IsEnum) {
                                                                expr = OptimizeAndOperation (expr);
                                                        }
                                                }
 
-                                               left = ConvertEnumOperandToUnderlyingType (rc, left);
-                                               right = ConvertEnumOperandToUnderlyingType (rc, right);
+                                               left = ConvertEnumOperandToUnderlyingType (rc, left, r.IsNullableType);
+                                               right = ConvertEnumOperandToUnderlyingType (rc, right, l.IsNullableType);
                                                return expr;
                                        }
                                } else if ((oper == Operator.Addition || oper == Operator.Subtraction)) {
@@ -2978,8 +2992,8 @@ namespace Mono.CSharp
                                                // which is not ambiguous with predefined enum operators
                                                //
                                                if (expr != null) {
-                                                       left = ConvertEnumOperandToUnderlyingType (rc, left);
-                                                       right = ConvertEnumOperandToUnderlyingType (rc, right);
+                                                       left = ConvertEnumOperandToUnderlyingType (rc, left, false);
+                                                       right = ConvertEnumOperandToUnderlyingType (rc, right, false);
 
                                                        return expr;
                                                }
@@ -3157,11 +3171,21 @@ namespace Mono.CSharp
                }
                public static PredefinedOperator[] CreateStandardLiftedOperatorsTable (ModuleContainer module)
                {
+                       var types = module.Compiler.BuiltinTypes;
+
+                       //
+                       // Not strictly lifted but need to be in second group otherwise expressions like
+                       // int + null would resolve to +(object, string) instead of +(int?, int?)
+                       //
+                       var string_operators = new [] {
+                               new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String),
+                               new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String),
+                       };
+
                        var nullable = module.PredefinedTypes.Nullable.TypeSpec;
                        if (nullable == null)
-                               return new PredefinedOperator [0];
+                               return string_operators;
 
-                       var types = module.Compiler.BuiltinTypes;
                        var bool_type = types.Bool;
 
                        var nullable_bool = nullable.MakeGenericType (module, new[] { bool_type });
@@ -3196,13 +3220,8 @@ namespace Mono.CSharp
                                new PredefinedOperator (nullable_long, nullable_int, Operator.NullableMask | Operator.ShiftMask),
                                new PredefinedOperator (nullable_ulong, nullable_int, Operator.NullableMask | Operator.ShiftMask),
 
-                               //
-                               // Not strictly lifted but need to be in second group otherwise expressions like
-                               // int + null would resolve to +(object, string) instead of +(int?, int?)
-                               //
-                               new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String),
-                               new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String),
-
+                               string_operators [0],
+                               string_operators [1]
                        };
                }
 
@@ -3477,6 +3496,13 @@ namespace Mono.CSharp
                                } else {
                                        LocalVariable temp = LocalVariable.CreateCompilerGenerated (rc.BuiltinTypes.Bool, rc.CurrentBlock, loc);
 
+                                       if (!Convert.ImplicitConversionExists (rc, left, temp.Type) && (oper == Operator.LogicalAnd ? GetOperatorFalse (rc, left, loc) : GetOperatorTrue (rc, left, loc)) == null) {
+                                               rc.Report.Error (7083, left.Location,
+                                                       "Expression must be implicitly convertible to Boolean or its type `{0}' must define operator `{1}'",
+                                                       lt.GetSignatureForError (), oper == Operator.LogicalAnd ? "false" : "true");
+                                               return null;
+                                       }
+
                                        args.Add (new Argument (temp.CreateReferenceExpression (rc, loc).Resolve (rc)));
                                        args.Add (new Argument (right));
                                        right = new DynamicExpressionStatement (this, args, loc);
@@ -3782,7 +3808,7 @@ namespace Mono.CSharp
                        return null;
                }
 
-               static Expression ConvertEnumOperandToUnderlyingType (ResolveContext rc, Expression expr)
+               static Expression ConvertEnumOperandToUnderlyingType (ResolveContext rc, Expression expr, bool liftType)
                {
                        TypeSpec underlying_type;
                        if (expr.Type.IsNullableType) {
@@ -3806,7 +3832,7 @@ namespace Mono.CSharp
                                break;
                        }
 
-                       if (expr.Type.IsNullableType)
+                       if (expr.Type.IsNullableType || liftType)
                                underlying_type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { underlying_type });
 
                        if (expr.Type == underlying_type)
@@ -3846,7 +3872,7 @@ namespace Mono.CSharp
                                        else
                                                expr = ConvertEnumAdditionalResult (expr, enum_type);
 
-                                       AddEnumResultCast (expr.Type);
+                                       enum_conversion = GetEnumResultCast (expr.Type);
 
                                        return expr;
                                }
@@ -3861,7 +3887,7 @@ namespace Mono.CSharp
                                else
                                        expr = ConvertEnumAdditionalResult (expr, enum_type);
 
-                               AddEnumResultCast (expr.Type);
+                               enum_conversion = GetEnumResultCast (expr.Type);
                        }
 
                        return expr;
@@ -3906,7 +3932,7 @@ namespace Mono.CSharp
                        return EmptyCast.Create (expr, result_type);
                }
 
-               void AddEnumResultCast (TypeSpec type)
+               public static ConvCast.Mode GetEnumResultCast (TypeSpec type)
                {
                        if (type.IsNullableType)
                                type = Nullable.NullableInfo.GetUnderlyingType (type);
@@ -3916,18 +3942,16 @@ namespace Mono.CSharp
 
                        switch (type.BuiltinType) {
                        case BuiltinTypeSpec.Type.SByte:
-                               enum_conversion = ConvCast.Mode.I4_I1;
-                               break;
+                               return ConvCast.Mode.I4_I1;
                        case BuiltinTypeSpec.Type.Byte:
-                               enum_conversion = ConvCast.Mode.I4_U1;
-                               break;
+                               return ConvCast.Mode.I4_U1;
                        case BuiltinTypeSpec.Type.Short:
-                               enum_conversion = ConvCast.Mode.I4_I2;
-                               break;
+                               return ConvCast.Mode.I4_I2;
                        case BuiltinTypeSpec.Type.UShort:
-                               enum_conversion = ConvCast.Mode.I4_U2;
-                               break;
+                               return ConvCast.Mode.I4_U2;
                        }
+
+                       return 0;
                }
 
                //
@@ -4088,12 +4112,12 @@ namespace Mono.CSharp
                        if (!TypeSpec.IsReferenceType (l) || !TypeSpec.IsReferenceType (r))
                                return null;
 
-                       if (l.BuiltinType == BuiltinTypeSpec.Type.String || l.BuiltinType == BuiltinTypeSpec.Type.Delegate || MemberCache.GetUserOperator (l, CSharp.Operator.OpType.Equality, false) != null)
+                       if (l.BuiltinType == BuiltinTypeSpec.Type.String || l.BuiltinType == BuiltinTypeSpec.Type.Delegate || l.IsDelegate || MemberCache.GetUserOperator (l, CSharp.Operator.OpType.Equality, false) != null)
                                ec.Report.Warning (253, 2, loc,
                                        "Possible unintended reference comparison. Consider casting the right side expression to type `{0}' to get value comparison",
                                        l.GetSignatureForError ());
 
-                       if (r.BuiltinType == BuiltinTypeSpec.Type.String || r.BuiltinType == BuiltinTypeSpec.Type.Delegate || MemberCache.GetUserOperator (r, CSharp.Operator.OpType.Equality, false) != null)
+                       if (r.BuiltinType == BuiltinTypeSpec.Type.String || r.BuiltinType == BuiltinTypeSpec.Type.Delegate || r.IsDelegate || MemberCache.GetUserOperator (r, CSharp.Operator.OpType.Equality, false) != null)
                                ec.Report.Warning (252, 2, loc,
                                        "Possible unintended reference comparison. Consider casting the left side expression to type `{0}' to get value comparison",
                                        r.GetSignatureForError ());
@@ -5018,7 +5042,7 @@ namespace Mono.CSharp
                        var method = res.ResolveMember<MethodSpec> (new ResolveContext (ec.MemberContext), ref arguments);
                        if (method != null) {
                                var call = new CallEmitter ();
-                               call.EmitPredefined (ec, method, arguments);
+                               call.EmitPredefined (ec, method, arguments, false);
                        }
                }
 
@@ -6065,12 +6089,33 @@ namespace Mono.CSharp
                        fc.SetVariableAssigned (variable_info);
                }
        }
-       
+
        /// <summary>
        ///   Invocation of methods or delegates.
        /// </summary>
        public class Invocation : ExpressionStatement
        {
+               public class Predefined : Invocation
+               {
+                       public Predefined (MethodGroupExpr expr, Arguments arguments)
+                               : base (expr, arguments)
+                       {
+                               this.mg = expr;
+                       }
+
+                       protected override MethodGroupExpr DoResolveOverload (ResolveContext rc)
+                       {
+                               if (!rc.IsObsolete) {
+                                       var member = mg.BestCandidate;
+                                       ObsoleteAttribute oa = member.GetAttributeObsolete ();
+                                       if (oa != null)
+                                               AttributeTester.Report_ObsoleteMessage (oa, member.GetSignatureForError (), loc, rc.Report);
+                               }
+
+                               return mg;
+                       }
+               }
+
                protected Arguments arguments;
                protected Expression expr;
                protected MethodGroupExpr mg;
@@ -6297,17 +6342,18 @@ namespace Mono.CSharp
 
                                MemberAccess ma = expr as MemberAccess;
                                if (ma != null) {
-                                       var left_type = ma.LeftExpression as TypeExpr;
+                                       var inst = mg.InstanceExpression;
+                                       var left_type = inst as TypeExpr;
                                        if (left_type != null) {
                                                args.Insert (0, new Argument (new TypeOf (left_type.Type, loc).Resolve (ec), Argument.AType.DynamicTypeName));
-                                       } else {
+                                       } else if (inst != null) {
                                                //
                                                // Any value type has to be pass as by-ref to get back the same
                                                // instance on which the member was called
                                                //
-                                               var mod = ma.LeftExpression is IMemoryLocation && TypeSpec.IsValueType (ma.LeftExpression.Type) ?
+                                               var mod = inst is IMemoryLocation && TypeSpec.IsValueType (inst.Type) ?
                                                        Argument.AType.Ref : Argument.AType.None;
-                                               args.Insert (0, new Argument (ma.LeftExpression.Resolve (ec), mod));
+                                               args.Insert (0, new Argument (inst.Resolve (ec), mod));
                                        }
                                } else {        // is SimpleName
                                        if (ec.IsStatic) {
@@ -6380,18 +6426,15 @@ namespace Mono.CSharp
                        if (mg.IsConditionallyExcluded)
                                return;
 
-                       mg.EmitCall (ec, arguments);
+                       mg.EmitCall (ec, arguments, false);
                }
                
                public override void EmitStatement (EmitContext ec)
                {
-                       Emit (ec);
+                       if (mg.IsConditionallyExcluded)
+                               return;
 
-                       // 
-                       // Pop the return value if there is one
-                       //
-                       if (type.Kind != MemberKind.Void)
-                               ec.Emit (OpCodes.Pop);
+                       mg.EmitCall (ec, arguments, true);
                }
 
                public override SLE.Expression MakeExpression (BuilderContext ctx)
@@ -6752,7 +6795,7 @@ namespace Mono.CSharp
                        if (!Emit (ec, v))
                                v.Emit (ec);
                }
-               
+
                public override void EmitStatement (EmitContext ec)
                {
                        LocalTemporary v = null;
@@ -7555,7 +7598,9 @@ namespace Mono.CSharp
 
                public override void Emit (EmitContext ec)
                {
-                       EmitToFieldSource (ec);
+                       var await_field = EmitToFieldSource (ec);
+                       if (await_field != null)
+                               await_field.Emit (ec);
                }
 
                protected sealed override FieldExpr EmitToFieldSource (EmitContext ec)
@@ -7609,18 +7654,18 @@ namespace Mono.CSharp
                        return await_stack_field;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        // no multi dimensional or jagged arrays
                        if (arguments.Count != 1 || array_element_type.IsArray) {
-                               base.EncodeAttributeValue (rc, enc, targetType);
+                               base.EncodeAttributeValue (rc, enc, targetType, parameterType);
                                return;
                        }
 
                        // No array covariance, except for array -> object
                        if (type != targetType) {
                                if (targetType.BuiltinType != BuiltinTypeSpec.Type.Object) {
-                                       base.EncodeAttributeValue (rc, enc, targetType);
+                                       base.EncodeAttributeValue (rc, enc, targetType, parameterType);
                                        return;
                                }
 
@@ -7634,7 +7679,7 @@ namespace Mono.CSharp
                        if (array_data == null) {
                                IntConstant ic = arguments[0] as IntConstant;
                                if (ic == null || !ic.IsDefaultValue) {
-                                       base.EncodeAttributeValue (rc, enc, targetType);
+                                       base.EncodeAttributeValue (rc, enc, targetType, parameterType);
                                } else {
                                        enc.Encode (0);
                                }
@@ -7644,7 +7689,7 @@ namespace Mono.CSharp
 
                        enc.Encode (array_data.Count);
                        foreach (var element in array_data) {
-                               element.EncodeAttributeValue (rc, enc, array_element_type);
+                               element.EncodeAttributeValue (rc, enc, array_element_type, parameterType);
                        }
                }
                
@@ -7752,14 +7797,28 @@ namespace Mono.CSharp
                        : base (loc)
                {
                        this.type = type;
-                       eclass = ExprClass.Variable;
                }
 
-               protected override Expression DoResolve (ResolveContext ec)
+               protected override Expression DoResolve (ResolveContext rc)
                {
+                       eclass = ExprClass.Variable;
+
+                       var block = rc.CurrentBlock;
+                       if (block != null) {
+                               var top = block.ParametersBlock.TopBlock;
+                               if (top.ThisVariable != null)
+                                       variable_info = top.ThisVariable.VariableInfo;
+
+                       }
+
                        return this;
                }
 
+               public override Expression DoResolveLValue (ResolveContext rc, Expression right_side)
+               {
+                       return DoResolve (rc);
+               }
+
                public override HoistedVariable GetHoistedVariable (AnonymousExpression ae)
                {
                        return null;
@@ -7792,7 +7851,7 @@ namespace Mono.CSharp
                        }
                }
 
-               VariableInfo variable_info;
+               protected VariableInfo variable_info;
 
                public This (Location loc)
                {
@@ -8368,7 +8427,7 @@ namespace Mono.CSharp
                        return false;
                }
 
-               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
+               public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
                {
                        // Target type is not System.Type therefore must be object
                        // and we need to use different encoding sequence
@@ -8803,7 +8862,7 @@ namespace Mono.CSharp
                                // 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) {
+                               if (expr is VariableReference || expr is ConstantExpr || expr is Linq.TransparentMemberAccess || expr is EventExpr) {
                                        expr = expr.Resolve (rc);
                                } else if (expr is TypeParameterExpr) {
                                        expr.Error_UnexpectedKind (rc, flags, sn.Location);
@@ -8843,6 +8902,18 @@ namespace Mono.CSharp
                                return new DynamicMemberBinder (Name, args, loc);
                        }
 
+                       if (this is NullMemberAccess) {
+                               if (!IsNullPropagatingValid (expr.Type)) {
+                                       expr.Error_OperatorCannotBeApplied (rc, loc, "?", expr.Type);
+                                       return null;
+                               }
+
+                               if (expr_type.IsNullableType) {
+                                       expr = Nullable.Unwrap.Create (expr, true).Resolve (rc);
+                                       expr_type = expr.Type;
+                               }
+                       }
+
                        if (!IsValidDotExpression (expr_type)) {
                                Error_OperatorCannotBeApplied (rc, expr_type);
                                return null;
@@ -8931,6 +9002,10 @@ namespace Mono.CSharp
                                sn = null;
                        }
 
+                       if (this is NullMemberAccess) {
+                               me.NullShortCircuit = true;
+                       }
+
                        me = me.ResolveMemberAccess (rc, expr, sn);
 
                        if (Arity > 0) {
@@ -9025,6 +9100,8 @@ namespace Mono.CSharp
                                } else {
                                        texpr = new GenericOpenTypeExpr (nested, loc);
                                }
+                       } else if (expr_resolved is GenericOpenTypeExpr) {
+                               texpr = new GenericOpenTypeExpr (nested, loc);
                        } else {
                                texpr = new TypeExpression (nested, loc);
                        }
@@ -9100,6 +9177,14 @@ namespace Mono.CSharp
                }
        }
 
+       public class NullMemberAccess : MemberAccess
+       {
+               public NullMemberAccess (Expression expr, string identifier, TypeArguments args, Location loc)
+                       : base (expr, identifier, args, loc)
+               {
+               }
+       }
+
        /// <summary>
        ///   Implements checked expressions
        /// </summary>
@@ -9265,6 +9350,8 @@ namespace Mono.CSharp
                        this.Arguments = args;
                }
 
+               public bool NullPropagating { get; set; }
+
                public override Location StartLocation {
                        get {
                                return Expr.StartLocation;
@@ -9282,8 +9369,15 @@ namespace Mono.CSharp
                //
                Expression CreateAccessExpression (ResolveContext ec)
                {
+                       if (NullPropagating && !IsNullPropagatingValid (type)) {
+                               Error_OperatorCannotBeApplied (ec, loc, "?", type);
+                               return null;
+                       }
+
                        if (type.IsArray)
-                               return (new ArrayAccess (this, loc));
+                               return new ArrayAccess (this, loc) {
+                                       NullShortCircuit = NullPropagating
+                               };
 
                        if (type.IsPointer)
                                return MakePointerAccess (ec, type);
@@ -9298,7 +9392,9 @@ namespace Mono.CSharp
 
                        var indexers = MemberCache.FindMembers (type, MemberCache.IndexerNameAlias, false);
                        if (indexers != null || type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
-                               return new IndexerExpr (indexers, type, this);
+                               return new IndexerExpr (indexers, type, this) {
+                                       NullShortCircuit = NullPropagating
+                               };
                        }
 
                        if (type != InternalType.ErrorType) {
@@ -9424,10 +9520,16 @@ namespace Mono.CSharp
                        loc = l;
                }
 
+               public bool NullShortCircuit { get; set; }
+
                public void AddressOf (EmitContext ec, AddressOp mode)
                {
                        var ac = (ArrayContainer) ea.Expr.Type;
 
+                       if (!has_await_args.HasValue && ec.HasSet (BuilderContext.Options.AsyncBody) && ea.Arguments.ContainsEmitWithAwait ()) {
+                               LoadInstanceAndArguments (ec, false, true);
+                       }
+
                        LoadInstanceAndArguments (ec, false, false);
 
                        if (ac.Element.IsGenericParameter && mode == AddressOp.Load)
@@ -9438,6 +9540,9 @@ namespace Mono.CSharp
 
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
+                       if (NullShortCircuit)
+                               Error_NullShortCircuitInsideExpressionTree (ec);
+
                        return ea.CreateExpressionTree (ec);
                }
 
@@ -9448,6 +9553,9 @@ namespace Mono.CSharp
 
                public override Expression DoResolveLValue (ResolveContext ec, Expression right_side)
                {
+                       if (NullShortCircuit)
+                               throw new NotSupportedException ("null propagating operator assignment");
+
                        return DoResolve (ec);
                }
 
@@ -9470,9 +9578,13 @@ namespace Mono.CSharp
                                UnsafeError (ec, ea.Location);
                        }
 
+                       if (NullShortCircuit)
+                               type = LiftMemberType (ec, type);
+
                        foreach (Argument a in ea.Arguments) {
-                               if (a is NamedArgument)
-                                       ElementAccess.Error_NamedArgument ((NamedArgument) a, ec.Report);
+                               var na = a as NamedArgument;
+                               if (na != null)
+                                       ElementAccess.Error_NamedArgument (na, ec.Report);
 
                                a.Expr = ConvertExpressionToArrayIndex (ec, a.Expr);
                        }
@@ -9495,30 +9607,35 @@ namespace Mono.CSharp
                //
                // Load the array arguments into the stack.
                //
-               void LoadInstanceAndArguments (EmitContext ec, bool duplicateArguments, bool prepareAwait)
+               InstanceEmitter LoadInstanceAndArguments (EmitContext ec, bool duplicateArguments, bool prepareAwait)
                {
+                       InstanceEmitter ie;
                        if (prepareAwait) {
+                               ie = new InstanceEmitter ();
                                ea.Expr = ea.Expr.EmitToField (ec);
-                       } else if (duplicateArguments) {
-                               ea.Expr.Emit (ec);
-                               ec.Emit (OpCodes.Dup);
-
-                               var copy = new LocalTemporary (ea.Expr.Type);
-                               copy.Store (ec);
-                               ea.Expr = copy;
                        } else {
-                               ea.Expr.Emit (ec);
+                               ie = new InstanceEmitter (ea.Expr, false);
+                               ie.NullShortCircuit = NullShortCircuit;
+                               ie.Emit (ec);
+
+                               if (duplicateArguments) {
+                                       ec.Emit (OpCodes.Dup);
+
+                                       var copy = new LocalTemporary (ea.Expr.Type);
+                                       copy.Store (ec);
+                                       ea.Expr = copy;
+                               }
                        }
 
                        var dup_args = ea.Arguments.Emit (ec, duplicateArguments, prepareAwait);
                        if (dup_args != null)
                                ea.Arguments = dup_args;
+
+                       return ie;
                }
 
                public void Emit (EmitContext ec, bool leave_copy)
                {
-                       var ac = ea.Expr.Type as ArrayContainer;
-
                        if (prepared) {
                                ec.EmitLoadFromPtr (type);
                        } else {
@@ -9526,8 +9643,12 @@ namespace Mono.CSharp
                                        LoadInstanceAndArguments (ec, false, true);
                                }
 
-                               LoadInstanceAndArguments (ec, false, false);
+                               var ac = (ArrayContainer) ea.Expr.Type;
+                               var inst = LoadInstanceAndArguments (ec, false, false);
                                ec.EmitArrayLoad (ac);
+
+                               if (NullShortCircuit)
+                                       inst.EmitResultLift (ec, ((ArrayContainer) ea.Expr.Type).Element, false);
                        }       
 
                        if (leave_copy) {
@@ -9624,6 +9745,7 @@ namespace Mono.CSharp
                        // CallRef (ref a[await Task.Factory.StartNew (() => 1)]);
                        //
                        ea.Expr = ea.Expr.EmitToField (ec);
+                       ea.Arguments = ea.Arguments.Emit (ec, false, true);
                        return this;
                }
 
@@ -9715,6 +9837,10 @@ namespace Mono.CSharp
 
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
+                       if (NullShortCircuit) {
+                               Error_NullShortCircuitInsideExpressionTree (ec);
+                       }
+
                        Arguments args = Arguments.CreateForExpressionTree (ec, arguments,
                                InstanceExpression.CreateExpressionTree (ec),
                                new TypeOfMethod (Getter, loc));
@@ -10639,7 +10765,10 @@ namespace Mono.CSharp
                                        return null;
                                }
 
-                               if (!(member is PropertyExpr || member is FieldExpr)) {
+                               var me = member as MemberExpr;
+                               if (me is EventExpr) {
+                                       me = me.ResolveMemberAccess (ec, null, null);
+                               } else if (!(member is PropertyExpr || member is FieldExpr)) {
                                        ec.Report.Error (1913, loc,
                                                "Member `{0}' cannot be initialized. An object initializer may only be used for fields, or properties",
                                                member.GetSignatureForError ());
@@ -10647,7 +10776,6 @@ namespace Mono.CSharp
                                        return null;
                                }
 
-                               var me = member as MemberExpr;
                                if (me.IsStatic) {
                                        ec.Report.Error (1914, loc,
                                                "Static field or property `{0}' cannot be assigned in an object initializer",
@@ -10919,8 +11047,10 @@ namespace Mono.CSharp
 
                public override void FlowAnalysis (FlowAnalysisContext fc)
                {
-                       foreach (var initializer in initializers)
-                               initializer.FlowAnalysis (fc);
+                       foreach (var initializer in initializers) {
+                               if (initializer != null)
+                                       initializer.FlowAnalysis (fc);
+                       }
                }
        }
        
@@ -11052,6 +11182,20 @@ namespace Mono.CSharp
                        return e;
                }
 
+               public override void Emit (EmitContext ec)
+               {
+                       if (method == null && TypeSpec.IsValueType (type) && initializers.Initializers.Count > 1 && ec.HasSet (BuilderContext.Options.AsyncBody) && initializers.ContainsEmitWithAwait ()) {
+                               var fe = ec.GetTemporaryField (type);
+
+                               if (!Emit (ec, fe))
+                                       fe.Emit (ec);
+
+                               return;
+                       }
+
+                       base.Emit (ec);
+               }
+
                public override bool Emit (EmitContext ec, IMemoryLocation target)
                {
                        bool left_on_stack;
@@ -11068,6 +11212,8 @@ namespace Mono.CSharp
                        LocalTemporary temp = null;
 
                        instance = target as LocalTemporary;
+                       if (instance == null)
+                               instance = target as StackFieldExpr;
 
                        if (instance == null) {
                                if (!left_on_stack) {
index 4b0b21685993678e3891b45c005db46cbadaf61d..278f71e0f1830471ef1bda269a3856f7efafaaf2 100644 (file)
@@ -223,7 +223,9 @@ namespace Mono.CSharp
                        if (MemberType.IsStatic)
                                Error_VariableOfStaticClass (Location, GetSignatureForError (), MemberType, Report);
 
-                       CheckBase ();
+                       if (!IsCompilerGenerated)
+                               CheckBase ();
+
                        IsTypePermitted ();
                }
 
index 4f54f268d29295abe4a7cdb611a95bb264cdce15..dbb74a7515a0d930a37c4832521afe6acb04c247 100644 (file)
@@ -139,15 +139,22 @@ namespace Mono.CSharp
                                var field = struct_info.Fields[i];
 
                                if (!fc.IsStructFieldDefinitelyAssigned (vi, field.Name)) {
-                                       if (field.MemberDefinition is Property.BackingField) {
+                                       var bf = field.MemberDefinition as Property.BackingField;
+                                       if (bf != null) {
+                                               if (bf.Initializer != null)
+                                                       continue;
+
                                                fc.Report.Error (843, loc,
                                                        "An automatically implemented property `{0}' must be fully assigned before control leaves the constructor. Consider calling the default struct contructor from a constructor initializer",
                                                        field.GetSignatureForError ());
-                                       } else {
-                                               fc.Report.Error (171, loc,
-                                                       "Field `{0}' must be fully assigned before control leaves the constructor",
-                                                       field.GetSignatureForError ());
+
+                                               ok = false;
+                                               continue;
                                        }
+
+                                       fc.Report.Error (171, loc,
+                                               "Field `{0}' must be fully assigned before control leaves the constructor",
+                                               field.GetSignatureForError ());
                                        ok = false;
                                }
                        }
index 89fd1a2e6ac9c7799a7b28e27fb854761fcb7a92..f309c6ba57b4d8c96e69535b0d76a006da244f3d 100644 (file)
@@ -620,6 +620,11 @@ namespace Mono.CSharp {
                        spec.SetMetaInfo (type);
                }
 
+               public void Define (TypeParameter tp)
+               {
+                       builder = tp.builder;
+               }
+
                public void EmitConstraints (GenericTypeParameterBuilder builder)
                {
                        var attr = GenericParameterAttributes.None;
@@ -1047,7 +1052,8 @@ namespace Mono.CSharp {
                                        continue;
                                }
 
-                               types [i] = ((TypeParameterSpec)t).GetEffectiveBase ();
+                               var tps = t as TypeParameterSpec;
+                               types [i] = tps != null ? tps.GetEffectiveBase () : t;
                        }
 
                        if (HasTypeConstraint)
@@ -1349,7 +1355,15 @@ namespace Mono.CSharp {
 
                        if (TypeArguments != null) {
                                foreach (var t in TypeArguments) {
-                                       if (((TypeParameterSpec) t).IsConvertibleToInterface (iface))
+                                       var tps = t as TypeParameterSpec;
+                                       if (tps != null) {
+                                               if (tps.IsConvertibleToInterface (iface))
+                                                       return true;
+
+                                               continue;
+                                       }
+
+                                       if (t.ImplementsInterface (iface, false))
                                                return true;
                                }
                        }
@@ -1457,13 +1471,21 @@ namespace Mono.CSharp {
                        if (tp != null)
                                return Inflate (tp);
 
-                       var ac = type as ArrayContainer;
-                       if (ac != null) {
-                               var et = Inflate (ac.Element);
-                               if (et != ac.Element)
-                                       return ArrayContainer.MakeType (context.Module, et, ac.Rank);
+                       var ec = type as ElementTypeSpec;
+                       if (ec != null) {
+                               var et = Inflate (ec.Element);
+                               if (et != ec.Element) {
+                                       var ac = ec as ArrayContainer;
+                                       if (ac != null)
+                                               return ArrayContainer.MakeType (context.Module, et, ac.Rank);
+
+                                       if (ec is PointerContainer)
+                                               return PointerContainer.MakeType (context.Module, et);
+
+                                       throw new NotImplementedException ();
+                               }
 
-                               return ac;
+                               return ec;
                        }
 
                        if (type.Kind == MemberKind.MissingType)
index 0d7e9e5ad5fec0c693e3b56fedbd3c0c448aed16..b8c5832d21d8088f5e88c294d25cdf3a5449ea55 100644 (file)
@@ -434,6 +434,8 @@ namespace Mono.CSharp
                                                else
                                                        mod |= Modifiers.VIRTUAL;
                                        }
+                               } else if (parameters.HasExtensionMethodType) {
+                                       mod |= Modifiers.METHOD_EXTENSION;
                                }
                        }
 
index f10773009de7d715ecdd03b75f701cf871573441..5dce0ed1593086082b897df277c32585ca7bd15e 100644 (file)
@@ -74,6 +74,9 @@ namespace Mono.CSharp
 
                public void RegisterResumePoint ()
                {
+                       if (resume_pc != 0)
+                               return;
+
                        if (inside_try_block == null) {
                                resume_pc = machine_initializer.AddResumePoint (this);
                        } else {
@@ -723,8 +726,7 @@ namespace Mono.CSharp
                //
                // The state as we generate the machine
                //
-               Label move_next_ok;
-               Label iterator_body_end;
+               protected Label move_next_ok;
                protected Label move_next_error;
                LocalBuilder skip_finally;
                protected LocalBuilder current_pc;
@@ -738,11 +740,7 @@ namespace Mono.CSharp
 
                #region Properties
 
-               public Label BodyEnd {
-                       get {
-                               return iterator_body_end;
-                       }
-               }
+               public Label BodyEnd { get; set; }
 
                public LocalBuilder CurrentPC
                {
@@ -830,11 +828,18 @@ namespace Mono.CSharp
                        // We only care if the PC is zero (start executing) or non-zero (don't do anything)
                        ec.Emit (OpCodes.Brtrue, move_next_error);
 
-                       iterator_body_end = ec.DefineLabel ();
+                       BodyEnd = ec.DefineLabel ();
+
+                       var async_init = this as AsyncInitializer;
+                       if (async_init != null)
+                               ec.BeginExceptionBlock ();
 
                        block.EmitEmbedded (ec);
 
-                       ec.MarkLabel (iterator_body_end);
+                       if (async_init != null)
+                               async_init.EmitCatchBlock (ec);
+
+                       ec.MarkLabel (BodyEnd);
 
                        EmitMoveNextEpilogue (ec);
 
@@ -844,6 +849,8 @@ namespace Mono.CSharp
                                ec.EmitInt (0);
                                ec.Emit (OpCodes.Ret);
                        }
+
+                       ec.MarkLabel (move_next_ok);
                }
 
                void EmitMoveNext (EmitContext ec)
@@ -893,26 +900,14 @@ namespace Mono.CSharp
 
                        ec.MarkLabel (labels[0]);
 
-                       iterator_body_end = ec.DefineLabel ();
+                       BodyEnd = ec.DefineLabel ();
 
                        block.EmitEmbedded (ec);
 
-                       ec.MarkLabel (iterator_body_end);
+                       ec.MarkLabel (BodyEnd);
 
                        if (async_init != null) {
-                               var catch_value = LocalVariable.CreateCompilerGenerated (ec.Module.Compiler.BuiltinTypes.Exception, block, Location);
-
-                               ec.BeginCatchBlock (catch_value.Type);
-                               catch_value.EmitAssign (ec);
-
-                               ec.EmitThis ();
-                               ec.EmitInt ((int) IteratorStorey.State.After);
-                               ec.Emit (OpCodes.Stfld, storey.PC.Spec);
-
-                               ((AsyncTaskStorey) async_init.Storey).EmitSetException (ec, new LocalVariableReference (catch_value, Location));
-
-                               ec.Emit (OpCodes.Leave, move_next_ok);
-                               ec.EndExceptionBlock ();
+                               async_init.EmitCatchBlock (ec);
                        }
 
                        ec.Mark (Block.Original.EndLocation);
index a440d0ca66f6a0634d83863b766e5676d11286d6..daa7628756501f0f99ea11300281965550d7a19c 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  \r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
@@ -136,7 +137,7 @@ $(ProjectDir)\..\jay\jay.exe -ct &lt; $(ProjectDir)\..\jay\skeleton.cs $(Project
   <ItemGroup>\r
     <ProjectReference Include="../class/corlib/corlib-net_4_5.csproj">\r
       <Project>{33BF0182-AC5C-464C-995B-C9CFE74E1A95}</Project>\r
-      <Name>corlib\corlib-net_4_5</Name>\r
+      <Name>corlib-net_4_5</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
index 82acb67b164cd6ea51492d227ebbc34aa600f314..7336f1dbf858ade6e732cba67fd63fba724eb364 100644 (file)
@@ -721,6 +721,9 @@ namespace Mono.CSharp {
                                        if (!fs.IsPublic && container.MemberDefinition.IsImported && (!fs.MemberType.IsArray && TypeSpec.IsReferenceType (fs.MemberType)))
                                                continue;
 
+                                       //if ((fs.Modifiers & (Modifiers.BACKING_FIELD) != 0)
+                                       //      continue;
+
                                        if (fields == null)
                                                fields = new List<FieldSpec> ();
 
index 58baf51b09e034d5429b6ab6f7f3f79cbf9fd96c..ca4b68854439763550826489061fc82239816771 100644 (file)
@@ -563,6 +563,12 @@ namespace Mono.CSharp {
                                if ((ModFlags & extern_static) != extern_static) {
                                        Report.Error (601, a.Location, "The DllImport attribute must be specified on a method marked `static' and `extern'");
                                }
+
+                               if (MemberName.IsGeneric || Parent.IsGenericOrParentIsGeneric) {
+                                       Report.Error (7042, a.Location, 
+                                               "The DllImport attribute cannot be applied to a method that is generic or contained in a generic type");
+                               }
+
                                is_external_implementation = true;
                        }
 
@@ -719,6 +725,11 @@ namespace Mono.CSharp {
                        if (MethodData != null)
                                MethodData.Emit (Parent);
 
+                       if (block != null && block.StateMachine is AsyncTaskStorey) {
+                               var psm = Module.PredefinedAttributes.AsyncStateMachine;
+                               psm.EmitAttribute (MethodBuilder, block.StateMachine);
+                       }
+
                        if ((ModFlags & Modifiers.PARTIAL) == 0)
                                Block = null;
                }
@@ -1324,6 +1335,12 @@ namespace Mono.CSharp {
                                if (IsPartialDefinition) {
                                        if (partialMethodImplementation != null && CurrentTypeParameters != null) {
                                                CurrentTypeParameters.CheckPartialConstraints (partialMethodImplementation);
+
+                                               var otp = partialMethodImplementation.CurrentTypeParameters;
+                                               for (int i = 0; i < CurrentTypeParameters.Count; ++i) {
+                                                       var tp = CurrentTypeParameters [i];
+                                                       tp.Define (otp[i]);
+                                               }
                                        }
 
                                        return;
@@ -1343,12 +1360,6 @@ namespace Mono.CSharp {
                                        }
                                }
 
-                               if (block != null && block.StateMachine is AsyncTaskStorey) {
-                                       var psm = Module.PredefinedAttributes.AsyncStateMachine;
-                                       
-                                       psm.EmitAttribute (MethodBuilder, block.StateMachine);
-                               }
-
                                if ((ModFlags & Modifiers.METHOD_EXTENSION) != 0)
                                        Module.PredefinedAttributes.Extension.EmitAttribute (MethodBuilder);
 
@@ -1387,17 +1398,40 @@ namespace Mono.CSharp {
 
                        // Ensure we are always using method declaration parameters
                        for (int i = 0; i < methodDefinition.parameters.Count; ++i ) {
-                               parameters [i].Name = methodDefinition.parameters [i].Name;
-                               parameters [i].DefaultValue = methodDefinition.parameters [i].DefaultValue;
+                               var md_p = methodDefinition.parameters [i];
+                               var p = parameters [i];
+                               p.Name = md_p.Name;
+                               p.DefaultValue = md_p.DefaultValue;
+                               if (md_p.OptAttributes != null) {
+                                       if (p.OptAttributes == null) {
+                                               p.OptAttributes = md_p.OptAttributes;
+                                       } else {
+                                               p.OptAttributes.Attrs.AddRange (md_p.OptAttributes.Attrs);
+                                       }
+                               }
                        }
 
-                       if (methodDefinition.attributes == null)
-                               return;
+                       if (methodDefinition.attributes != null) {
+                               if (attributes == null) {
+                                       attributes = methodDefinition.attributes;
+                               } else {
+                                       attributes.Attrs.AddRange (methodDefinition.attributes.Attrs);
+                               }
+                       }
 
-                       if (attributes == null) {
-                               attributes = methodDefinition.attributes;
-                       } else {
-                               attributes.Attrs.AddRange (methodDefinition.attributes.Attrs);
+                       if (CurrentTypeParameters != null) {
+                               for (int i = 0; i < CurrentTypeParameters.Count; ++i) {
+                                       var tp_other = methodDefinition.CurrentTypeParameters [i];
+                                       if (tp_other.OptAttributes == null)
+                                               continue;
+
+                                       var tp = CurrentTypeParameters [i];
+                                       if (tp.OptAttributes == null) {
+                                               tp.OptAttributes = tp_other.OptAttributes;
+                                       } else {
+                                               tp.OptAttributes.Attrs.AddRange (tp.OptAttributes.Attrs);
+                                       }
+                               }
                        }
                }
        }
@@ -1501,7 +1535,7 @@ namespace Mono.CSharp {
                        
                        var call = new CallEmitter ();
                        call.InstanceExpression = new CompilerGeneratedThis (type, loc); 
-                       call.EmitPredefined (ec, base_ctor, argument_list);
+                       call.EmitPredefined (ec, base_ctor, argument_list, false);
                }
 
                public override void EmitStatement (EmitContext ec)
@@ -1586,7 +1620,6 @@ namespace Mono.CSharp {
                }
 
                public bool IsPrimaryConstructor { get; set; }
-
                
                MethodBase IMethodDefinition.Metadata {
                        get {
@@ -1675,12 +1708,12 @@ namespace Mono.CSharp {
                        if (!CheckBase ())
                                return false;
 
-                       if (Parent.PrimaryConstructorParameters != null && !IsPrimaryConstructor) {
-                               if (Parent.Kind == MemberKind.Struct) {
-                                       Report.Error (9009, Location, "`{0}': Structs with primary constructor cannot have explicit constructor",
+                       if (Parent.PrimaryConstructorParameters != null && !IsPrimaryConstructor && !IsStatic) {
+                               if (Parent.Kind == MemberKind.Struct && Initializer is ConstructorThisInitializer && Initializer.Arguments == null) {
+                                       Report.Error (8043, Location, "`{0}': Structs with primary constructor cannot specify default constructor initializer",
                                                GetSignatureForError ());
                                } else if (Initializer == null || Initializer is ConstructorBaseInitializer) {
-                                       Report.Error (9002, Location, "`{0}': Instance constructor of type with primary constructor must specify `this' constructor initializer",
+                                       Report.Error (8037, Location, "`{0}': Instance constructor of type with primary constructor must specify `this' constructor initializer",
                                                GetSignatureForError ());
                                }
                        }
@@ -1740,6 +1773,14 @@ namespace Mono.CSharp {
                        bc.Set (ResolveContext.Options.ConstructorScope);
 
                        if (block != null) {
+                               if (!IsStatic && Initializer == null && Parent.PartialContainer.Kind == MemberKind.Struct) {
+                                       //
+                                       // If this is a non-static `struct' constructor and doesn't have any
+                                       // initializer, it must initialize all of the struct's fields.
+                                       //
+                                       block.AddThisVariable (bc);
+                               }
+
                                //
                                // If we use a "this (...)" constructor initializer, then
                                // do not emit field initializers, they are initialized in the other constructor
@@ -1748,16 +1789,8 @@ namespace Mono.CSharp {
                                        Parent.PartialContainer.ResolveFieldInitializers (bc);
 
                                if (!IsStatic) {
-                                       if (Initializer == null) {
-                                               if (Parent.PartialContainer.Kind == MemberKind.Struct) {
-                                                       //
-                                                       // If this is a non-static `struct' constructor and doesn't have any
-                                                       // initializer, it must initialize all of the struct's fields.
-                                                       //
-                                                       block.AddThisVariable (bc);
-                                               } else if (Parent.PartialContainer.Kind == MemberKind.Class) {
-                                                       Initializer = new GeneratedBaseInitializer (Location, null);
-                                               }
+                                       if (Initializer == null && Parent.PartialContainer.Kind == MemberKind.Class) {
+                                               Initializer = new GeneratedBaseInitializer (Location, null);
                                        }
 
                                        if (Initializer != null) {
index f6031a534d39c5b1a48b228a1b71ca625ce5c881..5a368ee05b1a39e73e7708a247bde5c331ad4fa8 100644 (file)
@@ -683,6 +683,7 @@ namespace Mono.CSharp {
                public bool DeclarationFound;
 
                Namespace[] namespace_using_table;
+               TypeSpec[] types_using_table;
                Dictionary<string, UsingAliasNamespace> aliases;
 
                public NamespaceContainer (MemberName name, NamespaceContainer parent)
@@ -935,6 +936,24 @@ namespace Mono.CSharp {
                                        return new ExtensionMethodCandidates (invocationContext, candidates, this, position);
                        }
 
+                       // LAMESPEC: TODO no spec about priority over normal extension methods yet
+                       if (types_using_table != null) {
+                               foreach (var t in types_using_table) {
+
+                                       var res = t.MemberCache.FindExtensionMethods (invocationContext, name, arity);
+                                       if (res == null)
+                                               continue;
+
+                                       if (candidates == null)
+                                               candidates = res;
+                                       else
+                                               candidates.AddRange (res);
+                               }
+
+                               if (candidates != null)
+                                       return new ExtensionMethodCandidates (invocationContext, candidates, this, position);
+                       }
+
                        return null;
                }
 
@@ -1116,6 +1135,42 @@ namespace Mono.CSharp {
                        return match;
                }
 
+               public static MethodGroupExpr LookupStaticUsings (IMemberContext mc, string name, int arity, Location loc)
+               {
+                       for (var m = mc.CurrentMemberDefinition; m != null; m = m.Parent) {
+
+                               var nc = m as NamespaceContainer;
+                               if (nc == null)
+                                       continue;
+
+                               List<MemberSpec> candidates = null;
+                               if (nc.types_using_table != null) {
+                                       foreach (var using_type in nc.types_using_table) {
+                                               var members = MemberCache.FindMembers (using_type, name, true);
+                                               if (members != null) {
+                                                       foreach (var member in members) {
+                                                               if ((member.Modifiers & Modifiers.METHOD_EXTENSION) != 0)
+                                                                       continue;
+
+                                                               if (arity > 0 && member.Arity != arity)
+                                                                       continue;
+
+                                                               if (candidates == null)
+                                                                       candidates = new List<MemberSpec> ();
+
+                                                               candidates.Add (member);
+                                                       }
+                                               }
+                                       }
+                               }
+
+                               if (candidates != null)
+                                       return new MethodGroupExpr (candidates, null, loc);
+                       }
+
+                       return null;
+               }
+
                protected override void DefineNamespace ()
                {
                        if (namespace_using_table == null)
@@ -1129,7 +1184,9 @@ namespace Mono.CSharp {
                        namespace_using_table = empty_namespaces;
 
                        if (clauses != null) {
-                               var list = new List<Namespace> (clauses.Count);
+                               List<Namespace> namespaces = null;
+                               List<TypeSpec> types = null;
+
                                bool post_process_using_aliases = false;
 
                                for (int i = 0; i < clauses.Count; ++i) {
@@ -1168,21 +1225,36 @@ namespace Mono.CSharp {
                                        }
 
                                        var using_ns = entry.ResolvedExpression as NamespaceExpression;
-                                       if (using_ns == null)
-                                               continue;
+                                       if (using_ns == null) {
 
-                                       if (list.Contains (using_ns.Namespace)) {
-                                               // Ensure we don't report the warning multiple times in repl
-                                               clauses.RemoveAt (i--);
+                                               var type = ((TypeExpr)entry.ResolvedExpression).Type;
 
-                                               Compiler.Report.Warning (105, 3, entry.Location,
-                                                       "The using directive for `{0}' appeared previously in this namespace", using_ns.GetSignatureForError ());
+                                               if (types == null)
+                                                       types = new List<TypeSpec> ();
+
+                                               if (types.Contains (type)) {
+                                                       Warning_DuplicateEntry (entry);
+                                               } else {
+                                                       types.Add (type);
+                                               }
                                        } else {
-                                               list.Add (using_ns.Namespace);
+                                               if (namespaces == null)
+                                                       namespaces = new List<Namespace> ();
+
+                                               if (namespaces.Contains (using_ns.Namespace)) {
+                                                       // Ensure we don't report the warning multiple times in repl
+                                                       clauses.RemoveAt (i--);
+
+                                                       Warning_DuplicateEntry (entry);
+                                               } else {
+                                                       namespaces.Add (using_ns.Namespace);
+                                               }
                                        }
                                }
 
-                               namespace_using_table = list.ToArray ();
+                               namespace_using_table = namespaces == null ? new Namespace [0] : namespaces.ToArray ();
+                               if (types != null)
+                                       types_using_table = types.ToArray ();
 
                                if (post_process_using_aliases) {
                                        for (int i = 0; i < clauses.Count; ++i) {
@@ -1239,6 +1311,13 @@ namespace Mono.CSharp {
                        return false;
                }
 
+               void Warning_DuplicateEntry (UsingNamespace entry)
+               {
+                       Compiler.Report.Warning (105, 3, entry.Location,
+                               "The using directive for `{0}' appeared previously in this namespace",
+                               entry.ResolvedExpression.GetSignatureForError ());
+               }
+
                public override void Accept (StructuralVisitor visitor)
                {
                        visitor.Visit (this);
@@ -1294,13 +1373,27 @@ namespace Mono.CSharp {
                {
                        resolved = expr.ResolveAsTypeOrNamespace (ctx);
                        var ns = resolved as NamespaceExpression;
-                       if (ns == null) {
-                               if (resolved != null) {
-                                       ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (resolved.Type);
-                                       ctx.Module.Compiler.Report.Error (138, Location,
-                                               "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces",
-                                               GetSignatureForError ());
+                       if (ns != null)
+                               return;
+
+                       if (resolved != null) {
+                               var compiler = ctx.Module.Compiler;
+                               var type = resolved.Type;
+                               if (compiler.Settings.Version >= LanguageVersion.V_6) {
+                                       if (!type.IsClass || !type.IsStatic) {
+                                               compiler.Report.SymbolRelatedToPreviousError (type);
+                                               compiler.Report.Error (7007, Location,
+                                                       "`{0}' is not a static class. A using namespace directive can only be applied to static classes or namespace",
+                                                       GetSignatureForError ());
+                                       }
+
+                                       return;
                                }
+
+                               compiler.Report.SymbolRelatedToPreviousError (type);
+                               compiler.Report.Error (138, Location,
+                                       "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces",
+                                       GetSignatureForError ());
                        }
                }
 
index 5f1822d00701b8a259f8e1746e5b4ae4954d470d..853ec92bb0f59c5b258abcb0e23a8843bcb893ec 100644 (file)
@@ -84,9 +84,15 @@ namespace Mono.CSharp.Nullable
                }
 
                public static TypeSpec GetEnumUnderlyingType (ModuleContainer module, TypeSpec nullableEnum)
+               {
+                       return MakeType (module, EnumSpec.GetUnderlyingType (GetUnderlyingType (nullableEnum)));
+               }
+
+               public static TypeSpec MakeType (ModuleContainer module, TypeSpec underlyingType)
                {
                        return module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (module,
-                               new[] { EnumSpec.GetUnderlyingType (GetUnderlyingType (nullableEnum)) });
+                               new[] { underlyingType });
+
                }
        }
 
@@ -187,6 +193,11 @@ namespace Mono.CSharp.Nullable
                        call.EmitPredefined (ec, NullableInfo.GetHasValue (expr.Type), null);
                }
 
+               public override void EmitSideEffect (EmitContext ec)
+               {
+                       expr.EmitSideEffect (ec);
+               }
+
                public override Expression EmitToField (EmitContext ec)
                {
                        if (temp_field == null)
@@ -696,7 +707,7 @@ namespace Mono.CSharp.Nullable
                        }
 
                        if (!type.IsNullableType)
-                               type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { type });
+                               type = NullableInfo.MakeType (rc.Module, type);
 
                        return Wrap.Create (expr, type);
                }
@@ -1158,26 +1169,25 @@ namespace Mono.CSharp.Nullable
                                        //
                                        Constant lc = left as Constant;
                                        if (lc != null && !lc.IsDefaultValue)
-                                               return ReducedExpression.Create (lc, this);
+                                               return ReducedExpression.Create (lc, this, false);
 
                                        //
                                        // Reduce (left ?? null) to left OR (null-constant ?? right) to right
                                        //
-                                       if (right.IsNull || lc != null)
-                                               return ReducedExpression.Create (lc != null ? right : left, this);
+                                       if (right.IsNull || lc != null) {
+                                               //
+                                               // Special case null ?? null
+                                               //
+                                               if (right.IsNull && ltype == right.Type)
+                                                       return null;
+
+                                               return ReducedExpression.Create (lc != null ? right : left, this, false);
+                                       }
 
                                        right = Convert.ImplicitConversion (ec, right, ltype, loc);
                                        type = ltype;
                                        return this;
                                }
-
-                               //
-                               // Special case null ?? null
-                               //
-                               if (ltype == right.Type) {
-                                       type = ltype;
-                                       return this;
-                               }
                        } else {
                                return null;
                        }
@@ -1190,9 +1200,15 @@ namespace Mono.CSharp.Nullable
                        // Reduce (null ?? right) to right
                        //
                        if (left.IsNull)
-                               return ReducedExpression.Create (right, this).Resolve (ec);
+                               return ReducedExpression.Create (right, this, false).Resolve (ec);
 
                        left = Convert.ImplicitConversion (ec, unwrap ?? left, rtype, loc);
+
+                       if (TypeSpec.IsValueType (left.Type) && !left.Type.IsNullableType) {
+                               Warning_UnreachableExpression (ec, right.Location);
+                               return ReducedExpression.Create (left, this, false).Resolve (ec);
+                       }
+
                        type = rtype;
                        return this;
                }
@@ -1238,7 +1254,7 @@ namespace Mono.CSharp.Nullable
                                // When both expressions are nullable the unwrap
                                // is needed only for null check not for value uwrap
                                //
-                               if (type.IsNullableType)
+                               if (type.IsNullableType && TypeSpecComparer.IsEqual (NullableInfo.GetUnderlyingType (type), unwrap.Type))
                                        unwrap.Load (ec);
                                else
                                        left.Emit (ec);
index d95363c774c62b9aae16f0aa55624622b9911009..1a30ae384c07cc553f5bebb8936b9ba957828686 100644 (file)
@@ -222,8 +222,7 @@ namespace Mono.CSharp {
                        CallerMask = CallerMemberName | CallerLineNumber | CallerFilePath
                }
 
-               static readonly string[] attribute_targets = new string[] { "param" };
-               static readonly string[] attribute_targets_primary = new string[] { "param", "field" };
+               static readonly string[] attribute_targets = new [] { "param" };
 
                FullNamedExpression texpr;
                Modifier modFlags;
@@ -234,7 +233,6 @@ namespace Mono.CSharp {
                protected int idx;
                public bool HasAddressTaken;
 
-               Constructor primary_constructor;
                TemporaryVariableReference expr_tree_variable;
 
                HoistedParameter hoisted_variant;
@@ -309,7 +307,7 @@ namespace Mono.CSharp {
 
                public override string[] ValidAttributeTargets {
                        get {
-                               return primary_constructor != null ? attribute_targets_primary : attribute_targets;
+                               return attribute_targets;
                        }
                }
 
@@ -317,12 +315,6 @@ namespace Mono.CSharp {
 
                public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
                {
-                       if (a.Target == AttributeTargets.Field) {
-                               var field = MemberCache.FindMember (primary_constructor.Spec.DeclaringType, MemberFilter.Field (name, parameter_type), BindingRestriction.DeclaredOnly);
-                               ((Field)field.MemberDefinition).ApplyAttributeBuilder (a, ctor, cdata, pa);
-                               return;
-                       }
-
                        if (a.Type == pa.In && ModFlags == Modifier.OUT) {
                                a.Report.Error (36, a.Location, "An out parameter cannot have the `In' attribute");
                                return;
@@ -379,6 +371,15 @@ namespace Mono.CSharp {
                        return member.IsAccessibleAs (parameter_type);
                }
 
+               bool IsValidCallerContext (MemberCore memberContext)
+               {
+                       var m = memberContext as Method;
+                       if (m != null)
+                               return !m.IsPartialImplementation;
+
+                       return true;
+               }
+
                // <summary>
                //   Resolve is used in method definitions
                // </summary>
@@ -390,10 +391,6 @@ namespace Mono.CSharp {
                        if (attributes != null)
                                attributes.AttachTo (this, rc);
 
-                       var ctor = rc.CurrentMemberDefinition as Constructor;
-                       if (ctor != null && ctor.IsPrimaryConstructor)
-                               primary_constructor = ctor;
-
                        parameter_type = texpr.ResolveAsType (rc);
                        if (parameter_type == null)
                                return null;
@@ -428,6 +425,7 @@ namespace Mono.CSharp {
                {
                        var pa = rc.Module.PredefinedAttributes;
                        TypeSpec caller_type;
+                       Attribute callerMemberName = null, callerFilePath = null;
 
                        foreach (var attr in attributes.Attrs) {
                                var atype = attr.ResolveTypeForComparison ();
@@ -442,18 +440,31 @@ namespace Mono.CSharp {
                                                        caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ());
                                        }
 
+                                       if (!IsValidCallerContext (rc.CurrentMemberDefinition)) {
+                                               rc.Report.Warning (4026, 1, attr.Location,
+                                                       "The CallerMemberName applied to parameter `{0}' will have no effect because it applies to a member that is used in context that do not allow optional arguments",
+                                                       name);
+                                       }
+
                                        modFlags |= Modifier.CallerMemberName;
+                                       callerMemberName = attr;
                                        continue;
                                }
 
                                if (atype == pa.CallerLineNumberAttribute) {
                                        caller_type = rc.BuiltinTypes.Int;
-                                       if (caller_type != parameter_type && !Convert.ImplicitNumericConversionExists (caller_type, parameter_type)) {
+                                       if (caller_type != parameter_type && !Convert.ImplicitStandardConversionExists (new IntConstant (caller_type, int.MaxValue, Location.Null), parameter_type)) {
                                                rc.Report.Error (4017, attr.Location,
-                                                       "The CallerMemberName attribute cannot be applied because there is no standard conversion from `{0}' to `{1}'",
+                                                       "The CallerLineNumberAttribute attribute cannot be applied because there is no standard conversion from `{0}' to `{1}'",
                                                        caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ());
                                        }
 
+                                       if (!IsValidCallerContext (rc.CurrentMemberDefinition)) {
+                                               rc.Report.Warning (4024, 1, attr.Location,
+                                                       "The CallerLineNumberAttribute applied to parameter `{0}' will have no effect because it applies to a member that is used in context that do not allow optional arguments",
+                                                       name);
+                                       }
+
                                        modFlags |= Modifier.CallerLineNumber;
                                        continue;
                                }
@@ -466,10 +477,40 @@ namespace Mono.CSharp {
                                                        caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ());
                                        }
 
+                                       if (!IsValidCallerContext (rc.CurrentMemberDefinition)) {
+                                               rc.Report.Warning (4025, 1, attr.Location,
+                                                       "The CallerFilePath applied to parameter `{0}' will have no effect because it applies to a member that is used in context that do not allow optional arguments",
+                                                       name);
+                                       }
+
                                        modFlags |= Modifier.CallerFilePath;
+                                       callerFilePath = attr;
                                        continue;
                                }
                        }
+
+                       if ((modFlags & Modifier.CallerLineNumber) != 0) {
+                               if (callerMemberName != null) {
+                                       rc.Report.Warning (7081, 1, callerMemberName.Location,
+                                               "The CallerMemberNameAttribute applied to parameter `{0}' will have no effect. It is overridden by the CallerLineNumberAttribute",
+                                               Name);
+                               }
+
+                               if (callerFilePath != null) {
+                                       rc.Report.Warning (7082, 1, callerFilePath.Location,
+                                               "The CallerFilePathAttribute applied to parameter `{0}' will have no effect. It is overridden by the CallerLineNumberAttribute",
+                                               name);
+                               }
+                       }
+
+                       if ((modFlags & Modifier.CallerMemberName) != 0) {
+                               if (callerFilePath != null) {
+                                       rc.Report.Warning (7080, 1, callerFilePath.Location,
+                                               "The CallerMemberNameAttribute applied to parameter `{0}' will have no effect. It is overridden by the CallerFilePathAttribute",
+                                               name);
+                               }
+
+                       }
                }
 
                public void ResolveDefaultValue (ResolveContext rc)
@@ -736,6 +777,11 @@ namespace Mono.CSharp {
                        return new TypeExpression (p_type, location);
                }
 
+               public void SetIndex (int index)
+               {
+                       idx = index;
+               }
+
                public void Warning_UselessOptionalParameter (Report Report)
                {
                        Report.Warning (1066, 1, Location,
@@ -1098,6 +1144,23 @@ namespace Mono.CSharp {
                        return new ParametersCompiled (parameters, types);
                }
 
+               public static ParametersCompiled Prefix (ParametersCompiled parameters, Parameter p, TypeSpec type)
+               {
+                       var ptypes = new TypeSpec [parameters.Count + 1];
+                       ptypes [0] = type;
+                       Array.Copy (parameters.Types, 0, ptypes, 1, parameters.Count);
+
+                       var param = new Parameter [ptypes.Length];
+                       param [0] = p;
+                       for (int i = 0; i < parameters.Count; ++i) {
+                               var pi = parameters [i];
+                               param [i + 1] = pi;
+                               pi.SetIndex (i + 1);
+                       }
+
+                       return ParametersCompiled.CreateFullyResolved (param, ptypes);
+               }
+
                //
                // TODO: This does not fit here, it should go to different version of AParametersCollection
                // as the underlying type is not Parameter and some methods will fail to cast
@@ -1356,9 +1419,11 @@ namespace Mono.CSharp {
                        expr = Child;
 
                        if (!(expr is Constant || expr is DefaultValueExpression || (expr is New && ((New) expr).IsDefaultStruct))) {
-                               rc.Report.Error (1736, Location,
-                                       "The expression being assigned to optional parameter `{0}' must be a constant or default value",
-                                       p.Name);
+                               if (!(expr is ErrorExpression)) {
+                                       rc.Report.Error (1736, Location,
+                                               "The expression being assigned to optional parameter `{0}' must be a constant or default value",
+                                               p.Name);
+                               }
 
                                return;
                        }
index 339d42d8f6753c1fad8a13f00ee0a4f5f1935a5d..8c59db158bbef3448a73a468d448c23f22a930fc 100644 (file)
@@ -512,7 +512,16 @@ namespace Mono.CSharp
                        // Check base property accessors conflict
                        //
                        var base_prop = (PropertySpec) base_member;
-                       if (Get != null) {
+                       if (Get == null) {
+                               if ((ModFlags & Modifiers.SEALED) != 0 && base_prop.HasGet && !base_prop.Get.IsAccessible (this)) {
+                                       // TODO: Should be different error code but csc uses for some reason same
+                                       Report.SymbolRelatedToPreviousError (base_prop);
+                                       Report.Error (545, Location,
+                                               "`{0}': cannot override because `{1}' does not have accessible get accessor",
+                                               GetSignatureForError (), base_prop.GetSignatureForError ());
+                                       ok = false;
+                               }
+                       } else {
                                if (!base_prop.HasGet) {
                                        if (ok) {
                                                Report.SymbolRelatedToPreviousError (base_prop);
@@ -529,7 +538,16 @@ namespace Mono.CSharp
                                }
                        }
 
-                       if (Set != null) {
+                       if (Set == null) {
+                               if ((ModFlags & Modifiers.SEALED) != 0 && base_prop.HasSet && !base_prop.Set.IsAccessible (this)) {
+                                       // TODO: Should be different error code but csc uses for some reason same
+                                       Report.SymbolRelatedToPreviousError (base_prop);
+                                       Report.Error (546, Location,
+                                               "`{0}': cannot override because `{1}' does not have accessible set accessor",
+                                               GetSignatureForError (), base_prop.GetSignatureForError ());
+                                       ok = false;
+                               }
+                       } else {
                                if (!base_prop.HasSet) {
                                        if (ok) {
                                                Report.SymbolRelatedToPreviousError (base_prop);
@@ -714,12 +732,14 @@ namespace Mono.CSharp
                {
                        readonly Property property;
 
-                       public BackingField (Property p)
+                       public BackingField (Property p, bool readOnly)
                                : base (p.Parent, p.type_expr,
                                Modifiers.BACKING_FIELD | Modifiers.COMPILER_GENERATED | Modifiers.PRIVATE | (p.ModFlags & (Modifiers.STATIC | Modifiers.UNSAFE)),
                                new MemberName ("<" + p.GetFullName (p.MemberName) + ">k__BackingField", p.Location), null)
                        {
                                this.property = p;
+                               if (readOnly)
+                                       ModFlags |= Modifiers.READONLY;
                        }
 
                        public Property OriginalProperty {
@@ -748,6 +768,8 @@ namespace Mono.CSharp
                {
                }
 
+               public Expression Initializer { get; set; }
+
                public override void Accept (StructuralVisitor visitor)
                {
                        visitor.Visit (this);
@@ -766,10 +788,16 @@ namespace Mono.CSharp
                void CreateAutomaticProperty ()
                {
                        // Create backing field
-                       backing_field = new BackingField (this);
+                       backing_field = new BackingField (this, Initializer != null && Set == null);
                        if (!backing_field.Define ())
                                return;
 
+                       if (Initializer != null) {
+                               backing_field.Initializer = Initializer;
+                               Parent.RegisterFieldForInitialization (backing_field, new FieldInitializer (backing_field, Initializer, Location));
+                               backing_field.ModFlags |= Modifiers.READONLY;
+                       }
+
                        Parent.PartialContainer.Members.Add (backing_field);
 
                        FieldExpr fe = new FieldExpr (backing_field, Location);
@@ -784,11 +812,15 @@ namespace Mono.CSharp
                        Get.Block = new ToplevelBlock (Compiler, ParametersCompiled.EmptyReadOnlyParameters, Location.Null);
                        Return r = new Return (fe, Get.Location);
                        Get.Block.AddStatement (r);
+                       Get.ModFlags |= Modifiers.COMPILER_GENERATED;
 
                        // Create set block
-                       Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Location.Null);
-                       Assign a = new SimpleAssign (fe, new SimpleName ("value", Location.Null), Location.Null);
-                       Set.Block.AddStatement (new StatementExpression (a, Set.Location));
+                       if (Set != null) {
+                               Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Location.Null);
+                               Assign a = new SimpleAssign (fe, new SimpleName ("value", Location.Null), Location.Null);
+                               Set.Block.AddStatement (new StatementExpression (a, Set.Location));
+                               Set.ModFlags |= Modifiers.COMPILER_GENERATED;
+                       }
                }
 
                public override bool Define ()
@@ -798,13 +830,37 @@ namespace Mono.CSharp
 
                        flags |= MethodAttributes.HideBySig | MethodAttributes.SpecialName;
 
-                       if (!IsInterface && (ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) == 0 &&
-                               AccessorSecond != null && Get.Block == null && Set.Block == null) {
-                               if (Compiler.Settings.Version <= LanguageVersion.ISO_2)
-                                       Report.FeatureIsNotAvailable (Compiler, Location, "automatically implemented properties");
+                       bool auto = AccessorFirst.Block == null && (AccessorSecond == null || AccessorSecond.Block == null) &&
+                               (ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) == 0;
+
+                       if (Initializer != null) {
+                               if (!auto)
+                                       Report.Error (8050, Location, "`{0}': Only auto-implemented properties can have initializers",
+                                               GetSignatureForError ());
+
+                               if (IsInterface)
+                                       Report.Error (8053, Location, "`{0}': Properties inside interfaces cannot have initializers",
+                                               GetSignatureForError ());
+
+                               if (Compiler.Settings.Version < LanguageVersion.V_6)
+                                       Report.FeatureIsNotAvailable (Compiler, Location, "auto-implemented property initializer");
+                       }
+
+                       if (auto) {
+                               if (Get == null) {
+                                       Report.Error (8052, Location, "Auto-implemented property `{0}' must have get accessor",
+                                               GetSignatureForError ());
+                                       return false;
+                               }
+
+                               if (Initializer == null && AccessorSecond == null) {
+                                       Report.Error (8051, Location, "Auto-implemented property `{0}' must have set accessor or initializer",
+                                               GetSignatureForError ());
+                               }
+
+                               if (Compiler.Settings.Version < LanguageVersion.V_3 && Initializer == null)
+                                       Report.FeatureIsNotAvailable (Compiler, Location, "auto-implemented properties");
 
-                               Get.ModFlags |= Modifiers.COMPILER_GENERATED;
-                               Set.ModFlags |= Modifiers.COMPILER_GENERATED;
                                CreateAutomaticProperty ();
                        }
 
index 009007b0d529ca45d1cc0de85de61a5cb4f1dab8..5ae47d8a0d061938ddae241f13621178fb6bdd14 100644 (file)
@@ -56,7 +56,9 @@ namespace Mono.CSharp {
                        3000, 3001, 3002, 3003, 3005, 3006, 3007, 3008, 3009,
                        3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019,
                        3021, 3022, 3023, 3024, 3026, 3027,
-                       4014
+                       4014, 4024, 4025, 4026,
+                       7035, 7080, 7081, 7082, 7095,
+                       8009,
                };
 
                static HashSet<int> AllWarningsHashSet;
index 5e56f614f232f985a567d6ec9d7d3f2029cee2a1..3c7f13bdb13b4b3922fc19d5f57593c2334418e1 100644 (file)
@@ -28,6 +28,7 @@ namespace Mono.CSharp {
                V_3 = 3,
                V_4 = 4,
                V_5 = 5,
+               V_6 = 6,
                Future = 100,
 
                Default = LanguageVersion.Future,
@@ -1136,11 +1137,13 @@ namespace Mono.CSharp {
 
                                switch (value.ToLowerInvariant ()) {
                                case "iso-1":
+                               case "1":
                                        settings.Version = LanguageVersion.ISO_1;
                                        return ParseResult.Success;
                                case "default":
                                        settings.Version = LanguageVersion.Default;
                                        return ParseResult.Success;
+                               case "2":
                                case "iso-2":
                                        settings.Version = LanguageVersion.ISO_2;
                                        return ParseResult.Success;
@@ -1153,12 +1156,15 @@ namespace Mono.CSharp {
                                case "5":
                                        settings.Version = LanguageVersion.V_5;
                                        return ParseResult.Success;
+                               case "6":
+                                       settings.Version = LanguageVersion.V_6;
+                                       return ParseResult.Success;
                                case "future":
                                        settings.Version = LanguageVersion.Future;
                                        return ParseResult.Success;
                                }
 
-                               report.Error (1617, "Invalid -langversion option `{0}'. It must be `ISO-1', `ISO-2', `3', `4', `5', `Default' or `Future'", value);
+                               report.Error (1617, "Invalid -langversion option `{0}'. It must be `ISO-1', `ISO-2', Default or value in range 1 to 6", value);
                                return ParseResult.Error;
 
                        case "/codepage":
index cbce03f2bc5506facff0ca588a77ec51cef52df0..444aafebe23934346b7aa8e4daeb69fb37232c85 100644 (file)
@@ -278,6 +278,10 @@ namespace Mono.CSharp {
                        var res = TrueStatement.FlowAnalysis (fc);
 
                        if (FalseStatement == null) {
+                               var c = expr as Constant;
+                               if (c != null && !c.IsDefaultValue)
+                                       return true_returns;
+
                                if (true_returns)
                                        fc.DefiniteAssignment = da_false;
                                else
@@ -688,11 +692,7 @@ namespace Mono.CSharp {
                                infinite = true;
                        }
 
-                       base.Resolve (bc);
-
-                       Iterator.Resolve (bc);
-
-                       return true;
+                       return base.Resolve (bc) && Iterator.Resolve (bc);
                }
 
                protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
@@ -859,11 +859,11 @@ namespace Mono.CSharp {
                        var prev_loop = bc.EnclosingLoop;
                        var prev_los = bc.EnclosingLoopOrSwitch;
                        bc.EnclosingLoopOrSwitch = bc.EnclosingLoop = this;
-                       Statement.Resolve (bc);
+                       var ok = Statement.Resolve (bc);
                        bc.EnclosingLoopOrSwitch = prev_los;
                        bc.EnclosingLoop = prev_loop;
 
-                       return true;
+                       return ok;
                }
 
                //
@@ -1202,15 +1202,16 @@ namespace Mono.CSharp {
                                                var async_type = storey.ReturnType;
 
                                                if (async_type == null && async_block.ReturnTypeInference != null) {
-                                                       async_block.ReturnTypeInference.AddCommonTypeBoundAsync (expr.Type);
+                                                       if (expr.Type.Kind == MemberKind.Void && !(this is ContextualReturn))
+                                                               ec.Report.Error (4029, loc, "Cannot return an expression of type `void'");
+                                                       else
+                                                               async_block.ReturnTypeInference.AddCommonTypeBoundAsync (expr.Type);
                                                        return true;
                                                }
 
                                                if (async_type.Kind == MemberKind.Void) {
-                                                       ec.Report.Error (127, loc,
-                                                               "`{0}': A return keyword must not be followed by any expression when method returns void",
-                                                               ec.GetSignatureForError ());
-
+                                                       ec.Report.Error (8030, loc,
+                                                               "Anonymous function or lambda expression converted to a void returning delegate cannot return a value");
                                                        return false;
                                                }
 
@@ -1218,18 +1219,14 @@ namespace Mono.CSharp {
                                                        if (this is ContextualReturn)
                                                                return true;
 
-                                                       // Same error code as .NET but better error message
                                                        if (async_block.DelegateType != null) {
-                                                               ec.Report.Error (1997, loc,
-                                                                       "`{0}': A return keyword must not be followed by an expression when async delegate returns `Task'. Consider using `Task<T>' return type",
-                                                                       async_block.DelegateType.GetSignatureForError ());
+                                                               ec.Report.Error (8031, loc,
+                                                                       "Async lambda expression or anonymous method converted to a `Task' cannot return a value. Consider returning `Task<T>'");
                                                        } else {
                                                                ec.Report.Error (1997, loc,
                                                                        "`{0}': A return keyword must not be followed by an expression when async method returns `Task'. Consider using `Task<T>' return type",
                                                                        ec.GetSignatureForError ());
-
                                                        }
-
                                                        return false;
                                                }
 
@@ -1245,12 +1242,9 @@ namespace Mono.CSharp {
                                                }
                                        }
                                } else {
-                                       // Same error code as .NET but better error message
                                        if (block_return_type.Kind == MemberKind.Void) {
-                                               ec.Report.Error (127, loc,
-                                                       "`{0}': A return keyword must not be followed by any expression when delegate returns void",
-                                                       am.GetSignatureForError ());
-
+                                               ec.Report.Error (8030, loc,
+                                                       "Anonymous function or lambda expression converted to a void returning delegate cannot return a value");
                                                return false;
                                        }
 
@@ -1294,23 +1288,42 @@ namespace Mono.CSharp {
                protected override void DoEmit (EmitContext ec)
                {
                        if (expr != null) {
-                               expr.Emit (ec);
 
                                var async_body = ec.CurrentAnonymousMethod as AsyncInitializer;
                                if (async_body != null) {
-                                       var async_return = ((AsyncTaskStorey) async_body.Storey).HoistedReturn;
+                                       var storey = (AsyncTaskStorey)async_body.Storey;
+                                       Label exit_label = async_body.BodyEnd;
 
+                                       //
                                        // It's null for await without async
-                                       if (async_return != null) {
-                                               async_return.EmitAssign (ec);
+                                       //
+                                       if (storey.HoistedReturnValue != null) {
+                                               //
+                                               // Special case hoisted return value (happens in try/finally scenario)
+                                               //
+                                               if (ec.TryFinallyUnwind != null) {
+                                                       if (storey.HoistedReturnValue is VariableReference) {
+                                                               storey.HoistedReturnValue = ec.GetTemporaryField (storey.HoistedReturnValue.Type);
+                                                       }
 
+                                                       exit_label = TryFinally.EmitRedirectedReturn (ec, async_body);
+                                               }
+
+                                               var async_return = (IAssignMethod)storey.HoistedReturnValue;
+                                               async_return.EmitAssign (ec, expr, false, false);
                                                ec.EmitEpilogue ();
+                                       } else {
+                                               expr.Emit (ec);
+
+                                               if (ec.TryFinallyUnwind != null)
+                                                       exit_label = TryFinally.EmitRedirectedReturn (ec, async_body);
                                        }
 
-                                       ec.Emit (OpCodes.Leave, async_body.BodyEnd);
+                                       ec.Emit (OpCodes.Leave, exit_label);
                                        return;
                                }
 
+                               expr.Emit (ec);
                                ec.EmitEpilogue ();
 
                                if (unwind_protect || ec.EmitAccurateDebugInfo)
@@ -1431,8 +1444,6 @@ namespace Mono.CSharp {
                                } else {
                                        label.AddGotoReference (rc, true);
                                }
-
-                               try_finally = null;
                        } else {
                                label.AddGotoReference (rc, false);
                        }
@@ -1451,8 +1462,27 @@ namespace Mono.CSharp {
                                throw new InternalErrorException ("goto emitted before target resolved");
 
                        Label l = label.LabelTarget (ec);
+
+                       if (ec.TryFinallyUnwind != null && IsLeavingFinally (label.Block)) {
+                               var async_body = (AsyncInitializer) ec.CurrentAnonymousMethod;
+                               l = TryFinally.EmitRedirectedJump (ec, async_body, l, label.Block);
+                       }
+
                        ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, l);
                }
+
+               bool IsLeavingFinally (Block labelBlock)
+               {
+                       var b = try_finally.Statement as Block;
+                       while (b != null) {
+                               if (b == labelBlock)
+                                       return true;
+
+                               b = b.Parent;
+                       }
+
+                       return false;
+               }
                
                public override object Accept (StructuralVisitor visitor)
                {
@@ -1791,9 +1821,20 @@ namespace Mono.CSharp {
                        
                protected override void DoEmit (EmitContext ec)
                {
-                       if (expr == null)
-                               ec.Emit (OpCodes.Rethrow);
-                       else {
+                       if (expr == null) {
+                               var atv = ec.AsyncThrowVariable;
+                               if (atv != null) {
+                                       if (atv.HoistedVariant != null) {
+                                               atv.HoistedVariant.Emit (ec);
+                                       } else {
+                                               atv.Emit (ec);
+                                       }
+
+                                       ec.Emit (OpCodes.Throw);
+                               } else {
+                                       ec.Emit (OpCodes.Rethrow);
+                               }
+                       } else {
                                expr.Emit (ec);
 
                                ec.Emit (OpCodes.Throw);
@@ -1842,7 +1883,14 @@ namespace Mono.CSharp {
 
                protected override void DoEmit (EmitContext ec)
                {
-                       ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, ec.LoopEnd);
+                       var l = ec.LoopEnd;
+
+                       if (ec.TryFinallyUnwind != null) {
+                               var async_body = (AsyncInitializer) ec.CurrentAnonymousMethod;
+                               l = TryFinally.EmitRedirectedJump (ec, async_body, l, enclosing_loop.Statement as Block);
+                       }
+
+                       ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, l);
                }
 
                protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
@@ -1883,7 +1931,14 @@ namespace Mono.CSharp {
 
                protected override void DoEmit (EmitContext ec)
                {
-                       ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, ec.LoopBegin);
+                       var l = ec.LoopBegin;
+
+                       if (ec.TryFinallyUnwind != null) {
+                               var async_body = (AsyncInitializer) ec.CurrentAnonymousMethod;
+                               l = TryFinally.EmitRedirectedJump (ec, async_body, l, enclosing_loop.Statement as Block);
+                       }
+
+                       ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, l);
                }
 
                protected override bool DoResolve (BlockContext bc)
@@ -2185,13 +2240,13 @@ namespace Mono.CSharp {
                {
                        li.CreateBuilder (ec);
 
-                       if (Initializer != null)
+                       if (Initializer != null && !IsUnreachable)
                                ((ExpressionStatement) Initializer).EmitStatement (ec);
 
                        if (declarators != null) {
                                foreach (var d in declarators) {
                                        d.Variable.CreateBuilder (ec);
-                                       if (d.Initializer != null) {
+                                       if (d.Initializer != null && !IsUnreachable) {
                                                ec.Mark (d.Variable.Location);
                                                ((ExpressionStatement) d.Initializer).EmitStatement (ec);
                                        }
@@ -2521,6 +2576,10 @@ namespace Mono.CSharp {
 
                public void EmitAddressOf (EmitContext ec)
                {
+                       // TODO: Need something better for temporary variables
+                       if ((flags & Flags.CompilerGenerated) != 0)
+                               CreateBuilder (ec);
+
                        ec.Emit (OpCodes.Ldloca, builder);
                }
 
@@ -2622,7 +2681,8 @@ namespace Mono.CSharp {
                        FinallyBlock = 1 << 14,
                        CatchBlock = 1 << 15,
                        Iterator = 1 << 20,
-                       NoFlowAnalysis = 1 << 21
+                       NoFlowAnalysis = 1 << 21,
+                       InitializationEmitted = 1 << 22
                }
 
                public Block Parent;
@@ -2922,7 +2982,7 @@ namespace Mono.CSharp {
 
                                end_unreachable = s.FlowAnalysis (fc);
                                if (s.IsUnreachable) {
-                                       statements[startIndex] = new EmptyStatement (s.loc);
+                                       statements [startIndex] = RewriteUnreachableStatement (s);
                                        continue;
                                }
 
@@ -2949,7 +3009,7 @@ namespace Mono.CSharp {
 
                                                if (s.IsUnreachable) {
                                                        s.FlowAnalysis (fc);
-                                                       statements[startIndex] = new EmptyStatement (s.loc);
+                                                       statements [startIndex] = RewriteUnreachableStatement (s);
                                                }
                                        }
                                }
@@ -2964,6 +3024,24 @@ namespace Mono.CSharp {
                        return !Explicit.HasReachableClosingBrace;
                }
 
+               static Statement RewriteUnreachableStatement (Statement s)
+               {
+                       // LAMESPEC: It's not clear whether declararion statement should be part of reachability
+                       // analysis. Even csc report unreachable warning for it but it's actually used hence
+                       // we try to emulate this behaviour
+                       //
+                       // Consider:
+                       //      goto L;
+                       //      int v;
+                       // L:
+                       //      v = 1;
+
+                       if (s is BlockVariable)
+                               return s;
+
+                       return new EmptyStatement (s.loc);
+               }
+
                public void ScanGotoJump (Statement label)
                {
                        int i;
@@ -3121,8 +3199,11 @@ namespace Mono.CSharp {
                        return am_storey;
                }
 
-               public override void Emit (EmitContext ec)
+               public void EmitScopeInitialization (EmitContext ec)
                {
+                       if ((flags & Flags.InitializationEmitted) != 0)
+                               return;
+
                        if (am_storey != null) {
                                DefineStoreyContainer (ec, am_storey);
                                am_storey.EmitStoreyInstantiation (ec, this);
@@ -3131,6 +3212,13 @@ namespace Mono.CSharp {
                        if (scope_initializers != null)
                                EmitScopeInitializers (ec);
 
+                       flags |= Flags.InitializationEmitted;
+               }
+
+               public override void Emit (EmitContext ec)
+               {
+                       EmitScopeInitialization (ec);
+
                        if (ec.EmitAccurateDebugInfo && !IsCompilerGenerated && ec.Mark (StartLocation)) {
                                ec.Emit (OpCodes.Nop);
                        }
@@ -3585,6 +3673,9 @@ namespace Mono.CSharp {
                        get {
                                return top_block;
                        }
+                       set {
+                               top_block = value;
+                       }
                }
 
                public bool Resolved {
@@ -3726,16 +3817,14 @@ namespace Mono.CSharp {
                        var label = value as LabeledStatement;
                        Block b = block;
                        if (label != null) {
-                               do {
-                                       if (label.Block == b)
-                                               return label;
-                                       b = b.Parent;
-                               } while (b != null);
+                               if (IsLabelVisible (label, b))
+                                       return label;
+
                        } else {
                                List<LabeledStatement> list = (List<LabeledStatement>) value;
                                for (int i = 0; i < list.Count; ++i) {
                                        label = list[i];
-                                       if (label.Block == b)
+                                       if (IsLabelVisible (label, b))
                                                return label;
                                }
                        }
@@ -3743,6 +3832,17 @@ namespace Mono.CSharp {
                        return null;
                }
 
+               static bool IsLabelVisible (LabeledStatement label, Block b)
+               {
+                       do {
+                               if (label.Block == b)
+                                       return true;
+                               b = b.Parent;
+                       } while (b != null);
+
+                       return false;
+               }
+
                public ParameterInfo GetParameterInfo (Parameter p)
                {
                        for (int i = 0; i < parameters.Count; ++i) {
@@ -4215,6 +4315,24 @@ namespace Mono.CSharp {
                        return false;
                }
 
+               public void IncludeBlock (ParametersBlock pb, ToplevelBlock block)
+               {
+                       if (block.names != null) {
+                               foreach (var n in block.names) {
+                                       var variable = n.Value as INamedBlockVariable;
+                                       if (variable != null) {
+                                               if (variable.Block.ParametersBlock == pb)
+                                                       AddLocalName (n.Key, variable, false);
+                                               continue;
+                                       }
+
+                                       foreach (var v in (List<INamedBlockVariable>) n.Value)
+                                               if (v.Block.ParametersBlock == pb)
+                                                       AddLocalName (n.Key, v, false);
+                               }
+                       }
+               }
+
                // <summary>
                //   This is used by non-static `struct' constructors which do not have an
                //   initializer - in this case, the constructor must initialize all of the
@@ -4626,7 +4744,7 @@ namespace Mono.CSharp {
                // expression might be the expression from the switch, or an
                // expression that includes any potential conversions to
                //
-               Expression SwitchGoverningType (ResolveContext ec, Expression expr)
+               static Expression SwitchGoverningType (ResolveContext rc, Expression expr, bool unwrapExpr)
                {
                        switch (expr.Type.BuiltinType) {
                        case BuiltinTypeSpec.Type.Byte:
@@ -4653,10 +4771,18 @@ namespace Mono.CSharp {
                        // conversions, we have to report an error
                        //
                        Expression converted = null;
-                       foreach (TypeSpec tt in ec.BuiltinTypes.SwitchUserTypes) {
-                               Expression e;
-                               
-                               e = Convert.ImplicitUserConversion (ec, expr, tt, loc);
+                       foreach (TypeSpec tt in rc.Module.PredefinedTypes.SwitchUserTypes) {
+
+                               if (!unwrapExpr && tt.IsNullableType && expr.Type.IsNullableType)
+                                       break;
+
+                               var restr = Convert.UserConversionRestriction.ImplicitOnly |
+                                       Convert.UserConversionRestriction.ProbingOnly;
+
+                               if (unwrapExpr)
+                                       restr |= Convert.UserConversionRestriction.NullableSourceOnly;
+
+                               var e = Convert.UserDefinedConversion (rc, expr, tt, restr, Location.Null);
                                if (e == null)
                                        continue;
 
@@ -4664,11 +4790,12 @@ namespace Mono.CSharp {
                                // Ignore over-worked ImplicitUserConversions that do
                                // an implicit conversion in addition to the user conversion.
                                // 
-                               if (!(e is UserCast))
+                               var uc = e as UserCast;
+                               if (uc == null)
                                        continue;
 
                                if (converted != null){
-                                       ec.Report.ExtraInformation (loc, "(Ambiguous implicit user defined conversion in previous ");
+//                                     rc.Report.ExtraInformation (loc, "(Ambiguous implicit user defined conversion in previous ");
                                        return null;
                                }
 
@@ -4677,10 +4804,12 @@ namespace Mono.CSharp {
                        return converted;
                }
 
-               public static TypeSpec[] CreateSwitchUserTypes (BuiltinTypes types)
+               public static TypeSpec[] CreateSwitchUserTypes (ModuleContainer module, TypeSpec nullable)
                {
+                       var types = module.Compiler.BuiltinTypes;
+
                        // LAMESPEC: For some reason it does not contain bool which looks like csc bug
-                       return new[] {
+                       TypeSpec[] stypes = new[] {
                                types.SByte,
                                types.Byte,
                                types.Short,
@@ -4692,6 +4821,17 @@ namespace Mono.CSharp {
                                types.Char,
                                types.String
                        };
+
+                       if (nullable != null) {
+
+                               Array.Resize (ref stypes, stypes.Length + 9);
+
+                               for (int i = 0; i < 9; ++i) {
+                                       stypes [10 + i] = nullable.MakeGenericType (module, new [] { stypes [i] });
+                               }
+                       }
+
+                       return stypes;
                }
 
                public void RegisterLabel (BlockContext rc, SwitchLabel sl)
@@ -4912,14 +5052,23 @@ namespace Mono.CSharp {
                        if (Expr == null)
                                return false;
 
-                       new_expr = SwitchGoverningType (ec, Expr);
+                       //
+                       // LAMESPEC: User conversion from non-nullable governing type has a priority
+                       //
+                       new_expr = SwitchGoverningType (ec, Expr, false);
 
-                       if (new_expr == null && Expr.Type.IsNullableType) {
-                               unwrap = Nullable.Unwrap.Create (Expr, false);
-                               if (unwrap == null)
-                                       return false;
+                       if (new_expr == null) {
+                               if (Expr.Type.IsNullableType) {
+                                       unwrap = Nullable.Unwrap.Create (Expr, false);
+                                       if (unwrap == null)
+                                               return false;
 
-                               new_expr = SwitchGoverningType (ec, unwrap);
+                                       //
+                                       // Unwrap + user conversion using non-nullable type is not allowed but user operator
+                                       // involving nullable Expr and nullable governing type is
+                                       //
+                                       new_expr = SwitchGoverningType (ec, unwrap, true);
+                               }
                        }
 
                        if (new_expr == null) {
@@ -4932,8 +5081,11 @@ namespace Mono.CSharp {
                                return false;
                        }
 
-                       // Validate switch.
                        SwitchType = new_expr.Type;
+                       if (SwitchType.IsNullableType) {
+                               new_expr = unwrap = Nullable.Unwrap.Create (new_expr, true);
+                               SwitchType = Nullable.NullableInfo.GetUnderlyingType (SwitchType);
+                       }
 
                        if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.Bool && ec.Module.Compiler.Settings.Version == LanguageVersion.ISO_1) {
                                ec.Report.FeatureIsNotAvailable (ec.Module.Compiler, loc, "switch expression of boolean type");
@@ -5349,6 +5501,8 @@ namespace Mono.CSharp {
                                //
                                ec.Mark (block.StartLocation);
                                block.IsCompilerGenerated = true;
+                       } else {
+                               new_expr.EmitSideEffect (ec);
                        }
 
                        block.Emit (ec);
@@ -5458,10 +5612,10 @@ namespace Mono.CSharp {
                        EmitTryBodyPrepare (ec);
                        EmitTryBody (ec);
 
-                       ec.BeginFinallyBlock ();
+                       bool beginFinally = EmitBeginFinallyBlock (ec);
 
                        Label start_finally = ec.DefineLabel ();
-                       if (resume_points != null) {
+                       if (resume_points != null && beginFinally) {
                                var state_machine = (StateMachineInitializer) ec.CurrentAnonymousMethod;
 
                                ec.Emit (OpCodes.Ldloc, state_machine.SkipFinally);
@@ -5481,12 +5635,13 @@ namespace Mono.CSharp {
 
                                var ce = new CallEmitter ();
                                ce.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc);
-                               ce.EmitPredefined (ec, finally_host.Spec, new Arguments (0));
+                               ce.EmitPredefined (ec, finally_host.Spec, new Arguments (0), true);
                        } else {
                                EmitFinallyBody (ec);
                        }
 
-                       ec.EndExceptionBlock ();
+                       if (beginFinally)
+                               ec.EndExceptionBlock ();
                }
 
                public override void EmitForDispose (EmitContext ec, LocalBuilder pc, Label end, bool have_dispatcher)
@@ -5545,7 +5700,7 @@ namespace Mono.CSharp {
                        if (finally_host != null) {
                                var ce = new CallEmitter ();
                                ce.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc);
-                               ce.EmitPredefined (ec, finally_host.Spec, new Arguments (0));
+                               ce.EmitPredefined (ec, finally_host.Spec, new Arguments (0), true);
                        } else {
                                EmitFinallyBody (ec);
                        }
@@ -5560,6 +5715,12 @@ namespace Mono.CSharp {
                        return res;
                }
 
+               protected virtual bool EmitBeginFinallyBlock (EmitContext ec)
+               {
+                       ec.BeginFinallyBlock ();
+                       return true;
+               }
+
                public override Reachability MarkReachable (Reachability rc)
                {
                        base.MarkReachable (rc);
@@ -5681,6 +5842,12 @@ namespace Mono.CSharp {
                        }
                }
 
+               protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
+               {
+                       expr.FlowAnalysis (fc);
+                       return base.DoFlowAnalysis (fc);
+               }
+
                public override bool Resolve (BlockContext ec)
                {
                        expr = expr.Resolve (ec);
@@ -6284,6 +6451,9 @@ namespace Mono.CSharp {
                                                ctch.hoisted_temp.Emit (ec);
                                        else
                                                ctch.li.Emit (ec);
+
+                                       if (!ctch.IsGeneral && ctch.type.Kind == MemberKind.TypeParameter)
+                                               ec.Emit (OpCodes.Box, ctch.type);
                                }
 
                                var expr_start = ec.DefineLabel ();
@@ -6311,9 +6481,16 @@ namespace Mono.CSharp {
                        public override bool Resolve (BlockContext bc)
                        {
                                ctch.Filter = ctch.Filter.Resolve (bc);
-                               var c = ctch.Filter as Constant;
-                               if (c != null && !c.IsDefaultValue) {
-                                       bc.Report.Warning (7095, 1, ctch.Filter.Location, "Exception filter expression is a constant");
+
+                               if (ctch.Filter != null) {
+                                       if (ctch.Filter.ContainsEmitWithAwait ()) {
+                                               bc.Report.Error (7094, ctch.Filter.Location, "The `await' operator cannot be used in the filter expression of a catch clause");
+                                       }
+
+                                       var c = ctch.Filter as Constant;
+                                       if (c != null && !c.IsDefaultValue) {
+                                               bc.Report.Warning (7095, 1, ctch.Filter.Location, "Exception filter expression is a constant");
+                                       }
                                }
 
                                return true;
@@ -6385,20 +6562,29 @@ namespace Mono.CSharp {
 
                                if (li != null)
                                        EmitCatchVariableStore (ec);
-                       } else {
-                               if (IsGeneral)
-                                       ec.BeginCatchBlock (ec.BuiltinTypes.Object);
-                               else
-                                       ec.BeginCatchBlock (CatchType);
 
-                               if (li != null) {
-                                       EmitCatchVariableStore (ec);
+                               if (Block.HasAwait) {
+                                       Block.EmitScopeInitialization (ec);
                                } else {
-                                       ec.Emit (OpCodes.Pop);
+                                       Block.Emit (ec);
                                }
+
+                               return;
                        }
 
-                       Block.Emit (ec);
+                       if (IsGeneral)
+                               ec.BeginCatchBlock (ec.BuiltinTypes.Object);
+                       else
+                               ec.BeginCatchBlock (CatchType);
+
+                       if (li != null) {
+                               EmitCatchVariableStore (ec);
+                       } else {
+                               ec.Emit (OpCodes.Pop);
+                       }
+
+                       if (!Block.HasAwait)
+                               Block.Emit (ec);
                }
 
                void EmitCatchVariableStore (EmitContext ec)
@@ -6414,24 +6600,33 @@ namespace Mono.CSharp {
                                hoisted_temp = new LocalTemporary (li.Type);
                                hoisted_temp.Store (ec);
 
-                               // switch to assigning from the temporary variable and not from top of the stack
+                               // switch to assignment from temporary variable and not from top of the stack
                                assign.UpdateSource (hoisted_temp);
                        }
                }
 
-               public override bool Resolve (BlockContext ec)
+               public override bool Resolve (BlockContext bc)
                {
-                       using (ec.Set (ResolveContext.Options.CatchScope)) {
-                               if (type_expr != null) {
-                                       type = type_expr.ResolveAsType (ec);
+                       using (bc.Set (ResolveContext.Options.CatchScope)) {
+                               if (type_expr == null) {
+                                       if (CreateExceptionVariable (bc.Module.Compiler.BuiltinTypes.Object)) {
+                                               Expression source = new EmptyExpression (li.Type);
+                                               assign = new CompilerAssign (new LocalVariableReference (li, Location.Null), source, Location.Null);
+                                               Block.AddScopeStatement (new StatementExpression (assign, Location.Null));
+                                       }
+                               } else {
+                                       type = type_expr.ResolveAsType (bc);
                                        if (type == null)
                                                return false;
 
-                                       if (type.BuiltinType != BuiltinTypeSpec.Type.Exception && !TypeSpec.IsBaseClass (type, ec.BuiltinTypes.Exception, false)) {
-                                               ec.Report.Error (155, loc, "The type caught or thrown must be derived from System.Exception");
+                                       if (li == null)
+                                               CreateExceptionVariable (type);
+
+                                       if (type.BuiltinType != BuiltinTypeSpec.Type.Exception && !TypeSpec.IsBaseClass (type, bc.BuiltinTypes.Exception, false)) {
+                                               bc.Report.Error (155, loc, "The type caught or thrown must be derived from System.Exception");
                                        } else if (li != null) {
                                                li.Type = type;
-                                               li.PrepareAssignmentAnalysis (ec);
+                                               li.PrepareAssignmentAnalysis (bc);
 
                                                // source variable is at the top of the stack
                                                Expression source = new EmptyExpression (li.Type);
@@ -6451,13 +6646,26 @@ namespace Mono.CSharp {
                                }
 
                                Block.SetCatchBlock ();
-                               return Block.Resolve (ec);
+                               return Block.Resolve (bc);
                        }
                }
 
+               bool CreateExceptionVariable (TypeSpec type)
+               {
+                       if (!Block.HasAwait)
+                               return false;
+
+                       // TODO: Scan the block for rethrow expression
+                       //if (!Block.HasRethrow)
+                       //      return;
+
+                       li = LocalVariable.CreateCompilerGenerated (type, block, Location.Null);
+                       return true;
+               }
+
                protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
                {
-                       if (li != null) {
+                       if (li != null && !li.IsCompilerGenerated) {
                                fc.SetVariableAssigned (li.VariableInfo, true);
                        }
 
@@ -6493,6 +6701,8 @@ namespace Mono.CSharp {
        {
                ExplicitBlock fini;
                List<DefiniteAssignmentBitSet> try_exit_dat;
+               List<Label> redirected_jumps;
+               Label? start_fin_label;
 
                public TryFinally (Statement stmt, ExplicitBlock fini, Location loc)
                         : base (stmt, loc)
@@ -6528,12 +6738,170 @@ namespace Mono.CSharp {
 
                protected override void EmitTryBody (EmitContext ec)
                {
+                       if (fini.HasAwait) {
+                               if (ec.TryFinallyUnwind == null)
+                                       ec.TryFinallyUnwind = new List<TryFinally> ();
+
+                               ec.TryFinallyUnwind.Add (this);
+                               stmt.Emit (ec);
+                               ec.TryFinallyUnwind.Remove (this);
+
+                               if (start_fin_label != null)
+                                       ec.MarkLabel (start_fin_label.Value);
+
+                               return;
+                       }
+
                        stmt.Emit (ec);
                }
 
+               protected override bool EmitBeginFinallyBlock (EmitContext ec)
+               {
+                       if (fini.HasAwait)
+                               return false;
+
+                       return base.EmitBeginFinallyBlock (ec);
+               }
+
                public override void EmitFinallyBody (EmitContext ec)
                {
+                       if (!fini.HasAwait) {
+                               fini.Emit (ec);
+                               return;
+                       }
+
+                       //
+                       // Emits catch block like
+                       //
+                       // catch (object temp) {
+                       //      this.exception_field = temp;
+                       // }
+                       //
+                       var type = ec.BuiltinTypes.Object;
+                       ec.BeginCatchBlock (type);
+
+                       var temp = ec.GetTemporaryLocal (type);
+                       ec.Emit (OpCodes.Stloc, temp);
+
+                       var exception_field = ec.GetTemporaryField (type);
+                       ec.EmitThis ();
+                       ec.Emit (OpCodes.Ldloc, temp);
+                       exception_field.EmitAssignFromStack (ec);
+
+                       ec.EndExceptionBlock ();
+
+                       ec.FreeTemporaryLocal (temp, type);
+
                        fini.Emit (ec);
+
+                       //
+                       // Emits exception rethrow
+                       //
+                       // if (this.exception_field != null)
+                       //      throw this.exception_field;
+                       //
+                       exception_field.Emit (ec);
+                       var skip_throw = ec.DefineLabel ();
+                       ec.Emit (OpCodes.Brfalse_S, skip_throw);
+                       exception_field.Emit (ec);
+                       ec.Emit (OpCodes.Throw);
+                       ec.MarkLabel (skip_throw);
+
+                       exception_field.IsAvailableForReuse = true;
+
+                       EmitUnwindFinallyTable (ec);
+               }
+
+               bool IsParentBlock (Block block)
+               {
+                       for (Block b = fini; b != null; b = b.Parent) {
+                               if (b == block)
+                                       return true;
+                       }
+
+                       return false;
+               }
+
+               public static Label EmitRedirectedJump (EmitContext ec, AsyncInitializer initializer, Label label, Block labelBlock)
+               {
+                       int idx;
+                       if (labelBlock != null) {
+                               for (idx = ec.TryFinallyUnwind.Count; idx != 0; --idx) {
+                                       var fin = ec.TryFinallyUnwind [idx - 1];
+                                       if (!fin.IsParentBlock (labelBlock))
+                                               break;
+                               }
+                       } else {
+                               idx = 0;
+                       }
+
+                       bool set_return_state = true;
+
+                       for (; idx < ec.TryFinallyUnwind.Count; ++idx) {
+                               var fin = ec.TryFinallyUnwind [idx];
+                               if (labelBlock != null && !fin.IsParentBlock (labelBlock))
+                                       break;
+
+                               fin.EmitRedirectedExit (ec, label, initializer, set_return_state);
+                               set_return_state = false;
+
+                               if (fin.start_fin_label == null) {
+                                       fin.start_fin_label = ec.DefineLabel ();
+                               }
+
+                               label = fin.start_fin_label.Value;
+                       }
+
+                       return label;
+               }
+
+               public static Label EmitRedirectedReturn (EmitContext ec, AsyncInitializer initializer)
+               {
+                       return EmitRedirectedJump (ec, initializer, initializer.BodyEnd, null);
+               }
+
+               void EmitRedirectedExit (EmitContext ec, Label label, AsyncInitializer initializer, bool setReturnState)
+               {
+                       if (redirected_jumps == null) {
+                               redirected_jumps = new List<Label> ();
+
+                               // Add fallthrough label
+                               redirected_jumps.Add (ec.DefineLabel ());
+
+                               if (setReturnState)
+                                       initializer.HoistedReturnState = ec.GetTemporaryField (ec.Module.Compiler.BuiltinTypes.Int, true);
+                       }
+
+                       int index = redirected_jumps.IndexOf (label);
+                       if (index < 0) {
+                               redirected_jumps.Add (label);
+                               index = redirected_jumps.Count - 1;
+                       }
+
+                       //
+                       // Indicates we have captured exit jump
+                       //
+                       if (setReturnState) {
+                               var value = new IntConstant (initializer.HoistedReturnState.Type, index, Location.Null);
+                               initializer.HoistedReturnState.EmitAssign (ec, value, false, false);
+                       }
+               }
+
+               //
+               // Emits state table of jumps outside of try block and reload of return
+               // value when try block returns value
+               //
+               void EmitUnwindFinallyTable (EmitContext ec)
+               {
+                       if (redirected_jumps == null)
+                               return;
+
+                       var initializer = (AsyncInitializer)ec.CurrentAnonymousMethod;
+                       initializer.HoistedReturnState.EmitLoad (ec);
+                       ec.Emit (OpCodes.Switch, redirected_jumps.ToArray ());
+
+                       // Mark fallthrough label
+                       ec.MarkLabel (redirected_jumps [0]);
                }
 
                protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
@@ -6597,6 +6965,7 @@ namespace Mono.CSharp {
                public Block Block;
                List<Catch> clauses;
                readonly bool inside_try_finally;
+               List<Catch> catch_sm;
 
                public TryCatch (Block block, List<Catch> catch_clauses, Location l, bool inside_try_finally)
                        : base (l)
@@ -6641,6 +7010,13 @@ namespace Mono.CSharp {
 
                                ok &= c.Resolve (bc);
 
+                               if (c.Block.HasAwait) {
+                                       if (catch_sm == null)
+                                               catch_sm = new List<Catch> ();
+
+                                       catch_sm.Add (c);
+                               }
+
                                if (c.Filter != null)
                                        continue;
 
@@ -6697,11 +7073,61 @@ namespace Mono.CSharp {
 
                        Block.Emit (ec);
 
-                       foreach (Catch c in clauses)
+                       LocalBuilder state_variable = null;
+                       foreach (Catch c in clauses) {
                                c.Emit (ec);
 
+                               if (catch_sm != null) {
+                                       if (state_variable == null) {
+                                               //
+                                               // Cannot reuse temp variable because non-catch path assumes the value is 0
+                                               // which may not be true for reused local variable
+                                               //
+                                               state_variable = ec.DeclareLocal (ec.Module.Compiler.BuiltinTypes.Int, false);
+                                       }
+
+                                       var index = catch_sm.IndexOf (c);
+                                       if (index < 0)
+                                               continue;
+
+                                       ec.EmitInt (index + 1);
+                                       ec.Emit (OpCodes.Stloc, state_variable);
+                               }
+                       }
+
                        if (!inside_try_finally)
                                ec.EndExceptionBlock ();
+
+                       if (state_variable != null) {
+                               ec.Emit (OpCodes.Ldloc, state_variable);
+
+                               var labels = new Label [catch_sm.Count + 1];
+                               for (int i = 0; i < labels.Length; ++i) {
+                                       labels [i] = ec.DefineLabel ();
+                               }
+
+                               var end = ec.DefineLabel ();
+                               ec.Emit (OpCodes.Switch, labels);
+
+                               // 0 value is default label
+                               ec.MarkLabel (labels [0]);
+                               ec.Emit (OpCodes.Br, end);
+
+                               var atv = ec.AsyncThrowVariable;
+                               Catch c = null;
+                               for (int i = 0; i < catch_sm.Count; ++i) {
+                                       if (c != null && c.Block.HasReachableClosingBrace)
+                                               ec.Emit (OpCodes.Br, end);
+
+                                       ec.MarkLabel (labels [i + 1]);
+                                       c = catch_sm [i];
+                                       ec.AsyncThrowVariable = c.Variable;
+                                       c.Block.Emit (ec);
+                               }
+                               ec.AsyncThrowVariable = atv;
+
+                               ec.MarkLabel (end);
+                       }
                }
 
                protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
@@ -6775,6 +7201,7 @@ namespace Mono.CSharp {
                        public VariableDeclaration (LocalVariable li, Location loc)
                                : base (li)
                        {
+                               reachable = true;
                                this.loc = loc;
                        }
 
@@ -7024,12 +7451,12 @@ namespace Mono.CSharp {
                                }
                        }
 
-                       base.Resolve (ec);
+                       var ok = base.Resolve (ec);
 
                        if (vr != null)
                                vr.IsLockedByStatement = vr_locked;
 
-                       return true;
+                       return ok;
                }
 
                protected override void CloneTo (CloneContext clonectx, Statement t)
@@ -7217,6 +7644,7 @@ namespace Mono.CSharp {
                                public RuntimeDispose (LocalVariable lv, Location loc)
                                        : base (lv, loc)
                                {
+                                       reachable = true;
                                }
 
                                protected override void CheckIDiposableConversion (BlockContext bc, LocalVariable li, Expression initializer)
@@ -7285,13 +7713,13 @@ namespace Mono.CSharp {
                                if (mg != null) {
                                        mg.InstanceExpression = expr;
                                        Arguments args = new Arguments (0);
-                                       mg = mg.OverloadResolve (rc, ref args, this, OverloadResolver.Restrictions.ProbingOnly);
+                                       mg = mg.OverloadResolve (rc, ref args, this, OverloadResolver.Restrictions.ProbingOnly | OverloadResolver.Restrictions.GetEnumeratorLookup);
 
                                        // For ambiguous GetEnumerator name warning CS0278 was reported, but Option 2 could still apply
                                        if (ambiguous_getenumerator_name)
                                                mg = null;
 
-                                       if (mg != null && args.Count == 0 && !mg.BestCandidate.IsStatic && mg.BestCandidate.IsPublic) {
+                                       if (mg != null && !mg.BestCandidate.IsStatic && mg.BestCandidate.IsPublic) {
                                                return mg;
                                        }
                                }
@@ -7448,7 +7876,7 @@ namespace Mono.CSharp {
 
                                for_each.body.AddScopeStatement (new StatementExpression (new CompilerAssign (variable_ref, current_pe, Location.Null), for_each.type.Location));
 
-                               var init = new Invocation (get_enumerator_mg, null);
+                               var init = new Invocation.Predefined (get_enumerator_mg, null);
 
                                statement = new While (new BooleanExpression (new Invocation (move_next_mg, null)),
                                         for_each.body, Location.Null);
@@ -7590,8 +8018,7 @@ namespace Mono.CSharp {
                                Statement = new CollectionForeach (this, variable, expr);
                        }
 
-                       base.Resolve (ec);
-                       return true;
+                       return base.Resolve (ec);
                }
 
                protected override void DoEmit (EmitContext ec)
index 870b7be2a754773b25c721b29e0fb28b38d4315c..6e785dfc097e7e8b082cbd15a0c79cbaab201adb 100644 (file)
@@ -73,7 +73,6 @@ namespace Mono.CSharp
                public readonly TypeSpec[] OperatorsUnaryMutator;
 
                public readonly TypeSpec[] BinaryPromotionsTypes;
-               public readonly TypeSpec[] SwitchUserTypes;
 
                readonly BuiltinTypeSpec[] types;
 
@@ -125,7 +124,6 @@ namespace Mono.CSharp
                        OperatorsUnaryMutator = UnaryMutator.CreatePredefinedOperatorsTable (this);
 
                        BinaryPromotionsTypes = ConstantFold.CreateBinaryPromotionsTypes (this);
-                       SwitchUserTypes = Switch.CreateSwitchUserTypes (this);
 
                        types = new BuiltinTypeSpec[] {
                                Object, ValueType, Attribute,
@@ -200,6 +198,7 @@ namespace Mono.CSharp
                public readonly PredefinedType SecurityAction;
                public readonly PredefinedType Dictionary;
                public readonly PredefinedType Hashtable;
+               public readonly TypeSpec[] SwitchUserTypes;
 
                //
                // C# 3.0
@@ -321,6 +320,8 @@ namespace Mono.CSharp
                        Task.Define ();
                        if (TaskGeneric.Define ())
                                TaskGeneric.TypeSpec.IsGenericTask = true;
+
+                       SwitchUserTypes = Switch.CreateSwitchUserTypes (module, Nullable.TypeSpec);
                }
        }
 
index 73d82b086f97752c46a2af57bdc684a48d80b0ab..a33159d8478bdb6100faa7ba75f376290c667a5c 100644 (file)
@@ -295,6 +295,12 @@ namespace Mono.CSharp
                        }
                }
 
+               public bool IsStructOrEnum {
+                       get {
+                               return (Kind & (MemberKind.Struct | MemberKind.Enum)) != 0;
+                       }
+               }
+
                public bool IsTypeBuilder {
                        get {
 #if STATIC
@@ -645,6 +651,7 @@ namespace Mono.CSharp
                        case MemberKind.Struct:
                        case MemberKind.Enum:
                        case MemberKind.Void:
+                       case MemberKind.PointerType:
                                return false;
                        case MemberKind.InternalCompilerType:
                                //
@@ -1930,6 +1937,11 @@ namespace Mono.CSharp
 
                        return ac;
                }
+
+               public override List<MissingTypeSpecReference> ResolveMissingDependencies (MemberSpec caller)
+               {
+                       return Element.ResolveMissingDependencies (caller);
+               }
        }
 
        class ReferenceContainer : ElementTypeSpec
index 33925e7df282c7380770f962b61223024d5b71f3..522c78d44d3a5bf071627e38969deeb155c3cf5f 100644 (file)
@@ -6,7 +6,7 @@ thisdir = tests
 SUBDIRS =
 include ../build/rules.make
 
-DISTFILES = $(wildcard dlls/**/*.cs) $(wildcard dlls/*.cs) $(wildcard dlls/*.inc)
+DISTFILES = $(wildcard dlls/**/*.cs) $(wildcard dlls/*.cs) $(wildcard dlls/*.inc) $(wildcard dlls/*.il)
 DISTFILES += $(wildcard *.cs) $(wildcard *.il) $(wildcard *.xml) $(wildcard *.inc) $(wildcard known-issues-*) $(wildcard *.snk)
 
 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
index 6cc71cada25991714f561017aab4368976b2ecb7..2fb1266a0870d9e80dff190fed83ddd4a2d15b47 100644 (file)
@@ -4,6 +4,7 @@ public class C
 {
        public D D { get; private set; }
        public string Value { get; private set; }
+       public Foo Foo { get; set; }
 
        public int Test ()
        {
@@ -11,11 +12,19 @@ public class C
                return D.Foo (d.Value);
        }
 
+       public static int Test2 (dynamic d)
+       {
+               return Foo.Method(d);
+       }
+
        public static int Main ()
        {
                var c = new C ();
                if (c.Test () != 1)
                        return 1;
+
+               if (C.Test2 ("s") != 1)
+                       return 2;
                
                return 0;
        }
@@ -28,3 +37,11 @@ public struct D
                return 1;
        }
 }
+
+public class Foo
+{
+       public static int Method (string s)
+       {
+               return 1;
+       }
+}
diff --git a/mcs/tests/gtest-311.cs b/mcs/tests/gtest-311.cs
deleted file mode 100644 (file)
index d9792d5..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Compiler options: -t:library
-
-using System;
-using System.Runtime.InteropServices;
-
-class A
-{
-       [DllImport ("Dingus", CharSet=CharSet.Auto)]
-       extern static void Do<T> ();
-
-       [DllImport ("Dingus")]
-       extern static void Do2<T> ();
-
-       public static void Main ()
-       {
-
-       }
-}
\ No newline at end of file
index bea361535af5c5b40f069cd84462d51373bdbce6..fbc4644f46be35c04755786c48ad901a17d916cd 100644 (file)
@@ -19,12 +19,8 @@ class C
                if (b != "a")
                        return 1;
                
-               int? i = null ?? null;
-               if (i != null)
-                       return 2;
-
                object z = a ?? null;
-               if (i != null)
+               if (z != null)
                        return 3;
 
                string p = default (string) ?? "a";
index 96aff7aa3397e94ad0ed6f53ab768504ac1fb1b9..1d2a5ad00fa628e21febda28d8547cff4713be55 100644 (file)
@@ -1,7 +1,7 @@
 using System;
 
 //
-// Parser conditional and cast expression tests
+// parser conditional and cast expression tests
 //
 
 class A<T>
@@ -31,6 +31,18 @@ public class ConditionalParsing
        struct S
        {
        }
+
+       struct MyTestStruct : IDisposable
+       {
+               public void Dispose ()
+               {
+               }
+
+               public static implicit operator MyTestStruct (int i)
+               {
+                       return new MyTestStruct ();
+               }
+       }
        
        void Test_1 (bool a)
        {
@@ -129,6 +141,15 @@ public class ConditionalParsing
                bool? b = Test (1, arg:2);
        }
 
+       void Test_17 ()
+       {
+               {
+                       using (MyTestStruct? mts = (int?) 1)
+                       {
+                       }
+               }
+       }
+
        static void Helper<T> (T arg)
        {
        }
index dce8e68b55abc216ae45f809d81b6edf8c75525d..6789ff87568c8b7856b25b169255f97c416122bb 100644 (file)
@@ -15,6 +15,10 @@ class C<T>
        static Type simple = typeof (Simple);
 }
 
+class D<U> : C<U>
+{
+}
+
 class A
 {
        public class N<T>
@@ -30,6 +34,9 @@ class M
                
                if (typeof (TestAlias).ToString () != "A+N`1[System.Double]")
                        return 1;
+
+               if (typeof (D<>.Simple).ToString () != "C`1+Simple[T]")
+                       return 2;
                
                return 0;
        }
diff --git a/mcs/tests/gtest-614.cs b/mcs/tests/gtest-614.cs
new file mode 100644 (file)
index 0000000..d68193a
--- /dev/null
@@ -0,0 +1,28 @@
+using System;
+
+struct S
+{
+       public static explicit operator int? (S? s)
+       {
+               throw new ApplicationException ();
+       }
+
+       public static implicit operator int (S? s)
+       {
+               return 2;
+       }
+}
+
+class C
+{
+       public static int Main()
+       {
+               int? nn = 3;
+               S? s = new S ();
+               int? ret = s ?? nn;
+               if (ret != 2)
+                       return 1;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-615.cs b/mcs/tests/gtest-615.cs
new file mode 100644 (file)
index 0000000..f20ee57
--- /dev/null
@@ -0,0 +1,21 @@
+// Compiler options: -unsafe 
+
+unsafe class X
+{
+       struct S
+       {
+       }
+
+       public class N<T>
+       {
+               S* s;
+       }
+}
+
+public class C
+{
+       public static void Main ()
+       {
+               new X.N<int> ();
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-616.cs b/mcs/tests/gtest-616.cs
new file mode 100644 (file)
index 0000000..500e254
--- /dev/null
@@ -0,0 +1,37 @@
+using System;
+
+struct S : IDisposable
+{
+       public void Dispose ()
+       {
+       }
+}
+
+class A<T> where T : IDisposable
+{
+       public virtual bool Test<U> (U u) where U : T
+       {
+               using (u) {
+                       return false;
+               }
+       }
+}
+
+class B : A<S>
+{
+       public override bool Test<U> (U u)
+       {
+               using (u) {
+                       return true;
+               }
+       }
+
+       public static int Main ()
+       {
+               var b = new B ();
+               if (!b.Test (new S ()))
+                       return 1;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-617.cs b/mcs/tests/gtest-617.cs
new file mode 100644 (file)
index 0000000..da3b3c6
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+class Program
+{
+       static void Main()
+       {
+               foreach (string x in new B ()) {
+               }
+       }
+}
+
+class A
+{
+       public IEnumerator<string> GetEnumerator ()
+       {
+               var s = new List<string>();
+               s.Add("1"); 
+               return s.GetEnumerator();
+       }
+}
+
+class B : A
+{
+       public IEnumerator<int> GetEnumerator (int[] x = null)
+       {
+               throw new NotImplementedException ();
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-618.cs b/mcs/tests/gtest-618.cs
new file mode 100644 (file)
index 0000000..d92fa12
--- /dev/null
@@ -0,0 +1,73 @@
+using System;
+
+struct S1
+{
+       public static implicit operator int (S1? s)
+       {
+               return 1;
+       }
+}
+
+struct S2
+{
+       public static implicit operator int? (S2? s)
+       {
+               return null;
+       }
+}
+
+struct S3
+{
+       public static implicit operator int? (S3? s)
+       {
+               return 2;
+       }
+}
+
+struct S4
+{
+       public static implicit operator int? (S4 s)
+       {
+               return 3;
+       }
+}
+
+class C
+{
+       public static int Main ()
+       {
+               S1? s1 = new S1 ();
+               switch (s1) {
+               case 1:
+                       break;
+               default:
+                       return 1;
+               }
+
+               S2? s2 = new S2 ();
+               switch (s2) {
+               case null:
+                       break;
+               default:
+                       return 2;
+               }
+
+               S3? s3 = new S3 ();
+               switch (s3) {
+               case 2:
+                       break;
+               default:
+                       return 3;
+               }
+
+               S4 s4 = new S4 ();
+               switch (s4) {
+               case 3:
+                       break;
+               default:
+                       return 4;
+               }
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-619.cs b/mcs/tests/gtest-619.cs
new file mode 100644 (file)
index 0000000..63bc79c
--- /dev/null
@@ -0,0 +1,35 @@
+interface I<T>
+{
+}
+
+interface IB<T> : I<string>
+{
+       
+}
+
+struct S
+{
+       class P
+       {
+       }
+       
+       public class C : IB<P>
+       {
+       }
+}
+
+class M
+{
+       static void Test<T> (I<T> iface)
+       {
+       }
+
+       static void Test<T> (IB<T> iface)
+       {
+       }
+
+       static void Main ()
+       {
+               Test (new S.C ());
+       }
+}
diff --git a/mcs/tests/gtest-620.cs b/mcs/tests/gtest-620.cs
new file mode 100644 (file)
index 0000000..45e6059
--- /dev/null
@@ -0,0 +1,28 @@
+interface I<T>
+{
+}
+
+class A<T>
+{
+       public virtual T M<U> (U u) where U : T
+       {
+               return u;
+       }
+}
+
+class B<W> : A<I<W>>, I<string>
+{
+       public override I<W> M<U> (U u)
+       {
+               return u;
+       }
+}
+
+class Bug
+{
+       public static void Main ()
+       {
+               var b = new B<string> ();
+               b.M (b);
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-autoproperty-09.cs b/mcs/tests/gtest-autoproperty-09.cs
new file mode 100644 (file)
index 0000000..e018015
--- /dev/null
@@ -0,0 +1,52 @@
+using System;
+
+struct S
+{
+       public static int P { get; } = 4;
+
+       public static int Main ()
+       {
+               if (P != 4)
+                       return 1;
+
+               var c = new C ();
+               if (c.P != -3)
+                       return 2;
+
+               if (c.P2 != 1)
+                       return 3;
+
+               c.P2 = 9;
+               if (c.P2 != 9)
+                       return 4;
+
+               var s = new S2 (null);
+               if (s.P != 4)
+                       return 12;
+
+               if (s.P2 != 1)
+                       return 13;
+
+               s.P2 = 9;
+               if (s.P2 != 9)
+                       return 14;
+
+               return 0;
+       }
+}
+
+class C
+{
+       public decimal P { get; } = -3;
+       public int P2 { get; set; } = 1;
+}
+
+struct S2
+{
+       public int P { get; } = 4;
+       public int P2 { get; set; } = 1;
+
+       public S2 (object o)
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-collectioninit-04.cs b/mcs/tests/gtest-collectioninit-04.cs
new file mode 100644 (file)
index 0000000..8fc41c7
--- /dev/null
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+
+class X
+{
+    internal static Dictionary<Type, Func<string, string>> Test = new Dictionary<Type, Func<string, string>> { {
+            typeof (int),
+            metadata => "1"
+        }, {
+            typeof (uint),
+            metadata => "2"
+        },
+    };
+
+    public static void Main ()
+    {
+    }
+}
\ No newline at end of file
index 248d1452d2bb949b8639d8fa3ddee3f21cf09b80..e538021cd0aff253f68ddc97dfe97a30991ec39a 100644 (file)
@@ -254,6 +254,12 @@ enum MyEnumUlong : ulong
        Value_1 = 1
 }
 
+enum EnumInt
+{
+       A,
+       B,
+       C
+}
 
 class NewTest<T>
 {
@@ -1205,6 +1211,14 @@ class Tester
                Assert (true, e.Compile ().Invoke (4, 4));
        }
 
+       void EqualTest_16 ()
+       {
+               Expression<Func<EnumInt?, EnumInt, bool?>> e = (x, y) => x == y;
+               AssertNodeType (e, ExpressionType.Convert);
+               Assert (false, e.Compile () (null, 0));
+               Assert (true, e.Compile () (EnumInt.B, EnumInt.B));
+       }
+
        void EqualTestDelegate ()
        {
                Expression<Func<Delegate, Delegate, bool>> e1 = (a, b) => a == b;
diff --git a/mcs/tests/gtest-initialize-13.cs b/mcs/tests/gtest-initialize-13.cs
new file mode 100644 (file)
index 0000000..7c213e4
--- /dev/null
@@ -0,0 +1,18 @@
+using System;
+
+public struct EventInitializerTest
+{
+       public event Action a;
+       public event Action b;
+       public event Action c;
+
+       public static void Main()
+       {
+               Action d = null;
+               var eit = new EventInitializerTest() {
+                       a = null,
+                       b = delegate {},
+                       c = d
+               };
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-lambda-35.cs b/mcs/tests/gtest-lambda-35.cs
new file mode 100644 (file)
index 0000000..4cfd316
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+
+class C
+{
+       static int Foo (Func<short> b)
+       {
+               return 1;
+       }
+
+       static int Foo (Func<int> a)
+       {
+               return 2;
+       }
+
+    static int Main()
+    {
+       if (Foo (() => 1) != 2)
+               return 1;
+
+       if (Foo (() => (short) 1) != 1)
+               return 2;
+
+       if (Foo (() => (byte) 1) != 1)
+               return 3;
+
+        Console.WriteLine ("ok");
+        return 0;
+    }
+
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-named-05.cs b/mcs/tests/gtest-named-05.cs
new file mode 100644 (file)
index 0000000..125e60d
--- /dev/null
@@ -0,0 +1,26 @@
+class Test
+{
+       public static void Main ()
+       {
+               string p;
+               M (y: p = F (), x: p);
+
+               int i;
+               string p2;
+               M2 (out i, c: p2 = F (), b : p2);
+       }
+
+       public static void M (string x, string y)
+       {
+       }
+
+       static void M2 (out int a, string b, string c)
+       {
+               a = 2;
+       }
+
+       public static string F ()
+       {
+               return null;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-optional-31.cs b/mcs/tests/gtest-optional-31.cs
new file mode 100644 (file)
index 0000000..9e7158a
--- /dev/null
@@ -0,0 +1,21 @@
+using System;
+
+class Test
+{
+       public static int M (bool b = false)
+       {
+               Console.WriteLine ("PASS");
+               return 0;
+       }
+
+       public static int M (params string[] args)
+       {
+               Console.WriteLine ("FAIL");
+               return 1;
+       }
+       
+       public static int Main ()
+       {
+               return M ();
+       }
+}
diff --git a/mcs/tests/gtest-optional-32.cs b/mcs/tests/gtest-optional-32.cs
new file mode 100644 (file)
index 0000000..4ca3a60
--- /dev/null
@@ -0,0 +1,23 @@
+using System;
+
+abstract class A
+{
+       public abstract int[] Foo (params int[] args);
+}
+
+class B : A
+{
+       public override int[] Foo (int[] args = null)
+       {
+               return args;
+       }
+
+       static int Main ()
+       {
+               var b = new B();
+               if (b.Foo().Length != 0)
+                       return 1;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-optional-33.cs b/mcs/tests/gtest-optional-33.cs
new file mode 100644 (file)
index 0000000..0a0d311
--- /dev/null
@@ -0,0 +1,72 @@
+using System.Runtime.CompilerServices;
+using System;
+
+class TestCallerLineNumber
+{
+    static void Test ([CallerLineNumber] object  line = null)
+    {
+    }
+
+    static void Test ([CallerLineNumber] decimal line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] double  line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] float   line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] int     line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] uint    line = uint.MaxValue)
+    {
+    }
+
+    static void Test ([CallerLineNumber] long    line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] ulong   line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] decimal? line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] double?  line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] float?   line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] int?    line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] uint?    line = uint.MaxValue)
+    {
+    }
+
+    static void Test ([CallerLineNumber] long?    line = 1)
+    {
+    }
+
+    static void Test ([CallerLineNumber] ulong?   line = 1)
+    {
+    }
+}
+
+class D
+{
+    public static void Main ()
+    {
+    }
+}
\ No newline at end of file
index 705149a365c3b83b0980de48230f8b4c04fb7778..c85253596cbc7af4eca4ebcb4a31db2e15db2562 100644 (file)
@@ -3,6 +3,11 @@ enum MyEnum : byte
        Value_1 = 1
 }
 
+enum E : ushort
+{
+       V = 1
+}
+
 public class C
 {
        public static int Main ()
@@ -28,6 +33,11 @@ public class C
                if (b != (MyEnum)254)
                        return 4;
 
+               var e = E.V;
+               checked {
+                       var res = ~e;
+               }
+
                System.Console.WriteLine ("OK");
                return 0;
        }
index f6b992f384ebb1a5bea510c9e84c1a165c093fa6..87395cdeb3e6c33033b6d8b3c24a9d86763feca0 100644 (file)
@@ -9,7 +9,7 @@ class C
 
        static bool Bar (object t)
        {
-               return Bar is object;
+               return t is object;
        }
 }
 
index c4525d7b34d016c345dccae8cb57bb01bc6be522..7da6a379d434d5dea00cece92cc1bd7e8ccf2396 100644 (file)
@@ -57,7 +57,15 @@ class XX {
                s = (object)1 + null;
                if (s != "1")
                        return 12;
-       
+
+               s = (string)null + (object)null;
+               if (s.Length != 0)
+                       return 13;
+
+               s = (object)null + (string)null;
+               if (s.Length != 0)
+                       return 14;
+
                System.Console.WriteLine ("test ok");
                return 0;
        }
index 3b2fa888a96ac26f051f86bd68a244eb300b2b17..e0e263d435927787e29d8e475998b317d7457cb2 100644 (file)
@@ -4,7 +4,7 @@ class MainClass
 {
        public struct DC
        {
-               private readonly Guid m_Id;
+               public readonly Guid m_Id;
 
                public DC (Guid Id)
                {
@@ -27,6 +27,10 @@ class MainClass
                if (dc.Id.Equals (default (Guid)))
                        return 1;
 
+               if (dc.m_Id.Equals (default (Guid)))
+                       return 2;
+
+Console.WriteLine ("ok");
                return 0;
        }
 }
diff --git a/mcs/tests/test-859.cs b/mcs/tests/test-859.cs
new file mode 100644 (file)
index 0000000..b866263
--- /dev/null
@@ -0,0 +1,20 @@
+class X
+{
+       public static void Main ()
+       {
+               int i = 0;
+               if (i == 1) {
+                       a:
+                       switch (i) {
+                       default:
+                               goto a;
+                       }
+               } else if (i == 2) {
+                       a:
+                       switch (i) {
+                       default:
+                               goto a;
+                       }
+               }
+       }
+}
diff --git a/mcs/tests/test-892.cs b/mcs/tests/test-892.cs
new file mode 100644 (file)
index 0000000..b649279
--- /dev/null
@@ -0,0 +1,19 @@
+using System.Reflection;
+using System.Diagnostics;
+using System;
+
+[assembly: AssemblyVersion ("2011.04.0.0")]
+[assembly: AssemblyFileVersion ("2011.02.0.0")]
+
+class X
+{
+       public static int Main ()
+       {
+               Assembly executingAssembly = Assembly.GetAssembly (typeof(X));
+               FileVersionInfo fvi = FileVersionInfo.GetVersionInfo (executingAssembly.Location);
+               if (fvi.FileVersion != "2011.02.0.0")
+                       return 1;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-893.cs b/mcs/tests/test-893.cs
new file mode 100644 (file)
index 0000000..97cfc0a
--- /dev/null
@@ -0,0 +1,15 @@
+public class A
+{
+       public static bool TryAssign (out int x)
+       {
+               x = 0;
+               return true;
+       }
+
+       public static void Main ()
+       {
+               int x, y;
+               if ((!TryAssign (out x) || x == 0) & (!TryAssign (out y) || y == 0)) {
+               }
+       }
+}
diff --git a/mcs/tests/test-894.cs b/mcs/tests/test-894.cs
new file mode 100644 (file)
index 0000000..259a66c
--- /dev/null
@@ -0,0 +1,19 @@
+using System;
+
+[AttributeUsage (AttributeTargets.All + 0xFFFFFE + 1)]
+class A1Attribute : Attribute
+{
+}
+
+[AttributeUsage ((AttributeTargets) 0xffff)]
+class A2Attribute : Attribute
+{
+}
+
+public class Test
+{
+       public static void Main ()
+       {
+               
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-895.cs b/mcs/tests/test-895.cs
new file mode 100644 (file)
index 0000000..bef7982
--- /dev/null
@@ -0,0 +1,21 @@
+using System;
+
+class X
+{
+       public void Test (int g, out int results)
+       {
+               if ((results = Foo (g > 0 ? 1 : 2)) != 4)
+               {
+                       Console.WriteLine (results);
+               }
+       }
+
+       int Foo (object o)
+       {
+               return 4;
+       }
+
+       public static void Main ()
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-896.cs b/mcs/tests/test-896.cs
new file mode 100644 (file)
index 0000000..4336bf7
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+
+class Program
+{
+       public static void Main ()
+       {
+               goto L1;
+               int z;
+       L1: 
+               z = 3;
+               Console.WriteLine (z);
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-897.cs b/mcs/tests/test-897.cs
new file mode 100644 (file)
index 0000000..e5b3282
--- /dev/null
@@ -0,0 +1,26 @@
+using System;
+
+class X
+{
+       static int Foo ()
+       {
+               throw new ApplicationException ();
+       }
+
+       public static int Main ()
+       {
+               try {
+                       var b = Foo () is object;
+                       return 1;
+               } catch (ApplicationException) {
+               }
+
+               try {
+                       var b = Foo () as object;
+                       return 2;
+               } catch (ApplicationException) {
+               }
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-898.cs b/mcs/tests/test-898.cs
new file mode 100644 (file)
index 0000000..5b69403
--- /dev/null
@@ -0,0 +1,79 @@
+// Compiler options: -unsafe
+using System;
+
+class BoolArrayWithByteValues
+{
+
+       static int Foo (ref bool b)
+       {
+               bool b2 = true;
+               bool r;
+               r = b == true;
+               if (!r)
+                       return 10;
+
+               r = b == b2;
+               if (!r)
+                       return 11;
+
+               return 0;
+       }
+
+       static unsafe bool Ptr ()
+       {
+               bool rv;
+       
+               var arr = new byte [256];
+               for (int i = 0; i < arr.Length; i++)
+                       arr [i] = (byte) i;
+               fixed (byte* bptr = arr) {
+                       rv = true;
+                       for (int i = 0; i < arr.Length; i++) {
+                               bool* boptr = (bool*)(bptr + i);
+                               if (arr[i] > 0 && !*boptr)
+                                       rv = false;
+                               System.Console.WriteLine ("#{0} = {1}", i, *boptr);
+                       }
+               }
+
+               return rv;
+       }
+
+       static int Main()
+       {
+               var a = new bool[1];
+               Buffer.SetByte (a, 0, 5);
+
+               var b = true;
+               bool r;
+               r = a [0];
+               if (!r)
+                       return 1;
+
+               r = a [0] == true;
+               if (!r)
+                       return 2;
+
+               r = a [0] == b;
+               if (!r)
+                       return 3;
+
+               r = a [0] != false;
+               if (!r)
+                       return 4;
+
+               r = a [0] != b;
+               if (r)
+                       return 5;
+
+               var res = Foo (ref a [0]);
+               if (res != 0)
+                       return res;
+
+               if (!Ptr ())
+                       return 6;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-899.cs b/mcs/tests/test-899.cs
new file mode 100644 (file)
index 0000000..2f8c9e5
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+class Test
+{
+       public static void Main()
+       {
+               object o;
+               lock (o = new object())
+               {
+                       Console.WriteLine (o);
+               }
+
+               Console.WriteLine (o);
+       }
+}
diff --git a/mcs/tests/test-900.cs b/mcs/tests/test-900.cs
new file mode 100644 (file)
index 0000000..b0e4b0a
--- /dev/null
@@ -0,0 +1,17 @@
+using System;
+
+class D
+{
+       public static implicit operator D (Action d)
+       {
+               return new D ();
+       }
+}
+
+class Program
+{
+       static void Main()
+       {
+               D d = (D) Main;
+       }
+}
diff --git a/mcs/tests/test-901.cs b/mcs/tests/test-901.cs
new file mode 100644 (file)
index 0000000..bdd7d07
--- /dev/null
@@ -0,0 +1,23 @@
+using System;
+
+class X
+{
+       public static void Main ()
+       {
+               int i;
+               if (true) {
+                       i = 3;
+               }
+
+               Console.WriteLine (i);
+
+               int i2;
+               if (false) {
+                       throw new ApplicationException ();
+               } else {
+                       i2 = 4;
+               }
+
+               Console.WriteLine (i2);
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-902.cs b/mcs/tests/test-902.cs
new file mode 100644 (file)
index 0000000..271035f
--- /dev/null
@@ -0,0 +1,24 @@
+abstract class A
+{
+       public virtual void M (params B[] b)
+       {
+       }
+}
+
+class B : A
+{
+       public override void M (B[] b2)
+       {
+       }
+}
+
+class Test2
+{
+       public static void Main()
+       {
+               B b = new B();
+               A a = b;
+               a.M (b, b);
+               b.M (b, b, b);
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-903.cs b/mcs/tests/test-903.cs
new file mode 100644 (file)
index 0000000..4451347
--- /dev/null
@@ -0,0 +1,22 @@
+using System;
+
+struct S
+{
+}
+
+class C
+{
+       public static implicit operator S (C c)
+       {
+               return new S ();
+       }
+}
+
+class Program
+{
+       static void Main ()
+       {
+               C c = new C ();
+               var x = c ?? new S ();
+       }
+}
\ No newline at end of file
index 9f8cccac0700e535ade3411b92766ae7c006c939..33279ff09595988f1308bea6f370a134fa8349b4 100644 (file)
@@ -8,10 +8,12 @@ using System.Runtime.CompilerServices;
 struct S
 {
        public int Value;
+       public S2 s2;
        
        public S (int a1, string a2)
        {
                Value = a1;
+               s2 = new S2 ();
        }
        
        public void SetValue (int value)
@@ -32,6 +34,11 @@ struct S
        }
 }
 
+struct S2
+{
+       public int Value;
+}
+
 enum E
 {
        E_1 = 1
@@ -270,6 +277,21 @@ class Tester : Base
                return 0;
        }
 
+       async Task<bool> ArrayAccessTest_10 ()
+       {
+               var b = new bool [1] { true };
+               
+               var r = b [await Task.Factory.StartNew (() => 0)];
+               return r;
+       }
+
+       async Task<bool> ArrayAccessTest_11 ()
+       {
+               var a = new S [1];
+               a [await Task.Factory.StartNew (() => 0)].s2.Value += 5;
+               return a [await Task.Factory.StartNew(() => 0)].s2.Value == 5;
+       }
+
        async Task<int> AssignTest_1 ()
        {
                field_int = await Task.Factory.StartNew (() => 0);
@@ -585,6 +607,18 @@ class Tester : Base
                var s = new S (await Task.Factory.StartNew (() => 77), await Task.Factory.StartNew (() => "b"));
                return s.Value == 77;
        }
+
+       async Task<int> NewDelegate_1 ()
+       {
+               var f = new Func<int> (await NewDelegate_1_0 ());
+               return f ();
+       }
+
+       static async Task<Func<int>> NewDelegate_1_0 ()
+       {
+               await Task.Factory.StartNew (() => { });
+               return () => 0;         
+       }
        
        async Task<int> NewInitTest_1 ()
        {
index a1da25f39d5ec38cd4222450ce606465945af4ac..a3ae814086e2e10e58f9060f496815d011fce6b0 100644 (file)
@@ -1,8 +1,8 @@
-// Compiler options: -langversion:future
-
 using System;
 using System.Threading.Tasks;
 using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
 
 interface IFoo
 {
@@ -25,12 +25,28 @@ struct S : IFoo
        }
 }
 
+struct S2 : IEnumerable
+{
+       public List<int> Values;
+
+       public void Add (int x)
+       {
+               if (Values == null)
+                       Values = new List<int> ();
+
+               Values.Add(x);
+       }
+
+       public IEnumerator GetEnumerator()
+       {
+               return Values as IEnumerator;
+       }
+}
+
 class Tester
 {
        async Task<T> NewInitTestGen<T> () where T : struct, IFoo
        {
-               int value = 9;
-               
                var s = new T () {
                        Value = await Task.Factory.StartNew (() => 13).ConfigureAwait (false)
                };
@@ -40,6 +56,16 @@ class Tester
                
                return s;
        }
+
+       static async Task<int> NewInitCol ()
+       {
+               var s = new S2 { 
+                       await Task.FromResult (1),
+                       await Task.Factory.StartNew (() => 2)
+               };
+
+               return s.Values [0] + s.Values [1];
+       }
        
        public static int Main ()
        {
@@ -51,6 +77,10 @@ class Tester
                
                if (t.Result.Value != 13)
                        return 2;
+
+               var v = NewInitCol ().Result;
+               if (v != 3)
+                       return 3;
                
                return 0;
        }
index ca6e1faf90c65423529f93a7fb11be1d694ed35c..e715d1a4598cd3d4fe5d26a5e90624e99bd2f113 100644 (file)
@@ -174,4 +174,13 @@ namespace AwaitNS
                        var l = await.Length;                   
                }
        }
+
+       class TypeChecks
+       {
+               static void M (object await)
+               {
+                       var b = await is Exception; 
+                       var c = await as Exception;
+               }
+       }
 }
index 5b2cadb227447d463e9707739515cd0344f72504..e04a810ebceed00ddd87d14c43e48053a821fe4a 100644 (file)
@@ -14,6 +14,15 @@ namespace N.M
                        return 0;
                }
 
+               public static async Task NestedAsyncAnonymousMethod ()
+               {
+                       Action a = async delegate {
+                               await Task.Yield();
+                       };
+
+                       await Task.Yield();
+               }
+
                public static int Main ()
                {
                        var m = typeof (C).GetMethod ("AsyncMethod");
@@ -32,6 +41,28 @@ namespace N.M
                        if (c != 1)
                                return 3;
 
+
+                       m = typeof (C).GetMethod ("NestedAsyncAnonymousMethod");
+                       attr = m.GetCustomAttribute<AsyncStateMachineAttribute> ();
+                       if (attr == null)
+                               return 10;
+
+                       if (attr.StateMachineType == null)
+                               return 11;
+
+                       var n = typeof (C).GetNestedTypes (BindingFlags.NonPublic).Single (l => l.Name.Contains ("NestedAsyncAnonymousMethod"));
+                       if (n == null)
+                               return 12;
+
+                       m = n.GetMethods (BindingFlags.NonPublic | BindingFlags.Static).Single (l => l.Name.Contains ("m__"));
+
+                       attr = m.GetCustomAttribute<AsyncStateMachineAttribute> ();
+                       if (attr == null)
+                               return 13;
+
+                       if (attr.StateMachineType == null)
+                               return 14;
+
                        return 0;
                }
        }
diff --git a/mcs/tests/test-async-63.cs b/mcs/tests/test-async-63.cs
new file mode 100644 (file)
index 0000000..4572d7e
--- /dev/null
@@ -0,0 +1,85 @@
+using System;
+using System.Threading.Tasks;
+
+class C
+{
+       static int counter;
+       public static async Task TestSingleAwait (bool throwException)
+       {
+               try {
+                       if (throwException)
+                               throw new ApplicationException ();
+               } catch (ApplicationException ex) {
+                       Console.WriteLine ("x1a");
+                       ++counter;
+                       await Call ();
+                       Console.WriteLine ("x2a");
+                       ++counter;
+               } catch {
+                       throw;
+               }
+
+               Console.WriteLine ("end");
+       }
+       
+       public static async Task TestDoubleAwait (bool throwException)
+       {
+               try {
+                       if (throwException)
+                               throw new ApplicationException ();
+               } catch (ApplicationException ex) {
+                       Console.WriteLine ("x1a");
+                       ++counter;
+                       await Call ();
+                       Console.WriteLine ("x2a");
+                       ++counter;
+               } catch {
+                       Console.WriteLine ("x1b");
+                       counter += 4;
+                       await Call ();
+                       Console.WriteLine ("x2b");
+                       counter += 7;
+               }
+
+               Console.WriteLine ("end");
+       }
+
+       static Task Call ()
+       {
+               return Task.Factory.StartNew (() => false);
+       }
+
+       void HH ()
+       {
+               try {
+                               throw new ApplicationException ();
+               } catch {
+                       throw;
+               }
+       }
+
+       public static int Main ()
+       {
+               TestSingleAwait (true).Wait ();
+               Console.WriteLine (counter);
+               if (counter != 2)
+                       return 1;
+
+               TestSingleAwait (false).Wait ();
+               if (counter != 2)
+                       return 2;
+
+               counter = 0;
+
+               TestDoubleAwait (true).Wait ();
+               Console.WriteLine (counter);
+               if (counter != 2)
+                       return 3;
+
+               TestDoubleAwait (false).Wait ();
+               if (counter != 2)
+                       return 4;               
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/test-async-64.cs b/mcs/tests/test-async-64.cs
new file mode 100644 (file)
index 0000000..e16e127
--- /dev/null
@@ -0,0 +1,18 @@
+using System;
+using System.Threading.Tasks;
+
+class X
+{
+       public static void Main ()
+       {
+               Invoke (async delegate {
+                       await Task.Yield ();
+                       return 1;
+               });
+       }
+
+       static T Invoke<T> (Func<Task<T>> m)
+       {
+               return default (T);
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-async-65.cs b/mcs/tests/test-async-65.cs
new file mode 100644 (file)
index 0000000..3967236
--- /dev/null
@@ -0,0 +1,54 @@
+using System;
+using System.Threading.Tasks;
+
+class C
+{
+       static int counter;
+
+       public static async Task TestRethrow (Exception e)
+       {
+               try {
+                       throw e;
+               } catch (ApplicationException) {
+                       Console.WriteLine ("x1a");
+                       counter = 1;
+                       await Task.Delay (1);
+                       Console.WriteLine ("x2a");
+                       counter = 3;
+                       throw;
+               } catch {
+                       counter = 9;
+                       await Task.Delay (1);
+                       Console.WriteLine ("ga");
+                       throw;
+               }
+       }
+
+       public static int Main ()
+       {
+               var ex = new ApplicationException ();
+               try {
+                       TestRethrow (ex).Wait ();
+               } catch (AggregateException e) {
+                       if (e.InnerException != ex)
+                               return 1;
+               }
+
+               if (counter != 3)
+                       return 2;
+
+               var ex2 = new NotSupportedException ();
+               try {
+                       TestRethrow (ex2).Wait ();
+               } catch (AggregateException e) {
+                       if (e.InnerException != ex2)
+                               return 3;
+               }
+
+               if (counter != 9)
+                       return 4;
+
+               Console.WriteLine ("ok");
+               return 0;
+       }
+}
diff --git a/mcs/tests/test-async-66.cs b/mcs/tests/test-async-66.cs
new file mode 100644 (file)
index 0000000..bbba098
--- /dev/null
@@ -0,0 +1,42 @@
+using System;
+using System.Threading.Tasks;
+
+class TestFinally
+{
+       static int counter;
+
+       async static Task Test (bool throwException)
+       {
+               try {
+                       if (throwException)
+                               throw new ApplicationException ();
+
+                       ++counter;
+                       System.Console.WriteLine ();
+               } finally {
+                       counter += 10;
+                       await Task.Delay (2);
+                       counter += 100;
+               }
+               counter += 1000;
+       }
+
+       static int Main ()
+       {
+               Test (false).Wait ();
+               if (counter != 1111)
+                       return 1;
+
+               counter = 0;
+               try {
+                       Test (true).Wait ();
+                       return 2;
+               } catch (AggregateException) {                  
+               }
+
+               if (counter != 110)
+                       return 3;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-async-67.cs b/mcs/tests/test-async-67.cs
new file mode 100644 (file)
index 0000000..2348dc7
--- /dev/null
@@ -0,0 +1,24 @@
+using System;
+using System.Threading.Tasks;
+
+class Test
+{
+       public static async Task<int[]> Run ()
+       {
+               return new int[] {
+                       1, await Task.Factory.StartNew (() => 2)
+               };
+       }
+
+       public static int Main ()
+       {
+               var t = Run ().Result;
+               if (t [0] != 1)
+                       return 1;
+
+               if (t [1] != 2)
+                       return 2;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-async-69.cs b/mcs/tests/test-async-69.cs
new file mode 100644 (file)
index 0000000..af133f9
--- /dev/null
@@ -0,0 +1,151 @@
+using System;
+using System.Threading.Tasks;
+
+class Test
+{
+       static bool fin;
+
+       static async Task<int> YieldValue (int a)
+       {
+               await Task.Yield ();
+               return a;
+       }
+
+       static async Task<int> TestFinallyWithReturn (int value)
+       {
+               fin = false;
+               try {
+                       if (value > 4)
+                               return 5;
+
+                       value += 10;
+                       Console.WriteLine ("try");
+               } finally {
+                       fin = true;
+                       Console.WriteLine ("finally");
+                       value += await YieldValue (100);
+               }
+
+               value += 1000;
+               Console.WriteLine ("over");
+
+               return value;
+       }
+
+       static async Task TestFinallyWithReturnNoValue (int value)
+       {
+               fin = false;
+               try {
+                       if (value > 4)
+                               return;
+
+                       value += 10;
+                       Console.WriteLine ("try");
+               } finally {
+                       fin = true;
+                       Console.WriteLine ("finally");
+                       value += await YieldValue (100);
+               }
+
+               value += 1000;
+               Console.WriteLine ("over");
+       }
+
+       static async Task<int> TestFinallyWithGoto (int value)
+       {
+               fin = false;
+               try {
+                       if (value > 4)
+                               goto L;
+
+                       value += 10;
+                       Console.WriteLine ("try");
+               } finally {
+                       fin = true;
+                       Console.WriteLine ("finally");
+                       value += await YieldValue (100);
+               }
+               value += 1000;
+L:
+               Console.WriteLine ("over");
+               return value;
+       }
+
+        static async Task<int> TestFinallyWithGotoAndReturn (int value)
+       {
+               fin = false;
+               try {
+                       if (value > 4)
+                               goto L;
+
+                       value += 10;
+                       Console.WriteLine ("try");
+                       if (value > 12)
+                               return 9;
+               } finally {
+                       fin = true;
+                       Console.WriteLine ("finally");
+                       value += await YieldValue (100);
+               }
+               value += 1000;
+L:
+               Console.WriteLine ("over");
+               return value;
+       }
+
+       public static int Main ()
+       {
+               if (TestFinallyWithReturn (9).Result != 5)
+                       return 1;
+
+               if (!fin)
+                       return 2;
+
+               if (TestFinallyWithReturn (1).Result != 1111)
+                       return 3;
+
+               if (!fin)
+                       return 4;
+
+               TestFinallyWithReturnNoValue (9).Wait ();
+               if (!fin)
+                       return 5;
+
+               TestFinallyWithReturnNoValue (1).Wait ();
+               if (!fin)
+                       return 6;
+
+               if (TestFinallyWithGoto (9).Result != 109)
+                       return 7;
+
+               if (!fin)
+                       return 8;
+
+               if (TestFinallyWithGoto (1).Result != 1111)
+                       return 9;
+
+               if (!fin)
+                       return 10;
+
+               if (TestFinallyWithGotoAndReturn (9).Result != 109)
+                       return 11;
+
+               if (!fin)
+                       return 12;
+
+               if (TestFinallyWithGotoAndReturn (1).Result != 1111)
+                       return 13;
+
+               if (!fin)
+                       return 14;
+
+               if (TestFinallyWithGotoAndReturn (3).Result != 9)
+                       return 15;
+
+               if (!fin)
+                       return 16;
+
+               Console.WriteLine ("ok");
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-async-70.cs b/mcs/tests/test-async-70.cs
new file mode 100644 (file)
index 0000000..550c2bb
--- /dev/null
@@ -0,0 +1,97 @@
+using System;
+using System.Threading.Tasks;
+
+class Test
+{
+       static async Task<int> YieldValue (int a)
+       {
+               await Task.Yield ();
+               return a;
+       }
+
+       static async Task<int> TestNestedReturn (int v)
+       {
+               int x = 0;
+
+               try {
+                       try {
+                               x = await YieldValue (1);
+                               Console.WriteLine ("T1");
+                               if (x == v)
+                                       return 6;
+                       } finally {
+                               Console.WriteLine ("F1");
+
+                               x += await YieldValue (2);
+                       }
+
+                       Console.WriteLine ("AF1");
+               } finally {
+                       Console.WriteLine ("F2");
+                       try {
+                               x += await YieldValue (4);
+                               Console.WriteLine ("T3");
+                       } finally {
+                               Console.WriteLine ("F3");
+                               x += await YieldValue (8);
+                       }
+               }
+
+               Console.WriteLine ("END");
+
+               return x;
+       }
+
+       static async Task<int> TestNestedGoto (int v)
+       {
+               int x = 0;
+
+               try {
+                       try {
+                               Console.WriteLine ("T1");
+                               if (x == v)
+                                       goto L;
+
+                               x = await YieldValue (1);
+                       } finally {
+                               Console.WriteLine ("F1");
+
+                               x += await YieldValue (2);
+                       }
+
+                       Console.WriteLine ("AF1");
+               } finally {
+                       Console.WriteLine ("F2");
+                       try {
+                               x += await YieldValue (4);
+                               Console.WriteLine ("T3");
+                       } finally {
+                               Console.WriteLine ("F3");
+                               x += await YieldValue (8);
+                       }
+               }
+
+               Console.WriteLine ("END");
+L:
+               Console.WriteLine ("END L");
+
+               return x;
+       }
+
+       public static int Main ()
+       {
+               if (TestNestedReturn (1).Result != 6)
+                       return 1;
+
+               if (TestNestedReturn (0).Result != 15)
+                       return 2;
+
+               if (TestNestedGoto (1).Result != 15)
+                       return 3;
+
+               if (TestNestedGoto (0).Result != 14)
+                       return 4;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-async-71.cs b/mcs/tests/test-async-71.cs
new file mode 100644 (file)
index 0000000..2b7c425
--- /dev/null
@@ -0,0 +1,25 @@
+// Compiler options: -unsafe
+
+using System;
+using System.Threading.Tasks;
+
+class UnsafeContext
+{
+       static int Main()
+       {
+               if (TestUnsafe (1).Result != 0)
+                       return 1;
+
+               return 0;
+       }
+
+       static async Task<int> TestUnsafe (int g)
+       {
+               unsafe {
+                       int* ga = &g;
+               }
+
+               await Task.Yield ();
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-async-72.cs b/mcs/tests/test-async-72.cs
new file mode 100644 (file)
index 0000000..3621863
--- /dev/null
@@ -0,0 +1,88 @@
+using System;
+using System.Threading.Tasks;
+
+class Test
+{
+       static async Task<int> YieldValue (int a)
+       {
+               await Task.Yield ();
+               return a;
+       }
+
+       public static async Task<int> BreakTest ()
+       {
+               int value = 0;
+               try {
+                       for (int i = 0; i < 8; ++i) {
+                               try {
+                                       try {
+                                               value += await YieldValue (1);
+
+                                               Console.WriteLine ("i = " + i);
+
+                                               if (i > 2)
+                                                       break;
+
+                                               if (i > 1)
+                                                       throw new ApplicationException ();
+                                       } catch (ApplicationException) {
+                                               Console.WriteLine ("catch");
+                                               value += await YieldValue (100);
+                                       }
+                               } finally {
+                                       Console.WriteLine ("F1");
+                                       value += await YieldValue (10);
+                               }
+                       }
+               } finally {
+                       Console.WriteLine ("F2");
+                       value += await YieldValue (1000);
+               }
+
+               return value;
+       }
+
+       public static async Task<int> ContinueTest ()
+       {
+               int value = 0;
+               try {
+                       for (int i = 0; i < 8; ++i) {
+                               try {
+                                       try {
+                                               value += await YieldValue (1);
+
+                                               Console.WriteLine ("i = " + i);
+
+                                               if (i < 2)
+                                                       continue;
+
+                                               if (i > 1)
+                                                       throw new ApplicationException ();
+                                       } catch (ApplicationException) {
+                                               Console.WriteLine ("catch");
+                                               value += await YieldValue (100);
+                                       }
+                               } finally {
+                                       Console.WriteLine ("F1");
+                                       value += await YieldValue (10);
+                               }
+                       }
+               } finally {
+                       Console.WriteLine ("F2");
+                       value += await YieldValue (1000);
+               }
+
+               return value;
+       }
+
+       public static int Main ()
+       {
+               if (BreakTest ().Result != 1144)
+                       return 1;
+
+               if (ContinueTest ().Result != 1688)
+                       return 1;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-async-73.cs b/mcs/tests/test-async-73.cs
new file mode 100644 (file)
index 0000000..dc1935f
--- /dev/null
@@ -0,0 +1,31 @@
+using System.Threading.Tasks;
+using System;
+
+class X
+{
+       static async Task<int> Foo ()
+       {
+               var v = Throws ();
+
+               try {
+                       await v;   
+               } catch (Exception e) {
+                       return 0;
+               }
+
+               return 1;
+       }
+
+       static async Task<int> Throws ()
+       {
+               throw new Exception ();
+       }
+
+       static int Main ()
+       {
+               if (Foo ().Result != 0)
+                       return 1;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-async-74.cs b/mcs/tests/test-async-74.cs
new file mode 100644 (file)
index 0000000..97bb7fd
--- /dev/null
@@ -0,0 +1,27 @@
+using System;
+using System.Threading.Tasks;
+
+class AwaitGotoBug
+{
+       public async Task Test()
+       {
+               using ((IDisposable)null)
+               {
+                       retry:
+
+                       if (Equals(1, 2))
+                       {
+                               await Task.Yield();
+                               goto retry;
+                       }
+                       else
+                       {
+                               await Task.Yield();
+                       }
+               }
+       }
+
+       public static void Main ()
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-ex-filter-03.cs b/mcs/tests/test-ex-filter-03.cs
new file mode 100644 (file)
index 0000000..d2a3e91
--- /dev/null
@@ -0,0 +1,21 @@
+using System;
+
+class X
+{
+       public static int Main ()
+       {
+               try {
+                       bool x = true;
+                       try {
+                               throw new ApplicationException ();
+                       } catch (NullReferenceException) if (x) {
+                               throw;
+                       }
+
+                       return 1;
+               } catch (ApplicationException) {
+                       Console.WriteLine ("ok");
+                       return 0;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-ex-filter-04.cs b/mcs/tests/test-ex-filter-04.cs
new file mode 100644 (file)
index 0000000..122accb
--- /dev/null
@@ -0,0 +1,74 @@
+using System;
+using System.Threading.Tasks;
+
+class X
+{
+       static Exception ex = new ApplicationException ();
+
+       public static int Main ()
+       {
+               if (Test (5, null).Result != 5)
+                       return 1;
+
+               try {
+                       Test (5, ex).Wait ();
+                       return 2;
+               } catch (AggregateException ae) {
+                       if (ae.InnerException != ex)
+                               return 3;
+               }
+
+               try {
+                       Test (15, ex).Wait ();
+                       return 4;
+               } catch (AggregateException ae) {
+                       if (ae.InnerException != ex)
+                               return 5;
+               }
+
+               try {
+                       TestGeneric (5).Wait ();
+                       return 10;
+               } catch (AggregateException ae) {
+                       if (ae.InnerException != ex)
+                               return 11;
+               }
+               
+               try {
+                       TestGeneric (15).Wait ();
+                       return 12;
+               } catch (AggregateException ae) {
+                       if (ae.InnerException != ex)
+                               return 13;
+               }
+
+               return 0;
+       }
+
+       async static Task<int> Test (int x, Exception e)
+       {
+               try {
+                       Console.WriteLine (x);
+                       if (e != null)
+                               throw e;
+               } catch (Exception) if (x != 15) {
+                       await Task.FromResult (0);
+                       throw;
+               }
+
+               return x;
+       }
+
+       async static Task<int> TestGeneric (int x)
+       {
+               try {
+                       Console.WriteLine (x);
+                       throw ex;
+               } catch if (x != 15) {
+                       await Task.FromResult (0);
+                       throw;
+               }
+
+               return x;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-ex-filter-05.cs b/mcs/tests/test-ex-filter-05.cs
new file mode 100644 (file)
index 0000000..5d1251a
--- /dev/null
@@ -0,0 +1,40 @@
+using System;
+using System.Threading.Tasks;
+
+class Test
+{
+       static bool Verify (Func<bool> f)
+       {
+               return f ();
+       }
+
+       static async Task<int> TestCapturedException (Exception e)
+       {
+               try {
+                       if (e != null)
+                               throw e;
+               } catch (Exception ex) if (Verify (() => ex.Message == "foo")) {
+                       await Task.Yield ();
+                       Console.WriteLine (ex);
+                       return 1;
+               } catch (Exception ex) if (Verify (() => ex.Message != null)) {
+                       await Task.Yield ();
+                       Console.WriteLine (ex);
+                       return 2;
+               }
+
+               return 3;
+       }
+
+       public static int Main()
+       {
+               if (TestCapturedException (null).Result != 3)
+                       return 1;
+
+               var ex = new ApplicationException ();
+               if (TestCapturedException (ex).Result != 2)
+                       return 2;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-ex-filter-06.cs b/mcs/tests/test-ex-filter-06.cs
new file mode 100644 (file)
index 0000000..86bbf0e
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+using System.IO;
+using System.Collections.Generic;
+
+class C
+{
+       static int Test<T> () where T : Exception
+       {
+               try {
+                       throw null;
+               } catch (T t) if (t.Message != null) {
+                       return 0;
+               }
+       }
+       static int Main()
+       {
+               try {
+                       Test<ApplicationException> ();
+                       return 1;
+               } catch {
+               }
+
+               if (Test<NullReferenceException> () != 0)
+                       return 2;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-expression-bodied-01.cs b/mcs/tests/test-expression-bodied-01.cs
new file mode 100644 (file)
index 0000000..6d827f2
--- /dev/null
@@ -0,0 +1,54 @@
+using System;
+
+class C
+{
+       int value;
+       string f1 = "f-1";
+       string f2 = "f=2";
+
+       public static string Test1 (string a, string b) => a + "|" + b;
+       void Test2 (int x) => value = x;
+       Func<int> Test3 (int a) => () => a;
+
+       public static implicit operator string (C c) => "op";
+
+       protected string Prop => f1 + " " + f2;
+       static Func<string> Prop2 => () => "n1";
+
+       public int this[int arg1, int arg2] => arg2 - arg1;
+
+
+       int Check ()
+       {
+               if (Test1 ("1", "5") != "1|5")
+                       return 1;
+
+               Test2 (6);
+               if (value != 6)
+                       return 2;
+
+               if (Test3 (9) () != 9)
+                       return 3;
+
+               string s = this;
+               if (s != "op")
+                       return 4;
+
+               if (Prop != "f-1 f=2")
+                       return 5;
+
+               if (Prop2 () != "n1")
+                       return 6;
+
+               if (this [13, 20] != 7)
+                       return 7;
+
+               return 0;
+       }
+
+    static int Main()
+    {
+       var c = new C ();
+        return c.Check ();
+    }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-null-operator-01.cs b/mcs/tests/test-null-operator-01.cs
new file mode 100644 (file)
index 0000000..debd85f
--- /dev/null
@@ -0,0 +1,155 @@
+using System;
+
+struct S
+{
+    public int Prop { get; set; }
+}
+
+interface I
+{
+    int Method ();
+}
+
+class CI : I
+{
+    public int Method ()
+    {
+        return 33;
+    }
+
+    public int Prop { get; set; }
+}
+
+class C
+{
+    static int prop_calls;
+    static string Prop {
+        get {
+            ++prop_calls;
+            return null;
+        }
+    }
+
+    static int TestArray ()
+    {
+        int[] k = null;
+        var t1 = k?.ToString ();
+        if (t1 != null)
+            return 1;
+
+        var t2 = k?.GetLength (0);
+        if (t2 != null)
+            return 2;
+
+        var t3 = k?.Length;
+        if (t3 != null)
+            return 3;
+
+        k = new int[] { 3 };
+        var t11 = k?.ToString ();
+        if (t11.GetType () != typeof (string))
+            return 10;
+
+        var t12 = k?.GetLength (0);
+        if (t12.GetType () != typeof (int))
+            return 11;
+
+        var t13 = k?.Length;
+        if (t13.GetType () != typeof (int))
+            return 12;
+
+        return 0;
+    }
+
+    static int TestReferenceType ()
+    {
+        string s = null;
+        var t1 = s?.Split ();
+        if (t1 != null)
+            return 1;
+
+        var t2 = s?.Length;
+        if (t2 != null)
+            return 2;
+
+        var t3 = Prop?.Length;
+        if (t3 != null)
+            return 3;
+        if (prop_calls != 1)
+            return 4;
+
+        var t4 = Prop?.Split ();
+        if (t4 != null)
+            return 5;
+        if (prop_calls != 2)
+            return 6;
+
+        return 0;
+    }
+
+    static int TestGeneric<T> (T t) where T : class, I
+    {
+        // FIXME:
+        //var t1 = t?.Method ();
+        //if (t1 != null)
+        //  return 1;
+
+        T[] at = null;
+        var t2 = at?.Length;
+        if (t2 != null)
+            return 2;
+
+        return 0;
+    }
+
+    static int TestNullable ()
+    {
+        int? i = 4;
+        var m = i?.CompareTo (3);
+        if (m.GetType () != typeof (int))
+            return 1;
+
+        if (m != 1)
+            return 2;
+
+        DateTime? dt = null;
+        dt?.ToString ();
+        if (dt?.ToString () != null)
+            return 3;
+
+        byte? b = 0;
+        if (b?.ToString () != "0")
+            return 4;
+
+        S? s = null;
+        var p1 = s?.Prop;
+        if (p1 != null)
+            return 5;
+
+        return 0;
+    }
+
+    static int Main ()
+    {
+        int res;
+        res = TestNullable ();
+        if (res != 0)
+            return 100 + res;
+
+        res = TestArray ();
+        if (res != 0)
+            return 200 + res;
+
+        res = TestReferenceType ();
+        if (res != 0)
+            return 300 + res;
+
+        CI ci = null;
+        res = TestGeneric<CI> (ci);
+        if (res != 0)
+            return 400 + res;
+
+        Console.WriteLine ("ok");
+        return 0;
+    }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-null-operator-02.cs b/mcs/tests/test-null-operator-02.cs
new file mode 100644 (file)
index 0000000..83cec41
--- /dev/null
@@ -0,0 +1,100 @@
+using System;
+
+class CI
+{
+    public long Field;
+    public sbyte? FieldNullable;
+    public object FieldReference;
+
+       public int Prop { get; set; }
+    public byte? PropNullable { get; set; }
+    public string PropReference { get; set; }
+
+    public event Action ev1;
+}
+
+class C
+{
+    static int TestProperty ()
+    {
+        CI ci = null;
+        var m1 = ci?.Prop;
+        var m2 = ci?.PropNullable;
+        var m3 = ci?.PropReference;
+
+//        ci?.Prop = 6;
+
+        ci = new CI ();
+        m1 = ci?.Prop;
+        m2 = ci?.PropNullable;
+        m3 = ci?.PropReference;
+
+//        ci?.Prop = 5;
+//        if (ci.Prop != 5)
+//            return 1;
+
+// TODO: It's not allowed for now
+//      ci?.Prop += 4;
+//      var pp1 = ci?.Prop = 4;
+//      var pp2 = ci?.Prop += 4;
+
+        return 0;
+    }
+
+    static int TestField ()
+    {
+        CI ci = null;
+        var m1 = ci?.Field;
+        var m2 = ci?.FieldNullable;
+        var m3 = ci?.FieldReference;
+
+//        ci?.Field = 6;
+
+        ci = new CI ();
+        m1 = ci?.Field;
+        m2 = ci?.FieldNullable;
+        m3 = ci?.FieldReference;
+
+//        ci?.Field = 5;
+//        if (ci.Field != 5)
+//            return 1;
+
+// TODO: It's not allowed for now
+//      ci?.Field += 4;
+//      var pp1 = ci?.Field = 4;
+//      var pp2 = ci?.Field += 4;
+
+        return 0;
+    }
+
+    static int TestEvent ()
+    {
+        CI ci = null;
+        ci?.ev1 += null;
+
+        ci = new CI ();
+        ci?.ev1 += null;
+
+        return 0;
+    }
+
+    static int Main ()
+    {
+        int res;
+
+        res = TestProperty ();
+        if (res != 0)
+            return 10 + res;
+
+        res = TestField ();
+        if (res != 0)
+            return 20 + res;
+
+        res = TestEvent ();
+        if (res != 0)
+            return 30 + res;            
+
+       Console.WriteLine ("ok");
+        return 0;
+    }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-null-operator-03.cs b/mcs/tests/test-null-operator-03.cs
new file mode 100644 (file)
index 0000000..c58d689
--- /dev/null
@@ -0,0 +1,31 @@
+using System;
+
+class C
+{
+    int field;
+
+    int Test1 ()
+    {
+        var x = this?.field;
+        if (x == null)
+            return 1;
+
+        // TODO: Should it really be of int? type
+
+        return 0;
+    }
+
+    static int Main ()
+    {
+        var c = new C ();
+        c.Test1 ();
+
+        const C c2 = null;
+        var res = c2?.field;
+        if (res != null)
+            return 1;
+
+       Console.WriteLine ("ok");
+        return 0;
+    }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-null-operator-04.cs b/mcs/tests/test-null-operator-04.cs
new file mode 100644 (file)
index 0000000..6796920
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+
+public class D
+{
+       void Foo ()
+       {
+       }
+
+       public static void Main()
+       {
+               D d = null;
+               Action a = d?.Foo;
+       }
+}
diff --git a/mcs/tests/test-null-operator-05.cs b/mcs/tests/test-null-operator-05.cs
new file mode 100644 (file)
index 0000000..5fa5c6f
--- /dev/null
@@ -0,0 +1,58 @@
+using System;
+
+class CI
+{
+       public string this [string i] { set { } get { return ""; } }
+       public int? this [int i] { set { } get { return 1; } }
+}
+
+class C
+{
+       static int TestArrayAccess ()
+       {
+               byte[] arr = null;
+               var v = arr? [0];
+               if (v != null)
+                       return 1;
+
+               long?[] ar2 = null;
+               var v2 = ar2? [-1];
+               if (v2 != null)
+                       return 2;
+
+// TODO: Disabled for now?
+//        arr? [0] += 2;
+               return 0;
+       }
+
+       static int TestIndexerAccess ()
+       {
+               CI ci = null;
+               var v = ci? ["x"];
+               if (v != null)
+                       return 1;
+
+               var v2 = ci? [0];
+               if (v2 != null)
+                       return 2;
+
+// TODO: Disabled for now?
+//       ci? [0] += 3;
+               return 0;
+       }
+
+       static int Main ()
+       {
+               int res;
+               res = TestArrayAccess ();
+               if (res != 0)
+                       return 10 + res;
+
+               res = TestIndexerAccess ();
+               if (res != 0)
+                       return 20 + res;
+
+               Console.WriteLine ("ok");
+               return 0;
+       }
+}
\ No newline at end of file
index 54cfb9cb4e19d1e7892bca2c9278428940d6b1f1..78a543212d0eff01cfc57433458f86d9f7a75a0f 100644 (file)
@@ -1,21 +1,25 @@
 using System;
 
-namespace ConsoleApplication1
+namespace TestAttributesCollecting
 {
+       class A : Attribute
+       {
+       }
+
        public partial class X
        {
-               [CLSCompliant (true)]
-               partial void Foo ();
+               [A]
+               partial void Foo<[A] T>(/*[A]*/ int p);
        }
 
        public partial class X
        {
-               partial void Foo ()
+               partial void Foo<T> (int p)
                {
                        int i;
                }
        }
-       
+
        public partial class Y
        {
                partial void Foo ()
@@ -23,7 +27,7 @@ namespace ConsoleApplication1
                        int i;
                }
        }
-       
+
        public partial class Y
        {
                [CLSCompliant (true)]
@@ -34,16 +38,22 @@ namespace ConsoleApplication1
        {
                public static int Main ()
                {
-                       var x = typeof (X).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetCustomAttributes (true);
+                       var m = typeof (X).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
+                       var x = m.GetCustomAttributes (true);
                        Console.WriteLine (x.Length);
                        if (x.Length != 1)
                                return 1;
 
+                       var ga = m.GetGenericArguments ();
+                       x = ga [0].GetCustomAttributes (false);
+                       if (x.Length != 1)
+                               return 2;
+
                        x = typeof (Y).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetCustomAttributes (true);
                        Console.WriteLine (x.Length);
                        if (x.Length != 1)
-                               return 2;
-                       
+                               return 3;
+
                        return 0;
                }
        }
index dac84c863c088e8bd27e596844310432abea577c..f2b2239fd4d9e9caf6526986999c4212e08dacb8 100644 (file)
@@ -1,10 +1,6 @@
 class Simple(int arg)
 {
-       int Property {
-               get {
-                       return arg;
-               }
-       }
+       int Property { get; } = arg;
 
        public static int Main ()
        {
@@ -22,9 +18,5 @@ class Simple(int arg)
 
 struct S(decimal arg)
 {
-       internal decimal Property {
-               get {
-                       return arg;
-               }
-       }
+       internal decimal Property { get; } = arg;
 }
\ No newline at end of file
index 5369a49c9b1d209f0122e5b71e19c3a39f0b2320..bc02c026c7dca734ecca3db6f44e2a347bee3688 100644 (file)
@@ -5,22 +5,21 @@ partial class Part
        public Part (string s)
                : this (5)
        {
-               if (arg != 5)
-                       throw new ApplicationException ("1");
-
-               if (Property != 12)
-                       throw new ApplicationException ("2");
        }
 }
 
 partial class Part(int arg)
 {
-       int field = 7;
+       static int field = 7;
+
+       int Property { get; } = arg + field;
 
-       int Property {
-               get {
-                       return arg + field;
-               }
+       {
+               if (arg != 5)
+                       throw new ApplicationException ("1");
+
+               if (Property != 12)
+                       throw new ApplicationException ("2");
        }
 
        public static int Main ()
index d6e472e4d4e0874d72c28035bd4ea9de275b0267..269dfe8dd154a13255db61867a177bfd289de66d 100644 (file)
@@ -4,7 +4,7 @@ class D(string arg) : Base (arg)
 
 abstract class Base (object obj)
 {
-       public string Prop { get { return obj.ToString (); } }
+       public string Prop { get; } = obj.ToString ();
 }
 
 class X
index 503e944c558087b8d986298845547eb8f1d49bdc..f127ceccc3b5b2fdd9046c7e0b384a03614fc8fd 100644 (file)
@@ -7,21 +7,19 @@ class A : Attribute
 {
 }
 
-class X ([field:A] int value)
+[method:A]
+class X (int value)
 {
        public int f = value;
 
-       public int P {
-               get {
-                       return value;
-               }
-       }
+       public int P { get; } = value;
 
        public static int Main ()
        {
-               var attr = (A)typeof (X).GetField("value", BindingFlags.NonPublic | BindingFlags.Instance).GetCustomAttribute (typeof (A));
+               var x = typeof (X);
+               var attr = x.GetConstructors ()[0].GetCustomAttribute (typeof (A)) as A;
                if (attr == null)
-                       return 1;
+                       return 2;
 
                return 0;
        }
diff --git a/mcs/tests/test-primary-ctor-06.cs b/mcs/tests/test-primary-ctor-06.cs
new file mode 100644 (file)
index 0000000..7d9ef1e
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+class ID () : IDisposable
+{
+       void IDisposable.Dispose ()
+       {
+       }
+}
+
+class X
+{
+       public static void Main ()
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-primary-ctor-07.cs b/mcs/tests/test-primary-ctor-07.cs
new file mode 100644 (file)
index 0000000..233cfd0
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+
+struct S (int x)
+{
+       public int y = x;
+
+       public S (char x)
+               : this (1)
+       {
+       }
+
+       static S ()
+       {
+       }
+}
+
+class X
+{
+       public static int Main ()
+       {
+               if (new S (-5).y != -5)
+                       return 1;
+
+               if (new S ('x').y != 1)
+                       return 2;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-primary-ctor-08.cs b/mcs/tests/test-primary-ctor-08.cs
new file mode 100644 (file)
index 0000000..9f24885
--- /dev/null
@@ -0,0 +1,31 @@
+struct S (int arg)
+{
+       {
+               v = arg;
+       }
+
+       public readonly int v;
+}
+
+class C (int arg)
+{
+       {
+               v = arg;
+       }
+
+       public readonly int v;
+}
+
+class Test
+{
+       public static int Main ()
+       {
+               if (new C (4).v != 4)
+                       return 1;
+
+               if (new S (3).v != 3)
+                       return 2;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-primary-ctor-09.cs b/mcs/tests/test-primary-ctor-09.cs
new file mode 100644 (file)
index 0000000..64e5ac6
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+
+class A (Func<int, int> barg)
+{
+       public Func<int, int> BaseArg = barg;
+}
+
+partial class PC
+{
+       public Func<int, int> f1 = (a) => arg;
+}
+
+partial class PC (int arg) 
+       : A ((a) => arg)
+{
+}
+
+class X
+{
+       public static int Main ()
+       {
+               if (new PC (3).f1 (4) != 3)
+                       return 1;
+
+               if (new PC (3).BaseArg (4) != 3)
+                       return 2;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-static-using-01.cs b/mcs/tests/test-static-using-01.cs
new file mode 100644 (file)
index 0000000..88358aa
--- /dev/null
@@ -0,0 +1,28 @@
+// Compiler options: -langversion:6
+
+using A.B.X;
+
+namespace A.B
+{
+       static class X
+       {
+               public static int Test ()
+               {
+                       return 5;
+               }
+       }
+}
+
+namespace C
+{
+       class M
+       {
+               public static int Main ()
+               {
+                       if (Test () != 5)
+                               return 1;
+
+                       return 0;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-static-using-02.cs b/mcs/tests/test-static-using-02.cs
new file mode 100644 (file)
index 0000000..db11121
--- /dev/null
@@ -0,0 +1,42 @@
+// Compiler options: -langversion:6
+
+using System;
+
+namespace A.B
+{
+       static class X
+       {
+               public static int Test (object o)
+               {
+                       return 1;
+               }
+       }
+}
+
+namespace A.C
+{
+       static class X
+       {
+               public static int Test (int o)
+               {
+                       return 2;
+               }
+       }
+}
+
+namespace C
+{
+       using A.B.X;
+       using A.C.X;
+
+       class M
+       {
+               public static int Main ()
+               {
+                       if (Test (3) != 2)
+                               return 1;
+
+                       return 0;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-static-using-03.cs b/mcs/tests/test-static-using-03.cs
new file mode 100644 (file)
index 0000000..870643f
--- /dev/null
@@ -0,0 +1,42 @@
+// Compiler options: -langversion:6
+
+using System;
+using A.B.X;
+
+namespace A.B
+{
+       static class X
+       {
+               public static int Test (int o)
+               {
+                       return 1;
+               }
+       }
+}
+
+namespace A.C
+{
+       static class X
+       {
+               public static int Test (int o)
+               {
+                       return 2;
+               }
+       }
+}
+
+namespace C
+{
+       using A.C.X;
+
+       class M
+       {
+               public static int Main ()
+               {
+                       if (Test (3) != 2)
+                               return 1;
+
+                       return 0;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-static-using-04.cs b/mcs/tests/test-static-using-04.cs
new file mode 100644 (file)
index 0000000..fe18b97
--- /dev/null
@@ -0,0 +1,42 @@
+// Compiler options: -langversion:6
+
+using System;
+
+namespace A.B
+{
+       static class X
+       {
+               public static int Test (object o)
+               {
+                       return 1;
+               }
+       }
+}
+
+namespace A.C
+{
+       static class X
+       {
+               private static int Test (int o)
+               {
+                       return 2;
+               }
+       }
+}
+
+namespace C
+{
+       using A.B.X;
+       using A.C.X;
+
+       class M
+       {
+               public static int Main ()
+               {
+                       if (Test (3) != 1)
+                               return 1;
+
+                       return 0;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-static-using-05.cs b/mcs/tests/test-static-using-05.cs
new file mode 100644 (file)
index 0000000..0ddabc0
--- /dev/null
@@ -0,0 +1,11 @@
+using System.Console;
+using System.Linq.Enumerable;
+
+class Test
+{
+       static void Main() 
+       {
+               var range = Range (5, 17);
+               WriteLine (range.Where (i => i % 2 == 0).Count ());
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-static-using-06.cs b/mcs/tests/test-static-using-06.cs
new file mode 100644 (file)
index 0000000..fe259c8
--- /dev/null
@@ -0,0 +1,44 @@
+// Compiler options: -langversion:6
+
+using System;
+using A.B.X;
+using A.C.X;
+
+namespace A.B
+{
+       static class X
+       {
+               public static int Test (object o)
+               {
+                       return 1;
+               }
+       }
+}
+
+namespace A.C
+{
+       static class X
+       {
+               public static int Test<T> (T o)
+               {
+                       if (typeof (T) != typeof (object))
+                               return -1;
+
+                       return 2;
+               }
+       }
+}
+
+namespace C
+{
+       class M
+       {
+               public static int Main ()
+               {
+                       if (Test<object> ("") != 2)
+                               return 1;
+
+                       return 0;
+               }
+       }
+}
\ No newline at end of file
index 5b4e0e1edcd25d63a464cd742b93a18ffa7db9fa..2db20c17d24a3ffcdc70f89ed18c659e970328ca 100644 (file)
@@ -1,37 +1,40 @@
-<?xml version="1.0"?>\r
-<doc>\r
-    <assembly>\r
-        <name>test-xml-063</name>\r
-    </assembly>\r
-    <members>\r
-        <member name="T:A">\r
-            Test A\r
-        </member>\r
-        <member name="T:Test">\r
-            <seealso cref="M:Test.op_Explicit(Test)~System.Int64"/>\r
-            <seealso cref="M:Test.op_Explicit(Test)~A"/>\r
-            <seealso cref="M:Test.op_Implicit(System.Int32)~Test"/>\r
-            <seealso cref="M:Test.op_Implicit(System.Boolean)~Test"/>\r
-            <seealso cref="M:Test.op_LogicalNot(Test)"/>\r
-            <seealso cref="M:Test.#ctor"/>\r
-        </member>\r
-        <member name="M:Test.#ctor">\r
-            Start\r
-        </member>\r
-        <member name="M:Test.op_Explicit(Test)~A">\r
-            Comment\r
-        </member>\r
-        <member name="M:Test.op_Explicit(Test)~System.Int64">\r
-            Comment 2\r
-        </member>\r
-        <member name="M:Test.op_Implicit(System.Int32)~Test">\r
-            Comment 3\r
-        </member>\r
-        <member name="M:Test.op_Implicit(System.Boolean)~Test">\r
-            Comment 4\r
-        </member>\r
-        <member name="M:Test.op_LogicalNot(Test)">\r
-            Comment 5\r
-        </member>\r
-    </members>\r
-</doc>\r
+<?xml version="1.0"?>
+<doc>
+    <assembly>
+        <name>test-xml-063</name>
+    </assembly>
+    <members>
+        <member name="T:A">
+            Test A</member>
+        <member name="T:Test">
+            <seealso cref="M:Test.op_Explicit(Test)~System.Int64" />
+            <seealso cref="M:Test.op_Explicit(Test)~A" />
+            <seealso cref="M:Test.op_Implicit(System.Int32)~Test" />
+            <seealso cref="M:Test.op_Implicit(System.Boolean)~Test" />
+            <seealso cref="M:Test.op_LogicalNot(Test)" />
+            <seealso cref="M:Test.op_Equality(Test,System.Int32)" />
+            <seealso cref="M:Test.op_Inequality(Test,System.Int32)" />
+            <seealso cref="M:Test.#ctor" />
+        </member>
+        <member name="M:Test.#ctor">
+            Start</member>
+        <member name="M:Test.op_Explicit(Test)~A">
+            Comment</member>
+        <member name="M:Test.op_Explicit(Test)~System.Int64">
+            Comment 2</member>
+        <member name="M:Test.op_Implicit(System.Int32)~Test">
+            Comment 3</member>
+        <member name="M:Test.op_Implicit(System.Boolean)~Test">
+            Comment 4</member>
+        <member name="M:Test.op_LogicalNot(Test)">
+            Comment 5</member>
+        <member name="M:Test.op_Equality(Test,System.Int32)">
+            Comment 6</member>
+        <member name="M:Test.op_Inequality(Test,System.Int32)">
+            Comment 7</member>
+        <member name="M:Test.op_Equality(Test,System.Int64)">
+            Comment 61</member>
+        <member name="M:Test.op_Inequality(Test,System.Int64)">
+            Comment 72</member>
+    </members>
+</doc>
index 7a63f013ad7e5940aba86d25f863bba8a769a009..f9964180120d0661b98c95100c953e95ff3b5266 100644 (file)
@@ -10,6 +10,8 @@ public class A
 /// <seealso cref="implicit operator Test"/>
 /// <seealso cref="implicit operator Test(bool)"/>
 /// <seealso cref="operator !(Test)"/>
+/// <seealso cref="operator =="/>
+/// <seealso cref="operator !="/>
 /// <seealso cref="Test()"/>
 public class Test
 {
@@ -17,37 +19,61 @@ public class Test
        Test ()
        {
        }
-       
+
        /// Comment
-       public static explicit operator A(Test test)
+       public static explicit operator A (Test test)
        {
                return new A ();
        }
-       
+
        /// Comment 2
-       public static explicit operator long(Test test)
+       public static explicit operator long (Test test)
        {
                return 2;
        }
-       
+
        /// Comment 3
-       public static implicit operator Test(int test)
+       public static implicit operator Test (int test)
        {
                return new Test ();
        }
-       
+
        /// Comment 4
-       public static implicit operator Test(bool test)
+       public static implicit operator Test (bool test)
        {
                return new Test ();
        }
-       
+
        /// Comment 5
        public static bool operator !(Test test)
        {
                return false;
        }
-       
+
+       /// Comment 6
+       public static bool operator == (Test a, int b)
+       {
+               return true;
+       }
+
+       /// Comment 7
+       public static bool operator != (Test a, int b)
+       {
+               return false;
+       }
+
+       /// Comment 61
+       public static bool operator == (Test a, long b)
+       {
+               return true;
+       }
+
+       /// Comment 72
+       public static bool operator != (Test a, long b)
+       {
+               return false;
+       }
+
        static void Main ()
        {
        }
index 19d9696f82c022aed828f8fb4e98ad92b6a9ab45..5f6c441e5d76052337fa535919ae25153b9ff726 100644 (file)
       <method name="System.Dynamic.DynamicMetaObject BindUnaryOperation(System.Dynamic.UnaryOperationBinder)" attrs="198">\r
         <size>61</size>\r
       </method>\r
-      <method name="System.Object &lt;BindGetIndex&gt;m__0(System.Dynamic.DynamicMetaObject)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="System.Object &lt;BindInvoke&gt;m__1(System.Dynamic.DynamicMetaObject)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="System.Object &lt;BindInvokeMember&gt;m__2(System.Dynamic.DynamicMetaObject)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="System.Object &lt;BindSetIndex&gt;m__3(System.Dynamic.DynamicMetaObject)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
       <method name="Void .ctor(DynamicObjectMock, Expression)" attrs="6278">\r
         <size>22</size>\r
       </method>\r
       <method name="Void Assert[T](System.Collections.Generic.IList`1[T], System.Collections.Generic.IList`1[T], System.String)" attrs="145">\r
         <size>257</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAdd_1&gt;m__0(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+    </type>\r
+    <type name="Tester+&lt;BinaryAddChecked_2&gt;c__AnonStorey0">\r
+      <method name="System.Object &lt;&gt;m__0()" attrs="131">\r
+        <size>98</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;GetIndex_3&gt;c__AnonStorey1">\r
+      <method name="Void &lt;&gt;m__0(System.Dynamic.GetIndexBinder, System.Object[])" attrs="131">\r
+        <size>93</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;InvokeMember_2&gt;c__AnonStorey2">\r
+      <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">\r
+        <size>110</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;InvokeMember_6&gt;c__AnonStorey3">\r
+      <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">\r
+        <size>120</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;SetIndex_3&gt;c__AnonStorey4">\r
+      <method name="Void &lt;&gt;m__0(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="131">\r
+        <size>120</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;SetMember_2&gt;c__AnonStorey5">\r
+      <method name="System.Object &lt;&gt;m__0(System.Dynamic.GetMemberBinder)" attrs="131">\r
+        <size>80</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="AssertDynamicObject">\r
+      <method name="System.Object &lt;BindGetIndex&gt;m__0(System.Object, System.Dynamic.DynamicMetaObject)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Object &lt;BindInvoke&gt;m__1(System.Object, System.Dynamic.DynamicMetaObject)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Object &lt;BindInvokeMember&gt;m__2(System.Object, System.Dynamic.DynamicMetaObject)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Object &lt;BindSetIndex&gt;m__3(System.Object, System.Dynamic.DynamicMetaObject)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester">\r
+      <method name="Void &lt;BinaryAdd_1&gt;m__0(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>73</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAdd_2&gt;m__1(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryAdd_2&gt;m__1(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>68</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAdd_3&gt;m__2(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryAdd_3&gt;m__2(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>73</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAdd_4&gt;m__3(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryAdd_4&gt;m__3(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>73</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAddChecked_1&gt;m__4(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryAddChecked_1&gt;m__4(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>73</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAddChecked_2&gt;m__5(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryAddChecked_2&gt;m__5(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>73</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAddAssign_1&gt;m__6(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryAddAssign_1&gt;m__6(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAddAssignChecked_1&gt;m__7(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryAddAssignChecked_1&gt;m__7(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAnd_1&gt;m__8(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryAnd_1&gt;m__8(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>73</size>\r
       </method>\r
-      <method name="Void &lt;BinaryAndAssign_1&gt;m__9(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryAndAssign_1&gt;m__9(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryDivide_1&gt;m__A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryDivide_1&gt;m__A(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryDivideAssign_1&gt;m__B(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryDivideAssign_1&gt;m__B(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryEqual_1&gt;m__C(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryEqual_1&gt;m__C(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryExclusiveOr_1&gt;m__D(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryExclusiveOr_1&gt;m__D(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryExclusiveOrAssign_1&gt;m__E(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryExclusiveOrAssign_1&gt;m__E(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryGreaterThan_1&gt;m__F(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryGreaterThan_1&gt;m__F(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryGreaterThanOrEqual_1&gt;m__10(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryGreaterThanOrEqual_1&gt;m__10(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryLeftShift_1&gt;m__11(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryLeftShift_1&gt;m__11(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryLeftShiftAssign_1&gt;m__12(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryLeftShiftAssign_1&gt;m__12(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryLessThan_1&gt;m__13(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryLessThan_1&gt;m__13(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryLessThanOrEqual_1&gt;m__14(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryLessThanOrEqual_1&gt;m__14(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryModulo_1&gt;m__15(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryModulo_1&gt;m__15(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryModuloAssign_1&gt;m__16(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryModuloAssign_1&gt;m__16(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryMultiply_1&gt;m__17(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryMultiply_1&gt;m__17(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryMultiplyAssign_1&gt;m__18(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryMultiplyAssign_1&gt;m__18(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryNotEqual_1&gt;m__19(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryNotEqual_1&gt;m__19(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryOr_1&gt;m__1A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryOr_1&gt;m__1A(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryOrAssign_1&gt;m__1B(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryOrAssign_1&gt;m__1B(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryRightShift_1&gt;m__1C(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryRightShift_1&gt;m__1C(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinaryRightShiftAssign_1&gt;m__1D(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinaryRightShiftAssign_1&gt;m__1D(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinarySubtract_1&gt;m__1E(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinarySubtract_1&gt;m__1E(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;BinarySubtractAssign_1&gt;m__1F(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;BinarySubtractAssign_1&gt;m__1F(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="System.Object &lt;Convert_1&gt;m__20(System.Dynamic.ConvertBinder)" attrs="145">\r
+      <method name="System.Object &lt;Convert_1&gt;m__20(System.Object, System.Dynamic.ConvertBinder)" attrs="145">\r
         <size>58</size>\r
       </method>\r
-      <method name="System.Object &lt;Convert_2&gt;m__21(System.Dynamic.ConvertBinder)" attrs="145">\r
+      <method name="System.Object &lt;Convert_2&gt;m__21(System.Object, System.Dynamic.ConvertBinder)" attrs="145">\r
         <size>58</size>\r
       </method>\r
-      <method name="System.Object &lt;Convert_3&gt;m__22(System.Dynamic.ConvertBinder)" attrs="145">\r
+      <method name="System.Object &lt;Convert_3&gt;m__22(System.Object, System.Dynamic.ConvertBinder)" attrs="145">\r
         <size>58</size>\r
       </method>\r
-      <method name="System.Object &lt;Convert_4&gt;m__23(System.Dynamic.ConvertBinder)" attrs="145">\r
+      <method name="System.Object &lt;Convert_4&gt;m__23(System.Object, System.Dynamic.ConvertBinder)" attrs="145">\r
         <size>58</size>\r
       </method>\r
-      <method name="System.Object &lt;Convert_5&gt;m__24(System.Dynamic.ConvertBinder)" attrs="145">\r
+      <method name="System.Object &lt;Convert_5&gt;m__24(System.Object, System.Dynamic.ConvertBinder)" attrs="145">\r
         <size>67</size>\r
       </method>\r
-      <method name="Void &lt;GetIndex_1&gt;m__25(System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;GetIndex_1&gt;m__25(System.Object, System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">\r
         <size>93</size>\r
       </method>\r
-      <method name="Void &lt;GetIndex_2&gt;m__26(System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;GetIndex_2&gt;m__26(System.Object, System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">\r
         <size>112</size>\r
       </method>\r
-      <method name="System.Object &lt;GetMember_1&gt;m__27(System.Dynamic.GetMemberBinder)" attrs="145">\r
+      <method name="System.Object &lt;GetMember_1&gt;m__27(System.Object, System.Dynamic.GetMemberBinder)" attrs="145">\r
         <size>75</size>\r
       </method>\r
-      <method name="Void &lt;Invoke_1&gt;m__28(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;Invoke_1&gt;m__28(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
         <size>102</size>\r
       </method>\r
-      <method name="Void &lt;Invoke_2&gt;m__29(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;Invoke_2&gt;m__29(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;Invoke_4&gt;m__2A(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;Invoke_4&gt;m__2A(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
         <size>128</size>\r
       </method>\r
-      <method name="Void &lt;Invoke_5&gt;m__2B(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;Invoke_5&gt;m__2B(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
         <size>92</size>\r
       </method>\r
-      <method name="Void &lt;Invoke_5&gt;m__2C(System.Object)" attrs="145">\r
+      <method name="Void &lt;Invoke_5&gt;m__2C(System.Object, System.Object)" attrs="145">\r
         <size>94</size>\r
       </method>\r
-      <method name="Void &lt;Invoke_6&gt;m__2D(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;Invoke_6&gt;m__2D(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">\r
         <size>93</size>\r
       </method>\r
-      <method name="Void &lt;InvokeMember_1&gt;m__2E(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;InvokeMember_1&gt;m__2E(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
         <size>111</size>\r
       </method>\r
-      <method name="Void &lt;InvokeMember_3&gt;m__2F(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;InvokeMember_3&gt;m__2F(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
         <size>112</size>\r
       </method>\r
-      <method name="Void &lt;InvokeMember_4&gt;m__30(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;InvokeMember_4&gt;m__30(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
         <size>111</size>\r
       </method>\r
-      <method name="Void &lt;InvokeMember_7&gt;m__31(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;InvokeMember_7&gt;m__31(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
         <size>91</size>\r
       </method>\r
-      <method name="Void &lt;InvokeMember_8&gt;m__32(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
+      <method name="Void &lt;InvokeMember_8&gt;m__32(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">\r
         <size>112</size>\r
       </method>\r
-      <method name="Void &lt;SetIndex_1&gt;m__33(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">\r
+      <method name="Void &lt;SetIndex_1&gt;m__33(System.Object, System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">\r
         <size>125</size>\r
       </method>\r
-      <method name="Void &lt;SetIndex_2&gt;m__34(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">\r
+      <method name="Void &lt;SetIndex_2&gt;m__34(System.Object, System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">\r
         <size>140</size>\r
       </method>\r
-      <method name="Void &lt;SetMember_1&gt;m__35(System.Dynamic.SetMemberBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;SetMember_1&gt;m__35(System.Object, System.Dynamic.SetMemberBinder, System.Object)" attrs="145">\r
         <size>102</size>\r
       </method>\r
-      <method name="Void &lt;SetMember_2&gt;m__36(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;SetMember_2&gt;m__36(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>69</size>\r
       </method>\r
-      <method name="Void &lt;SetMember_2&gt;m__37(System.Dynamic.SetMemberBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;SetMember_2&gt;m__37(System.Object, System.Dynamic.SetMemberBinder, System.Object)" attrs="145">\r
         <size>77</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryPlus_1&gt;m__38(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryPlus_1&gt;m__38(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>55</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryMinus_1&gt;m__39(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryMinus_1&gt;m__39(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>55</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryNot_1&gt;m__3A(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryNot_1&gt;m__3A(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>55</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryOnesComplement_1&gt;m__3B(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryOnesComplement_1&gt;m__3B(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>55</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryDecrement_1&gt;m__3C(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryDecrement_1&gt;m__3C(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>55</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryDecrement_2&gt;m__3D(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryDecrement_2&gt;m__3D(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>59</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryIncrement_1&gt;m__3E(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryIncrement_1&gt;m__3E(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>55</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryIncrement_2&gt;m__3F(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryIncrement_2&gt;m__3F(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>59</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryIsFalse_1&gt;m__40(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryIsFalse_1&gt;m__40(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>60</size>\r
       </method>\r
-      <method name="Void &lt;UnaryIsFalse_1&gt;m__41(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;UnaryIsFalse_1&gt;m__41(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>69</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryIsFalse_2&gt;m__42(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryIsFalse_2&gt;m__42(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>60</size>\r
       </method>\r
-      <method name="Void &lt;UnaryIsFalse_2&gt;m__43(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;UnaryIsFalse_2&gt;m__43(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>69</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryIsFalse_3&gt;m__44(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryIsFalse_3&gt;m__44(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>60</size>\r
       </method>\r
-      <method name="Void &lt;UnaryIsFalse_3&gt;m__45(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;UnaryIsFalse_3&gt;m__45(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>68</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryIsTrue_1&gt;m__46(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryIsTrue_1&gt;m__46(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>60</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryIsTrue_2&gt;m__47(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryIsTrue_2&gt;m__47(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>60</size>\r
       </method>\r
-      <method name="Void &lt;UnaryIsTrue_2&gt;m__48(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;UnaryIsTrue_2&gt;m__48(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>69</size>\r
       </method>\r
-      <method name="System.Object &lt;UnaryIsTrue_3&gt;m__49(System.Dynamic.UnaryOperationBinder)" attrs="145">\r
+      <method name="System.Object &lt;UnaryIsTrue_3&gt;m__49(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">\r
         <size>60</size>\r
       </method>\r
-      <method name="Void &lt;UnaryIsTrue_3&gt;m__4A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
+      <method name="Void &lt;UnaryIsTrue_3&gt;m__4A(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">\r
         <size>74</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__4B(System.Reflection.MethodInfo)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__4B(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
         <size>20</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__4C(System.Reflection.MethodInfo)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__4C(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__4D(System.Reflection.MethodInfo)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__4D(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__4E(Boolean)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__4E(System.Object, Boolean)" attrs="145">\r
         <size>12</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryAddChecked_2&gt;c__AnonStorey0">\r
-      <method name="System.Object &lt;&gt;m__0()" attrs="131">\r
-        <size>98</size>\r
-      </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
-    </type>\r
-    <type name="Tester+&lt;GetIndex_3&gt;c__AnonStorey1">\r
-      <method name="Void &lt;&gt;m__0(System.Dynamic.GetIndexBinder, System.Object[])" attrs="131">\r
-        <size>93</size>\r
-      </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
-    </type>\r
-    <type name="Tester+&lt;InvokeMember_2&gt;c__AnonStorey2">\r
-      <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">\r
-        <size>110</size>\r
-      </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
-    </type>\r
-    <type name="Tester+&lt;InvokeMember_6&gt;c__AnonStorey3">\r
-      <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">\r
-        <size>120</size>\r
-      </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
-    </type>\r
-    <type name="Tester+&lt;SetIndex_3&gt;c__AnonStorey4">\r
-      <method name="Void &lt;&gt;m__0(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="131">\r
-        <size>120</size>\r
-      </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
-    </type>\r
-    <type name="Tester+&lt;SetMember_2&gt;c__AnonStorey5">\r
-      <method name="System.Object &lt;&gt;m__0(System.Dynamic.GetMemberBinder)" attrs="131">\r
-        <size>80</size>\r
-      </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
-    </type>\r
   </test>\r
   <test name="dtest-004.cs">\r
     <type name="G`1[T]">\r
         <size>26</size>\r
       </method>\r
     </type>\r
-    <type name="Tester">\r
-      <method name="Void &lt;SubtractAssignEvent&gt;m__0()" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__4(Boolean)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
-    </type>\r
     <type name="Tester+&lt;AddAssignCheckedTest&gt;c__AnonStorey2">\r
       <method name="Void &lt;&gt;m__0()" attrs="131">\r
         <size>234</size>\r
       <method name="Void IsTest()" attrs="129">\r
         <size>69</size>\r
       </method>\r
+      <method name="Void &lt;SubtractAssignEvent&gt;m__0(System.Object)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__4(System.Object, Boolean)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="dtest-007.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>187</size>\r
       </method>\r
-      <method name="Int32 &lt;IsEvent&gt;m__4()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Tester">\r
-      <method name="Int32 &lt;InvokeTest&gt;m__0(System.String)" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Void &lt;InvokeMember_Error&gt;m__1()" attrs="145">\r
-        <size>112</size>\r
-      </method>\r
-      <method name="Int32 &lt;IsEvent&gt;m__3()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__5(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__6(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__7(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__8(Boolean)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
-    </type>\r
     <type name="Tester+&lt;MemberGetError_Null&gt;c__AnonStorey1">\r
       <method name="Void &lt;&gt;m__0()" attrs="131">\r
         <size>86</size>\r
       </method>\r
     </type>\r
     <type name="Tester">\r
-      <method name="Void &lt;InvokeConstructor&gt;m__2(System.Decimal)" attrs="145">\r
+      <method name="Int32 &lt;InvokeTest&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Void &lt;InvokeMember_Error&gt;m__1(System.Object)" attrs="145">\r
+        <size>112</size>\r
+      </method>\r
+      <method name="Void &lt;InvokeConstructor&gt;m__2(System.Object, System.Decimal)" attrs="145">\r
         <size>2</size>\r
       </method>\r
+      <method name="Int32 &lt;IsEvent&gt;m__3(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;IsEvent&gt;m__4(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__5(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__6(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__7(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__8(System.Object, Boolean)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="dtest-008.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>192</size>\r
       </method>\r
-      <method name="System.Object &lt;Main&gt;m__0(System.Object)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="DynamicAssignments">\r
+      <method name="System.Object &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-018.cs">\r
     <type name="XValue">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>542</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>15</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-025.cs">\r
     <type name="S">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>1101</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>11</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__1()" attrs="145">\r
-        <size>11</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__2(Int32 ByRef)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>11</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__1(System.Object)" attrs="145">\r
+        <size>11</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32 ByRef)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-047.cs">\r
     <type name="C`1[T]">\r
       <method name="Int32 Test(Int32)" attrs="150">\r
         <size>171</size>\r
       </method>\r
-      <method name="Int32 &lt;E&gt;m__0(Int32)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>42</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C`1[T]">\r
+      <method name="Int32 &lt;E&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-048.cs">\r
     <type name="A">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>72</size>\r
       </method>\r
-      <method name="Void &lt;Test`1&gt;m__0[T](T)" attrs="145">\r
-        <size>103</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="C">\r
-      <method name="Void &lt;Test3`1&gt;m__1[T](T)" attrs="145">\r
-        <size>105</size>\r
-      </method>\r
-    </type>\r
     <type name="C+&lt;Test2&gt;c__AnonStorey0`1[T]">\r
       <method name="Void &lt;&gt;m__0()" attrs="131">\r
         <size>46</size>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;Test`1&gt;m__0[T](System.Object, T)" attrs="145">\r
+        <size>103</size>\r
+      </method>\r
+      <method name="Void &lt;Test3`1&gt;m__1[T](System.Object, T)" attrs="145">\r
+        <size>105</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-055.cs">\r
     <type name="B`2[T1,T2]">\r
         <size>253</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>35</size>\r
+        <size>58</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
         <size>10</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Foo get_Foo()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_Foo(Foo)" attrs="2182">\r
+        <size>8</size>\r
+      </method>\r
+      <method name="Int32 Test2(System.Object)" attrs="150">\r
+        <size>175</size>\r
+      </method>\r
+    </type>\r
+    <type name="Foo">\r
+      <method name="Int32 Method(System.String)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-057.cs">\r
     <type name="Program">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>57</size>\r
       </method>\r
-      <method name="System.Object &lt;Main&gt;m__0()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Object &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="dtest-058.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>187</size>\r
       </method>\r
-      <method name="Void &lt;NonInvocable&gt;m__0()" attrs="145">\r
-        <size>86</size>\r
-      </method>\r
-      <method name="Void &lt;Using_1&gt;m__1()" attrs="145">\r
-        <size>92</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void &lt;&gt;m__0()" attrs="131">\r
+        <size>110</size>\r
+      </method>\r
     </type>\r
     <type name="Tester">\r
-      <method name="Void &lt;NullableConversion&gt;m__2()" attrs="145">\r
+      <method name="Void &lt;NonInvocable&gt;m__0(System.Object)" attrs="145">\r
+        <size>86</size>\r
+      </method>\r
+      <method name="Void &lt;Using_1&gt;m__1(System.Object)" attrs="145">\r
+        <size>92</size>\r
+      </method>\r
+      <method name="Void &lt;NullableConversion&gt;m__2(System.Object)" attrs="145">\r
         <size>106</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(System.Reflection.MethodInfo)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
         <size>20</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__4(System.Reflection.MethodInfo)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__4(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__5(System.Reflection.MethodInfo)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__5(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__6(Boolean)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__6(System.Object, Boolean)" attrs="145">\r
         <size>12</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;Unsafe_1&gt;c__AnonStorey0">\r
-      <method name="Void &lt;&gt;m__0()" attrs="131">\r
-        <size>110</size>\r
-      </method>\r
-    </type>\r
   </test>\r
   <test name="dtest-error-02.cs">\r
     <type name="A">\r
       <method name="Void Main()" attrs="150">\r
         <size>84</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(Double)" attrs="145">\r
-        <size>25</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, Double)" attrs="145">\r
+        <size>25</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-062.cs">\r
     <type name="X">\r
       <method name="Void Main()" attrs="150">\r
         <size>43</size>\r
       </method>\r
-      <method name="Double &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>21</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="Double &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>21</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-114.cs">\r
     <type name="NaturalComparer`1[T]">\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>472</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(Double)" attrs="145">\r
-        <size>25</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>15</size>\r
       </method>\r
     </type>\r
+    <type name="MyTest">\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, Double)" attrs="145">\r
+        <size>25</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-116.cs">\r
     <type name="Slow.Test">\r
       <method name="T`1[System.Int64] N()" attrs="150">\r
         <size>38</size>\r
       </method>\r
-      <method name="Int32 &lt;M`1&gt;m__0[X](X)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;N&gt;m__1(Int64)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="B">\r
+      <method name="Int32 &lt;M`1&gt;m__0[X](System.Object, X)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;N&gt;m__1(System.Object, Int64)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-155.cs">\r
     <type name="MyClass`1[T]">\r
       <method name="Void Main()" attrs="150">\r
         <size>74</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="U apply[T,U](T, Mapping`2)" attrs="145">\r
         <size>16</size>\r
       </method>\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>22</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-162.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>69</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__0(System.String)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-185.cs">\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>70</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-281.cs">\r
     <type name="List">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>14</size>\r
       </method>\r
-      <method name="Void &lt;a&gt;m__0(Int32)" attrs="145">\r
-        <size>8</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .cctor()" attrs="6289">\r
-        <size>46</size>\r
+        <size>29</size>\r
       </method>\r
     </type>\r
     <type name="TestFunc`1[T]">\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="TestClass">\r
+      <method name="Void &lt;a&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>8</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-299.cs">\r
     <type name="N.A">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>189</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__1()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Thing">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__1(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-362.cs">\r
     <type name="C">\r
         <size>2</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>245</size>\r
+        <size>208</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Boolean &lt;GetMethodGroup&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Boolean &lt;GetMethodGroup&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-395.cs">\r
     <type name="RuleBuilder`1[T]">\r
       </method>\r
     </type>\r
     <type name="C`2[A,B]">\r
-      <method name="B &lt;C&gt;m__0(B)" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor(IEnumerable`1)" attrs="6278">\r
         <size>47</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C`2[A,B]">\r
+      <method name="B &lt;C&gt;m__0(System.Object, B)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-407.cs">\r
     <type name="MyColor">\r
       <method name="Int32 Foo(System.Func`1[System.Int32])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Test_12&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void Test_13(System.Object)" attrs="129">\r
         <size>53</size>\r
       </method>\r
       <method name="Boolean Test(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
+      <method name="Void Test_17()" attrs="129">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
+    <type name="ConditionalParsing+MyTestStruct">\r
+      <method name="Void Dispose()" attrs="486">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="MyTestStruct op_Implicit(Int32)" attrs="2198">\r
+        <size>18</size>\r
+      </method>\r
+    </type>\r
+    <type name="ConditionalParsing">\r
+      <method name="Int32 &lt;Test_12&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-410.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>132</size>\r
       </method>\r
-      <method name="Maybe`1[System.String] &lt;Main&gt;m__0(System.String)" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Maybe`1[System.String] &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="Maybe`1[System.String] &lt;Main&gt;m__1(System.String)" attrs="145">\r
+      <method name="Maybe`1[System.String] &lt;Main&gt;m__1(System.Object, System.String)" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="Maybe`1[System.String] &lt;Main&gt;m__2(System.String)" attrs="145">\r
+      <method name="Maybe`1[System.String] &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">\r
         <size>18</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-412.cs">\r
   <test name="gtest-433.cs">\r
     <type name="M">\r
       <method name="Void Main()" attrs="150">\r
-        <size>38</size>\r
+        <size>42</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
         <size>28</size>\r
       </method>\r
       <method name="Void ThisWorksFine()" attrs="150">\r
-        <size>39</size>\r
+        <size>41</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
     </type>\r
     <type name="M">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>53</size>\r
+        <size>90</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
+    </type>\r
+    <type name="D`1[U]">\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Combinator">\r
-      <method name="System.Tuple`2[System.Int32,System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-    </type>\r
     <type name="Parser`2[D1,DR1]">\r
       <method name="System.IAsyncResult BeginInvoke(D1, System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Combinator">\r
+      <method name="System.Tuple`2[System.Int32,System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-594.cs">\r
     <type name="C">\r
       </method>\r
     </type>\r
   </test>\r
-  <test name="gtest-anontype-01.cs">\r
-    <type name="Test">\r
+  <test name="gtest-614.cs">\r
+    <type name="S">\r
+      <method name="System.Nullable`1[System.Int32] op_Explicit(System.Nullable`1[S])" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Int32 op_Implicit(System.Nullable`1[S])" attrs="2198">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>71</size>\r
+        <size>100</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="&lt;&gt;__AnonType0`2[&lt;Foo&gt;__T,&lt;Baz&gt;__T]">\r
-      <method name="&lt;Foo&gt;__T get_Foo()" attrs="2182">\r
+  </test>\r
+  <test name="gtest-615.cs">\r
+    <type name="X">\r
+      <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
-      <method name="&lt;Baz&gt;__T get_Baz()" attrs="2182">\r
+    </type>\r
+    <type name="X+N`1[T]">\r
+      <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
-      <method name="Boolean Equals(System.Object)" attrs="198">\r
-        <size>69</size>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>8</size>\r
       </method>\r
-      <method name="Int32 GetHashCode()" attrs="198">\r
-        <size>86</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="System.String ToString()" attrs="198">\r
-        <size>142</size>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-616.cs">\r
+    <type name="S">\r
+      <method name="Void Dispose()" attrs="486">\r
+        <size>2</size>\r
       </method>\r
-      <method name="Void .ctor(&lt;Foo&gt;__T, &lt;Baz&gt;__T)" attrs="6278">\r
-        <size>21</size>\r
+    </type>\r
+    <type name="A`1[T]">\r
+      <method name="Boolean Test[U](U)" attrs="454">\r
+        <size>38</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
-  </test>\r
-  <test name="gtest-anontype-02.cs">\r
-    <type name="Test">\r
-      <method name="System.Object TestA(System.String)" attrs="145">\r
-        <size>15</size>\r
+    <type name="B">\r
+      <method name="Boolean Test[U](U)" attrs="198">\r
+        <size>27</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>122</size>\r
+        <size>43</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="&lt;&gt;__AnonType0`1[&lt;s&gt;__T]">\r
-      <method name="&lt;s&gt;__T get_s()" attrs="2182">\r
+  </test>\r
+  <test name="gtest-617.cs">\r
+    <type name="Program">\r
+      <method name="Void Main()" attrs="145">\r
+        <size>57</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
-      <method name="Boolean Equals(System.Object)" attrs="198">\r
-        <size>39</size>\r
+    </type>\r
+    <type name="A">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.String] GetEnumerator()" attrs="134">\r
+        <size>37</size>\r
       </method>\r
-      <method name="Int32 GetHashCode()" attrs="198">\r
-        <size>63</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="System.String ToString()" attrs="198">\r
-        <size>67</size>\r
+    </type>\r
+    <type name="B">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] GetEnumerator(Int32[])" attrs="134">\r
+        <size>7</size>\r
       </method>\r
-      <method name="Void .ctor(&lt;s&gt;__T)" attrs="6278">\r
-        <size>14</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="&lt;&gt;__AnonType1`2[&lt;Foo&gt;__T,&lt;Baz&gt;__T]">\r
-      <method name="&lt;Foo&gt;__T get_Foo()" attrs="2182">\r
+  </test>\r
+  <test name="gtest-618.cs">\r
+    <type name="S1">\r
+      <method name="Int32 op_Implicit(System.Nullable`1[S1])" attrs="2198">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="S2">\r
+      <method name="System.Nullable`1[System.Int32] op_Implicit(System.Nullable`1[S2])" attrs="2198">\r
+        <size>18</size>\r
+      </method>\r
+    </type>\r
+    <type name="S3">\r
+      <method name="System.Nullable`1[System.Int32] op_Implicit(System.Nullable`1[S3])" attrs="2198">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+    <type name="S4">\r
+      <method name="System.Nullable`1[System.Int32] op_Implicit(S4)" attrs="2198">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>267</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
-      <method name="&lt;Baz&gt;__T get_Baz()" attrs="2182">\r
+    </type>\r
+  </test>\r
+  <test name="gtest-619.cs">\r
+    <type name="S+P">\r
+      <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
-      <method name="Boolean Equals(System.Object)" attrs="198">\r
-        <size>69</size>\r
+    </type>\r
+    <type name="S+C">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="Int32 GetHashCode()" attrs="198">\r
-        <size>86</size>\r
+    </type>\r
+    <type name="M">\r
+      <method name="Void Test[T](I`1[T])" attrs="145">\r
+        <size>2</size>\r
       </method>\r
-      <method name="System.String ToString()" attrs="198">\r
-        <size>142</size>\r
+      <method name="Void Test[T](IB`1[T])" attrs="145">\r
+        <size>2</size>\r
       </method>\r
-      <method name="Void .ctor(&lt;Foo&gt;__T, &lt;Baz&gt;__T)" attrs="6278">\r
-        <size>21</size>\r
+      <method name="Void Main()" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
   </test>\r
-  <test name="gtest-anontype-03.cs">\r
-    <type name="MyClass">\r
-      <method name="Int32 get_Baz()" attrs="2182">\r
-        <size>11</size>\r
+  <test name="gtest-620.cs">\r
+    <type name="A`1[T]">\r
+      <method name="T M[U](U)" attrs="454">\r
+        <size>20</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
-        <size>18</size>\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="B`1[W]">\r
+      <method name="I`1[W] M[U](U)" attrs="198">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Bug">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
+  </test>\r
+  <test name="gtest-anontype-01.cs">\r
     <type name="Test">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>82</size>\r
+        <size>71</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="&lt;&gt;__AnonType0`2[&lt;Foo&gt;__T,&lt;Baz&gt;__T]">\r
+      <method name="&lt;Foo&gt;__T get_Foo()" attrs="2182">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="&lt;Baz&gt;__T get_Baz()" attrs="2182">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean Equals(System.Object)" attrs="198">\r
+        <size>69</size>\r
+      </method>\r
+      <method name="Int32 GetHashCode()" attrs="198">\r
+        <size>86</size>\r
+      </method>\r
+      <method name="System.String ToString()" attrs="198">\r
+        <size>142</size>\r
+      </method>\r
+      <method name="Void .ctor(&lt;Foo&gt;__T, &lt;Baz&gt;__T)" attrs="6278">\r
+        <size>21</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-anontype-02.cs">\r
+    <type name="Test">\r
+      <method name="System.Object TestA(System.String)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>122</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="&lt;&gt;__AnonType0`1[&lt;s&gt;__T]">\r
+      <method name="&lt;s&gt;__T get_s()" attrs="2182">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean Equals(System.Object)" attrs="198">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Int32 GetHashCode()" attrs="198">\r
+        <size>63</size>\r
+      </method>\r
+      <method name="System.String ToString()" attrs="198">\r
+        <size>67</size>\r
+      </method>\r
+      <method name="Void .ctor(&lt;s&gt;__T)" attrs="6278">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
+    <type name="&lt;&gt;__AnonType1`2[&lt;Foo&gt;__T,&lt;Baz&gt;__T]">\r
+      <method name="&lt;Foo&gt;__T get_Foo()" attrs="2182">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="&lt;Baz&gt;__T get_Baz()" attrs="2182">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean Equals(System.Object)" attrs="198">\r
+        <size>69</size>\r
+      </method>\r
+      <method name="Int32 GetHashCode()" attrs="198">\r
+        <size>86</size>\r
+      </method>\r
+      <method name="System.String ToString()" attrs="198">\r
+        <size>142</size>\r
+      </method>\r
+      <method name="Void .ctor(&lt;Foo&gt;__T, &lt;Baz&gt;__T)" attrs="6278">\r
+        <size>21</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-anontype-03.cs">\r
+    <type name="MyClass">\r
+      <method name="Int32 get_Baz()" attrs="2182">\r
+        <size>11</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>18</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>82</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
         <size>52</size>\r
       </method>\r
+      <method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
+        <size>14</size>\r
+      </method>\r
     </type>\r
     <type name="Test">\r
-      <method name="Boolean &lt;Main&gt;m__0(&lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">\r
         <size>21</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">\r
         <size>15</size>\r
       </method>\r
     </type>\r
-    <type name="Test+&lt;Select&gt;c__Iterator0`1[T]">\r
-      <method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
-        <size>14</size>\r
-      </method>\r
-    </type>\r
   </test>\r
   <test name="gtest-autoproperty-01.cs">\r
     <type name="Test">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="gtest-autoproperty-09.cs">\r
+    <type name="S">\r
+      <method name="Int32 get_P()" attrs="2198">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>192</size>\r
+      </method>\r
+      <method name="Void .cctor()" attrs="6289">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="System.Decimal get_P()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>27</size>\r
+      </method>\r
+    </type>\r
+    <type name="S2">\r
+      <method name="Int32 get_P()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void .ctor(Object)" attrs="6278">\r
+        <size>16</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Int32 get_P2()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_P2(Int32)" attrs="2182">\r
+        <size>8</size>\r
+      </method>\r
+    </type>\r
+    <type name="S2">\r
+      <method name="Int32 get_P2()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_P2(Int32)" attrs="2182">\r
+        <size>8</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="gtest-collectioninit-01.cs">\r
     <type name="Test">\r
       <method name="Void TestList(System.Collections.Generic.List`1[System.Int32], Int32)" attrs="145">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="gtest-collectioninit-04.cs">\r
+    <type name="X">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Void .cctor()" attrs="6289">\r
+        <size>69</size>\r
+      </method>\r
+      <method name="System.String &lt;Test&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="System.String &lt;Test&gt;m__1(System.Object, System.String)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="gtest-etree-01.cs">\r
     <type name="InverseLogicalOperator">\r
       <method name="Boolean op_True(InverseLogicalOperator)" attrs="2198">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>187</size>\r
       </method>\r
-      <method name="Void &lt;EqualTestDelegate_2&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;EqualTestDelegate_2&gt;m__1()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;EqualTestDelegate_2&gt;m__2()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;EqualTestDelegate_2&gt;m__3()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;EqualTestDelegate_2&gt;m__4()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="System.String &lt;InvokeTest_2&gt;m__5(Int32)" attrs="145">\r
-        <size>25</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__6(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__7(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__8(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__9(Boolean)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Tester">\r
+      <method name="Void EqualTest_16()" attrs="129">\r
+        <size>185</size>\r
+      </method>\r
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__1(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__2(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__3(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;EqualTestDelegate_2&gt;m__4(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="System.String &lt;InvokeTest_2&gt;m__5(System.Object, Int32)" attrs="145">\r
+        <size>25</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__6(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__7(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__8(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__9(System.Object, Boolean)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-etree-02.cs">\r
     <type name="M">\r
         <size>33</size>\r
       </method>\r
       <method name="T Value[T]()" attrs="145">\r
-        <size>84</size>\r
+        <size>86</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="System.Object &lt;CreateDependent_DependentsNull&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="NotifyingPropertyTest">\r
+      <method name="System.Object &lt;CreateDependent_DependentsNull&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-etree-25.cs">\r
     <type name="Foo">\r
       <method name="Void Test[U](U)" attrs="150">\r
         <size>25</size>\r
       </method>\r
-      <method name="Boolean &lt;Test`1&gt;m__0[U](System.String)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
     </type>\r
     <type name="A">\r
       <method name="Void Main()" attrs="150">\r
       <method name="Void Method[T](System.Collections.Generic.IEnumerable`1[T], System.Func`2[T,System.Boolean])" attrs="145">\r
         <size>2</size>\r
       </method>\r
+      <method name="Boolean &lt;Test`1&gt;m__0[U](System.Object, System.String)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-exmethod-42.cs">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="gtest-initialize-13.cs">\r
+    <type name="EventInitializerTest">\r
+      <method name="Void add_a(System.Action)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void remove_a(System.Action)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void add_b(System.Action)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void remove_b(System.Action)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void add_c(System.Action)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void remove_c(System.Action)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void Main()" attrs="150">\r
+        <size>68</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="gtest-iter-01.cs">\r
     <type name="C">\r
       <method name="Void Main()" attrs="150">\r
         <size>44</size>\r
       </method>\r
     </type>\r
-    <type name="Mono.Rocks.Test">\r
-      <method name="System.Nullable`1[System.Collections.Generic.KeyValuePair`2[System.Int32,System.Int32]] &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>37</size>\r
-      </method>\r
-    </type>\r
     <type name="Mono.Rocks.Sequence+&lt;CreateUnfoldrIterator&gt;c__Iterator0`2[TSource,TResult]">\r
       <method name="System.Collections.Generic.IEnumerator`1[TResult] System.Collections.Generic.IEnumerable&lt;TResult&gt;.GetEnumerator()" attrs="481">\r
         <size>52</size>\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="Mono.Rocks.Test">\r
+      <method name="System.Nullable`1[System.Collections.Generic.KeyValuePair`2[System.Int32,System.Int32]] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-07.cs">\r
     <type name="Test">\r
       <method name="Void Reset()" attrs="486">\r
         <size>6</size>\r
       </method>\r
-      <method name="Void &lt;&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-iter-28.cs">\r
       <method name="System.Collections.Generic.IEnumerable`1[System.Int32] FromTo(Int32, Int32)" attrs="150">\r
         <size>37</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="MyTest">\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-01.cs">\r
     <type name="IntFunc">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>328</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>11</size>\r
-      </method>\r
       <method name="Void .ctor(Int32)" attrs="6273">\r
         <size>14</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
-    </type>\r
-    <type name="X">\r
-      <method name="Void &lt;Main&gt;m__2(Int32)" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-    </type>\r
-    <type name="X+&lt;Main&gt;c__AnonStorey0">\r
       <method name="Void &lt;&gt;m__0(Int32)" attrs="131">\r
         <size>9</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>11</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-02.cs">\r
     <type name="funcs">\r
       <method name="Void Main()" attrs="150">\r
         <size>36</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">\r
-        <size>19</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>19</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-03.cs">\r
     <type name="Func`2[TArg0,TResult]">\r
       </method>\r
     </type>\r
     <type name="Demo">\r
-      <method name="System.TimeSpan &lt;Main&gt;m__0(System.String)" attrs="145">\r
+      <method name="System.TimeSpan &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
         <size>14</size>\r
       </method>\r
     </type>\r
       </method>\r
     </type>\r
     <type name="Demo">\r
-      <method name="System.TimeSpan &lt;Main&gt;m__0(System.String)" attrs="145">\r
+      <method name="System.TimeSpan &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="Double &lt;Main&gt;m__1(System.TimeSpan)" attrs="145">\r
+      <method name="Double &lt;Main&gt;m__1(System.Object, System.TimeSpan)" attrs="145">\r
         <size>15</size>\r
       </method>\r
     </type>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>147</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">\r
-        <size>38</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>38</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>38</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>38</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-06.cs">\r
     <type name="TestClass">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>44</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(F)" attrs="145">\r
-        <size>31</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="TestClass">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, F)" attrs="145">\r
+        <size>31</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-07.cs">\r
     <type name="D">\r
       <method name="Void Main()" attrs="150">\r
         <size>208</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__1()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__2()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__3()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__4()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__5(Boolean)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__1(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__2(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__3(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__4(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__5(System.Object, Boolean)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-08.cs">\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>344</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
         <size>12</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__1(Int32)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
         <size>12</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
         <size>11</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(Int32)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">\r
         <size>12</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__4(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__4(System.Object, Int32)" attrs="145">\r
         <size>11</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__5(Int32)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__5(System.Object, Int32)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__6(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__6(System.Object, Int32)" attrs="145">\r
         <size>12</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-09.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>114</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0()" attrs="145">\r
-        <size>13</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__1()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__2(System.String)" attrs="145">\r
-        <size>13</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__1(System.Object)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-10.cs">\r
     <type name="C">\r
       <method name="Void Bar()" attrs="145">\r
         <size>36</size>\r
       </method>\r
-      <method name="Void &lt;Bar&gt;m__0(Int32)" attrs="145">\r
-        <size>6</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
-      <method name="System.String &lt;Bar&gt;m__0(System.String)" attrs="145">\r
+    </type>\r
+    <type name="TestUnary">\r
+      <method name="Void &lt;Bar&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>6</size>\r
+      </method>\r
+    </type>\r
+    <type name="Program">\r
+      <method name="System.String &lt;Bar&gt;m__0(System.Object, System.String)" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__1(System.String)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__1(System.Object, System.String)" attrs="145">\r
         <size>9</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__2(System.String)" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">\r
         <size>7</size>\r
       </method>\r
     </type>\r
       <method name="Void Foo[T]()" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="T &lt;Foo`1&gt;m__0[T](T)" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="T &lt;Foo`1&gt;m__0[T](System.Object, T)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-15.cs">\r
       </method>\r
     </type>\r
     <type name="Repro">\r
-      <method name="Int32 &lt;Main&gt;m__0(System.String)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
         <size>14</size>\r
       </method>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-20.cs">\r
     <type name="Z">\r
-      <method name="Void &lt;Z&gt;m__0()" attrs="145">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>38</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Z">\r
+      <method name="Void &lt;Z&gt;m__0(System.Object)" attrs="145">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-21.cs">\r
     <type name="Program">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>108</size>\r
       </method>\r
-      <method name="System.String &lt;Bar&gt;m__0(System.String)" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="System.String &lt;Bar&gt;m__0(System.Object, System.String)" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__1(System.String)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__1(System.Object, System.String)" attrs="145">\r
         <size>9</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__2(System.String)" attrs="145">\r
-        <size>7</size>\r
-      </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
+      <method name="Void &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">\r
         <size>7</size>\r
       </method>\r
     </type>\r
       <method name="Void Main()" attrs="150">\r
         <size>137</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Product)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Product &lt;Main&gt;m__1(Product)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Boolean &lt;&gt;m__0(Product)" attrs="131">\r
+        <size>60</size>\r
+      </method>\r
     </type>\r
     <type name="MainClass">\r
-      <method name="&lt;&gt;__AnonType0`2[System.Linq.IGrouping`2[System.Int32,Product],System.Collections.Generic.IEnumerable`1[Product]] &lt;Main&gt;m__2(System.Linq.IGrouping`2[System.Int32,Product])" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Product)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Product &lt;Main&gt;m__1(System.Object, Product)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType0`2[System.Linq.IGrouping`2[System.Int32,Product],System.Collections.Generic.IEnumerable`1[Product]] &lt;Main&gt;m__2(System.Object, System.Linq.IGrouping`2[System.Int32,Product])" attrs="145">\r
         <size>56</size>\r
       </method>\r
     </type>\r
     <type name="MainClass+&lt;Main&gt;c__AnonStorey0">\r
-      <method name="Boolean &lt;&gt;m__0(Product)" attrs="131">\r
-        <size>60</size>\r
-      </method>\r
-      <method name="System.Decimal &lt;&gt;m__1(Product)" attrs="145">\r
+      <method name="System.Decimal &lt;&gt;m__1(System.Object, Product)" attrs="145">\r
         <size>14</size>\r
       </method>\r
     </type>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>90</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-24.cs">\r
       <method name="Void &lt;&gt;m__1(System.String)" attrs="131">\r
         <size>47</size>\r
       </method>\r
-      <method name="System.String &lt;&gt;m__2()" attrs="145">\r
-        <size>13</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.String &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-25.cs">\r
       </method>\r
     </type>\r
     <type name="MonoBugs.Program">\r
-      <method name="Void &lt;Main&gt;m__0(MonoBugs.Foo`1[System.Int32])" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, MonoBugs.Foo`1[System.Int32])" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
       <method name="Void Execute(System.Action)" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-27.cs">\r
       <method name="IA`1[T][] Test2[T](System.Func`2[IB,IA`1[T][]])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="System.String[] &lt;Main&gt;m__0(IB)" attrs="145">\r
-        <size>14</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="IA`1[System.String][] &lt;Main&gt;m__1(IB)" attrs="145">\r
+      <method name="System.String[] &lt;Main&gt;m__0(System.Object, IB)" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
+      <method name="IA`1[System.String][] &lt;Main&gt;m__1(System.Object, IB)" attrs="145">\r
+        <size>14</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>53</size>\r
       </method>\r
-      <method name="G`1[System.Int32][] &lt;Main&gt;m__0(G`1[System.Int32][])" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="G`1[System.Int32][] &lt;Main&gt;m__0(System.Object, G`1[System.Int32][])" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-29.cs">\r
       <method name="Void M3[T](System.Action`1[C`1[T[]][]])" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__1(C`1[System.Int16][])" attrs="145">\r
-        <size>2</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__2(C`1[System.Int16[]][])" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, Int32[][])" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
+      <method name="Void &lt;Main&gt;m__1(System.Object, C`1[System.Int16][])" attrs="145">\r
+        <size>2</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(Int32[][])" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__2(System.Object, C`1[System.Int16[]][])" attrs="145">\r
         <size>2</size>\r
       </method>\r
     </type>\r
       <method name="Void Main()" attrs="150">\r
         <size>38</size>\r
       </method>\r
-      <method name="System.Func`2[T,System.Object] &lt;Method`1&gt;m__0[T](System.Object)" attrs="145">\r
-        <size>33</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.Func`2[T,System.Object] &lt;Method`1&gt;m__0[T](System.Object, System.Object)" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-31.cs">\r
     <type name="Test">\r
       <method name="Void Main()" attrs="145">\r
         <size>34</size>\r
       </method>\r
-      <method name="Byte &lt;Main&gt;m__0()" attrs="145">\r
-        <size>13</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Byte &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-33.cs">\r
       </method>\r
     </type>\r
   </test>\r
-  <test name="gtest-linq-01.cs">\r
-    <type name="from.C">\r
-      <method name="Void Main()" attrs="150">\r
-        <size>2181</size>\r
-      </method>\r
-      <method name="Void Foo(Int32, Boolean)" attrs="129">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="Void Do(System.String[])" attrs="129">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__3(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__7(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__8(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__9(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__A(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__B(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__C(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__D(Int32)" attrs="145">\r
+  <test name="gtest-lambda-35.cs">\r
+    <type name="C">\r
+      <method name="Int32 Foo(System.Func`1[System.Int16])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1A(Int32)" attrs="145">\r
+      <method name="Int32 Foo(System.Func`1[System.Int32])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1D(Int32)" attrs="145">\r
-        <size>10</size>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>161</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__20(Int32)" attrs="145">\r
-        <size>10</size>\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__21(Int32)" attrs="145">\r
-        <size>10</size>\r
+      <method name="Int16 &lt;Main&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__22(Int32)" attrs="145">\r
-        <size>10</size>\r
+      <method name="Int16 &lt;Main&gt;m__2(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__2A(Int32)" attrs="145">\r
-        <size>10</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__2F(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
-        <size>10</size>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-linq-01.cs">\r
+    <type name="from.C">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>2181</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__32(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
-        <size>10</size>\r
+      <method name="Void Foo(Int32, Boolean)" attrs="129">\r
+        <size>16</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__33(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
-        <size>15</size>\r
+      <method name="Void Do(System.String[])" attrs="129">\r
+        <size>17</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="from.C">\r
-      <method name="System.Nullable`1[System.Boolean] &lt;Main&gt;m__2(System.Nullable`1[System.Boolean])" attrs="145">\r
-        <size>10</size>\r
+    <type name="from.C+&lt;Main&gt;c__AnonStorey0">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0(Int32)" attrs="131">\r
+        <size>15</size>\r
       </method>\r
-      <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">\r
-        <size>16</size>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__1(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
+        <size>15</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__4(Int32, Int32)" attrs="145">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__3(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;&gt;m__4(Int32)" attrs="131">\r
+        <size>55</size>\r
+      </method>\r
+    </type>\r
+    <type name="from.C">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__5(Int32)" attrs="145">\r
-        <size>18</size>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__6(Int32)" attrs="145">\r
+      <method name="System.Nullable`1[System.Boolean] &lt;Main&gt;m__2(System.Object, System.Nullable`1[System.Boolean])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__10(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__13(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__4(System.Object, Int32, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__16(&lt;&gt;__AnonType0`2[System.Int32,from.ITest])" attrs="145">\r
-        <size>15</size>\r
+      <method name="Boolean &lt;Main&gt;m__5(System.Object, Int32)" attrs="145">\r
+        <size>18</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__19(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__6(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1B(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__7(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1C(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__8(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1E(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__9(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1F(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__A(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <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">\r
+      <method name="Int32 &lt;Main&gt;m__B(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__24(Int32)" attrs="145">\r
-        <size>18</size>\r
+      <method name="Int32 &lt;Main&gt;m__C(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__D(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__25(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__E(System.Object, from.ITest)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__26(Int32)" attrs="145">\r
-        <size>18</size>\r
+      <method name="Int32 &lt;Main&gt;m__F(System.Object, Int32, from.ITest)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-      <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">\r
-        <size>23</size>\r
+      <method name="Int32 &lt;Main&gt;m__10(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__28(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
-        <size>20</size>\r
+      <method name="Int32 &lt;Main&gt;m__11(System.Object, from.ITest)" attrs="145">\r
+        <size>15</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__29(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__12(System.Object, Int32, from.ITest)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <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">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__2C(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__13(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__2D(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__14(System.Object, from.ITest)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <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">\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,from.ITest] &lt;Main&gt;m__15(System.Object, Int32, from.ITest)" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__30(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__16(System.Object, &lt;&gt;__AnonType0`2[System.Int32,from.ITest])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__17(System.Object, from.ITest)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__18(System.Object, &lt;&gt;__AnonType0`2[System.Int32,from.ITest], from.ITest)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <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">\r
+      <method name="Int32 &lt;Main&gt;m__19(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__35(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__1A(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__36(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__1B(System.Object, Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__37(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__1C(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <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">\r
-        <size>17</size>\r
+      <method name="Int32 &lt;Main&gt;m__1D(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-      <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">\r
+      <method name="Int32 &lt;Main&gt;m__1E(System.Object, Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-    </type>\r
-    <type name="from.C+&lt;Main&gt;c__AnonStorey0">\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0(Int32)" attrs="131">\r
-        <size>15</size>\r
+      <method name="Int32 &lt;Main&gt;m__1F(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__1(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
-        <size>15</size>\r
+      <method name="Int32 &lt;Main&gt;m__20(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
-        <size>15</size>\r
+      <method name="Int32 &lt;Main&gt;m__21(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__3(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
+      <method name="Int32 &lt;Main&gt;m__22(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__23(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__24(System.Object, Int32)" attrs="145">\r
+        <size>18</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__25(System.Object, &lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;&gt;m__4(Int32)" attrs="131">\r
-        <size>55</size>\r
+      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__26(System.Object, Int32)" attrs="145">\r
+        <size>18</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__5(Int32)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__27(System.Object, &lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__28(System.Object, &lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__29(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-    </type>\r
-    <type name="from.C">\r
-      <method name="Int32 &lt;Main&gt;m__E(from.ITest)" attrs="145">\r
-        <size>15</size>\r
+      <method name="Int32 &lt;Main&gt;m__2A(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2B(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">\r
+        <size>16</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__F(Int32, from.ITest)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__2C(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__11(from.ITest)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__2D(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__12(Int32, from.ITest)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2E(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__2F(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__14(from.ITest)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__30(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,from.ITest] &lt;Main&gt;m__15(Int32, from.ITest)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__31(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__17(from.ITest)" attrs="145">\r
-        <size>15</size>\r
+      <method name="Int32 &lt;Main&gt;m__32(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__18(&lt;&gt;__AnonType0`2[System.Int32,from.ITest], from.ITest)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__33(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
         <size>15</size>\r
       </method>\r
+      <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__34(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__35(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__36(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__37(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <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(System.Object, &lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]])" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__39(System.Object, &lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="from.C+&lt;Main&gt;c__AnonStorey0">\r
+      <method name="Int32 &lt;&gt;m__5(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-02.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>528</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
         <size>11</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__3(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">\r
         <size>11</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-03.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>197</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__0(Int32)" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__1(Int32)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
         <size>12</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-04.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>589</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
         <size>12</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
         <size>12</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__3(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-05.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>1354</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__3(Int32)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__4(System.String)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__5(System.String)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="OrderByTests">\r
-      <method name="Int32 &lt;Main&gt;m__6(Data)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__4(System.Object, System.String)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__5(System.Object, System.String)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__6(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__7(Data)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__7(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__8(Data)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__8(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__9(Data)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__9(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__A(Data)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__A(System.Object, Data)" attrs="145">\r
         <size>19</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__B(Data)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__B(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__C(Data)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__C(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__D(Data)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__D(System.Object, Data)" attrs="145">\r
         <size>19</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__E(Data)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__E(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__F(Data)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__F(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Data &lt;Main&gt;m__10(Data)" attrs="145">\r
+      <method name="Data &lt;Main&gt;m__10(System.Object, Data)" attrs="145">\r
         <size>10</size>\r
       </method>\r
     </type>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>423</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>18</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__2(Int32)" attrs="145">\r
-        <size>18</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">\r
-        <size>23</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__4(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
-        <size>26</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__5(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>21</size>\r
       </method>\r
     </type>\r
+    <type name="Let">\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>18</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
+        <size>18</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__4(System.Object, &lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+        <size>26</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__5(System.Object, &lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-07.cs">\r
     <type name="SelectMany">\r
       <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__3(Int32)" attrs="131">\r
         <size>15</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__1(Int32)" attrs="131">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.String])" attrs="131">\r
+        <size>20</size>\r
+      </method>\r
     </type>\r
     <type name="SelectMany">\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__0(Int32, System.String)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__0(System.Object, Int32, System.String)" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__1(Int32)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__2(Int32, System.String)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__2(System.Object, Int32, System.String)" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <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">\r
+      <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32] &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.String], Int32)" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__4(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__4(System.Object, &lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <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">\r
+      <method name="&lt;&gt;__AnonType2`3[System.Int32,System.Int32,System.Int32] &lt;Main&gt;m__5(System.Object, &lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">\r
         <size>33</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__6(Int32, System.String)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__6(System.Object, Int32, System.String)" attrs="145">\r
         <size>16</size>\r
       </method>\r
     </type>\r
-    <type name="SelectMany+&lt;Main&gt;c__AnonStorey0">\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__1(Int32)" attrs="131">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.String])" attrs="131">\r
-        <size>20</size>\r
-      </method>\r
-    </type>\r
   </test>\r
   <test name="gtest-linq-08.cs">\r
     <type name="TestA">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>171</size>\r
       </method>\r
-      <method name="TestA &lt;Main&gt;m__0(TestA)" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="TestA &lt;Main&gt;m__0(System.Object, TestA)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__1(TestA)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__1(System.Object, TestA)" attrs="145">\r
         <size>25</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-09.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>981</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Data)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Data)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__2(Data, Data)" attrs="145">\r
-        <size>31</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__3(Data)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__4(Data)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__5(Data, Data)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__6(&lt;&gt;__AnonType1`2[Data,Data])" attrs="145">\r
-        <size>30</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__7(&lt;&gt;__AnonType1`2[Data,Data])" attrs="145">\r
-        <size>41</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__8(Data)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__9(Data)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__A(Data, Data)" attrs="145">\r
-        <size>31</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__B(Data)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__C(Data)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__D(Data, Data)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__E(&lt;&gt;__AnonType1`2[Data,Data])" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="Data &lt;Main&gt;m__F(&lt;&gt;__AnonType1`2[Data,Data])" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>21</size>\r
       </method>\r
     </type>\r
-  </test>\r
-  <test name="gtest-linq-10.cs">\r
-    <type name="DataA">\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
+    <type name="Join">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Data)" attrs="145">\r
+        <size>15</size>\r
       </method>\r
-    </type>\r
-    <type name="DataB">\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Data)" attrs="145">\r
+        <size>15</size>\r
       </method>\r
-    </type>\r
-    <type name="GroupJoin">\r
-      <method name="Int32 Main()" attrs="150">\r
-        <size>781</size>\r
+      <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__2(System.Object, Data, Data)" attrs="145">\r
+        <size>31</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(DataA)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__3(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(DataB)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__4(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__4(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">\r
-        <size>47</size>\r
+      <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__5(System.Object, Data, Data)" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__6(System.Object, &lt;&gt;__AnonType1`2[Data,Data])" attrs="145">\r
+        <size>30</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__5(DataA)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__7(System.Object, &lt;&gt;__AnonType1`2[Data,Data])" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__8(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__6(DataB)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__9(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__9(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">\r
-        <size>47</size>\r
+      <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__A(System.Object, Data, Data)" attrs="145">\r
+        <size>31</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__A(DataA)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__B(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__B(DataB)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__C(System.Object, Data)" attrs="145">\r
         <size>15</size>\r
       </method>\r
+      <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__D(System.Object, Data, Data)" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__E(System.Object, &lt;&gt;__AnonType1`2[Data,Data])" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="Data &lt;Main&gt;m__F(System.Object, &lt;&gt;__AnonType1`2[Data,Data])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-linq-10.cs">\r
+    <type name="DataA">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="DataB">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="GroupJoin">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>781</size>\r
+      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="GroupJoin">\r
-      <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__2(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, DataA)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, DataB)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__2(System.Object, DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <method name="System.Collections.Generic.IEnumerable`1[DataB] &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
+      <method name="System.Collections.Generic.IEnumerable`1[DataB] &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
         <size>20</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__7(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
+      <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__4(System.Object, &lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">\r
+        <size>47</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__5(System.Object, DataA)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__6(System.Object, DataB)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__7(System.Object, DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <method name="System.Collections.Generic.IEnumerable`1[DataB] &lt;Main&gt;m__8(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
+      <method name="System.Collections.Generic.IEnumerable`1[DataB] &lt;Main&gt;m__8(System.Object, &lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
         <size>20</size>\r
       </method>\r
-      <method name="DataA &lt;Main&gt;m__C(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
+      <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__9(System.Object, &lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">\r
+        <size>47</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__A(System.Object, DataA)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__B(System.Object, DataB)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="DataA &lt;Main&gt;m__C(System.Object, DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
         <size>10</size>\r
       </method>\r
     </type>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>303</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__0(Int32)" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
         <size>12</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(Int32)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__4(Int32)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__4(System.Object, Int32)" attrs="145">\r
         <size>12</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-12.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>502</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;XX&gt;m__0(System.String)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__2(System.String)" attrs="145">\r
-        <size>18</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;Main&gt;m__4(System.String)" attrs="145">\r
-        <size>21</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;XX&gt;m__6(Char)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="NestedQuery+&lt;XX&gt;c__AnonStorey0">\r
+      <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
+    <type name="NestedQuery+&lt;Main&gt;c__AnonStorey1">\r
+      <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
     <type name="NestedQuery">\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;XX&gt;m__1(&lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">\r
+      <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;XX&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;XX&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">\r
         <size>117</size>\r
       </method>\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__3(System.String)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">\r
+        <size>18</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__3(System.Object, System.String)" attrs="145">\r
         <size>44</size>\r
       </method>\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__5(&lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">\r
+      <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;Main&gt;m__4(System.Object, System.String)" attrs="145">\r
+        <size>21</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__5(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">\r
         <size>118</size>\r
       </method>\r
-      <method name="Char &lt;XX&gt;m__7(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">\r
+      <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;XX&gt;m__6(System.Object, Char)" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="Char &lt;XX&gt;m__7(System.Object, &lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__8(Char)" attrs="145">\r
+      <method name="Boolean &lt;Main&gt;m__8(System.Object, Char)" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;Main&gt;m__9(Char)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;Main&gt;m__9(System.Object, Char)" attrs="145">\r
         <size>17</size>\r
       </method>\r
-      <method name="Char &lt;Main&gt;m__A(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">\r
+      <method name="Char &lt;Main&gt;m__A(System.Object, &lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">\r
         <size>15</size>\r
       </method>\r
     </type>\r
-    <type name="NestedQuery+&lt;XX&gt;c__AnonStorey0">\r
-      <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">\r
-        <size>22</size>\r
-      </method>\r
-    </type>\r
-    <type name="NestedQuery+&lt;Main&gt;c__AnonStorey1">\r
-      <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">\r
-        <size>23</size>\r
-      </method>\r
-    </type>\r
   </test>\r
   <test name="gtest-linq-13.cs">\r
     <type name="Program">\r
       <method name="Void Foo(TypeDefinition)" attrs="145">\r
         <size>48</size>\r
       </method>\r
-      <method name="MethodDefinition &lt;Foo&gt;m__0(MethodDefinition)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>10</size>\r
       </method>\r
     </type>\r
+    <type name="Program">\r
+      <method name="MethodDefinition &lt;Foo&gt;m__0(System.Object, MethodDefinition)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-14.cs">\r
     <type name="Person">\r
       <method name="Void Main()" attrs="150">\r
         <size>79</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(NameCollisionTest.Data)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>13</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="NameCollisionTest.C">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, NameCollisionTest.Data)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-16.cs">\r
     <type name="C">\r
       <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0()" attrs="131">\r
         <size>74</size>\r
       </method>\r
+      <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test_2&gt;c__AnonStorey1">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0()" attrs="131">\r
+        <size>74</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">\r
+        <size>22</size>\r
+      </method>\r
     </type>\r
     <type name="C">\r
-      <method name="System.Func`1[System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;Test_2&gt;m__0(Int32)" attrs="145">\r
+      <method name="System.Func`1[System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;Test_2&gt;m__0(System.Object, Int32)" attrs="145">\r
         <size>33</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;Test_1&gt;c__AnonStorey0">\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(Int32)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(System.Object, Int32)" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">\r
-        <size>22</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;Test_2&gt;c__AnonStorey1">\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0()" attrs="131">\r
-        <size>74</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(Int32)" attrs="145">\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(System.Object, Int32)" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">\r
-        <size>22</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-17.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>169</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-18.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>658</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Boolean] &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>50</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.Int32,System.Boolean])" attrs="145">\r
-        <size>19</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Boolean])" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(Int32)" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__4(Int32)" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__5(Int32)" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__6(Int32)" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__7(Int32)" attrs="145">\r
-        <size>18</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__8(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">\r
-        <size>23</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__9(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__A(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
-        <size>23</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__B(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__C(Int32)" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__D(Int32)" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__E(Int32, Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__F(Int32)" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__10(Int32)" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="C">\r
-      <method name="Int32 &lt;Main&gt;m__11(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-    </type>\r
     <type name="C+&lt;Main&gt;c__AnonStorey0">\r
       <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">\r
         <size>17</size>\r
         <size>17</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Boolean] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>50</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Boolean])" attrs="145">\r
+        <size>19</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__2(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Boolean])" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__4(System.Object, Int32)" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__5(System.Object, Int32)" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__6(System.Object, Int32)" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__7(System.Object, Int32)" attrs="145">\r
+        <size>18</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__8(System.Object, &lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__9(System.Object, &lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__A(System.Object, &lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__B(System.Object, &lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__C(System.Object, Int32)" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__D(System.Object, Int32)" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__E(System.Object, Int32, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__F(System.Object, Int32)" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__10(System.Object, Int32)" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__11(System.Object, Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-19.cs">\r
     <type name="Test">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Char &lt;E&gt;m__0(Char)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .cctor()" attrs="6289">\r
-        <size>45</size>\r
+        <size>28</size>\r
+      </method>\r
+      <method name="Char &lt;E&gt;m__0(System.Object, Char)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="Void Main()" attrs="150">\r
         <size>139</size>\r
       </method>\r
-      <method name="Maybe`1[System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__1(Int32, Int32)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="Maybe`1[System.Int32] &lt;Main&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[System.Int32,System.Int32], Int32)" attrs="145">\r
-        <size>24</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>21</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Maybe`1[System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__1(System.Object, Int32, Int32)" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="Maybe`1[System.Int32] &lt;Main&gt;m__2(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Int32], Int32)" attrs="145">\r
+        <size>24</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-21.cs">\r
     <type name="Program">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>362</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(OrderByBugExample.Foo)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, OrderByBugExample.Foo)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(OrderByBugExample.Foo)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, OrderByBugExample.Foo)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__2(OrderByBugExample.Foo)" attrs="145">\r
+      <method name="Int32 &lt;Main&gt;m__2(System.Object, OrderByBugExample.Foo)" attrs="145">\r
         <size>15</size>\r
       </method>\r
     </type>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>20</size>\r
       </method>\r
-      <method name="Int32 &lt;Test&gt;m__0(A)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Int32 &lt;Test&gt;m__0(System.Object, A)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-25.cs">\r
       <method name="Void Test(System.Action)" attrs="145">\r
         <size>8</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>162</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType0`2[A,B] &lt;Main&gt;m__2(A, B)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[A,B])" attrs="145">\r
-        <size>75</size>\r
-      </method>\r
-      <method name="&lt;&gt;__AnonType1`2[A,B] &lt;Main&gt;m__4(&lt;&gt;__AnonType0`2[A,B])" attrs="145">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="C">\r
-      <method name="System.Collections.Generic.IEnumerable`1[B] &lt;Main&gt;m__1(A)" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>162</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[B] &lt;Main&gt;m__1(System.Object, A)" attrs="145">\r
         <size>15</size>\r
       </method>\r
+      <method name="&lt;&gt;__AnonType0`2[A,B] &lt;Main&gt;m__2(System.Object, A, B)" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[A,B])" attrs="145">\r
+        <size>75</size>\r
+      </method>\r
+      <method name="&lt;&gt;__AnonType1`2[A,B] &lt;Main&gt;m__4(System.Object, &lt;&gt;__AnonType0`2[A,B])" attrs="145">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-26.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>80</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(Test.C)" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, Test.C)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__1(Test.C)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__1(System.Object, Test.C)" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-linq-27.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>152</size>\r
       </method>\r
-      <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] &lt;&gt;m__0(System.String)" attrs="131">\r
         <size>82</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.String,System.Boolean] &lt;&gt;m__1(System.String)" attrs="145">\r
-        <size>55</size>\r
-      </method>\r
-      <method name="Boolean &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.String,System.Boolean])" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">\r
       <method name="Boolean &lt;&gt;m__0(Char)" attrs="131">\r
         <size>24</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Main&gt;c__AnonStorey0">\r
+      <method name="&lt;&gt;__AnonType0`2[System.String,System.Boolean] &lt;&gt;m__1(System.Object, System.String)" attrs="145">\r
+        <size>55</size>\r
+      </method>\r
+      <method name="Boolean &lt;&gt;m__2(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Boolean])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-28.cs">\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>222</size>\r
       </method>\r
-      <method name="&lt;&gt;__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]] &lt;Main&gt;m__0(Char)" attrs="145">\r
-        <size>54</size>\r
-      </method>\r
-      <method name="Char &lt;Main&gt;m__2(Char)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="C">\r
-      <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]])" attrs="145">\r
+      <method name="&lt;&gt;__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]] &lt;Main&gt;m__0(System.Object, Char)" attrs="145">\r
+        <size>54</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]])" attrs="145">\r
         <size>15</size>\r
       </method>\r
+      <method name="Char &lt;Main&gt;m__2(System.Object, Char)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-named-01.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>201</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;Main&gt;c__AnonStorey0">\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-named-02.cs">\r
     <type name="D">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="gtest-named-05.cs">\r
+    <type name="Test">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>38</size>\r
+      </method>\r
+      <method name="Void M(System.String, System.String)" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void M2(Int32 ByRef, System.String, System.String)" attrs="145">\r
+        <size>5</size>\r
+      </method>\r
+      <method name="System.String F()" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="gtest-optional-01.cs">\r
     <type name="C">\r
       <method name="Void TestA(Int32)" attrs="150">\r
       <method name="Void Main()" attrs="145">\r
         <size>45</size>\r
       </method>\r
-      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-optional-15.cs">\r
       <method name="Void Wrap[T](System.Func`2[IPackageRepository,T], T)" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="IPackage &lt;Main&gt;m__0(IPackageRepository)" attrs="145">\r
-        <size>14</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="IPackage &lt;Main&gt;m__1(IPackageRepository)" attrs="145">\r
+      <method name="IPackage &lt;Main&gt;m__0(System.Object, IPackageRepository)" attrs="145">\r
         <size>14</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
+      <method name="IPackage &lt;Main&gt;m__1(System.Object, IPackageRepository)" attrs="145">\r
+        <size>14</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
         <size>26</size>\r
       </method>\r
+      <method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
+        <size>14</size>\r
+      </method>\r
     </type>\r
     <type name="CallerMemberTest">\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
         <size>17</size>\r
       </method>\r
-      <method name="System.Object &lt;Main&gt;m__1(Char)" attrs="145">\r
+      <method name="System.Object &lt;Main&gt;m__1(System.Object, Char)" attrs="145">\r
         <size>24</size>\r
       </method>\r
     </type>\r
-    <type name="CallerMemberTest+&lt;Enumerator&gt;c__Iterator0">\r
-      <method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
-        <size>14</size>\r
-      </method>\r
-    </type>\r
   </test>\r
   <test name="gtest-optional-23.cs">\r
     <type name="CallerLineNumberTest">\r
       <method name="Void Main()" attrs="150">\r
         <size>75</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>11</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6273">\r
         <size>17</size>\r
       </method>\r
       <method name="Void TraceStatic2(Double, System.Decimal)" attrs="145">\r
         <size>2</size>\r
       </method>\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>11</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-optional-24.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>148</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__0(System.String)" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-optional-29.cs">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="gtest-optional-31.cs">\r
+    <type name="Test">\r
+      <method name="Int32 M(Boolean)" attrs="150">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="Int32 M(System.String[])" attrs="150">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-optional-32.cs">\r
+    <type name="A">\r
+      <method name="Int32[] Foo(Int32[])" attrs="1478">\r
+        <size>0</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6276">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="B">\r
+      <method name="Int32[] Foo(Int32[])" attrs="198">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-optional-33.cs">\r
+    <type name="TestCallerLineNumber">\r
+      <method name="Void Test(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(System.Decimal)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(Double)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(Single)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(UInt32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(Int64)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(UInt64)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(System.Nullable`1[System.Decimal])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(System.Nullable`1[System.Double])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(System.Nullable`1[System.Single])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(System.Nullable`1[System.Int32])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(System.Nullable`1[System.UInt32])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(System.Nullable`1[System.Int64])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test(System.Nullable`1[System.UInt64])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="D">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="gtest-partial-01.cs">\r
     <type name="B`1[U]">\r
       <method name="Void .ctor()" attrs="6278">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>64</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="D">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-variance-13.cs">\r
     <type name="A">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>61</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-variance-16.cs">\r
     <type name="S">\r
       <method name="Int32 Bar(Foo`1[System.String], System.String)" attrs="145">\r
         <size>16</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-variance-5.cs">\r
     <type name="BothVariants`2[T1,T2]">\r
   <test name="test-146.cs">\r
     <type name="Test">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>352</size>\r
+        <size>355</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>129</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0()" attrs="145">\r
-        <size>11</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>11</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-276.cs">\r
     <type name="EventTestClass">\r
   <test name="test-279.cs">\r
     <type name="FlagsAttributeDemo">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>51</size>\r
+        <size>55</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>68</size>\r
       </method>\r
-      <method name="Double &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="Double &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-327.cs">\r
     <type name="X2">\r
   <test name="test-376.cs">\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>90</size>\r
+        <size>99</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
     </type>\r
     <type name="Test">\r
       <method name="Void Main()" attrs="150">\r
-        <size>72</size>\r
+        <size>76</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   <test name="test-453.cs">\r
     <type name="C">\r
       <method name="Void Main()" attrs="150">\r
-        <size>34</size>\r
+        <size>38</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>21</size>\r
       </method>\r
-      <method name="Void &lt;Test&gt;m__0(Int32)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;Test&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-481.cs">\r
     <type name="TestDelegate">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>50</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(Int32 ByRef)" attrs="145">\r
-        <size>5</size>\r
-      </method>\r
     </type>\r
     <type name="TestDelegate">\r
       <method name="System.IAsyncResult BeginInvoke(Int32 ByRef, System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="TestClass">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, Int32 ByRef)" attrs="145">\r
+        <size>5</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-482.cs">\r
     <type name="X">\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>9</size>\r
       </method>\r
-      <method name="Boolean &lt;foo&gt;m__0(System.Object)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Tests">\r
+      <method name="Boolean &lt;foo&gt;m__0(System.Object, System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-502.cs">\r
     <type name="Base">\r
       <method name="Void Main()" attrs="150">\r
         <size>32</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>36</size>\r
-      </method>\r
     </type>\r
     <type name="FooHandler">\r
       <method name="System.IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>36</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-537.cs">\r
     <type name="Base">\r
       <method name="Void set_test(Boolean)" attrs="2193">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="ClassMain">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-542.cs">\r
     <type name="ARec">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>70</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test1.CC">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-579.cs">\r
     <type name="TestCase">\r
   <test name="test-640.cs">\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>128</size>\r
+        <size>139</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
     </type>\r
     <type name="C">\r
       <method name="Void Main()" attrs="150">\r
-        <size>8</size>\r
+        <size>19</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
         <size>27</size>\r
       </method>\r
       <method name="Boolean Bar(System.Object)" attrs="145">\r
-        <size>10</size>\r
+        <size>16</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>64</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-675.cs">\r
     <type name="B">\r
     </type>\r
     <type name="X">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>197</size>\r
+        <size>204</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   <test name="test-729.cs">\r
     <type name="Primes.MainClass">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>146</size>\r
+        <size>149</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   <test name="test-77.cs">\r
     <type name="XX">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>393</size>\r
+        <size>443</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Void Main()" attrs="150">\r
         <size>14</size>\r
       </method>\r
-      <method name="Void &lt;Test&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="A">\r
+      <method name="Void &lt;Test&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-782.cs">\r
     <type name="Test">\r
       <method name="Void Main()" attrs="150">\r
         <size>77</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
+      <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
         <size>7</size>\r
       </method>\r
     </type>\r
   <test name="test-833.cs">\r
     <type name="MainClass">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>93</size>\r
+        <size>141</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Void Main()" attrs="150">\r
         <size>39</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, System.Object, System.String)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-849.cs">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-859.cs">\r
+    <type name="X">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>40</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="test-86.cs">\r
     <type name="T.T">\r
       <method name="Int32 method1(System.Type, Int32)" attrs="145">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-892.cs">\r
+    <type name="X">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>66</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-893.cs">\r
+    <type name="A">\r
+      <method name="Boolean TryAssign(Int32 ByRef)" attrs="150">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="Void Main()" attrs="150">\r
+        <size>48</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-894.cs">\r
+    <type name="A1Attribute">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="A2Attribute">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-895.cs">\r
+    <type name="X">\r
+      <method name="Void Test(Int32, Int32 ByRef)" attrs="134">\r
+        <size>47</size>\r
+      </method>\r
+      <method name="Int32 Foo(System.Object)" attrs="129">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Void Main()" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-896.cs">\r
+    <type name="Program">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-897.cs">\r
+    <type name="X">\r
+      <method name="Int32 Foo()" attrs="145">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>61</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-898.cs">\r
+    <type name="BoolArrayWithByteValues">\r
+      <method name="Int32 Foo(Boolean ByRef)" attrs="145">\r
+        <size>58</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>191</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean Ptr()" attrs="145">\r
+        <size>167</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-899.cs">\r
+    <type name="Test">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>49</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="test-9.cs">\r
     <type name="X">\r
       <method name="Int32 Main(System.String[])" attrs="150">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-900.cs">\r
+    <type name="D">\r
+      <method name="D op_Implicit(System.Action)" attrs="2198">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Program">\r
+      <method name="Void Main()" attrs="145">\r
+        <size>37</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-901.cs">\r
+    <type name="X">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>22</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-902.cs">\r
+    <type name="A">\r
+      <method name="Void M(B[])" attrs="454">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6276">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="B">\r
+      <method name="Void M(B[])" attrs="198">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test2">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>54</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-903.cs">\r
+    <type name="C">\r
+      <method name="S op_Implicit(C)" attrs="2198">\r
+        <size>18</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Program">\r
+      <method name="Void Main()" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="test-91.cs">\r
     <type name="Abstract">\r
       <method name="Void .ctor()" attrs="6276">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void &lt;f&gt;m__0()" attrs="145">\r
-        <size>27</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .cctor()" attrs="6289">\r
-        <size>35</size>\r
+        <size>18</size>\r
+      </method>\r
+      <method name="Void &lt;f&gt;m__0(System.Object)" attrs="145">\r
+        <size>27</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="Void Main()" attrs="150">\r
         <size>82</size>\r
       </method>\r
-      <method name="Void &lt;op_Implicit&gt;m__0()" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Void &lt;op_Implicit&gt;m__0(System.Object)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-11.cs">\r
     <type name="D">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>132</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="X">\r
-      <method name="Void &lt;Main&gt;m__2(Int32[])" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__2(System.Object, Int32[])" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__3(Int32[])" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__3(System.Object, Int32[])" attrs="145">\r
         <size>2</size>\r
       </method>\r
     </type>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="TDelegate &lt;CreateMethodUnscoped`1&gt;m__0[TDelegate](System.Object)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="TDelegate &lt;CreateMethodUnscoped`1&gt;m__0[TDelegate](System.Object, System.Object)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-114.cs">\r
     <type name="T">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Int32 &lt;SomeCaller&gt;m__0(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Int32 &lt;SomeCaller&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-anon-115.cs">\r
       <method name="Void Func[T](TestFunc`1[T])" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void &lt;a&gt;m__0(Int32)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>47</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="TestClass">\r
+      <method name="Void &lt;a&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-117.cs">\r
     <type name="C">\r
       <method name="Void Main()" attrs="150">\r
         <size>76</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-118.cs">\r
     <type name="C">\r
       <method name="Void Main()" attrs="150">\r
         <size>101</size>\r
       </method>\r
-      <method name="T &lt;Test2`1&gt;m__0[T](T)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>24</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__2(Int32)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__3(Int32)" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="T &lt;Test2`1&gt;m__0[T](System.Object, T)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>24</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-119.cs">\r
     <type name="Test">\r
       <method name="Void Main()" attrs="150">\r
         <size>7</size>\r
       </method>\r
-      <method name="Int32 &lt;TestNaturalSort&gt;m__0(System.String, System.String)" attrs="145">\r
-        <size>114</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>120</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Int32 &lt;TestNaturalSort&gt;m__0(System.Object, System.String, System.String)" attrs="145">\r
+        <size>114</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-12.cs">\r
     <type name="predicate">\r
       <method name="System.Collections.ArrayList Find(predicate, System.Collections.ArrayList)" attrs="145">\r
         <size>96</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__0(System.Object)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-120.cs">\r
     <type name="C`1[T]">\r
       <method name="Void Run()" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void &lt;Foo`1&gt;m__0[U]()" attrs="145">\r
-        <size>6</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C`1[T]">\r
+      <method name="Void &lt;Foo`1&gt;m__0[U](System.Object)" attrs="145">\r
+        <size>6</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-121.cs">\r
     <type name="EmptyDelegate">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>95</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-123.cs">\r
     <type name="MemberAccessData">\r
       <method name="Void &lt;InstanceTests&gt;m__0()" attrs="129">\r
         <size>7</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__3()" attrs="145">\r
-        <size>62</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__4()" attrs="145">\r
-        <size>54</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>15</size>\r
       </method>\r
     </type>\r
-    <type name="C">\r
-      <method name="Void &lt;Main&gt;m__1()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__2()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__5(E)" attrs="145">\r
-        <size>35</size>\r
-      </method>\r
-    </type>\r
     <type name="C+&lt;Main&gt;c__AnonStorey0">\r
       <method name="Void &lt;&gt;m__0()" attrs="131">\r
         <size>49</size>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;Main&gt;m__1(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__2(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__3(System.Object)" attrs="145">\r
+        <size>62</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__4(System.Object)" attrs="145">\r
+        <size>54</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__5(System.Object, E)" attrs="145">\r
+        <size>35</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-124.cs">\r
     <type name="Disposable`1[T]">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="TDest &lt;GetUpcaster`2&gt;m__0[TSource,TDest](TSource)" attrs="145">\r
-        <size>20</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="TDest &lt;GetDowncaster`2&gt;m__1[TSource,TDest](TSource)" attrs="145">\r
+      <method name="TDest &lt;GetUpcaster`2&gt;m__0[TSource,TDest](System.Object, TSource)" attrs="145">\r
         <size>20</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
+      <method name="TDest &lt;GetDowncaster`2&gt;m__1[TSource,TDest](System.Object, TSource)" attrs="145">\r
+        <size>20</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)" attrs="131">\r
         <size>37</size>\r
       </method>\r
-      <method name="Void &lt;&gt;m__1(System.Object, System.EventArgs)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void &lt;&gt;m__1(System.Object, System.Object, System.EventArgs)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-anon-132.cs">\r
       </method>\r
     </type>\r
     <type name="Test">\r
-      <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">\r
+      <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
         <size>24</size>\r
       </method>\r
     </type>\r
       <method name="System.Func`1[T] XX()" attrs="145">\r
         <size>40</size>\r
       </method>\r
-      <method name="T &lt;XX&gt;m__0()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C`1[T]">\r
+      <method name="T &lt;XX&gt;m__0(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+    </type>\r
     <type name="C2`1[T]">\r
-      <method name="C`1[T] &lt;XX&gt;m__0()" attrs="145">\r
+      <method name="C`1[T] &lt;XX&gt;m__0(System.Object)" attrs="145">\r
         <size>9</size>\r
       </method>\r
     </type>\r
     <type name="N1">\r
-      <method name="T &lt;XX`1&gt;m__0[T]()" attrs="145">\r
+      <method name="T &lt;XX`1&gt;m__0[T](System.Object)" attrs="145">\r
         <size>17</size>\r
       </method>\r
     </type>\r
       <method name="System.Decimal Average[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Decimal])" attrs="150">\r
         <size>45</size>\r
       </method>\r
-      <method name="System.Decimal &lt;Average`1&gt;m__0[TSource](System.Decimal, System.Decimal)" attrs="145">\r
+      <method name="System.Decimal &lt;Average`1&gt;m__0[TSource](System.Object, System.Decimal, System.Decimal)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="System.Decimal &lt;Average`1&gt;m__1[TSource](System.Decimal, System.Decimal)" attrs="145">\r
+      <method name="System.Decimal &lt;Average`1&gt;m__1[TSource](System.Object, System.Decimal, System.Decimal)" attrs="145">\r
         <size>15</size>\r
       </method>\r
     </type>\r
       <method name="Void Test_3[T]()" attrs="134">\r
         <size>21</size>\r
       </method>\r
-      <method name="Void &lt;Test_3`1&gt;m__0[T]()" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Void &lt;Test_3`1&gt;m__0[T](System.Object)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-143.cs">\r
     <type name="TestC">\r
       <method name="System.Func`1[System.Type] Test[T]()" attrs="150">\r
         <size>21</size>\r
       </method>\r
-      <method name="System.Type &lt;Test`1&gt;m__0[T]()" attrs="145">\r
-        <size>18</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Type &lt;Test`1&gt;m__0[T](System.Object)" attrs="145">\r
+        <size>18</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-anon-144.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void &lt;ThisCausesACrash`1&gt;m__0[I](System.Object, System.EventArgs)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void &lt;ThisCausesACrash`1&gt;m__0[I](System.Object, System.Object, System.EventArgs)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-anon-145.cs">\r
       <method name="Void AnyMethod[T]()" attrs="134">\r
         <size>21</size>\r
       </method>\r
-      <method name="Void &lt;AnyMethod`1&gt;m__0[T]()" attrs="145">\r
-        <size>32</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;AnyMethod`1&gt;m__0[T](System.Object)" attrs="145">\r
+        <size>32</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-146.cs">\r
     <type name="TheClass">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Test">\r
-      <method name="Void &lt;Main&gt;m__0(Int32, Int32, Int32)" attrs="145">\r
-        <size>24</size>\r
-      </method>\r
-    </type>\r
     <type name="C+&lt;Curry&gt;c__AnonStorey0`3+&lt;Curry&gt;c__AnonStorey1`3[T1,T2,T3]">\r
       <method name="System.Action`1[T3] &lt;&gt;m__0(T2)" attrs="131">\r
         <size>52</size>\r
         <size>35</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, Int32, Int32, Int32)" attrs="145">\r
+        <size>24</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-148.cs">\r
     <type name="Func`1[TResult]">\r
         <size>8</size>\r
       </method>\r
     </type>\r
-    <type name="Foo">\r
-      <method name="Inner &lt;Main&gt;m__0(System.String)" attrs="145">\r
-        <size>21</size>\r
-      </method>\r
-    </type>\r
     <type name="Foo+foo_fn">\r
       <method name="Inner Invoke(System.String)" attrs="454">\r
         <size>0</size>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Foo">\r
+      <method name="Inner &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>21</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-150.cs">\r
     <type name="M">\r
       <method name="Void UseATemplate()" attrs="134">\r
         <size>37</size>\r
       </method>\r
-      <method name="Void &lt;UseATemplate&gt;m__0(System.Collections.Generic.List`1[System.Int32] ByRef)" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="TestComp.Program+MyClass">\r
+      <method name="Void &lt;UseATemplate&gt;m__0(System.Object, System.Collections.Generic.List`1[System.Int32] ByRef)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-154.cs">\r
     <type name="Class">\r
       </method>\r
     </type>\r
     <type name="Program">\r
-      <method name="System.Object &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+      <method name="System.Object &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">\r
         <size>9</size>\r
       </method>\r
     </type>\r
       <method name="Void IFoo&lt;T&gt;.Test()" attrs="481">\r
         <size>38</size>\r
       </method>\r
-      <method name="Void &lt;Test&gt;m__0()" attrs="145">\r
-        <size>8</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X`1[T]">\r
+      <method name="Void &lt;Test&gt;m__0(System.Object)" attrs="145">\r
+        <size>8</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-158.cs">\r
     <type name="Test">\r
       </method>\r
     </type>\r
     <type name="TestGenericsSubtypeMatching.C">\r
-      <method name="Void &lt;Main&gt;m__0(System.String)" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
         <size>7</size>\r
       </method>\r
     </type>\r
       </method>\r
     </type>\r
     <type name="TestGenericsSubtypeMatching.C">\r
-      <method name="Void &lt;Main&gt;m__0(Int32)" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
         <size>7</size>\r
       </method>\r
     </type>\r
       </method>\r
     </type>\r
     <type name="TestCase+&lt;Test&gt;c__AnonStorey0`1[T]">\r
-      <method name="Int32 &lt;&gt;m__1(System.Collections.Generic.IList`1[System.Collections.Generic.IList`1[T]])" attrs="145">\r
+      <method name="Int32 &lt;&gt;m__1(System.Object, System.Collections.Generic.IList`1[System.Collections.Generic.IList`1[T]])" attrs="145">\r
         <size>9</size>\r
       </method>\r
     </type>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>22</size>\r
       </method>\r
-      <method name="T &lt;Foo`1&gt;m__0[T](T)" attrs="145">\r
-        <size>77</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="T &lt;Foo`1&gt;m__0[T](System.Object, T)" attrs="145">\r
+        <size>77</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-166.cs">\r
     <type name="A">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>22</size>\r
       </method>\r
-      <method name="Void &lt;Test`2&gt;m__0[T,U]()" attrs="145">\r
-        <size>39</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="A">\r
+      <method name="Void &lt;Test`2&gt;m__0[T,U](System.Object)" attrs="145">\r
+        <size>39</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-167.cs">\r
     <type name="Foo">\r
       <method name="Void Main()" attrs="150">\r
         <size>36</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>89</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>89</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-anon-168.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>113</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>51</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>46</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">\r
-        <size>42</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Program">\r
+      <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>51</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>46</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
+        <size>42</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-169.cs">\r
     <type name="Test">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>74</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>18</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>18</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-170.cs">\r
     <type name="MyClass">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>44</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="TestGotoLabels.GotoLabelsTest">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-27.cs">\r
     <type name="D">\r
       <method name="System.String &lt;Hello&gt;m__0()" attrs="129">\r
         <size>217</size>\r
       </method>\r
-      <method name="Void &lt;Hello&gt;m__1(System.String)" attrs="145">\r
-        <size>8</size>\r
-      </method>\r
-      <method name="Void &lt;Hello&gt;m__2(System.String)" attrs="145">\r
-        <size>8</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>108</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="Void &lt;Hello&gt;m__1(System.Object, System.String)" attrs="145">\r
+        <size>8</size>\r
+      </method>\r
+      <method name="Void &lt;Hello&gt;m__2(System.Object, System.String)" attrs="145">\r
+        <size>8</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-30.cs">\r
     <type name="X">\r
       <method name="Void Main()" attrs="150">\r
         <size>36</size>\r
       </method>\r
-      <method name="System.Object &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="System.Object &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-32.cs">\r
     <type name="StringSender">\r
       <method name="Void Main()" attrs="150">\r
         <size>37</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor(TestMethod)" attrs="6278">\r
         <size>8</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-37.cs">\r
     <type name="DelegateInit">\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>12</size>\r
       </method>\r
-      <method name="Void &lt;_print&gt;m__0()" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .cctor()" attrs="6289">\r
-        <size>35</size>\r
+        <size>18</size>\r
       </method>\r
     </type>\r
     <type name="DelegateInit+FooDelegate">\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="DelegateInit">\r
+      <method name="Void &lt;_print&gt;m__0(System.Object)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-38.cs">\r
     <type name="Simple">\r
       <method name="Void Main()" attrs="150">\r
         <size>14</size>\r
       </method>\r
-      <method name="Simple &lt;Test&gt;m__0()" attrs="145">\r
-        <size>45</size>\r
-      </method>\r
-      <method name="Void &lt;Test&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="Simple &lt;Test&gt;m__0(System.Object)" attrs="145">\r
+        <size>45</size>\r
+      </method>\r
+      <method name="Void &lt;Test&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-43.cs">\r
     <type name="Simple">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>14</size>\r
       </method>\r
-      <method name="Void &lt;a&gt;m__0(Int32)" attrs="145">\r
-        <size>8</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .cctor()" attrs="6289">\r
-        <size>46</size>\r
+        <size>29</size>\r
       </method>\r
     </type>\r
     <type name="TestFunc">\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="TestClass">\r
+      <method name="Void &lt;a&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>8</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-46.cs">\r
     <type name="Foo">\r
       <method name="Void Main()" attrs="150">\r
         <size>12</size>\r
       </method>\r
-      <method name="Void &lt;Print&gt;m__0()" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .cctor()" attrs="6289">\r
-        <size>35</size>\r
+        <size>18</size>\r
       </method>\r
     </type>\r
     <type name="FooDelegate">\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="Void &lt;Print&gt;m__0(System.Object)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-52.cs">\r
     <type name="X">\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>51</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(Observable)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Observable">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, Observable)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-57.cs">\r
     <type name="X">\r
       </method>\r
     </type>\r
     <type name="Source">\r
-      <method name="Void &lt;AddSource&gt;m__0(System.Object, System.EventArgs)" attrs="145">\r
+      <method name="Void &lt;AddSource&gt;m__0(System.Object, System.Object, System.EventArgs)" attrs="145">\r
         <size>2</size>\r
       </method>\r
     </type>\r
       <method name="Void Main()" attrs="150">\r
         <size>70</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;Main&gt;m__1(System.String ByRef)" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Main&gt;m__1(System.Object, System.String ByRef)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-69.cs">\r
     <type name="TargetAccessDelegate">\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
-    </type>\r
-    <type name="C">\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-    </type>\r
-    <type name="C+&lt;Main&gt;c__AnonStorey1">\r
       <method name="Void &lt;&gt;m__0()" attrs="131">\r
         <size>49</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-71.cs">\r
     <type name="Program">\r
       <method name="Void Test_1()" attrs="145">\r
         <size>37</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="Void &lt;Test_1&gt;m__1(System.Object)" attrs="145">\r
-        <size>32</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="T">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="Void &lt;Test_1&gt;m__1(System.Object, System.Object)" attrs="145">\r
+        <size>32</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-74.cs">\r
     <type name="Foo">\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>36</size>\r
       </method>\r
-      <method name="System.String[,] &lt;Main&gt;m__0()" attrs="145">\r
-        <size>42</size>\r
-      </method>\r
     </type>\r
     <type name="Foo+SimpleDelegate">\r
       <method name="System.String[,] Invoke()" attrs="454">\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Foo">\r
+      <method name="System.String[,] &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>42</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-75.cs">\r
     <type name="D">\r
       <method name="Void TestMe()" attrs="129">\r
         <size>152</size>\r
       </method>\r
-      <method name="Boolean &lt;TestMe&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Boolean &lt;TestMe&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-76.cs">\r
     <type name="FactoryDelegate">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>63</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
-        <size>19</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="DelegateTest">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>19</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-79.cs">\r
     <type name="Test">\r
       <method name="Void set_Handler(System.EventHandler)" attrs="2182">\r
         <size>9</size>\r
       </method>\r
-      <method name="Void &lt;get_DoNothingEventHandler&gt;m__0(System.Object, System.EventArgs)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void &lt;get_DoSomethingEventHandler&gt;m__1(System.Object, System.EventArgs)" attrs="129">\r
         <size>16</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>18</size>\r
       </method>\r
+      <method name="Void &lt;get_DoNothingEventHandler&gt;m__0(System.Object, System.Object, System.EventArgs)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-anon-81.cs">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="MainClass">\r
-      <method name="Void &lt;Test2&gt;m__0(System.String)" attrs="145">\r
-        <size>28</size>\r
-      </method>\r
-      <method name="Void &lt;Test3&gt;m__1()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;Test4&gt;m__2()" attrs="145">\r
-        <size>32</size>\r
-      </method>\r
-      <method name="Void &lt;Test4&gt;m__3()" attrs="145">\r
-        <size>29</size>\r
-      </method>\r
-    </type>\r
     <type name="MainClass+&lt;Main&gt;c__AnonStorey0">\r
       <method name="Void &lt;&gt;m__1(System.String)" attrs="131">\r
         <size>14</size>\r
       <method name="Int32 &lt;&gt;m__0(Int32)" attrs="131">\r
         <size>54</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__1(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
     </type>\r
     <type name="MainClass+&lt;Test2&gt;c__AnonStorey1">\r
       <method name="Void &lt;&gt;m__0()" attrs="131">\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="MainClass">\r
+      <method name="Void &lt;Test2&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>28</size>\r
+      </method>\r
+      <method name="Void &lt;Test3&gt;m__1(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;Test4&gt;m__2(System.Object)" attrs="145">\r
+        <size>32</size>\r
+      </method>\r
+      <method name="Void &lt;Test4&gt;m__3(System.Object)" attrs="145">\r
+        <size>29</size>\r
+      </method>\r
+    </type>\r
+    <type name="MainClass+&lt;Test5&gt;c__AnonStorey4">\r
+      <method name="Int32 &lt;&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-83.cs">\r
     <type name="C">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void &lt;MyDelegate&gt;m__0(System.Object, System.EventArgs)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>42</size>\r
       </method>\r
+      <method name="Void &lt;MyDelegate&gt;m__0(System.Object, System.Object, System.EventArgs)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-anon-84.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>27</size>\r
       </method>\r
-      <method name="C &lt;field&gt;m__0(Int32)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>43</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="C &lt;field&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-85.cs">\r
     <type name="X">\r
         <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="C+&lt;Test&gt;c__AnonStorey2">\r
-      <method name="Void &lt;&gt;m__2()" attrs="145">\r
-        <size>4</size>\r
-      </method>\r
-    </type>\r
     <type name="C+&lt;Test&gt;c__AnonStorey2+&lt;Test&gt;c__AnonStorey1">\r
       <method name="Void &lt;&gt;m__0()" attrs="131">\r
         <size>21</size>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C+&lt;Test&gt;c__AnonStorey2">\r
+      <method name="Void &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>4</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-89.cs">\r
     <type name="C">\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)" attrs="131">\r
+        <size>24</size>\r
+      </method>\r
     </type>\r
     <type name="BaseTest.MainClass">\r
-      <method name="Void &lt;Main&gt;m__0(System.Object, System.EventArgs)" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, System.Object, System.EventArgs)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="BaseTest.MainClass+&lt;&gt;c__AnonStorey1">\r
-      <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)" attrs="131">\r
-        <size>24</size>\r
-      </method>\r
-    </type>\r
   </test>\r
   <test name="test-anon-94.cs">\r
     <type name="Program">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>20</size>\r
       </method>\r
-      <method name="Void &lt;Test&gt;m__0()" attrs="145">\r
-        <size>63</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>25</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;Test&gt;m__0(System.Object)" attrs="145">\r
+        <size>63</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-01.cs">\r
     <type name="Program">\r
       <method name="System.Threading.Tasks.Task RunAsync()" attrs="145">\r
         <size>48</size>\r
       </method>\r
-      <method name="Void &lt;RunAsync&gt;m__0()" attrs="145">\r
-        <size>62</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="Program">\r
+      <method name="Void &lt;RunAsync&gt;m__0(System.Object)" attrs="145">\r
+        <size>62</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-02.cs">\r
     <type name="C">\r
     </type>\r
     <type name="C+&lt;SynchronousCall&gt;c__async0">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>49</size>\r
+        <size>79</size>\r
       </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
     </type>\r
     <type name="Program+&lt;Main&gt;c__async7">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>44</size>\r
+        <size>69</size>\r
       </method>\r
     </type>\r
     <type name="Program+&lt;Main&gt;c__AnonStorey1">\r
         <size>52</size>\r
       </method>\r
     </type>\r
-    <type name="Program">\r
-      <method name="System.Threading.Tasks.Task`1[System.Decimal] &lt;Main&gt;m__0(System.Decimal)" attrs="145">\r
-        <size>41</size>\r
-      </method>\r
-    </type>\r
     <type name="Program+&lt;Main&gt;c__AnonStorey1">\r
       <method name="System.Threading.Tasks.Task`1[System.Decimal] &lt;&gt;m__3(System.Decimal)" attrs="131">\r
         <size>49</size>\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="Program">\r
+      <method name="System.Threading.Tasks.Task`1[System.Decimal] &lt;Main&gt;m__0(System.Object, System.Decimal)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-07.cs">\r
     <type name="Program">\r
     </type>\r
     <type name="Program+&lt;Main&gt;c__async4">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>43</size>\r
-      </method>\r
-    </type>\r
-    <type name="Program">\r
-      <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__0(Int16)" attrs="145">\r
-        <size>41</size>\r
+        <size>68</size>\r
       </method>\r
     </type>\r
     <type name="Program+&lt;Main&gt;c__AnonStorey1">\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="Program">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__0(System.Object, Int16)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-08.cs">\r
     <type name="AsyncTypeInference">\r
       <method name="Void Test2[T](System.Func`2[System.Int32,T])" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>33</size>\r
-      </method>\r
-      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__1(Int32)" attrs="145">\r
-        <size>33</size>\r
-      </method>\r
-      <method name="System.Threading.Tasks.Task &lt;Main&gt;m__2(Int32)" attrs="145">\r
-        <size>33</size>\r
-      </method>\r
-      <method name="System.Threading.Tasks.Task &lt;Main&gt;m__3(Int32)" attrs="145">\r
-        <size>33</size>\r
-      </method>\r
-      <method name="Int32 &lt;TT&gt;m__4()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="AsyncTypeInference+&lt;Main&gt;c__asyncB">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>37</size>\r
-      </method>\r
-    </type>\r
-    <type name="AsyncTypeInference+&lt;Main&gt;c__async2">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-    </type>\r
-    <type name="AsyncTypeInference+&lt;Main&gt;c__async5">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+        <size>67</size>\r
       </method>\r
     </type>\r
     <type name="AsyncTypeInference+&lt;Main&gt;c__async2">\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="AsyncTypeInference">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="Int32 &lt;TT&gt;m__4(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="AsyncTypeInference+&lt;Main&gt;c__async2">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="AsyncTypeInference+&lt;Main&gt;c__async5">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-09.cs">\r
     <type name="Test">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>57</size>\r
       </method>\r
-      <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__0(System.String)" attrs="145">\r
-        <size>33</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
     </type>\r
-    <type name="Test+&lt;Main&gt;c__async2">\r
+    <type name="Test+&lt;Main&gt;c__async3">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>38</size>\r
+        <size>63</size>\r
       </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>338</size>\r
       </method>\r
-      <method name="System.String &lt;&gt;m__1()" attrs="145">\r
-        <size>13</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionCall_2&gt;c__async1">\r
       <method name="Void MoveNext()" attrs="486">\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionCall_1&gt;c__async0">\r
-      <method name="System.String &lt;&gt;m__0()" attrs="145">\r
-        <size>21</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionCall_2&gt;c__async1">\r
-      <method name="System.String &lt;&gt;m__0()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionCall_3&gt;c__async2">\r
-      <method name="Byte &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionPair_1&gt;c__async3">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionPair_2&gt;c__async4">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionPair_3&gt;c__async5">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionPair_4&gt;c__async6">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionCall_1&gt;c__async0">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>21</size>\r
+      </method>\r
+      <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionCall_2&gt;c__async1">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionCall_3&gt;c__async2">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Byte &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionPair_1&gt;c__async3">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionPair_2&gt;c__async4">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionPair_3&gt;c__async5">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestCompositionPair_4&gt;c__async6">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>266</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;TestStack_1&gt;c__async0">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>327</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;TestStack_2&gt;c__async1">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>302</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;TestStack_3&gt;c__async2">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>467</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;TestStack_4&gt;c__async3">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>323</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;TestStack_5&gt;c__async4">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="G`1+&lt;TestStack_1&gt;c__async0[T]">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;TestStack_1&gt;c__async0">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;TestStack_2&gt;c__async1">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;TestStack_3&gt;c__async2">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;TestStack_4&gt;c__async3">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-12.cs">\r
     <type name="C">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>455</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>17</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
         <size>9</size>\r
       </method>\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="test-async-13.cs">\r
         <size>40</size>\r
       </method>\r
       <method name="Void .ctor(Int32, String)" attrs="6278">\r
-        <size>9</size>\r
+        <size>24</size>\r
       </method>\r
     </type>\r
     <type name="Base">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>187</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>45</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(Boolean)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_1&gt;c__async0">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>335</size>\r
+        <size>338</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_2&gt;c__async1">\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>428</size>\r
+        <size>409</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_6&gt;c__async5">\r
         <size>1209</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;AssignTest_1&gt;c__async9">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>223</size>\r
+    <type name="Tester">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] BinaryTest_5()" attrs="129">\r
+        <size>33</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;AssignTest_2&gt;c__asyncA">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>273</size>\r
+      <method name="System.Threading.Tasks.Task`1[System.Boolean] BinaryTest_6()" attrs="129">\r
+        <size>33</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;AssignTest_3&gt;c__asyncB">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>364</size>\r
+      <method name="Tester &lt;CastTest_2&gt;m__4()" attrs="129">\r
+        <size>9</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;BinaryTest_1&gt;c__asyncC">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>435</size>\r
+      <method name="System.Threading.Tasks.Task`1[System.Boolean] NewArrayInitTest_7()" attrs="129">\r
+        <size>33</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_2&gt;c__asyncD">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>507</size>\r
+    <type name="Base">\r
+      <method name="Void CallRefParams(Int32 ByRef, Int32[])" attrs="148">\r
+        <size>5</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_3&gt;c__asyncE">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>1137</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_1&gt;c__async0">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_4&gt;c__asyncF">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>872</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_2&gt;c__async1">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester">\r
-      <method name="System.Threading.Tasks.Task`1[System.Int32] BinaryTest_5()" attrs="129">\r
-        <size>33</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_3&gt;c__async2">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_5&gt;c__async10">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>298</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_4&gt;c__async3">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester">\r
-      <method name="System.Threading.Tasks.Task`1[System.Boolean] BinaryTest_6()" attrs="129">\r
-        <size>33</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_6&gt;c__async11">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>209</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_6&gt;c__async5">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_1&gt;c__async12">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>430</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_7&gt;c__async6">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_2&gt;c__async13">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>267</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_8&gt;c__async7">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_3&gt;c__async14">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>237</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_9&gt;c__async8">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_4&gt;c__async15">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>234</size>\r
+    <type name="Tester">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] NewDelegate_1()" attrs="129">\r
+        <size>33</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;CallTest_5&gt;c__async16">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>250</size>\r
+      <method name="System.Threading.Tasks.Task`1[System.Func`1[System.Int32]] NewDelegate_1_0()" attrs="145">\r
+        <size>33</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;CastTest_1&gt;c__async17">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>246</size>\r
+      <method name="System.Threading.Tasks.Task`1[System.Boolean] ArrayAccessTest_10()" attrs="129">\r
+        <size>33</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CastTest_2&gt;c__async18">\r
+    <type name="Tester+&lt;ArrayAccessTest_10&gt;c__async9">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>233</size>\r
+        <size>235</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;CoalescingTest_1&gt;c__async19">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>358</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CoalescingTest_2&gt;c__async1A">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>364</size>\r
+    <type name="Tester">\r
+      <method name="System.Threading.Tasks.Task`1[System.Boolean] ArrayAccessTest_11()" attrs="129">\r
+        <size>33</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ConditionalTest_1&gt;c__async1B">\r
+    <type name="Tester+&lt;ArrayAccessTest_11&gt;c__asyncA">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>197</size>\r
+        <size>413</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;ConditionalTest_2&gt;c__async1C">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>329</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ConditionalTest_3&gt;c__async1D">\r
+    <type name="Tester+&lt;AssignTest_1&gt;c__asyncB">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>347</size>\r
+        <size>223</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;ConditionalTest_4&gt;c__async1E">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>243</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;DelegateInvoke_4&gt;c__async1F">\r
+    <type name="Tester+&lt;AssignTest_2&gt;c__asyncC">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>271</size>\r
+        <size>273</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;EventInvoke_1&gt;c__async20">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>260</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;FieldTest_1&gt;c__async21">\r
+    <type name="Tester+&lt;AssignTest_3&gt;c__asyncD">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>535</size>\r
+        <size>364</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IndexerTest_1&gt;c__async22">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>225</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_2&gt;c__async23">\r
+    <type name="Tester+&lt;BinaryTest_1&gt;c__asyncE">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>335</size>\r
+        <size>435</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IndexerTest_3&gt;c__async24">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>402</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_4&gt;c__async25">\r
+    <type name="Tester+&lt;BinaryTest_2&gt;c__asyncF">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>442</size>\r
+        <size>507</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IndexerTest_5&gt;c__async26">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>548</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_6&gt;c__async27">\r
+    <type name="Tester+&lt;BinaryTest_3&gt;c__async10">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>544</size>\r
+        <size>1137</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IndexerTest_7&gt;c__async28">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>295</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IsTest_1&gt;c__async29">\r
+    <type name="Tester+&lt;BinaryTest_4&gt;c__async11">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>233</size>\r
+        <size>872</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IsTest_2&gt;c__async2A">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>233</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2B">\r
+    <type name="Tester+&lt;BinaryTest_5&gt;c__async12">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>391</size>\r
+        <size>298</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2C">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>299</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2D">\r
+    <type name="Tester+&lt;BinaryTest_6&gt;c__async13">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>390</size>\r
+        <size>209</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;NewTest_1&gt;c__async2E">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>260</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewTest_2&gt;c__async2F">\r
+    <type name="Tester+&lt;CallTest_1&gt;c__async14">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>348</size>\r
+        <size>430</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewInitTest_1&gt;c__async30">\r
+    <type name="Tester+&lt;CallTest_2&gt;c__async15">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>1026</size>\r
+        <size>267</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewInitTest_2&gt;c__async31">\r
+    <type name="Tester+&lt;CallTest_3&gt;c__async16">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>739</size>\r
+        <size>237</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_1&gt;c__async32">\r
+    <type name="Tester+&lt;CallTest_4&gt;c__async17">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>240</size>\r
       </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_2&gt;c__async33">\r
+    <type name="Tester+&lt;CallTest_5&gt;c__async18">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>355</size>\r
+        <size>250</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_3&gt;c__async34">\r
+    <type name="Tester+&lt;CastTest_1&gt;c__async19">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>246</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_4&gt;c__async35">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>427</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_5&gt;c__async36">\r
+    <type name="Tester+&lt;CastTest_2&gt;c__async1A">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>264</size>\r
+        <size>233</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_6&gt;c__async37">\r
+    <type name="Tester+&lt;CoalescingTest_1&gt;c__async1B">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>266</size>\r
+        <size>358</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester">\r
-      <method name="Tester &lt;CastTest_2&gt;m__4()" attrs="129">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_1&gt;c__async0">\r
-      <method name="Boolean &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;CoalescingTest_2&gt;c__async1C">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>364</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_2&gt;c__async1">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;ConditionalTest_1&gt;c__async1D">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>197</size>\r
       </method>\r
-      <method name="Double &lt;&gt;m__3()" attrs="145">\r
-        <size>17</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_3&gt;c__async2">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;ConditionalTest_2&gt;c__async1E">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>329</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__3()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_4&gt;c__async3">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;ConditionalTest_3&gt;c__async1F">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>347</size>\r
       </method>\r
-      <method name="System.String &lt;&gt;m__1()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-    </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_6&gt;c__async5">\r
-      <method name="Int64 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
+    <type name="Tester+&lt;ConditionalTest_4&gt;c__async20">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>243</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_7&gt;c__async6">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_8&gt;c__async7">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;DelegateInvoke_4&gt;c__async21">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>271</size>\r
       </method>\r
-      <method name="Byte &lt;&gt;m__1()" attrs="145">\r
-        <size>10</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_9&gt;c__async8">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__3()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__4()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__5()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;EventInvoke_1&gt;c__async22">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>260</size>\r
       </method>\r
-      <method name="S &lt;&gt;m__6()" attrs="145">\r
-        <size>25</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;AssignTest_1&gt;c__async9">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;FieldTest_1&gt;c__async23">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>535</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;AssignTest_2&gt;c__asyncA">\r
-      <method name="System.Nullable`1[System.SByte] &lt;&gt;m__0()" attrs="145">\r
-        <size>17</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;AssignTest_3&gt;c__asyncB">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;IndexerTest_1&gt;c__async24">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>225</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_1&gt;c__asyncC">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>10</size>\r
+    <type name="Tester+&lt;IndexerTest_2&gt;c__async25">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>335</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
-        <size>10</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_3&gt;c__asyncE">\r
-      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__0()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__1()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__3()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__4()" attrs="145">\r
-        <size>17</size>\r
+    <type name="Tester+&lt;IndexerTest_3&gt;c__async26">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>402</size>\r
       </method>\r
-      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__5()" attrs="145">\r
-        <size>14</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_4&gt;c__asyncF">\r
-      <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="System.Nullable`1[System.Byte] &lt;&gt;m__1()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__2()" attrs="145">\r
-        <size>20</size>\r
+    <type name="Tester+&lt;IndexerTest_4&gt;c__async27">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>442</size>\r
       </method>\r
-      <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__3()" attrs="145">\r
-        <size>17</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_1&gt;c__async12">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;IndexerTest_5&gt;c__async28">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>548</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;CallTest_2&gt;c__async13">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>17</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_3&gt;c__async14">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
+    <type name="Tester+&lt;IndexerTest_6&gt;c__async29">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>544</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;CallTest_4&gt;c__async15">\r
-      <method name="E &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CoalescingTest_1&gt;c__async19">\r
-      <method name="System.String &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;IndexerTest_7&gt;c__async2A">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>295</size>\r
       </method>\r
-      <method name="System.String &lt;&gt;m__1()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CoalescingTest_2&gt;c__async1A">\r
-      <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Byte &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;IsTest_1&gt;c__async2B">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>233</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;ConditionalTest_1&gt;c__async1B">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ConditionalTest_2&gt;c__async1C">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;IsTest_2&gt;c__async2C">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>233</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ConditionalTest_3&gt;c__async1D">\r
-      <method name="Boolean &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2D">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>391</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;ConditionalTest_4&gt;c__async1E">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;DelegateInvoke_4&gt;c__async1F">\r
-      <method name="Int32 &lt;&gt;m__0(Int32)" attrs="145">\r
-        <size>11</size>\r
+    <type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2E">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>299</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;FieldTest_1&gt;c__async21">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2F">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>390</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IndexerTest_1&gt;c__async22">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_2&gt;c__async23">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;NewTest_1&gt;c__async30">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>260</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IndexerTest_3&gt;c__async24">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_4&gt;c__async25">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
+    <type name="Tester+&lt;NewTest_2&gt;c__async31">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>348</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IndexerTest_5&gt;c__async26">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_6&gt;c__async27">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
-        <size>10</size>\r
+    <type name="Tester+&lt;NewDelegate_1&gt;c__async32">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>212</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IsTest_1&gt;c__async29">\r
-      <method name="Tester &lt;&gt;m__0()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IsTest_2&gt;c__async2A">\r
-      <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__0()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-    </type>\r
-    <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2B">\r
-      <method name="Base &lt;&gt;m__0()" attrs="145">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewDelegate_1_0&gt;c__async33">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>226</size>\r
       </method>\r
-      <method name="Base &lt;&gt;m__1()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2C">\r
-      <method name="Base &lt;&gt;m__0()" attrs="145">\r
+    <type name="Tester+&lt;NewInitTest_1&gt;c__async34">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>1026</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2D">\r
-      <method name="Base &lt;&gt;m__0()" attrs="145">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewInitTest_2&gt;c__async35">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>739</size>\r
       </method>\r
-      <method name="Base &lt;&gt;m__1()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewTest_1&gt;c__async2E">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-    </type>\r
-    <type name="Tester+&lt;NewTest_2&gt;c__async2F">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_1&gt;c__async36">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>240</size>\r
       </method>\r
-      <method name="System.String &lt;&gt;m__1()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewInitTest_1&gt;c__async30">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__3()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__4()" attrs="145">\r
-        <size>10</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_2&gt;c__async37">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>355</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__5()" attrs="145">\r
-        <size>10</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewInitTest_2&gt;c__async31">\r
-      <method name="System.String &lt;&gt;m__0()" attrs="145">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_3&gt;c__async38">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>246</size>\r
       </method>\r
-      <method name="System.String &lt;&gt;m__1()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__3()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_1&gt;c__async32">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-    </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_2&gt;c__async33">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_4&gt;c__async39">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>427</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_3&gt;c__async34">\r
-      <method name="Byte &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_4&gt;c__async35">\r
-      <method name="UInt16 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="UInt16 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_5&gt;c__async3A">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>264</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_5&gt;c__async36">\r
-      <method name="S &lt;&gt;m__0()" attrs="145">\r
-        <size>25</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_6&gt;c__async37">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_6&gt;c__async3B">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>266</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester">\r
-      <method name="System.Threading.Tasks.Task`1[System.Boolean] NewArrayInitTest_7()" attrs="129">\r
-        <size>33</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_7&gt;c__async38">\r
+    <type name="Tester+&lt;NewArrayInitTest_7&gt;c__async3C">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>299</size>\r
       </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
     </type>\r
-    <type name="Tester+&lt;PropertyTest_1&gt;c__async39">\r
+    <type name="Tester+&lt;PropertyTest_1&gt;c__async3D">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>222</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;PropertyTest_2&gt;c__async3A">\r
+    <type name="Tester+&lt;PropertyTest_2&gt;c__async3E">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>295</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;PropertyTest_3&gt;c__async3B">\r
+    <type name="Tester+&lt;PropertyTest_3&gt;c__async3F">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>645</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__2()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;StringConcatTest_1&gt;c__async3C">\r
+    <type name="Tester+&lt;StringConcatTest_1&gt;c__async40">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>455</size>\r
       </method>\r
-      <method name="System.String &lt;&gt;m__0()" attrs="145">\r
-        <size>13</size>\r
-      </method>\r
-      <method name="System.String &lt;&gt;m__1()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
-      <method name="System.String &lt;&gt;m__2()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
     </type>\r
-    <type name="Tester+&lt;UnaryTest_1&gt;c__async3D">\r
+    <type name="Tester+&lt;UnaryTest_1&gt;c__async41">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>233</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;UnaryTest_2&gt;c__async3E">\r
+    <type name="Tester+&lt;UnaryTest_2&gt;c__async42">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>339</size>\r
       </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
     </type>\r
-    <type name="Tester+&lt;UnaryTest_3&gt;c__async3F">\r
+    <type name="Tester+&lt;UnaryTest_3&gt;c__async43">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>372</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;VariableInitializer_1&gt;c__async40">\r
+    <type name="Tester+&lt;VariableInitializer_1&gt;c__async44">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>348</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Int32 &lt;&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4+&lt;ArrayAccessTest_5&gt;c__AnonStorey41">\r
+    <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4+&lt;ArrayAccessTest_5&gt;c__AnonStorey45">\r
       <method name="Int32 &lt;&gt;m__0()" attrs="131">\r
         <size>25</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_2&gt;c__asyncD+&lt;BinaryTest_2&gt;c__AnonStorey42">\r
+    <type name="Tester+&lt;BinaryTest_2&gt;c__asyncF+&lt;BinaryTest_2&gt;c__AnonStorey46">\r
       <method name="Boolean &lt;&gt;m__0()" attrs="131">\r
         <size>24</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_5&gt;c__async16+&lt;CallTest_5&gt;c__AnonStorey43">\r
+    <type name="Tester+&lt;CallTest_5&gt;c__async18+&lt;CallTest_5&gt;c__AnonStorey47">\r
       <method name="Int32 &lt;&gt;m__0()" attrs="131">\r
         <size>25</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;EventInvoke_1&gt;c__async20+&lt;EventInvoke_1&gt;c__AnonStorey44">\r
+    <type name="Tester+&lt;EventInvoke_1&gt;c__async22+&lt;EventInvoke_1&gt;c__AnonStorey48">\r
       <method name="System.Action &lt;&gt;m__0()" attrs="131">\r
         <size>23</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_3&gt;c__async24+&lt;IndexerTest_3&gt;c__AnonStorey45">\r
+    <type name="Tester+&lt;IndexerTest_3&gt;c__async26+&lt;IndexerTest_3&gt;c__AnonStorey49">\r
       <method name="Int32 &lt;&gt;m__0()" attrs="131">\r
         <size>25</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_4&gt;c__async25+&lt;IndexerTest_4&gt;c__AnonStorey46">\r
+    <type name="Tester+&lt;IndexerTest_4&gt;c__async27+&lt;IndexerTest_4&gt;c__AnonStorey4A">\r
       <method name="Int32 &lt;&gt;m__0()" attrs="131">\r
         <size>25</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_5&gt;c__async26+&lt;IndexerTest_5&gt;c__AnonStorey47">\r
+    <type name="Tester+&lt;IndexerTest_5&gt;c__async28+&lt;IndexerTest_5&gt;c__AnonStorey4B">\r
       <method name="Int32 &lt;&gt;m__0()" attrs="131">\r
         <size>25</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_7&gt;c__async28+&lt;IndexerTest_7&gt;c__AnonStorey48">\r
+    <type name="Tester+&lt;IndexerTest_7&gt;c__async2A+&lt;IndexerTest_7&gt;c__AnonStorey4C">\r
       <method name="Int32 &lt;&gt;m__0()" attrs="131">\r
         <size>25</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;UnaryTest_2&gt;c__async3E+&lt;UnaryTest_2&gt;c__AnonStorey49">\r
+    <type name="Tester+&lt;UnaryTest_2&gt;c__async42+&lt;UnaryTest_2&gt;c__AnonStorey4D">\r
       <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0()" attrs="131">\r
         <size>14</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Base">\r
-      <method name="Void CallRefParams(Int32 ByRef, Int32[])" attrs="148">\r
-        <size>5</size>\r
+    <type name="Tester">\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>45</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, Boolean)" attrs="145">\r
+        <size>12</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_1&gt;c__async0">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Boolean &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_2&gt;c__async1">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Double &lt;&gt;m__3(System.Object)" attrs="145">\r
+        <size>17</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_3&gt;c__async2">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
-      <method name="System.Decimal &lt;&gt;m__2()" attrs="145">\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="System.Decimal &lt;&gt;m__2(System.Object)" attrs="145">\r
         <size>19</size>\r
       </method>\r
-      <method name="System.Decimal &lt;&gt;m__4()" attrs="145">\r
+      <method name="Int32 &lt;&gt;m__3(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="System.Decimal &lt;&gt;m__4(System.Object)" attrs="145">\r
         <size>19</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_4&gt;c__async3">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_6&gt;c__async5">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int64 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_7&gt;c__async6">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_8&gt;c__async7">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Byte &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_9&gt;c__async8">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;AssignTest_1&gt;c__async9">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;AssignTest_2&gt;c__asyncA">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;AssignTest_3&gt;c__asyncB">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__3(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__4(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__5(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="S &lt;&gt;m__6(System.Object)" attrs="145">\r
+        <size>25</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_1&gt;c__asyncC">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_10&gt;c__async9">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_2&gt;c__asyncD">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;ArrayAccessTest_11&gt;c__asyncA">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_3&gt;c__asyncE">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;AssignTest_1&gt;c__asyncB">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_4&gt;c__asyncF">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;AssignTest_2&gt;c__asyncC">\r
+      <method name="System.Nullable`1[System.SByte] &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>17</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_5&gt;c__async10">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;AssignTest_3&gt;c__asyncD">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;BinaryTest_6&gt;c__async11">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;BinaryTest_1&gt;c__asyncE">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_1&gt;c__async12">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;BinaryTest_3&gt;c__async10">\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__3(System.Object)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__4(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__5(System.Object)" attrs="145">\r
+        <size>14</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_2&gt;c__async13">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;BinaryTest_4&gt;c__async11">\r
+      <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Byte] &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__3(System.Object)" attrs="145">\r
+        <size>17</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_3&gt;c__async14">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;CallTest_1&gt;c__async14">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_4&gt;c__async15">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;CallTest_2&gt;c__async15">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>17</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CallTest_5&gt;c__async16">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;CallTest_3&gt;c__async16">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CastTest_1&gt;c__async17">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;CallTest_4&gt;c__async17">\r
+      <method name="E &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
-      <method name="System.Decimal &lt;&gt;m__0()" attrs="145">\r
+    </type>\r
+    <type name="Tester+&lt;CastTest_1&gt;c__async19">\r
+      <method name="System.Decimal &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>15</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CastTest_2&gt;c__async18">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+    <type name="Tester+&lt;CoalescingTest_1&gt;c__async1B">\r
+      <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CoalescingTest_1&gt;c__async19">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;CoalescingTest_2&gt;c__async1C">\r
+      <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="Byte &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;CoalescingTest_2&gt;c__async1A">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;ConditionalTest_1&gt;c__async1D">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ConditionalTest_1&gt;c__async1B">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;ConditionalTest_2&gt;c__async1E">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ConditionalTest_2&gt;c__async1C">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;ConditionalTest_3&gt;c__async1F">\r
+      <method name="Boolean &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ConditionalTest_3&gt;c__async1D">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;ConditionalTest_4&gt;c__async20">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;ConditionalTest_4&gt;c__async1E">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;DelegateInvoke_4&gt;c__async21">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>11</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;DelegateInvoke_4&gt;c__async1F">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;FieldTest_1&gt;c__async23">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;EventInvoke_1&gt;c__async20">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;IndexerTest_1&gt;c__async24">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;FieldTest_1&gt;c__async21">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;IndexerTest_2&gt;c__async25">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_1&gt;c__async22">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;IndexerTest_3&gt;c__async26">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_2&gt;c__async23">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;IndexerTest_4&gt;c__async27">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_3&gt;c__async24">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;IndexerTest_5&gt;c__async28">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_4&gt;c__async25">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;IndexerTest_6&gt;c__async29">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_5&gt;c__async26">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+    <type name="Tester+&lt;IsTest_1&gt;c__async2B">\r
+      <method name="Tester &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_6&gt;c__async27">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;IsTest_2&gt;c__async2C">\r
+      <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>14</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IndexerTest_7&gt;c__async28">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+    <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2D">\r
+      <method name="Base &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;IsTest_1&gt;c__async29">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="Base &lt;&gt;m__1(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;IsTest_2&gt;c__async2A">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+    <type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2E">\r
+      <method name="Base &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2B">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+    <type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2F">\r
+      <method name="Base &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2C">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="Base &lt;&gt;m__1(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2D">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewTest_1&gt;c__async30">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewTest_1&gt;c__async2E">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+    <type name="Tester+&lt;NewTest_2&gt;c__async31">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewTest_2&gt;c__async2F">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewDelegate_1_0&gt;c__async33">\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewInitTest_1&gt;c__async30">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewInitTest_1&gt;c__async34">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__3(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__4(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__5(System.Object)" attrs="145">\r
+        <size>10</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewInitTest_2&gt;c__async31">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+    <type name="Tester+&lt;NewInitTest_2&gt;c__async35">\r
+      <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_1&gt;c__async32">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__3(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_2&gt;c__async33">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_1&gt;c__async36">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_3&gt;c__async34">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_2&gt;c__async37">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_4&gt;c__async35">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_3&gt;c__async38">\r
+      <method name="Byte &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_5&gt;c__async36">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_4&gt;c__async39">\r
+      <method name="UInt16 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="UInt16 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_6&gt;c__async37">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_5&gt;c__async3A">\r
+      <method name="S &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>25</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;NewArrayInitTest_7&gt;c__async38">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;NewArrayInitTest_6&gt;c__async3B">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;PropertyTest_1&gt;c__async39">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;PropertyTest_1&gt;c__async3D">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;PropertyTest_2&gt;c__async3A">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;PropertyTest_2&gt;c__async3E">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;PropertyTest_3&gt;c__async3B">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;PropertyTest_3&gt;c__async3F">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;StringConcatTest_1&gt;c__async3C">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+    <type name="Tester+&lt;StringConcatTest_1&gt;c__async40">\r
+      <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;UnaryTest_1&gt;c__async3D">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
+      <method name="System.String &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
     </type>\r
-    <type name="Tester+&lt;UnaryTest_2&gt;c__async3E">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;UnaryTest_1&gt;c__async41">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;UnaryTest_3&gt;c__async3F">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;UnaryTest_3&gt;c__async43">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
-    <type name="Tester+&lt;VariableInitializer_1&gt;c__async40">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+    <type name="Tester+&lt;VariableInitializer_1&gt;c__async44">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>214</size>\r
       </method>\r
-      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0()" attrs="145">\r
-        <size>33</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestResult&gt;c__async0">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;Main&gt;c__async1">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>33</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;TestResult&gt;c__async0">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;Main&gt;c__async1">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
   </test>\r
         <size>33</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>82</size>\r
+        <size>107</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
     </type>\r
     <type name="Tester+&lt;NewInitTestGen&gt;c__async0`1[T]">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>306</size>\r
+        <size>295</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="S2">\r
+      <method name="Void Add(Int32)" attrs="134">\r
+        <size>36</size>\r
+      </method>\r
+      <method name="System.Collections.IEnumerator GetEnumerator()" attrs="486">\r
+        <size>20</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] NewInitCol()" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;NewInitCol&gt;c__async1">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>370</size>\r
       </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="Tester+&lt;NewInitTestGen&gt;c__async0`1[T]">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;NewInitCol&gt;c__async1">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-16.cs">\r
     <type name="Base">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>187</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(Boolean)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;SwitchTest_1&gt;c__async0">\r
-      <method name="System.String &lt;&gt;m__0()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;Using_1&gt;c__async1">\r
-      <method name="Base &lt;&gt;m__0()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
-      <method name="Tester &lt;&gt;m__1()" attrs="145">\r
+    </type>\r
+    <type name="Tester+&lt;Foreach_1&gt;c__async2">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
-      <method name="Base &lt;&gt;m__2()" attrs="145">\r
-        <size>13</size>\r
+    </type>\r
+    <type name="Tester">\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>20</size>\r
       </method>\r
-      <method name="Base &lt;&gt;m__3()" attrs="145">\r
-        <size>13</size>\r
+      <method name="System.String &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
       </method>\r
-    </type>\r
-    <type name="Tester+&lt;Foreach_1&gt;c__async2">\r
-      <method name="System.Collections.Generic.List`1[System.Int32] &lt;&gt;m__0()" attrs="145">\r
-        <size>36</size>\r
+      <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, Boolean)" attrs="145">\r
+        <size>12</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;SwitchTest_1&gt;c__async0">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;Using_1&gt;c__async1">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="Base &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="Tester &lt;&gt;m__1(System.Object)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="Base &lt;&gt;m__2(System.Object)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="Base &lt;&gt;m__3(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;Foreach_1&gt;c__async2">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="System.Collections.Generic.List`1[System.Int32] &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>36</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>187</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(Boolean)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_1&gt;c__async0">\r
-      <method name="Void &lt;&gt;m__0()" attrs="145">\r
-        <size>7</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_2&gt;c__async1">\r
-      <method name="Void &lt;&gt;m__0()" attrs="145">\r
-        <size>7</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_3&gt;c__async2">\r
-      <method name="System.Threading.Tasks.Task &lt;&gt;m__0()" attrs="145">\r
-        <size>33</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_4&gt;c__async3">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_5&gt;c__async4">\r
-      <method name="Void &lt;&gt;m__0()" attrs="145">\r
-        <size>7</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_6&gt;c__async5">\r
-      <method name="Void &lt;&gt;m__0()" attrs="145">\r
-        <size>7</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_7&gt;c__async6">\r
-      <method name="Void &lt;&gt;m__0()" attrs="145">\r
-        <size>7</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_3&gt;c__async2+&lt;TestException_3&gt;c__async7">\r
-      <method name="Void &lt;&gt;m__0()" attrs="145">\r
-        <size>7</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester">\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, Boolean)" attrs="145">\r
+        <size>12</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_1&gt;c__async0">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_2&gt;c__async1">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_3&gt;c__async2">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="System.Threading.Tasks.Task &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>33</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_4&gt;c__async3">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_5&gt;c__async4">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_6&gt;c__async5">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_7&gt;c__async6">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;TestException_3&gt;c__async2+&lt;TestException_3&gt;c__async7">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>187</size>\r
       </method>\r
-      <method name="Boolean &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="System.String &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__3(Boolean)" attrs="145">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;Add_1&gt;c__async0">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;AssignCompound_1&gt;c__async1">\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;Convert_1&gt;c__async2">\r
-      <method name="System.Object &lt;&gt;m__0()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;Invocation_1&gt;c__async3">\r
-      <method name="System.Object &lt;&gt;m__0()" attrs="145">\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="Tester">\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="System.String &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, Boolean)" attrs="145">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
     <type name="Tester+&lt;Add_1&gt;c__async0">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;AssignCompound_1&gt;c__async1">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;Convert_1&gt;c__async2">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="System.Object &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;Invocation_1&gt;c__async3">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+      <method name="System.Object &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     </type>\r
     <type name="A+&lt;async&gt;c__async1">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>38</size>\r
+        <size>63</size>\r
       </method>\r
     </type>\r
     <type name="A">\r
       <method name="Void M1()" attrs="145">\r
         <size>92</size>\r
       </method>\r
-      <method name="Void &lt;M1&gt;m__0(Int32)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;M1&gt;m__1(Int32)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void &lt;M1&gt;m__2(Int32)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="A+&lt;async&gt;c__async2">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>37</size>\r
+        <size>62</size>\r
       </method>\r
     </type>\r
     <type name="A+&lt;CastTest&gt;c__async3">\r
     </type>\r
     <type name="A+async&gt;c__async0">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>31</size>\r
+        <size>61</size>\r
       </method>\r
     </type>\r
     <type name="D">\r
     </type>\r
     <type name="D+&lt;M&gt;c__async0">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>31</size>\r
+        <size>61</size>\r
       </method>\r
     </type>\r
     <type name="asyncAttribute+async">\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="AwaitNS.TypeChecks">\r
+      <method name="Void M(System.Object)" attrs="145">\r
+        <size>19</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="AwaitNS.Formals">\r
+      <method name="Void &lt;M1&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;M1&gt;m__1(System.Object, Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void &lt;M1&gt;m__2(System.Object, Int32)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-23.cs">\r
     <type name="MyContext">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>197</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>21</size>\r
-      </method>\r
     </type>\r
     <type name="MyContext">\r
       <method name="Void .ctor(ManualResetEvent)" attrs="6278">\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>21</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-async-24.cs">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>275</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-async-25.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Int32 &lt;CompilationTestOnly&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>15</size>\r
       </method>\r
     </type>\r
+    <type name="Program">\r
+      <method name="Int32 &lt;CompilationTestOnly&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-26.cs">\r
     <type name="ConsoleApplication1.Program">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>95</size>\r
       </method>\r
-      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0()" attrs="145">\r
-        <size>47</size>\r
-      </method>\r
-      <method name="Int32 &lt;Main&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="ConsoleApplication1.Program">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>47</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-27.cs">\r
     <type name="MainClass">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>196</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-async-28.cs">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>282</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0(Int32)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-async-29.cs">\r
     </type>\r
     <type name="C+&lt;Test2&gt;c__async1">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>59</size>\r
+        <size>89</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;Test&gt;c__async0">\r
         <size>33</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>178</size>\r
-      </method>\r
-      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0()" attrs="145">\r
-        <size>33</size>\r
-      </method>\r
-      <method name="Boolean &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">\r
-        <size>24</size>\r
+        <size>409</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>165</size>\r
       </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
     </type>\r
-    <type name="N.M.C+&lt;Main&gt;c__async1">\r
+    <type name="N.M.C">\r
+      <method name="System.Threading.Tasks.Task NestedAsyncAnonymousMethod()" attrs="150">\r
+        <size>33</size>\r
+      </method>\r
+    </type>\r
+    <type name="N.M.C+&lt;NestedAsyncAnonymousMethod&gt;c__async1">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>162</size>\r
+        <size>194</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="N.M.C+&lt;AsyncMethod&gt;c__async0">\r
+    <type name="N.M.C+&lt;NestedAsyncAnonymousMethod&gt;c__async1+&lt;NestedAsyncAnonymousMethod&gt;c__async2">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>159</size>\r
+      </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
-    <type name="N.M.C+&lt;Main&gt;c__async1">\r
+    <type name="N.M.C+&lt;Main&gt;c__async3">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>162</size>\r
+      </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="N.M.C">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>24</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Type)" attrs="145">\r
+        <size>24</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__3(System.Object, System.Reflection.MethodInfo)" attrs="145">\r
+        <size>24</size>\r
+      </method>\r
+    </type>\r
+    <type name="N.M.C+&lt;NestedAsyncAnonymousMethod&gt;c__async1">\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>27</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-36.cs">\r
     <type name="X">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>272</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>7</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-async-38.cs">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>220</size>\r
       </method>\r
-      <method name="Void &lt;&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-async-40.cs">\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>196</size>\r
       </method>\r
-      <method name="Void &lt;&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Program">\r
-      <method name="Void &lt;Main&gt;m__0(C)" attrs="145">\r
+      <method name="Void &lt;Main&gt;m__0(System.Object, C)" attrs="145">\r
         <size>35</size>\r
       </method>\r
     </type>\r
     <type name="Program+&lt;Main&gt;c__async1">\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
+      <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
       </method>\r
     </type>\r
   </test>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Int32 &lt;ReturnOne&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>191</size>\r
       </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
     </type>\r
-    <type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0+&lt;NestedVoidTestSuccess&gt;c__async4">\r
-      <method name="Void MoveNext()" attrs="486">\r
-        <size>162</size>\r
+    <type name="AmbiguousGeneric">\r
+      <method name="Int32 &lt;ReturnOne&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
       </method>\r
     </type>\r
     <type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0">\r
-      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;&gt;m__0()" attrs="145">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;&gt;m__0(System.Object)" attrs="145">\r
         <size>33</size>\r
       </method>\r
-      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
-        <size>13</size>\r
-      </method>\r
     </type>\r
-    <type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0+&lt;NestedVoidTestSuccess&gt;c__async4">\r
+    <type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0+&lt;NestedVoidTestSuccess&gt;c__async5">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>162</size>\r
+      </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="C+&lt;Test&gt;c__async0">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>60</size>\r
+        <size>90</size>\r
       </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
     </type>\r
     <type name="App+&lt;Test&gt;c__async1">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>51</size>\r
+        <size>76</size>\r
       </method>\r
     </type>\r
     <type name="App+&lt;Test&gt;c__async0">\r
     </type>\r
     <type name="Program+&lt;LoadPlayers&gt;c__async0">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>87</size>\r
+        <size>117</size>\r
       </method>\r
     </type>\r
     <type name="Program">\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
-      <method name="Void &lt;&gt;m__0(Player)" attrs="145">\r
+      <method name="Void &lt;&gt;m__0(System.Object, Player)" attrs="145">\r
         <size>2</size>\r
       </method>\r
     </type>\r
       <method name="System.Threading.Tasks.Task Throw()" attrs="145">\r
         <size>33</size>\r
       </method>\r
-      <method name="System.Threading.Tasks.Task &lt;Main&gt;m__0()" attrs="145">\r
-        <size>33</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="System.Threading.Tasks.Task &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-53.cs">\r
     <type name="Y">\r
     </type>\r
     <type name="X+&lt;Foo&gt;c__AnonStorey1+&lt;Foo&gt;c__async0">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>43</size>\r
+        <size>73</size>\r
       </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
     </type>\r
     <type name="B+&lt;GetAsync&gt;c__async0">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>49</size>\r
+        <size>74</size>\r
       </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
     </type>\r
     <type name="X+&lt;AddItemAt&gt;c__async1">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>43</size>\r
+        <size>68</size>\r
       </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
     </type>\r
     <type name="X+&lt;Foo&gt;c__async6">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>100</size>\r
+        <size>130</size>\r
       </method>\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-async-63.cs">\r
+    <type name="C">\r
+      <method name="System.Threading.Tasks.Task TestSingleAwait(Boolean)" attrs="150">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task TestDoubleAwait(Boolean)" attrs="150">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task Call()" attrs="145">\r
+        <size>48</size>\r
+      </method>\r
+      <method name="Void HH()" attrs="129">\r
+        <size>12</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>152</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;TestSingleAwait&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>274</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;TestDoubleAwait&gt;c__async1">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>419</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Boolean &lt;Call&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-64.cs">\r
+    <type name="X">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>37</size>\r
+      </method>\r
+      <method name="T Invoke[T](System.Func`1[System.Threading.Tasks.Task`1[T]])" attrs="145">\r
+        <size>18</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;Main&gt;c__async2">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>167</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="X">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object)" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-65.cs">\r
+    <type name="C">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>161</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;TestRethrow&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>363</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="System.Threading.Tasks.Task TestRethrow(System.Exception)" attrs="150">\r
+        <size>41</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-66.cs">\r
+    <type name="TestFinally">\r
+      <method name="System.Threading.Tasks.Task Test(Boolean)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>95</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="TestFinally+&lt;Test&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>277</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-67.cs">\r
+    <type name="Test">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32[]] Run()" attrs="150">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>53</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;Run&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>239</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-69.cs">\r
+    <type name="Test">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] YieldValue(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] TestFinallyWithReturn(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task TestFinallyWithReturnNoValue(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] TestFinallyWithGoto(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] TestFinallyWithGotoAndReturn(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>390</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;YieldValue&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>172</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestFinallyWithReturn&gt;c__async1">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>377</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestFinallyWithReturnNoValue&gt;c__async2">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>347</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestFinallyWithGoto&gt;c__async3">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>370</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestFinallyWithGotoAndReturn&gt;c__async4">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>407</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-70.cs">\r
+    <type name="Test">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] YieldValue(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] TestNestedReturn(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] TestNestedGoto(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>109</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;YieldValue&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>172</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestNestedReturn&gt;c__async1">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>845</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestNestedGoto&gt;c__async2">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>848</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-71.cs">\r
+    <type name="UnsafeContext">\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] TestUnsafe(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="UnsafeContext+&lt;TestUnsafe&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>178</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-72.cs">\r
+    <type name="Test">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] YieldValue(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] BreakTest()" attrs="150">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] ContinueTest()" attrs="150">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>64</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;YieldValue&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>172</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;BreakTest&gt;c__async1">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>898</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;ContinueTest&gt;c__async2">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>898</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-73.cs">\r
+    <type name="X">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] Foo()" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] Throws()" attrs="145">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>32</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;Foo&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>214</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;Throws&gt;c__async1">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>63</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-74.cs">\r
+    <type name="AwaitGotoBug">\r
+      <method name="System.Threading.Tasks.Task Test()" attrs="134">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="Void Main()" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="AwaitGotoBug+&lt;Test&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>337</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="test-cls-00.cs">\r
     <type name="CLSCLass_6">\r
       <method name="Void add_Disposed(Delegate)" attrs="2182">\r
       <method name="Void Test_Capturing_1(Int32)" attrs="129">\r
         <size>28</size>\r
       </method>\r
-      <method name="Void &lt;Test_1&gt;m__0()" attrs="145">\r
-        <size>6</size>\r
-      </method>\r
-      <method name="Void &lt;Test_2&gt;m__1()" attrs="145">\r
-        <size>7</size>\r
-      </method>\r
-      <method name="Void &lt;Test_3&gt;m__2()" attrs="145">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>14</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;Test_1&gt;m__0(System.Object)" attrs="145">\r
+        <size>6</size>\r
+      </method>\r
+      <method name="Void &lt;Test_2&gt;m__1(System.Object)" attrs="145">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Void &lt;Test_3&gt;m__2(System.Object)" attrs="145">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-debug-15.cs">\r
     <type name="Foo">\r
       <method name="Void Test_4()" attrs="129">\r
         <size>485</size>\r
       </method>\r
-      <method name="Int32 &lt;Test_4&gt;m__0()" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Int32 &lt;Test_4&gt;m__0(System.Object)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-debug-19.cs">\r
     <type name="C">\r
       <method name="System.Threading.Tasks.Task`1[System.Boolean] Test_3()" attrs="129">\r
         <size>33</size>\r
       </method>\r
-      <method name="Void &lt;RunAsync&gt;m__0()" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Int32 &lt;RunAsync_2&gt;m__1()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>1229</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__0()" attrs="145">\r
-        <size>9</size>\r
-      </method>\r
     </type>\r
     <type name="C+&lt;Test_1&gt;c__async0">\r
       <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="Void &lt;RunAsync&gt;m__0(System.Object)" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Int32 &lt;RunAsync_2&gt;m__1(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test_3&gt;c__async2">\r
+      <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-debug-20.cs">\r
     <type name="S`1[T]">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Program &lt;Test_4&gt;m__0()" attrs="145">\r
-        <size>13</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Program &lt;Test_4&gt;m__0(System.Object)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-debug-24.cs">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-ex-filter-03.cs">\r
+    <type name="X">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>52</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-ex-filter-04.cs">\r
+    <type name="X">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>253</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] Test(Int32, System.Exception)" attrs="145">\r
+        <size>49</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] TestGeneric(Int32)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Void .cctor()" attrs="6289">\r
+        <size>11</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;Test&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>281</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;TestGeneric&gt;c__async1">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>250</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-ex-filter-05.cs">\r
+    <type name="Test">\r
+      <method name="Boolean Verify(System.Func`1[System.Boolean])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] TestCapturedException(System.Exception)" attrs="145">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>64</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestCapturedException&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>491</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestCapturedException&gt;c__async0+&lt;TestCapturedException&gt;c__AnonStorey1">\r
+      <method name="Boolean &lt;&gt;m__0()" attrs="131">\r
+        <size>29</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestCapturedException&gt;c__async0+&lt;TestCapturedException&gt;c__AnonStorey2">\r
+      <method name="Boolean &lt;&gt;m__0()" attrs="131">\r
+        <size>25</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-ex-filter-06.cs">\r
+    <type name="C">\r
+      <method name="Int32 Test[T]()" attrs="145">\r
+        <size>61</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>49</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-expression-bodied-01.cs">\r
+    <type name="C">\r
+      <method name="System.String Test1(System.String, System.String)" attrs="150">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="Void Test2(Int32)" attrs="129">\r
+        <size>8</size>\r
+      </method>\r
+      <method name="System.Func`1[System.Int32] Test3(Int32)" attrs="129">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="System.String op_Implicit(C)" attrs="2198">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="System.String get_Prop()" attrs="2180">\r
+        <size>30</size>\r
+      </method>\r
+      <method name="System.Func`1[System.String] get_Prop2()" attrs="2193">\r
+        <size>37</size>\r
+      </method>\r
+      <method name="Int32 get_Item(Int32, Int32)" attrs="2182">\r
+        <size>11</size>\r
+      </method>\r
+      <method name="Int32 Check()" attrs="129">\r
+        <size>213</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>21</size>\r
+      </method>\r
+      <method name="System.String &lt;get_Prop2&gt;m__0(System.Object)" attrs="145">\r
+        <size>13</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>29</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test3&gt;c__AnonStorey0">\r
+      <method name="Int32 &lt;&gt;m__0()" attrs="131">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="test-externalias-01.cs">\r
     <type name="Test">\r
       <method name="Int32 Main()" attrs="150">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-null-operator-01.cs">\r
+    <type name="S">\r
+      <method name="Int32 get_Prop()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_Prop(Int32)" attrs="2182">\r
+        <size>8</size>\r
+      </method>\r
+    </type>\r
+    <type name="CI">\r
+      <method name="Int32 Method()" attrs="486">\r
+        <size>11</size>\r
+      </method>\r
+      <method name="Int32 get_Prop()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_Prop(Int32)" attrs="2182">\r
+        <size>8</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="System.String get_Prop()" attrs="2193">\r
+        <size>22</size>\r
+      </method>\r
+      <method name="Int32 TestArray()" attrs="145">\r
+        <size>349</size>\r
+      </method>\r
+      <method name="Int32 TestReferenceType()" attrs="145">\r
+        <size>231</size>\r
+      </method>\r
+      <method name="Int32 TestGeneric[T](T)" attrs="145">\r
+        <size>58</size>\r
+      </method>\r
+      <method name="Int32 TestNullable()" attrs="145">\r
+        <size>384</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>120</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-null-operator-02.cs">\r
+    <type name="CI">\r
+      <method name="Int32 get_Prop()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_Prop(Int32)" attrs="2182">\r
+        <size>8</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Byte] get_PropNullable()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_PropNullable(System.Nullable`1[System.Byte])" attrs="2182">\r
+        <size>8</size>\r
+      </method>\r
+      <method name="System.String get_PropReference()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_PropReference(System.String)" attrs="2182">\r
+        <size>8</size>\r
+      </method>\r
+      <method name="Void add_ev1(System.Action)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void remove_ev1(System.Action)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>86</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Int32 TestProperty()" attrs="145">\r
+        <size>168</size>\r
+      </method>\r
+      <method name="Int32 TestField()" attrs="145">\r
+        <size>168</size>\r
+      </method>\r
+      <method name="Int32 TestEvent()" attrs="145">\r
+        <size>50</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-null-operator-03.cs">\r
+    <type name="C">\r
+      <method name="Int32 Test1()" attrs="129">\r
+        <size>62</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>62</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-null-operator-04.cs">\r
+    <type name="D">\r
+      <method name="Void Foo()" attrs="129">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Main()" attrs="150">\r
+        <size>27</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-null-operator-05.cs">\r
+    <type name="CI">\r
+      <method name="Void set_Item(System.String, System.String)" attrs="2182">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="System.String get_Item(System.String)" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_Item(Int32, System.Nullable`1[System.Int32])" attrs="2182">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Int32] get_Item(Int32)" attrs="2182">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Int32 TestArrayAccess()" attrs="145">\r
+        <size>114</size>\r
+      </method>\r
+      <method name="Int32 TestIndexerAccess()" attrs="145">\r
+        <size>93</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>64</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="test-partial-01.cs">\r
     <type name="Foo.Hello">\r
       <method name="Void .ctor()" attrs="6278">\r
       <method name="Void Test()" attrs="134">\r
         <size>43</size>\r
       </method>\r
-      <method name="Void &lt;Test&gt;m__0()" attrs="145">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Mono.Sms.Main">\r
+      <method name="Void &lt;Test&gt;m__0(System.Object)" attrs="145">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-partial-22.cs">\r
     <type name="C">\r
     </type>\r
   </test>\r
   <test name="test-partial-26.cs">\r
-    <type name="ConsoleApplication1.X">\r
-      <method name="Void Foo()" attrs="129">\r
+    <type name="TestAttributesCollecting.A">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="TestAttributesCollecting.X">\r
+      <method name="Void Foo[T](Int32)" attrs="129">\r
         <size>2</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="ConsoleApplication1.Y">\r
+    <type name="TestAttributesCollecting.Y">\r
       <method name="Void Foo()" attrs="129">\r
         <size>2</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="ConsoleApplication1.Program">\r
+    <type name="TestAttributesCollecting.Program">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>116</size>\r
+        <size>151</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   <test name="test-primary-ctor-01.cs">\r
     <type name="Simple">\r
       <method name="Int32 get_Property()" attrs="2177">\r
-        <size>15</size>\r
+        <size>14</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>89</size>\r
         <size>8</size>\r
       </method>\r
       <method name="System.Decimal get_Property()" attrs="2179">\r
-        <size>15</size>\r
+        <size>14</size>\r
       </method>\r
     </type>\r
   </test>\r
   <test name="test-primary-ctor-02.cs">\r
     <type name="Part">\r
       <method name="Int32 get_Property()" attrs="2177">\r
-        <size>22</size>\r
+        <size>14</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>41</size>\r
       </method>\r
       <method name="Void .ctor(String)" attrs="6278">\r
-        <size>56</size>\r
+        <size>9</size>\r
       </method>\r
       <method name="Void .ctor(Int32)" attrs="6278">\r
-        <size>21</size>\r
+        <size>20</size>\r
+      </method>\r
+      <method name="Void .cctor()" attrs="6289">\r
+        <size>7</size>\r
       </method>\r
     </type>\r
   </test>\r
   <test name="test-primary-ctor-03.cs">\r
     <type name="D">\r
       <method name="Void .ctor(String)" attrs="6278">\r
-        <size>15</size>\r
+        <size>8</size>\r
       </method>\r
     </type>\r
     <type name="Base">\r
       <method name="System.String get_Prop()" attrs="2182">\r
-        <size>20</size>\r
+        <size>14</size>\r
       </method>\r
       <method name="Void .ctor(Object)" attrs="6276">\r
-        <size>14</size>\r
+        <size>19</size>\r
       </method>\r
     </type>\r
     <type name="X">\r
   <test name="test-primary-ctor-04.cs">\r
     <type name="Derived">\r
       <method name="Void .ctor(Int32, Byte&amp;, Int32&amp;)" attrs="6278">\r
-        <size>31</size>\r
+        <size>24</size>\r
       </method>\r
     </type>\r
     <type name="Base">\r
     </type>\r
     <type name="X">\r
       <method name="Int32 get_P()" attrs="2182">\r
-        <size>15</size>\r
+        <size>14</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>66</size>\r
+        <size>63</size>\r
       </method>\r
       <method name="Void .ctor(Int32)" attrs="6278">\r
         <size>21</size>\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-primary-ctor-06.cs">\r
+    <type name="ID">\r
+      <method name="Void System.IDisposable.Dispose()" attrs="481">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="X">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-primary-ctor-07.cs">\r
+    <type name="S">\r
+      <method name="Void .ctor(Char)" attrs="6278">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Void .cctor()" attrs="6289">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void .ctor(Int32)" attrs="6278">\r
+        <size>8</size>\r
+      </method>\r
+    </type>\r
+    <type name="X">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>69</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-primary-ctor-08.cs">\r
+    <type name="S">\r
+      <method name="Void .ctor(Int32)" attrs="6278">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Void .ctor(Int32)" attrs="6278">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>62</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-primary-ctor-09.cs">\r
+    <type name="A">\r
+      <method name="Void .ctor(Func`2)" attrs="6278">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
+    <type name="PC">\r
+      <method name="Void .ctor(Int32)" attrs="6278">\r
+        <size>50</size>\r
+      </method>\r
+    </type>\r
+    <type name="X">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>70</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="PC+&lt;f1&gt;c__AnonStorey0">\r
+      <method name="Int32 &lt;&gt;m__0(Int32)" attrs="131">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Int32 &lt;&gt;m__1(Int32)" attrs="131">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-static-using-01.cs">\r
+    <type name="A.B.X">\r
+      <method name="Int32 Test()" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="C.M">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>28</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-static-using-02.cs">\r
+    <type name="A.B.X">\r
+      <method name="Int32 Test(System.Object)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="A.C.X">\r
+      <method name="Int32 Test(Int32)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="C.M">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>29</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-static-using-03.cs">\r
+    <type name="A.B.X">\r
+      <method name="Int32 Test(Int32)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="A.C.X">\r
+      <method name="Int32 Test(Int32)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="C.M">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>29</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-static-using-04.cs">\r
+    <type name="A.B.X">\r
+      <method name="Int32 Test(System.Object)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="A.C.X">\r
+      <method name="Int32 Test(Int32)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="C.M">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>34</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-static-using-05.cs">\r
+    <type name="Test">\r
+      <method name="Void Main()" attrs="145">\r
+        <size>56</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-static-using-06.cs">\r
+    <type name="A.B.X">\r
+      <method name="Int32 Test(System.Object)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="A.C.X">\r
+      <method name="Int32 Test[T](T)" attrs="150">\r
+        <size>47</size>\r
+      </method>\r
+    </type>\r
+    <type name="C.M">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>33</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="test-var-01.cs">\r
     <type name="Test">\r
       <method name="Int32 Main()" attrs="150">\r
index 30b7779f586d2534a89a3f9e72b4cb7c64cd0bc1..430f2c2c8851e6cc7a0d08e6c6ea532e8bc87ae1 100644 (file)
@@ -290,12 +290,28 @@ namespace Mono.Linker.Steps {
                        if (CheckProcessed (assembly))
                                return;
 
+                       ProcessModule (assembly);
+
                        MarkCustomAttributes (assembly);
 
                        foreach (ModuleDefinition module in assembly.Modules)
                                MarkCustomAttributes (module);
                }
 
+               void ProcessModule (AssemblyDefinition assembly)
+               {
+                       // Pre-mark <Module> if there is any methods as they need to be executed 
+                       // at assembly load time
+                       foreach (TypeDefinition type in assembly.MainModule.Types)
+                       {
+                               if (type.Name == "<Module>" && type.HasMethods)
+                               {
+                                       MarkType (type);
+                                       break;
+                               }
+                       }
+               }
+
                protected void MarkField (FieldReference reference)
                {
 //                     if (IgnoreScope (reference.DeclaringType.Scope))
index 739e1ff20df6c91bd0a125bf8fbbf75b6f8c77d9..98f0737d8acc308307a2aa69dc6e1421fbb10d76 100644 (file)
@@ -38,6 +38,7 @@
   -->
   <ItemGroup>
     <Reference Include="System" />
+    <Reference Include="System.Core" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
@@ -67,6 +68,7 @@
     <Compile Include="Mono.Linker\Pipeline.cs" />
     <Compile Include="Mono.Linker\TypePreserve.cs" />
     <Compile Include="Mono.Linker\XApiReader.cs" />
+    <Compile Include="Mono.Linker.Steps\TypeMapStep.cs" />
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="Descriptors\mscorlib.xml">
@@ -84,6 +86,9 @@
     <EmbeddedResource Include="Descriptors\System.Drawing.xml">
       <LogicalName>System.Drawing.xml</LogicalName>
     </EmbeddedResource>
+    <EmbeddedResource Include="Descriptors\System.Core.xml">
+      <LogicalName>System.Core.xml</LogicalName>
+    </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
     <None Include="Makefile" />
index 8d97f8dc1504b62d710c91111c05e999ed479cab..c4d71083cd531805cb93116ea521ac956623fff0 100644 (file)
@@ -217,6 +217,14 @@ namespace Mono.Linker {
                        case "mscorlib":
                        case "Accessibility":
                        case "Mono.Security":
+                               // WPF
+                       case "PresentationFramework":
+                       case "PresentationCore":
+                       case "WindowsBase":
+                       case "UIAutomationProvider":
+                       case "UIAutomationTypes":
+                       case "PresentationUI":
+                       case "ReachFramework":
                                return true;
                        default:
                                return name.Name.StartsWith ("System")
diff --git a/mcs/tools/mdoc/.gitignore b/mcs/tools/mdoc/.gitignore
new file mode 100644 (file)
index 0000000..a1077aa
--- /dev/null
@@ -0,0 +1,5 @@
+/Test/en.*/
+/Test/html.*/
+/Test/DocTest.*
+/.v2.txt
+/.v0.txt
index ec9d5a2a87d37a997decf3aa5b6dd288b4957cf5..f63dafc218f7deeb502104fff212fc2f549293a1 100644 (file)
@@ -20,7 +20,7 @@ cleanup:
 run-test-local: run-mono-shlib-cop-test
 
 run-mono-shlib-cop-test: $(the_lib) $(TEST_INPUT)
-       $(RUNTIME) $(the_lib) $(TEST_INPUT) | diff - test.dll.out
+       MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(the_lib) $(TEST_INPUT) | diff - test.dll.out
 
 $(TEST_INPUT) : test.cs
        $(CSCOMPILE) -target:library $< -out:$@
index d67d7b778c252d7b4c1627543fe39ac13fdc08f7..bfd106b7504d443bab109c1405a6b7fc5eb2a0fd 100644 (file)
@@ -42,8 +42,8 @@ namespace Mono.Unmanaged.Check {
                private static extern int g_module_close (IntPtr handle);
 
                // Warning
-               [DllImport ("libglib-2.0.so")]
-               private static extern void g_free (IntPtr mem);
+               [DllImport ("libMonoPosixHelper.so")]
+               private static extern int Mono_Posix_Stdlib_TMP_MAX ();
 
                // Error: no such library
                [DllImport ("does-not-exist")]
@@ -60,7 +60,7 @@ namespace Mono.Unmanaged.Check {
                Test ()
                {
                        g_module_close (IntPtr.Zero);
-                       g_free (IntPtr.Zero);
+                       Mono_Posix_Stdlib_TMP_MAX ();
                        Foo ();
                        RenameMe ();
                        DoesNotExist ();
index 61206632ce70172e459aa02a56a09da47e2bea64..26300cfe18efbbacf9a236a00ab6b06a4ba607a7 100644 (file)
@@ -1,4 +1,5 @@
 <configuration>
+       <dllmap dll="libMonoPosixHelper.so" target="../../../support/.libs/libMonoPosixHelper.so" />
        <dllmap dll="libgmodule-2.0.so" target="libgmodule-2.0.so.0"/>
        <dllmap dll="renamed-lib" target="libc.so.6"/>
 </configuration>
index d5698c3ef1bcef0b2acc12a604d9a3dd037c31ee..0700423d4dbf2baeb10018c47f95371198d9069d 100644 (file)
@@ -1,4 +1,4 @@
 error: in Mono.Unmanaged.Check.Test.Foo: Could not load library `does-not-exist': ./libdoes-not-exist.so: cannot open shared object file: No such file or directory
 error: in Mono.Unmanaged.Check.Test.RenameMe: library `libc.so.6' is missing symbol `RenameMe'
 error: in Mono.Unmanaged.Check.Test.DoesNotExist: library `libc.so.6' is missing symbol `DoesNotExist'
-warning: in Mono.Unmanaged.Check.Test.g_free: Library `libglib-2.0.so' might be a development library
+warning: in Mono.Unmanaged.Check.Test.Mono_Posix_Stdlib_TMP_MAX: Library `../../../support/.libs/libMonoPosixHelper.so' might be a development library
index 3f9965eeb41d52c2a9dc56fc9d25f0e41432b74d..bc70334412cd2a7ecbca9264ad4598d339d81342 100644 (file)
@@ -159,10 +159,10 @@ namespace Mono.XBuild.CommandLine {
                                var projectInstances = new List<ProjectInstance> ();
                                if (string.Equals (Path.GetExtension (projectFile), ".sln", StringComparison.OrdinalIgnoreCase)) {
                                        var parser = new SolutionParser ();
-                                       var root = ProjectRootElement.Create ();
+                                       var root = ProjectRootElement.Create (project_collection);
+                                       root.FullPath = projectFile;
                                        parser.ParseSolution (projectFile, project_collection, root, LogWarning);
-                                       foreach (var p in project_collection.LoadedProjects)
-                                               projectInstances.Add (p.CreateProjectInstance ());
+                                       projectInstances.Add (new Project (root, parameters.Properties, parameters.ToolsVersion, project_collection).CreateProjectInstance ());
                                } else {
                                        project = ProjectRootElement.Create (XmlReader.Create (projectFile, settings), project_collection);
                                        project.FullPath = projectFile;
@@ -170,7 +170,7 @@ namespace Mono.XBuild.CommandLine {
                                        projectInstances.Add (pi);
                                }
                                foreach (var projectInstance in projectInstances) {
-                                       var targets = parameters.Targets.Length == 0 ? projectInstance.DefaultTargets.ToArray () : parameters.Targets;
+                                       var targets = parameters.Targets.Length > 0 ? parameters.Targets : projectInstance.DefaultTargets.ToArray ();
                                        result = projectInstance.Build (targets, parameters.Loggers.Count > 0 ? parameters.Loggers : project_collection.Loggers);
                                        if (!result)
                                                break;
index 069a78eed6b4015b5bb5e70d1aeaa1f12ee30c54..61339b1a5cc54c0208bfdce507a971cbec418648 100644 (file)
@@ -7,6 +7,8 @@ BUILD_FRAMEWORK = Microsoft.Build.Framework.dll
 BUILD_NEW_ENGINE = Microsoft.Build.dll
 INSTALL_FRAMEWORK_VERSION = $(FRAMEWORK_VERSION)
 
+include ../xbuild/xbuild.make
+
 ifeq (3.5, $(FRAMEWORK_VERSION))
 NAME_SUFFIX = .v3.5
 ASSEMBLY_VERSION = 3.5.0.0
@@ -30,3 +32,13 @@ XBUILD_FRAMEWORKS_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETFramework/
 REDISTLIST_DIR=$(XBUILD_FRAMEWORKS_DIR)/v$(FRAMEWORK_VERSION)/RedistList
 #include $(XBUILD_DIR)/xbuild_targets.make
 
+install-local: install-extras
+
+install-extras: install-bin-data
+
+install-bin-data:
+       $(INSTALL_DATA) data/msbuild.rsp $(DESTDIR)$(XBUILD_BIN_DIR)
+
+EXTRA_DISTFILES = \
+       data/msbuild.rsp
+
index effba4bb8b682cd77853358cb10232713f28cbe7..7420a73f69a121b0e0c2aa0ac80cb8feea843694 100644 (file)
@@ -123,7 +123,11 @@ namespace Mono.XBuild.CommandLine {
                        StreamReader reader = new StreamReader (file);
                        string slnVersion = GetSlnFileVersion (reader);
                        if (slnVersion == "12.00")
+#if XBUILD_12
                                projects.DefaultToolsVersion = "12.0";
+#else
+                               projects.DefaultToolsVersion = "4.0";
+#endif
                        else if (slnVersion == "11.00")
                                projects.DefaultToolsVersion = "4.0";
                        else if (slnVersion == "10.00")
@@ -206,7 +210,7 @@ namespace Mono.XBuild.CommandLine {
 
                                if (!File.Exists (filename)) {
                                        RaiseWarning (0, String.Format ("Project file {0} referenced in the solution file, " +
-                                                               "not found. Ignoring.", filename));
+                                                               " not found. Ignoring.", filename));
                                        continue;
                                }
 
diff --git a/mcs/tools/msbuild/data/msbuild.rsp b/mcs/tools/msbuild/data/msbuild.rsp
new file mode 100644 (file)
index 0000000..9b9ce70
--- /dev/null
@@ -0,0 +1,3 @@
+# xbuild command line options specified here will be used
+# by xbuild on every build, unless /noautoresponse is passed
+# on the command line.
index 31d53299aa7073bba3344d097613c6bcab49ecc7..5e8dd82bd0a4cc507a116193f215b5f0e967b128 100644 (file)
@@ -47,6 +47,8 @@ install-frameworks:
        $(INSTALL_DATA) frameworks/net_4.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList/FrameworkList.xml
        $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList
        $(INSTALL_DATA) frameworks/net_4.0_client.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList/FrameworkList.xml
+       $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.5.1/RedistList
+       $(INSTALL_DATA) frameworks/net_4.5.1.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.5.1/RedistList/FrameworkList.xml
 
 install-pcl-targets:
        $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0
@@ -91,6 +93,7 @@ EXTRA_DISTFILES = \
        frameworks/net_4.0.xml \
        frameworks/net_4.0_client.xml \
        frameworks/net_4.5.xml \
+       frameworks/net_4.5.1.xml \
        targets/Microsoft.Portable.CSharp_4.0.targets \
        targets/Microsoft.Portable.CSharp_4.5.targets \
        targets/Microsoft.Portable.Common.targets \
index 92fd84e949d0ac102aa1e063853fa29e8318288c..47ae1d9c0448332bba287d202e754d40e6929974 100644 (file)
@@ -262,6 +262,10 @@ namespace Mono.XBuild.CommandLine {
                                        if (info != null)
                                                projectInfo.Dependencies [info.Guid] = info;
                                }
+
+                               // unload the project after reading info from it
+                               // it'll be reloaded with proper context when building the solution
+                               p.ParentEngine.UnloadProject (currentProject);
                        }
 
                        // fill in the project info for deps found in the .sln file
index 0936512b577b9fd972989bdb4e2840f0593808f7..11b40d66a9b51c6c6696def143aea14a91bf6e79 100644 (file)
                directories for mscorlib.dll by constructing a filtered item set, and assume it only has
                one item.
                -->
-               <ItemGroup>
+               <ItemGroup Condition="'$(MonoUseMicrosoftBuildDll)' != 'True'">
                        <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')">
                                <Private>false</Private>
                        </_ExplicitReference>
                </ItemGroup>
+               <PropertyGroup Condition="'$(MonoUseMicrosoftBuildDll)' == 'True'">
+                       <_ExplicitMSCorlibPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll</_ExplicitMSCorlibPath>
+               </PropertyGroup>
+               <ItemGroup Condition="'$(MonoUseMicrosoftBuildDll)' == 'True'">
+                       <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')">
+                               <Private>false</Private>
+                       </_ExplicitReference>
+               </ItemGroup>
+               <ItemGroup Condition="'$(MonoUseMicrosoftBuildDll)' == 'True'">
+                       <_ExplicitReference Include="$(_ExplicitMSCorlibPath)" Condition="Exists('$(_ExplicitMSCorlibPath)')">
+                               <Private>false</Private>
+                       </_ExplicitReference>
+               </ItemGroup>
        </Target>
 
        <Target
index 4e8bc4d76e34218f1fea4cddc019aa7f1c899593..2642ba02696342bfcc17e4c5fe5beaa453041293 100644 (file)
                Condition="'$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkIdentifier)' == '.NETFramework'"
                DependsOnTargets="$(GetFrameworkPathsDependsOn)">
                <GetFrameworkPath>
-                       <Output Condition="'$(TargetFrameworkVersion)' == 'v4.5'"
+                       <Output Condition="'$(TargetFrameworkVersion)' == 'v4.5' and '$(TargetFrameworkVersion)' == 'v4.5.1'"
                                TaskParameter="FrameworkVersion45Path"
                                ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v4.0'"
                </CreateProperty>
 
                <Warning Text="TargetFrameworkVersion '$(TargetFrameworkVersion)' not supported by this toolset (ToolsVersion: $(MSBuildToolsVersion))."
-                       Condition="'$(TargetFrameworkVersion)' != 'v4.5' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
+                       Condition="'$(TargetFrameworkVersion)' != 'v4.5.1' and '$(TargetFrameworkVersion)' != 'v4.5' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
        </Target>
 
        <PropertyGroup>
index 0936512b577b9fd972989bdb4e2840f0593808f7..11b40d66a9b51c6c6696def143aea14a91bf6e79 100644 (file)
                directories for mscorlib.dll by constructing a filtered item set, and assume it only has
                one item.
                -->
-               <ItemGroup>
+               <ItemGroup Condition="'$(MonoUseMicrosoftBuildDll)' != 'True'">
                        <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')">
                                <Private>false</Private>
                        </_ExplicitReference>
                </ItemGroup>
+               <PropertyGroup Condition="'$(MonoUseMicrosoftBuildDll)' == 'True'">
+                       <_ExplicitMSCorlibPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll</_ExplicitMSCorlibPath>
+               </PropertyGroup>
+               <ItemGroup Condition="'$(MonoUseMicrosoftBuildDll)' == 'True'">
+                       <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')">
+                               <Private>false</Private>
+                       </_ExplicitReference>
+               </ItemGroup>
+               <ItemGroup Condition="'$(MonoUseMicrosoftBuildDll)' == 'True'">
+                       <_ExplicitReference Include="$(_ExplicitMSCorlibPath)" Condition="Exists('$(_ExplicitMSCorlibPath)')">
+                               <Private>false</Private>
+                       </_ExplicitReference>
+               </ItemGroup>
        </Target>
 
        <Target
diff --git a/mcs/tools/xbuild/frameworks/net_4.5.1.xml b/mcs/tools/xbuild/frameworks/net_4.5.1.xml
new file mode 100644 (file)
index 0000000..c82a4a6
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FileList  Name=".NET Framework 4.5.1" TargetFrameworkDirectory="..\..\..\..\4.5">
+</FileList>
index 88217bad1b37b596edea93530b42e5de48a122d4..0b7337d05d58d864bab0ac2234c817e2d461988f 100644 (file)
@@ -62,7 +62,6 @@ Provides:       mono(Mono.Cairo) = 1.0.5000.0
 Provides:       mono(Mono.CompilerServices.SymbolWriter) = 1.0.5000.0
 Provides:       mono(Mono.Posix) = 1.0.5000.0
 Provides:       mono(Mono.Security) = 1.0.5000.0
-Provides:       mono(OpenSystem.C) = 1.0.5000.0
 Provides:       mono(System) = 1.0.5000.0
 Provides:       mono(System.Security) = 1.0.5000.0
 Provides:       mono(System.Xml) = 1.0.5000.0
@@ -210,7 +209,6 @@ rm -rf %buildroot
 %_prefix/lib/mono/2.0/Mono.Security.dll
 %_prefix/lib/mono/2.0/Mono.Simd.dll
 %_prefix/lib/mono/2.0/Mono.Tasklets.dll
-%_prefix/lib/mono/2.0/OpenSystem.C.dll
 %_prefix/lib/mono/2.0/System.Configuration.dll
 %_prefix/lib/mono/2.0/System.Core.dll
 %_prefix/lib/mono/2.0/System.Drawing.dll
@@ -241,7 +239,6 @@ rm -rf %buildroot
 %_prefix/lib/mono/4.0/Mono.Security.dll
 %_prefix/lib/mono/4.0/Mono.Simd.dll
 %_prefix/lib/mono/4.0/Mono.Tasklets.dll
-%_prefix/lib/mono/4.0/OpenSystem.C.dll
 %_prefix/lib/mono/4.0/System.Configuration.dll
 %_prefix/lib/mono/4.0/System.Core.dll
 %_prefix/lib/mono/4.0/System.Drawing.dll
@@ -289,7 +286,6 @@ rm -rf %buildroot
 %_prefix/lib/mono/4.5/Mono.Security.dll
 %_prefix/lib/mono/4.5/Mono.Simd.dll
 %_prefix/lib/mono/4.5/Mono.Tasklets.dll
-%_prefix/lib/mono/4.5/OpenSystem.C.dll
 %_prefix/lib/mono/4.5/System.Configuration.dll
 %_prefix/lib/mono/4.5/System.Core.dll
 %_prefix/lib/mono/4.5/System.Drawing.dll
@@ -332,7 +328,6 @@ rm -rf %buildroot
 %_prefix/lib/mono/gac/Mono.Security
 %_prefix/lib/mono/gac/Mono.Simd
 %_prefix/lib/mono/gac/Mono.Tasklets
-%_prefix/lib/mono/gac/OpenSystem.C
 %_prefix/lib/mono/gac/System
 %_prefix/lib/mono/gac/System.Configuration
 %_prefix/lib/mono/gac/System.Core
@@ -926,14 +921,12 @@ Mono implementation of ASP.NET, Remoting and Web Services.
 %_bindir/wsdl2
 %_bindir/xsd
 %_libdir/pkgconfig/aspnetwebstack.pc
-%_libdir/pkgconfig/mono.web.pc
 %_mandir/man1/disco.1%ext_man
 %_mandir/man1/mconfig.1%ext_man
 %_mandir/man1/soapsuds.1%ext_man
 %_mandir/man1/wsdl.1%ext_man
 %_mandir/man1/xsd.1%ext_man
 %_prefix/lib/mono/2.0/Mono.Http.dll
-%_prefix/lib/mono/2.0/Mono.Web.dll
 %_prefix/lib/mono/2.0/System.ComponentModel.DataAnnotations.dll
 %_prefix/lib/mono/2.0/System.Runtime.Remoting.dll
 %_prefix/lib/mono/2.0/System.Runtime.Serialization.Formatters.Soap.dll
@@ -945,7 +938,6 @@ Mono implementation of ASP.NET, Remoting and Web Services.
 %_prefix/lib/mono/2.0/xsd.exe*
 %_prefix/lib/mono/4.0/Microsoft.Web.Infrastructure.dll
 %_prefix/lib/mono/4.0/Mono.Http.dll
-%_prefix/lib/mono/4.0/Mono.Web.dll
 %_prefix/lib/mono/4.0/System.ComponentModel.Composition.dll
 %_prefix/lib/mono/4.0/System.ComponentModel.DataAnnotations.dll
 %_prefix/lib/mono/4.0/System.Runtime.Remoting.dll
@@ -956,7 +948,6 @@ Mono implementation of ASP.NET, Remoting and Web Services.
 %_prefix/lib/mono/4.0/System.Web.Services.dll
 %_prefix/lib/mono/4.0/System.Web.dll
 %_prefix/lib/mono/4.5/Mono.Http.dll
-%_prefix/lib/mono/4.5/Mono.Web.dll
 %_prefix/lib/mono/4.5/System.ComponentModel.Composition.dll
 %_prefix/lib/mono/4.5/System.ComponentModel.DataAnnotations.dll
 %_prefix/lib/mono/4.5/System.Net.Http.Formatting.dll
@@ -982,7 +973,6 @@ Mono implementation of ASP.NET, Remoting and Web Services.
 %_prefix/lib/mono/4.5/Microsoft.Web.Infrastructure.dll
 %_prefix/lib/mono/gac/Microsoft.Web.Infrastructure
 %_prefix/lib/mono/gac/Mono.Http
-%_prefix/lib/mono/gac/Mono.Web
 %_prefix/lib/mono/gac/System.ComponentModel.Composition
 %_prefix/lib/mono/gac/System.ComponentModel.DataAnnotations
 %_prefix/lib/mono/gac/System.Net.Http.Formatting
index 3677b2d95b1b8f0f91b0d4517e71590e98bd901a..47e656422ee35c7ad5ab68b519ae43ef1e05ba63 100644 (file)
@@ -6,6 +6,7 @@
 #define S390X_H
 #include <glib.h>
 #include <assert.h>
+#include <limits.h>
 
 #define FLOAT_REGS     2       /* No. float registers for parms    */
 #define GENERAL_REGS   5       /* No. general registers for parms  */
@@ -136,13 +137,16 @@ typedef enum {
        s390_fpc = 256,
 } S390SpecialRegister;
 
-#define s390_is_imm16(val)             ((glong)val >= (glong)-(1<<15) && \
-                                        (glong)val <= (glong)((1<<15)-1))
-#define s390_is_uimm16(val)            ((glong)val >= 0 && (glong)val <= 65535)
+#define s390_is_imm16(val)             ((glong)val >= (glong) SHRT_MIN && \
+                                        (glong)val <= (glong) SHRT_MAX)
+#define s390_is_imm32(val)             ((glong)val >= (glong) INT_MIN && \
+                                        (glong)val <= (glong) INT_MAX)
+#define s390_is_uimm16(val)            ((glong)val >= 0 && (glong)val <= (glong) USHRT_MAX)
+#define s390_is_uimm32(val)            ((glong)val >= 0 && (glong)val <= (glong) UINT_MAX)
 #define s390_is_uimm20(val)            ((glong)val >= 0 && (glong)val <= 1048575)
 #define s390_is_imm20(val)             ((glong)val >= -524288 && (glong)val <= 524287)
-#define s390_is_imm12(val)             ((glong)val >= (glong)-(1<<11) && \
-                                        (glong)val <= (glong)((1<<11)-1))
+#define s390_is_imm12(val)             ((glong)val >= (glong)-4096 && \
+                                        (glong)val <= (glong)4095)
 #define s390_is_uimm12(val)            ((glong)val >= 0 && (glong)val <= 4095)
 
 #define STK_BASE                       s390_r15
@@ -349,7 +353,36 @@ typedef struct {
        short   i2;
        char    xx;
        char    op2;
-} RIE_Format;
+} RIE_Format_1;
+
+typedef struct {
+       char    op1;
+       char    r1 : 4;
+       char    r3 : 4;
+       short   i2;
+       char    m2 : 4;
+       char    xx : 4;
+       char    op2;
+} RIE_Format_2;
+
+typedef struct {
+       char    op1;
+       char    r1 : 4;
+       char    r3 : 4;
+       short   d;
+       char    i;
+       char    op2;
+} RIE_Format_3;
+
+typedef struct {
+       char    op1;
+       char    r1 : 4;
+       char    yy : 4;
+       short   i2;
+       char    m3 : 4;
+       char    xx : 4;
+       char    op2;
+} RIE_Format_4;
 
 typedef struct {
        char    op1;
@@ -427,12 +460,22 @@ typedef struct {
 
 typedef struct {
        short   op;
-       char    b1 : 4;
+       short   tb1 : 4;
        short   d1 : 12;
-       char    b2 : 4;
+       short   b2 : 4;
        short   d2 : 12;
 } __attribute__ ((packed)) SSE_Format;
 
+typedef struct {
+       short   op;
+       char    r3 : 4;
+       char    o2 : 4;
+       short   b1 : 4;
+       short   d1 : 12;
+       short   b2 : 4;
+       short   d2 : 12;
+} __attribute__ ((packed)) SSF_Format;
+
 #define s390_emit16(c, x) do                   \
 {                                              \
        *((guint16 *) c) = (guint16) x;         \
@@ -509,12 +552,33 @@ typedef struct {
 
 #define S390_RI(c,opc,g1,m2)           s390_emit32(c, ((opc >> 4) << 24 | (g1) << 20 | (opc & 0x0f) << 16 | (m2 & 0xffff)))
 
-#define S390_RIE(c,opc,g1,g3,m2) do                            \
+#define S390_RIE_1(c,opc,g1,g3,m2) do                          \
 {                                                              \
        s390_emit16(c, ((opc & 0xff00) | (g1) << 4 | g3));      \
        s390_emit32(c, ((m2) << 16 | (opc & 0xff)));            \
 } while (0)
 
+#define S390_RIE_2(c,opc,g1,g2,m3,v) do                                \
+{                                                              \
+       s390_emit16(c, ((opc & 0xff00) | (g1) << 4 | g3));      \
+       s390_emit16(c, (v));                                    \
+       s390_emit16(c, ((m2) << 12 | (opc & 0xff)));            \
+} while (0)
+
+#define S390_RIE_3(c,opc,g1,i,m3,d) do                         \
+{                                                              \
+       s390_emit16(c, ((opc & 0xff00) | (g1) << 4 | m3));      \
+       s390_emit16(c, (d));                                    \
+       s390_emit16(c, ((i) << 8 | (opc & 0xff)));              \
+} while (0)
+
+#define S390_RIE_4(c,opc,g1,i2,m3) do                          \
+{                                                              \
+       s390_emit16(c, ((opc & 0xff00) | (g1) << 4);            \
+       s390_emit16(c, (i2));                                   \
+       s390_emit16(c, ((m3) << 12 | (opc & 0xff)));            \
+} while (0)
+
 #define S390_RIL_1(c,opc,g1,m2) do                                     \
 {                                                                      \
        s390_emit16(c, ((opc >> 4) << 8 | (g1) << 4 | (opc & 0xf)));    \
@@ -527,6 +591,20 @@ typedef struct {
        s390_emit32(c, m2);                                             \
 } while (0)
 
+#define S390_RIS(c,opc,r,i,m3,b,d) do                          \
+{                                                              \
+       s390_emit16(c, ((opc, & 0xff00) | (r1) << 4) | (r2));   \
+       s390_emit16(c, ((b) << 12) | (d));                      \
+       s390_emit16(c, ((i) << 4) | ((opc) & 0xff));            \
+}
+
+#define S390_RRS(c,opc,r1,r2,m3,b,d) do                                \
+{                                                              \
+       s390_emit16(c, ((opc, & 0xff00) | (r1) << 4) | (r2));   \
+       s390_emit16(c, ((b) << 12) | (d));                      \
+       s390_emit16(c, ((m3) << 12) | ((opc) & 0xff));          \
+}
+
 #define S390_SI(c,opc,s1,p1,m2)                s390_emit32(c, (opc << 24 | (m2) << 16 | (s1) << 12 | ((p1) & 0xfff)));
 
 #define S390_SIY(c,opc,s1,p1,m2) do                            \
@@ -573,23 +651,60 @@ typedef struct {
        s390_emit16(c, ((s2) << 12 | ((p2) & 0xfff)));  \
 } while (0)
 
+#define S390_SSF(c,opc,r3,s1,p1,s2,p2) do                              \
+{                                                                      \
+       s390_emit16(c, (((opc) & 0xff00) << 8) | ((r3) << 4) |          \
+                       ((opc) & 0xf));                                 \
+       s390_emit16(c, ((s1) << 12 | ((p1) & 0xfff)));                  \
+       s390_emit16(c, ((s2) << 12 | ((p2) & 0xfff)));                  \
+} while (0)
+
 #define s390_a(c, r, x, b, d)          S390_RX(c, 0x5a, r, x, b, d)
 #define s390_adb(c, r, x, b, d)                S390_RXE(c, 0xed1a, r, x, b, d)
 #define s390_adbr(c, r1, r2)           S390_RRE(c, 0xb31a, r1, r2)
 #define s390_aebr(c, r1, r2)           S390_RRE(c, 0xb30a, r1, r2)
+#define s390_afi(c, r, v)              S390_RIL_1(c, 0xc29, r, v);
 #define s390_ag(c, r, x, b, d)         S390_RXY(c, 0xe308, r, x, b, d)
 #define s390_agf(c, r, x, b, d)                S390_RXY(c, 0xe318, r, x, b, d)
+#define s390_agfi(c, r, v)             S390_RIL_1(c, 0xc28, r, v)
+#define s390_afgr(c, r1, r2)           S390_RRE(c, 0xb918, r1, r2)
 #define s390_aghi(c, r, v)             S390_RI(c, 0xa7b, r, v)
+#define s390_aghik(c, r, v)            S390_RIE_1(c, 0xecd9, r, v)
 #define s390_agr(c, r1, r2)            S390_RRE(c, 0xb908, r1, r2)
+#define s390_agrk(c, r1, r2, r3)       S390_RRF_1(c, 0xb9e8, r1, r2, r3)
+#define s390_agsi(c, r, v)             S390_SIY(c, 0xeb7a, r v)
+#define s390_ahhhr(c, r1, r2, r3)      S390_RRF_1(c, 0xb9c8, r1, r2, r3)
+#define s390_ahhlr(c, r1, r2, r3)      S390_RRF_1(c, 0xb9d8, r1, r2, r3)
 #define s390_ahi(c, r, v)              S390_RI(c, 0xa7a, r, v)
+#define s390_ahik(c, r, v)             S390_RIE_1(c, 0xecd8, r, v)
+#define s390_ahy(c, r, x, b, d)                S390_RXY(c, 0xe37a, r, b, d)
+#define s390_aih(c, r, v)              S390_RIL_1(c, 0xcc8, r, v)
+#define s390_al(c, r, x, b, d)         S390_RX(c, 0x5e, r, x, b, d)
+#define s390_alc(c, r, x, b, d)                S390_RXY(c, 0xe398, r, x, b, d)
+#define s390_alcg(c, r, x, b, d)       S390_RXY(c, 0xe388, r, x, b, d)
 #define s390_alcgr(c, r1, r2)          S390_RRE(c, 0xb988, r1, r2)
 #define s390_alcr(c, r1, r2)           S390_RRE(c, 0xb998, r1, r2)
-#define s390_al(c, r, x, b, d)         S390_RX(c, 0x5e, r, x, b, d)
+#define s390_alfi(c, r, v)             S390_RIL_1(c, 0xc2b, r, v)
 #define s390_alg(c, r, x, b, d)                S390_RXY(c, 0xe30a, r, x, b, d)
 #define s390_algf(c, r, x, b, d)       S390_RXY(c, 0xe31a, r, x, b, d)
+#define s390_algfi(c, r, v)            S390_RIL_1(c, 0xc2a, r, v)
+#define s390_algfr(c, r1, r2)          S390_RRE(c, 0xb91a, r1, r2)
+#define s390_alghsik(c, r, v)          S390_RIE_1(c, 0xecd8, r, v)
 #define s390_algr(c, r1, r2)           S390_RRE(c, 0xb90a, r1, r2)
+#define s390_algsi(c, r, v)            S390_SIY(c, 0xeb7e, r, v)
+#define s390_alhhhr(c, r1, r2, r3)     S390_RRF_1(c, 0xb9ca, r1, r2, r3)
+#define s390_alhhlr(c, r1, r2, r3)     S390_RRF_1(c, 0xb9da, r1, r2, r3)
+#define s390_alhsik(c, r, v)           S390_RIE_1(c, 0xecda, r, v)
 #define s390_alr(c, r1, r2)            S390_RR(c, 0x1e, r1, r2)
+#define s390_alrk(c, r1, r2)           S390_RRF(c, 0xb9fa, r1, r2)
+#define s390_alsi(c, r, v)             S390_SIY(c, 0xeb6e, r, v)
+#define s390_alsih(c, r, v)            S390_RIL_1(c, 0xcca, r, v)
+#define s390_alsihn(c, r, v)           S390_RIL_1(c, 0xccb, r, v)
+#define s390_aly(c, r, x, b, d)                S390_RXY(c, 0xe35e, r, x, b, d)
 #define s390_ar(c, r1, r2)             S390_RR(c, 0x1a, r1, r2)
+#define s390_ark(c, r1, r2, r3)                S390_RRF_1(c, 0xb9f8, r1, r2, r3)
+#define s390_asi(c, r, v)              S390_SIY(c, 0xeb6a, r, v)
+#define s390_ay(c, r, x, b, d)         S390_RXY(c, 0xe35a, r, x, b, d)
 #define s390_basr(c, r1, r2)           S390_RR(c, 0x0d, r1, r2)
 #define s390_bctr(c, r1, r2)           S390_RR(c, 0x06, r1, r2)
 #define s390_bctrg(c, r1, r2)          S390_RRE(c, 0xb946, r1, r2)
@@ -610,19 +725,46 @@ typedef struct {
 #define s390_cdsg(c, r1, r2, b, d)     S390_RSY_1(c, 0xeb3e, r1, r2, b, d)
 #define s390_cdsy(c, r1, r2, b, d)     S390_RSY_1(c, 0xeb31, r1, r2, b, d)
 #define s390_cebr(c, r1, r2)           S390_RRE(c, 0xb309, r1, r2)
+#define s390_cegbr(c, r1, r2)          S390_RRE(c, 0xb3a4, r1, r2)
 #define s390_cfdbr(c, r1, m, r2)       S390_RRF_2(c, 0xb399, r1, m, r2)
+#define s390_cfi(c, r, v)              S390_RIL_1(c, 0xc2d, r, v)
 #define s390_cgdbr(c, r1, m, r2)       S390_RRF_2(c, 0xb3a9, r1, m, r2)
 #define s390_cg(c, r, x, b, d)         S390_RXY(c, 0xe320, r, x, b, d)
+#define s390_cgfi(c, r, v)             S390_RIL_1(c, 0xc2c, r, v)
+#define s390_cgfrl(c, r, v)            S390_RIL_1(c, 0xc6c, r, v)
 #define s390_cghi(c, r, i)             S390_RI(c, 0xa7f, r, i)
+#define s390_cgib(c, r, i, m, b, d)    S390_RIS(c, 0xecfc, r, i, m, b, d)
+#define s390_cgij(c, r, i, m, d)       S390_RIE_3(c, 0xec7c, r, i, m, d)
+#define s390_cgit(c, r, i, m)          S390_RIE_4(c, 0xec70, r, i m);
 #define s390_cgr(c, r1, r2)            S390_RRE(c, 0xb920, r1, r2)
+#define s390_cgrb(c, r1, r2, m3, b, d) S390_RRS(c, 0xece4, r1, r2, m3, b, d)
+#define s390_cgrj(c, r1, r2, m3, v)    S390_RIE_2(c, 0xec64, r1, r2, m3, v)
+#define s390_cgrl(c, r, v)             S390_RIL_1(c, 0xc68, r, v)
 #define s390_chi(c, r, i)              S390_RI(c, 0xa7e, r, i)
+#define s390_cib(c, r, i, m, b, d)     S390_RIS(c, 0xecfe, r, i, m, b, d)
+#define s390_cij(c, r, i, m, d)                S390_RIE_3(c, 0xec7e, r, i, m, d)
+#define s390_cit(c, r, i, m)           S390_RIE_4(c, 0xec72, r, i m);
 #define s390_cl(c, r, x, b, d)         S390_RX(c, 0x55, r, x, b, d)
 #define s390_clg(c, r, x, b, d)                S390_RXY(c, 0xe321, r, x, b, d)
+#define s390_clgib(c, r, i, m, b, d)   S390_RIS(c, 0xecfd, r, i, m, b, d)
+#define s390_clgij(c, r, i, b)         S390_RIE_3(c, 0xec7d, r, i, m, d)
 #define s390_clgr(c, r1, r2)           S390_RRE(c, 0xb921, r1, r2)
+#define s390_clgrj(c, r1, r2, m, v)    S390_RIE_2(c, 0xec65, r1, r2, m, v)
+#define s390_clgrb(c, r1, r2, m3, b, d)        S390_RRS(c, 0xece5, r1, r2, m3, b, d)
+#define s390_clib(c, r, i, m, b, d)    S390_RIS(c, 0xecff, r, i, m, b, d)
+#define s390_clij(c, r, i, b)          S390_RIE_3(c, 0xec7f, r, i, m, d)
 #define s390_clr(c, r1, r2)            S390_RR(c, 0x15, r1, r2)
+#define s390_clrb(c, r1, r2, m3, b, d) S390_RRS(c, 0xecf7, r1, r2, m3, b, d)
+#define s390_clrj(c, r1, r2, m, v)     S390_RIE_2(c, 0xec77, r1, r2, m, v)
 #define s390_cr(c, r1, r2)             S390_RR(c, 0x19, r1, r2)
+#define s390_crb(c, r1, r2, m3, b, d)  S390_RRS(c, 0xecf6, r1, r2, m3, b, d)
+#define s390_crj(c, r1, r2, m3, v)     S390_RIE_2(c, 0xec76, r1, r2, m3, v)
+#define s390_crl(c, r, v)              S390_RIL_1(c, 0xc6d, r, v)
+#define s390_crt(c, r1, r2, m3)                S390_RRF_2(c, 0xb972, r1, r2, m3);
+#define s390_cgrt(c, r1, r2, m3)       S390_RRF_2(c, 0xb960, r1, r2, m3);
 #define s390_cs(c, r1, r2, b, d)       S390_RX(c, 0xba, r1, r2, b, d)
 #define s390_csg(c, r1, r2, b, d)      S390_RSY_1(c, 0xeb30, r1, r2, b, d)
+#define s390_csst(c, d1, b1, d2, b2, r)        S390_SSF(c, 0xc82, b1, d1, b2, d2, r)
 #define s390_csy(c, r1, r2, b, d)      S390_RSY_1(c, 0xeb14, r1, r2, b, d)
 #define s390_ddbr(c, r1, r2)           S390_RRE(c, 0xb31d, r1, r2)
 #define s390_debr(c, r1, r2)           S390_RRE(c, 0xb30d, r1, r2)
@@ -637,6 +779,12 @@ typedef struct {
 #define s390_icm(c, r, m, b, d)                S390_RX(c, 0xbf, r, m, b, d)
 #define s390_icmy(c, r, x, b, d)       S390_RXY(c, 0xeb81, r, x, b, d)
 #define s390_icy(c, r, x, b, d)                S390_RXY(c, 0xe373, r, x, b, d)
+#define s390_iihf(c, r, v)             S390_RIL_1(c, 0xc08, r, v)
+#define s390_iihh(c, r, v)             S390_RI(c, 0xa50, r, v)
+#define s390_iihl(c, r, v)             S390_RI(c, 0xa51, r, v)
+#define s390_iilf(c, r, v)             S390_RIL_1(c, 0xc09, r, v)
+#define s390_iilh(c, r, v)             S390_RI(c, 0xa52, r, v)
+#define s390_iill(c, r, v)             S390_RI(c, 0xa53, r, v)
 #define s390_j(c,d)                    s390_brc(c, S390_CC_UN, d)
 #define s390_jc(c, m, d)               s390_brc(c, m, d)
 #define s390_jcl(c, m, d)              s390_brcl(c, m, d)
@@ -690,23 +838,28 @@ typedef struct {
 #define s390_ldy(c, r, x, b, d)                S390_RXY(c, 0xed65, r, x, b, d)
 #define s390_ldeb(c, r, x, b, d)       S390_RXE(c, 0xed04, r, x, b, d)
 #define s390_ldebr(c, r1, r2)          S390_RRE(c, 0xb304, r1, r2)
+#define s390_ldgr(c, r1, r2)           S390_RRE(c, 0xb3c1, r1, r2)
 #define s390_ldr(c, r1, r2)            S390_RR(c, 0x28, r1, r2)
 #define s390_le(c, f, x, b, d)         S390_RX(c, 0x78, f, x, b, d)
 #define s390_ledbr(c, r1, r2)          S390_RRE(c, 0xb344, r1, r2)
 #define s390_ler(c, r1, r2)            S390_RR(c, 0x38, r1, r2)
 #define s390_ley(c, r, x, b, d)                S390_RXY(c, 0xed64, r, x, b, d)
+#define s390_lg(c, r, x, b, d)         S390_RXY(c, 0xe304, r, x, b, d)
 #define s390_lgb(c, r, x, b, d)                S390_RXY(c, 0xe377, r, x, b, d)
 #define s390_lgbr(c, r1, r2)           S390_RRE(c, 0xb906, r1, r2)
-#define s390_lg(c, r, x, b, d)         S390_RXY(c, 0xe304, r, x, b, d)
+#define s390_lgdr(c, r1, r2)           S390_RRE(c, 0xb3cd, r1, r2)
 #define s390_lgf(c, r, x, b, d)                S390_RXY(c, 0xe314, r, x, b, d)
+#define s390_lgfi(c, r, v)             S390_RIL_1(c, 0xc01, r, v)
+#define s390_lgfrl(c, r1, d)           S390_RIL_1(c, 0xc4c, r1, d)
 #define s390_lgfr(c, r1, r2)           S390_RRE(c, 0xb914, r1, r2)
 #define s390_lgh(c, r, x, b, d)                S390_RXY(c, 0xe315, r, x, b, d)
 #define s390_lghi(c, r, v)             S390_RI(c, 0xa79, r, v)
+#define s390_lghr(c, r1, r2)           S390_RRE(c, 0xb907, r1, r2)
 #define s390_lgr(c, r1, r2)            S390_RRE(c, 0xb904, r1, r2)
+#define s390_lgrl(c, r1, d)            S390_RIL_1(c, 0xc48, r1, d)
 #define s390_lh(c, r, x, b, d)         S390_RX(c, 0x48, r, x, b, d)
 #define s390_lhr(c, r1, r2)            S390_RRE(c, 0xb927, r1, r2)
 #define s390_lhg(c, r, x, b, d)                S390_RXY(c, 0xe315, r, x, b, d)
-#define s390_lghr(c, r1, r2)           S390_RRE(c, 0xb907, r1, r2)
 #define s390_lhi(c, r, v)              S390_RI(c, 0xa78, r, v)
 #define s390_lhy(c, r, x, b, d)                S390_RXY(c, 0xe378, r, x, b, d)
 #define s390_llcr(c, r1, r2)           S390_RRE(c, 0xb994, r1, r2)
@@ -717,6 +870,12 @@ typedef struct {
 #define s390_llgh(c, r, x, b, d)       S390_RXY(c, 0xe391, r, x, b, d)
 #define s390_llghr(c, r1, r2)          S390_RRE(c, 0xb985, r1, r2)
 #define s390_llhr(c, r1, r2)           S390_RRE(c, 0xb995, r1, r2)
+#define s390_llihf(c, r, v)            S390_RIL_1(c, 0xc0e, r, v)
+#define s390_llihh(c, r, v)            S390_RI(c, 0xa5c, r, v)
+#define s390_llihl(c, r, v)            S390_RI(c, 0xa5d, r, v)
+#define s390_llilf(c, r, v)            S390_RIL_1(c, 0xc0f, r, v)
+#define s390_llilh(c, r, v)            S390_RI(c, 0xa5e, r, v)
+#define s390_llill(c, r, v)            S390_RI(c, 0xa5f, r, v)
 #define s390_lm(c, r1, r2, b, d)       S390_RS_1(c, 0x98, r1, r2, b, d)
 #define s390_lmg(c, r1, r2, b, d)      S390_RSY_1(c, 0xeb04, r1, r2, b, d)
 #define s390_lndbr(c, r1, r2)          S390_RRE(c, 0xb311, r1, r2)
@@ -726,6 +885,7 @@ typedef struct {
 #define s390_lpgr(c, r1, r2)           S390_RRE(c, 0xb900, r1, r2)
 #define s390_lpr(c, r1, r2)            S390_RR(c, 0x10, r1, r2)
 #define s390_lr(c, r1, r2)             S390_RR(c, 0x18, r1, r2)
+#define s390_lrl(c, r1, d)             S390_RIL_1(c, 0xc4d, r1, d)
 #define s390_ltgfr(c, r1, r2)          S390_RRE(c, 0xb912, r1, r2)
 #define s390_ltgr(c, r1, r2)           S390_RRE(c, 0xb902, r1, r2)
 #define s390_ltr(c, r1, r2)            S390_RR(c, 0x12, r1, r2)
@@ -734,24 +894,44 @@ typedef struct {
 #define s390_m(c, r, x, b, d)          S390_RX(c, 0x5c, r, x, b, d)
 #define s390_mdbr(c, r1, r2)           S390_RRE(c, 0xb31c, r1, r2)
 #define s390_meebr(c, r1, r2)          S390_RRE(c, 0xb317, r1, r2)
+#define s390_mfy(c, r, x, b, d)                S390_RXY(c, 0xe35c, r, x, b, d)
 #define s390_mlgr(c, r1, r2)           S390_RRE(c, 0xb986, r1, r2)
 #define s390_mlr(c, r1, r2)            S390_RRE(c, 0xb996, r1, r2)
 #define s390_mr(c, r1, r2)             S390_RR(c, 0x1c, r1, r2)
 #define s390_ms(c, r, x, b, d)         S390_RX(c, 0x71, r, x, b, d)
+#define s390_msi(c, r, v)              S390_RIL_1(c, 0xc21, r, v)
 #define s390_msgfr(c, r1, r2)          S390_RRE(c, 0xb91c, r1, r2)
+#define s390_msgi(c, r, v)             S390_RIL_1(c, 0xc20, r, v)
 #define s390_msgr(c, r1, r2)           S390_RRE(c, 0xb90c, r1, r2)
 #define s390_msr(c, r1, r2)            S390_RRE(c, 0xb252, r1, r2)
 #define s390_mvc(c, l, b1, d1, b2, d2) S390_SS_1(c, 0xd2, l, b1, d1, b2, d2)
 #define s390_mvcl(c, r1, r2)           S390_RR(c, 0x0e, r1, r2)
 #define s390_mvcle(c, r1, r3, d2, b2)  S390_RS_1(c, 0xa8, r1, r3, d2, b2)
 #define s390_n(c, r, x, b, d)          S390_RX(c, 0x54, r, x, b, d)
+#define s390_nc(c, l, b1, d1, b2, d2)  S390_SS_1(c, 0xd4, l, b1, d1, b2, d2)
 #define s390_ng(c, r, x, b, d)         S390_RXY(c, 0xe380, r, x, b, d)
 #define s390_ngr(c, r1, r2)            S390_RRE(c, 0xb980, r1, r2)
+#define s390_ngrk(c, r1, r2, r3)       S390_RRF_1(c, 0xb9e4, r1, r2, r3)
+#define s390_ni(c, b, d, v)            S390_SI(c, 0x94, b, d, v) 
+#define s390_nihf(c, r, v)             S390_RIL_1(c, 0xc0a, r, v)
+#define s390_nihh(c, r, v)             S390_RI(c, 0xa54, r, v)
+#define s390_nihl(c, r, v)             S390_RI(c, 0xa55, r, v)
+#define s390_nilf(c, r, v)             S390_RIL_1(c, 0xc0b, r, v)
 #define s390_nilh(c, r, v)             S390_RI(c, 0xa56, r, v)
 #define s390_nill(c, r, v)             S390_RI(c, 0xa57, r, v)
+#define s390_niy(c, b, d, v)           S390_SIY(c, 0xeb54, b, d, v) 
 #define s390_nop(c)                    S390_RR(c, 0x07, 0x0, 0)
 #define s390_nr(c, r1, r2)             S390_RR(c, 0x14, r1, r2)
+#define s390_nrk(c, r1, r2)            S390_RRF_1(c, 0xb9f4, r1, r2)
+#define s390_ny(c, r, x, b, d)         S390_RRY(c, 0xe354, r1, r2)
 #define s390_o(c, r, x, b, d)          S390_RX(c, 0x56, r, x, b, d)
+#define s390_oihf(c, r, v)             S390_RIL_1(c, 0xc0c, r, v)
+#define s390_oihh(c, r, v)             S390_RI(c, 0xa58, r, v)
+#define s390_oihl(c, r, v)             S390_RI(c, 0xa59, r, v)
+#define s390_oilf(c, r, v)             S390_RIL_1(c, 0xc0d, r, v)
+#define s390_oilh(c, r, v)             S390_RI(c, 0xa5a, r, v)
+#define s390_oill(c, r, v)             S390_RI(c, 0xa5b` r, v)
+#define s390_oiy(c, b, d, v)           S390_SIY(c, 0xeb56 b, d, v) 
 #define s390_og(c, r, x, b, d)         S390_RXY(c, 0xe381, r, x, b, d)
 #define s390_ogr(c, r1, r2)            S390_RRE(c, 0xb981, r1, r2)
 #define s390_or(c, r1, r2)             S390_RR(c, 0x16, r1, r2)
@@ -762,16 +942,19 @@ typedef struct {
 #define s390_sg(c, r, x, b, d)         S390_RXY(c, 0xe309, r, x, b, d)
 #define s390_sgf(c, r, x, b, d)                S390_RXY(c, 0xe319, r, x, b, d)
 #define s390_sgr(c, r1, r2)            S390_RRE(c, 0xb909, r1, r2)
+#define s390_sl(c, r, x, b, d)         S390_RX(c, 0x5f, r, x, b, d)
 #define s390_sla(c, r, b, d)           S390_RS_3(c, 0x8b, r, b, d) 
 #define s390_slag(c, r1, r2, b, d)     S390_RSY_1(c, 0xeb0b, r1, r2, b, d) 
 #define s390_slbg(c, r, x, b, d)       S390_RXY(c, 0xe389, r, x, b, d)
 #define s390_slbgr(c, r1, r2)          S390_RRE(c, 0xb989, r1, r2)
 #define s390_slbr(c, r1, r2)           S390_RRE(c, 0xb999, r1, r2)
-#define s390_sl(c, r, x, b, d)         S390_RX(c, 0x5f, r, x, b, d)
 #define s390_slda(c, r, b, d)          S390_RS_3(c, 0x8f, r, b, d) 
 #define s390_sldl(c, r, b, d)          S390_RS_3(c, 0x8d, r, b, d) 
+#define s390_slfi(c, r, v)             S390_RIL_1(c, 0xc25, r, v)
 #define s390_slg(c, r, x, b, d)                S390_RXY(c, 0xe30b, r, x, b, d)
 #define s390_slgf(c, r, x, b, d)       S390_RXY(c, 0xe31b, r, x, b, d)
+#define s390_slgfr(c, r1, r2)          S390_RRE(c, 0xb91b, r1, r2)
+#define s390_slgfi(c, r, v)            S390_RIL_1(c, 0xc24, r, v)
 #define s390_slgr(c, r1, r2)           S390_RRE(c, 0xb90b, r1, r2)
 #define s390_sll(c, r, b, d)           S390_RS_3(c, 0x89, r, b, d) 
 #define s390_sllg(c, r1, r2, b, d)     S390_RSY_1(c, 0xeb0d, r1, r2, b, d) 
@@ -805,7 +988,10 @@ typedef struct {
 #define s390_tcdb(c, r, x, b, d)       S390_RXE(c, 0xed11, r, x, b, d)
 #define s390_tceb(c, r, x, b, d)       S390_RXE(c, 0xed10, r, x, b, d)
 #define s390_x(c, r, x, b, d)          S390_RX(c, 0x57, r, x, b, d)
+#define s390_xihf(c, r, v)             S390_RIL_1(c, 0xc06, r, v)
+#define s390_xilf(c, r, v)             S390_RIL_1(c, 0xc07, r, v)
 #define s390_xg(c, r, x, b, d)         S390_RXY(c, 0xe382, r, x, b, d)
 #define s390_xgr(c, r1, r2)            S390_RRE(c, 0xb982, r1, r2)
 #define s390_xr(c, r1, r2)             S390_RR(c, 0x17, r1, r2)
+#define s390_xy(c, r, x, b, d)         S390_RXY(c, 0xe357, r, x, b, d)
 #endif
index 116824da9ec9e2a687945bdb473aa54927dabb0a..70f3f6e4ced663289b1a5f2820a367ff52f1b53f 100755 (executable)
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <math.h>
 #include "util.h"
+#include "mono/utils/mono-compiler.h"
 
 #ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
index 40c9591a8972cd4bfae302bf34f684ff40ba6c99..169cb07617adb06ac4bcb88ea5cc6fd59adad7b6 100755 (executable)
@@ -705,7 +705,7 @@ static gboolean file_setendoffile(gpointer handle)
        }
        
 #ifdef FTRUNCATE_DOESNT_EXTEND
-       /* I haven't bothered to write the configure.in stuff for this
+       /* I haven't bothered to write the configure.ac stuff for this
         * because I don't know if any platform needs it.  I'm leaving
         * this code just in case though
         */
@@ -3238,9 +3238,9 @@ extern gboolean SetFileAttributes (const gunichar2 *name, guint32 attrs)
         * catch that case here.
         */
        if (attrs & FILE_ATTRIBUTE_READONLY) {
-               result = _wapi_chmod (utf8_name, buf.st_mode & ~(S_IWRITE | S_IWOTH | S_IWGRP));
+               result = _wapi_chmod (utf8_name, buf.st_mode & ~(S_IWUSR | S_IWOTH | S_IWGRP));
        } else {
-               result = _wapi_chmod (utf8_name, buf.st_mode | S_IWRITE);
+               result = _wapi_chmod (utf8_name, buf.st_mode | S_IWUSR);
        }
 
        /* Ignore the other attributes for now */
@@ -4260,6 +4260,7 @@ guint32 GetDriveType(const gunichar2 *root_path_name)
        return (drive_type);
 }
 
+#if defined (PLATFORM_MACOSX) || defined (__linux__) || defined(PLATFORM_BSD) || defined(__native_client__) || defined(__FreeBSD_kernel__)
 static gchar*
 get_fstypename (gchar *utfpath)
 {
@@ -4287,7 +4288,6 @@ get_fstypename (gchar *utfpath)
 }
 
 /* Linux has struct statfs which has a different layout */
-#if defined (PLATFORM_MACOSX) || defined (__linux__) || defined(PLATFORM_BSD) || defined(__native_client__)
 gboolean
 GetVolumeInformation (const gunichar2 *path, gunichar2 *volumename, int volumesize, int *outserial, int *maxcomp, int *fsflags, gunichar2 *fsbuffer, int fsbuffersize)
 {
index 00b209c4eb50895ef4fff7195dcbe8177025e944..60e8cd827b22257ddbea52a4cd8d3e3fb32595ef 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <glib.h>
 #include <sys/time.h>
+#include <time.h>
 
 extern void _wapi_calc_timeout(struct timespec *timeout, guint32 ms);
 
index afbe440448bf6553e0f535520bab3ae2e94cd0cc..c65bf23813c0ce954166d7595113fdf40ca6a3e7 100644 (file)
@@ -24,7 +24,9 @@
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <fcntl.h>
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
 #include <ctype.h>
 
 #ifdef HAVE_SYS_MKDEV_H
index 1d702d3188f274c02c319c8f3d59bc805d9ccbf4..d1bf3d0362c5b355311ab9af67c9c7c636872383 100644 (file)
 #include <sys/stat.h>
 #include <unistd.h>
 
-
-/* Disclaimers */
-
-#if defined(__GNUC__)
-#ifndef HAVE_GETRESUID
-       #warning getresuid not supported. WindowsImpersonationContext wont work
-#endif
-#ifndef HAVE_SETRESUID
-       #warning setresuid not supported. WindowsImpersonationContext wont work
-#endif
-#endif
-
-
 gboolean 
 ImpersonateLoggedOnUser (gpointer handle)
 {
index bd5006db60729b4fb49d38c1947ea77b0a8290bf..7889ad8ff37e04f416fc9de337eb17f0d5250b22 100644 (file)
@@ -66,7 +66,7 @@
 #define        M_MASK          0xffff
 #define        M_ASCII         0x00ff
 
-typedef u_short Char;
+typedef unsigned short Char;
 
 #else
 
@@ -87,7 +87,7 @@ typedef char Char;
 #define        ismeta(c)       (((c)&M_QUOTE) != 0)
 
 
-static int      g_Ctoc(const gchar *, char *, u_int);
+static int      g_Ctoc(const gchar *, char *, unsigned int);
 static int      glob0(GDir *dir, const gchar *, wapi_glob_t *, gboolean,
                       gboolean);
 static int      glob1(GDir *dir, gchar *, gchar *, wapi_glob_t *, size_t *,
@@ -103,11 +103,11 @@ static void        qprintf(const char *, Char *);
 int
 _wapi_glob(GDir *dir, const char *pattern, int flags, wapi_glob_t *pglob)
 {
-       const u_char *patnext;
+       const unsigned char *patnext;
        int c;
        gchar *bufnext, *bufend, patbuf[PATH_MAX];
 
-       patnext = (u_char *) pattern;
+       patnext = (unsigned char *) pattern;
        if (!(flags & WAPI_GLOB_APPEND)) {
                pglob->gl_pathc = 0;
                pglob->gl_pathv = NULL;
@@ -262,7 +262,7 @@ globextend(const gchar *path, wapi_glob_t *pglob, size_t *limitp)
 {
        char **pathv;
        int i;
-       u_int newsize, len;
+       unsigned int newsize, len;
        char *copy;
        const gchar *p;
 
@@ -368,7 +368,7 @@ _wapi_globfree(wapi_glob_t *pglob)
 }
 
 static int
-g_Ctoc(const gchar *str, char *buf, u_int len)
+g_Ctoc(const gchar *str, char *buf, unsigned int len)
 {
 
        while (len--) {
index e4867a8a81a5dbb069d520cdbdd4983235a7e1c1..731c05c976702d05172e78beca13204cf0fff45f 100644 (file)
@@ -75,7 +75,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLA
 #  mono-config.c uses MONO_CFG_DIR
 #
 # This won't result in many more false positives than AC_DEFINEing them
-# in configure.in.
+# in configure.ac.
 #
 assembly.lo mono-config.lo: Makefile
 
@@ -86,6 +86,9 @@ libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
 null_sources = \
        console-null.c
 
+null_gc_sources = \
+       null-gc.c
+
 common_sources = \
        $(platform_sources)     \
        assembly.c              \
@@ -159,7 +162,6 @@ common_sources = \
        monitor.h               \
        nacl-stub.c             \
        normalization-tables.h  \
-       null-gc.c               \
        number-formatter.h      \
        object-internals.h      \
        opcodes.c               \
@@ -191,7 +193,14 @@ common_sources = \
        verify.c                \
        verify-internals.h      \
        wrapper-types.h \
-       reflection-internals.h
+       reflection-internals.h  \
+       file-mmap-posix.c       \
+       file-mmap-windows.c     \
+       file-mmap.h     \
+       object-offsets.h        \
+       abi-details.h   \
+       metadata-cross-helpers.c
+
 
 # These source files have compile time dependencies on GC code
 gc_dependent_sources = \
@@ -262,7 +271,7 @@ sgen_sources = \
        sgen-qsort.c    \
        sgen-qsort.h
 
-libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(boehm_sources)
+libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(null_gc_sources) $(boehm_sources)
 libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
 
 libmonoruntimesgen_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(sgen_sources)
diff --git a/mono/metadata/abi-details.h b/mono/metadata/abi-details.h
new file mode 100644 (file)
index 0000000..01c741b
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2014 Xamarin Inc
+ */
+#ifndef __MONO_METADATA_ABI_DETAILS_H__
+#define __MONO_METADATA_ABI_DETAILS_H__
+
+#include <config.h>
+#include <glib.h>
+
+#define MONO_ABI_ALIGNOF(type) MONO_ALIGN_ ## type
+#define MONO_CURRENT_ABI_ALIGNOF(type) ((int)G_STRUCT_OFFSET(struct { char c; type x; }, x))
+
+
+#undef DECL_OFFSET
+#undef DECL_OFFSET2
+#define DECL_OFFSET(struct,field) MONO_OFFSET_ ## struct ## _ ## field = -1,
+#define DECL_OFFSET2(struct,field,offset) MONO_OFFSET_ ## struct ## _ ## field = offset,
+#define DECL_ALIGN(type) MONO_ALIGN_ ##type = MONO_CURRENT_ABI_ALIGNOF (type),
+#define DECL_ALIGN2(type,size) MONO_ALIGN_ ##type = size,
+
+enum {
+#include "object-offsets.h"
+};
+
+#ifdef USED_CROSS_COMPILER_OFFSETS
+#define MONO_STRUCT_OFFSET(struct,field) MONO_OFFSET_ ## struct ## _ ## field
+#else
+#define MONO_STRUCT_OFFSET(struct,field) (MONO_OFFSET_ ## struct ## _ ## field == -1, G_STRUCT_OFFSET (struct,field))
+#endif
+
+#endif
index 5b3294aa6b65d316cbc37847ead35ca1783b5909..1f0a4f59d7279e1e06228bb7849d1a2b75922db3 100644 (file)
@@ -242,10 +242,10 @@ mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb,
        mono_thread_init (start_cb, attach_cb);
 
        class = mono_class_from_name (mono_defaults.corlib, "System", "AppDomainSetup");
-       setup = (MonoAppDomainSetup *) mono_object_new (domain, class);
+       setup = (MonoAppDomainSetup *) mono_object_new_pinned (domain, class);
 
        class = mono_class_from_name (mono_defaults.corlib, "System", "AppDomain");
-       ad = (MonoAppDomain *) mono_object_new (domain, class);
+       ad = (MonoAppDomain *) mono_object_new_pinned (domain, class);
        ad->data = domain;
        domain->domain = ad;
        domain->setup = setup;
@@ -330,7 +330,7 @@ mono_context_init (MonoDomain *domain)
        MonoAppContext *context;
 
        class = mono_class_from_name (mono_defaults.corlib, "System.Runtime.Remoting.Contexts", "Context");
-       context = (MonoAppContext *) mono_object_new (domain, class);
+       context = (MonoAppContext *) mono_object_new_pinned (domain, class);
        context->domain_id = domain->domain_id;
        context->context_id = 0;
        domain->default_context = context;
@@ -403,6 +403,25 @@ mono_domain_create_appdomain (char *friendly_name, char *configuration_file)
        return mono_domain_from_appdomain (ad);
 }
 
+/**
+ * mono_domain_set_config:
+ * @domain: MonoDomain initialized with the appdomain we want to change
+ * @base_dir: new base directory for the appdomain
+ * @config_file_name: path to the new configuration for the app domain
+ *
+ * Used to set the system configuration for an appdomain
+ *
+ * Without using this, embedded builds will get 'System.Configuration.ConfigurationErrorsException: 
+ * Error Initializing the configuration system. ---> System.ArgumentException: 
+ * The 'ExeConfigFilename' argument cannot be null.' for some managed calls.
+ */
+void
+mono_domain_set_config (MonoDomain *domain, const char *base_dir, const char *config_file_name)
+{
+       MONO_OBJECT_SETREF (domain->setup, application_base, mono_string_new (domain, base_dir));
+       MONO_OBJECT_SETREF (domain->setup, configuration_file, mono_string_new (domain, config_file_name));
+}
+
 static MonoAppDomainSetup*
 copy_app_domain_setup (MonoDomain *domain, MonoAppDomainSetup *setup)
 {
@@ -1861,7 +1880,7 @@ mono_domain_assembly_search (MonoAssemblyName *aname,
        for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
                ass = tmp->data;
                /* Dynamic assemblies can't match here in MS.NET */
-               if (ass->dynamic || refonly != ass->ref_only || !mono_assembly_names_equal (aname, &ass->aname))
+               if (assembly_is_dynamic (ass) || refonly != ass->ref_only || !mono_assembly_names_equal (aname, &ass->aname))
                        continue;
 
                mono_domain_assemblies_unlock (domain);
@@ -2253,12 +2272,12 @@ deregister_reflection_info_roots (MonoDomain *domain)
                 * promoting it from a simple lock to a complex lock, which we better avoid if
                 * possible.
                 */
-               if (image->dynamic)
+               if (image_is_dynamic (image))
                        deregister_reflection_info_roots_from_list (image);
 
                for (i = 0; i < image->module_count; ++i) {
                        MonoImage *module = image->modules [i];
-                       if (module && module->dynamic)
+                       if (module && image_is_dynamic (module))
                                deregister_reflection_info_roots_from_list (module);
                }
        }
index 3b3884330f903df3a395e3275f7548dbdd9b98af..e0c2f671c2e839e8cc2a90515587741ac7cd27c7 100644 (file)
@@ -66,6 +66,9 @@ mono_domain_create         (void);
 MONO_API MonoDomain *
 mono_domain_create_appdomain (char *friendly_name, char *configuration_file);
 
+MONO_API void
+mono_domain_set_config (MonoDomain *domain, const char *base_dir, const char *config_file_name);
+
 MONO_API MonoDomain *
 mono_domain_get            (void);
 
index 15d60411420a0e041ea0b2fdcfaec9ea6465b01f..a4988a82432266b992b05b4d1064d5b2f081f9c8 100644 (file)
@@ -582,7 +582,7 @@ compute_base (char *path)
                return NULL;
 
        /* Not a well known Mono executable, we are embedded, cant guess the base  */
-       if (strcmp (p, "/mono") && strcmp (p, "/mono-sgen") && strcmp (p, "/pedump") && strcmp (p, "/monodis") && strcmp (p, "/mint") && strcmp (p, "/monodiet"))
+       if (strcmp (p, "/mono") && strcmp (p, "/mono-boehm") && strcmp (p, "/mono-sgen") && strcmp (p, "/pedump") && strcmp (p, "/monodis"))
                return NULL;
            
        *p = 0;
@@ -3024,7 +3024,7 @@ mono_assembly_release_gc_roots (MonoAssembly *assembly)
        if (assembly == NULL || assembly == REFERENCE_MISSING)
                return;
 
-       if (assembly->dynamic) {
+       if (assembly_is_dynamic (assembly)) {
                int i;
                MonoDynamicImage *dynimg = (MonoDynamicImage *)assembly->image;
                for (i = 0; i < dynimg->image.module_count; ++i)
@@ -3087,7 +3087,7 @@ mono_assembly_close_finish (MonoAssembly *assembly)
        if (assembly->image)
                mono_image_close_finish (assembly->image);
 
-       if (assembly->dynamic) {
+       if (assembly_is_dynamic (assembly)) {
                g_free ((char*)assembly->aname.culture);
        } else {
                g_free (assembly);
index 86a83c3a62eef1860fbbb8cde1d8462dbd92ce49..83b06dc6ff99249d68be869f85df6cff191e8085 100644 (file)
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <inttypes.h>
 #include <pwd.h>
 #include <errno.h>
 #include <netdb.h>
@@ -220,7 +221,7 @@ mono_attach_start (void)
         * by creating it is to enable the attach mechanism if the process receives a 
         * SIGQUIT signal, which can only be sent by the owner/root.
         */
-       snprintf (path, sizeof (path), "/tmp/.mono_attach_pid%d", getpid ());
+       snprintf (path, sizeof (path), "/tmp/.mono_attach_pid%"PRIdMAX"", (intmax_t) getpid ());
        fd = open (path, O_RDONLY);
        if (fd == -1)
                return FALSE;
@@ -405,7 +406,7 @@ ipc_connect (void)
                }
        }
 
-       filename = g_strdup_printf ("%s/.mono-%d", directory, getpid ());
+       filename = g_strdup_printf ("%s/.mono-%"PRIdMAX"", directory, (intmax_t) getpid ());
        unlink (filename);
 
        /* Bind a name to the socket.   */
@@ -440,7 +441,7 @@ ipc_connect (void)
 
        ipc_filename = g_strdup (filename);
 
-       server_uri = g_strdup_printf ("unix://%s/.mono-%d?/vm", directory, getpid ());
+       server_uri = g_strdup_printf ("unix://%s/.mono-%"PRIdMAX"?/vm", directory, (intmax_t) getpid ());
 
        g_free (filename);
        g_free (directory);
index 19ad3ca58e01d917ff50fc78f1b7a40d0a575b4b..b396ed12ed2aa4ae8197ff5a9a9a6ec6791e1b98 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef __MONO_ATTACH_H__
 #define __MONO_ATTACH_H__
 
+#include <glib.h>
+#include <mono/utils/mono-compiler.h>
+
 G_BEGIN_DECLS
 
 void
index 82bc43bace4ac21cd09bdb1748df53816b41a4c2..af9eff4780f5f1010bce7bb812fc7d90fa5061f1 100644 (file)
@@ -59,6 +59,9 @@ boehm_thread_unregister (MonoThreadInfo *p);
 static void
 register_test_toggleref_callback (void);
 
+#define BOEHM_GC_BIT_FINALIZER_AWARE 1
+static MonoGCFinalizerCallbacks fin_callbacks;
+
 static void
 mono_gc_warning (char *msg, GC_word arg)
 {
@@ -375,7 +378,8 @@ boehm_thread_unregister (MonoThreadInfo *p)
 
        tid = mono_thread_info_get_tid (p);
 
-       mono_threads_add_joinable_thread ((gpointer)tid);
+       if (p->runtime_thread)
+               mono_threads_add_joinable_thread ((gpointer)tid);
 }
 
 gboolean
@@ -1173,7 +1177,7 @@ mono_gc_conservatively_scan_area (void *start, void *end)
 }
 
 void *
-mono_gc_scan_object (void *obj)
+mono_gc_scan_object (void *obj, void *gc_data)
 {
        g_assert_not_reached ();
        return NULL;
@@ -1241,6 +1245,7 @@ void
 mono_gc_pthread_exit (void *retval)
 {
        pthread_exit (retval);
+       g_assert_not_reached ();
 }
 
 #endif
@@ -1259,6 +1264,10 @@ BOOL APIENTRY mono_gc_dllmain (HMODULE module_handle, DWORD reason, LPVOID reser
 guint
 mono_gc_get_vtable_bits (MonoClass *class)
 {
+       if (fin_callbacks.is_class_finalization_aware) {
+               if (fin_callbacks.is_class_finalization_aware (class))
+                       return BOEHM_GC_BIT_FINALIZER_AWARE;
+       }
        return 0;
 }
 
@@ -1338,4 +1347,29 @@ register_test_toggleref_callback (void)
        mono_gc_toggleref_register_callback (test_toggleref_callback);
 }
 
+static gboolean
+is_finalization_aware (MonoObject *obj)
+{
+       MonoVTable *vt = obj->vtable;
+       return (vt->gc_bits & BOEHM_GC_BIT_FINALIZER_AWARE) == BOEHM_GC_BIT_FINALIZER_AWARE;
+}
+
+static void
+fin_notifier (MonoObject *obj)
+{
+       if (is_finalization_aware (obj))
+               fin_callbacks.object_queued_for_finalization (obj);
+}
+
+void
+mono_gc_register_finalizer_callbacks (MonoGCFinalizerCallbacks *callbacks)
+{
+       if (callbacks->version != MONO_GC_FINALIZER_EXTENSION_VERSION)
+               g_error ("Invalid finalizer callback version. Expected %d but got %d\n", MONO_GC_FINALIZER_EXTENSION_VERSION, callbacks->version);
+
+       fin_callbacks = *callbacks;
+
+       GC_set_finalizer_notify_proc ((void (*) (GC_PTR))fin_notifier);
+}
+
 #endif /* no Boehm GC */
index 3517e76a90f414e1c46d8cfbffa90fc243bc2509..5628ce7dd656dabd757ef054b67e8fb93bcc887c 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _MONO_METADATA_CHAR_CONVERSIONS_H_
 #define _MONO_METADATA_CHAR_CONVERSIONS_H_ 1
 
+#include <glib.h>
+
 /*
  * The CategoryData_v2* tables below are automatically generated
  * by create-category-table(.cs), available in the mcs
index 2160b11741810b6279a63e1320014205b031e05b..ab4a5cb5789e4ef337ab16d39b82371cd4b6cdfc 100644 (file)
@@ -673,7 +673,7 @@ void
 mono_class_setup_supertypes (MonoClass *klass) MONO_INTERNAL;
 
 void
-mono_class_setup_fields_locking (MonoClass *class) MONO_INTERNAL;
+mono_class_setup_fields_locking (MonoClass *klass) MONO_INTERNAL;
 
 /* WARNING
  * Only call this function if you can ensure both @klass and @parent
@@ -712,38 +712,38 @@ typedef struct {
 
 typedef struct {
        guint64 new_object_count;
-       gulong initialized_class_count;
-       gulong generic_vtable_count;
-       gulong used_class_count;
-       gulong method_count;
-       gulong class_vtable_size;
-       gulong class_static_data_size;
-       gulong generic_instance_count;
-       gulong generic_class_count;
-       gulong inflated_method_count;
-       gulong inflated_method_count_2;
-       gulong inflated_type_count;
-       gulong generics_metadata_size;
-       gulong delegate_creations;
-       gulong imt_tables_size;
-       gulong imt_number_of_tables;
-       gulong imt_number_of_methods;
-       gulong imt_used_slots;
-       gulong imt_slots_with_collisions;
-       gulong imt_max_collisions_in_slot;
-       gulong imt_method_count_when_max_collisions;
-       gulong imt_thunks_size;
-       gulong jit_info_table_insert_count;
-       gulong jit_info_table_remove_count;
-       gulong jit_info_table_lookup_count;
-       gulong generics_sharable_methods;
-       gulong generics_unsharable_methods;
-       gulong generics_shared_methods;
-       gulong gsharedvt_methods;
-       gulong minor_gc_count;
-       gulong major_gc_count;
-       gulong minor_gc_time_usecs;
-       gulong major_gc_time_usecs;
+       size_t initialized_class_count;
+       size_t generic_vtable_count;
+       size_t used_class_count;
+       size_t method_count;
+       size_t class_vtable_size;
+       size_t class_static_data_size;
+       size_t generic_instance_count;
+       size_t generic_class_count;
+       size_t inflated_method_count;
+       size_t inflated_method_count_2;
+       size_t inflated_type_count;
+       size_t generics_metadata_size;
+       size_t delegate_creations;
+       size_t imt_tables_size;
+       size_t imt_number_of_tables;
+       size_t imt_number_of_methods;
+       size_t imt_used_slots;
+       size_t imt_slots_with_collisions;
+       size_t imt_max_collisions_in_slot;
+       size_t imt_method_count_when_max_collisions;
+       size_t imt_thunks_size;
+       size_t jit_info_table_insert_count;
+       size_t jit_info_table_remove_count;
+       size_t jit_info_table_lookup_count;
+       size_t generics_sharable_methods;
+       size_t generics_unsharable_methods;
+       size_t generics_shared_methods;
+       size_t gsharedvt_methods;
+       size_t minor_gc_count;
+       size_t major_gc_count;
+       size_t minor_gc_time_usecs;
+       size_t major_gc_time_usecs;
        gboolean enabled;
 } MonoStats;
 
@@ -881,6 +881,16 @@ typedef gboolean (*MonoGetCachedClassInfo) (MonoClass *klass, MonoCachedClassInf
 
 typedef gboolean (*MonoGetClassFromName) (MonoImage *image, const char *name_space, const char *name, MonoClass **res);
 
+static inline gboolean
+method_is_dynamic (MonoMethod *method)
+{
+#ifdef DISABLE_REFLECTION_EMIT
+       return FALSE;
+#else
+       return method->dynamic;
+#endif
+}
+
 void
 mono_classes_init (void) MONO_INTERNAL;
 
@@ -909,13 +919,13 @@ void
 mono_class_setup_parent    (MonoClass *klass, MonoClass *parent) MONO_INTERNAL;
 
 MonoMethod*
-mono_class_get_method_by_index (MonoClass *class, int index) MONO_INTERNAL;
+mono_class_get_method_by_index (MonoClass *klass, int index) MONO_INTERNAL;
 
 MonoMethod*
-mono_class_get_inflated_method (MonoClass *class, MonoMethod *method) MONO_INTERNAL;
+mono_class_get_inflated_method (MonoClass *klass, MonoMethod *method) MONO_INTERNAL;
 
 MonoMethod*
-mono_class_get_vtable_entry (MonoClass *class, int offset) MONO_INTERNAL;
+mono_class_get_vtable_entry (MonoClass *klass, int offset) MONO_INTERNAL;
 
 GPtrArray*
 mono_class_get_implemented_interfaces (MonoClass *klass, MonoError *error) MONO_INTERNAL;
@@ -985,7 +995,7 @@ void
 mono_install_get_class_from_name (MonoGetClassFromName func) MONO_INTERNAL;
 
 MonoGenericContext*
-mono_class_get_context (MonoClass *class) MONO_INTERNAL;
+mono_class_get_context (MonoClass *klass) MONO_INTERNAL;
 
 MonoMethodSignature*
 mono_method_signature_checked (MonoMethod *m, MonoError *err) MONO_INTERNAL;
@@ -1263,7 +1273,7 @@ char*
 mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format) MONO_INTERNAL;
 
 char*
-mono_type_get_full_name (MonoClass *class) MONO_INTERNAL;
+mono_type_get_full_name (MonoClass *klass) 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;
@@ -1324,7 +1334,7 @@ MonoMethod*
 mono_method_search_in_array_class (MonoClass *klass, const char *name, MonoMethodSignature *sig) MONO_INTERNAL;
 
 void
-mono_class_setup_interface_id (MonoClass *class) MONO_INTERNAL;
+mono_class_setup_interface_id (MonoClass *klass) MONO_INTERNAL;
 
 MonoGenericContainer*
 mono_class_get_generic_container (MonoClass *klass) MONO_INTERNAL;
@@ -1342,7 +1352,7 @@ MonoClassField*
 mono_class_get_field_from_name_full (MonoClass *klass, const char *name, MonoType *type) MONO_INTERNAL;
 
 MonoVTable*
-mono_class_vtable_full (MonoDomain *domain, MonoClass *class, gboolean raise_on_error) MONO_INTERNAL;
+mono_class_vtable_full (MonoDomain *domain, MonoClass *klass, gboolean raise_on_error) MONO_INTERNAL;
 
 gboolean
 mono_class_is_assignable_from_slow (MonoClass *target, MonoClass *candidate) MONO_INTERNAL;
@@ -1362,13 +1372,13 @@ MonoClassField*
 mono_class_get_fields_lazy (MonoClass* klass, gpointer *iter) MONO_INTERNAL;
 
 gboolean
-mono_class_check_vtable_constraints (MonoClass *class, GList *in_setup) MONO_INTERNAL;
+mono_class_check_vtable_constraints (MonoClass *klass, GList *in_setup) MONO_INTERNAL;
 
 gboolean
 mono_class_has_finalizer (MonoClass *klass) MONO_INTERNAL;
 
 void
-mono_unload_interface_id (MonoClass *class) MONO_INTERNAL;
+mono_unload_interface_id (MonoClass *klass) MONO_INTERNAL;
 
 GPtrArray*
 mono_class_get_methods_by_name (MonoClass *klass, const char *name, guint32 bflags, gboolean ignore_case, gboolean allow_ctors, MonoException **ex) MONO_INTERNAL;
index 36a86794e77bf55a723c6e26bebff446b1fdb4ce..df1eda26820cc45243b96f9ec5d2874c9f234c6a 100644 (file)
@@ -719,7 +719,7 @@ inflate_generic_type (MonoImage *image, MonoType *type, MonoGenericContext *cont
                if (inst == container->context.class_inst)
                        return NULL;
 
-               gclass = mono_metadata_lookup_generic_class (klass, inst, klass->image->dynamic);
+               gclass = mono_metadata_lookup_generic_class (klass, inst, image_is_dynamic (klass->image));
 
                nt = mono_metadata_type_dup (image, type);
                nt->type = MONO_TYPE_GENERICINST;
@@ -1047,7 +1047,7 @@ mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *k
         * 
         */
        is_mb_open = method->is_generic &&
-               method->klass->image->dynamic && !method->klass->wastypebuilder && /* that is a MethodBuilder from an unfinished TypeBuilder */
+               image_is_dynamic (method->klass->image) && !method->klass->wastypebuilder && /* that is a MethodBuilder from an unfinished TypeBuilder */
                context->method_inst == mono_method_get_generic_container (method)->context.method_inst; /* and it's been instantiated with its own arguments.  */
 
        iresult = g_new0 (MonoMethodInflated, 1);
@@ -1369,7 +1369,7 @@ mono_class_setup_basic_field_info (MonoClass *class)
        image = class->image;
        top = class->field.count;
 
-       if (class->generic_class && class->generic_class->container_class->image->dynamic && !class->generic_class->container_class->wastypebuilder) {
+       if (class->generic_class && image_is_dynamic (class->generic_class->container_class->image) && !class->generic_class->container_class->wastypebuilder) {
                /*
                 * This happens when a generic instance of an unfinished generic typebuilder
                 * is used as an element type for creating an array type. We can't initialize
@@ -1479,7 +1479,7 @@ mono_class_setup_fields (MonoClass *class)
        if (class->setup_fields_called)
                return;
 
-       if (class->generic_class && class->generic_class->container_class->image->dynamic && !class->generic_class->container_class->wastypebuilder) {
+       if (class->generic_class && image_is_dynamic (class->generic_class->container_class->image) && !class->generic_class->container_class->wastypebuilder) {
                /*
                 * This happens when a generic instance of an unfinished generic typebuilder
                 * is used as an element type for creating an array type. We can't initialize
@@ -1749,6 +1749,7 @@ mono_class_layout_fields (MonoClass *class)
        guint32 layout = class->flags & TYPE_ATTRIBUTE_LAYOUT_MASK;
        guint32 pass, passes, real_size;
        gboolean gc_aware_layout = FALSE;
+       gboolean has_static_fields = FALSE;
        MonoClassField *field;
 
        /*
@@ -1894,7 +1895,7 @@ mono_class_layout_fields (MonoClass *class)
                                        field->offset &= ~(align - 1);
                                }
                                /*TypeBuilders produce all sort of weird things*/
-                               g_assert (class->image->dynamic || field->offset > 0);
+                               g_assert (image_is_dynamic (class->image) || field->offset > 0);
                                real_size = field->offset + size;
                        }
 
@@ -1989,6 +1990,8 @@ mono_class_layout_fields (MonoClass *class)
                        break;
                }
 
+               has_static_fields = TRUE;
+
                size = mono_type_size (field->type, &align);
                field->offset = class->sizes.class_size;
                /*align is always non-zero here*/
@@ -1996,6 +1999,10 @@ mono_class_layout_fields (MonoClass *class)
                field->offset &= ~(align - 1);
                class->sizes.class_size = field->offset + size;
        }
+
+       if (has_static_fields && class->sizes.class_size == 0)
+               /* Simplify code which depends on class_size != 0 if the class has static fields */
+               class->sizes.class_size = 8;
 }
 
 static MonoMethod*
@@ -2952,7 +2959,7 @@ get_implicit_generic_array_interfaces (MonoClass *class, int *num, int *is_enume
                nifaces = generic_ireadonlylist_class ? 2 : 3;
 
                // FIXME: This doesn't seem to work/required for generic params
-               if (!(eclass->this_arg.type == MONO_TYPE_VAR || eclass->this_arg.type == MONO_TYPE_MVAR || (eclass->image->dynamic && !eclass->wastypebuilder)))
+               if (!(eclass->this_arg.type == MONO_TYPE_VAR || eclass->this_arg.type == MONO_TYPE_MVAR || (image_is_dynamic (eclass->image) && !eclass->wastypebuilder)))
                        mono_class_setup_interface_offsets (eclass);
 
                interface_count = all_interfaces? eclass->interface_offsets_count: eclass->interface_count;
@@ -3652,7 +3659,7 @@ mono_class_setup_vtable_full (MonoClass *class, GList *in_setup)
                type_token = class->type_token;
        }
 
-       if (class->image->dynamic) {
+       if (image_is_dynamic (class->image)) {
                /* Generic instances can have zero method overrides without causing any harm.
                 * This is true since we don't do layout all over again for them, we simply inflate
                 * the layout of the parent.
@@ -4988,7 +4995,7 @@ mono_class_init (MonoClass *class)
 
        has_cached_info = mono_class_get_cached_class_info (class, &cached_info);
 
-       if (class->generic_class || class->image->dynamic || !class->type_token || (has_cached_info && !cached_info.has_nested_classes))
+       if (class->generic_class || image_is_dynamic (class->image) || !class->type_token || (has_cached_info && !cached_info.has_nested_classes))
                class->nested_classes_inited = TRUE;
 
        /*
@@ -5232,7 +5239,7 @@ gboolean
 mono_is_corlib_image (MonoImage *image)
 {
        /* FIXME: allow the dynamic case for our compilers and with full trust */
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                return image->assembly && !strcmp (image->assembly->aname.name, "mscorlib");
        else
                return image == mono_defaults.corlib;
@@ -6427,7 +6434,7 @@ mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded)
        }
 
        /* for the building corlib use System.Array from it */
-       if (image->assembly && image->assembly->dynamic && image->assembly_name && strcmp (image->assembly_name, "mscorlib") == 0) {
+       if (image->assembly && assembly_is_dynamic (image->assembly) && image->assembly_name && strcmp (image->assembly_name, "mscorlib") == 0) {
                parent = mono_class_from_name (image, "System", "Array");
                corlib_type = TRUE;
        } else {
@@ -6884,7 +6891,7 @@ mono_class_get_property_default_value (MonoProperty *property, MonoTypeEnum *def
         * is stored for dynamic assemblies.
         */
 
-       if (klass->image->dynamic) {
+       if (image_is_dynamic (klass->image)) {
                int prop_index = mono_property_get_index (property);
                if (klass->ext->prop_def_values && klass->ext->prop_def_values [prop_index].data) {
                        *def_type = klass->ext->prop_def_values [prop_index].def_type;
@@ -6961,7 +6968,7 @@ char *
 mono_class_name_from_token (MonoImage *image, guint32 type_token)
 {
        const char *name, *nspace;
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                return g_strdup_printf ("DynamicType 0x%08x", type_token);
        
        switch (type_token & 0xff000000){
@@ -7016,7 +7023,7 @@ mono_class_name_from_token (MonoImage *image, guint32 type_token)
 static char *
 mono_assembly_name_from_token (MonoImage *image, guint32 type_token)
 {
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                return g_strdup_printf ("DynamicAssembly %s", image->name);
        
        switch (type_token & 0xff000000){
@@ -7086,7 +7093,7 @@ mono_class_get_full (MonoImage *image, guint32 type_token, MonoGenericContext *c
        MonoError error;
        MonoClass *class = NULL;
 
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                int table = mono_metadata_token_table (type_token);
 
                if (table != MONO_TABLE_TYPEDEF && table != MONO_TABLE_TYPEREF && table != MONO_TABLE_TYPESPEC) {
@@ -7151,7 +7158,7 @@ mono_type_get_full (MonoImage *image, guint32 type_token, MonoGenericContext *co
        gboolean inflated = FALSE;
 
        //FIXME: this will not fix the very issue for which mono_type_get_full exists -but how to do it then?
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                return mono_class_get_type (mono_lookup_dynamic_token (image, type_token, context));
 
        if ((type_token & 0xff000000) != MONO_TOKEN_TYPE_SPEC) {
@@ -7223,7 +7230,7 @@ mono_image_init_name_cache (MonoImage *image)
 
        image->name_cache = g_hash_table_new (g_str_hash, g_str_equal);
 
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                mono_image_unlock (image);
                return;
        }
@@ -7343,7 +7350,7 @@ mono_class_from_name_case (MonoImage *image, const char* name_space, const char
        const char *nspace;
        guint32 i, visib;
 
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                guint32 token = 0;
                FindUserData user_data;
 
@@ -7508,7 +7515,7 @@ mono_class_from_name (MonoImage *image, const char* name_space, const char *name
 
        mono_image_unlock (image);
 
-       if (!token && image->dynamic && image->modules) {
+       if (!token && image_is_dynamic (image) && image->modules) {
                /* Search modules as well */
                for (i = 0; i < image->module_count; ++i) {
                        MonoImage *module = image->modules [i];
@@ -7990,7 +7997,7 @@ mono_class_implement_interface_slow (MonoClass *target, MonoClass *candidate)
                        return TRUE;
 
                /*A TypeBuilder can have more interfaces on tb->interfaces than on candidate->interfaces*/
-               if (candidate->image->dynamic && !candidate->wastypebuilder) {
+               if (image_is_dynamic (candidate->image) && !candidate->wastypebuilder) {
                        MonoReflectionTypeBuilder *tb = mono_class_get_ref_info (candidate);
                        int j;
                        if (tb && tb->interfaces) {
@@ -8104,7 +8111,7 @@ mono_class_get_cctor (MonoClass *klass)
 {
        MonoCachedClassInfo cached_info;
 
-       if (klass->image->dynamic) {
+       if (image_is_dynamic (klass->image)) {
                /* 
                 * has_cctor is not set for these classes because mono_class_init () is
                 * not run for them.
@@ -8246,7 +8253,7 @@ gpointer
 mono_ldtoken (MonoImage *image, guint32 token, MonoClass **handle_class,
              MonoGenericContext *context)
 {
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                MonoClass *tmp_handle_class;
                gpointer obj = mono_lookup_dynamic_token_class (image, token, TRUE, &tmp_handle_class, context);
 
@@ -9074,7 +9081,7 @@ mono_field_get_rva (MonoClassField *field)
 
        field_index = mono_field_get_index (field);
                
-       if (!klass->ext->field_def_values [field_index].data && !klass->image->dynamic) {
+       if (!klass->ext->field_def_values [field_index].data && !image_is_dynamic (klass->image)) {
                mono_metadata_field_info (field->parent->image, klass->field.first + field_index, NULL, &rva, NULL);
                if (!rva)
                        g_warning ("field %s in %s should have RVA data, but hasn't", mono_field_get_name (field), field->parent->name);
@@ -9246,7 +9253,7 @@ mono_event_get_flags (MonoEvent *event)
 /**
  * mono_class_get_method_from_name:
  * @klass: where to look for the method
- * @name_space: name of the method
+ * @name: name of the method
  * @param_count: number of parameters. -1 for any number.
  *
  * Obtains a MonoMethod with a given name and number of parameters.
@@ -10119,7 +10126,7 @@ mono_field_resolve_type (MonoClassField *field, MonoError *error)
                int idx = class->field.first + field_idx;
 
                /*FIXME, in theory we do not lazy load SRE fields*/
-               g_assert (!image->dynamic);
+               g_assert (!image_is_dynamic (image));
 
                if (class->generic_container) {
                        container = class->generic_container;
@@ -10164,7 +10171,7 @@ mono_field_resolve_flags (MonoClassField *field)
                int idx = class->field.first + field_idx;
 
                /*FIXME, in theory we do not lazy load SRE fields*/
-               g_assert (!image->dynamic);
+               g_assert (!image_is_dynamic (image));
 
                return mono_metadata_decode_table_row_col (image, MONO_TABLE_FIELD, idx, MONO_FIELD_FLAGS);
        }
index 19b624c3fb52087e312002b20826ea4208b8c02c..f722716d1e6f80c2defff89c66e0395d25f37b88 100644 (file)
@@ -14,6 +14,7 @@
 #include "object.h"
 #include "loader.h"
 #include "cil-coff.h"
+#include "metadata/abi-details.h"
 #include "metadata/cominterop.h"
 #include "metadata/marshal.h"
 #include "metadata/method-builder.h"
@@ -695,11 +696,11 @@ mono_cominterop_emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type,
                // load src
                mono_mb_emit_ldloc (mb, 0);     
                mono_mb_emit_byte (mb, CEE_LDIND_REF);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
                mono_mb_emit_byte (mb, CEE_LDIND_REF);
 
                /* load the RCW from the ComInteropProxy*/
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoComInteropProxy, com_object));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoComInteropProxy, com_object));
                mono_mb_emit_byte (mb, CEE_LDIND_REF);
 
                if (conv == MONO_MARSHAL_CONV_OBJECT_INTERFACE) {
@@ -1002,11 +1003,11 @@ mono_cominterop_get_invoke (MonoMethod *method)
        /* get real proxy object, which is a ComInteropProxy in this case*/
        temp_obj = mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
 
        /* load the RCW from the ComInteropProxy*/
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoComInteropProxy, com_object));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoComInteropProxy, com_object));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
 
        /* load args and make the call on the RCW */
@@ -1034,7 +1035,7 @@ mono_cominterop_get_invoke (MonoMethod *method)
                        cache_proxy = mono_class_get_method_from_name (com_interop_proxy_class, "CacheProxy", 0);
 
                mono_mb_emit_ldarg (mb, 0);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
                mono_mb_emit_byte (mb, CEE_LDIND_REF);
                mono_mb_emit_managed_call (mb, cache_proxy, NULL);
        }
index a7ef7686b68930b69490f9879aa3bcd371e566f9..669305111503d8e209693a6e2f2d550a3bde318b 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <mono/metadata/object.h>
 #include <mono/io-layer/io-layer.h>
+#include <mono/utils/mono-compiler.h>
 
 G_BEGIN_DECLS
 
index b8987c9ec3ae396bcd5851ff549a83944f1e8a33..6a70b350085b9d7183412a63aaf9f9860fc28cf0 100644 (file)
@@ -17,6 +17,9 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <signal.h>
+#ifdef HAVE_SYS_SELECT_H
+#    include <sys/select.h>
+#endif
 #ifdef HAVE_SYS_TIME_H
 #    include <sys/time.h>
 #endif
index 9e48a3fe07749222d678cbc693ef0a21672a5b0b..6c7ff4a1f27d3e9370c05d760f5fdebfc867b2ad 100644 (file)
 
 #ifdef HOST_WIN32
 
-#if _WIN32_WINNT < 0x0501
-/* Required for ACTCTX. */
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#endif /* _WIN32_WINNT < 0x0501 */
-
 #include <string.h>
 #include <glib.h>
 #include <mono/io-layer/io-layer.h>
@@ -226,10 +220,12 @@ STDAPI _CorValidateImage(PVOID *ImageBase, LPCWSTR FileName)
 {
        IMAGE_DOS_HEADER* DosHeader;
        IMAGE_NT_HEADERS32* NtHeaders32;
-       IMAGE_NT_HEADERS64* NtHeaders64;
        IMAGE_DATA_DIRECTORY* CliHeaderDir;
+#ifdef _WIN64
+       IMAGE_NT_HEADERS64* NtHeaders64;
        MonoCLIHeader* CliHeader;
        DWORD SizeOfHeaders;
+#endif
        DWORD* Address;
        DWORD OldProtect;
 
@@ -410,7 +406,9 @@ HMODULE WINAPI MonoLoadImage(LPCWSTR FileName)
        HANDLE MapHandle;
        IMAGE_DOS_HEADER* DosHeader;
        IMAGE_NT_HEADERS32* NtHeaders32;
+#ifdef _WIN64
        IMAGE_NT_HEADERS64* NtHeaders64;
+#endif
        HMODULE ModuleHandle;
 
        FileHandle = CreateFile(FileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
@@ -458,7 +456,9 @@ InvalidImageFormat:
                goto UnmapView;
        }
 
+#ifdef _WIN64
 ValidImage:
+#endif
        UnmapViewOfFile(DosHeader);
        CloseHandle(MapHandle);
 
index a2bec50a0fe051ab75a1e7a55b236b75b16c25f8..e5f842f2528f95bb6b565a9a6807623a3ed1124b 100644 (file)
 #define __MONO_COREE_H__
 
 #include <config.h>
+#include <glib.h>
 
 #ifdef HOST_WIN32
 
 #include <mono/io-layer/io-layer.h>
+#include <mono/utils/mono-compiler.h>
 #include "image.h"
 
 #define STATUS_SUCCESS 0x00000000L
index 50e174ffe06743bef71b34b395e589b3227ed0df..5ee2eaf03f3a840e974db2f53d8c0e4fe078f85a 100644 (file)
@@ -3,6 +3,7 @@
 #define _MONO_METADATA_CULTURE_INFO_H_ 1
 
 #include <glib.h>
+#include <mono/metadata/object.h>
 
 #define NUM_DAYS 7
 #define NUM_MONTHS 13
index a24e415d18ca764c12b37bcdc9bb3e94833d2ce3..aa62ad230e5cc51e95cabfaa96f6748dcc51e4f4 100644 (file)
@@ -575,7 +575,7 @@ dis_one (GString *str, MonoDisHelper *dh, MonoMethod *method, const unsigned cha
                size_t len2;
                char *blob2 = NULL;
 
-               if (!method->klass->image->dynamic && !method->dynamic) {
+               if (!image_is_dynamic (method->klass->image) && !method_is_dynamic (method)) {
                        token = read32 (ip);
                        blob = mono_metadata_user_string (method->klass->image, mono_metadata_token_index (token));
 
index 43c782a207d3aff15b04a35cbe36d98831fc173d..e9737c752b1768dedc6f180187af135f821a8eb1 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef _MONO_DECIMAL_H_
+#define _MONO_DECIMAL_H_
+
+#include <glib.h>
 #include "mono/metadata/object.h"
 #include "mono/utils/mono-compiler.h"
 
@@ -45,3 +49,4 @@ gint32 mono_decimalSetExponent(/*[In, Out]*/decimal_repr* pA, gint32 texp) MONO_
 
 gint32 mono_string2decimal(/*[Out]*/decimal_repr* pA, /*[In]*/MonoString* s, gint32 decrDecimal, gint32 sign) MONO_INTERNAL;
 
+#endif
index 09c6479c03d3805e5e1f6f12a43ba7f530168154..a9031eb97eaaa2fd7ac1acb48cc0dccb81befc4c 100644 (file)
@@ -197,8 +197,7 @@ struct _MonoJitInfo {
        } d;
        struct _MonoJitInfo *next_jit_code_hash;
        gpointer    code_start;
-       /* This might contain an id for the unwind info instead of a register mask */
-       guint32     used_regs;
+       guint32     unwind_info;
        int         code_size;
        guint32     num_clauses:15;
        /* Whenever the code is domain neutral or 'shared' */
index c408a996e469ae6bc02681acc6ff6caa43883d86..f42554f739f0a64391a8ce5bb25f1934425f0209 100644 (file)
@@ -856,13 +856,13 @@ mono_jit_info_add_aot_module (MonoImage *image, gpointer start, gpointer end)
 {
        MonoJitInfo *ji;
 
-       mono_appdomains_lock ();
+       g_assert (mono_root_domain);
+       mono_domain_lock (mono_root_domain);
 
        /*
         * 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);
@@ -874,7 +874,7 @@ mono_jit_info_add_aot_module (MonoImage *image, gpointer start, gpointer end)
        ji->code_size = (guint8*)end - (guint8*)start;
        jit_info_table_add (mono_root_domain, &mono_root_domain->aot_modules, ji);
 
-       mono_appdomains_unlock ();
+       mono_domain_unlock (mono_root_domain);
 }
 
 void
@@ -985,6 +985,16 @@ mono_jit_info_get_try_block_hole_table_info (MonoJitInfo *ji)
        }
 }
 
+static int
+try_block_hole_table_size (MonoJitInfo *ji)
+{
+       MonoTryBlockHoleTableJitInfo *table;
+
+       table = mono_jit_info_get_try_block_hole_table_info (ji);
+       g_assert (table);
+       return sizeof (MonoTryBlockHoleTableJitInfo) + table->num_holes * sizeof (MonoTryBlockHoleJitInfo);
+}
+
 MonoArchEHJitInfo*
 mono_jit_info_get_arch_eh_info (MonoJitInfo *ji)
 {
@@ -993,7 +1003,7 @@ mono_jit_info_get_arch_eh_info (MonoJitInfo *ji)
                if (ji->has_generic_jit_info)
                        ptr += sizeof (MonoGenericJitInfo);
                if (ji->has_try_block_holes)
-                       ptr += sizeof (MonoTryBlockHoleTableJitInfo);
+                       ptr += try_block_hole_table_size (ji);
                return (MonoArchEHJitInfo*)ptr;
        } else {
                return NULL;
@@ -1008,7 +1018,7 @@ mono_jit_info_get_cas_info (MonoJitInfo *ji)
                if (ji->has_generic_jit_info)
                        ptr += sizeof (MonoGenericJitInfo);
                if (ji->has_try_block_holes)
-                       ptr += sizeof (MonoTryBlockHoleTableJitInfo);
+                       ptr += try_block_hole_table_size (ji);
                if (ji->has_arch_eh_info)
                        ptr += sizeof (MonoArchEHJitInfo);
                return (MonoMethodCasInfo*)ptr;
@@ -2013,7 +2023,7 @@ mono_domain_free (MonoDomain *domain, gboolean force)
        /* Close dynamic assemblies first, since they have no ref count */
        for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
                MonoAssembly *ass = tmp->data;
-               if (!ass->image || !ass->image->dynamic)
+               if (!ass->image || !image_is_dynamic (ass->image))
                        continue;
                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading domain %s[%p], assembly %s[%p], ref_count=%d", domain->friendly_name, domain, ass->aname.name, ass, ass->ref_count);
                if (!mono_assembly_close_except_image_pools (ass))
@@ -2024,7 +2034,7 @@ mono_domain_free (MonoDomain *domain, gboolean force)
                MonoAssembly *ass = tmp->data;
                if (!ass)
                        continue;
-               if (!ass->image || ass->image->dynamic)
+               if (!ass->image || image_is_dynamic (ass->image))
                        continue;
                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading domain %s[%p], assembly %s[%p], ref_count=%d", domain->friendly_name, domain, ass->aname.name, ass, ass->ref_count);
                if (!mono_assembly_close_except_image_pools (ass))
diff --git a/mono/metadata/file-mmap-posix.c b/mono/metadata/file-mmap-posix.c
new file mode 100644 (file)
index 0000000..32f555a
--- /dev/null
@@ -0,0 +1,522 @@
+/*
+ * file-mmap-posix.c: File mmap internal calls
+ *
+ * Author:
+ *     Rodrigo Kumpera
+ *
+ * Copyright 2014 Xamarin Inc (http://www.xamarin.com)
+ */
+
+#include <config.h>
+
+#ifndef TARGET_WIN32
+
+#include <glib.h>
+#include <string.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
+#include <fcntl.h>
+
+
+#include <mono/metadata/object.h>
+#include <mono/metadata/file-io.h>
+#include <mono/metadata/file-mmap.h>
+#include <mono/utils/atomic.h>
+#include <mono/utils/mono-memory-model.h>
+#include <mono/utils/mono-mmap.h>
+
+typedef struct {
+       int kind;
+       int ref_count;
+       size_t capacity;
+       char *name;
+       int fd;
+} MmapHandle;
+
+typedef struct {
+       void *address;
+       void *free_handle;
+       size_t length;
+} MmapInstance;
+
+enum {
+       BAD_CAPACITY_FOR_FILE_BACKED = 1,
+       CAPACITY_SMALLER_THAN_FILE_SIZE,
+       FILE_NOT_FOUND,
+       FILE_ALREADY_EXISTS,
+       PATH_TOO_LONG,
+       COULD_NOT_OPEN,
+       CAPACITY_MUST_BE_POSITIVE,
+       INVALID_FILE_MODE,
+       COULD_NOT_MAP_MEMORY
+};
+
+enum {
+       FILE_MODE_CREATE_NEW = 1,
+       FILE_MODE_CREATE = 2,
+       FILE_MODE_OPEN = 3,
+       FILE_MODE_OPEN_OR_CREATE = 4,
+       FILE_MODE_TRUNCATE = 5,
+       FILE_MODE_APPEND = 6,
+};
+
+enum {
+       MMAP_FILE_ACCESS_READ_WRITE = 0,
+       MMAP_FILE_ACCESS_READ = 1,
+       MMAP_FILE_ACCESS_WRITE = 2,
+       MMAP_FILE_ACCESS_COPY_ON_WRITE = 3,
+       MMAP_FILE_ACCESS_READ_EXECUTE = 4,
+       MMAP_FILE_ACCESS_READ_WRITE_EXECUTE = 5,
+};
+
+#ifdef PLATFORM_ANDROID
+#define DEFAULT_FILEMODE 0666
+#else
+#define DEFAULT_FILEMODE DEFFILEMODE
+#endif
+
+static int mmap_init_state;
+static mono_mutex_t named_regions_mutex;
+static GHashTable *named_regions;
+
+
+static gint64
+align_up_to_page_size (gint64 size)
+{
+       gint64 page_size = mono_pagesize ();
+       return (size + page_size - 1) & ~(page_size - 1);
+}
+
+static gint64
+align_down_to_page_size (gint64 size)
+{
+       gint64 page_size = mono_pagesize ();
+       return size & ~(page_size - 1);
+}
+
+static void
+file_mmap_init (void)
+{
+retry: 
+       switch (mmap_init_state) {
+       case  0:
+               if (InterlockedCompareExchange (&mmap_init_state, 1, 0) != 0)
+                       goto retry;
+               named_regions = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
+               mono_mutex_init (&named_regions_mutex);
+
+               mono_atomic_store_release (&mmap_init_state, 2);
+               break;
+
+       case 1:
+               do {
+                       g_usleep (1000); /* Been init'd by other threads, this is very rare. */
+               } while (mmap_init_state != 2);
+               break;
+       case 2:
+               break;
+       default:
+               g_error ("Invalid init state %d", mmap_init_state);
+       }
+}
+
+static void
+named_regions_lock (void)
+{
+       file_mmap_init ();
+       mono_mutex_lock (&named_regions_mutex);
+}
+
+static void
+named_regions_unlock (void)
+{
+       mono_mutex_unlock (&named_regions_mutex);       
+}
+
+
+static int
+file_mode_to_unix (int mode)
+{
+       switch (mode) {
+       case FILE_MODE_CREATE_NEW:
+        return O_CREAT | O_EXCL; 
+       case FILE_MODE_CREATE:
+        return O_CREAT | O_TRUNC;
+       case FILE_MODE_OPEN:
+               return 0;
+       case FILE_MODE_OPEN_OR_CREATE:
+        return O_CREAT;
+       case FILE_MODE_TRUNCATE:
+        return O_TRUNC;
+       case FILE_MODE_APPEND:
+               return O_APPEND;
+       default:
+               g_error ("unknown FileMode %d", mode);
+       }
+}
+
+static int
+access_mode_to_unix (int access)
+{
+       switch (access) {
+       case MMAP_FILE_ACCESS_READ_WRITE:
+       case MMAP_FILE_ACCESS_COPY_ON_WRITE:
+       case MMAP_FILE_ACCESS_READ_WRITE_EXECUTE:
+               return O_RDWR;
+       case MMAP_FILE_ACCESS_READ:
+       case MMAP_FILE_ACCESS_READ_EXECUTE:
+               return O_RDONLY;
+       case MMAP_FILE_ACCESS_WRITE:
+               return O_WRONLY;
+       default:
+               g_error ("unknown MemoryMappedFileAccess %d", access);
+       }
+}
+
+static int
+acess_to_mmap_flags (int access)
+{
+       switch (access) {
+       case MMAP_FILE_ACCESS_READ_WRITE:
+        return MONO_MMAP_WRITE | MONO_MMAP_READ | MONO_MMAP_SHARED;
+        
+       case MMAP_FILE_ACCESS_WRITE:
+        return MONO_MMAP_WRITE | MONO_MMAP_SHARED;
+        
+       case MMAP_FILE_ACCESS_COPY_ON_WRITE:
+        return MONO_MMAP_WRITE | MONO_MMAP_READ | MONO_MMAP_PRIVATE;
+        
+       case MMAP_FILE_ACCESS_READ_EXECUTE:
+        return MONO_MMAP_EXEC | MONO_MMAP_PRIVATE | MONO_MMAP_SHARED;
+        
+       case MMAP_FILE_ACCESS_READ_WRITE_EXECUTE:
+        return MONO_MMAP_WRITE | MONO_MMAP_READ | MONO_MMAP_EXEC | MONO_MMAP_SHARED;
+        
+       case MMAP_FILE_ACCESS_READ:
+        return MONO_MMAP_READ | MONO_MMAP_SHARED;
+       default:
+               g_error ("unknown MemoryMappedFileAccess %d", access);
+       }
+}
+
+/*
+This allow us to special case zero size files that can be arbitrarily mapped.
+*/
+static gboolean
+is_special_zero_size_file (struct stat *buf)
+{
+       return buf->st_size == 0 && (buf->st_mode & (S_IFCHR | S_IFBLK | S_IFIFO | S_IFSOCK)) != 0;
+}
+
+/*
+XXX implement options
+*/
+static void*
+open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int access, int options, int *error)
+{
+       struct stat buf;
+       char *c_path = path ? mono_string_to_utf8 (path) : NULL;
+       MmapHandle *handle = NULL;
+       int result, fd;
+
+       if (path)
+               result = stat (c_path, &buf);
+       else
+               result = fstat (input_fd, &buf);
+
+       if (mode == FILE_MODE_TRUNCATE || mode == FILE_MODE_APPEND || mode == FILE_MODE_OPEN) {
+               if (result == -1) { //XXX translate errno?
+                       *error = FILE_NOT_FOUND;
+                       goto done;
+               }
+       }
+
+       if (mode == FILE_MODE_CREATE_NEW && result == 0) {
+               *error = FILE_ALREADY_EXISTS;
+               goto done;
+       }
+
+       if (result == 0) {
+               if (*capacity == 0) {
+                       /**
+                        * Special files such as FIFOs, sockets, and devices can have a size of 0. Specifying a capacity for these
+                        * also makes little sense, so don't do the check if th file is one of these.
+                        */
+                       if (buf.st_size == 0 && !is_special_zero_size_file (&buf)) {
+                               *error = CAPACITY_SMALLER_THAN_FILE_SIZE;
+                               goto done;
+                       }
+                       *capacity = buf.st_size;
+               } else if (*capacity < buf.st_size) {
+                       *error = CAPACITY_SMALLER_THAN_FILE_SIZE;
+                       goto done;
+               }
+       } else {
+               if (mode == FILE_MODE_CREATE_NEW && *capacity == 0) {
+                       *error = CAPACITY_SMALLER_THAN_FILE_SIZE;
+                       goto done;
+               }
+       }
+
+       if (path) //FIXME use io portability?
+               fd = open (c_path, file_mode_to_unix (mode) | access_mode_to_unix (access), DEFAULT_FILEMODE);
+       else
+               fd = dup (input_fd);
+
+       if (fd == -1) { //XXX translate errno?
+               *error = COULD_NOT_OPEN;
+               goto done;
+       }
+
+       *capacity = align_up_to_page_size ((size_t)*capacity);
+
+       if (*capacity > buf.st_size) {
+               int unused G_GNUC_UNUSED = ftruncate (fd, (off_t)*capacity);
+       }
+
+       handle = g_new0 (MmapHandle, 1);
+       handle->ref_count = 1;
+       handle->capacity = *capacity;
+       handle->fd = fd;
+
+done:
+       g_free (c_path);
+       return (void*)handle;
+}
+
+#define MONO_ANON_FILE_TEMPLATE "/mono.anonmap.XXXXXXXXX"
+static void*
+open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, int options, int *error)
+{
+       char *c_mapName;
+       MmapHandle *handle;
+       if (*capacity <= 1) {
+               *error = CAPACITY_MUST_BE_POSITIVE;
+               return NULL;
+       }
+
+       if (!(mode == FILE_MODE_CREATE_NEW || mode == FILE_MODE_OPEN_OR_CREATE || mode == FILE_MODE_OPEN)) {
+               *error = INVALID_FILE_MODE;
+               return NULL;
+       }
+
+       c_mapName = mono_string_to_utf8 (mapName);
+
+       named_regions_lock ();
+       handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
+       if (handle) {
+               if (mode == FILE_MODE_CREATE_NEW) {
+                       *error = FILE_ALREADY_EXISTS;
+                       goto done;
+               }
+
+               handle->ref_count++;
+               //XXX should we ftruncate if the file is smaller than capacity?
+       } else {
+               int fd;
+               char *file_name;
+               const char *tmp_dir;
+               int unused G_GNUC_UNUSED, alloc_size;
+
+               if (mode == FILE_MODE_OPEN) {
+                       *error = FILE_NOT_FOUND;
+                       goto done;
+               }
+               *capacity = align_up_to_page_size (*capacity);
+
+               tmp_dir = g_get_tmp_dir ();
+               alloc_size = strlen (tmp_dir) + strlen (MONO_ANON_FILE_TEMPLATE) + 1;
+               if (alloc_size > 1024) {//rather fail that stack overflow
+                       *error = COULD_NOT_MAP_MEMORY;
+                       goto done;
+               }
+               file_name = alloca (alloc_size);
+               strcpy (file_name, tmp_dir);
+               strcat (file_name, MONO_ANON_FILE_TEMPLATE);
+
+               fd = mkstemp (file_name);
+               if (fd == -1) {
+                       *error = COULD_NOT_MAP_MEMORY;
+                       goto done;
+               }
+
+               unlink (file_name);
+               unused = ftruncate (fd, (off_t)*capacity);
+
+               handle = g_new0 (MmapHandle, 1);
+               handle->ref_count = 1;
+               handle->capacity = *capacity;
+               handle->fd = fd;
+               handle->name = g_strdup (c_mapName);
+
+               g_hash_table_insert (named_regions, handle->name, handle);
+
+       }
+
+done:
+       named_regions_unlock ();
+
+       g_free (c_mapName);
+       return handle;
+}
+
+
+void *
+mono_mmap_open_file (MonoString *path, int mode, MonoString *mapName, gint64 *capacity, int access, int options, int *error)
+{
+       g_assert (path || mapName);
+
+       if (!mapName)
+               return open_file_map (path, -1, mode, capacity, access, options, error);
+
+       if (path) {
+               MmapHandle *handle;
+               char *c_mapName = mono_string_to_utf8 (mapName);
+
+               named_regions_lock ();
+               handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
+               if (handle) {
+                       *error = FILE_ALREADY_EXISTS;
+                       handle = NULL;
+               } else {
+                       handle = open_file_map (path, -1, mode, capacity, access, options, error);
+                       if (handle) {
+                               handle->name = g_strdup (c_mapName);
+                               g_hash_table_insert (named_regions, handle->name, handle);
+                       }
+               }
+               named_regions_unlock ();
+
+               g_free (c_mapName);
+               return handle;
+       }
+
+       return open_memory_map (mapName, mode, capacity, access, options, error);
+}
+
+void *
+mono_mmap_open_handle (void *input_fd, MonoString *mapName, gint64 *capacity, int access, int options, int *error)
+{
+       MmapHandle *handle;
+       char *c_mapName = mono_string_to_utf8 (mapName);
+
+       named_regions_lock ();
+       handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
+       if (handle) {
+               *error = FILE_ALREADY_EXISTS;
+               handle = NULL;
+       } else {
+               //XXX we're exploiting wapi HANDLE == FD equivalence. THIS IS FRAGILE, create a _wapi_handle_to_fd call
+               handle = open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, error);
+               handle->name = g_strdup (c_mapName);
+               g_hash_table_insert (named_regions, handle->name, handle);
+       }
+       named_regions_unlock ();
+
+       g_free (c_mapName);
+       return handle;
+}
+
+void
+mono_mmap_close (void *mmap_handle)
+{
+       MmapHandle *handle = mmap_handle;
+
+       named_regions_lock ();
+       --handle->ref_count;
+       if (handle->ref_count == 0) {
+               if (handle->name)
+                       g_hash_table_remove (named_regions, handle->name);
+
+               g_free (handle->name);
+               close (handle->fd);
+               g_free (handle);
+       }
+       named_regions_unlock ();
+}
+
+void
+mono_mmap_configure_inheritability (void *mmap_handle, gboolean inheritability)
+{
+       MmapHandle *h = mmap_handle;
+       int fd, flags;
+
+       fd = h->fd;
+       flags = fcntl (fd, F_GETFD, 0);
+       if (inheritability)
+               flags &= ~FD_CLOEXEC;
+       else
+               flags |= FD_CLOEXEC;
+       fcntl (fd, F_SETFD, flags);     
+}
+
+void
+mono_mmap_flush (void *mmap_handle)
+{
+       MmapInstance *h = mmap_handle;
+
+       if (h)
+               msync (h->address, h->length, MS_SYNC);
+}
+
+int
+mono_mmap_map (void *handle, gint64 offset, gint64 *size, int access, void **mmap_handle, void **base_address)
+{
+       gint64 mmap_offset = 0;
+       MmapHandle *fh = handle;
+       MmapInstance res = { 0 };
+       size_t eff_size = *size;
+       struct stat buf = { 0 };
+       fstat (fh->fd, &buf); //FIXME error handling
+
+       /**
+         * We use the file size if one of the following conditions is true:
+         *  -input size is zero
+         *  -input size is bigger than the file and the file is not a magical zero size file such as /dev/mem.
+         */
+       if (eff_size == 0 || (eff_size > buf.st_size && !is_special_zero_size_file (&buf)))
+               eff_size = buf.st_size;
+       *size = eff_size;
+
+       mmap_offset = align_down_to_page_size (offset);
+       eff_size += (offset - mmap_offset);
+       //FIXME translate some interesting errno values
+       res.address = mono_file_map ((size_t)eff_size, acess_to_mmap_flags (access), fh->fd, mmap_offset, &res.free_handle);
+       res.length = eff_size;
+
+       if (res.address) {
+               *mmap_handle = g_memdup (&res, sizeof (MmapInstance));
+               *base_address = (char*)res.address + (offset - mmap_offset);
+               return 0;
+       }
+
+       *mmap_handle = NULL;
+       *base_address = NULL;
+       return COULD_NOT_MAP_MEMORY;
+}
+
+gboolean
+mono_mmap_unmap (void *mmap_handle)
+{
+       int res = 0;
+       MmapInstance *h = mmap_handle;
+
+       res = mono_file_unmap (h->address, h->free_handle);
+
+       g_free (h);
+       return res == 0;
+}
+
+#endif
diff --git a/mono/metadata/file-mmap-windows.c b/mono/metadata/file-mmap-windows.c
new file mode 100644 (file)
index 0000000..78203ad
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * file-mmap-posix.c: File mmap internal calls
+ *
+ * Author:
+ *     Rodrigo Kumpera
+ *
+ * Copyright 2014 Xamarin Inc (http://www.xamarin.com)
+ */
+
+#include <config.h>
+
+#ifdef TARGET_WIN32
+
+#include <glib.h>
+#include <string.h>
+#include <errno.h>
+
+
+#include <mono/metadata/object.h>
+#include <mono/metadata/file-mmap.h>
+
+void *
+mono_mmap_open_file (MonoString *path, int mode, MonoString *mapName, gint64 *capacity, int access, int options, int *error)
+{
+       g_error ("No windows backend");
+       return NULL;
+}
+
+void *
+mono_mmap_open_handle (void *handle, MonoString *mapName, gint64 *capacity, int access, int options, int *error)
+{
+       g_error ("No windows backend");
+       return NULL;
+}
+
+void
+mono_mmap_close (void *mmap_handle)
+{
+       g_error ("No windows backend");
+}
+
+void
+mono_mmap_configure_inheritability (void *mmap_handle, gboolean inheritability)
+{
+       g_error ("No windows backend");
+}
+
+void
+mono_mmap_flush (void *mmap_handle)
+{
+       g_error ("No windows backend");
+}
+
+
+
+int
+mono_mmap_map (void *handle, gint64 offset, gint64 *size, int access, void **mmap_handle, void **base_address)
+{
+       g_error ("No windows backend");
+       return 0;
+}
+
+gboolean
+mono_mmap_unmap (void *mmap_handle)
+{
+       g_error ("No windows backend");
+       return TRUE;
+}
+
+#endif
diff --git a/mono/metadata/file-mmap.h b/mono/metadata/file-mmap.h
new file mode 100644 (file)
index 0000000..1d75016
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * file-mmap.h: Managed mmap wrappers.
+ *
+ * Authors:
+ *     Rodrigo Kumpera
+ *
+ * Copyright 2014 Xamarin Inc (http://www.xamarin.com)
+ */
+
+#ifndef _MONO_METADATA_FILE_MMAP_H_
+#define _MONO_METADATA_FILE_MMAP_H_
+
+#include <config.h>
+#include <glib.h>
+
+#include <mono/metadata/object-internals.h>
+#include <mono/io-layer/io-layer.h>
+#include <mono/utils/mono-compiler.h>
+
+extern void mono_mmap_close (void *mmap_handle) MONO_INTERNAL;
+
+extern void mono_mmap_configure_inheritability (void *mmap_handle, gboolean inheritability) MONO_INTERNAL;
+
+extern void mono_mmap_flush (void *mmap_handle) MONO_INTERNAL;
+
+extern void *mono_mmap_open_file (MonoString *string, int mode, MonoString *mapName, gint64 *capacity, int access, int options, int *error) MONO_INTERNAL;
+
+extern void *mono_mmap_open_handle (void *handle, MonoString *mapName, gint64 *capacity, int access, int options, int *error) MONO_INTERNAL;
+
+extern int mono_mmap_map (void *handle, gint64 offset, gint64 *size, int access, void **mmap_handle, void **base_address) MONO_INTERNAL;
+
+extern gboolean mono_mmap_unmap (void *base_address) MONO_INTERNAL;
+
+#endif /* _MONO_METADATA_FILE_MMAP_H_ */
index a17872c93627069719aa4b4a24e745cdfc536561..c0a1ca2fcdcf1e192d042081cea5334c7d45c939 100644 (file)
 #include <unistd.h>
 #endif
 
-#ifdef HAVE_SYS_SYSCALL_H
-#include <sys/syscall.h>
-#endif
-
 G_BEGIN_DECLS
 
 gint ves_icall_System_IO_FSW_SupportsFSW (void) MONO_INTERNAL;
index 01f843526964499d4de395a2f9118b5111b5dbbe..62fdb109d45310a18a6b159053726093d1d9a5c9 100644 (file)
@@ -13,6 +13,7 @@
 #include <glib.h>
 #include <mono/metadata/object-internals.h>
 #include <mono/metadata/threads-types.h>
+#include <mono/metadata/sgen-conf.h>
 #include <mono/utils/gc_wrapper.h>
 
 typedef struct {
@@ -20,6 +21,14 @@ typedef struct {
        int major_gc_count;
        long long minor_gc_time_usecs;
        long long major_gc_time_usecs;
+#ifdef HEAVY_STATISTICS
+       unsigned long long gray_queue_section_alloc;
+       unsigned long long gray_queue_section_free;
+       unsigned long long gray_queue_enqueue_fast_path;
+       unsigned long long gray_queue_dequeue_fast_path;
+       unsigned long long gray_queue_enqueue_slow_path;
+       unsigned long long gray_queue_dequeue_slow_path;
+#endif
 } GCStats;
 
 #define mono_domain_finalizers_lock(domain) EnterCriticalSection (&(domain)->finalizable_objects_hash_lock);
@@ -142,8 +151,8 @@ void* mono_gc_make_root_descr_all_refs (int numbits) MONO_INTERNAL;
  * foreach (ref in GC references in the are structure pointed to by ADDR)
  *    mark_func (ref)
  */
-typedef void (*MonoGCMarkFunc)     (void **addr);
-typedef void (*MonoGCRootMarkFunc) (void *addr, MonoGCMarkFunc mark_func);
+typedef void (*MonoGCMarkFunc)     (void **addr, void *gc_data);
+typedef void (*MonoGCRootMarkFunc) (void *addr, MonoGCMarkFunc mark_func, void *gc_data);
 
 /* Create a descriptor with a user defined marking function */
 MONO_API void *mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker);
@@ -267,7 +276,7 @@ typedef struct {
         * - in the second pass, it should mark the remaining areas of the stack
         *   using precise marking by calling mono_gc_scan_object ().
         */
-       void (*thread_mark_func) (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise);
+       void (*thread_mark_func) (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise, void *gc_data);
 } MonoGCCallbacks;
 
 /* Set the callback functions callable by the GC */
@@ -280,7 +289,7 @@ MonoGCCallbacks *mono_gc_get_gc_callbacks (void) MONO_INTERNAL;
 void mono_gc_conservatively_scan_area (void *start, void *end) MONO_INTERNAL;
 
 /* Scan OBJ, returning its new address */
-void *mono_gc_scan_object (void *obj) MONO_INTERNAL;
+void *mono_gc_scan_object (void *obj, void *gc_data) MONO_INTERNAL;
 
 /* Return the bitmap encoded by a descriptor */
 gsize* mono_gc_get_bitmap_for_descr (void *descr, int *numbits) MONO_INTERNAL;
@@ -356,6 +365,19 @@ struct _MonoReferenceQueue {
        gboolean should_be_deleted;
 };
 
+enum {
+       MONO_GC_FINALIZER_EXTENSION_VERSION = 1,
+};
+
+typedef struct {
+       int version;
+       gboolean (*is_class_finalization_aware) (MonoClass *klass);
+       void (*object_queued_for_finalization) (MonoObject *object);
+} MonoGCFinalizerCallbacks;
+
+void mono_gc_register_finalizer_callbacks (MonoGCFinalizerCallbacks *callbacks);
+
+
 #ifdef HOST_WIN32
 BOOL APIENTRY mono_gc_dllmain (HMODULE module_handle, DWORD reason, LPVOID reserved) MONO_INTERNAL;
 #endif
@@ -369,7 +391,7 @@ void mono_gc_bzero_aligned (void *dest, size_t size) MONO_INTERNAL;
 void mono_gc_memmove_atomic (void *dest, const void *src, size_t size) MONO_INTERNAL;
 void mono_gc_memmove_aligned (void *dest, const void *src, size_t size) MONO_INTERNAL;
 
-guint mono_gc_get_vtable_bits (MonoClass *class) MONO_INTERNAL;
+guint mono_gc_get_vtable_bits (MonoClass *klass) MONO_INTERNAL;
 
 void mono_gc_register_altstack (gpointer stack, gint32 stack_size, gpointer altstack, gint32 altstack_size) MONO_INTERNAL;
 
index 1f7a5fb1370ead56efb9ce18e442052261504b8f..3d4532648a78e9e44ada94531dce8ca4b1498ab3 100644 (file)
@@ -26,6 +26,7 @@
 #include <mono/metadata/threadpool.h>
 #include <mono/metadata/threadpool-internals.h>
 #include <mono/metadata/threads-types.h>
+#include <mono/metadata/sgen-conf.h>
 #include <mono/utils/mono-logger-internal.h>
 #include <mono/metadata/gc-internal.h>
 #include <mono/metadata/marshal.h> /* for mono_delegate_free_ftnptr () */
@@ -1061,6 +1062,8 @@ finalize_domain_objects (DomainFinalizationReq *req)
 static guint32
 finalizer_thread (gpointer unused)
 {
+       gboolean wait = TRUE;
+
        while (!finished) {
                /* Wait to be notified that there's at least one
                 * finaliser to run
@@ -1068,12 +1071,15 @@ finalizer_thread (gpointer unused)
 
                g_assert (mono_domain_get () == mono_get_root_domain ());
 
+               if (wait) {
                /* An alertable wait is required so this thread can be suspended on windows */
 #ifdef MONO_HAS_SEMAPHORES
-               MONO_SEM_WAIT_ALERTABLE (&finalizer_sem, TRUE);
+                       MONO_SEM_WAIT_ALERTABLE (&finalizer_sem, TRUE);
 #else
-               WaitForSingleObjectEx (finalizer_event, INFINITE, TRUE);
+                       WaitForSingleObjectEx (finalizer_event, INFINITE, TRUE);
 #endif
+               }
+               wait = TRUE;
 
                mono_threads_perform_thread_dump ();
 
@@ -1105,7 +1111,16 @@ finalizer_thread (gpointer unused)
 
                reference_queue_proccess_all ();
 
-               SetEvent (pending_done_event);
+#ifdef MONO_HAS_SEMAPHORES
+               /* Avoid posting the pending done event until there are pending finalizers */
+               if (MONO_SEM_TIMEDWAIT (&finalizer_sem, 0) == 0)
+                       /* Don't wait again at the start of the loop */
+                       wait = FALSE;
+               else
+                       SetEvent (pending_done_event);
+#else
+                       SetEvent (pending_done_event);
+#endif
        }
 
        SetEvent (shutdown_event);
@@ -1139,6 +1154,14 @@ mono_gc_init (void)
        mono_counters_register ("Major GC collections", MONO_COUNTER_GC | MONO_COUNTER_INT, &gc_stats.major_gc_count);
        mono_counters_register ("Minor GC time", MONO_COUNTER_GC | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &gc_stats.minor_gc_time_usecs);
        mono_counters_register ("Major GC time", MONO_COUNTER_GC | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &gc_stats.major_gc_time_usecs);
+#ifdef HEAVY_STATISTICS
+       mono_counters_register ("Gray Queue alloc section", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_section_alloc);
+       mono_counters_register ("Gray Queue free section", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_section_free);
+       mono_counters_register ("Gray Queue enqueue fast path", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_enqueue_fast_path);
+       mono_counters_register ("Gray Queue dequeue fast path", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_dequeue_fast_path);
+       mono_counters_register ("Gray Queue enqueue slow path", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_enqueue_slow_path);
+       mono_counters_register ("Gray Queue dequeue slow path", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_dequeue_slow_path);
+#endif
 
        mono_gc_base_init ();
 
index 0582798fc799f07e0c96ece088a47b41424784cf..028319dcfe03ed4ae34eec16a9d3853b5cebebc7 100644 (file)
@@ -315,12 +315,14 @@ ICALL(INOW_1, "AddWatch", ves_icall_System_IO_InotifyWatcher_AddWatch)
 ICALL(INOW_2, "GetInotifyInstance", ves_icall_System_IO_InotifyWatcher_GetInotifyInstance)
 ICALL(INOW_3, "RemoveWatch", ves_icall_System_IO_InotifyWatcher_RemoveWatch)
 
-#if defined (TARGET_IOS) || defined (TARGET_ANDROID)
 ICALL_TYPE(MMAPIMPL, "System.IO.MemoryMappedFiles.MemoryMapImpl", MMAPIMPL_1)
-ICALL(MMAPIMPL_1, "mono_filesize_from_fd", mono_filesize_from_fd)
-ICALL(MMAPIMPL_2, "mono_filesize_from_path", mono_filesize_from_path)
-#endif
-
+ICALL(MMAPIMPL_1, "CloseMapping", mono_mmap_close)
+ICALL(MMAPIMPL_2, "ConfigureHandleInheritability", mono_mmap_configure_inheritability)
+ICALL(MMAPIMPL_3, "Flush", mono_mmap_flush)
+ICALL(MMAPIMPL_4, "MapInternal", mono_mmap_map)
+ICALL(MMAPIMPL_5, "OpenFileInternal", mono_mmap_open_file)
+ICALL(MMAPIMPL_6, "OpenHandleInternal", mono_mmap_open_handle)
+ICALL(MMAPIMPL_7, "Unmap", mono_mmap_unmap)
 
 ICALL_TYPE(MONOIO, "System.IO.MonoIO", MONOIO_1)
 ICALL(MONOIO_1, "Close(intptr,System.IO.MonoIOError&)", ves_icall_System_IO_MonoIO_Close)
index ee0e5cd8a36f388b444feb86168f2afa71d2e5f9..0559152fa60c19d73660ad2cc9ab0925ab9eaefb 100644 (file)
@@ -75,6 +75,7 @@
 #include <mono/metadata/mono-ptr-array.h>
 #include <mono/metadata/verify-internals.h>
 #include <mono/metadata/runtime.h>
+#include <mono/metadata/file-mmap.h>
 #include <mono/io-layer/io-layer.h>
 #include <mono/utils/strtod.h>
 #include <mono/utils/monobitset.h>
@@ -126,17 +127,12 @@ mono_double_ParseImpl (char *ptr, double *result)
 
        MONO_ARCH_SAVE_REGS;
 
-#ifdef __arm__
-       if (*ptr)
-               *result = strtod (ptr, &endptr);
-#else
        if (*ptr){
                /* mono_strtod () is not thread-safe */
                EnterCriticalSection (&mono_strtod_mutex);
                *result = mono_strtod (ptr, &endptr);
                LeaveCriticalSection (&mono_strtod_mutex);
        }
-#endif
 
        if (!*ptr || (endptr && *endptr))
                return FALSE;
@@ -1265,6 +1261,8 @@ get_caller_no_reflection (MonoMethod *m, gint32 no, gint32 ilo, gboolean managed
 static MonoReflectionType *
 type_from_name (const char *str, MonoBoolean ignoreCase)
 {
+       MonoMethod *m, *dest;
+
        MonoType *type = NULL;
        MonoAssembly *assembly = NULL;
        MonoTypeNameParse info;
@@ -1280,32 +1278,38 @@ type_from_name (const char *str, MonoBoolean ignoreCase)
                return NULL;
        }
 
-       if (info.assembly.name) {
-               assembly = mono_assembly_load (&info.assembly, NULL, NULL);
-       } else {
-               MonoMethod *m = mono_method_get_last_managed ();
-               MonoMethod *dest = m;
 
-               mono_stack_walk_no_il (get_caller_no_reflection, &dest);
-               if (!dest)
-                       dest = m;
+       /*
+        * We must compute the calling assembly as type loading must happen under a metadata context.
+        * For example. The main assembly is a.exe and Type.GetType is called from dir/b.dll. Without
+        * the metadata context (basedir currently) set to dir/b.dll we won't be able to load a dir/c.dll.
+        */
+       m = mono_method_get_last_managed ();
+       dest = m;
 
-               /*
-                * FIXME: mono_method_get_last_managed() sometimes returns NULL, thus
-                *        causing ves_icall_System_Reflection_Assembly_GetCallingAssembly()
-                *        to crash.  This only seems to happen in some strange remoting
-                *        scenarios and I was unable to figure out what's happening there.
-                *        Dec 10, 2005 - Martin.
-                */
+       mono_stack_walk_no_il (get_caller_no_reflection, &dest);
+       if (!dest)
+               dest = m;
 
-               if (dest) {
-                       assembly = dest->klass->image->assembly;
-                       type_resolve = TRUE;
-               } else {
-                       g_warning (G_STRLOC);
-               }
+       /*
+        * FIXME: mono_method_get_last_managed() sometimes returns NULL, thus
+        *        causing ves_icall_System_Reflection_Assembly_GetCallingAssembly()
+        *        to crash.  This only seems to happen in some strange remoting
+        *        scenarios and I was unable to figure out what's happening there.
+        *        Dec 10, 2005 - Martin.
+        */
+
+       if (dest) {
+               assembly = dest->klass->image->assembly;
+               type_resolve = TRUE;
+       } else {
+               g_warning (G_STRLOC);
        }
 
+       if (info.assembly.name)
+               assembly = mono_assembly_load (&info.assembly, assembly ? assembly->basedir : NULL, NULL);
+
+
        if (assembly) {
                /* When loading from the current assembly, AppDomain.TypeResolve will not be called yet */
                type = mono_reflection_get_type (assembly->image, &info, ignoreCase, &type_resolve);
@@ -1609,12 +1613,17 @@ ves_icall_System_Reflection_FieldInfo_get_marshal_info (MonoReflectionField *fie
 {
        MonoClass *klass = field->field->parent;
        MonoMarshalType *info;
+       MonoType *ftype;
        int i;
 
        if (klass->generic_container ||
            (klass->generic_class && klass->generic_class->context.class_inst->is_open))
                return NULL;
 
+       ftype = mono_field_get_type (field->field);
+       if (ftype && !(ftype->attrs & FIELD_ATTRIBUTE_HAS_FIELD_MARSHAL))
+               return NULL;
+
        info = mono_marshal_load_type_info (klass);
 
        for (i = 0; i < info->num_fields; ++i) {
@@ -1740,6 +1749,7 @@ ves_icall_MonoField_GetFieldOffset (MonoReflectionField *field)
        MonoClass *parent = field->field->parent;
        if (!parent->size_inited)
                mono_class_init (parent);
+       mono_class_setup_fields_locking (parent);
 
        return field->field->offset - sizeof (MonoObject);
 }
@@ -1887,7 +1897,7 @@ ves_icall_MonoField_GetRawConstantValue (MonoReflectionField *this)
        if (!(t->attrs & FIELD_ATTRIBUTE_HAS_DEFAULT))
                mono_raise_exception (mono_get_exception_invalid_operation (NULL));
 
-       if (field->parent->image->dynamic) {
+       if (image_is_dynamic (field->parent->image)) {
                /* FIXME: */
                g_assert_not_reached ();
        }
@@ -2167,7 +2177,7 @@ ves_icall_Type_GetPacking (MonoReflectionType *type, guint32 *packing, guint32 *
        MonoClass *klass = mono_class_from_mono_type (type->type);
        mono_class_init_or_throw (klass);
 
-       if (klass->image->dynamic) {
+       if (image_is_dynamic (klass->image)) {
                MonoReflectionTypeBuilder *tb = (MonoReflectionTypeBuilder*)type;
                *packing = tb->packing_size;
                *size = tb->class_size;
@@ -2266,12 +2276,15 @@ ves_icall_MonoType_get_DeclaringType (MonoReflectionType *type)
 
        if (type->type->byref)
                return NULL;
-       if (type->type->type == MONO_TYPE_VAR)
-               class = mono_type_get_generic_param_owner (type->type)->owner.klass;
-       else if (type->type->type == MONO_TYPE_MVAR)
-               class = mono_type_get_generic_param_owner (type->type)->owner.method->klass;
-       else
+       if (type->type->type == MONO_TYPE_VAR) {
+               MonoGenericContainer *param = mono_type_get_generic_param_owner (type->type);
+               class = param ? param->owner.klass : NULL;
+       } else if (type->type->type == MONO_TYPE_MVAR) {
+               MonoGenericContainer *param = mono_type_get_generic_param_owner (type->type);
+               class = param ? param->owner.method->klass : NULL;
+       } else {
                class = mono_class_from_mono_type (type->type)->nested_in;
+       }
 
        return class ? mono_type_get_object (domain, &class->byval_arg) : NULL;
 }
@@ -2600,7 +2613,7 @@ ves_icall_MonoMethod_GetDllImportAttribute (MonoMethod *method)
                g_assert (DllImportAttributeClass);
        }
                                                                                                                
-       if (method->klass->image->dynamic) {
+       if (image_is_dynamic (method->klass->image)) {
                MonoReflectionMethodAux *method_aux = 
                        g_hash_table_lookup (
                                                                          ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -2664,7 +2677,7 @@ ves_icall_MonoMethod_GetGenericMethodDefinition (MonoReflectionMethod *method)
        if (!result->is_generic)
                return NULL;
 
-       if (method->method->klass->image->dynamic) {
+       if (image_is_dynamic (method->method->klass->image)) {
                MonoDynamicImage *image = (MonoDynamicImage*)method->method->klass->image;
                MonoReflectionMethod *res;
 
@@ -2815,7 +2828,7 @@ ves_icall_InternalInvoke (MonoReflectionMethod *method, MonoObject *this, MonoAr
                return NULL;
        }
 
-       if (image->dynamic && !((MonoDynamicImage*)image)->run) {
+       if (image_is_dynamic (image) && !((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;
        }
@@ -4161,7 +4174,7 @@ ves_icall_System_Reflection_Assembly_InternalGetType (MonoReflectionAssembly *as
                        type = NULL;
        }
        else
-               if (assembly->assembly->dynamic) {
+               if (assembly_is_dynamic (assembly->assembly)) {
                        /* Enumerate all modules */
                        MonoReflectionAssemblyBuilder *abuilder = (MonoReflectionAssemblyBuilder*)assembly;
                        int i;
@@ -4711,7 +4724,7 @@ ves_icall_System_Reflection_Assembly_GetModulesInternal (MonoReflectionAssembly
        MonoImage *image = assembly->assembly->image;
 
        g_assert (image != NULL);
-       g_assert (!assembly->assembly->dynamic);
+       g_assert (!assembly_is_dynamic (assembly->assembly));
 
        table = &image->tables [MONO_TABLE_FILE];
        file_count = table->rows;
@@ -5185,7 +5198,7 @@ ves_icall_System_Reflection_Assembly_GetTypes (MonoReflectionAssembly *assembly,
 
        domain = mono_object_domain (assembly);
 
-       g_assert (!assembly->assembly->dynamic);
+       g_assert (!assembly_is_dynamic (assembly->assembly));
        image = assembly->assembly->image;
        table = &image->tables [MONO_TABLE_FILE];
        res = mono_module_get_types (domain, image, &exceptions, exportedOnly);
@@ -5315,7 +5328,7 @@ ves_icall_System_Reflection_Module_GetGlobalType (MonoReflectionModule *module)
 
        g_assert (module->image);
 
-       if (module->image->dynamic && ((MonoDynamicImage*)(module->image))->initial_image)
+       if (image_is_dynamic (module->image) && ((MonoDynamicImage*)(module->image))->initial_image)
                /* These images do not have a global type */
                return NULL;
 
@@ -5355,7 +5368,7 @@ ves_icall_System_Reflection_Module_GetHINSTANCE (MonoReflectionModule *module)
 ICALL_EXPORT void
 ves_icall_System_Reflection_Module_GetPEKind (MonoImage *image, gint32 *pe_kind, gint32 *machine)
 {
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                MonoDynamicImage *dyn = (MonoDynamicImage*)image;
                *pe_kind = dyn->pe_kind;
                *machine = dyn->machine;
@@ -5396,7 +5409,7 @@ ves_icall_System_Reflection_Module_InternalGetTypes (MonoReflectionModule *modul
 static gboolean
 mono_memberref_is_method (MonoImage *image, guint32 token)
 {
-       if (!image->dynamic) {
+       if (!image_is_dynamic (image)) {
                guint32 cols [MONO_MEMBERREF_SIZE];
                const char *sig;
                mono_metadata_decode_row (&image->tables [MONO_TABLE_MEMBERREF], mono_metadata_token_index (token) - 1, cols, MONO_MEMBERREF_SIZE);
@@ -5445,7 +5458,7 @@ ves_icall_System_Reflection_Module_ResolveTypeToken (MonoImage *image, guint32 t
                return NULL;
        }
 
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                if ((table == MONO_TABLE_TYPEDEF) || (table == MONO_TABLE_TYPEREF)) {
                        klass = mono_lookup_dynamic_token_class (image, token, FALSE, NULL, NULL);
                        return klass ? &klass->byval_arg : NULL;
@@ -5490,7 +5503,7 @@ ves_icall_System_Reflection_Module_ResolveMethodToken (MonoImage *image, guint32
                return NULL;
        }
 
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                if (table == MONO_TABLE_METHOD)
                        return mono_lookup_dynamic_token_class (image, token, FALSE, NULL, NULL);
 
@@ -5534,7 +5547,7 @@ ves_icall_System_Reflection_Module_ResolveStringToken (MonoImage *image, guint32
                return NULL;
        }
 
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                return mono_lookup_dynamic_token_class (image, token, FALSE, NULL, NULL);
 
        if ((index <= 0) || (index >= image->heap_us.size)) {
@@ -5564,7 +5577,7 @@ ves_icall_System_Reflection_Module_ResolveFieldToken (MonoImage *image, guint32
                return NULL;
        }
 
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                if (table == MONO_TABLE_FIELD)
                        return mono_lookup_dynamic_token_class (image, token, FALSE, NULL, NULL);
 
@@ -5668,7 +5681,7 @@ ves_icall_System_Reflection_Module_ResolveSignature (MonoImage *image, guint32 t
        if (table != MONO_TABLE_STANDALONESIG)
                return NULL;
 
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                return NULL;
 
        if ((idx == 0) || (idx > tables [MONO_TABLE_STANDALONESIG].rows))
@@ -5840,7 +5853,7 @@ ves_icall_System_Delegate_CreateDelegate_internal (MonoReflectionType *type, Mon
 
        delegate = mono_object_new (mono_object_domain (type), delegate_class);
 
-       if (method->dynamic) {
+       if (method_is_dynamic (method)) {
                /* Creating a trampoline would leak memory */
                func = mono_compile_method (method);
        } else {
@@ -6460,12 +6473,11 @@ ves_icall_System_Environment_GetEnvironmentVariableNames (void)
 ICALL_EXPORT void
 ves_icall_System_Environment_InternalSetEnvironmentVariable (MonoString *name, MonoString *value)
 {
-       MonoError error;
 #ifdef HOST_WIN32
-
        gunichar2 *utf16_name, *utf16_value;
 #else
        gchar *utf8_name, *utf8_value;
+       MonoError error;
 #endif
 
        MONO_ARCH_SAVE_REGS;
@@ -6723,7 +6735,7 @@ ICALL_EXPORT void
 ves_icall_System_Environment_BroadcastSettingChange (void)
 {
 #ifdef HOST_WIN32
-       SendMessageTimeout (HWND_BROADCAST, WM_SETTINGCHANGE, NULL, L"Environment", SMTO_ABORTIFHUNG, 2000, 0);
+       SendMessageTimeout (HWND_BROADCAST, WM_SETTINGCHANGE, (WPARAM)NULL, (LPARAM)L"Environment", SMTO_ABORTIFHUNG, 2000, 0);
 #endif
 }
 
index f89f0c9ecc3361f3d7297725fca626338040cbe2..3a4d69c3b5806b9ade330af3af817c41f9be10ea 100644 (file)
@@ -534,7 +534,7 @@ mono_image_check_for_module_cctor (MonoImage *image)
        MonoTableInfo *t, *mt;
        t = &image->tables [MONO_TABLE_TYPEDEF];
        mt = &image->tables [MONO_TABLE_METHOD];
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                /* FIXME: */
                image->checked_module_cctor = TRUE;
                return;
@@ -671,12 +671,20 @@ class_next_value (gpointer value)
 void
 mono_image_init (MonoImage *image)
 {
+       InitializeCriticalSection (&image->lock);
+       InitializeCriticalSection (&image->szarray_cache_lock);
+
        image->mempool = mono_mempool_new_size (512);
        mono_internal_hash_table_init (&image->class_cache,
                                       g_direct_hash,
                                       class_key_extract,
                                       class_next_value);
-       image->field_cache = g_hash_table_new (NULL, NULL);
+#ifdef HOST_WIN32
+       // FIXME:
+       image->field_cache = mono_conc_hashtable_new (&image->lock, NULL, NULL);
+#else
+       image->field_cache = mono_conc_hashtable_new (&image->lock.mutex, NULL, NULL);
+#endif
 
        image->typespec_cache = g_hash_table_new (NULL, NULL);
        image->memberref_signatures = g_hash_table_new (NULL, NULL);
@@ -684,8 +692,6 @@ mono_image_init (MonoImage *image)
        image->method_signatures = g_hash_table_new (NULL, NULL);
 
        image->property_hash = mono_property_hash_new ();
-       InitializeCriticalSection (&image->lock);
-       InitializeCriticalSection (&image->szarray_cache_lock);
 }
 
 #if G_BYTE_ORDER != G_LITTLE_ENDIAN
@@ -1539,7 +1545,7 @@ mono_image_close_except_pools (MonoImage *image)
         * assemblies, so we can't release these references in mono_assembly_close () since the
         * MonoImage might outlive its associated MonoAssembly.
         */
-       if (image->references && !image->dynamic) {
+       if (image->references && !image_is_dynamic (image)) {
                for (i = 0; i < image->nreferences; i++) {
                        if (image->references [i] && image->references [i] != REFERENCE_MISSING) {
                                if (!mono_assembly_close_except_image_pools (image->references [i]))
@@ -1602,7 +1608,7 @@ mono_image_close_except_pools (MonoImage *image)
        if (image->methodref_cache)
                g_hash_table_destroy (image->methodref_cache);
        mono_internal_hash_table_destroy (&image->class_cache);
-       g_hash_table_destroy (image->field_cache);
+       mono_conc_hashtable_destroy (image->field_cache);
        if (image->array_cache) {
                g_hash_table_foreach (image->array_cache, free_array_cache_entry, NULL);
                g_hash_table_destroy (image->array_cache);
@@ -1697,7 +1703,7 @@ mono_image_close_except_pools (MonoImage *image)
        DeleteCriticalSection (&image->lock);
 
        /*g_print ("destroy image %p (dynamic: %d)\n", image, image->dynamic);*/
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                /* Dynamic images are GC_MALLOCed */
                g_free ((char*)image->module_name);
                mono_dynamic_image_free ((MonoDynamicImage*)image);
@@ -1713,7 +1719,7 @@ mono_image_close_finish (MonoImage *image)
 {
        int i;
 
-       if (image->references && !image->dynamic) {
+       if (image->references && !image_is_dynamic (image)) {
                for (i = 0; i < image->nreferences; i++) {
                        if (image->references [i] && image->references [i] != REFERENCE_MISSING)
                                mono_assembly_close_finish (image->references [i]);
@@ -1734,7 +1740,7 @@ mono_image_close_finish (MonoImage *image)
        mono_perfcounters->loader_bytes -= mono_mempool_get_allocated (image->mempool);
 #endif
 
-       if (!image->dynamic) {
+       if (!image_is_dynamic (image)) {
                if (debug_assembly_unload)
                        mono_mempool_invalidate (image->mempool);
                else {
@@ -2105,7 +2111,7 @@ mono_image_get_public_key (MonoImage *image, guint32 *size)
        const char *pubkey;
        guint32 len, tok;
 
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                if (size)
                        *size = ((MonoDynamicImage*)image)->public_key_len;
                return (char*)((MonoDynamicImage*)image)->public_key;
@@ -2202,7 +2208,7 @@ mono_image_get_assembly (MonoImage *image)
 gboolean
 mono_image_is_dynamic (MonoImage *image)
 {
-       return image->dynamic;
+       return image_is_dynamic (image);
 }
 
 /**
@@ -2366,7 +2372,7 @@ void
 mono_image_append_class_to_reflection_info_set (MonoClass *class)
 {
        MonoImage *image = class->image;
-       g_assert (image->dynamic);
+       g_assert (image_is_dynamic (image));
        mono_image_lock (image);
        image->reflection_info_unregister_classes = g_slist_prepend_mempool (image->mempool, image->reflection_info_unregister_classes, class);
        mono_image_unlock (image);
index f950055953eaa5f728b435c793012fb8ac6f895d..f1ed2d01dcee9e140d8a2b08ecb20fb5bf853542 100644 (file)
@@ -517,7 +517,7 @@ mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass,
        guint32 type;
        MonoClassField *field;
 
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                MonoClassField *result;
                MonoClass *handle_class;
 
@@ -532,13 +532,10 @@ mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass,
                return result;
        }
 
-       mono_image_lock (image);
-       if ((field = g_hash_table_lookup (image->field_cache, GUINT_TO_POINTER (token)))) {
+       if ((field = mono_conc_hashtable_lookup (image->field_cache, GUINT_TO_POINTER (token)))) {
                *retklass = field->parent;
-               mono_image_unlock (image);
                return field;
        }
-       mono_image_unlock (image);
 
        if (mono_metadata_token_table (token) == MONO_TABLE_MEMBERREF)
                field = field_from_memberref (image, token, retklass, context);
@@ -555,10 +552,9 @@ mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass,
                field = mono_class_get_field (k, token);
        }
 
-       mono_image_lock (image);
        if (field && field->parent && !field->parent->generic_class && !field->parent->generic_container)
-               g_hash_table_insert (image->field_cache, GUINT_TO_POINTER (token), field);
-       mono_image_unlock (image);
+               mono_conc_hashtable_insert (image->field_cache, GUINT_TO_POINTER (token), field);
+
        return field;
 }
 
@@ -596,7 +592,7 @@ find_method_in_class (MonoClass *klass, const char *name, const char *qname, con
        /* Search directly in the metadata to avoid calling setup_methods () */
 
        /* FIXME: !from_class->generic_class condition causes test failures. */
-       if (klass->type_token && !klass->image->dynamic && !klass->methods && !klass->rank && klass == from_class && !from_class->generic_class) {
+       if (klass->type_token && !image_is_dynamic (klass->image) && !klass->methods && !klass->rank && klass == from_class && !from_class->generic_class) {
                for (i = 0; i < klass->method.count; ++i) {
                        guint32 cols [MONO_METHOD_SIZE];
                        MonoMethod *method;
@@ -855,11 +851,9 @@ mono_method_get_signature_full (MonoMethod *method, MonoImage *image, guint32 to
        if (method->klass->generic_class)
                return mono_method_signature (method);
 
-#ifndef DISABLE_REFLECTION_EMIT
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                sig = mono_reflection_lookup_signature (image, method, token);
        } else {
-#endif
                mono_metadata_decode_row (&image->tables [MONO_TABLE_MEMBERREF], idx-1, cols, MONO_MEMBERREF_SIZE);
                sig_idx = cols [MONO_MEMBERREF_SIGNATURE];
 
@@ -888,10 +882,7 @@ mono_method_get_signature_full (MonoMethod *method, MonoImage *image, guint32 to
                        mono_loader_set_error_bad_image (g_strdup_printf ("Incompatible method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, image->name));
                        return NULL;
                }
-#ifndef DISABLE_REFLECTION_EMIT
        }
-#endif
-
 
        if (context) {
                MonoError error;
@@ -1351,7 +1342,7 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
        if (piinfo->addr)
                return piinfo->addr;
 
-       if (method->klass->image->dynamic) {
+       if (image_is_dynamic (method->klass->image)) {
                MonoReflectionMethodAux *method_aux = 
                        g_hash_table_lookup (
                                ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -1695,7 +1686,7 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
        int size;
        guint32 cols [MONO_TYPEDEF_SIZE];
 
-       if (image->dynamic) {
+       if (image_is_dynamic (image)) {
                MonoClass *handle_class;
 
                result = mono_lookup_dynamic_token_class (image, token, TRUE, &handle_class, context);
@@ -1823,7 +1814,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
                if (!image->method_cache)
                        image->method_cache = g_hash_table_new (NULL, NULL);
                result = g_hash_table_lookup (image->method_cache, GINT_TO_POINTER (mono_metadata_token_index (token)));
-       } else if (!image->dynamic) {
+       } else if (!image_is_dynamic (image)) {
                if (!image->methodref_cache)
                        image->methodref_cache = g_hash_table_new (NULL, NULL);
                result = g_hash_table_lookup (image->methodref_cache, GINT_TO_POINTER (token));
@@ -1844,7 +1835,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
 
                if (mono_metadata_token_table (token) == MONO_TABLE_METHOD)
                        result2 = g_hash_table_lookup (image->method_cache, GINT_TO_POINTER (mono_metadata_token_index (token)));
-               else if (!image->dynamic)
+               else if (!image_is_dynamic (image))
                        result2 = g_hash_table_lookup (image->methodref_cache, GINT_TO_POINTER (token));
 
                if (result2) {
@@ -1854,7 +1845,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
 
                if (mono_metadata_token_table (token) == MONO_TABLE_METHOD)
                        g_hash_table_insert (image->method_cache, GINT_TO_POINTER (mono_metadata_token_index (token)), result);
-               else if (!image->dynamic)
+               else if (!image_is_dynamic (image))
                        g_hash_table_insert (image->methodref_cache, GINT_TO_POINTER (token), result);
        }
 
@@ -1986,7 +1977,7 @@ mono_free_method  (MonoMethod *method)
                /* g_free (method->signature); */
        }
        
-       if (method->dynamic) {
+       if (method_is_dynamic (method)) {
                MonoMethodWrapper *mw = (MonoMethodWrapper*)method;
                int i;
 
@@ -2039,7 +2030,7 @@ mono_method_get_param_names (MonoMethod *method, const char **names)
 
        mono_class_init (klass);
 
-       if (klass->image->dynamic) {
+       if (image_is_dynamic (klass->image)) {
                MonoReflectionMethodAux *method_aux = 
                        g_hash_table_lookup (
                                ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -2096,9 +2087,8 @@ mono_method_get_param_token (MonoMethod *method, int index)
 
        mono_class_init (klass);
 
-       if (klass->image->dynamic) {
+       if (image_is_dynamic (klass->image))
                g_assert_not_reached ();
-       }
 
        methodt = &klass->image->tables [MONO_TABLE_METHOD];
        idx = mono_method_get_index (method);
@@ -2131,7 +2121,7 @@ mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs)
        for (i = 0; i < signature->param_count + 1; ++i)
                mspecs [i] = NULL;
 
-       if (method->klass->image->dynamic) {
+       if (image_is_dynamic (method->klass->image)) {
                MonoReflectionMethodAux *method_aux = 
                        g_hash_table_lookup (
                                ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -2186,7 +2176,7 @@ mono_method_has_marshal_info (MonoMethod *method)
        MonoTableInfo *paramt;
        guint32 idx;
 
-       if (method->klass->image->dynamic) {
+       if (image_is_dynamic (method->klass->image)) {
                MonoReflectionMethodAux *method_aux = 
                        g_hash_table_lookup (
                                ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -2567,6 +2557,7 @@ mono_method_get_header (MonoMethod *method)
        MonoImage* img;
        gpointer loc;
        MonoMethodHeader *header;
+       MonoGenericContainer *container;
 
        if ((method->flags & METHOD_ATTRIBUTE_ABSTRACT) || (method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) || (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) || (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL))
                return NULL;
@@ -2616,7 +2607,14 @@ mono_method_get_header (MonoMethod *method)
        if (!loc)
                return NULL;
 
-       header = mono_metadata_parse_mh_full (img, mono_method_get_generic_container (method), loc);
+       /*
+        * When parsing the types of local variables, we must pass any container available
+        * to ensure that both VAR and MVAR will get the right owner.
+        */
+       container = mono_method_get_generic_container (method);
+       if (!container)
+               container = method->klass->generic_container;
+       header = mono_metadata_parse_mh_full (img, container, loc);
 
        return header;
 }
index 7ebdde0133c12f92a5cb6aac442d5cbccfcd22a5..26919ea43c0417094f55e5bcfea6dbc474c52e6b 100644 (file)
@@ -26,28 +26,28 @@ typedef enum {
        CompareOptions_Ordinal=0x40000000
 } MonoCompareOptions;
 
-extern void ves_icall_System_Globalization_CultureInfo_construct_internal_locale (MonoCultureInfo *this, MonoString *locale) MONO_INTERNAL;
+extern void ves_icall_System_Globalization_CultureInfo_construct_internal_locale (MonoCultureInfo *this_obj, MonoString *locale) MONO_INTERNAL;
 extern MonoString* ves_icall_System_Globalization_CultureInfo_get_current_locale_name (void) MONO_INTERNAL;
-extern MonoBoolean ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_lcid (MonoCultureInfo *this, gint lcid) MONO_INTERNAL;
-extern MonoBoolean ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_name (MonoCultureInfo *this, MonoString *name) MONO_INTERNAL;
+extern MonoBoolean ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_lcid (MonoCultureInfo *this_obj, gint lcid) MONO_INTERNAL;
+extern MonoBoolean ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_name (MonoCultureInfo *this_obj, MonoString *name) MONO_INTERNAL;
 extern MonoArray *ves_icall_System_Globalization_CultureInfo_internal_get_cultures (MonoBoolean neutral, MonoBoolean specific, MonoBoolean installed) MONO_INTERNAL;
-extern void ves_icall_System_Globalization_CultureInfo_construct_datetime_format (MonoCultureInfo *this) MONO_INTERNAL;
-extern void ves_icall_System_Globalization_CultureInfo_construct_number_format (MonoCultureInfo *this) MONO_INTERNAL;
+extern void ves_icall_System_Globalization_CultureInfo_construct_datetime_format (MonoCultureInfo *this_obj) MONO_INTERNAL;
+extern void ves_icall_System_Globalization_CultureInfo_construct_number_format (MonoCultureInfo *this_obj) MONO_INTERNAL;
 extern void ves_icall_System_Globalization_CompareInfo_construct_compareinfo (MonoCompareInfo *comp, MonoString *locale) MONO_INTERNAL;
-extern int ves_icall_System_Globalization_CompareInfo_internal_compare (MonoCompareInfo *this, MonoString *str1, gint32 off1, gint32 len1, MonoString *str2, gint32 off2, gint32 len2, gint32 options) MONO_INTERNAL;
-extern void ves_icall_System_Globalization_CompareInfo_free_internal_collator (MonoCompareInfo *this) MONO_INTERNAL;
+extern int ves_icall_System_Globalization_CompareInfo_internal_compare (MonoCompareInfo *this_obj, MonoString *str1, gint32 off1, gint32 len1, MonoString *str2, gint32 off2, gint32 len2, gint32 options) MONO_INTERNAL;
+extern void ves_icall_System_Globalization_CompareInfo_free_internal_collator (MonoCompareInfo *this_obj) MONO_INTERNAL;
 extern MonoBoolean
-ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_lcid (MonoRegionInfo *this, gint lcid) MONO_INTERNAL;
+ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_lcid (MonoRegionInfo *this_obj, gint lcid) MONO_INTERNAL;
 extern MonoBoolean
-ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_name (MonoRegionInfo *this,
+ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_name (MonoRegionInfo *this_obj,
  MonoString *name) MONO_INTERNAL;
-extern void ves_icall_System_Globalization_CompareInfo_assign_sortkey (MonoCompareInfo *this, MonoSortKey *key, MonoString *source, gint32 options) MONO_INTERNAL;
-extern int ves_icall_System_Globalization_CompareInfo_internal_index (MonoCompareInfo *this, MonoString *source, gint32 sindex, gint32 count, MonoString *value, gint32 options, MonoBoolean first) MONO_INTERNAL;
-extern int ves_icall_System_Globalization_CompareInfo_internal_index_char (MonoCompareInfo *this, MonoString *source, gint32 sindex, gint32 count, gunichar2 value, gint32 options, MonoBoolean first) MONO_INTERNAL;
+extern void ves_icall_System_Globalization_CompareInfo_assign_sortkey (MonoCompareInfo *this_obj, MonoSortKey *key, MonoString *source, gint32 options) MONO_INTERNAL;
+extern int ves_icall_System_Globalization_CompareInfo_internal_index (MonoCompareInfo *this_obj, MonoString *source, gint32 sindex, gint32 count, MonoString *value, gint32 options, MonoBoolean first) MONO_INTERNAL;
+extern int ves_icall_System_Globalization_CompareInfo_internal_index_char (MonoCompareInfo *this_obj, MonoString *source, gint32 sindex, gint32 count, gunichar2 value, gint32 options, MonoBoolean first) MONO_INTERNAL;
 extern int ves_icall_System_Threading_Thread_current_lcid (void) MONO_INTERNAL;
-extern MonoString *ves_icall_System_String_InternalReplace_Str_Comp (MonoString *this, MonoString *old, MonoString *new, MonoCompareInfo *comp) MONO_INTERNAL;
-extern MonoString *ves_icall_System_String_InternalToLower_Comp (MonoString *this, MonoCultureInfo *cult) MONO_INTERNAL;
-extern MonoString *ves_icall_System_String_InternalToUpper_Comp (MonoString *this, MonoCultureInfo *cult) MONO_INTERNAL;
+extern MonoString *ves_icall_System_String_InternalReplace_Str_Comp (MonoString *this_obj, MonoString *old, MonoString *new_str, MonoCompareInfo *comp) MONO_INTERNAL;
+extern MonoString *ves_icall_System_String_InternalToLower_Comp (MonoString *this_obj, MonoCultureInfo *cult) MONO_INTERNAL;
+extern MonoString *ves_icall_System_String_InternalToUpper_Comp (MonoString *this_obj, MonoCultureInfo *cult) MONO_INTERNAL;
 extern gunichar2 ves_icall_System_Char_InternalToUpper_Comp (gunichar2 c, MonoCultureInfo *cult) MONO_INTERNAL;
 extern gunichar2 ves_icall_System_Char_InternalToLower_Comp (gunichar2 c, MonoCultureInfo *cult) MONO_INTERNAL;
 extern void load_normalization_resource (guint8 **argProps, guint8** argMappedChars, guint8** argCharMapIndex, guint8** argHelperIndex, guint8** argMapIdxToComposite, guint8** argCombiningClass) MONO_INTERNAL;
index 8a8b6b8b512b3ade4dd00580152c020beae85bed..4555510e80131af50660e4c699dd6102d9d9514c 100644 (file)
@@ -23,6 +23,7 @@
 #include "metadata/tabledefs.h"
 #include "metadata/exception.h"
 #include "metadata/appdomain.h"
+#include "mono/metadata/abi-details.h"
 #include "mono/metadata/debug-helpers.h"
 #include "mono/metadata/threadpool.h"
 #include "mono/metadata/threads.h"
@@ -118,6 +119,9 @@ mono_string_utf16_to_builder2 (gunichar2 *text);
 static MonoString*
 mono_string_new_len_wrapper (const char *text, guint length);
 
+static MonoString *
+mono_string_from_byvalstr (const char *data, int len);
+
 static MonoString *
 mono_string_from_byvalwstr (gunichar2 *data, int len);
 
@@ -234,6 +238,7 @@ mono_marshal_init (void)
                register_icall (mono_marshal_string_to_utf16_copy, "mono_marshal_string_to_utf16_copy", "ptr obj", FALSE);
                register_icall (mono_string_to_utf16, "mono_string_to_utf16", "ptr obj", FALSE);
                register_icall (mono_string_from_utf16, "mono_string_from_utf16", "obj ptr", FALSE);
+               register_icall (mono_string_from_byvalstr, "mono_string_from_byvalstr", "obj ptr int", FALSE);
                register_icall (mono_string_from_byvalwstr, "mono_string_from_byvalwstr", "obj ptr int", FALSE);
                register_icall (mono_string_new_wrapper, "mono_string_new_wrapper", "obj ptr", FALSE);
                register_icall (mono_string_new_len_wrapper, "mono_string_new_len_wrapper", "obj ptr int", FALSE);
@@ -581,6 +586,21 @@ mono_delegate_free_ftnptr (MonoDelegate *delegate)
        }
 }
 
+static MonoString *
+mono_string_from_byvalstr (const char *data, int max_len)
+{
+       MonoDomain *domain = mono_domain_get ();
+       int len = 0;
+
+       if (!data)
+               return NULL;
+
+       while (len < max_len - 1 && data [len])
+               len++;
+
+       return mono_string_new_len (domain, data, len);
+}
+
 static MonoString *
 mono_string_from_byvalwstr (gunichar2 *data, int max_len)
 {
@@ -1067,9 +1087,9 @@ static int
 mono_mb_emit_proxy_check (MonoMethodBuilder *mb, int branch_code)
 {
        int pos;
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
@@ -1083,9 +1103,9 @@ static int
 mono_mb_emit_xdomain_check (MonoMethodBuilder *mb, int branch_code)
 {
        int pos;
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRealProxy, target_domain_id));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRealProxy, target_domain_id));
        mono_mb_emit_byte (mb, CEE_LDIND_I4);
        mono_mb_emit_icon (mb, -1);
        pos = mono_mb_emit_branch (mb, branch_code);
@@ -1101,9 +1121,9 @@ mono_mb_emit_contextbound_check (MonoMethodBuilder *mb, int branch_code)
        if (offset < 0)
                mono_marshal_find_bitfield_offset (MonoClass, contextbound, &offset, &mask);
 
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
        mono_mb_emit_ldflda (mb, offset);
        mono_mb_emit_byte (mb, CEE_LDIND_U1);
@@ -1298,7 +1318,7 @@ emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
                        /* copy the elements */
                        mono_mb_emit_ldloc (mb, 1);
                        mono_mb_emit_byte (mb, CEE_LDIND_I);
-                       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArray, vector));
+                       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
                        mono_mb_emit_byte (mb, CEE_ADD);
                        mono_mb_emit_ldloc (mb, 0);
                        mono_mb_emit_icon (mb, mspec->data.array_data.num_elem * esize);
@@ -1381,9 +1401,16 @@ emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
                break;
        }
        case MONO_MARSHAL_CONV_STR_BYVALSTR: 
-               mono_mb_emit_ldloc (mb, 1);
-               mono_mb_emit_ldloc (mb, 0);
-               mono_mb_emit_icall (mb, mono_string_new_wrapper);
+               if (mspec && mspec->native == MONO_NATIVE_BYVALTSTR && mspec->data.array_data.num_elem) {
+                       mono_mb_emit_ldloc (mb, 1);
+                       mono_mb_emit_ldloc (mb, 0);
+                       mono_mb_emit_icon (mb, mspec->data.array_data.num_elem);
+                       mono_mb_emit_icall (mb, mono_string_from_byvalstr);
+               } else {
+                       mono_mb_emit_ldloc (mb, 1);
+                       mono_mb_emit_ldloc (mb, 0);
+                       mono_mb_emit_icall (mb, mono_string_new_wrapper);
+               }
                mono_mb_emit_byte (mb, CEE_STIND_REF);          
                break;
        case MONO_MARSHAL_CONV_STR_BYVALWSTR:
@@ -1677,7 +1704,7 @@ 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_ldflda (mb, G_STRUCT_OFFSET (MonoArray, vector));
+                       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
                        mono_mb_emit_icon (mb, mspec->data.array_data.num_elem * esize);
                        mono_mb_emit_byte (mb, CEE_PREFIX1);
                        mono_mb_emit_byte (mb, CEE_CPBLK);                      
@@ -1832,7 +1859,7 @@ 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_I);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoSafeHandle, handle));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoSafeHandle, handle));
                mono_mb_emit_byte (mb, CEE_LDIND_I);
                mono_mb_emit_byte (mb, CEE_STIND_I);
                break;
@@ -1841,7 +1868,7 @@ emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
        case MONO_MARSHAL_CONV_HANDLEREF: {
                mono_mb_emit_ldloc (mb, 1);
                mono_mb_emit_ldloc (mb, 0);
-               mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoHandleRef, handle));
+               mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoHandleRef, handle));
                mono_mb_emit_byte (mb, CEE_ADD);
                mono_mb_emit_byte (mb, CEE_LDIND_I);
                mono_mb_emit_byte (mb, CEE_STIND_I);
@@ -2707,7 +2734,7 @@ get_wrapper_target_class (MonoImage *image)
         * To avoid these problems, we put the wrappers into the <Module> class of 
         * the image.
         */
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                klass = ((MonoDynamicImage*)image)->wrappers_type;
        else
                klass = mono_class_get (image, mono_metadata_make_token (MONO_TABLE_TYPEDEF, 1));
@@ -3841,12 +3868,12 @@ mono_marshal_get_xappdomain_invoke (MonoMethod *method)
        /* Get the target domain id */
 
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
        mono_mb_emit_byte (mb, CEE_DUP);
        mono_mb_emit_stloc (mb, loc_real_proxy);
 
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRealProxy, target_domain_id));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRealProxy, target_domain_id));
        mono_mb_emit_byte (mb, CEE_LDIND_I4);
        mono_mb_emit_stloc (mb, loc_domainid);
 
@@ -4344,7 +4371,7 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
        
        /* get this->prev */
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoMulticastDelegate, prev));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoMulticastDelegate, prev));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
        mono_mb_emit_stloc (mb, local_prev);
        mono_mb_emit_ldloc (mb, local_prev);
@@ -4372,7 +4399,7 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
 
        /* get this->target */
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoDelegate, target));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoDelegate, target));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
        mono_mb_emit_stloc (mb, local_target);
 
@@ -4391,7 +4418,7 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
                        for (i = 0; i < sig->param_count; ++i)
                                mono_mb_emit_ldarg (mb, i + 1);
                        mono_mb_emit_ldarg (mb, 0);
-                       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+                       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
                        mono_mb_emit_byte (mb, CEE_LDIND_I );
                        mono_mb_emit_op (mb, CEE_CALLI, sig);
 
@@ -4424,7 +4451,7 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
                for (i = 0; i < sig->param_count; ++i)
                        mono_mb_emit_ldarg (mb, i + 1);
                mono_mb_emit_ldarg (mb, 0);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
                mono_mb_emit_byte (mb, CEE_LDIND_I );
                mono_mb_emit_op (mb, CEE_CALLI, invoke_sig);
        }
@@ -4999,7 +5026,7 @@ 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->dynamic)
+               if (method_is_dynamic (method))
                        callsig = signature_dup (method->klass->image, mono_method_signature (method));
                else
                        callsig = mono_method_signature (method);
@@ -5572,9 +5599,9 @@ mono_marshal_get_ldflda_wrapper (MonoType *type)
 
        /* if this->rp->context == mono_context_get goto pos3 */
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRealProxy, context));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRealProxy, context));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
        mono_mb_emit_icall (mb, mono_context_get);
        pos3 = mono_mb_emit_branch (mb, CEE_BEQ);
@@ -5586,9 +5613,9 @@ mono_marshal_get_ldflda_wrapper (MonoType *type)
 
        /* return the address of the field from this->rp->unwrapped_server */
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRealProxy, unwrapped_server));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRealProxy, unwrapped_server));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
        mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
        mono_mb_emit_byte (mb, CEE_MONO_OBJADDR);
@@ -5920,7 +5947,10 @@ emit_marshal_custom (EmitMarshalContext *m, int argnum, MonoType *t,
                g_assert (marshal_native_to_managed);
        }
 
-       mtype = mono_reflection_type_from_name (spec->data.custom_data.custom_name, m->image);
+       if (spec->data.custom_data.image)
+               mtype = mono_reflection_type_from_name (spec->data.custom_data.custom_name, spec->data.custom_data.image);
+       else
+               mtype = mono_reflection_type_from_name (spec->data.custom_data.custom_name, m->image);
        g_assert (mtype != NULL);
        mklass = mono_class_from_mono_type (mtype);
        g_assert (mklass != NULL);
@@ -6755,7 +6785,7 @@ emit_marshal_safehandle (EmitMarshalContext *m, int argnum, MonoType *t,
 
                /* Pull the handle field from SafeHandle */
                mono_mb_emit_ldarg (mb, argnum);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoSafeHandle, handle));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoSafeHandle, handle));
                mono_mb_emit_byte (mb, CEE_LDIND_I);
                mono_mb_emit_stloc (mb, conv_arg);
 
@@ -6802,7 +6832,7 @@ emit_marshal_safehandle (EmitMarshalContext *m, int argnum, MonoType *t,
                        /* refval.handle = returned_handle */
                        mono_mb_emit_ldarg (mb, argnum);
                        mono_mb_emit_byte (mb, CEE_LDIND_REF);
-                       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoSafeHandle, handle));
+                       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoSafeHandle, handle));
                        mono_mb_emit_ldloc (mb, conv_arg);
                        mono_mb_emit_byte (mb, CEE_STIND_I);
                } else {
@@ -6841,7 +6871,7 @@ emit_marshal_safehandle (EmitMarshalContext *m, int argnum, MonoType *t,
 
                /* Set the return.handle to the value, am using ldflda, not sure if thats a good idea */
                mono_mb_emit_ldloc (mb, 3);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoSafeHandle, handle));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoSafeHandle, handle));
                mono_mb_emit_ldloc (mb, intptr_handle_slot);
                mono_mb_emit_byte (mb, CEE_STIND_I);
                break;
@@ -6891,7 +6921,7 @@ emit_marshal_handleref (EmitMarshalContext *m, int argnum, MonoType *t,
                        break;
                } 
                mono_mb_emit_ldarg_addr (mb, argnum);
-               mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoHandleRef, handle));
+               mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoHandleRef, handle));
                mono_mb_emit_byte (mb, CEE_ADD);
                mono_mb_emit_byte (mb, CEE_LDIND_I);
                mono_mb_emit_stloc (mb, conv_arg);
@@ -7976,7 +8006,7 @@ emit_marshal_array (EmitMarshalContext *m, int argnum, MonoType *t,
                if (eklass->blittable) {
                        mono_mb_emit_ldloc (mb, conv_arg);
                        mono_mb_emit_byte (mb, CEE_CONV_I);
-                       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArray, vector));
+                       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
                        mono_mb_emit_byte (mb, CEE_ADD);
                        mono_mb_emit_ldarg (mb, argnum);
                        mono_mb_emit_ldloc (mb, conv_arg);
@@ -8093,7 +8123,7 @@ emit_marshal_array (EmitMarshalContext *m, int argnum, MonoType *t,
                        /* src */
                        mono_mb_emit_ldloc (mb, conv_arg);
                        mono_mb_emit_byte (mb, CEE_CONV_I);
-                       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArray, vector));
+                       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
                        mono_mb_emit_byte (mb, CEE_ADD);
                        /* length */
                        mono_mb_emit_ldloc (mb, conv_arg);
@@ -9750,7 +9780,7 @@ mono_marshal_get_castclass_with_cache (void)
 
        /*obj_vtable = obj->vtable;*/
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, 0);
 
@@ -9843,7 +9873,7 @@ mono_marshal_get_isinst_with_cache (void)
 
        /*obj_vtable = obj->vtable;*/
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, 0);
 
@@ -10154,7 +10184,7 @@ mono_marshal_get_proxy_cancast (MonoClass *klass)
 #ifndef DISABLE_JIT
        /* get the real proxy from the transparent proxy*/
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
        mono_mb_emit_byte (mb, CEE_LDIND_REF);
        
        /* get the reflection type from the type handle */
@@ -10681,11 +10711,11 @@ static void
 load_array_class (MonoMethodBuilder *mb, int aklass)
 {
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, element_class));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, element_class));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, aklass);
 }
@@ -10694,9 +10724,9 @@ static void
 load_value_class (MonoMethodBuilder *mb, int vklass)
 {
        mono_mb_emit_ldarg (mb, 2);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, vklass);
 }
@@ -10936,22 +10966,22 @@ get_virtual_stelemref_wrapper (int kind)
 
                /* if (vklass->idepth < aklass->idepth) goto failue */
                mono_mb_emit_ldloc (mb, vklass);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
                mono_mb_emit_byte (mb, CEE_LDIND_U2);
 
                mono_mb_emit_ldloc (mb, aklass);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
                mono_mb_emit_byte (mb, CEE_LDIND_U2);
 
                b2 = mono_mb_emit_branch (mb, CEE_BLT_UN);
 
                /* if (vklass->supertypes [aklass->idepth - 1] != aklass) goto failure */
                mono_mb_emit_ldloc (mb, vklass);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, supertypes));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, supertypes));
                mono_mb_emit_byte (mb, CEE_LDIND_I);
 
                mono_mb_emit_ldloc (mb, aklass);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
                mono_mb_emit_byte (mb, CEE_LDIND_U2);
                mono_mb_emit_icon (mb, 1);
                mono_mb_emit_byte (mb, CEE_SUB);
@@ -11015,20 +11045,20 @@ get_virtual_stelemref_wrapper (int kind)
 
                /* vt = value->vtable */
                mono_mb_emit_ldarg (mb, 2);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
                mono_mb_emit_byte (mb, CEE_LDIND_I);
                mono_mb_emit_stloc (mb, vtable);
 
                /* uiid = klass->interface_id; */
                mono_mb_emit_ldloc (mb, aklass);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, interface_id));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, interface_id));
                mono_mb_emit_byte (mb, CEE_LDIND_U2);
                mono_mb_emit_stloc (mb, uiid);
 
                /*if (uiid > vt->max_interface_id)*/
                mono_mb_emit_ldloc (mb, uiid);
                mono_mb_emit_ldloc (mb, vtable);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, max_interface_id));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, max_interface_id));
                mono_mb_emit_byte (mb, CEE_LDIND_U2);
                b2 = mono_mb_emit_branch (mb, CEE_BGT_UN);
 
@@ -11036,7 +11066,7 @@ get_virtual_stelemref_wrapper (int kind)
 
                /*vt->interface_bitmap*/
                mono_mb_emit_ldloc (mb, vtable);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, interface_bitmap));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, interface_bitmap));
                mono_mb_emit_byte (mb, CEE_LDIND_I);
 
                /*uiid >> 3*/
@@ -11199,40 +11229,40 @@ mono_marshal_get_stelemref ()
        
        /* aklass = array->vtable->klass->element_class */
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, element_class));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, element_class));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, aklass);
        
        /* vklass = value->vtable->klass */
        mono_mb_emit_ldarg (mb, 2);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, vklass);
        
        /* if (vklass->idepth < aklass->idepth) goto failue */
        mono_mb_emit_ldloc (mb, vklass);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
        mono_mb_emit_byte (mb, CEE_LDIND_U2);
        
        mono_mb_emit_ldloc (mb, aklass);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
        mono_mb_emit_byte (mb, CEE_LDIND_U2);
        
        b2 = mono_mb_emit_branch (mb, CEE_BLT_UN);
        
        /* if (vklass->supertypes [aklass->idepth - 1] != aklass) goto failure */
        mono_mb_emit_ldloc (mb, vklass);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, supertypes));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, supertypes));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        
        mono_mb_emit_ldloc (mb, aklass);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
        mono_mb_emit_byte (mb, CEE_LDIND_U2);
        mono_mb_emit_icon (mb, 1);
        mono_mb_emit_byte (mb, CEE_SUB);
@@ -11419,7 +11449,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
 
        /* bounds = array->bounds; */
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoArray, bounds));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoArray, bounds));
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, bounds);
 
@@ -11427,7 +11457,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
        /* ind = idx0 - bounds [0].lower_bound */
        mono_mb_emit_ldarg (mb, 1);
        mono_mb_emit_ldloc (mb, bounds);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_LDIND_I4);
        mono_mb_emit_byte (mb, CEE_SUB);
@@ -11435,7 +11465,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
        /* if (ind >= bounds [0].length) goto exeception; */
        mono_mb_emit_ldloc (mb, ind);
        mono_mb_emit_ldloc (mb, bounds);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArrayBounds, length));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArrayBounds, length));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_LDIND_I4);
        /* note that we use unsigned comparison */
@@ -11450,7 +11480,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
                /* realidx = idxi - bounds [i].lower_bound */
                mono_mb_emit_ldarg (mb, 1 + i);
                mono_mb_emit_ldloc (mb, bounds);
-               mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+               mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
                mono_mb_emit_byte (mb, CEE_ADD);
                mono_mb_emit_byte (mb, CEE_LDIND_I4);
                mono_mb_emit_byte (mb, CEE_SUB);
@@ -11458,14 +11488,14 @@ mono_marshal_get_array_address (int rank, int elem_size)
                /* if (realidx >= bounds [i].length) goto exeception; */
                mono_mb_emit_ldloc (mb, realidx);
                mono_mb_emit_ldloc (mb, bounds);
-               mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + G_STRUCT_OFFSET (MonoArrayBounds, length));
+               mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + MONO_STRUCT_OFFSET (MonoArrayBounds, length));
                mono_mb_emit_byte (mb, CEE_ADD);
                mono_mb_emit_byte (mb, CEE_LDIND_I4);
                branch_positions [i] = mono_mb_emit_branch (mb, CEE_BGE_UN);
                /* ind = ind * bounds [i].length + realidx */
                mono_mb_emit_ldloc (mb, ind);
                mono_mb_emit_ldloc (mb, bounds);
-               mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + G_STRUCT_OFFSET (MonoArrayBounds, length));
+               mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + MONO_STRUCT_OFFSET (MonoArrayBounds, length));
                mono_mb_emit_byte (mb, CEE_ADD);
                mono_mb_emit_byte (mb, CEE_LDIND_I4);
                mono_mb_emit_byte (mb, CEE_MUL);
@@ -11476,7 +11506,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
 
        /* return array->vector + ind * element_size */
        mono_mb_emit_ldarg (mb, 0);
-       mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoArray, vector));
+       mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
        mono_mb_emit_ldloc (mb, ind);
        mono_mb_emit_icon (mb, elem_size);
        mono_mb_emit_byte (mb, CEE_MUL);
@@ -12398,11 +12428,6 @@ mono_class_native_size (MonoClass *klass, guint32 *align)
        return klass->marshal_info->native_size;
 }
 
-/* __alignof__ returns the preferred alignment of values not the actual alignment used by
-   the compiler so is wrong e.g. for Linux where doubles are aligned on a 4 byte boundary
-   but __alignof__ returns 8 - using G_STRUCT_OFFSET works better */
-#define ALIGNMENT(type) G_STRUCT_OFFSET(struct { char c; type x; }, x)
-
 /*
  * mono_type_native_stack_size:
  * @t: the type to return the size it uses on the stack
@@ -12451,11 +12476,11 @@ mono_type_native_stack_size (MonoType *t, guint32 *align)
                *align = 4;
                return 4;
        case MONO_TYPE_R8:
-               *align = ALIGNMENT (gdouble);
+               *align = MONO_ABI_ALIGNOF (double);
                return 8;
        case MONO_TYPE_I8:
        case MONO_TYPE_U8:
-               *align = ALIGNMENT (glong);
+               *align = MONO_ABI_ALIGNOF (gint64);
                return 8;
        case MONO_TYPE_GENERICINST:
                if (!mono_type_generic_inst_is_valuetype (t)) {
@@ -12514,13 +12539,13 @@ mono_marshal_type_size (MonoType *type, MonoMarshalSpec *mspec, guint32 *align,
                return 4;
        case MONO_NATIVE_I8:
        case MONO_NATIVE_U8:
-               *align = ALIGNMENT(guint64);
+               *align = MONO_ABI_ALIGNOF (gint64);
                return 8;
        case MONO_NATIVE_R4:
                *align = 4;
                return 4;
        case MONO_NATIVE_R8:
-               *align = ALIGNMENT(double);
+               *align = MONO_ABI_ALIGNOF (double);
                return 8;
        case MONO_NATIVE_INT:
        case MONO_NATIVE_UINT:
@@ -12538,7 +12563,7 @@ mono_marshal_type_size (MonoType *type, MonoMarshalSpec *mspec, guint32 *align,
        case MONO_NATIVE_ASANY:
        case MONO_NATIVE_FUNC:
        case MONO_NATIVE_LPSTRUCT:
-               *align = ALIGNMENT(gpointer);
+               *align = MONO_ABI_ALIGNOF (gpointer);
                return sizeof (gpointer);
        case MONO_NATIVE_STRUCT: 
                klass = mono_class_from_mono_type (type);
@@ -12965,7 +12990,7 @@ mono_marshal_free_dynamic_wrappers (MonoMethod *method)
 {
        MonoImage *image = method->klass->image;
 
-       g_assert (method->dynamic);
+       g_assert (method_is_dynamic (method));
 
        /* This could be called during shutdown */
        if (marshal_mutex_initialized)
@@ -12978,6 +13003,9 @@ mono_marshal_free_dynamic_wrappers (MonoMethod *method)
                g_hash_table_remove (image->runtime_invoke_direct_cache, method);
        if (image->delegate_abstract_invoke_cache)
                g_hash_table_foreach_remove (image->delegate_abstract_invoke_cache, signature_method_pair_matches_method, method);
+       // FIXME: Need to clear the caches in other images as well
+       if (image->delegate_bound_static_invoke_cache)
+               g_hash_table_remove (image->delegate_bound_static_invoke_cache, mono_method_signature (method));
 
        if (marshal_mutex_initialized)
                mono_marshal_unlock ();
index a85bd5d26fbe18b49759cc73de9f6aadb4a3d690..0c311c889336b0c290425de7a342617e9d57ab31 100644 (file)
@@ -194,7 +194,7 @@ typedef struct {
 G_BEGIN_DECLS
 
 /*type of the function pointer of methods returned by mono_marshal_get_runtime_invoke*/
-typedef MonoObject *(*RuntimeInvokeFunction) (MonoObject *this, void **params, MonoObject **exc, void* compiled_method);
+typedef MonoObject *(*RuntimeInvokeFunction) (MonoObject *this_obj, void **params, MonoObject **exc, void* compiled_method);
 
 typedef void (*RuntimeInvokeDynamicFunction) (void *args, MonoObject **exc, void* compiled_method);
 
@@ -299,7 +299,7 @@ MonoMethod *
 mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del) MONO_INTERNAL;
 
 MonoMethod *
-mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual) MONO_INTERNAL;
+mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean is_virtual) MONO_INTERNAL;
 
 MonoMethod*
 mono_marshal_get_runtime_invoke_dynamic (void) MONO_INTERNAL;
@@ -368,7 +368,7 @@ MonoMethod *
 mono_marshal_get_array_accessor_wrapper (MonoMethod *method) MONO_INTERNAL;
 
 MonoMethod *
-mono_marshal_get_generic_array_helper (MonoClass *class, MonoClass *iface,
+mono_marshal_get_generic_array_helper (MonoClass *klass, MonoClass *iface,
                                       gchar *name, MonoMethod *method) MONO_INTERNAL;
 
 MonoMethod *
diff --git a/mono/metadata/metadata-cross-helpers.c b/mono/metadata/metadata-cross-helpers.c
new file mode 100644 (file)
index 0000000..5953691
--- /dev/null
@@ -0,0 +1,6 @@
+#include "config.h"
+
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/metadata/metadata-cross-helpers.c"
+#endif
+
index 618fd5b59d52a7487fe1b0798397971c06a119bf..f165929b27394f0535ba0301eac6b96ff328ccc5 100644 (file)
@@ -13,6 +13,7 @@
 #include "mono/utils/mono-property-hash.h"
 #include "mono/utils/mono-value-hash.h"
 #include <mono/utils/mono-error.h>
+#include "mono/utils/mono-conc-hashtable.h"
 
 struct _MonoType {
        union {
@@ -224,7 +225,7 @@ struct _MonoImage {
        /*
         * Indexed by fielddef and memberref tokens
         */
-       GHashTable *field_cache; /*protected by the image lock*/
+       MonoConcurrentHashTable *field_cache; /*protected by the image lock*/
 
        /* indexed by typespec tokens. */
        GHashTable *typespec_cache;
@@ -524,6 +525,26 @@ struct _MonoMethodSignature {
 
 #define MONO_SIZEOF_METHOD_SIGNATURE (sizeof (struct _MonoMethodSignature) - MONO_ZERO_LEN_ARRAY * SIZEOF_VOID_P)
 
+static inline gboolean
+image_is_dynamic (MonoImage *image)
+{
+#ifdef DISABLE_REFLECTION_EMIT
+       return FALSE;
+#else
+       return image->dynamic;
+#endif
+}
+
+static inline gboolean
+assembly_is_dynamic (MonoAssembly *assembly)
+{
+#ifdef DISABLE_REFLECTION_EMIT
+       return FALSE;
+#else
+       return assembly->dynamic;
+#endif
+}
+
 /* for use with allocated memory blocks (assumes alignment is to 8 bytes) */
 guint mono_aligned_addr_hash (gconstpointer ptr) MONO_INTERNAL;
 
@@ -577,7 +598,7 @@ void
 mono_remove_image_unload_hook (MonoImageUnloadFunc func, gpointer user_data) MONO_INTERNAL;
 
 void
-mono_image_append_class_to_reflection_info_set (MonoClass *class) MONO_INTERNAL;
+mono_image_append_class_to_reflection_info_set (MonoClass *klass) MONO_INTERNAL;
 
 gpointer
 mono_image_set_alloc  (MonoImageSet *set, guint size) MONO_INTERNAL;
@@ -719,7 +740,7 @@ gboolean
 mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, gboolean signature_only) MONO_INTERNAL;
 
 MonoMarshalSpec *
-mono_metadata_parse_marshal_spec_full (MonoImage *image, const char *ptr) MONO_INTERNAL;
+mono_metadata_parse_marshal_spec_full (MonoImage *image, MonoImage *parent_image, const char *ptr) MONO_INTERNAL;
 
 guint         mono_metadata_generic_inst_hash (gconstpointer data) MONO_INTERNAL;
 gboolean       mono_metadata_generic_inst_equal (gconstpointer ka, gconstpointer kb) MONO_INTERNAL;
@@ -762,5 +783,7 @@ MonoMethod* method_from_method_def_or_ref (MonoImage *m, guint32 tok, MonoGeneri
 
 MonoMethod *mono_get_method_constrained_with_method (MonoImage *image, MonoMethod *method, MonoClass *constrained_class, MonoGenericContext *context) MONO_INTERNAL;
 
+void mono_type_set_alignment (MonoTypeEnum type, int align) MONO_INTERNAL;
+
 #endif /* __MONO_METADATA_INTERNALS_H__ */
 
index 356dc2c24371b6a941f22ef84647bfc16630f6aa..95a07fa5a492157444e4c8a077204a33f0fe5281 100644 (file)
@@ -25,6 +25,7 @@
 #include "class.h"
 #include "marshal.h"
 #include "debug-helpers.h"
+#include "abi-details.h"
 #include <mono/utils/mono-error-internals.h>
 #include <mono/utils/bsearch.h>
 
@@ -1765,7 +1766,7 @@ mono_metadata_parse_signature_full (MonoImage *image, MonoGenericContainer *gene
        guint32 sig;
        const char *ptr;
 
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                return mono_lookup_dynamic_token (image, token, NULL);
 
        g_assert (mono_metadata_token_table(token) == MONO_TABLE_STANDALONESIG);
@@ -2468,7 +2469,7 @@ collect_method_images (MonoMethodInflated *method, CollectData *data)
        /*
         * Dynamic assemblies have no references, so the images they depend on can be unloaded before them.
         */
-       if (m->klass->image->dynamic)
+       if (image_is_dynamic (m->klass->image))
                collect_signature_images (mono_method_signature (m), data);
 }
 
@@ -2650,7 +2651,6 @@ mono_metadata_clean_for_image (MonoImage *image)
         */
        ginst_data.image = gclass_data.image = image;
        ginst_data.list = gclass_data.list = NULL;
-       mono_loader_lock ();
 
        /* Collect the items to delete */
        /* delete_image_set () modifies the lists so make a copy */
@@ -2680,8 +2680,6 @@ mono_metadata_clean_for_image (MonoImage *image)
                delete_image_set (set);
        }
        g_slist_free (set_list);
-
-       mono_loader_unlock ();
 }
 
 static void
@@ -3592,22 +3590,13 @@ mono_metadata_parse_mh_full (MonoImage *m, MonoGenericContainer *container, cons
  *
  * Decode the method header at @ptr, including pointer to the IL code,
  * info about local variables and optional exception tables.
- * This is a Mono runtime internal function.
  *
- * Returns: a MonoMethodHeader.
+ * Returns: a transient MonoMethodHeader allocated from the heap.
  */
 MonoMethodHeader *
 mono_metadata_parse_mh (MonoImage *m, const char *ptr)
 {
-       MonoMethodHeader *res;
-
-       mono_loader_lock ();
-
-       res = mono_metadata_parse_mh_full (m, NULL, ptr);
-
-       mono_loader_unlock ();
-
-       return res;
+       return mono_metadata_parse_mh_full (m, NULL, ptr);
 }
 
 /*
@@ -4003,8 +3992,7 @@ mono_metadata_typedef_from_method (MonoImage *meta, guint32 index)
  * The array of interfaces that the @index typedef token implements is returned in
  * @interfaces. The number of elements in the array is returned in @count. 
  *
- * LOCKING: Assumes the loader lock is held.
- *
+
  * Returns: TRUE on success, FALSE on failure.
  */
 gboolean
@@ -4091,9 +4079,7 @@ mono_metadata_interfaces_from_typedef (MonoImage *meta, guint32 index, guint *co
        MonoClass **interfaces;
        gboolean rv;
 
-       mono_loader_lock ();
        rv = mono_metadata_interfaces_from_typedef_full (meta, index, &interfaces, count, TRUE, NULL);
-       mono_loader_unlock ();
        if (rv)
                return interfaces;
        else
@@ -4282,7 +4268,28 @@ mono_backtrace (int limit)
 }
 #endif
 
-#define abi__alignof__(type) G_STRUCT_OFFSET(struct { char c; type x; }, x)
+static int i8_align;
+
+/*
+ * mono_type_set_alignment:
+ *
+ *   Set the alignment used by runtime to layout fields etc. of type TYPE to ALIGN.
+ * This should only be used in AOT mode since the resulting layout will not match the
+ * host abi layout.
+ */
+void
+mono_type_set_alignment (MonoTypeEnum type, int align)
+{
+       /* Support only a few types whose alignment is abi dependent */
+       switch (type) {
+       case MONO_TYPE_I8:
+               i8_align = align;
+               break;
+       default:
+               g_assert_not_reached ();
+               break;
+       }
+}
 
 /*
  * mono_type_size:
@@ -4299,7 +4306,7 @@ mono_type_size (MonoType *t, int *align)
                return 0;
        }
        if (t->byref) {
-               *align = abi__alignof__(gpointer);
+               *align = MONO_ABI_ALIGNOF (gpointer);
                return sizeof (gpointer);
        }
 
@@ -4308,40 +4315,40 @@ mono_type_size (MonoType *t, int *align)
                *align = 1;
                return 0;
        case MONO_TYPE_BOOLEAN:
-               *align = abi__alignof__(gint8);
+               *align = MONO_ABI_ALIGNOF (gint8);
                return 1;
        case MONO_TYPE_I1:
        case MONO_TYPE_U1:
-               *align = abi__alignof__(gint8);
+               *align = MONO_ABI_ALIGNOF (gint8);
                return 1;
        case MONO_TYPE_CHAR:
        case MONO_TYPE_I2:
        case MONO_TYPE_U2:
-               *align = abi__alignof__(gint16);
+               *align = MONO_ABI_ALIGNOF (gint16);
                return 2;               
        case MONO_TYPE_I4:
        case MONO_TYPE_U4:
-               *align = abi__alignof__(gint32);
+               *align = MONO_ABI_ALIGNOF (gint32);
                return 4;
        case MONO_TYPE_R4:
-               *align = abi__alignof__(float);
+               *align = MONO_ABI_ALIGNOF (float);
                return 4;
        case MONO_TYPE_I8:
        case MONO_TYPE_U8:
-               *align = abi__alignof__(gint64);
+               *align = MONO_ABI_ALIGNOF (gint64);
                return 8;               
        case MONO_TYPE_R8:
-               *align = abi__alignof__(double);
+               *align = MONO_ABI_ALIGNOF (double);
                return 8;               
        case MONO_TYPE_I:
        case MONO_TYPE_U:
-               *align = abi__alignof__(gpointer);
+               *align = MONO_ABI_ALIGNOF (gpointer);
                return sizeof (gpointer);
        case MONO_TYPE_STRING:
-               *align = abi__alignof__(gpointer);
+               *align = MONO_ABI_ALIGNOF (gpointer);
                return sizeof (gpointer);
        case MONO_TYPE_OBJECT:
-               *align = abi__alignof__(gpointer);
+               *align = MONO_ABI_ALIGNOF (gpointer);
                return sizeof (gpointer);
        case MONO_TYPE_VALUETYPE: {
                if (t->data.klass->enumtype)
@@ -4354,7 +4361,7 @@ mono_type_size (MonoType *t, int *align)
        case MONO_TYPE_PTR:
        case MONO_TYPE_FNPTR:
        case MONO_TYPE_ARRAY:
-               *align = abi__alignof__(gpointer);
+               *align = MONO_ABI_ALIGNOF (gpointer);
                return sizeof (gpointer);
        case MONO_TYPE_TYPEDBYREF:
                return mono_class_value_size (mono_defaults.typed_reference_class, (guint32*)align);
@@ -4370,14 +4377,14 @@ mono_type_size (MonoType *t, int *align)
                        else
                                return mono_class_value_size (mono_class_from_mono_type (t), (guint32*)align);
                } else {
-                       *align = abi__alignof__(gpointer);
+                       *align = MONO_ABI_ALIGNOF (gpointer);
                        return sizeof (gpointer);
                }
        }
        case MONO_TYPE_VAR:
        case MONO_TYPE_MVAR:
                /* FIXME: Martin, this is wrong. */
-               *align = abi__alignof__(gpointer);
+               *align = MONO_ABI_ALIGNOF (gpointer);
                return sizeof (gpointer);
        default:
                g_error ("mono_type_size: type 0x%02x unknown", t->type);
@@ -4404,7 +4411,7 @@ mono_type_stack_size_internal (MonoType *t, int *align, gboolean allow_open)
        int tmp;
 #if SIZEOF_VOID_P == SIZEOF_REGISTER
        int stack_slot_size = sizeof (gpointer);
-       int stack_slot_align = abi__alignof__ (gpointer);
+       int stack_slot_align = MONO_ABI_ALIGNOF (gpointer);
 #elif SIZEOF_VOID_P < SIZEOF_REGISTER
        int stack_slot_size = SIZEOF_REGISTER;
        int stack_slot_align = SIZEOF_REGISTER;
@@ -4449,14 +4456,14 @@ mono_type_stack_size_internal (MonoType *t, int *align, gboolean allow_open)
                *align = stack_slot_align;
                return stack_slot_size * 3;
        case MONO_TYPE_R4:
-               *align = abi__alignof__(float);
+               *align = MONO_ABI_ALIGNOF (float);
                return sizeof (float);          
        case MONO_TYPE_I8:
        case MONO_TYPE_U8:
-               *align = abi__alignof__(gint64);
+               *align = MONO_ABI_ALIGNOF (gint64);
                return sizeof (gint64);         
        case MONO_TYPE_R8:
-               *align = abi__alignof__(double);
+               *align = MONO_ABI_ALIGNOF (double);
                return sizeof (double);
        case MONO_TYPE_VALUETYPE: {
                guint32 size;
@@ -4614,7 +4621,7 @@ mono_metadata_type_hash (MonoType *t1)
                 * This is specially problematic with generic instances since they are
                 * inserted in a bunch of hash tables before been finished.
                 */
-               if (class->image->dynamic)
+               if (image_is_dynamic (class->image))
                        return (t1->byref << 6) | mono_metadata_str_hash (class->name);
                return ((hash << 5) - hash) ^ mono_metadata_str_hash (class->name);
        }
@@ -5012,7 +5019,7 @@ mono_metadata_field_info_full (MonoImage *meta, guint32 index, guint32 *offset,
                const char *p;
                
                if ((p = mono_metadata_get_marshal_info (meta, index, TRUE))) {
-                       *marshal_spec = mono_metadata_parse_marshal_spec_full (alloc_from_image ? meta : NULL, p);
+                       *marshal_spec = mono_metadata_parse_marshal_spec_full (alloc_from_image ? meta : NULL, meta, p);
                }
        }
 
@@ -5344,11 +5351,15 @@ mono_image_strndup (MonoImage *image, const char *data, guint len)
 MonoMarshalSpec *
 mono_metadata_parse_marshal_spec (MonoImage *image, const char *ptr)
 {
-       return mono_metadata_parse_marshal_spec_full (NULL, ptr);
+       return mono_metadata_parse_marshal_spec_full (NULL, image, ptr);
 }
 
+/*
+ * If IMAGE is non-null, memory will be allocated from its mempool, otherwise it will be allocated using malloc.
+ * PARENT_IMAGE is the image containing the marshal spec.
+ */
 MonoMarshalSpec *
-mono_metadata_parse_marshal_spec_full (MonoImage *image, const char *ptr)
+mono_metadata_parse_marshal_spec_full (MonoImage *image, MonoImage *parent_image, const char *ptr)
 {
        MonoMarshalSpec *res;
        int len;
@@ -5413,6 +5424,7 @@ mono_metadata_parse_marshal_spec_full (MonoImage *image, const char *ptr)
                /* read cookie string */
                len = mono_metadata_decode_value (ptr, &ptr);
                res->data.custom_data.cookie = mono_image_strndup (image, ptr, len);
+               res->data.custom_data.image = parent_image;
        }
 
        if (res->native == MONO_NATIVE_SAFEARRAY) {
index 4b880c7bab42bb5aa733d70d0358604471524b29..0a61a2dc10aca05696f8172783b03c6964c980bf 100644 (file)
@@ -190,6 +190,7 @@ typedef struct {
                struct {
                        char *custom_name;
                        char *cookie;
+                       MonoImage *image;
                } custom_data;
                struct {
                        MonoMarshalVariant elem_type;
index 0ed15e721aa12dcc9a4d4241a92bd082d4f65fd5..cb249148882f861ad4723f0f1d52ec3d8afb0313 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "config.h"
 #include "loader.h"
+#include "mono/metadata/abi-details.h"
 #include "mono/metadata/method-builder.h"
 #include "mono/metadata/tabledefs.h"
 #include "mono/metadata/exception.h"
@@ -201,7 +202,7 @@ mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, in
                GList *tmp;
                void **data;
                l = g_list_reverse (mw->method_data);
-               if (method->dynamic)
+               if (method_is_dynamic (method))
                        data = g_malloc (sizeof (gpointer) * (i + 1));
                else
                        data = mono_image_alloc (image, sizeof (gpointer) * (i + 1));
@@ -536,7 +537,7 @@ mono_mb_emit_exception_full (MonoMethodBuilder *mb, const char *exc_nspace, cons
        mono_mb_emit_op (mb, CEE_NEWOBJ, ctor);
        if (msg != NULL) {
                mono_mb_emit_byte (mb, CEE_DUP);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoException, message));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoException, message));
                mono_mb_emit_ldstr (mb, (char*)msg);
                mono_mb_emit_byte (mb, CEE_STIND_REF);
        }
index 9784437db466c668357eabedd4b8949d83363426..fc9814b33a1f4d9c51b38b05ca6aad8bcc18b71b 100644 (file)
@@ -12,6 +12,7 @@
 #include <glib.h>
 #include <string.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/monitor.h>
 #include <mono/metadata/threads-types.h>
 #include <mono/metadata/exception.h>
@@ -73,18 +74,6 @@ enum {
  * an object.
  */
 
-struct _MonoThreadsSync
-{
-       gsize owner;                    /* thread ID */
-       guint32 nest;
-#ifdef HAVE_MOVING_COLLECTOR
-       gint32 hash_code;
-#endif
-       volatile gint32 entry_count;
-       HANDLE entry_sem;
-       GSList *wait_list;
-       void *data;
-};
 
 typedef struct _MonitorArray MonitorArray;
 
@@ -813,7 +802,7 @@ emit_obj_syncp_check (MonoMethodBuilder *mb, int syncp_loc, int *obj_null_branch
        /*
          ldarg         0                                                       obj
          conv.i                                                                objp
-         ldc.i4        G_STRUCT_OFFSET(MonoObject, synchronisation)            objp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoObject, synchronisation)         objp off
          add                                                                   &syncp
          ldind.i                                                               syncp
          stloc         syncp
@@ -823,7 +812,7 @@ emit_obj_syncp_check (MonoMethodBuilder *mb, int syncp_loc, int *obj_null_branch
 
        mono_mb_emit_byte (mb, CEE_LDARG_0);
        mono_mb_emit_byte (mb, CEE_CONV_I);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoObject, synchronisation));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoObject, synchronisation));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, syncp_loc);
@@ -889,7 +878,6 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
        static MonoMethod *compare_exchange_method;
        int obj_null_branch, true_locktaken_branch = 0, syncp_null_branch, has_owner_branch, other_owner_branch, tid_branch, thin_hash_branch;
        int tid_loc, syncp_loc, owner_loc;
-       int thread_tls_offset;
        gboolean is_v4 = mono_method_signature (monitor_enter_method)->param_count == 2;
        int fast_path_idx = is_v4 ? FASTPATH_ENTERV4 : FASTPATH_ENTER;
        WrapperInfo *info;
@@ -897,13 +885,12 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
        /* The !is_v4 version is not used/tested */
        g_assert (is_v4);
 
-       thread_tls_offset = mono_thread_get_tls_offset ();
-       if (thread_tls_offset == -1)
-               return NULL;
-
        if (monitor_il_fastpaths [fast_path_idx])
                return monitor_il_fastpaths [fast_path_idx];
 
+       if (!mono_get_runtime_callbacks ()->tls_key_supported (TLS_KEY_THREAD))
+               return NULL;
+
        if (!compare_exchange_method) {
                MonoMethodDesc *desc;
                MonoClass *class;
@@ -932,12 +919,12 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
 
        /*
          mono. tls     thread_tls_offset                                       threadp
-         ldc.i4        G_STRUCT_OFFSET(MonoThread, tid)                        threadp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoThread, tid)                     threadp off
          add                                                                   &tid
          ldind.i                                                               tid
          stloc         tid
          ldloc         syncp                                                   syncp
-         ldc.i4        G_STRUCT_OFFSET(MonoThreadsSync, owner)                 syncp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoThreadsSync, owner)                      syncp off
          add                                                                   &owner
          ldind.i                                                               owner
          stloc         owner
@@ -948,12 +935,12 @@ 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, TLS_KEY_THREAD);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoInternalThread, tid));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoInternalThread, tid));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, tid_loc);
        mono_mb_emit_ldloc (mb, syncp_loc);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        mono_mb_emit_stloc (mb, owner_loc);
@@ -962,7 +949,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
 
        /*
          ldloc         syncp                                                   syncp
-         ldc.i4        G_STRUCT_OFFSET(MonoThreadsSync, owner)                 syncp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoThreadsSync, owner)                      syncp off
          add                                                                   &owner
          ldloc         tid                                                     &owner tid
          ldc.i4        0                                                       &owner tid 0
@@ -972,7 +959,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
        */
 
        mono_mb_emit_ldloc (mb, syncp_loc);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_ldloc (mb, tid_loc);
        mono_mb_emit_byte (mb, CEE_LDC_I4_0);
@@ -992,7 +979,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
          ldloc         tid                                                     owner tid
          brne.s        other_owner
          ldloc         syncp                                                   syncp
-         ldc.i4        G_STRUCT_OFFSET(MonoThreadsSync, nest)                  syncp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoThreadsSync, nest)                       syncp off
          add                                                                   &nest
          dup                                                                   &nest &nest
          ldind.i4                                                              &nest nest
@@ -1007,7 +994,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
        mono_mb_emit_ldloc (mb, tid_loc);
        other_owner_branch = mono_mb_emit_short_branch (mb, CEE_BNE_UN_S);
        mono_mb_emit_ldloc (mb, syncp_loc);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, nest));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, nest));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_DUP);
        mono_mb_emit_byte (mb, CEE_LDIND_I4);
@@ -1061,17 +1048,15 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
        MonoMethodBuilder *mb;
        MonoMethod *res;
        int obj_null_branch, has_waiting_branch, has_syncp_branch, owned_branch, nested_branch, thin_hash_branch;
-       int thread_tls_offset;
        int syncp_loc;
        WrapperInfo *info;
 
-       thread_tls_offset = mono_thread_get_tls_offset ();
-       if (thread_tls_offset == -1)
-               return NULL;
-
        if (monitor_il_fastpaths [FASTPATH_EXIT])
                return monitor_il_fastpaths [FASTPATH_EXIT];
 
+       if (!mono_get_runtime_callbacks ()->tls_key_supported (TLS_KEY_THREAD))
+               return NULL;
+
        mb = mono_mb_new (mono_defaults.monitor_class, "FastMonitorExit", MONO_WRAPPER_UNKNOWN);
 
        mb->method->slot = -1;
@@ -1092,11 +1077,11 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
        /*
         has_syncp:
          ldloc         syncp                                                   syncp
-         ldc.i4        G_STRUCT_OFFSET(MonoThreadsSync, owner)                 syncp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoThreadsSync, owner)                      syncp off
          add                                                                   &owner
          ldind.i                                                               owner
          mono. tls     thread_tls_offset                                       owner threadp
-         ldc.i4        G_STRUCT_OFFSET(MonoThread, tid)                        owner threadp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoThread, tid)                     owner threadp off
          add                                                                   owner &tid
          ldind.i                                                               owner tid
          beq.s         owned
@@ -1104,13 +1089,13 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
 
        mono_mb_patch_short_branch (mb, has_syncp_branch);
        mono_mb_emit_ldloc (mb, syncp_loc);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner));
        mono_mb_emit_byte (mb, CEE_ADD);
        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, TLS_KEY_THREAD);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoInternalThread, tid));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoInternalThread, tid));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_LDIND_I);
        owned_branch = mono_mb_emit_short_branch (mb, CEE_BEQ_S);
@@ -1124,7 +1109,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
        /*
         owned:
          ldloc         syncp                                                   syncp
-         ldc.i4        G_STRUCT_OFFSET(MonoThreadsSync, nest)                  syncp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoThreadsSync, nest)                       syncp off
          add                                                                   &nest
          dup                                                                   &nest &nest
          ldind.i4                                                              &nest nest
@@ -1135,7 +1120,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
 
        mono_mb_patch_short_branch (mb, owned_branch);
        mono_mb_emit_ldloc (mb, syncp_loc);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, nest));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, nest));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_DUP);
        mono_mb_emit_byte (mb, CEE_LDIND_I4);
@@ -1147,7 +1132,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
          pop                                                                   &nest
          pop
          ldloc         syncp                                                   syncp
-         ldc.i4        G_STRUCT_OFFSET(MonoThreadsSync, entry_count)           syncp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoThreadsSync, entry_count)                syncp off
          add                                                                   &count
          ldind.i4                                                              count
          brtrue.s      has_waiting
@@ -1156,14 +1141,14 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
        mono_mb_emit_byte (mb, CEE_POP);
        mono_mb_emit_byte (mb, CEE_POP);
        mono_mb_emit_ldloc (mb, syncp_loc);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, entry_count));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, entry_count));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_LDIND_I4);
        has_waiting_branch = mono_mb_emit_short_branch (mb, CEE_BRTRUE_S);
 
        /*
          ldloc         syncp                                                   syncp
-         ldc.i4        G_STRUCT_OFFSET(MonoThreadsSync, owner)                 syncp off
+         ldc.i4        MONO_STRUCT_OFFSET(MonoThreadsSync, owner)                      syncp off
          add                                                                   &owner
          ldnull                                                                &owner 0
          stind.i
@@ -1171,7 +1156,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
        */
 
        mono_mb_emit_ldloc (mb, syncp_loc);
-       mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner));
+       mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner));
        mono_mb_emit_byte (mb, CEE_ADD);
        mono_mb_emit_byte (mb, CEE_LDNULL);
        mono_mb_emit_byte (mb, CEE_STIND_I);
@@ -1244,9 +1229,9 @@ mono_monitor_threads_sync_members_offset (int *owner_offset, int *nest_offset, i
 
 #define ENCODE_OFF_SIZE(o,s)   (((o) << 8) | ((s) & 0xff))
 
-       *owner_offset = ENCODE_OFF_SIZE (G_STRUCT_OFFSET (MonoThreadsSync, owner), sizeof (ts.owner));
-       *nest_offset = ENCODE_OFF_SIZE (G_STRUCT_OFFSET (MonoThreadsSync, nest), sizeof (ts.nest));
-       *entry_count_offset = ENCODE_OFF_SIZE (G_STRUCT_OFFSET (MonoThreadsSync, entry_count), sizeof (ts.entry_count));
+       *owner_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, owner), sizeof (ts.owner));
+       *nest_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, nest), sizeof (ts.nest));
+       *entry_count_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, entry_count), sizeof (ts.entry_count));
 }
 
 gboolean 
index 183c2ec0b52371a31601b76efe469fc801cb53ab..a32780dcdfea902b5def43a335c17c5532f864ff 100644 (file)
 
 #include <glib.h>
 #include <mono/metadata/object.h>
+#include <mono/io-layer/io-layer.h>
 #include "mono/utils/mono-compiler.h"
 
 G_BEGIN_DECLS
 
+struct _MonoThreadsSync
+{
+       gsize owner;                    /* thread ID */
+       guint32 nest;
+#ifdef HAVE_MOVING_COLLECTOR
+       gint32 hash_code;
+#endif
+       volatile gint32 entry_count;
+       HANDLE entry_sem;
+       GSList *wait_list;
+       void *data;
+};
+
+
 MONO_API void mono_locks_dump (gboolean include_untaken);
 
 void mono_monitor_init (void) MONO_INTERNAL;
index 77abd7a46963d3454f2de103197738723e351176..18457249d125f50a01ade979eb4c330b592db1fc 100644 (file)
@@ -2,7 +2,9 @@
 #define __MONO_METADATA_BASIC_BLOCK_H__
 
 #include <glib.h>
-
+#include <mono/metadata/metadata.h>
+#include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-error.h>
 
 G_BEGIN_DECLS
 
@@ -16,7 +18,6 @@ struct _MonoSimpleBasicBlock {
        unsigned dead     : 1;
 };
 
-
 MonoSimpleBasicBlock*
 mono_basic_block_split (MonoMethod *method, MonoError *error) MONO_INTERNAL;
 
index df012ee827295ec7893b021d5b653aee6959fa52..5e5173f93234ccfcf34c9b0c509001e57f71a71d 100644 (file)
@@ -639,7 +639,7 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma
        g_assert (size < max_size);
        total_size = size + sizeof (MonoDebugMethodAddress);
 
-       if (method->dynamic) {
+       if (method_is_dynamic (method)) {
                address = g_malloc0 (total_size);
        } else {
                address = (MonoDebugMethodAddress *) allocate_data_item (
@@ -682,7 +682,7 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma
 
        g_hash_table_insert (table->method_address_hash, method, address);
 
-       if (!method->dynamic)
+       if (!method_is_dynamic (method))
                write_data_item (table, (guint8 *) address);
 
        mono_debugger_unlock ();
@@ -700,7 +700,7 @@ mono_debug_remove_method (MonoMethod *method, MonoDomain *domain)
        if (!mono_debug_initialized)
                return;
 
-       g_assert (method->dynamic);
+       g_assert (method_is_dynamic (method));
 
        mono_debugger_lock ();
 
index a5f3ff809ad9c4faffcc2e7c390445aebfc0fb82..49fac50c681e62f74e823ec6f9808bf6a7048c88 100644 (file)
@@ -68,7 +68,7 @@ struct _MonoGHashTable {
 #ifdef HAVE_SGEN_GC
 static void *table_hash_descr = NULL;
 
-static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func);
+static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data);
 
 static Slot*
 new_slot (MonoGHashTable *hash)
@@ -481,7 +481,7 @@ mono_g_hash_table_print_stats (MonoGHashTable *table)
 
 /* GC marker function */
 static void
-mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func)
+mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data)
 {
        MonoGHashTable *table = (MonoGHashTable*)addr;
        Slot *node;
@@ -491,23 +491,23 @@ mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func)
                for (i = 0; i < table->table_size; i++) {
                        for (node = table->table [i]; node; node = node->next) {
                                if (node->key)
-                                       mark_func (&node->key);
+                                       mark_func (&node->key, gc_data);
                        }
                }
        } else if (table->gc_type == MONO_HASH_VALUE_GC) {
                for (i = 0; i < table->table_size; i++) {
                        for (node = table->table [i]; node; node = node->next) {
                                if (node->value)
-                                       mark_func (&node->value);
+                                       mark_func (&node->value, gc_data);
                        }
                }
        } else if (table->gc_type == MONO_HASH_KEY_VALUE_GC) {
                for (i = 0; i < table->table_size; i++) {
                        for (node = table->table [i]; node; node = node->next) {
                                if (node->key)
-                                       mark_func (&node->key);
+                                       mark_func (&node->key, gc_data);
                                if (node->value)
-                                       mark_func (&node->value);
+                                       mark_func (&node->value, gc_data);
                        }
                }
        }
index 6115ec14eb902fea470f103c218b6a2ecfb8ca5b..397f3849f3d62e0d425a0301fd586d44f3af79df 100644 (file)
@@ -20,13 +20,19 @@ void
 mono_gc_base_init (void)
 {
        MonoThreadInfoCallbacks cb;
+       int dummy;
 
        memset (&cb, 0, sizeof (cb));
-       cb.mono_method_is_critical = mono_runtime_is_critical_method;
+       /* TODO: This casts away an incompatible pointer type warning in the same
+                manner that boehm-gc does it. This is probably worth investigating
+                more carefully. */
+       cb.mono_method_is_critical = (gpointer)mono_runtime_is_critical_method;
        cb.mono_gc_pthread_create = (gpointer)mono_gc_pthread_create;
        cb.thread_exit = mono_gc_pthread_exit;
 
        mono_threads_init (&cb, sizeof (MonoThreadInfo));
+
+       mono_thread_info_attach (&dummy);
 }
 
 void
@@ -379,7 +385,7 @@ mono_gc_conservatively_scan_area (void *start, void *end)
 }
 
 void *
-mono_gc_scan_object (void *obj)
+mono_gc_scan_object (void *obj, void *gc_data)
 {
        g_assert_not_reached ();
        return NULL;
index 2e0340776857a173feaed56bd2d49d16b582ddb3..9ec3893765a22731c39b454ae05c7497d5a1dfa7 100644 (file)
@@ -596,6 +596,7 @@ typedef struct {
        void     (*set_cast_details) (MonoClass *from, MonoClass *to);
        void     (*debug_log) (int level, MonoString *category, MonoString *message);
        gboolean (*debug_log_is_enabled) (void);
+       gboolean (*tls_key_supported) (MonoTlsKey key);
 } MonoRuntimeCallbacks;
 
 typedef gboolean (*MonoInternalStackWalk) (MonoStackFrameInfo *frame, MonoContext *ctx, gpointer data);
@@ -647,7 +648,7 @@ void
 mono_method_return_message_restore (MonoMethod *method, gpointer *params, MonoArray *out_args) MONO_INTERNAL;
 
 void
-mono_delegate_ctor_with_method (MonoObject *this, MonoObject *target, gpointer addr, MonoMethod *method) MONO_INTERNAL;
+mono_delegate_ctor_with_method (MonoObject *this_obj, MonoObject *target, gpointer addr, MonoMethod *method) MONO_INTERNAL;
 
 void
 mono_delegate_ctor         (MonoObject *this_obj, MonoObject *target, gpointer addr) MONO_INTERNAL;
@@ -1476,7 +1477,7 @@ void
 mono_array_full_copy (MonoArray *src, MonoArray *dest) MONO_INTERNAL;
 
 gboolean
-mono_array_calc_byte_len (MonoClass *class, uintptr_t len, uintptr_t *res) MONO_INTERNAL;
+mono_array_calc_byte_len (MonoClass *klass, uintptr_t len, uintptr_t *res) MONO_INTERNAL;
 
 #ifndef DISABLE_REMOTING
 MonoObject *
@@ -1567,7 +1568,7 @@ void
 mono_runtime_unhandled_exception_policy_set (MonoRuntimeUnhandledExceptionPolicy policy) MONO_INTERNAL;
 
 MonoVTable *
-mono_class_try_get_vtable (MonoDomain *domain, MonoClass *class) MONO_INTERNAL;
+mono_class_try_get_vtable (MonoDomain *domain, MonoClass *klass) MONO_INTERNAL;
 
 MonoException *
 mono_runtime_class_init_full (MonoVTable *vtable, gboolean raise_exception) MONO_INTERNAL;
@@ -1576,16 +1577,16 @@ void
 mono_method_clear_object (MonoDomain *domain, MonoMethod *method) MONO_INTERNAL;
 
 void
-mono_class_compute_gc_descriptor (MonoClass *class) MONO_INTERNAL;
+mono_class_compute_gc_descriptor (MonoClass *klass) MONO_INTERNAL;
 
 gsize*
-mono_class_compute_bitmap (MonoClass *class, gsize *bitmap, int size, int offset, int *max_set, gboolean static_fields) MONO_INTERNAL;
+mono_class_compute_bitmap (MonoClass *klass, gsize *bitmap, int size, int offset, int *max_set, gboolean static_fields) MONO_INTERNAL;
 
 MonoObject*
 mono_object_xdomain_representation (MonoObject *obj, MonoDomain *target_domain, MonoObject **exc) MONO_INTERNAL;
 
 gboolean
-mono_class_is_reflection_method_or_constructor (MonoClass *class) MONO_INTERNAL;
+mono_class_is_reflection_method_or_constructor (MonoClass *klass) MONO_INTERNAL;
 
 MonoObject *
 mono_get_object_from_blob (MonoDomain *domain, MonoType *type, const char *blob) MONO_INTERNAL;
diff --git a/mono/metadata/object-offsets.h b/mono/metadata/object-offsets.h
new file mode 100644 (file)
index 0000000..f50cba1
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+This is a parameterized header. It's supposed/ok to be included multiple times.
+
+Input defines: (those to be defined by the includer file)
+
+Required:
+DECL_OFFSET(struct,field)
+DECL_OFFSET2(struct,field,offset)
+DECL_ALIGN(name,type)
+DECL_ALIGN2(name,alignment)
+
+Optional:
+USE_CROSS_COMPILE_OFFSETS - if defined, force the cross compiler offsets to be used, otherwise
+       they will only be used if MONO_CROSS_COMPILE is defined
+
+Output defines:
+
+HAS_CROSS_COMPILER_OFFSETS - if set, it means we found some cross offsets, it doesnt mean we'll use it.
+USED_CROSS_COMPILER_OFFSETS - if set, it means we used the cross offsets
+*/
+
+
+#undef HAS_CROSS_COMPILER_OFFSETS
+#undef USED_CROSS_COMPILER_OFFSETS
+
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/metadata/object-offsets.h"
+#endif
+
+
+#ifndef USED_CROSS_COMPILER_OFFSETS
+
+DECL_ALIGN(gint8)
+DECL_ALIGN(gint16)
+DECL_ALIGN(gint32)
+DECL_ALIGN(gint64)
+DECL_ALIGN(float)
+DECL_ALIGN(double)
+DECL_ALIGN(gpointer)
+
+#ifndef DISABLE_METADATA_OFFSETS
+//object offsets
+DECL_OFFSET(MonoObject, vtable)
+DECL_OFFSET(MonoObject, synchronisation)
+
+DECL_OFFSET(MonoClass, interface_bitmap)
+DECL_OFFSET(MonoClass, byval_arg)
+DECL_OFFSET(MonoClass, cast_class)
+DECL_OFFSET(MonoClass, element_class)
+DECL_OFFSET(MonoClass, idepth)
+DECL_OFFSET(MonoClass, instance_size)
+DECL_OFFSET(MonoClass, interface_id)
+DECL_OFFSET(MonoClass, max_interface_id)
+DECL_OFFSET(MonoClass, parent)
+DECL_OFFSET(MonoClass, rank)
+DECL_OFFSET(MonoClass, sizes)
+DECL_OFFSET(MonoClass, supertypes)
+
+DECL_OFFSET(MonoVTable, klass)
+DECL_OFFSET(MonoVTable, max_interface_id)
+DECL_OFFSET(MonoVTable, interface_bitmap)
+DECL_OFFSET(MonoVTable, vtable)
+DECL_OFFSET(MonoVTable, rank)
+DECL_OFFSET(MonoVTable, type)
+DECL_OFFSET(MonoVTable, runtime_generic_context)
+
+DECL_OFFSET(MonoDomain, stack_overflow_ex)
+
+DECL_OFFSET(MonoDelegate, target)
+DECL_OFFSET(MonoDelegate, method_ptr)
+DECL_OFFSET(MonoDelegate, invoke_impl)
+DECL_OFFSET(MonoDelegate, method)
+DECL_OFFSET(MonoDelegate, method_code)
+
+DECL_OFFSET(MonoInternalThread, tid)
+DECL_OFFSET(MonoInternalThread, static_data)
+
+DECL_OFFSET(MonoMulticastDelegate, prev)
+
+DECL_OFFSET(MonoTransparentProxy, rp)
+DECL_OFFSET(MonoTransparentProxy, remote_class)
+DECL_OFFSET(MonoTransparentProxy, custom_type_info)
+
+DECL_OFFSET(MonoRealProxy, target_domain_id)
+DECL_OFFSET(MonoRealProxy, context)
+DECL_OFFSET(MonoRealProxy, unwrapped_server)
+
+DECL_OFFSET(MonoRemoteClass, proxy_class)
+
+DECL_OFFSET(MonoArray, vector)
+DECL_OFFSET(MonoArray, max_length)
+DECL_OFFSET(MonoArray, bounds)
+
+DECL_OFFSET(MonoArrayBounds, lower_bound)
+DECL_OFFSET(MonoArrayBounds, length)
+
+DECL_OFFSET(MonoSafeHandle, handle)
+
+DECL_OFFSET(MonoHandleRef, handle)
+
+DECL_OFFSET(MonoComInteropProxy, com_object)
+
+DECL_OFFSET(MonoString, length)
+DECL_OFFSET(MonoString, chars)
+
+DECL_OFFSET(MonoException, message)
+
+DECL_OFFSET(MonoTypedRef, type)
+DECL_OFFSET(MonoTypedRef, klass)
+DECL_OFFSET(MonoTypedRef, value)
+
+//Internal structs
+DECL_OFFSET(MonoThreadsSync, owner)
+DECL_OFFSET(MonoThreadsSync, nest)
+DECL_OFFSET(MonoThreadsSync, entry_count)
+
+#if defined (HAVE_SGEN_GC) && !defined (HAVE_KW_THREAD)
+DECL_OFFSET(SgenThreadInfo, tlab_next_addr)
+DECL_OFFSET(SgenThreadInfo, tlab_temp_end)
+#endif
+
+#endif //DISABLE METADATA OFFSETS
+
+#ifndef DISABLE_JIT_OFFSETS
+DECL_OFFSET(MonoLMF, previous_lmf)
+
+DECL_OFFSET(MonoMethodRuntimeGenericContext, class_vtable)
+
+DECL_OFFSET(MonoJitTlsData, lmf)
+DECL_OFFSET(MonoJitTlsData, class_cast_from)
+DECL_OFFSET(MonoJitTlsData, class_cast_to)
+DECL_OFFSET(MonoJitTlsData, handler_block_return_address)
+DECL_OFFSET(MonoJitTlsData, restore_stack_prot)
+
+DECL_OFFSET(MonoGSharedVtMethodRuntimeInfo, locals_size)
+DECL_OFFSET(MonoGSharedVtMethodRuntimeInfo, entries) //XXX more to fix here
+
+DECL_OFFSET(MonoContinuation, stack_used_size)
+DECL_OFFSET(MonoContinuation, saved_stack)
+DECL_OFFSET(MonoContinuation, return_sp)
+DECL_OFFSET(MonoContinuation, lmf)
+DECL_OFFSET(MonoContinuation, return_ip)
+
+#ifdef TARGET_X86
+DECL_OFFSET(MonoContext, eax)
+DECL_OFFSET(MonoContext, ebx)
+DECL_OFFSET(MonoContext, ecx)
+DECL_OFFSET(MonoContext, edx)
+DECL_OFFSET(MonoContext, edi)
+DECL_OFFSET(MonoContext, esi)
+DECL_OFFSET(MonoContext, esp)
+DECL_OFFSET(MonoContext, ebp)
+DECL_OFFSET(MonoContext, eip)
+
+DECL_OFFSET(MonoLMF, method)
+DECL_OFFSET(MonoLMF, lmf_addr)
+DECL_OFFSET(MonoLMF, esp)
+DECL_OFFSET(MonoLMF, ebx)
+DECL_OFFSET(MonoLMF, edi)
+DECL_OFFSET(MonoLMF, esi)
+DECL_OFFSET(MonoLMF, ebp)
+DECL_OFFSET(MonoLMF, eip)
+#endif
+
+#ifdef TARGET_ARM
+DECL_OFFSET (MonoContext, pc)
+DECL_OFFSET (MonoContext, regs)
+DECL_OFFSET (MonoContext, fregs)
+
+DECL_OFFSET(MonoLMF, method)
+DECL_OFFSET(MonoLMF, lmf_addr)
+DECL_OFFSET(MonoLMF, sp)
+DECL_OFFSET(MonoLMF, fp)
+DECL_OFFSET(MonoLMF, ip)
+DECL_OFFSET(MonoLMF, iregs)
+DECL_OFFSET(MonoLMF, fregs)
+
+DECL_OFFSET(SeqPointInfo, bp_addrs)
+DECL_OFFSET(SeqPointInfo, ss_trigger_page)
+
+DECL_OFFSET(DynCallArgs, res)
+DECL_OFFSET(DynCallArgs, res2)
+#endif
+
+#ifdef TARGET_AMD64
+DECL_OFFSET(MonoContext, rax)
+DECL_OFFSET(MonoContext, rcx)
+DECL_OFFSET(MonoContext, rdx)
+DECL_OFFSET(MonoContext, rbx)
+DECL_OFFSET(MonoContext, rbp)
+DECL_OFFSET(MonoContext, rsi)
+DECL_OFFSET(MonoContext, rdi)
+DECL_OFFSET(MonoContext, rsp)
+DECL_OFFSET(MonoContext, r8)
+DECL_OFFSET(MonoContext, r9)
+DECL_OFFSET(MonoContext, r10)
+DECL_OFFSET(MonoContext, r12)
+DECL_OFFSET(MonoContext, r13)
+DECL_OFFSET(MonoContext, r14)
+DECL_OFFSET(MonoContext, r15)
+DECL_OFFSET(MonoContext, rip)
+
+#ifdef TARGET_WIN32
+DECL_OFFSET(MonoLMF, lmf_addr)
+#endif
+
+DECL_OFFSET(MonoLMF, rsp)
+DECL_OFFSET(MonoLMF, rbp)
+DECL_OFFSET(MonoLMF, rip)
+
+DECL_OFFSET(SeqPointInfo, bp_addrs)
+DECL_OFFSET(DynCallArgs, res)
+DECL_OFFSET(SeqPointInfo, ss_trigger_page)
+
+DECL_OFFSET(MonoLMFTramp, regs)
+DECL_OFFSET(MonoLMFTramp, lmf_addr)
+
+#endif
+       
+DECL_OFFSET(MonoDelegateTrampInfo, invoke_impl)
+DECL_OFFSET(MonoDelegateTrampInfo, method_ptr)
+
+#endif
+
+#endif
+
+#undef DECL_OFFSET
+#undef DECL_OFFSET2
+#undef DECL_ALIGN
+#undef DECL_ALIGN2
+#undef USE_CROSS_COMPILE_OFFSETS
index a9a86706f234a79c35762e85c190bd477cc81fc4..305a48820b980825278dd59f8c6005160cab9611 100644 (file)
@@ -1350,6 +1350,9 @@ build_imt_slots (MonoClass *klass, MonoVTable *vt, MonoDomain *domain, gpointer*
                        int method_slot_in_interface;
                        for (method_slot_in_interface = 0; method_slot_in_interface < iface->method.count; method_slot_in_interface++) {
                                MonoMethod *method = mono_class_get_method_by_index (iface, method_slot_in_interface);
+
+                               if (method->is_generic)
+                                       has_generic_virtual = TRUE;
                                add_imt_builder_entry (imt_builder, method, &imt_collisions_bitmap, interface_offset + method_slot_in_interface, slot_num);
                        }
                        interface_offset += iface->method.count;
@@ -3342,7 +3345,7 @@ mono_field_static_get_value_for_thread (MonoInternalThread *thread, MonoVTable *
 void
 mono_field_static_get_value (MonoVTable *vt, MonoClassField *field, void *value)
 {
-       return mono_field_static_get_value_for_thread (mono_thread_internal_current (), vt, field, value);
+       mono_field_static_get_value_for_thread (mono_thread_internal_current (), vt, field, value);
 }
 
 /**
index 0f96cf7ecc39ce5120a10fe9ef5e9cedcc9b29a4..8a62a1e10e7abae87a1e72dd7e59919ff157230f 100644 (file)
@@ -26,7 +26,7 @@ typedef struct _MonoDynamicImage MonoDynamicImage;
 typedef struct _MonoReflectionMethodBody MonoReflectionMethodBody;
 typedef struct _MonoAppContext MonoAppContext;
 
-typedef struct {
+typedef struct _MonoObject {
        MonoVTable *vtable;
        MonoThreadsSync *synchronisation;
 } MonoObject;
index 658c43375e1c635b15f9f4bd61640b052047b780..c9e0f8bf63bf27db907c41d4c8a460e6c848da1f 100755 (executable)
@@ -23,9 +23,6 @@
 #include <mono/utils/strenc.h>
 #include <mono/utils/mono-proclib.h>
 #include <mono/io-layer/io-layer.h>
-#if defined (MINGW_CROSS_COMPILE) && defined (HAVE_GETPROCESSID)
-#undef HAVE_GETPROCESSID
-#endif
 #ifndef HAVE_GETPROCESSID
 #if defined(_MSC_VER) || defined(HAVE_WINTERNL_H)
 #include <winternl.h>
index fb184a774b67020636ca112a3f1f1b63854913ad..96ea93b888d2eff3170314bc68902d0a3ac8729c 100644 (file)
@@ -60,13 +60,13 @@ G_BEGIN_DECLS
 HANDLE ves_icall_System_Diagnostics_Process_GetProcess_internal (guint32 pid) MONO_INTERNAL;
 MonoArray *ves_icall_System_Diagnostics_Process_GetProcesses_internal (void) MONO_INTERNAL;
 guint32 ves_icall_System_Diagnostics_Process_GetPid_internal (void) MONO_INTERNAL;
-void ves_icall_System_Diagnostics_Process_Process_free_internal (MonoObject *this, HANDLE process) MONO_INTERNAL;
-MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this, HANDLE process) MONO_INTERNAL;
-void ves_icall_System_Diagnostics_FileVersionInfo_GetVersionInfo_internal (MonoObject *this, MonoString *filename) MONO_INTERNAL;
+void ves_icall_System_Diagnostics_Process_Process_free_internal (MonoObject *this_obj, HANDLE process) MONO_INTERNAL;
+MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this_obj, HANDLE process) MONO_INTERNAL;
+void ves_icall_System_Diagnostics_FileVersionInfo_GetVersionInfo_internal (MonoObject *this_obj, MonoString *filename) MONO_INTERNAL;
 MonoBoolean ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoProcessStartInfo *proc_start_info, MonoProcInfo *process_handle) MONO_INTERNAL;
 MonoBoolean ves_icall_System_Diagnostics_Process_CreateProcess_internal (MonoProcessStartInfo *proc_start_info, HANDLE stdin_handle, HANDLE stdout_handle, HANDLE stderr_handle, MonoProcInfo *process_handle) MONO_INTERNAL;
-MonoBoolean ves_icall_System_Diagnostics_Process_WaitForExit_internal (MonoObject *this, HANDLE process, gint32 ms) MONO_INTERNAL;
-MonoBoolean ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal (MonoObject *this, HANDLE process, gint32 ms) MONO_INTERNAL;
+MonoBoolean ves_icall_System_Diagnostics_Process_WaitForExit_internal (MonoObject *this_obj, HANDLE process, gint32 ms) MONO_INTERNAL;
+MonoBoolean ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal (MonoObject *this_obj, HANDLE process, gint32 ms) MONO_INTERNAL;
 gint64 ves_icall_System_Diagnostics_Process_ExitTime_internal (HANDLE process) MONO_INTERNAL;
 gint64 ves_icall_System_Diagnostics_Process_StartTime_internal (HANDLE process) MONO_INTERNAL;
 gint32 ves_icall_System_Diagnostics_Process_ExitCode_internal (HANDLE process) MONO_INTERNAL;
index 4ed1203f85df3390b9d75bd5c597ec955c0c6dea..77d152d5a6b3186f3a5febff2171df2a3edad247 100644 (file)
@@ -44,8 +44,8 @@ get_entropy_from_server (const char *path, guchar *buf, int len)
         ret = -1;
     else {
         egd_addr.sun_family = AF_UNIX;
-        strncpy (egd_addr.sun_path, path, MONO_SIZEOF_SUNPATH - 1);
-        egd_addr.sun_path [MONO_SIZEOF_SUNPATH-1] = '\0';
+        strncpy (egd_addr.sun_path, path, sizeof(egd_addr.sun_path) - 1);
+        egd_addr.sun_path [sizeof(egd_addr.sun_path)-1] = '\0';
         ret = connect (file, (struct sockaddr *)&egd_addr, sizeof(egd_addr));
     }
     if (ret == -1) {
index 96b4efe76ffcf9a55c329ad965fc49bd3955e7f3..76864ca31cb05a7d0a9797b55aa35794179c6a89 100644 (file)
@@ -12,6 +12,7 @@
 #ifndef _MONO_METADATA_RAND_H_
 #define _MONO_METADATA_RAND_H_
 
+#include <glib.h>
 #include <mono/metadata/object.h>
 #include "mono/utils/mono-compiler.h"
 
index 9cb2b18f5efb6dcc5d0897f421c056ea97deeb45..3691da1b5dd352a2173e44a17c0c5f1ab48fab97 100644 (file)
@@ -1673,7 +1673,7 @@ type_get_qualified_name (MonoType *type, MonoAssembly *ass) {
        if (!klass) 
                return mono_type_get_name_full (type, MONO_TYPE_NAME_FORMAT_REFLECTION);
        ta = klass->image->assembly;
-       if (ta->dynamic || (ta == ass)) {
+       if (assembly_is_dynamic (ta) || (ta == ass)) {
                if (klass->generic_class || klass->generic_container)
                        /* For generic type definitions, we want T, while REFLECTION returns T<K> */
                        return mono_type_get_name_full (type, MONO_TYPE_NAME_FORMAT_FULL_NAME);
@@ -2246,7 +2246,7 @@ resolution_scope_from_image (MonoDynamicImage *assembly, MonoImage *image)
        if ((token = GPOINTER_TO_UINT (g_hash_table_lookup (assembly->handleref, image))))
                return token;
 
-       if (image->assembly->dynamic && (image->assembly == assembly->image.assembly)) {
+       if (assembly_is_dynamic (image->assembly) && (image->assembly == assembly->image.assembly)) {
                table = &assembly->tables [MONO_TABLE_MODULEREF];
                token = table->next_idx ++;
                table->rows ++;
@@ -2261,7 +2261,7 @@ resolution_scope_from_image (MonoDynamicImage *assembly, MonoImage *image)
                return token;
        }
        
-       if (image->assembly->dynamic)
+       if (assembly_is_dynamic (image->assembly))
                /* FIXME: */
                memset (cols, 0, sizeof (cols));
        else {
@@ -3687,7 +3687,7 @@ mono_image_fill_file_table (MonoDomain *domain, MonoReflectionModule *module, Mo
        values = table->values + table->next_idx * MONO_FILE_SIZE;
        values [MONO_FILE_FLAGS] = FILE_CONTAINS_METADATA;
        values [MONO_FILE_NAME] = string_heap_insert (&assembly->sheap, module->image->module_name);
-       if (module->image->dynamic) {
+       if (image_is_dynamic (module->image)) {
                /* This depends on the fact that the main module is emitted last */
                dir = mono_string_to_utf8 (((MonoReflectionModuleBuilder*)module)->assemblyb->dir);
                path = g_strdup_printf ("%s%c%s", dir, G_DIR_SEPARATOR, module->image->module_name);
@@ -6463,7 +6463,7 @@ mono_type_get_object (MonoDomain *domain, MonoType *type)
         * We cannot do this for TypeBuilders as mono_reflection_create_runtime_class expects
         * that the resulting object is different.   
         */
-       if (type == &klass->byval_arg && !klass->image->dynamic) {
+       if (type == &klass->byval_arg && !image_is_dynamic (klass->image)) {
                MonoVTable *vtable = mono_class_try_get_vtable (domain, klass);
                if (vtable && vtable->type)
                        return vtable->type;
@@ -6619,7 +6619,7 @@ void
 mono_method_clear_object (MonoDomain *domain, MonoMethod *method)
 {
        MonoClass *klass;
-       g_assert (method->dynamic);
+       g_assert (method_is_dynamic (method));
 
        klass = method->klass;
        while (klass) {
@@ -6921,7 +6921,7 @@ mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
        int i;
 
        /* for compatibility with .net */
-    if (method->dynamic)
+    if (method_is_dynamic (method))
         mono_raise_exception (mono_get_exception_invalid_operation (NULL));
 
        if (!System_Reflection_MethodBody)
@@ -6942,7 +6942,7 @@ mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
        image = method->klass->image;
        header = mono_method_get_header (method);
 
-       if (!image->dynamic) {
+       if (!image_is_dynamic (image)) {
                /* Obtain local vars signature token */
                method_rva = mono_metadata_decode_row_col (&image->tables [MONO_TABLE_METHOD], mono_metadata_token_index (method->token) - 1, MONO_METHOD_RVA);
                ptr = mono_image_rva_map (image, method_rva);
@@ -7052,7 +7052,7 @@ get_default_param_value_blobs (MonoMethod *method, char **blobs, guint32 *types)
 
        mono_class_init (klass);
 
-       if (klass->image->dynamic) {
+       if (image_is_dynamic (klass->image)) {
                MonoReflectionMethodAux *aux;
                if (method->is_inflated)
                        method = ((MonoMethodInflated*)method)->declaring;
@@ -7458,7 +7458,7 @@ _mono_reflection_get_type_from_info (MonoTypeNameParse *info, MonoImage *image,
                        assembly = image->assembly;
                if (!assembly) {
                        /* then we must load the assembly ourselve - see #60439 */
-                       assembly = mono_assembly_load (&info->assembly, NULL, NULL);
+                       assembly = mono_assembly_load (&info->assembly, image->assembly->basedir, NULL);
                        if (!assembly)
                                return NULL;
                }
@@ -7582,7 +7582,7 @@ mono_reflection_get_type_internal_dynamic (MonoImage *rootimage, MonoAssembly *a
        MonoType *type;
        int i;
 
-       g_assert (assembly->dynamic);
+       g_assert (assembly_is_dynamic (assembly));
        abuilder = (MonoReflectionAssemblyBuilder*)mono_assembly_get_object (((MonoDynamicAssembly*)assembly)->domain, assembly);
 
        /* Enumerate all modules */
@@ -7617,7 +7617,7 @@ mono_reflection_get_type_with_rootimage (MonoImage *rootimage, MonoImage* image,
        GString *fullName;
        GList *mod;
 
-       if (image && image->dynamic)
+       if (image && image_is_dynamic (image))
                type = mono_reflection_get_type_internal_dynamic (rootimage, image->assembly, info, ignorecase);
        else
                type = mono_reflection_get_type_internal (rootimage, image, info, ignorecase);
@@ -7644,7 +7644,7 @@ mono_reflection_get_type_with_rootimage (MonoImage *rootimage, MonoImage* image,
 
        assembly = mono_domain_try_type_resolve ( mono_domain_get (), fullName->str, NULL);
        if (assembly) {
-               if (assembly->assembly->dynamic)
+               if (assembly_is_dynamic (assembly->assembly))
                        type = mono_reflection_get_type_internal_dynamic (rootimage, assembly->assembly, info, ignorecase);
                else
                        type = mono_reflection_get_type_internal (rootimage, assembly->assembly->image, 
@@ -8735,7 +8735,7 @@ mono_custom_attrs_from_method (MonoMethod *method)
        if (method->is_inflated)
                method = ((MonoMethodInflated *) method)->declaring;
        
-       if (method->dynamic || method->klass->image->dynamic)
+       if (method_is_dynamic (method) || image_is_dynamic (method->klass->image))
                return lookup_custom_attr (method->klass->image, method);
 
        if (!method->token)
@@ -8756,7 +8756,7 @@ mono_custom_attrs_from_class (MonoClass *klass)
        if (klass->generic_class)
                klass = klass->generic_class->container_class;
 
-       if (klass->image->dynamic)
+       if (image_is_dynamic (klass->image))
                return lookup_custom_attr (klass->image, klass);
 
        if (klass->byval_arg.type == MONO_TYPE_VAR || klass->byval_arg.type == MONO_TYPE_MVAR) {
@@ -8776,7 +8776,7 @@ mono_custom_attrs_from_assembly (MonoAssembly *assembly)
 {
        guint32 idx;
        
-       if (assembly->image->dynamic)
+       if (image_is_dynamic (assembly->image))
                return lookup_custom_attr (assembly->image, assembly);
        idx = 1; /* there is only one assembly */
        idx <<= MONO_CUSTOM_ATTR_BITS;
@@ -8789,7 +8789,7 @@ mono_custom_attrs_from_module (MonoImage *image)
 {
        guint32 idx;
        
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                return lookup_custom_attr (image, image);
        idx = 1; /* there is only one module */
        idx <<= MONO_CUSTOM_ATTR_BITS;
@@ -8802,7 +8802,7 @@ mono_custom_attrs_from_property (MonoClass *klass, MonoProperty *property)
 {
        guint32 idx;
        
-       if (klass->image->dynamic) {
+       if (image_is_dynamic (klass->image)) {
                property = mono_metadata_get_corresponding_property_from_generic_type_definition (property);
                return lookup_custom_attr (klass->image, property);
        }
@@ -8817,7 +8817,7 @@ mono_custom_attrs_from_event (MonoClass *klass, MonoEvent *event)
 {
        guint32 idx;
        
-       if (klass->image->dynamic) {
+       if (image_is_dynamic (klass->image)) {
                event = mono_metadata_get_corresponding_event_from_generic_type_definition (event);
                return lookup_custom_attr (klass->image, event);
        }
@@ -8831,7 +8831,7 @@ MonoCustomAttrInfo*
 mono_custom_attrs_from_field (MonoClass *klass, MonoClassField *field)
 {
        guint32 idx;
-       if (klass->image->dynamic) {
+       if (image_is_dynamic (klass->image)) {
                field = mono_metadata_get_corresponding_field_from_generic_type_definition (field);
                return lookup_custom_attr (klass->image, field);
        }
@@ -8868,7 +8868,7 @@ mono_custom_attrs_from_param (MonoMethod *method, guint32 param)
        if (method->is_inflated)
                method = ((MonoMethodInflated *) method)->declaring;
 
-       if (method->klass->image->dynamic) {
+       if (image_is_dynamic (method->klass->image)) {
                MonoCustomAttrInfo *res, *ainfo;
                int size;
 
@@ -9335,7 +9335,7 @@ mono_reflection_register_with_runtime (MonoReflectionType *type)
        mono_loader_lock (); /*same locking as mono_type_get_object*/
        mono_domain_lock (domain);
 
-       if (!class->image->dynamic) {
+       if (!image_is_dynamic (class->image)) {
                mono_class_setup_supertypes (class);
        } else {
                if (!domain->type_hash)
@@ -10303,7 +10303,7 @@ reflection_methodbuilder_to_mono_method (MonoClass *klass,
                
                ((MonoMethodPInvoke*)m)->piflags = (rmb->native_cc << 8) | (rmb->charset ? (rmb->charset - 1) * 2 : 0) | rmb->extra_flags;
 
-               if (klass->image->dynamic)
+               if (image_is_dynamic (klass->image))
                        g_hash_table_insert (((MonoDynamicImage*)klass->image)->method_aux_hash, m, method_aux);
 
                mono_loader_unlock ();
@@ -10491,7 +10491,7 @@ reflection_methodbuilder_to_mono_method (MonoClass *klass,
                method_aux->param_marshall = specs;
        }
 
-       if (klass->image->dynamic && method_aux)
+       if (image_is_dynamic (klass->image) && method_aux)
                g_hash_table_insert (((MonoDynamicImage*)klass->image)->method_aux_hash, m, method_aux);
 
        mono_loader_unlock ();
@@ -10561,7 +10561,7 @@ fieldbuilder_to_mono_class_field (MonoClass *klass, MonoReflectionFieldBuilder*
                field->type = mono_metadata_type_dup (NULL, mono_reflection_type_get_handle ((MonoReflectionType*)fb->type));
                field->type->attrs = fb->attrs;
 
-               g_assert (klass->image->dynamic);
+               g_assert (image_is_dynamic (klass->image));
                custom = add_custom_modifiers ((MonoDynamicImage*)klass->image, field->type, fb->modreq, fb->modopt);
                g_free (field->type);
                field->type = mono_metadata_type_dup (klass->image, custom);
@@ -10701,7 +10701,7 @@ mono_reflection_bind_generic_method_parameters (MonoReflectionMethod *rmethod, M
        imethod = (MonoMethodInflated *) inflated;
 
        /*FIXME but I think this is no longer necessary*/
-       if (method->klass->image->dynamic) {
+       if (image_is_dynamic (method->klass->image)) {
                MonoDynamicImage *image = (MonoDynamicImage*)method->klass->image;
                /*
                 * This table maps metadata structures representing inflated methods/fields
@@ -10750,7 +10750,7 @@ inflate_mono_method (MonoClass *klass, MonoMethod *method, MonoObject *obj)
                imethod = (MonoMethodInflated *) mono_class_inflate_generic_method_full (method, klass, context);
        }
 
-       if (method->is_generic && method->klass->image->dynamic) {
+       if (method->is_generic && image_is_dynamic (method->klass->image)) {
                MonoDynamicImage *image = (MonoDynamicImage*)method->klass->image;
 
                mono_image_lock ((MonoImage*)image);
@@ -10971,7 +10971,7 @@ ensure_runtime_vtable (MonoClass *klass)
        MonoReflectionTypeBuilder *tb = mono_class_get_ref_info (klass);
        int i, num, j;
 
-       if (!klass->image->dynamic || (!tb && !klass->generic_class) || klass->wastypebuilder)
+       if (!image_is_dynamic (klass->image) || (!tb && !klass->generic_class) || klass->wastypebuilder)
                return;
        if (klass->parent)
                ensure_runtime_vtable (klass->parent);
@@ -11077,7 +11077,7 @@ mono_reflection_get_dynamic_overrides (MonoClass *klass, MonoMethod ***overrides
        *overrides = NULL;
        *num_overrides = 0;
 
-       g_assert (klass->image->dynamic);
+       g_assert (image_is_dynamic (klass->image));
 
        if (!mono_class_get_ref_info (klass))
                return;
@@ -11456,9 +11456,10 @@ mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb)
        klass->has_finalize = 1;
        klass->has_finalize_inited = 1;
 
-       /* fool mono_class_setup_parent */
-       klass->supertypes = NULL;
        mono_class_setup_parent (klass, klass->parent);
+       /* fool mono_class_setup_supertypes */
+       klass->supertypes = NULL;
+       mono_class_setup_supertypes (klass);
        mono_class_setup_mono_type (klass);
 
 #if 0
@@ -11801,7 +11802,7 @@ MonoMethodSignature *
 mono_reflection_lookup_signature (MonoImage *image, MonoMethod *method, guint32 token)
 {
        MonoMethodSignature *sig;
-       g_assert (image->dynamic);
+       g_assert (image_is_dynamic (image));
 
        sig = g_hash_table_lookup (((MonoDynamicImage*)image)->vararg_aux_hash, GUINT_TO_POINTER (token));
        if (sig)
@@ -11853,7 +11854,7 @@ mono_reflection_lookup_dynamic_token (MonoImage *image, guint32 token, gboolean
 static void
 ensure_complete_type (MonoClass *klass)
 {
-       if (klass->image->dynamic && !klass->wastypebuilder && mono_class_get_ref_info (klass)) {
+       if (image_is_dynamic (klass->image) && !klass->wastypebuilder && mono_class_get_ref_info (klass)) {
                MonoReflectionTypeBuilder *tb = mono_class_get_ref_info (klass);
 
                mono_domain_try_type_resolve (mono_domain_get (), NULL, (MonoObject*)tb);
@@ -12787,3 +12788,17 @@ mono_reflection_type_get_type (MonoReflectionType *reftype)
        return mono_reflection_type_get_handle (reftype);
 }
 
+/**
+ * mono_reflection_assembly_get_assembly:
+ * @refassembly: the System.Reflection.Assembly object
+ *
+ * Returns the MonoAssembly* associated with the C# System.Reflection.Assembly object @refassembly.
+ */
+MonoAssembly*
+mono_reflection_assembly_get_assembly (MonoReflectionAssembly *refassembly)
+{
+       g_assert (refassembly);
+
+       return refassembly->assembly;
+}
+
index 0301342806f0fe51760da4024369520fc3f18f22..a0808099593d856c768224a3b4609c05deda5bc0 100644 (file)
@@ -134,6 +134,8 @@ MONO_API MonoBoolean mono_declsec_get_assembly_action (MonoAssembly *assembly, u
 
 MONO_API MonoType* mono_reflection_type_get_type (MonoReflectionType *reftype);
 
+MONO_API MonoAssembly* mono_reflection_assembly_get_assembly (MonoReflectionAssembly *refassembly);
+
 MONO_END_DECLS
 
 #endif /* __METADATA_REFLECTION_H__ */
index 83f17b7d33ec5ea767724f8f72af6d5ea1298960..42b8d7d3d7796ab4a6add8b600bbe63de317acac 100644 (file)
 #ifndef _MONO_METADATA_RUNTIME_H_
 #define _MONO_METADATA_RUNTIME_H_
 
+#include <glib.h>
+#include <mono/metadata/metadata.h>
 #include <mono/utils/mono-publib.h>
+#include <mono/utils/mono-compiler.h>
 
 MONO_BEGIN_DECLS
 
index 126a48da2c75810b374ade2ef2064f9030df4ee4..987f7459686d79e9d0689ef0fac3e56f130cce51 100644 (file)
@@ -10,7 +10,9 @@
 #ifndef _MONO_METADATA_SECURITY_CORE_CLR_H_
 #define _MONO_METADATA_SECURITY_CORE_CLR_H_
 
+#include <glib.h>
 #include <mono/metadata/reflection.h>
+#include <mono/utils/mono-compiler.h>
 
 typedef enum {
        /* We compare these values as integers, so the order must not
@@ -37,8 +39,8 @@ typedef enum {
 
 extern gboolean mono_security_core_clr_test;
 
-extern void mono_security_core_clr_check_inheritance (MonoClass *class) MONO_INTERNAL;
-extern void mono_security_core_clr_check_override (MonoClass *class, MonoMethod *override, MonoMethod *base) MONO_INTERNAL;
+extern void mono_security_core_clr_check_inheritance (MonoClass *klass) MONO_INTERNAL;
+extern void mono_security_core_clr_check_override (MonoClass *klass, MonoMethod *override, MonoMethod *base) MONO_INTERNAL;
 
 extern void mono_security_core_clr_ensure_reflection_access_field (MonoClassField *field) MONO_INTERNAL;
 extern void mono_security_core_clr_ensure_reflection_access_method (MonoMethod *method) MONO_INTERNAL;
@@ -50,7 +52,7 @@ extern gboolean mono_security_core_clr_can_access_internals (MonoImage *accessin
 extern MonoException* mono_security_core_clr_is_field_access_allowed (MonoMethod *caller, MonoClassField *field) MONO_INTERNAL;
 extern MonoException* mono_security_core_clr_is_call_allowed (MonoMethod *caller, MonoMethod *callee) MONO_INTERNAL;
 
-extern MonoSecurityCoreCLRLevel mono_security_core_clr_class_level (MonoClass *class) MONO_INTERNAL;
+extern MonoSecurityCoreCLRLevel mono_security_core_clr_class_level (MonoClass *klass) MONO_INTERNAL;
 extern MonoSecurityCoreCLRLevel mono_security_core_clr_method_level (MonoMethod *method, gboolean with_class_level) MONO_INTERNAL;
 
 extern gboolean mono_security_core_clr_is_platform_image (MonoImage *image) MONO_INTERNAL;
index 6158ac820deb93329a60391887cb3310cb442ea9..f30f5e82e1c7aa834b779ec4490bb3140946544a 100644 (file)
 #ifndef _MONO_METADATA_SECURITY_H_
 #define _MONO_METADATA_SECURITY_H_
 
+#include <glib.h>
 #include <mono/metadata/object.h>
+#include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-publib.h>
 
 G_BEGIN_DECLS
 
index 6f2909769abb92dfe9aba4a1f5ed2f1433743b94..d9a52e9b195bc77f0fdd509add23ba094a7644e4 100644 (file)
@@ -45,6 +45,7 @@
 #include "metadata/profiler-private.h"
 #include "metadata/marshal.h"
 #include "metadata/method-builder.h"
+#include "metadata/abi-details.h"
 #include "utils/mono-memory-model.h"
 #include "utils/mono-counters.h"
 
@@ -117,15 +118,15 @@ alloc_degraded (MonoVTable *vtable, size_t size, gboolean for_mature)
        void *p;
 
        if (!for_mature) {
-               if (last_major_gc_warned < stat_major_gcs) {
+               if (last_major_gc_warned < gc_stats.major_gc_count) {
                        ++num_degraded;
                        if (num_degraded == 1 || num_degraded == 3)
                                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "Warning: Degraded allocation.  Consider increasing nursery-size if the warning persists.");
                        else if (num_degraded == 10)
                                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "Warning: Repeated degraded allocation.  Consider increasing nursery-size.");
-                       last_major_gc_warned = stat_major_gcs;
+                       last_major_gc_warned = gc_stats.major_gc_count;
                }
-               InterlockedExchangeAdd (&degraded_mode, size);
+               SGEN_ATOMIC_ADD_P (degraded_mode, size);
                sgen_ensure_free_space (size);
        } else {
                if (sgen_need_major_collection (size))
@@ -148,7 +149,7 @@ alloc_degraded (MonoVTable *vtable, size_t size, gboolean for_mature)
 static void
 zero_tlab_if_necessary (void *p, size_t size)
 {
-       if (nursery_clear_policy == CLEAR_AT_TLAB_CREATION) {
+       if (nursery_clear_policy == CLEAR_AT_TLAB_CREATION || nursery_clear_policy == CLEAR_AT_TLAB_CREATION_DEBUG) {
                memset (p, 0, size);
        } else {
                /*
@@ -283,7 +284,7 @@ mono_gc_alloc_obj_nolock (MonoVTable *vtable, size_t size)
                        if (degraded_mode && degraded_mode < DEFAULT_NURSERY_SIZE)
                                return alloc_degraded (vtable, size, FALSE);
 
-                       available_in_tlab = TLAB_REAL_END - TLAB_NEXT;
+                       available_in_tlab = (int)(TLAB_REAL_END - TLAB_NEXT);//We'll never have tlabs > 2Gb
                        if (size > tlab_size || available_in_tlab > SGEN_MAX_NURSERY_WASTE) {
                                /* Allocate directly from the nursery */
                                do {
@@ -396,7 +397,7 @@ mono_gc_try_alloc_obj_nolock (MonoVTable *vtable, size_t size)
                new_next = (char*)p + size;
 
                real_end = TLAB_REAL_END;
-               available_in_tlab = real_end - (char*)p;
+               available_in_tlab = (int)(real_end - (char*)p);//We'll never have tlabs > 2Gb
 
                if (G_LIKELY (new_next < real_end)) {
                        TLAB_NEXT = new_next;
@@ -454,12 +455,12 @@ void*
 mono_gc_alloc_obj (MonoVTable *vtable, size_t size)
 {
        void *res;
+       TLAB_ACCESS_INIT;
 
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
 
 #ifndef DISABLE_CRITICAL_REGION
-       TLAB_ACCESS_INIT;
 
        if (G_UNLIKELY (has_per_allocation_action)) {
                static int alloc_count;
@@ -498,17 +499,17 @@ void*
 mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length)
 {
        MonoArray *arr;
+       TLAB_ACCESS_INIT;
 
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
 
 #ifndef DISABLE_CRITICAL_REGION
-       TLAB_ACCESS_INIT;
        ENTER_CRITICAL_REGION;
        arr = mono_gc_try_alloc_obj_nolock (vtable, size);
        if (arr) {
                /*This doesn't require fencing since EXIT_CRITICAL_REGION already does it for us*/
-               arr->max_length = max_length;
+               arr->max_length = (mono_array_size_t)max_length;
                EXIT_CRITICAL_REGION;
                return arr;
        }
@@ -523,7 +524,7 @@ mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length)
                return mono_gc_out_of_memory (size);
        }
 
-       arr->max_length = max_length;
+       arr->max_length = (mono_array_size_t)max_length;
 
        UNLOCK_GC;
 
@@ -535,17 +536,17 @@ mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uint
 {
        MonoArray *arr;
        MonoArrayBounds *bounds;
+       TLAB_ACCESS_INIT;
 
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
 
 #ifndef DISABLE_CRITICAL_REGION
-       TLAB_ACCESS_INIT;
        ENTER_CRITICAL_REGION;
        arr = mono_gc_try_alloc_obj_nolock (vtable, size);
        if (arr) {
                /*This doesn't require fencing since EXIT_CRITICAL_REGION already does it for us*/
-               arr->max_length = max_length;
+               arr->max_length = (mono_array_size_t)max_length;
 
                bounds = (MonoArrayBounds*)((char*)arr + size - bounds_size);
                arr->bounds = bounds;
@@ -563,7 +564,7 @@ mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uint
                return mono_gc_out_of_memory (size);
        }
 
-       arr->max_length = max_length;
+       arr->max_length = (mono_array_size_t)max_length;
 
        bounds = (MonoArrayBounds*)((char*)arr + size - bounds_size);
        arr->bounds = bounds;
@@ -577,12 +578,12 @@ void*
 mono_gc_alloc_string (MonoVTable *vtable, size_t size, gint32 len)
 {
        MonoString *str;
+       TLAB_ACCESS_INIT;
 
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
 
 #ifndef DISABLE_CRITICAL_REGION
-       TLAB_ACCESS_INIT;
        ENTER_CRITICAL_REGION;
        str = mono_gc_try_alloc_obj_nolock (vtable, size);
        if (str) {
@@ -797,10 +798,10 @@ create_allocator (int atype)
        if (atype == ATYPE_NORMAL || atype == ATYPE_SMALL) {
                /* size = vtable->klass->instance_size; */
                mono_mb_emit_ldarg (mb, 0);
-               mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+               mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
                mono_mb_emit_byte (mb, CEE_ADD);
                mono_mb_emit_byte (mb, CEE_LDIND_I);
-               mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoClass, instance_size));
+               mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoClass, instance_size));
                mono_mb_emit_byte (mb, CEE_ADD);
                /* FIXME: assert instance_size stays a 4 byte integer */
                mono_mb_emit_byte (mb, CEE_LDIND_U4);
@@ -840,10 +841,10 @@ create_allocator (int atype)
 
                /* vtable->klass->sizes.element_size */
                mono_mb_emit_ldarg (mb, 0);
-               mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+               mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
                mono_mb_emit_byte (mb, CEE_ADD);
                mono_mb_emit_byte (mb, CEE_LDIND_I);
-               mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoClass, sizes.element_size));
+               mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoClass, sizes));
                mono_mb_emit_byte (mb, CEE_ADD);
                mono_mb_emit_byte (mb, CEE_LDIND_U4);
                mono_mb_emit_byte (mb, CEE_CONV_I);
@@ -940,7 +941,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, TLS_KEY_SGEN_TLAB_NEXT_ADDR);
+       EMIT_TLS_ACCESS_NEXT_ADDR (mb);
        mono_mb_emit_stloc (mb, tlab_next_addr_var);
 
        /* p = (void**)tlab_next; */
@@ -959,7 +960,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, TLS_KEY_SGEN_TLAB_TEMP_END);
+       EMIT_TLS_ACCESS_TEMP_END (mb);
        slowpath_branch = mono_mb_emit_short_branch (mb, MONO_CEE_BLT_UN_S);
 
        /* Slowpath */
@@ -997,7 +998,7 @@ create_allocator (int atype)
 
        /*The tlab store must be visible before the the vtable store. This could be replaced with a DDS but doing it with IL would be tricky. */
        mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX);
-       mono_mb_emit_op (mb, CEE_MONO_MEMORY_BARRIER, StoreStoreBarrier);
+       mono_mb_emit_op (mb, CEE_MONO_MEMORY_BARRIER, (gpointer)StoreStoreBarrier);
 
        /* *p = vtable; */
        mono_mb_emit_ldloc (mb, p_var);
@@ -1007,7 +1008,7 @@ create_allocator (int atype)
        if (atype == ATYPE_VECTOR) {
                /* arr->max_length = max_length; */
                mono_mb_emit_ldloc (mb, p_var);
-               mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoArray, max_length));
+               mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoArray, max_length));
                mono_mb_emit_ldarg (mb, 1);
 #ifdef MONO_BIG_ARRAYS
                mono_mb_emit_byte (mb, CEE_STIND_I);
@@ -1018,7 +1019,7 @@ create_allocator (int atype)
                /* need to set length and clear the last char */
                /* s->length = len; */
                mono_mb_emit_ldloc (mb, p_var);
-               mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoString, length));
+               mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoString, length));
                mono_mb_emit_byte (mb, MONO_CEE_ADD);
                mono_mb_emit_ldarg (mb, 1);
                mono_mb_emit_byte (mb, MONO_CEE_STIND_I4);
@@ -1036,7 +1037,7 @@ create_allocator (int atype)
        We must make sure both vtable and max_length are globaly visible before returning to managed land.
        */
        mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX);
-       mono_mb_emit_op (mb, CEE_MONO_MEMORY_BARRIER, StoreStoreBarrier);
+       mono_mb_emit_op (mb, CEE_MONO_MEMORY_BARRIER, (gpointer)StoreStoreBarrier);
 
        /* return p */
        mono_mb_emit_ldloc (mb, p_var);
index 1c36c2929235c2262837a6b839430dc3adb4a0c3..4d7dd6f4bfe3bcb2bc07cf5e47f94b9e0b118c89 100644 (file)
@@ -270,7 +270,8 @@ sgen_bridge_register_finalized_object (MonoObject *obj)
 void
 sgen_bridge_describe_pointer (MonoObject *obj)
 {
-       bridge_processor.describe_pointer (obj);
+       if (bridge_processor.describe_pointer)
+               bridge_processor.describe_pointer (obj);
 }
 
 static void
index 8bfeb09a6d717af7a96f4ceeb1a03137c4e0519b..daa071e9d6dfc9b8822572836353bbda6eb06e40 100644 (file)
@@ -56,7 +56,7 @@ typedef struct {
 
 typedef struct {
        int bridge_version;
-       MonoGCBridgeObjectKind (*bridge_class_kind) (MonoClass *class);
+       MonoGCBridgeObjectKind (*bridge_class_kind) (MonoClass *klass);
        mono_bool (*is_bridge_object) (MonoObject *object);
        void (*cross_references) (int num_sccs, MonoGCBridgeSCC **sccs, int num_xrefs, MonoGCBridgeXRef *xrefs);
 } MonoGCBridgeCallbacks;
index 51f72fe87a4d770b3145c17336787f3a55c3d135..aab3bcb6153332ff59565ab941b449aea71b0fdf 100644 (file)
@@ -45,6 +45,8 @@
 #endif
 #include <sys/types.h>
 
+#define ARRAY_OBJ_INDEX(ptr,array,elem_size) (((char*)(ptr) - ((char*)(array) + G_STRUCT_OFFSET (MonoArray, vector))) / (elem_size))
+
 guint8 *sgen_cardtable;
 
 static gboolean need_mod_union;
@@ -238,7 +240,7 @@ sgen_card_table_get_card_data (guint8 *data_dest, mword address, mword cards)
 #endif
        }
 
-       return mask;
+       return mask != 0;
 }
 
 void*
@@ -585,7 +587,7 @@ sgen_cardtable_scan_object (char *obj, mword block_obj_size, guint8 *cards, gboo
                mword obj_size = sgen_par_object_get_size (vt, (MonoObject*)obj);
                char *obj_end = obj + obj_size;
                size_t card_count;
-               int extra_idx = 0;
+               size_t extra_idx = 0;
 
                MonoArray *arr = (MonoArray*)obj;
                mword desc = (mword)klass->element_class->gc_descr;
@@ -624,8 +626,8 @@ LOOP_HEAD:
 
                card_data = find_next_card (card_data, card_data_end);
                for (; card_data < card_data_end; card_data = find_next_card (card_data + 1, card_data_end)) {
-                       int index;
-                       int idx = (card_data - card_base) + extra_idx;
+                       size_t index;
+                       size_t idx = (card_data - card_base) + extra_idx;
                        char *start = (char*)(obj_start + idx * CARD_SIZE_IN_BYTES);
                        char *card_end = start + CARD_SIZE_IN_BYTES;
                        char *first_elem, *elem;
index d22d92130ea4591deaf22bb44e7e96fdf598d91a..f44a4d4ace66c10eae1d458135d1f8e4fe82feb9 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef __MONO_SGENCONF_H__
 #define __MONO_SGENCONF_H__
 
+#include <glib.h>
+
 /*Basic defines and static tunables */
 
 #if SIZEOF_VOID_P == 4
index e084b5ffee18b1f26e6a1b76f10abb3cb8a57a1f..1387676c75858cb57b6c6a403fb0f00d78705c1e 100644 (file)
@@ -160,7 +160,7 @@ static gboolean missing_remsets;
        if (*(ptr) && sgen_ptr_in_nursery ((char*)*(ptr))) { \
                if (!sgen_get_remset ()->find_address ((char*)(ptr)) && !sgen_cement_lookup (*(ptr))) { \
                        SGEN_LOG (0, "Oldspace->newspace reference %p at offset %td in object %p (%s.%s) not found in remsets.", *(ptr), (char*)(ptr) - (char*)(obj), (obj), ((MonoObject*)(obj))->vtable->klass->name_space, ((MonoObject*)(obj))->vtable->klass->name); \
-                       binary_protocol_missing_remset ((obj), (gpointer)LOAD_VTABLE ((obj)), (char*)(ptr) - (char*)(obj), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \
+                       binary_protocol_missing_remset ((obj), (gpointer)LOAD_VTABLE ((obj)), (int) ((char*)(ptr) - (char*)(obj)), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \
                        if (!object_is_pinned (*(ptr)))                                                         \
                                missing_remsets = TRUE;                                                                 \
                }                                                                                                                               \
@@ -220,7 +220,7 @@ is_major_or_los_object_marked (char *obj)
        if (*(ptr) && !sgen_ptr_in_nursery ((char*)*(ptr)) && !is_major_or_los_object_marked ((char*)*(ptr))) { \
                if (!sgen_get_remset ()->find_address_with_cards (start, cards, (char*)(ptr))) { \
                        SGEN_LOG (0, "major->major reference %p at offset %td in object %p (%s.%s) not found in remsets.", *(ptr), (char*)(ptr) - (char*)(obj), (obj), ((MonoObject*)(obj))->vtable->klass->name_space, ((MonoObject*)(obj))->vtable->klass->name); \
-                       binary_protocol_missing_remset ((obj), (gpointer)LOAD_VTABLE ((obj)), (char*)(ptr) - (char*)(obj), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \
+                       binary_protocol_missing_remset ((obj), (gpointer)LOAD_VTABLE ((obj)), (int) ((char*)(ptr) - (char*)(obj)), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \
                        missing_remsets = TRUE;                         \
                }                                                                                                                               \
        }                                                                                                                                       \
@@ -640,7 +640,7 @@ static MonoObject *check_key = NULL;
 static RootRecord *check_root = NULL;
 
 static void
-check_root_obj_specific_ref_from_marker (void **obj)
+check_root_obj_specific_ref_from_marker (void **obj, void *gc_data)
 {
        check_root_obj_specific_ref (check_root, check_key, *obj);
 }
@@ -669,7 +669,7 @@ scan_roots_for_specific_ref (MonoObject *key, int root_type)
                        return;
                case ROOT_DESC_COMPLEX: {
                        gsize *bitmap_data = sgen_get_complex_descriptor_bitmap (desc);
-                       int bwords = (*bitmap_data) - 1;
+                       int bwords = (int) ((*bitmap_data) - 1);
                        void **start_run = start_root;
                        bitmap_data++;
                        while (bwords-- > 0) {
@@ -687,7 +687,7 @@ scan_roots_for_specific_ref (MonoObject *key, int root_type)
                }
                case ROOT_DESC_USER: {
                        MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc);
-                       marker (start_root, check_root_obj_specific_ref_from_marker);
+                       marker (start_root, check_root_obj_specific_ref_from_marker, NULL);
                        break;
                }
                case ROOT_DESC_RUN_LEN:
@@ -735,6 +735,13 @@ check_obj_not_in_domain (void **o)
        g_assert (((MonoObject*)(*o))->vtable->domain != check_domain);
 }
 
+
+static void
+check_obj_not_in_domain_callback (void **o, void *gc_data)
+{
+       g_assert (((MonoObject*)(*o))->vtable->domain != check_domain);
+}
+
 void
 sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type)
 {
@@ -761,7 +768,7 @@ sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type)
                        break;
                case ROOT_DESC_COMPLEX: {
                        gsize *bitmap_data = sgen_get_complex_descriptor_bitmap (desc);
-                       int bwords = (*bitmap_data) - 1;
+                       int bwords = (int)((*bitmap_data) - 1);
                        void **start_run = start_root;
                        bitmap_data++;
                        while (bwords-- > 0) {
@@ -779,7 +786,7 @@ sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type)
                }
                case ROOT_DESC_USER: {
                        MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc);
-                       marker (start_root, check_obj_not_in_domain);
+                       marker (start_root, check_obj_not_in_domain_callback, NULL);
                        break;
                }
                case ROOT_DESC_RUN_LEN:
@@ -797,7 +804,7 @@ is_xdomain_ref_allowed (gpointer *ptr, char *obj, MonoDomain *domain)
 {
        MonoObject *o = (MonoObject*)(obj);
        MonoObject *ref = (MonoObject*)*(ptr);
-       int offset = (char*)(ptr) - (char*)o;
+       size_t offset = (char*)(ptr) - (char*)o;
 
        if (o->vtable->klass == mono_defaults.thread_class && offset == G_STRUCT_OFFSET (MonoThread, internal_thread))
                return TRUE;
@@ -846,7 +853,7 @@ check_reference_for_xdomain (gpointer *ptr, char *obj, MonoDomain *domain)
 {
        MonoObject *o = (MonoObject*)(obj);
        MonoObject *ref = (MonoObject*)*(ptr);
-       int offset = (char*)(ptr) - (char*)o;
+       size_t offset = (char*)(ptr) - (char*)o;
        MonoClass *class;
        MonoClassField *field;
        char *str;
@@ -927,6 +934,7 @@ compare_xrefs (const void *a_ptr, const void *b_ptr)
        return 0;
 }
 
+/*
 static void
 dump_processor_state (SgenBridgeProcessor *p)
 {
@@ -951,6 +959,7 @@ dump_processor_state (SgenBridgeProcessor *p)
 
        printf ("-------\n");
 }
+*/
 
 gboolean
 sgen_compare_bridge_processor_results (SgenBridgeProcessor *a, SgenBridgeProcessor *b)
index 1e3bc152e7932f2574fafd13c17fe7b577513c75..c578a91cfb2b1516e3f2076c1b1a4f545498e62e 100644 (file)
@@ -87,7 +87,7 @@ alloc_complex_descriptor (gsize *bitmap, int numbits)
                                return i;
                        }
                }
-               i += complex_descriptors [i];
+               i += (int)complex_descriptors [i];
        }
        if (complex_descriptors_next + nwords > complex_descriptors_size) {
                int new_size = complex_descriptors_size * 2 + nwords;
@@ -266,7 +266,7 @@ mono_gc_get_bitmap_for_descr (void *descr, int *numbits)
 
        case DESC_TYPE_COMPLEX: {
                gsize *bitmap_data = sgen_get_complex_descriptor (d);
-               int bwords = (*bitmap_data) - 1;
+               int bwords = (int)(*bitmap_data) - 1;//Max scalar object size is 1Mb, which means up to 32k descriptor words
                int i;
 
                bitmap = g_new0 (gsize, bwords);
index f07ad4a6ba00b214189b2b51e470daea9ad21ac7..366c7667778a06284f8f27ac2c0692fda29b6347 100644 (file)
@@ -235,7 +235,7 @@ sgen_gc_descr_has_references (mword desc)
                /* there are pointers */        \
                void **_objptr = (void**)(obj); \
                gsize *bitmap_data = sgen_get_complex_descriptor ((desc)); \
-               int bwords = (*bitmap_data) - 1;        \
+               gsize bwords = (*bitmap_data) - 1;      \
                void **start_run = _objptr;     \
                bitmap_data++;  \
                if (0) {        \
@@ -261,8 +261,8 @@ sgen_gc_descr_has_references (mword desc)
 #define OBJ_COMPLEX_ARR_FOREACH_PTR(vt,obj)    do {    \
                /* there are pointers */        \
                gsize *mbitmap_data = sgen_get_complex_descriptor ((vt)->desc); \
-               int mbwords = (*mbitmap_data++) - 1;    \
-               int el_size = mono_array_element_size (vt->klass);      \
+               gsize mbwords = (*mbitmap_data++) - 1;  \
+               gsize el_size = mono_array_element_size (vt->klass);    \
                char *e_start = (char*)(obj) +  G_STRUCT_OFFSET (MonoArray, vector);    \
                char *e_end = e_start + el_size * mono_array_length_fast ((MonoArray*)(obj));   \
                if (0)                                                  \
@@ -270,7 +270,7 @@ sgen_gc_descr_has_references (mword desc)
                while (e_start < e_end) {       \
                        void **_objptr = (void**)e_start;       \
                        gsize *bitmap_data = mbitmap_data;      \
-                       unsigned int bwords = mbwords;  \
+                       gsize bwords = mbwords; \
                        while (bwords-- > 0) {  \
                                gsize _bmap = *bitmap_data++;   \
                                void **start_run = _objptr;     \
index bb350a9e91ffbde1a81bc6a46ab1d8c2f6de801c..3793c9435be4b084f443ac9633bbce498cc61c5f 100644 (file)
@@ -41,7 +41,7 @@ int num_ready_finalizers = 0;
 static int no_finalize = 0;
 
 #define DISLINK_OBJECT(l)      (REVEAL_POINTER (*(void**)(l)))
-#define DISLINK_TRACK(l)       ((~(gulong)(*(void**)(l))) & 1)
+#define DISLINK_TRACK(l)       ((~(size_t)(*(void**)(l))) & 1)
 
 /*
  * The finalizable hash has the object as the key, the 
index 5900dc731a37aea1c46daa43875e27c817437440..e3b65fdbf3a58e1922e3bd4097ae04dcb276026e 100644 (file)
@@ -322,9 +322,6 @@ static int stat_wbarrier_value_copy = 0;
 static int stat_wbarrier_object_copy = 0;
 #endif
 
-int stat_minor_gcs = 0;
-int stat_major_gcs = 0;
-
 static long long stat_pinned_objects = 0;
 
 static long long time_minor_pre_collection_fragment_clear = 0;
@@ -353,6 +350,8 @@ static long long time_major_fragment_creation = 0;
 int gc_debug_level = 0;
 FILE* gc_debug_file;
 
+static MonoGCFinalizerCallbacks fin_callbacks;
+
 /*
 void
 mono_gc_flush_info (void)
@@ -407,7 +406,7 @@ gboolean sgen_try_free_some_memory;
 #define SCAN_START_SIZE        SGEN_SCAN_START_SIZE
 
 static mword pagesize = 4096;
-int degraded_mode = 0;
+size_t degraded_mode = 0;
 
 static mword bytes_pinned_from_failed_allocation = 0;
 
@@ -869,7 +868,7 @@ sgen_drain_gray_stack (int max_objs, ScanCopyContext ctx)
 
        if (max_objs == -1) {
                for (;;) {
-                       GRAY_OBJECT_DEQUEUE (queue, obj);
+                       GRAY_OBJECT_DEQUEUE (queue, &obj);
                        if (!obj)
                                return TRUE;
                        SGEN_LOG (9, "Precise gray object scan %p (%s)", obj, safe_name (obj));
@@ -880,7 +879,7 @@ sgen_drain_gray_stack (int max_objs, ScanCopyContext ctx)
 
                do {
                        for (i = 0; i != max_objs; ++i) {
-                               GRAY_OBJECT_DEQUEUE (queue, obj);
+                               GRAY_OBJECT_DEQUEUE (queue, &obj);
                                if (!obj)
                                        return TRUE;
                                SGEN_LOG (9, "Precise gray object scan %p (%s)", obj, safe_name (obj));
@@ -1018,10 +1017,10 @@ pin_objects_from_addresses (GCMemSection *section, void **start, void **end, voi
 void
 sgen_pin_objects_in_section (GCMemSection *section, ScanCopyContext ctx)
 {
-       int num_entries = section->pin_queue_num_entries;
+       size_t num_entries = section->pin_queue_num_entries;
        if (num_entries) {
                void **start = section->pin_queue_start;
-               int reduced_to;
+               size_t reduced_to;
                reduced_to = pin_objects_from_addresses (section, start, start + num_entries,
                                section->data, section->next_data, ctx);
                section->pin_queue_num_entries = reduced_to;
@@ -1095,15 +1094,15 @@ sgen_parallel_pin_or_update (void **ptr, void *obj, MonoVTable *vt, SgenGrayQueu
  * Done using a by-the book heap sort. Which has decent and stable performance, is pretty cache efficient.
  */
 void
-sgen_sort_addresses (void **array, int size)
+sgen_sort_addresses (void **array, size_t size)
 {
-       int i;
+       size_t i;
        void *tmp;
 
        for (i = 1; i < size; ++i) {
-               int child = i;
+               size_t child = i;
                while (child > 0) {
-                       int parent = (child - 1) / 2;
+                       size_t parent = (child - 1) / 2;
 
                        if (array [parent] >= array [child])
                                break;
@@ -1117,7 +1116,7 @@ sgen_sort_addresses (void **array, int size)
        }
 
        for (i = size - 1; i > 0; --i) {
-               int end, root;
+               size_t end, root;
                tmp = array [i];
                array [i] = array [0];
                array [0] = tmp;
@@ -1126,7 +1125,7 @@ sgen_sort_addresses (void **array, int size)
                root = 0;
 
                while (root * 2 + 1 <= end) {
-                       int child = root * 2 + 1;
+                       size_t child = root * 2 + 1;
 
                        if (child < end && array [child] < array [child + 1])
                                ++child;
@@ -1224,7 +1223,7 @@ unpin_objects_from_queue (SgenGrayQueue *queue)
 {
        for (;;) {
                char *addr;
-               GRAY_OBJECT_DEQUEUE (queue, addr);
+               GRAY_OBJECT_DEQUEUE (queue, &addr);
                if (!addr)
                        break;
                g_assert (SGEN_OBJECT_IS_PINNED (addr));
@@ -1237,24 +1236,10 @@ typedef struct {
        GrayQueue *queue;
 } UserCopyOrMarkData;
 
-static MonoNativeTlsKey user_copy_or_mark_key;
-
 static void
-init_user_copy_or_mark_key (void)
+single_arg_user_copy_or_mark (void **obj, void *gc_data)
 {
-       mono_native_tls_alloc (&user_copy_or_mark_key, NULL);
-}
-
-static void
-set_user_copy_or_mark_data (UserCopyOrMarkData *data)
-{
-       mono_native_tls_set_value (user_copy_or_mark_key, data);
-}
-
-static void
-single_arg_user_copy_or_mark (void **obj)
-{
-       UserCopyOrMarkData *data = mono_native_tls_get_value (user_copy_or_mark_key);
+       UserCopyOrMarkData *data = gc_data;
 
        data->func (obj, data->queue);
 }
@@ -1288,7 +1273,7 @@ precisely_scan_objects_from (void** start_root, void** end_root, char* n_start,
                return;
        case ROOT_DESC_COMPLEX: {
                gsize *bitmap_data = sgen_get_complex_descriptor_bitmap (desc);
-               int bwords = (*bitmap_data) - 1;
+               gsize bwords = (*bitmap_data) - 1;
                void **start_run = start_root;
                bitmap_data++;
                while (bwords-- > 0) {
@@ -1310,9 +1295,7 @@ precisely_scan_objects_from (void** start_root, void** end_root, char* n_start,
        case ROOT_DESC_USER: {
                UserCopyOrMarkData data = { copy_func, queue };
                MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc);
-               set_user_copy_or_mark_data (&data);
-               marker (start_root, single_arg_user_copy_or_mark);
-               set_user_copy_or_mark_data (NULL);
+               marker (start_root, single_arg_user_copy_or_mark, &data);
                break;
        }
        case ROOT_DESC_RUN_LEN:
@@ -1361,7 +1344,7 @@ alloc_nursery (void)
 
        if (nursery_section)
                return;
-       SGEN_LOG (2, "Allocating nursery size: %lu", (size_t)sgen_nursery_size);
+       SGEN_LOG (2, "Allocating nursery size: %zu", (size_t)sgen_nursery_size);
        /* later we will alloc a larger area for the nursery but only activate
         * what we need. The rest will be used as expansion if we have too many pinned
         * objects in the existing nursery.
@@ -1454,7 +1437,7 @@ report_finalizer_roots (void)
 static GCRootReport *root_report;
 
 static void
-single_arg_report_root (void **obj)
+single_arg_report_root (void **obj, void *gc_data)
 {
        if (*obj)
                add_profile_gc_root (root_report, *obj, MONO_PROFILE_GC_ROOT_OTHER, 0);
@@ -1476,7 +1459,7 @@ precisely_report_roots_from (GCRootReport *report, void** start_root, void** end
                return;
        case ROOT_DESC_COMPLEX: {
                gsize *bitmap_data = sgen_get_complex_descriptor_bitmap (desc);
-               int bwords = (*bitmap_data) - 1;
+               gsize bwords = (*bitmap_data) - 1;
                void **start_run = start_root;
                bitmap_data++;
                while (bwords-- > 0) {
@@ -1496,7 +1479,7 @@ precisely_report_roots_from (GCRootReport *report, void** start_root, void** end
        case ROOT_DESC_USER: {
                MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc);
                root_report = report;
-               marker (start_root, single_arg_report_root);
+               marker (start_root, single_arg_report_root, NULL);
                break;
        }
        case ROOT_DESC_RUN_LEN:
@@ -1719,7 +1702,7 @@ sgen_check_section_scan_starts (GCMemSection *section)
        size_t i;
        for (i = 0; i < section->num_scan_start; ++i) {
                if (section->scan_starts [i]) {
-                       guint size = safe_object_get_size ((MonoObject*) section->scan_starts [i]);
+                       mword size = safe_object_get_size ((MonoObject*) section->scan_starts [i]);
                        g_assert (size >= sizeof (MonoObject) && size <= MAX_SMALL_OBJ_SIZE);
                }
        }
@@ -1821,7 +1804,7 @@ dump_object (MonoObject *obj, gboolean dump_location)
        g_assert (j < sizeof (class_name));
        class_name [j] = 0;
 
-       fprintf (heap_dump_file, "<object class=\"%s.%s\" size=\"%d\"",
+       fprintf (heap_dump_file, "<object class=\"%s.%s\" size=\"%zd\"",
                        class->name_space, class_name,
                        safe_object_get_size (obj));
        if (dump_location) {
@@ -2088,7 +2071,7 @@ verify_scan_starts (char *start, char *end)
        for (i = 0; i < nursery_section->num_scan_start; ++i) {
                char *addr = nursery_section->scan_starts [i];
                if (addr > start && addr < end)
-                       SGEN_LOG (1, "NFC-BAD SCAN START [%ld] %p for obj [%p %p]", i, addr, start, end);
+                       SGEN_LOG (1, "NFC-BAD SCAN START [%zu] %p for obj [%p %p]", i, addr, start, end);
        }
 }
 
@@ -2209,7 +2192,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
                return TRUE;
 
        MONO_GC_BEGIN (GENERATION_NURSERY);
-       binary_protocol_collection_begin (stat_minor_gcs, GENERATION_NURSERY);
+       binary_protocol_collection_begin (gc_stats.minor_gc_count, GENERATION_NURSERY);
 
        verify_nursery ();
 
@@ -2235,7 +2218,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
        /* FIXME: optimize later to use the higher address where an object can be present */
        nursery_next = MAX (nursery_next, sgen_get_nursery_end ());
 
-       SGEN_LOG (1, "Start nursery collection %d %p-%p, size: %d", stat_minor_gcs, sgen_get_nursery_start (), nursery_next, (int)(nursery_next - sgen_get_nursery_start ()));
+       SGEN_LOG (1, "Start nursery collection %d %p-%p, size: %d", gc_stats.minor_gc_count, sgen_get_nursery_start (), nursery_next, (int)(nursery_next - sgen_get_nursery_start ()));
        max_garbage_amount = nursery_next - sgen_get_nursery_start ();
        g_assert (nursery_section->size >= max_garbage_amount);
 
@@ -2259,7 +2242,6 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
 
        init_gray_queue ();
 
-       stat_minor_gcs++;
        gc_stats.minor_gc_count ++;
 
        MONO_GC_CHECKPOINT_1 (GENERATION_NURSERY);
@@ -2286,8 +2268,8 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
 
        TV_GETTIME (atv);
        time_minor_pinning += TV_ELAPSED (btv, atv);
-       SGEN_LOG (2, "Finding pinned pointers: %d in %d usecs", sgen_get_pinned_count (), TV_ELAPSED (btv, atv));
-       SGEN_LOG (4, "Start scan with %d pinned objects", sgen_get_pinned_count ());
+       SGEN_LOG (2, "Finding pinned pointers: %zd in %d usecs", sgen_get_pinned_count (), TV_ELAPSED (btv, atv));
+       SGEN_LOG (4, "Start scan with %zd pinned objects", sgen_get_pinned_count ());
 
        MONO_GC_CHECKPOINT_3 (GENERATION_NURSERY);
 
@@ -2427,7 +2409,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
        gc_stats.minor_gc_time_usecs += TV_ELAPSED (all_atv, all_btv);
 
        if (heap_dump_file)
-               dump_heap ("minor", stat_minor_gcs - 1, NULL);
+               dump_heap ("minor", gc_stats.minor_gc_count - 1, NULL);
 
        /* prepare the pin queue for the next collection */
        sgen_finish_pinning ();
@@ -2455,7 +2437,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
        objects_pinned = 0;
 
        MONO_GC_END (GENERATION_NURSERY);
-       binary_protocol_collection_end (stat_minor_gcs - 1, GENERATION_NURSERY);
+       binary_protocol_collection_end (gc_stats.minor_gc_count - 1, GENERATION_NURSERY);
 
        if (check_nursery_objects_pinned && !sgen_minor_collector.is_split)
                sgen_check_nursery_objects_pinned (unpin_queue != NULL);
@@ -2477,7 +2459,7 @@ scan_nursery_objects (ScanCopyContext ctx)
 }
 
 static void
-major_copy_or_mark_from_roots (int *old_next_pin_slot, gboolean finish_up_concurrent_mark, gboolean scan_mod_union)
+major_copy_or_mark_from_roots (size_t *old_next_pin_slot, gboolean finish_up_concurrent_mark, gboolean scan_mod_union)
 {
        LOSObject *bigobj;
        TV_DECLARE (atv);
@@ -2593,7 +2575,7 @@ major_copy_or_mark_from_roots (int *old_next_pin_slot, gboolean finish_up_concur
        /* identify possible pointers to the insize of large objects */
        SGEN_LOG (6, "Pinning from large objects");
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next) {
-               int dummy;
+               size_t dummy;
                if (sgen_find_optimized_pin_queue_area (bigobj->data, (char*)bigobj->data + sgen_los_object_size (bigobj), &dummy)) {
                        binary_protocol_pin (bigobj->data, (gpointer)LOAD_VTABLE (bigobj->data), safe_object_get_size (((MonoObject*)(bigobj->data))));
 
@@ -2660,8 +2642,8 @@ major_copy_or_mark_from_roots (int *old_next_pin_slot, gboolean finish_up_concur
 
        TV_GETTIME (btv);
        time_major_pinning += TV_ELAPSED (atv, btv);
-       SGEN_LOG (2, "Finding pinned pointers: %d in %d usecs", sgen_get_pinned_count (), TV_ELAPSED (atv, btv));
-       SGEN_LOG (4, "Start scan with %d pinned objects", sgen_get_pinned_count ());
+       SGEN_LOG (2, "Finding pinned pointers: %zd in %d usecs", sgen_get_pinned_count (), TV_ELAPSED (atv, btv));
+       SGEN_LOG (4, "Start scan with %zd pinned objects", sgen_get_pinned_count ());
 
        major_collector.init_to_space ();
 
@@ -2750,10 +2732,10 @@ major_copy_or_mark_from_roots (int *old_next_pin_slot, gboolean finish_up_concur
 }
 
 static void
-major_start_collection (gboolean concurrent, int *old_next_pin_slot)
+major_start_collection (gboolean concurrent, size_t *old_next_pin_slot)
 {
        MONO_GC_BEGIN (GENERATION_OLD);
-       binary_protocol_collection_begin (stat_major_gcs, GENERATION_OLD);
+       binary_protocol_collection_begin (gc_stats.major_gc_count, GENERATION_OLD);
 
        current_collection_generation = GENERATION_OLD;
 #ifndef DISABLE_PERFCOUNTERS
@@ -2783,8 +2765,7 @@ major_start_collection (gboolean concurrent, int *old_next_pin_slot)
        check_scan_starts ();
 
        degraded_mode = 0;
-       SGEN_LOG (1, "Start major collection %d", stat_major_gcs);
-       stat_major_gcs++;
+       SGEN_LOG (1, "Start major collection %d", gc_stats.major_gc_count);
        gc_stats.major_gc_count ++;
 
        if (major_collector.start_major_collection)
@@ -2816,7 +2797,7 @@ join_workers (void)
 }
 
 static void
-major_finish_collection (const char *reason, int old_next_pin_slot, gboolean scan_mod_union)
+major_finish_collection (const char *reason, size_t old_next_pin_slot, gboolean scan_mod_union)
 {
        LOSObject *bigobj, *prevbo;
        TV_DECLARE (atv);
@@ -2943,7 +2924,7 @@ major_finish_collection (const char *reason, int old_next_pin_slot, gboolean sca
        time_major_fragment_creation += TV_ELAPSED (btv, atv);
 
        if (heap_dump_file)
-               dump_heap ("major", stat_major_gcs - 1, reason);
+               dump_heap ("major", gc_stats.major_gc_count - 1, reason);
 
        if (fin_ready_list || critical_fin_list) {
                SGEN_LOG (4, "Finalizer-thread wakeup: ready %d", num_ready_finalizers);
@@ -2969,7 +2950,7 @@ major_finish_collection (const char *reason, int old_next_pin_slot, gboolean sca
        //consistency_check ();
 
        MONO_GC_END (GENERATION_OLD);
-       binary_protocol_collection_end (stat_major_gcs - 1, GENERATION_OLD);
+       binary_protocol_collection_end (gc_stats.major_gc_count - 1, GENERATION_OLD);
 }
 
 static gboolean
@@ -2977,7 +2958,7 @@ major_do_collection (const char *reason)
 {
        TV_DECLARE (all_atv);
        TV_DECLARE (all_btv);
-       int old_next_pin_slot;
+       size_t old_next_pin_slot;
 
        if (disable_major_collections)
                return FALSE;
@@ -3224,7 +3205,7 @@ sgen_perform_collection (size_t requested_size, int generation_to_collect, const
        /* this also sets the proper pointers for the next allocation */
        if (generation_to_collect == GENERATION_NURSERY && !sgen_can_alloc_size (requested_size)) {
                /* TypeBuilder and MonoMethod are killing mcs with fragmentation */
-               SGEN_LOG (1, "nursery collection didn't find enough room for %zd alloc (%d pinned)", requested_size, sgen_get_pinned_count ());
+               SGEN_LOG (1, "nursery collection didn't find enough room for %zd alloc (%zd pinned)", requested_size, sgen_get_pinned_count ());
                sgen_dump_pin_queue ();
                degraded_mode = 1;
        }
@@ -3352,6 +3333,13 @@ has_critical_finalizer (MonoObject *obj)
        return mono_class_has_parent_fast (class, mono_defaults.critical_finalizer_object);
 }
 
+static gboolean
+is_finalization_aware (MonoObject *obj)
+{
+       MonoVTable *vt = ((MonoVTable*)LOAD_VTABLE (obj));
+       return (vt->gc_bits & SGEN_GC_BIT_FINALIZER_AWARE) == SGEN_GC_BIT_FINALIZER_AWARE;
+}
+
 void
 sgen_queue_finalization_entry (MonoObject *obj)
 {
@@ -3366,6 +3354,9 @@ sgen_queue_finalization_entry (MonoObject *obj)
                fin_ready_list = entry;
        }
 
+       if (fin_callbacks.object_queued_for_finalization && is_finalization_aware (obj))
+               fin_callbacks.object_queued_for_finalization (obj);
+
 #ifdef ENABLE_DTRACE
        if (G_UNLIKELY (MONO_GC_FINALIZE_ENQUEUE_ENABLED ())) {
                int gen = sgen_ptr_in_nursery (obj) ? GENERATION_NURSERY : GENERATION_OLD;
@@ -3703,9 +3694,9 @@ mono_gc_conservatively_scan_area (void *start, void *end)
 }
 
 void*
-mono_gc_scan_object (void *obj)
+mono_gc_scan_object (void *obj, void *gc_data)
 {
-       UserCopyOrMarkData *data = mono_native_tls_get_value (user_copy_or_mark_key);
+       UserCopyOrMarkData *data = gc_data;
        current_object_ops.copy_or_mark_object (&obj, data->queue);
        return obj;
 }
@@ -3734,12 +3725,10 @@ scan_thread_data (void *start_nursery, void *end_nursery, gboolean precise, Gray
                        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 ());
+               SGEN_LOG (3, "Scanning thread %p, range: %p-%p, size: %td, pinned=%zd", info, info->stack_start, info->stack_end, (char*)info->stack_end - (char*)info->stack_start, sgen_get_pinned_count ());
                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);
+                       gc_callbacks.thread_mark_func (info->runtime_data, info->stack_start, info->stack_end, precise, &data);
                } else if (!precise) {
                        if (!conservative_stack_mark) {
                                fprintf (stderr, "Precise stack mark not supported - disabling.\n");
@@ -3851,7 +3840,8 @@ sgen_thread_unregister (SgenThreadInfo *p)
        binary_protocol_thread_unregister ((gpointer)tid);
        SGEN_LOG (3, "unregister thread %p (%p)", p, (gpointer)tid);
 
-       mono_threads_add_joinable_thread ((gpointer)tid);
+       if (p->info.runtime_thread)
+               mono_threads_add_joinable_thread ((gpointer)tid);
 
        if (gc_callbacks.thread_detach_func) {
                gc_callbacks.thread_detach_func (p->runtime_data);
@@ -3923,6 +3913,7 @@ mono_gc_pthread_exit (void *retval)
 {
        mono_thread_info_detach ();
        pthread_exit (retval);
+       g_assert_not_reached ();
 }
 
 #endif /* USE_PTHREAD_INTERCEPT */
@@ -4305,8 +4296,8 @@ int
 mono_gc_collection_count (int generation)
 {
        if (generation == 0)
-               return stat_minor_gcs;
-       return stat_major_gcs;
+               return gc_stats.minor_gc_count;
+       return gc_stats.major_gc_count;
 }
 
 int64_t
@@ -4557,8 +4548,6 @@ mono_gc_base_init (void)
        LOCK_INIT (sgen_interruption_mutex);
        LOCK_INIT (pin_queue_mutex);
 
-       init_user_copy_or_mark_key ();
-
        if ((env = g_getenv (MONO_GC_PARAMS_NAME))) {
                opts = g_strsplit (env, ",", -1);
                for (ptr = opts; *ptr; ++ptr) {
@@ -4750,13 +4739,13 @@ mono_gc_base_init (void)
 
                                        if (val < SGEN_MAX_NURSERY_WASTE) {
                                                sgen_env_var_error (MONO_GC_PARAMS_NAME, "Using default value.",
-                                                               "`nursery-size` must be at least %d bytes.\n", SGEN_MAX_NURSERY_WASTE);
+                                                               "`nursery-size` must be at least %d bytes.", SGEN_MAX_NURSERY_WASTE);
                                                continue;
                                        }
 
                                        sgen_nursery_size = val;
                                        sgen_nursery_bits = 0;
-                                       while (1 << (++ sgen_nursery_bits) != sgen_nursery_size)
+                                       while (ONE_P << (++ sgen_nursery_bits) != sgen_nursery_size)
                                                ;
 #else
                                        sgen_nursery_size = val;
@@ -4933,6 +4922,10 @@ mono_gc_base_init (void)
                                nursery_clear_policy = CLEAR_AT_GC;
                        } else if (!strcmp (opt, "clear-nursery-at-gc")) {
                                nursery_clear_policy = CLEAR_AT_GC;
+                       } else if (!strcmp (opt, "clear-at-tlab-creation")) {
+                               nursery_clear_policy = CLEAR_AT_TLAB_CREATION;
+                       } else if (!strcmp (opt, "debug-clear-at-tlab-creation")) {
+                               nursery_clear_policy = CLEAR_AT_TLAB_CREATION_DEBUG;
                        } else if (!strcmp (opt, "check-scan-starts")) {
                                do_scan_starts_check = TRUE;
                        } else if (!strcmp (opt, "verify-nursery-at-minor-gc")) {
@@ -4961,7 +4954,16 @@ mono_gc_base_init (void)
                                }
                        } else if (g_str_has_prefix (opt, "binary-protocol=")) {
                                char *filename = strchr (opt, '=') + 1;
-                               binary_protocol_init (filename);
+                               char *colon = strrchr (filename, ':');
+                               size_t limit = -1;
+                               if (colon) {
+                                       if (!mono_gc_parse_environment_string_extract_number (colon + 1, &limit)) {
+                                               sgen_env_var_error (MONO_GC_DEBUG_NAME, "Ignoring limit.", "Binary protocol file size limit must be an integer.");
+                                               limit = -1;
+                                       }
+                                       *colon = '\0';
+                               }
+                               binary_protocol_init (filename, (long long)limit);
                        } else if (!sgen_bridge_handle_gc_debug (opt)) {
                                sgen_env_var_error (MONO_GC_DEBUG_NAME, "Ignoring.", "Unknown option `%s`.", opt);
 
@@ -4982,14 +4984,15 @@ mono_gc_base_init (void)
                                fprintf (stderr, "  disable-major\n");
                                fprintf (stderr, "  xdomain-checks\n");
                                fprintf (stderr, "  check-concurrent\n");
-                               fprintf (stderr, "  clear-at-gc\n");
-                               fprintf (stderr, "  clear-nursery-at-gc\n");
+                               fprintf (stderr, "  clear-[nursery-]at-gc\n");
+                               fprintf (stderr, "  clear-at-tlab-creation\n");
+                               fprintf (stderr, "  debug-clear-at-tlab-creation\n");
                                fprintf (stderr, "  check-scan-starts\n");
                                fprintf (stderr, "  no-managed-allocator\n");
                                fprintf (stderr, "  print-allowance\n");
                                fprintf (stderr, "  print-pinning\n");
                                fprintf (stderr, "  heap-dump=<filename>\n");
-                               fprintf (stderr, "  binary-protocol=<filename>\n");
+                               fprintf (stderr, "  binary-protocol=<filename>[:<file-size-limit>]\n");
                                sgen_bridge_print_gc_debug_usage ();
                                fprintf (stderr, "\n");
 
@@ -5058,7 +5061,7 @@ emit_nursery_check (MonoMethodBuilder *mb, int *nursery_check_return_labels)
        mono_mb_emit_ldarg (mb, 0);
        mono_mb_emit_icon (mb, DEFAULT_NURSERY_BITS);
        mono_mb_emit_byte (mb, CEE_SHR_UN);
-       mono_mb_emit_icon (mb, (mword)sgen_get_nursery_start () >> DEFAULT_NURSERY_BITS);
+       mono_mb_emit_ptr (mb, (gpointer)((mword)sgen_get_nursery_start () >> DEFAULT_NURSERY_BITS));
        nursery_check_return_labels [0] = mono_mb_emit_branch (mb, CEE_BEQ);
 
        if (!major_collector.is_concurrent) {
@@ -5067,7 +5070,7 @@ emit_nursery_check (MonoMethodBuilder *mb, int *nursery_check_return_labels)
                mono_mb_emit_byte (mb, CEE_LDIND_I);
                mono_mb_emit_icon (mb, DEFAULT_NURSERY_BITS);
                mono_mb_emit_byte (mb, CEE_SHR_UN);
-               mono_mb_emit_icon (mb, (mword)sgen_get_nursery_start () >> DEFAULT_NURSERY_BITS);
+               mono_mb_emit_ptr (mb, (gpointer)((mword)sgen_get_nursery_start () >> DEFAULT_NURSERY_BITS));
                nursery_check_return_labels [1] = mono_mb_emit_branch (mb, CEE_BNE_UN);
        }
 #else
@@ -5320,17 +5323,24 @@ sgen_get_remset (void)
 guint
 mono_gc_get_vtable_bits (MonoClass *class)
 {
+       guint res = 0;
        /* FIXME move this to the bridge code */
-       if (!sgen_need_bridge_processing ())
-               return 0;
-       switch (sgen_bridge_class_kind (class)) {
-       case GC_BRIDGE_TRANSPARENT_BRIDGE_CLASS:
-       case GC_BRIDGE_OPAQUE_BRIDGE_CLASS:
-               return SGEN_GC_BIT_BRIDGE_OBJECT;
-       case GC_BRIDGE_OPAQUE_CLASS:
-               return SGEN_GC_BIT_BRIDGE_OPAQUE_OBJECT;
+       if (sgen_need_bridge_processing ()) {
+               switch (sgen_bridge_class_kind (class)) {
+               case GC_BRIDGE_TRANSPARENT_BRIDGE_CLASS:
+               case GC_BRIDGE_OPAQUE_BRIDGE_CLASS:
+                       res = SGEN_GC_BIT_BRIDGE_OBJECT;
+                       break;
+               case GC_BRIDGE_OPAQUE_CLASS:
+                       res = SGEN_GC_BIT_BRIDGE_OPAQUE_OBJECT;
+                       break;
+               }
        }
-       return 0;
+       if (fin_callbacks.is_class_finalization_aware) {
+               if (fin_callbacks.is_class_finalization_aware (class))
+                       res |= SGEN_GC_BIT_FINALIZER_AWARE;
+       }
+       return res;
 }
 
 void
@@ -5366,4 +5376,13 @@ sgen_timestamp (void)
        return SGEN_TV_ELAPSED (sgen_init_timestamp, timestamp);
 }
 
+void
+mono_gc_register_finalizer_callbacks (MonoGCFinalizerCallbacks *callbacks)
+{
+       if (callbacks->version != MONO_GC_FINALIZER_EXTENSION_VERSION)
+               g_error ("Invalid finalizer callback version. Expected %d but got %d\n", MONO_GC_FINALIZER_EXTENSION_VERSION, callbacks->version);
+
+       fin_callbacks = *callbacks;
+}
+
 #endif /* HAVE_SGEN_GC */
index 7008cec2f7475c84ba284b327249a739a113d631..41a7151ba298036f67ae16c4dfedf13d0f0089ff 100644 (file)
@@ -49,6 +49,7 @@ typedef struct _SgenThreadInfo SgenThreadInfo;
 #include <mono/metadata/sgen-gray.h>
 #include <mono/metadata/sgen-hash-table.h>
 #include <mono/metadata/sgen-bridge.h>
+#include <mono/metadata/sgen-protocol.h>
 
 /* The method used to clear the nursery */
 /* Clearing at nursery collections is the safest, but has bad interactions with caches.
@@ -57,7 +58,8 @@ typedef struct _SgenThreadInfo SgenThreadInfo;
  */
 typedef enum {
        CLEAR_AT_GC,
-       CLEAR_AT_TLAB_CREATION
+       CLEAR_AT_TLAB_CREATION,
+       CLEAR_AT_TLAB_CREATION_DEBUG
 } NurseryClearPolicy;
 
 NurseryClearPolicy sgen_get_nursery_clear_policy (void) MONO_INTERNAL;
@@ -143,7 +145,7 @@ struct _GCMemSection {
        char **scan_starts;
        /* in major collections indexes in the pin_queue for objects that pin this section */
        void **pin_queue_start;
-       int pin_queue_num_entries;
+       size_t pin_queue_num_entries;
        size_t num_scan_start;
 };
 
@@ -239,13 +241,19 @@ extern int num_ready_finalizers;
 #define SGEN_CAN_ALIGN_UP(s)           ((s) <= SIZE_MAX - (SGEN_ALLOC_ALIGN - 1))
 #define SGEN_ALIGN_UP(s)               (((s)+(SGEN_ALLOC_ALIGN-1)) & ~(SGEN_ALLOC_ALIGN-1))
 
+#if SIZEOF_VOID_P == 4
+#define ONE_P 1
+#else
+#define ONE_P 1ll
+#endif
+
 /*
  * The link pointer is hidden by negating each bit.  We use the lowest
  * bit of the link (before negation) to store whether it needs
  * resurrection tracking.
  */
-#define HIDE_POINTER(p,t)      ((gpointer)(~((gulong)(p)|((t)?1:0))))
-#define REVEAL_POINTER(p)      ((gpointer)((~(gulong)(p))&~3L))
+#define HIDE_POINTER(p,t)      ((gpointer)(~((size_t)(p)|((t)?1:0))))
+#define REVEAL_POINTER(p)      ((gpointer)((~(size_t)(p))&~3L))
 
 #ifdef SGEN_ALIGN_NURSERY
 #define SGEN_PTR_IN_NURSERY(p,bits,start,end)  (((mword)(p) & ~((1 << (bits)) - 1)) == (mword)(start))
@@ -340,26 +348,52 @@ typedef struct {
  */
 #define SGEN_LOAD_VTABLE(addr) ((*(mword*)(addr)) & ~SGEN_VTABLE_BITS_MASK)
 
+static inline MONO_ALWAYS_INLINE void
+GRAY_OBJECT_ENQUEUE (SgenGrayQueue *queue, char* obj)
+{
 #if defined(SGEN_GRAY_OBJECT_ENQUEUE) || SGEN_MAX_DEBUG_LEVEL >= 9
-#define GRAY_OBJECT_ENQUEUE sgen_gray_object_enqueue
-#define GRAY_OBJECT_DEQUEUE(queue,o) ((o) = sgen_gray_object_dequeue ((queue)))
+       sgen_gray_object_enqueue (queue, obj);
 #else
-#define GRAY_OBJECT_ENQUEUE(queue,o) do {                              \
-               if (G_UNLIKELY (!(queue)->first || (queue)->first->end == SGEN_GRAY_QUEUE_SECTION_SIZE)) \
-                       sgen_gray_object_enqueue ((queue), (o));        \
-               else                                                    \
-                       (queue)->first->objects [(queue)->first->end++] = (o); \
-               PREFETCH ((o));                                         \
-       } while (0)
-#define GRAY_OBJECT_DEQUEUE(queue,o) do {                              \
-               if (!(queue)->first)                                    \
-                       (o) = NULL;                                     \
-               else if (G_UNLIKELY ((queue)->first->end == 1))         \
-                       (o) = sgen_gray_object_dequeue ((queue));               \
-               else                                                    \
-                       (o) = (queue)->first->objects [--(queue)->first->end]; \
-       } while (0)
+       if (G_UNLIKELY (!queue->first || queue->cursor == GRAY_LAST_CURSOR_POSITION (queue->first))) {
+               sgen_gray_object_enqueue (queue, obj);
+       } else {
+               HEAVY_STAT (gc_stats.gray_queue_enqueue_fast_path ++);
+
+               *++queue->cursor = obj;
+#ifdef SGEN_HEAVY_BINARY_PROTOCOL
+               binary_protocol_gray_enqueue (queue, queue->cursor, obj);
+#endif
+       }
+
+       PREFETCH (obj);
 #endif
+}
+
+static inline MONO_ALWAYS_INLINE void
+GRAY_OBJECT_DEQUEUE (SgenGrayQueue *queue, char** obj)
+{
+#if defined(SGEN_GRAY_OBJECT_ENQUEUE) || SGEN_MAX_DEBUG_LEVEL >= 9
+       *obj = sgen_gray_object_enqueue (queue);
+#else
+       if (!queue->first) {
+               HEAVY_STAT (gc_stats.gray_queue_dequeue_fast_path ++);
+
+               *obj = NULL;
+#ifdef SGEN_HEAVY_BINARY_PROTOCOL
+               binary_protocol_gray_dequeue (queue, queue->cursor, *obj);
+#endif
+       } else if (G_UNLIKELY (queue->cursor == GRAY_FIRST_CURSOR_POSITION (queue->first))) {
+               *obj = sgen_gray_object_dequeue (queue);
+       } else {
+               HEAVY_STAT (gc_stats.gray_queue_dequeue_fast_path ++);
+
+               *obj = *queue->cursor--;
+#ifdef SGEN_HEAVY_BINARY_PROTOCOL
+               binary_protocol_gray_dequeue (queue, queue->cursor + 1, *obj);
+#endif
+       }
+#endif
+}
 
 /*
 List of what each bit on of the vtable gc bits means. 
@@ -367,6 +401,7 @@ List of what each bit on of the vtable gc bits means.
 enum {
        SGEN_GC_BIT_BRIDGE_OBJECT = 1,
        SGEN_GC_BIT_BRIDGE_OPAQUE_OBJECT = 2,
+       SGEN_GC_BIT_FINALIZER_AWARE = 4,
 };
 
 /* the runtime can register areas of memory as roots: we keep two lists of roots,
@@ -490,7 +525,7 @@ void sgen_free_internal (void *addr, int type) MONO_INTERNAL;
 void* sgen_alloc_internal_dynamic (size_t size, int type, gboolean assert_on_failure) MONO_INTERNAL;
 void sgen_free_internal_dynamic (void *addr, size_t size, int type) MONO_INTERNAL;
 
-void** sgen_find_optimized_pin_queue_area (void *start, void *end, int *num) MONO_INTERNAL;
+void** sgen_find_optimized_pin_queue_area (void *start, void *end, size_t *num) MONO_INTERNAL;
 void sgen_find_section_pin_queue_start_end (GCMemSection *section) MONO_INTERNAL;
 void sgen_pin_objects_in_section (GCMemSection *section, ScanCopyContext ctx) MONO_INTERNAL;
 
@@ -498,7 +533,7 @@ void sgen_pin_stats_register_object (char *obj, size_t size);
 void sgen_pin_stats_register_global_remset (char *obj);
 void sgen_pin_stats_print_class_stats (void);
 
-void sgen_sort_addresses (void **array, int size) MONO_INTERNAL;
+void sgen_sort_addresses (void **array, size_t size) MONO_INTERNAL;
 void sgen_add_to_global_remset (gpointer ptr, gpointer obj) MONO_INTERNAL;
 
 int sgen_get_current_collection_generation (void) MONO_INTERNAL;
@@ -559,14 +594,14 @@ Test 1 (compiling corlib):
 #define SGEN_TO_SPACE_GRANULE_IN_BYTES (1 << SGEN_TO_SPACE_GRANULE_BITS)
 
 extern char *sgen_space_bitmap MONO_INTERNAL;
-extern int sgen_space_bitmap_size MONO_INTERNAL;
+extern size_t sgen_space_bitmap_size MONO_INTERNAL;
 
 static inline gboolean
 sgen_nursery_is_to_space (char *object)
 {
-       int idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
-       int byte = idx / 8;
-       int bit = idx & 0x7;
+       size_t idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
+       size_t byte = idx / 8;
+       size_t bit = idx & 0x7;
 
        SGEN_ASSERT (4, sgen_ptr_in_nursery (object), "object %p is not in nursery [%p - %p]", object, sgen_get_nursery_start (), sgen_get_nursery_end ());
        SGEN_ASSERT (4, byte < sgen_space_bitmap_size, "byte index %d out of range", byte, sgen_space_bitmap_size);
@@ -604,7 +639,7 @@ typedef struct {
        SgenObjectOperations serial_ops;
        SgenObjectOperations parallel_ops;
 
-       void (*prepare_to_space) (char *to_space_bitmap, int space_bitmap_size);
+       void (*prepare_to_space) (char *to_space_bitmap, size_t space_bitmap_size);
        void (*clear_fragments) (void);
        SgenFragment* (*build_fragments_get_exclude_head) (void);
        void (*build_fragments_release_exclude_head) (void);
@@ -661,8 +696,8 @@ struct _SgenMajorCollector {
        SgenObjectOperations major_ops;
        SgenObjectOperations major_concurrent_ops;
 
-       void* (*alloc_object) (MonoVTable *vtable, int size, gboolean has_references);
-       void* (*par_alloc_object) (MonoVTable *vtable, int size, gboolean has_references);
+       void* (*alloc_object) (MonoVTable *vtable, size_t size, gboolean has_references);
+       void* (*par_alloc_object) (MonoVTable *vtable, size_t size, gboolean has_references);
        void (*free_pinned_object) (char *obj, size_t size);
        void (*iterate_objects) (IterateObjectsFlags flags, IterateObjectCallbackFunc callback, void *data);
        void (*free_non_pinned_object) (char *obj, size_t size);
@@ -685,7 +720,7 @@ struct _SgenMajorCollector {
        gboolean (*ptr_is_in_non_pinned_space) (char *ptr, char **start);
        gboolean (*obj_is_from_pinned_alloc) (char *obj);
        void (*report_pinned_memory_usage) (void);
-       int (*get_num_major_sections) (void);
+       size_t (*get_num_major_sections) (void);
        gboolean (*handle_gc_param) (const char *opt);
        void (*print_gc_param_usage) (void);
        gboolean (*is_worker_thread) (MonoNativeThreadId thread);
@@ -710,7 +745,7 @@ void sgen_marksweep_conc_init (SgenMajorCollector *collector) MONO_INTERNAL;
 SgenMajorCollector* sgen_get_major_collector (void) MONO_INTERNAL;
 
 
-typedef struct {
+typedef struct _SgenRemeberedSet {
        void (*wbarrier_set_field) (MonoObject *obj, gpointer field_ptr, MonoObject* value);
        void (*wbarrier_set_arrayref) (MonoArray *arr, gpointer slot_ptr, MonoObject* value);
        void (*wbarrier_arrayref_copy) (gpointer dest_ptr, gpointer src_ptr, int count);
@@ -730,7 +765,7 @@ typedef struct {
 
 SgenRemeberedSet *sgen_get_remset (void) MONO_INTERNAL;
 
-static guint /*__attribute__((noinline)) not sure if this hint is a good idea*/
+static mword /*__attribute__((noinline)) not sure if this hint is a good idea*/
 slow_object_get_size (MonoVTable *vtable, MonoObject* o)
 {
        MonoClass *klass = vtable->klass;
@@ -761,7 +796,7 @@ slow_object_get_size (MonoVTable *vtable, MonoObject* o)
  * vtable field, is not intact.  This is necessary for the parallel
  * collector.
  */
-static inline guint
+static inline mword
 sgen_par_object_get_size (MonoVTable *vtable, MonoObject* o)
 {
        mword descr = (mword)vtable->gc_descr;
@@ -788,7 +823,7 @@ sgen_par_object_get_size (MonoVTable *vtable, MonoObject* o)
        return slow_object_get_size (vtable, o);
 }
 
-static inline guint
+static inline mword
 sgen_safe_object_get_size (MonoObject *obj)
 {
        char *forwarded;
@@ -811,7 +846,7 @@ void sgen_bridge_processing_stw_step (void) MONO_INTERNAL;
 void sgen_bridge_processing_finish (int generation) MONO_INTERNAL;
 void sgen_register_test_bridge_callbacks (const char *bridge_class_name) MONO_INTERNAL;
 gboolean sgen_is_bridge_object (MonoObject *obj) MONO_INTERNAL;
-MonoGCBridgeObjectKind sgen_bridge_class_kind (MonoClass *class) MONO_INTERNAL;
+MonoGCBridgeObjectKind sgen_bridge_class_kind (MonoClass *klass) MONO_INTERNAL;
 void sgen_mark_bridge_object (MonoObject *obj) MONO_INTERNAL;
 void sgen_bridge_register_finalized_object (MonoObject *object) MONO_INTERNAL;
 void sgen_bridge_describe_pointer (MonoObject *object) MONO_INTERNAL;
@@ -923,8 +958,6 @@ struct _LOSObject {
        char data [MONO_ZERO_LEN_ARRAY];
 };
 
-#define ARRAY_OBJ_INDEX(ptr,array,elem_size) (((char*)(ptr) - ((char*)(array) + G_STRUCT_OFFSET (MonoArray, vector))) / (elem_size))
-
 extern LOSObject *los_object_list;
 extern mword los_memory_usage;
 
@@ -952,7 +985,7 @@ gboolean sgen_los_object_is_pinned (char *obj) MONO_INTERNAL;
 void sgen_clear_nursery_fragments (void) MONO_INTERNAL;
 void sgen_nursery_allocator_prepare_for_pinning (void) MONO_INTERNAL;
 void sgen_nursery_allocator_set_nursery_bounds (char *nursery_start, char *nursery_end) MONO_INTERNAL;
-mword sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, int num_entries, SgenGrayQueue *unpin_queue) MONO_INTERNAL;
+mword sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, size_t num_entries, SgenGrayQueue *unpin_queue) MONO_INTERNAL;
 void sgen_init_nursery_allocator (void) MONO_INTERNAL;
 void sgen_nursery_allocator_init_heavy_stats (void) MONO_INTERNAL;
 void sgen_alloc_init_heavy_stats (void) MONO_INTERNAL;
@@ -1005,24 +1038,43 @@ extern __thread char *stack_end;
 #endif
 
 #ifdef HAVE_KW_THREAD
-#define EMIT_TLS_ACCESS(mb,member,key) do {    \
+
+#define EMIT_TLS_ACCESS_NEXT_ADDR(mb)  do {    \
        mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX);   \
        mono_mb_emit_byte ((mb), CEE_MONO_TLS);         \
-       mono_mb_emit_i4 ((mb), (key));          \
+       mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_TLAB_NEXT_ADDR);            \
        } while (0)
+
+#define EMIT_TLS_ACCESS_TEMP_END(mb)   do {    \
+       mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX);   \
+       mono_mb_emit_byte ((mb), CEE_MONO_TLS);         \
+       mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_TLAB_TEMP_END);             \
+       } while (0)
+
 #else
 
 #if defined(__APPLE__) || defined (HOST_WIN32)
-#define EMIT_TLS_ACCESS(mb,member,key) do {    \
+#define EMIT_TLS_ACCESS_NEXT_ADDR(mb)  do {    \
+       mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX);   \
+       mono_mb_emit_byte ((mb), CEE_MONO_TLS);         \
+       mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_THREAD_INFO);       \
+       mono_mb_emit_icon ((mb), MONO_STRUCT_OFFSET (SgenThreadInfo, tlab_next_addr));  \
+       mono_mb_emit_byte ((mb), CEE_ADD);              \
+       mono_mb_emit_byte ((mb), CEE_LDIND_I);          \
+       } while (0)
+
+#define EMIT_TLS_ACCESS_TEMP_END(mb)   do {    \
        mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX);   \
        mono_mb_emit_byte ((mb), CEE_MONO_TLS);         \
        mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_THREAD_INFO);       \
-       mono_mb_emit_icon ((mb), G_STRUCT_OFFSET (SgenThreadInfo, member));     \
+       mono_mb_emit_icon ((mb), MONO_STRUCT_OFFSET (SgenThreadInfo, tlab_temp_end));   \
        mono_mb_emit_byte ((mb), CEE_ADD);              \
        mono_mb_emit_byte ((mb), CEE_LDIND_I);          \
        } while (0)
+
 #else
-#define EMIT_TLS_ACCESS(mb,member,key) do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0)
+#define EMIT_TLS_ACCESS_NEXT_ADDR(mb)  do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0)
+#define EMIT_TLS_ACCESS_TEMP_END(mb)   do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0)
 #endif
 
 #endif
@@ -1030,11 +1082,10 @@ extern __thread char *stack_end;
 /* Other globals */
 
 extern GCMemSection *nursery_section;
-extern int stat_major_gcs;
 extern guint32 collect_before_allocs;
 extern guint32 verify_before_allocs;
 extern gboolean has_per_allocation_action;
-extern int degraded_mode;
+extern size_t degraded_mode;
 extern int default_nursery_size;
 extern guint32 tlab_size;
 extern NurseryClearPolicy nursery_clear_policy;
@@ -1049,7 +1100,7 @@ extern int do_pin_stats;
 static inline void
 sgen_set_nursery_scan_start (char *p)
 {
-       int idx = (p - (char*)nursery_section->data) / SGEN_SCAN_START_SIZE;
+       size_t idx = (p - (char*)nursery_section->data) / SGEN_SCAN_START_SIZE;
        char *old = nursery_section->scan_starts [idx];
        if (!old || old > p)
                nursery_section->scan_starts [idx] = p;
@@ -1097,10 +1148,8 @@ sgen_dummy_use (gpointer v) {
 #if defined(__GNUC__)
        __asm__ volatile ("" : "=r"(v) : "r"(v));
 #elif defined(_MSC_VER)
-       __asm {
-               mov eax, v;
-               and eax, eax;
-       };
+       static volatile gpointer ptr;
+       ptr = v;
 #else
 #error "Implement sgen_dummy_use for your compiler"
 #endif
index e2a7d6012270562ef163e4ee985a8a3e90a01b45..2393cbabb147b679a2b177e9d7b149052f8389da 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "metadata/sgen-gc.h"
 #include "utils/mono-counters.h"
+#include "sgen-protocol.h"
 
 #define GRAY_QUEUE_LENGTH_LIMIT        64
 
@@ -45,6 +46,8 @@ sgen_gray_object_alloc_queue_section (SgenGrayQueue *queue)
 {
        GrayQueueSection *section;
 
+       HEAVY_STAT (gc_stats.gray_queue_section_alloc ++);
+
        if (queue->alloc_prepare_func)
                queue->alloc_prepare_func (queue);
 
@@ -59,18 +62,21 @@ sgen_gray_object_alloc_queue_section (SgenGrayQueue *queue)
                STATE_SET (section, GRAY_QUEUE_SECTION_STATE_FLOATING);
        }
 
-       section->end = 0;
+       section->size = SGEN_GRAY_QUEUE_SECTION_SIZE;
 
        STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_FLOATING, GRAY_QUEUE_SECTION_STATE_ENQUEUED);
 
        /* Link it with the others */
        section->next = queue->first;
        queue->first = section;
+       queue->cursor = (char**)section->objects - 1;
 }
 
 void
 sgen_gray_object_free_queue_section (GrayQueueSection *section)
 {
+       HEAVY_STAT (gc_stats.gray_queue_section_free ++);
+
        STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_FLOATING, GRAY_QUEUE_SECTION_STATE_FREED);
        sgen_free_internal (section, INTERNAL_MEM_GRAY_QUEUE);
 }
@@ -84,6 +90,8 @@ sgen_gray_object_free_queue_section (GrayQueueSection *section)
 void
 sgen_gray_object_enqueue (SgenGrayQueue *queue, char *obj)
 {
+       HEAVY_STAT (gc_stats.gray_queue_enqueue_slow_path ++);
+
        SGEN_ASSERT (9, obj, "enqueueing a null object");
        //sgen_check_objref (obj);
 
@@ -92,11 +100,21 @@ sgen_gray_object_enqueue (SgenGrayQueue *queue, char *obj)
                queue->enqueue_check_func (obj);
 #endif
 
-       if (G_UNLIKELY (!queue->first || queue->first->end == SGEN_GRAY_QUEUE_SECTION_SIZE))
+       if (G_UNLIKELY (!queue->first || queue->cursor == GRAY_LAST_CURSOR_POSITION (queue->first))) {
+               if (queue->first) {
+                       /* Set the current section size back to default, might have been changed by sgen_gray_object_dequeue_section */
+                       queue->first->size = SGEN_GRAY_QUEUE_SECTION_SIZE;
+               }
+
                sgen_gray_object_alloc_queue_section (queue);
+       }
        STATE_ASSERT (queue->first, GRAY_QUEUE_SECTION_STATE_ENQUEUED);
-       SGEN_ASSERT (9, queue->first->end < SGEN_GRAY_QUEUE_SECTION_SIZE, "gray queue %p overflow, first %p, end %d", queue, queue->first, queue->first->end);
-       queue->first->objects [queue->first->end++] = obj;
+       SGEN_ASSERT (9, queue->cursor <= GRAY_LAST_CURSOR_POSITION (queue->first), "gray queue %p overflow, first %p, cursor %p", queue, queue->first, queue->cursor);
+       *++queue->cursor = obj;
+
+#ifdef SGEN_HEAVY_BINARY_PROTOCOL
+       binary_protocol_gray_enqueue (queue, queue->cursor, obj);
+#endif
 }
 
 char*
@@ -104,15 +122,21 @@ sgen_gray_object_dequeue (SgenGrayQueue *queue)
 {
        char *obj;
 
+       HEAVY_STAT (gc_stats.gray_queue_dequeue_slow_path ++);
+
        if (sgen_gray_object_queue_is_empty (queue))
                return NULL;
 
        STATE_ASSERT (queue->first, GRAY_QUEUE_SECTION_STATE_ENQUEUED);
-       SGEN_ASSERT (9, queue->first->end, "gray queue %p underflow, first %p, end %d", queue, queue->first, queue->first->end);
+       SGEN_ASSERT (9, queue->cursor >= (char**)queue->first->objects, "gray queue %p underflow, first %p, cursor %d", queue, queue->first, queue->cursor);
+
+       obj = *queue->cursor--;
 
-       obj = queue->first->objects [--queue->first->end];
+#ifdef SGEN_HEAVY_BINARY_PROTOCOL
+       binary_protocol_gray_dequeue (queue, queue->cursor + 1, obj);
+#endif
 
-       if (G_UNLIKELY (queue->first->end == 0)) {
+       if (G_UNLIKELY (queue->cursor == (char**)queue->first->objects - 1)) {
                GrayQueueSection *section = queue->first;
                queue->first = section->next;
                section->next = queue->free_list;
@@ -120,6 +144,7 @@ sgen_gray_object_dequeue (SgenGrayQueue *queue)
                STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_ENQUEUED, GRAY_QUEUE_SECTION_STATE_FREE_LIST);
 
                queue->free_list = section;
+               queue->cursor = queue->first ? (char**)queue->first->objects + queue->first->size - 1 : NULL;
        }
 
        return obj;
@@ -137,6 +162,9 @@ sgen_gray_object_dequeue_section (SgenGrayQueue *queue)
        queue->first = section->next;
 
        section->next = NULL;
+       section->size = queue->cursor - (char**)section->objects + 1;
+
+       queue->cursor = queue->first ? (char**)queue->first->objects + queue->first->size - 1 : NULL;
 
        STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_ENQUEUED, GRAY_QUEUE_SECTION_STATE_FLOATING);
 
@@ -148,12 +176,16 @@ sgen_gray_object_enqueue_section (SgenGrayQueue *queue, GrayQueueSection *sectio
 {
        STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_FLOATING, GRAY_QUEUE_SECTION_STATE_ENQUEUED);
 
+       if (queue->first)
+               queue->first->size = queue->cursor - (char**)queue->first->objects + 1;
+
        section->next = queue->first;
        queue->first = section;
+       queue->cursor = (char**)queue->first->objects + queue->first->size - 1;
 #ifdef SGEN_CHECK_GRAY_OBJECT_ENQUEUE
        if (queue->enqueue_check_func) {
                int i;
-               for (i = 0; i < section->end; ++i)
+               for (i = 0; i < section->size; ++i)
                        queue->enqueue_check_func (section->objects [i]);
        }
 #endif
@@ -305,7 +337,7 @@ sgen_section_gray_queue_enqueue (SgenSectionGrayQueue *queue, GrayQueueSection *
 #ifdef SGEN_CHECK_GRAY_OBJECT_ENQUEUE
        if (queue->enqueue_check_func) {
                int i;
-               for (i = 0; i < section->end; ++i)
+               for (i = 0; i < section->size; ++i)
                        queue->enqueue_check_func (section->objects [i]);
        }
 #endif
index df22ec13eade55cc6395ce03b5754034d4094e5c..2dfea35a146438c13388f9b5dbbda59fc8d31861 100644 (file)
 #ifndef __MONO_SGEN_GRAY_H__
 #define __MONO_SGEN_GRAY_H__
 
+/*
+ * This gray queue has to be as optimized as possible, because it is in the core of
+ * the mark/copy phase of the garbage collector. The memory access has then to be as
+ * cache friendly as possible. That's why we use a cursor based implementation.
+ * 
+ * This simply consist in maintaining a pointer to the current element in the
+ * queue. In addition to using this cursor, we use a simple linked list of arrays,
+ * called sections, so that we have the cache friendliness of arrays without having
+ * the cost of memory reallocation of a dynaic array, not the cost of memory
+ * indirection of a linked list.
+ * 
+ * This implementation also allows the dequeuing of a whole section at a time. This is
+ * for example used in the parallel GC because it would be too costly to take one element 
+ * at a time. This imply the main constraint that, because we don't carry the cursor
+ * with the section, we still have to store the index of the last element. This is done 
+ * through the 'size' field on the section, which default value is it's maximum value
+ * SGEN_GRAY_QUEUE_SECTION_SIZE. This field is updated in multiple cases :
+ *  - section allocation : default value
+ *  - object push : default value if we fill the current queue first
+ *  - section dequeue : position of the cursor in the dequeued section
+ *  - section enqueue : position of the cursor in the previously first section in the queue
+ * 
+ * The previous implementation was an index based access where we would store the index
+ * of the last element in the section. This was less efficient because we would have
+ * to make 1 memory access for the index value, 1 for the base address of the objects
+ * array and another 1 for the actual value in the array.
+ */
+
 #define SGEN_GRAY_QUEUE_SECTION_SIZE   (128 - 3)
 
 #ifdef SGEN_CHECK_GRAY_OBJECT_SECTIONS
@@ -45,7 +73,7 @@ struct _GrayQueueSection {
        int dummy;
        GrayQueueSectionState state;
 #endif
-       int end;
+       int size;
        GrayQueueSection *next;
        char *objects [SGEN_GRAY_QUEUE_SECTION_SIZE];
 };
@@ -56,6 +84,7 @@ typedef void (*GrayQueueAllocPrepareFunc) (SgenGrayQueue*);
 typedef void (*GrayQueueEnqueueCheckFunc) (char*);
 
 struct _SgenGrayQueue {
+       char **cursor;
        GrayQueueSection *first;
        GrayQueueSection *free_list;
        GrayQueueAllocPrepareFunc alloc_prepare_func;
@@ -76,6 +105,9 @@ struct _SgenSectionGrayQueue {
 #endif
 };
 
+#define GRAY_LAST_CURSOR_POSITION(s) ((char**)(s)->objects + SGEN_GRAY_QUEUE_SECTION_SIZE - 1)
+#define GRAY_FIRST_CURSOR_POSITION(s) ((char**)(s)->objects)
+
 void sgen_gray_object_enqueue (SgenGrayQueue *queue, char *obj) MONO_INTERNAL;
 char* sgen_gray_object_dequeue (SgenGrayQueue *queue) MONO_INTERNAL;
 GrayQueueSection* sgen_gray_object_dequeue_section (SgenGrayQueue *queue) MONO_INTERNAL;
index c04da2545f5d69610fc4cc3195105c1cab3b9667..1e38006cac7e198d08b2b89bed5530f9ce236099 100644 (file)
@@ -67,7 +67,7 @@ struct _LOSFreeChunks {
 typedef struct _LOSSection LOSSection;
 struct _LOSSection {
        LOSSection *next;
-       int num_free_chunks;
+       size_t num_free_chunks;
        unsigned char *free_chunk_map;
 };
 
@@ -143,7 +143,7 @@ los_consistency_check (void)
 static void
 add_free_chunk (LOSFreeChunks *free_chunks, size_t size)
 {
-       int num_chunks = size >> LOS_CHUNK_BITS;
+       size_t num_chunks = size >> LOS_CHUNK_BITS;
 
        free_chunks->size = size;
 
@@ -158,7 +158,8 @@ get_from_size_list (LOSFreeChunks **list, size_t size)
 {
        LOSFreeChunks *free_chunks = NULL;
        LOSSection *section;
-       int num_chunks, i, start_index;
+       size_t i, num_chunks, start_index;
+
 
        g_assert ((size & (LOS_CHUNK_SIZE - 1)) == 0);
 
@@ -198,7 +199,7 @@ get_los_section_memory (size_t size)
 {
        LOSSection *section;
        LOSFreeChunks *free_chunks;
-       int num_chunks;
+       size_t num_chunks;
 
        size += LOS_CHUNK_SIZE - 1;
        size &= ~(LOS_CHUNK_SIZE - 1);
@@ -212,7 +213,7 @@ get_los_section_memory (size_t size)
        if (num_chunks >= LOS_NUM_FAST_SIZES) {
                free_chunks = get_from_size_list (&los_fast_free_lists [0], size);
        } else {
-               int i;
+               size_t i;
                for (i = num_chunks; i < LOS_NUM_FAST_SIZES; ++i) {
                        free_chunks = get_from_size_list (&los_fast_free_lists [i], size);
                        if (free_chunks)
@@ -257,7 +258,7 @@ static void
 free_los_section_memory (LOSObject *obj, size_t size)
 {
        LOSSection *section = LOS_SECTION_FOR_OBJ (obj);
-       int num_chunks, i, start_index;
+       size_t num_chunks, i, start_index;
 
        size += LOS_CHUNK_SIZE - 1;
        size &= ~(LOS_CHUNK_SIZE - 1);
index d409df5872006bf170475f5ee9b875a83e76e981..d3093385805edaa25a5ff909771384024d13818b 100755 (executable)
@@ -83,7 +83,7 @@ typedef struct _MSBlockInfo MSBlockInfo;
 struct _MSBlockInfo {
        int obj_size;
        int obj_size_index;
-       int pin_queue_num_entries;
+       size_t pin_queue_num_entries;
        unsigned int pinned : 1;
        unsigned int has_references : 1;
        unsigned int has_pinned : 1;    /* means cannot evacuate */
@@ -130,10 +130,12 @@ typedef struct {
 #define MS_BLOCK_FOR_OBJ(o)            (((MSBlockHeader*)MS_BLOCK_DATA_FOR_OBJ ((o)))->info)
 #endif
 
-#define MS_BLOCK_OBJ_INDEX(o,b)        (((char*)(o) - ((b)->block + MS_BLOCK_SKIP)) / (b)->obj_size)
+/* object index will always be small */
+#define MS_BLOCK_OBJ_INDEX(o,b)        ((int)(((char*)(o) - ((b)->block + MS_BLOCK_SKIP)) / (b)->obj_size))
 
+//casting to int is fine since blocks are 32k
 #define MS_CALC_MARK_BIT(w,b,o)        do {                            \
-               int i = ((char*)(o) - MS_BLOCK_DATA_FOR_OBJ ((o))) >> SGEN_ALLOC_ALIGN_BITS; \
+               int i = ((int)((char*)(o) - MS_BLOCK_DATA_FOR_OBJ ((o)))) >> SGEN_ALLOC_ALIGN_BITS; \
                if (sizeof (mword) == 4) {                              \
                        (w) = i >> 5;                                   \
                        (b) = i & 31;                                   \
@@ -143,11 +145,11 @@ typedef struct {
                }                                                       \
        } while (0)
 
-#define MS_MARK_BIT(bl,w,b)    ((bl)->mark_words [(w)] & (1L << (b)))
-#define MS_SET_MARK_BIT(bl,w,b)        ((bl)->mark_words [(w)] |= (1L << (b)))
+#define MS_MARK_BIT(bl,w,b)    ((bl)->mark_words [(w)] & (ONE_P << (b)))
+#define MS_SET_MARK_BIT(bl,w,b)        ((bl)->mark_words [(w)] |= (ONE_P << (b)))
 #define MS_PAR_SET_MARK_BIT(was_marked,bl,w,b) do {                    \
                mword __old = (bl)->mark_words [(w)];                   \
-               mword __bitmask = 1L << (b);                            \
+               mword __bitmask = ONE_P << (b);                         \
                if (__old & __bitmask) {                                \
                        was_marked = TRUE;                              \
                        break;                                          \
@@ -187,9 +189,9 @@ static LOCK_DECLARE (ms_block_list_mutex);
 #endif
 
 static gboolean *evacuate_block_obj_sizes;
-static float evacuation_threshold = 0.666;
+static float evacuation_threshold = 0.666f;
 #ifdef SGEN_HAVE_CONCURRENT_MARK
-static float concurrent_evacuation_threshold = 0.666;
+static float concurrent_evacuation_threshold = 0.666f;
 static gboolean want_evacuation = FALSE;
 #endif
 
@@ -209,13 +211,13 @@ static MSBlockInfo *empty_blocks = NULL;
 #else
 /* non-allocated block free-list */
 static void *empty_blocks = NULL;
-static int num_empty_blocks = 0;
+static size_t num_empty_blocks = 0;
 #endif
 
 #define FOREACH_BLOCK(bl)      for ((bl) = all_blocks; (bl); (bl) = (bl)->next) {
 #define END_FOREACH_BLOCK      }
 
-static int num_major_sections = 0;
+static size_t num_major_sections = 0;
 /* one free block list for each block object size */
 static MSBlockInfo **free_block_lists [MS_BLOCK_TYPE_MAX];
 
@@ -250,7 +252,7 @@ static void
 sweep_block (MSBlockInfo *block, gboolean during_major_collection);
 
 static int
-ms_find_block_obj_size_index (int size)
+ms_find_block_obj_size_index (size_t size)
 {
        int i;
        SGEN_ASSERT (9, size <= SGEN_MAX_SMALL_OBJ_SIZE, "size %d is bigger than max small object size %d", size, SGEN_MAX_SMALL_OBJ_SIZE);
@@ -397,7 +399,7 @@ ms_get_empty_block (void)
                        p += MS_BLOCK_SIZE;
                }
 
-               SGEN_ATOMIC_ADD (num_empty_blocks, alloc_num);
+               SGEN_ATOMIC_ADD_P (num_empty_blocks, alloc_num);
 
                stat_major_blocks_alloced += alloc_num;
 #if SIZEOF_VOID_P != 8
@@ -414,7 +416,7 @@ ms_get_empty_block (void)
                next = *(void**)block;
        } while (SGEN_CAS_PTR (&empty_blocks, next, empty) != empty);
 
-       SGEN_ATOMIC_ADD (num_empty_blocks, -1);
+       SGEN_ATOMIC_ADD_P (num_empty_blocks, -1);
 
        *(void**)block = NULL;
 
@@ -436,7 +438,7 @@ ms_free_block (void *block)
                *(void**)block = empty;
        } while (SGEN_CAS_PTR (&empty_blocks, block, empty) != empty);
 
-       SGEN_ATOMIC_ADD (num_empty_blocks, 1);
+       SGEN_ATOMIC_ADD_P (num_empty_blocks, 1);
 }
 #endif
 
@@ -476,7 +478,7 @@ check_empty_blocks (void)
 {
 #ifndef FIXED_HEAP
        void *p;
-       int i = 0;
+       size_t i = 0;
        for (p = empty_blocks; p; p = *(void**)p)
                ++i;
        g_assert (i == num_empty_blocks);
@@ -728,14 +730,14 @@ alloc_obj_par (MonoVTable *vtable, int size, gboolean pinned, gboolean has_refer
 }
 
 static void*
-major_par_alloc_object (MonoVTable *vtable, int size, gboolean has_references)
+major_par_alloc_object (MonoVTable *vtable, size_t size, gboolean has_references)
 {
        return alloc_obj_par (vtable, size, FALSE, has_references);
 }
 #endif
 
 static void*
-alloc_obj (MonoVTable *vtable, int size, gboolean pinned, gboolean has_references)
+alloc_obj (MonoVTable *vtable, size_t size, gboolean pinned, gboolean has_references)
 {
        int size_index = MS_BLOCK_OBJ_SIZE_INDEX (size);
        MSBlockInfo **free_blocks = FREE_BLOCKS (pinned, has_references);
@@ -759,7 +761,7 @@ alloc_obj (MonoVTable *vtable, int size, gboolean pinned, gboolean has_reference
 }
 
 static void*
-major_alloc_object (MonoVTable *vtable, int size, gboolean has_references)
+major_alloc_object (MonoVTable *vtable, size_t size, gboolean has_references)
 {
        return alloc_obj (vtable, size, FALSE, has_references);
 }
@@ -831,7 +833,7 @@ static void*
 major_alloc_degraded (MonoVTable *vtable, size_t size)
 {
        void *obj;
-       int old_num_sections;
+       size_t old_num_sections;
 
        old_num_sections = num_major_sections;
 
@@ -1710,6 +1712,7 @@ ms_sweep (void)
                         */
                        *iter = block->next;
 
+                       binary_protocol_empty (MS_BLOCK_OBJ (block, 0), (char*)MS_BLOCK_OBJ (block, count) - (char*)MS_BLOCK_OBJ (block, 0));
 #ifdef FIXED_HEAP
                        ms_free_block (block);
 #else
@@ -1812,7 +1815,7 @@ ms_calculate_block_obj_sizes (double factor, int *arr)
        int last_size = 0;
 
        do {
-               int target_count = ceil (MS_BLOCK_FREE / target_size);
+               int target_count = (int)ceil (MS_BLOCK_FREE / target_size);
                int size = MIN ((MS_BLOCK_FREE / target_count) & ~(SGEN_ALLOC_ALIGN - 1), SGEN_MAX_SMALL_OBJ_SIZE);
 
                if (size != last_size) {
@@ -1829,7 +1832,7 @@ ms_calculate_block_obj_sizes (double factor, int *arr)
 }
 
 /* only valid during minor collections */
-static int old_num_major_sections;
+static mword old_num_major_sections;
 
 static void
 major_start_nursery_collection (void)
@@ -1904,7 +1907,7 @@ static void
 major_have_computer_minor_collection_allowance (void)
 {
 #ifndef FIXED_HEAP
-       int section_reserve = sgen_get_minor_collection_allowance () / MS_BLOCK_SIZE;
+       size_t section_reserve = sgen_get_minor_collection_allowance () / MS_BLOCK_SIZE;
 
        g_assert (have_swept);
 
@@ -2105,7 +2108,7 @@ major_get_used_size (void)
        return size;
 }
 
-static int
+static size_t
 get_num_major_sections (void)
 {
        return num_major_sections;
@@ -2132,7 +2135,7 @@ major_handle_gc_param (const char *opt)
                        fprintf (stderr, "evacuation-threshold must be an integer in the range 0-100.\n");
                        exit (1);
                }
-               evacuation_threshold = (float)percentage / 100.0;
+               evacuation_threshold = (float)percentage / 100.0f;
                return TRUE;
        } else if (!strcmp (opt, "lazy-sweep")) {
                lazy_sweep = TRUE;
@@ -2283,7 +2286,7 @@ major_scan_card_table (gboolean mod_union, SgenGrayQueue *queue)
                        base = sgen_card_table_align_pointer (obj);
 
                        while (obj < end) {
-                               int card_offset;
+                               size_t card_offset;
 
                                if (!block->swept)
                                        sweep_block (block, FALSE);
@@ -2337,8 +2340,8 @@ major_scan_card_table (gboolean mod_union, SgenGrayQueue *queue)
                        card_data_end = card_data + CARDS_PER_BLOCK;
 
                        for (card_data = initial_skip_card (card_data); card_data < card_data_end; ++card_data) { //card_data = skip_card (card_data + 1, card_data_end)) {
-                               int index;
-                               int idx = card_data - card_base;
+                               size_t index;
+                               size_t idx = card_data - card_base;
                                char *start = (char*)(block_start + idx * CARD_SIZE_IN_BYTES);
                                char *end = start + CARD_SIZE_IN_BYTES;
                                char *first_obj, *obj;
index 2081de4fc736e9221bd63035330c4354e2a27326..448ebef3f05ff0df0ebabe70767c76c197de9a30 100644 (file)
@@ -57,14 +57,14 @@ static gboolean debug_print_allowance = FALSE;
 /* use this to tune when to do a major/minor collection */
 static mword memory_pressure = 0;
 static mword minor_collection_allowance;
-static int minor_collection_sections_alloced = 0;
+static mword minor_collection_sections_alloced = 0;
 
-static int last_major_num_sections = 0;
-static int last_los_memory_usage = 0;
+static mword last_major_num_sections = 0;
+static mword last_los_memory_usage = 0;
 
 static gboolean need_calculate_minor_collection_allowance;
 
-static int last_collection_old_num_major_sections;
+static mword last_collection_old_num_major_sections;
 static mword last_collection_los_memory_usage = 0;
 static mword last_collection_old_los_memory_usage;
 static mword last_collection_los_memory_alloced;
@@ -85,7 +85,7 @@ double_to_mword_with_saturation (double value)
 static void
 sgen_memgov_try_calculate_minor_collection_allowance (gboolean overwrite)
 {
-       int num_major_sections, num_major_sections_saved;
+       size_t num_major_sections, num_major_sections_saved;
        mword los_memory_saved, new_major, new_heap_size, save_target, allowance_target;
 
        if (overwrite)
@@ -210,7 +210,7 @@ static void
 log_timming (GGTimingInfo *info)
 {
        //unsigned long stw_time, unsigned long bridge_time, gboolean is_overflow
-       int num_major_sections = major_collector.get_num_major_sections ();
+       mword num_major_sections = major_collector.get_num_major_sections ();
        char full_timing_buff [1024];
        full_timing_buff [0] = '\0';
 
@@ -248,7 +248,7 @@ sgen_memgov_collection_end (int generation, GGTimingInfo* info, int info_count)
 }
 
 void
-sgen_register_major_sections_alloced (int num_sections)
+sgen_register_major_sections_alloced (size_t num_sections)
 {
        minor_collection_sections_alloced += num_sections;
 }
@@ -342,7 +342,7 @@ sgen_free_os_memory (void *addr, size_t size, SgenAllocFlags flags)
        g_assert (!(flags & ~SGEN_ALLOC_HEAP));
 
        mono_vfree (addr, size);
-       SGEN_ATOMIC_ADD_P (total_alloc, -size);
+       SGEN_ATOMIC_ADD_P (total_alloc, -(gssize)size);
        if (flags & SGEN_ALLOC_HEAP)
                MONO_GC_HEAP_FREE ((mword)addr, size);
 }
@@ -369,7 +369,7 @@ sgen_memgov_available_free_space (void)
 void
 sgen_memgov_release_space (mword size, int space)
 {
-       SGEN_ATOMIC_ADD_P (allocated_heap, -size);
+       SGEN_ATOMIC_ADD_P (allocated_heap, -(gssize)size);
 }
 
 gboolean
index 497ecb05765c715798ff213d4745f0398c3e19cb..fffe906f5bfedf4ed97d0ad4e6916fb77fd05304 100644 (file)
@@ -39,7 +39,7 @@ void sgen_memgov_major_collection_end (void) MONO_INTERNAL;
 void sgen_memgov_collection_start (int generation) MONO_INTERNAL;
 void sgen_memgov_collection_end (int generation, GGTimingInfo* info, int info_count) MONO_INTERNAL;
 
-void sgen_register_major_sections_alloced (int num_sections) MONO_INTERNAL;
+void sgen_register_major_sections_alloced (size_t num_sections) MONO_INTERNAL;
 mword sgen_get_minor_collection_allowance (void) MONO_INTERNAL;
 gboolean sgen_need_major_collection (mword space_needed) MONO_INTERNAL;
 
index 437f61a4d084a343d2c854ee2b4a2a8058fa9829..ad486c0c47fbc256c713d18788d37abd68c648e7 100644 (file)
@@ -262,11 +262,13 @@ dyn_array_int_size (DynIntArray *da)
        return da->array.size;
 }
 
+#ifdef NEW_XREFS
 static void
 dyn_array_int_empty (DynIntArray *da)
 {
        dyn_array_empty (&da->array);
 }
+#endif
 
 static void
 dyn_array_int_add (DynIntArray *da, int x)
@@ -281,17 +283,13 @@ dyn_array_int_get (DynIntArray *da, int x)
        return ((int*)da->array.data)[x];
 }
 
+#ifdef NEW_XREFS
 static void
 dyn_array_int_set (DynIntArray *da, int idx, int val)
 {
        ((int*)da->array.data)[idx] = val;
 }
-
-static void
-dyn_array_int_ensure_capacity (DynIntArray *da, int capacity)
-{
-       dyn_array_ensure_capacity (&da->array, capacity, sizeof (int));
-}
+#endif
 
 static void
 dyn_array_int_ensure_independent (DynIntArray *da)
@@ -428,6 +426,7 @@ dyn_array_scc_get_ptr (DynSCCArray *da, int x)
 
 static DynIntArray merge_array;
 
+#ifdef NEW_XREFS
 static gboolean
 dyn_array_int_contains (DynIntArray *da, int x)
 {
@@ -437,12 +436,14 @@ dyn_array_int_contains (DynIntArray *da, int x)
                        return TRUE;
        return FALSE;
 }
+#endif
 
 static void
 enable_accounting (void)
 {
+       SgenHashTable table = SGEN_HASH_TABLE_INIT (INTERNAL_MEM_BRIDGE_HASH_TABLE, INTERNAL_MEM_BRIDGE_HASH_TABLE_ENTRY, sizeof (HashEntryWithAccounting), mono_aligned_addr_hash, NULL);
        bridge_accounting_enabled = TRUE;
-       hash_table = (SgenHashTable)SGEN_HASH_TABLE_INIT (INTERNAL_MEM_BRIDGE_HASH_TABLE, INTERNAL_MEM_BRIDGE_HASH_TABLE_ENTRY, sizeof (HashEntryWithAccounting), mono_aligned_addr_hash, NULL);
+       hash_table = table;
 }
 
 static MonoGCBridgeObjectKind
@@ -880,8 +881,8 @@ dump_graph (void)
 
        MonoObject *obj;
        HashEntry *entry;
-       int prefix_len = strlen (dump_prefix);
-       char filename [prefix_len + 64];
+       size_t prefix_len = strlen (dump_prefix);
+       char *filename = alloca(prefix_len + 64);
        FILE *file;
        int edge_id = 0;
 
index 51b5bc6f8f5bdcf777210cf2f19882ff7b525d02..3d422e6b7b8aac5c8d9765bb61523a105ede4e44 100644 (file)
@@ -108,7 +108,7 @@ int sgen_nursery_bits = 22;
 #endif
 
 char *sgen_space_bitmap MONO_INTERNAL;
-int sgen_space_bitmap_size MONO_INTERNAL;
+size_t sgen_space_bitmap_size MONO_INTERNAL;
 
 #ifdef HEAVY_STATISTICS
 
@@ -393,7 +393,7 @@ par_alloc_from_fragment (SgenFragmentAllocator *allocator, SgenFragment *frag, s
                 * allocating from this dying fragment as it doesn't respect SGEN_MAX_NURSERY_WASTE
                 * when doing second chance allocation.
                 */
-               if (sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION && claim_remaining_size (frag, end)) {
+               if ((sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION || sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION_DEBUG) && claim_remaining_size (frag, end)) {
                        sgen_clear_range (end, frag->fragment_end);
                        HEAVY_STAT (InterlockedExchangeAdd (&stat_wasted_bytes_trailer, frag->fragment_end - end));
 #ifdef NALLOC_DEBUG
@@ -414,7 +414,7 @@ par_alloc_from_fragment (SgenFragmentAllocator *allocator, SgenFragment *frag, s
                                /*frag->next read must happen before the first CAS*/
                                mono_memory_write_barrier ();
 
-                               /*Fail if the next done is removed concurrently and its CAS wins */
+                               /*Fail if the next node is removed concurrently and its CAS wins */
                                if (InterlockedCompareExchangePointer ((volatile gpointer*)&frag->next, mask (next, 1), next) != next) {
                                        continue;
                                }
@@ -424,7 +424,7 @@ par_alloc_from_fragment (SgenFragmentAllocator *allocator, SgenFragment *frag, s
                        mono_memory_write_barrier ();
 
                        /* Fail if the previous node was deleted and its CAS wins */
-                       if (InterlockedCompareExchangePointer ((volatile gpointer*)prev_ptr, next, frag) != frag) {
+                       if (InterlockedCompareExchangePointer ((volatile gpointer*)prev_ptr, unmask (next), frag) != frag) {
                                prev_ptr = find_previous_pointer_fragment (allocator, frag);
                                continue;
                        }
@@ -471,7 +471,7 @@ restart:
        for (frag = unmask (allocator->alloc_head); unmask (frag); frag = unmask (frag->next)) {
                HEAVY_STAT (InterlockedIncrement (&stat_alloc_iterations));
 
-               if (size <= (frag->fragment_end - frag->fragment_next)) {
+               if (size <= (size_t)(frag->fragment_end - frag->fragment_next)) {
                        void *p = par_alloc_from_fragment (allocator, frag, size);
                        if (!p) {
                                HEAVY_STAT (InterlockedIncrement (&stat_alloc_retries));
@@ -579,7 +579,7 @@ restart:
 #endif
 
        for (frag = unmask (allocator->alloc_head); frag; frag = unmask (frag->next)) {
-               int frag_size = frag->fragment_end - frag->fragment_next;
+               size_t frag_size = frag->fragment_end - frag->fragment_next;
 
                HEAVY_STAT (InterlockedIncrement (&stat_alloc_range_iterations));
 
@@ -608,7 +608,7 @@ restart:
 
        if (min_frag) {
                void *p;
-               int frag_size;
+               size_t frag_size;
 
                frag_size = min_frag->fragment_end - min_frag->fragment_next;
                if (frag_size < minimum_size)
@@ -651,7 +651,7 @@ sgen_clear_allocator_fragments (SgenFragmentAllocator *allocator)
 void
 sgen_clear_nursery_fragments (void)
 {
-       if (sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION) {
+       if (sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION || sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION_DEBUG) {
                sgen_clear_allocator_fragments (&mutator_allocator);
                sgen_minor_collector.clear_fragments ();
        }
@@ -685,7 +685,7 @@ sgen_clear_range (char *start, char *end)
        /* Mark this as not a real object */
        o->obj.synchronisation = GINT_TO_POINTER (-1);
        o->bounds = NULL;
-       o->max_length = size - sizeof (MonoArray);
+       o->max_length = (mono_array_size_t)(size - sizeof (MonoArray));
        sgen_set_nursery_scan_start (start);
        g_assert (start + sgen_safe_object_get_size ((MonoObject*)o) == end);
 }
@@ -714,6 +714,8 @@ add_nursery_frag (SgenFragmentAllocator *allocator, size_t frag_size, char* frag
                /* memsetting just the first chunk start is bound to provide better cache locality */
                if (sgen_get_nursery_clear_policy () == CLEAR_AT_GC)
                        memset (frag_start, 0, frag_size);
+               else if (sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION_DEBUG)
+                       memset (frag_start, 0xff, frag_size);
 
 #ifdef NALLOC_DEBUG
                /* XXX convert this into a flight record entry
@@ -745,11 +747,11 @@ fragment_list_reverse (SgenFragmentAllocator *allocator)
 }
 
 mword
-sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, int num_entries, SgenGrayQueue *unpin_queue)
+sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, size_t num_entries, SgenGrayQueue *unpin_queue)
 {
        char *frag_start, *frag_end;
        size_t frag_size;
-       int i = 0;
+       size_t i = 0;
        SgenFragment *frags_ranges;
 
 #ifdef NALLOC_DEBUG
@@ -827,9 +829,9 @@ sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, int n
        sgen_minor_collector.build_fragments_finish (&mutator_allocator);
 
        if (!unmask (mutator_allocator.alloc_head)) {
-               SGEN_LOG (1, "Nursery fully pinned (%d)", num_entries);
+               SGEN_LOG (1, "Nursery fully pinned (%zd)", num_entries);
                for (i = 0; i < num_entries; ++i) {
-                       SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %d", start [i], sgen_safe_name (start [i]), sgen_safe_object_get_size (start [i]));
+                       SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %zd", start [i], sgen_safe_name (start [i]), sgen_safe_object_get_size (start [i]));
                }
        }
        return fragment_total;
@@ -860,7 +862,7 @@ sgen_can_alloc_size (size_t size)
        size = SGEN_ALIGN_UP (size);
 
        for (frag = unmask (mutator_allocator.alloc_head); frag; frag = unmask (frag->next)) {
-               if ((frag->fragment_end - frag->fragment_next) >= size)
+               if ((size_t)(frag->fragment_end - frag->fragment_next) >= size)
                        return TRUE;
        }
        return FALSE;
@@ -938,7 +940,12 @@ sgen_nursery_allocator_set_nursery_bounds (char *start, char *end)
        sgen_nursery_start = start;
        sgen_nursery_end = end;
 
-       sgen_space_bitmap_size = (end - start) / (SGEN_TO_SPACE_GRANULE_IN_BYTES * 8);
+       /*
+        * This will not divide evenly for tiny nurseries (<4kb), so we make sure to be on
+        * the right side of things and round up.  We could just do a MIN(1,x) instead,
+        * since the nursery size must be a power of 2.
+        */
+       sgen_space_bitmap_size = (end - start + SGEN_TO_SPACE_GRANULE_IN_BYTES * 8 - 1) / (SGEN_TO_SPACE_GRANULE_IN_BYTES * 8);
        sgen_space_bitmap = g_malloc0 (sgen_space_bitmap_size);
 
        /* Setup the single first large fragment */
index de2933f77957379a3b7ee6a64ea4d100737218ca..42a588164df379f3827988052145f1590e7ceee2 100644 (file)
@@ -396,8 +396,9 @@ dyn_array_int_merge_one (DynIntArray *array, int value)
 static void
 enable_accounting (void)
 {
+       SgenHashTable table = SGEN_HASH_TABLE_INIT (INTERNAL_MEM_BRIDGE_HASH_TABLE, INTERNAL_MEM_BRIDGE_HASH_TABLE_ENTRY, sizeof (HashEntryWithAccounting), mono_aligned_addr_hash, NULL);
        bridge_accounting_enabled = TRUE;
-       hash_table = (SgenHashTable)SGEN_HASH_TABLE_INIT (INTERNAL_MEM_BRIDGE_HASH_TABLE, INTERNAL_MEM_BRIDGE_HASH_TABLE_ENTRY, sizeof (HashEntryWithAccounting), mono_aligned_addr_hash, NULL);
+       hash_table = table;
 }
 
 static MonoGCBridgeObjectKind
index 3a709276a6fc52de2117b8bc4b655e85939157f8..909b8382c81e2863355d1f1f5e4c3c50a40b032f 100644 (file)
@@ -36,7 +36,7 @@
 #include "metadata/object-internals.h"
 #include "utils/mono-signal-handler.h"
 
-#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 const static int suspend_signal_num = SIGXFSZ;
 #else
 const static int suspend_signal_num = SIGPWR;
index d0a38ef426eb94b8b90c82bcedd4490e3fc35ce2..85ee6e9f40016398d1d57fc7bc676abfe99e64e3 100644 (file)
@@ -27,9 +27,9 @@
 #include "metadata/sgen-protocol.h"
 
 static void** pin_queue;
-static int pin_queue_size = 0;
-static int next_pin_slot = 0;
-static int last_num_pinned = 0;
+static size_t pin_queue_size = 0;
+static size_t next_pin_slot = 0;
+static size_t last_num_pinned = 0;
 
 #define PIN_HASH_SIZE 1024
 static void *pin_hash_filter [PIN_HASH_SIZE];
@@ -50,13 +50,13 @@ sgen_finish_pinning (void)
 static void
 realloc_pin_queue (void)
 {
-       int new_size = pin_queue_size? pin_queue_size + pin_queue_size/2: 1024;
+       size_t new_size = pin_queue_size? pin_queue_size + pin_queue_size/2: 1024;
        void **new_pin = sgen_alloc_internal_dynamic (sizeof (void*) * new_size, INTERNAL_MEM_PIN_QUEUE, TRUE);
        memcpy (new_pin, pin_queue, sizeof (void*) * next_pin_slot);
        sgen_free_internal_dynamic (pin_queue, sizeof (void*) * pin_queue_size, INTERNAL_MEM_PIN_QUEUE);
        pin_queue = new_pin;
        pin_queue_size = new_size;
-       SGEN_LOG (4, "Reallocated pin queue to size: %d", new_size);
+       SGEN_LOG (4, "Reallocated pin queue to size: %zd", new_size);
 }
 
 void
@@ -75,12 +75,12 @@ sgen_pin_stage_ptr (void *ptr)
        pin_queue [next_pin_slot++] = ptr;
 }
 
-static int
+static size_t
 optimized_pin_queue_search (void *addr)
 {
-       int first = 0, last = next_pin_slot;
+       size_t first = 0, last = next_pin_slot;
        while (first < last) {
-               int middle = first + ((last - first) >> 1);
+               size_t middle = first + ((last - first) >> 1);
                if (addr <= pin_queue [middle])
                        last = middle;
                else
@@ -91,9 +91,9 @@ optimized_pin_queue_search (void *addr)
 }
 
 void**
-sgen_find_optimized_pin_queue_area (void *start, void *end, int *num)
+sgen_find_optimized_pin_queue_area (void *start, void *end, size_t *num)
 {
-       int first, last;
+       size_t first, last;
        first = optimized_pin_queue_search (start);
        last = optimized_pin_queue_search (end);
        *num = last - first;
@@ -107,7 +107,7 @@ sgen_find_section_pin_queue_start_end (GCMemSection *section)
 {
        SGEN_LOG (6, "Pinning from section %p (%p-%p)", section, section->data, section->end_data);
        section->pin_queue_start = sgen_find_optimized_pin_queue_area (section->data, section->end_data, &section->pin_queue_num_entries);
-       SGEN_LOG (6, "Found %d pinning addresses in section %p", section->pin_queue_num_entries, section);
+       SGEN_LOG (6, "Found %zd pinning addresses in section %p", section->pin_queue_num_entries, section);
 }
 
 /*This will setup the given section for the while pin queue. */
@@ -125,7 +125,7 @@ sgen_pinning_trim_queue_to_section (GCMemSection *section)
 }
 
 void
-sgen_pin_queue_clear_discarded_entries (GCMemSection *section, int max_pin_slot)
+sgen_pin_queue_clear_discarded_entries (GCMemSection *section, size_t max_pin_slot)
 {
        void **start = section->pin_queue_start + section->pin_queue_num_entries;
        void **end = pin_queue + max_pin_slot;
@@ -144,12 +144,12 @@ sgen_pin_queue_clear_discarded_entries (GCMemSection *section, int max_pin_slot)
 
 /* reduce the info in the pin queue, removing duplicate pointers and sorting them */
 void
-sgen_optimize_pin_queue (int start_slot)
+sgen_optimize_pin_queue (size_t start_slot)
 {
        void **start, **cur, **end;
        /* sort and uniq pin_queue: we just sort and we let the rest discard multiple values */
        /* it may be better to keep ranges of pinned memory instead of individually pinning objects */
-       SGEN_LOG (5, "Sorting pin queue, size: %d", next_pin_slot);
+       SGEN_LOG (5, "Sorting pin queue, size: %zd", next_pin_slot);
        if ((next_pin_slot - start_slot) > 1)
                sgen_sort_addresses (pin_queue + start_slot, next_pin_slot - start_slot);
        start = cur = pin_queue + start_slot;
@@ -161,10 +161,10 @@ sgen_optimize_pin_queue (int start_slot)
                start++;
        };
        next_pin_slot = start - pin_queue;
-       SGEN_LOG (5, "Pin queue reduced to size: %d", next_pin_slot);
+       SGEN_LOG (5, "Pin queue reduced to size: %zd", next_pin_slot);
 }
 
-int
+size_t
 sgen_get_pinned_count (void)
 {
        return next_pin_slot;
@@ -176,7 +176,7 @@ sgen_dump_pin_queue (void)
        int i;
 
        for (i = 0; i < last_num_pinned; ++i) {
-               SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %d", pin_queue [i], sgen_safe_name (pin_queue [i]), sgen_safe_object_get_size (pin_queue [i]));
+               SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %zd", pin_queue [i], sgen_safe_name (pin_queue [i]), sgen_safe_object_get_size (pin_queue [i]));
        }       
 }
 
@@ -311,7 +311,7 @@ sgen_cement_lookup_or_register (char *obj)
                                        vt->klass->name_space, vt->klass->name);
                }
                binary_protocol_cement (obj, (gpointer)SGEN_LOAD_VTABLE (obj),
-                               sgen_safe_object_get_size ((MonoObject*)obj));
+                               (int)sgen_safe_object_get_size ((MonoObject*)obj));
        }
 
        return FALSE;
index f141cd683994109966f48bf7729ae9da434c4af2..ef41df24d2f688fb7688c7f8e202faf2a7305673 100644 (file)
@@ -28,11 +28,11 @@ enum {
 };
 
 void sgen_pin_stage_ptr (void *ptr) MONO_INTERNAL;
-void sgen_optimize_pin_queue (int start_slot) MONO_INTERNAL;
+void sgen_optimize_pin_queue (size_t start_slot) MONO_INTERNAL;
 void sgen_init_pinning (void) MONO_INTERNAL;
 void sgen_finish_pinning (void) MONO_INTERNAL;
-void sgen_pin_queue_clear_discarded_entries (GCMemSection *section, int max_pin_slot) MONO_INTERNAL;
-int sgen_get_pinned_count (void) MONO_INTERNAL;
+void sgen_pin_queue_clear_discarded_entries (GCMemSection *section, size_t max_pin_slot) MONO_INTERNAL;
+size_t sgen_get_pinned_count (void) MONO_INTERNAL;
 void sgen_pinning_setup_section (GCMemSection *section) MONO_INTERNAL;
 void sgen_pinning_trim_queue_to_section (GCMemSection *section) MONO_INTERNAL;
 
index ce0ac028cf9a2ea87bf9ad0f4b03cab4cc286b6c..a8f9b34c8254c381003874d423a1313b980cc51a 100644 (file)
@@ -46,10 +46,57 @@ struct _BinaryProtocolBuffer {
 
 static BinaryProtocolBuffer * volatile binary_protocol_buffers = NULL;
 
-void
-binary_protocol_init (const char *filename)
+static char* filename_or_prefix = NULL;
+static int current_file_index = 0;
+static long long current_file_size = 0;
+static long long file_size_limit;
+
+static char*
+filename_for_index (int index)
 {
+       char *filename;
+
+       SGEN_ASSERT (0, file_size_limit > 0, "Indexed binary protocol filename must only be used with file size limit");
+
+       filename = sgen_alloc_internal_dynamic (strlen (filename_or_prefix) + 32, INTERNAL_MEM_BINARY_PROTOCOL, TRUE);
+       sprintf (filename, "%s.%d", filename_or_prefix, index);
+
+       return filename;
+}
+
+static void
+free_filename (char *filename)
+{
+       SGEN_ASSERT (0, file_size_limit > 0, "Indexed binary protocol filename must only be used with file size limit");
+
+       sgen_free_internal_dynamic (filename, strlen (filename_or_prefix) + 32, INTERNAL_MEM_BINARY_PROTOCOL);
+}
+
+static void
+binary_protocol_open_file (void)
+{
+       char *filename;
+
+       if (file_size_limit > 0)
+               filename = filename_for_index (current_file_index);
+       else
+               filename = filename_or_prefix;
+
        binary_protocol_file = fopen (filename, "w");
+
+       if (file_size_limit > 0)
+               free_filename (filename);
+}
+
+void
+binary_protocol_init (const char *filename, long long limit)
+{
+       filename_or_prefix = sgen_alloc_internal_dynamic (strlen (filename) + 1, INTERNAL_MEM_BINARY_PROTOCOL, TRUE);
+       strcpy (filename_or_prefix, filename);
+
+       file_size_limit = limit;
+
+       binary_protocol_open_file ();
 }
 
 gboolean
@@ -110,10 +157,32 @@ binary_protocol_flush_buffer (BinaryProtocolBuffer *buffer)
 {
        g_assert (buffer->index > 0);
        fwrite (buffer->buffer, 1, buffer->index, binary_protocol_file);
+       current_file_size += buffer->index;
 
        sgen_free_os_memory (buffer, sizeof (BinaryProtocolBuffer), SGEN_ALLOC_INTERNAL);
 }
 
+static void
+binary_protocol_check_file_overflow (void)
+{
+       if (file_size_limit <= 0 || current_file_size < file_size_limit)
+               return;
+
+       fclose (binary_protocol_file);
+       binary_protocol_file = NULL;
+
+       if (current_file_index > 0) {
+               char *filename = filename_for_index (current_file_index - 1);
+               unlink (filename);
+               free_filename (filename);
+       }
+
+       ++current_file_index;
+       current_file_size = 0;
+
+       binary_protocol_open_file ();
+}
+
 void
 binary_protocol_flush_buffers (gboolean force)
 {
@@ -136,8 +205,10 @@ binary_protocol_flush_buffers (gboolean force)
 
        binary_protocol_buffers = NULL;
 
-       for (i = num_buffers - 1; i >= 0; --i)
+       for (i = num_buffers - 1; i >= 0; --i) {
                binary_protocol_flush_buffer (bufs [i]);
+               binary_protocol_check_file_overflow ();
+       }
 
        sgen_free_internal_dynamic (buf, num_buffers * sizeof (BinaryProtocolBuffer*), INTERNAL_MEM_BINARY_PROTOCOL);
 
@@ -456,6 +527,20 @@ 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_gray_enqueue (gpointer queue, gpointer cursor, gpointer value)
+{
+       SGenProtocolGrayQueue entry = { queue, cursor, value };
+       protocol_entry (SGEN_PROTOCOL_GRAY_ENQUEUE, &entry, sizeof (SGenProtocolGrayQueue));
+}
+
+void
+binary_protocol_gray_dequeue (gpointer queue, gpointer cursor, gpointer value)
+{
+       SGenProtocolGrayQueue entry = { queue, cursor, value };
+       protocol_entry (SGEN_PROTOCOL_GRAY_DEQUEUE, &entry, sizeof (SGenProtocolGrayQueue));
+}
 #endif
 
 #endif /* HAVE_SGEN_GC */
index 1e7222c8b30da8da820712b288bb6dff5175d246..c2552280df40f93069ca535ee0d2d8b7d4833d55 100644 (file)
@@ -20,6 +20,9 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#ifndef __MONO_SGENPROTOCOL_H__
+#define __MONO_SGENPROTOCOL_H__
+
 #include "sgen-gc.h"
 
 enum {
@@ -57,7 +60,9 @@ enum {
        SGEN_PROTOCOL_DISLINK_UPDATE_STAGED,
        SGEN_PROTOCOL_DISLINK_PROCESS_STAGED,
        SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN,
-       SGEN_PROTOCOL_DOMAIN_UNLOAD_END
+       SGEN_PROTOCOL_DOMAIN_UNLOAD_END,
+       SGEN_PROTOCOL_GRAY_ENQUEUE,
+       SGEN_PROTOCOL_GRAY_DEQUEUE,
 };
 
 typedef struct {
@@ -221,9 +226,15 @@ typedef struct {
        gpointer domain;
 } SGenProtocolDomainUnload;
 
+typedef struct {
+       gpointer queue;
+       gpointer cursor;
+       gpointer value;
+} SGenProtocolGrayQueue;
+
 /* missing: finalizers, roots, non-store wbarriers */
 
-void binary_protocol_init (const char *filename) MONO_INTERNAL;
+void binary_protocol_init (const char *filename, long long limit) MONO_INTERNAL;
 gboolean binary_protocol_is_enabled (void) MONO_INTERNAL;
 
 void binary_protocol_flush_buffers (gboolean force) MONO_INTERNAL;
@@ -274,6 +285,8 @@ void binary_protocol_card_scan (gpointer start, int size) 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_gray_enqueue (gpointer queue, gpointer cursor, gpointer value) MONO_INTERNAL;
+void binary_protocol_gray_dequeue (gpointer queue, gpointer cursor, gpointer value) MONO_INTERNAL;
 
 #else
 
@@ -296,5 +309,9 @@ void binary_protocol_dislink_process_staged (gpointer link, gpointer obj, int in
 #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_gray_enqueue(queue,cursor,value)
+#define binary_protocol_gray_dequeue(queue,cursor,value)
+
+#endif
 
 #endif
index 3a0c57e02249f2b40713e80d35ffb9388c357bec..f2f7066c3015cd39600027fbf558087d69fc7636 100644 (file)
@@ -58,7 +58,7 @@ build_fragments_finish (SgenFragmentAllocator *allocator)
 }
 
 static void
-prepare_to_space (char *to_space_bitmap, int space_bitmap_size)
+prepare_to_space (char *to_space_bitmap, size_t space_bitmap_size)
 {
 }
 
index fc741cfc05b65a2a8b200c5eea1c8c9733187348..1f62d14b703ffde9313db161f868f9f80adba1d1 100644 (file)
@@ -139,7 +139,7 @@ static float alloc_ratio = 60.f/100.f;
 
 
 static char *region_age;
-static int region_age_size;
+static size_t region_age_size;
 static AgeAllocationBuffer age_alloc_buffers [MAX_AGE];
 
 /* The collector allocs from here. */
@@ -150,14 +150,14 @@ static LOCK_DECLARE (par_alloc_buffer_refill_mutex);
 static inline int
 get_object_age (char *object)
 {
-       int idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
+       size_t idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
        return region_age [idx];
 }
 
 static inline void
 set_object_age (char *object, int age)
 {
-       int idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
+       size_t idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
        region_age [idx] = age;
 }
 
@@ -165,7 +165,7 @@ static void
 set_age_in_range (char *start, char *end, int age)
 {
        char *region_start;
-       int region_idx, length;
+       size_t region_idx, length;
        region_idx = (start - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
        region_start = &region_age [region_idx];
        length = (end - start) >> SGEN_TO_SPACE_GRANULE_BITS;
@@ -175,8 +175,8 @@ set_age_in_range (char *start, char *end, int age)
 static inline void
 mark_bit (char *space_bitmap, char *pos)
 {
-       int idx = (pos - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
-       int byte = idx / 8;
+       size_t idx = (pos - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
+       size_t byte = idx / 8;
        int bit = idx & 0x7;
 
        g_assert (byte < sgen_space_bitmap_size);
@@ -420,7 +420,7 @@ build_fragments_finish (SgenFragmentAllocator *allocator)
 }
 
 static void
-prepare_to_space (char *to_space_bitmap, int space_bitmap_size)
+prepare_to_space (char *to_space_bitmap, size_t space_bitmap_size)
 {
        SgenFragment **previous, *frag;
 
index fec1d697ca27c4e3eaf92fef781b2356351a0bae..59013f70124aa832120f3c0a2216964bea45e1f4 100644 (file)
@@ -67,14 +67,6 @@ typedef struct {
 
 /* private */
 
-static void
-dyn_array_init (DynArray *da)
-{
-       da->size = 0;
-       da->capacity = 0;
-       da->data = NULL;
-}
-
 static void
 dyn_array_uninit (DynArray *da, int elem_size)
 {
@@ -121,12 +113,6 @@ dyn_array_add (DynArray *da, int elem_size)
 
 /* ptr */
 
-static void
-dyn_array_ptr_init (DynPtrArray *da)
-{
-       dyn_array_init (&da->array);
-}
-
 static void
 dyn_array_ptr_uninit (DynPtrArray *da)
 {
@@ -390,10 +376,10 @@ retry:
 static void
 free_color_buckets (void)
 {
-       color_data_count = 0;
-
        ColorBucket *cur, *tmp;
 
+       color_data_count = 0;
+
        for (cur = root_color_bucket; cur; cur = tmp) {
                ColorData *cd;
                for (cd = &cur->data [0]; cd < cur->next_data; ++cd) {
@@ -461,6 +447,7 @@ bridge_object_forward (MonoObject *obj)
        return fwd ? fwd : obj;
 }
 
+#ifdef DUMP_GRAPH
 static const char*
 safe_name_bridge (MonoObject *obj)
 {
@@ -476,7 +463,7 @@ find_or_create_data (MonoObject *obj)
                entry = create_data (obj);
        return entry;
 }
-
+#endif
 
 //----------
 typedef struct {
@@ -502,7 +489,7 @@ static HashEntry merge_cache [COLOR_CACHE_SIZE][ELEMENTS_PER_BUCKET];
 static int
 mix_hash (size_t hash)
 {
-       return ((hash * 215497) >> 16) ^ (hash * 1823231) + hash;
+       return (int)(((hash * 215497) >> 16) ^ ((hash * 1823231) + hash));
 }
 
 static void
@@ -908,6 +895,7 @@ cleanup (void)
        num_colors_with_bridges = 0;
 }
 
+#ifdef DUMP_GRAPH
 static void
 dump_color_table (const char *why, gboolean do_index)
 {
@@ -938,6 +926,7 @@ dump_color_table (const char *why, gboolean do_index)
        }
 
 }
+#endif
 
 static gint64
 step_timer (gint64 *timer)
@@ -1036,16 +1025,6 @@ reset_xrefs (ColorData *color)
        }
 }
 
-static mono_bool
-is_bridge_object_alive (MonoObject *obj, void *data)
-{
-       SgenHashTable *table = data;
-       unsigned char *value = sgen_hash_table_lookup (table, obj);
-       if (!value)
-               return TRUE;
-       return *value;
-}
-
 static void
 processing_build_callback_data (int generation)
 {
index 77c7fadcac086f76a2ea8baad3f2328f31733ec0..b3eebb02d9ce3ea0f46461b81d2b893bb9972857 100644 (file)
@@ -246,7 +246,17 @@ workers_steal (WorkerData *data, WorkerData *victim_data, gboolean lock)
                memcpy (queue->first->objects,
                                victim_data->stealable_stack + victim_data->stealable_stack_fill - num + n,
                                sizeof (char*) * m);
-               queue->first->end = m;
+               queue->first->size = m;
+
+               /*
+                * DO NOT move outside this loop
+                * Doing so trigger "assert not reached" in sgen-scan-object.h : we use the queue->cursor
+                * to compute the size of the first section during section allocation (via alloc_prepare_func
+                * -> workers_gray_queue_share_redirect -> sgen_gray_object_dequeue_section) which will be then
+                * set to 0, because queue->cursor is still pointing to queue->first->objects [-1], thus
+                * losing objects in the gray queue.
+                */
+               queue->cursor = (char**)queue->first->objects + queue->first->size - 1;
        }
 
        victim_data->stealable_stack_fill -= num;
@@ -279,10 +289,9 @@ workers_get_work (WorkerData *data)
                return TRUE;
 
        /* From another worker. */
-       for (i = 0; i < workers_num; ++i) {
-               WorkerData *victim_data = &workers_data [i];
-               if (data == victim_data)
-                       continue;
+       for (i = data->index + 1; i < workers_num + data->index; ++i) {
+               WorkerData *victim_data = &workers_data [i % workers_num];
+               g_assert (data != victim_data);
                if (workers_steal (data, victim_data, TRUE))
                        return TRUE;
        }
@@ -326,16 +335,16 @@ workers_gray_queue_share_redirect (SgenGrayQueue *queue)
 
        while (data->stealable_stack_fill < STEALABLE_STACK_SIZE &&
                        (section = sgen_gray_object_dequeue_section (queue))) {
-               int num = MIN (section->end, STEALABLE_STACK_SIZE - data->stealable_stack_fill);
+               int num = MIN (section->size, STEALABLE_STACK_SIZE - data->stealable_stack_fill);
 
                memcpy (data->stealable_stack + data->stealable_stack_fill,
-                               section->objects + section->end - num,
+                               section->objects + section->size - num,
                                sizeof (char*) * num);
 
-               section->end -= num;
+               section->size -= num;
                data->stealable_stack_fill += num;
 
-               if (section->end)
+               if (section->size)
                        sgen_gray_object_enqueue_section (queue, section);
                else
                        sgen_gray_object_free_queue_section (section);
@@ -459,6 +468,8 @@ sgen_workers_init (int num_workers)
                workers_gc_thread_major_collector_data = sgen_get_major_collector ()->alloc_worker_data ();
 
        for (i = 0; i < workers_num; ++i) {
+               workers_data [i].index = i;
+
                /* private gray queue is inited by the thread itself */
                mono_mutex_init (&workers_data [i].stealable_stack_mutex);
                workers_data [i].stealable_stack_fill = 0;
index f5bbf5545459ea1402f52c35354c0d125f6cf91e..9070623673fc268eb8db724e7f10914d615a912e 100644 (file)
@@ -26,6 +26,7 @@
 
 typedef struct _WorkerData WorkerData;
 struct _WorkerData {
+       int index;
        MonoNativeThreadId thread;
        void *major_collector_data;
 
index b160096e92ea13d75f91bee5c072ee5d1ac12a43..cbce0f772694e052aecff7c62090ddb2140fa93c 100644 (file)
@@ -1216,7 +1216,7 @@ static struct sockaddr *create_sockaddr_from_object(MonoObject *saddr_obj,
                /* Need a byte for the '\0' terminator/prefix, and the first
                 * two bytes hold the SocketAddress family
                 */
-               if (len - 2 >= MONO_SIZEOF_SUNPATH) {
+               if (len - 2 >= sizeof(sock_un->sun_path)) {
                        mono_raise_exception (mono_get_exception_index_out_of_range ());
                }
                
index 825d4330ff639a7714ed193d76b341f69143b593..26944839442d94cde85e01d0b32b118b1c0c946b 100644 (file)
@@ -191,7 +191,7 @@ typedef struct
        gint gid;
 } MonoPeerCredData;
 
-extern gpointer ves_icall_System_Net_Sockets_Socket_Socket_internal(MonoObject *this, gint32 family, gint32 type, gint32 proto, gint32 *error) MONO_INTERNAL;
+extern gpointer ves_icall_System_Net_Sockets_Socket_Socket_internal(MonoObject *this_obj, gint32 family, gint32 type, gint32 proto, gint32 *error) MONO_INTERNAL;
 extern void ves_icall_System_Net_Sockets_Socket_Close_internal(SOCKET sock, gint32 *error) MONO_INTERNAL;
 extern gint32 ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal(void) MONO_INTERNAL;
 extern gint32 ves_icall_System_Net_Sockets_Socket_Available_internal(SOCKET sock, gint32 *error) MONO_INTERNAL;
index a0889ebbf5837d886a69a5a5c44816b872be69e8..a0b831a1e2006411eecc26190d60ca4df45c4f27 100644 (file)
@@ -10,6 +10,7 @@
  * (C) 2001 Ximian, Inc.
  */
 
+#include <glib.h>
 #include <mono/metadata/class.h>
 #include <mono/metadata/object.h>
 #include "mono/utils/mono-compiler.h"
index 9d73ccdeb305ec3d353259fd537bf1e2f451ec7c..165445c6a8562e116bb14c5ce7025254dd453553 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef _MONO_THREADPOOL_INTERNALS_H_
 #define _MONO_THREADPOOL_INTERNALS_H_
 
+#include <glib.h>
+#include <mono/metadata/object.h>
+#include <mono/utils/mono-compiler.h>
+
 void mono_thread_pool_remove_socket (int sock) MONO_INTERNAL;
 gboolean mono_thread_pool_is_queue_array (MonoArray *o) MONO_INTERNAL;
 void mono_internal_thread_unhandled_exception (MonoObject* exc) MONO_INTERNAL;
index 431fe93ea06772bcd61ac9e8c882d1119e345e5e..6aeca4acf5eadfa05b80ac8c0fce89c155d48280 100644 (file)
@@ -15,6 +15,7 @@
 #include <glib.h>
 
 #include <mono/io-layer/io-layer.h>
+#include <mono/metadata/object.h>
 #include "mono/utils/mono-compiler.h"
 #include "mono/utils/mono-membar.h"
 
@@ -58,7 +59,7 @@ MonoInternalThread* mono_thread_create_internal (MonoDomain *domain, gpointer fu
 
 void mono_threads_install_cleanup (MonoThreadCleanupFunc func) MONO_INTERNAL;
 
-void ves_icall_System_Threading_Thread_ConstructInternalThread (MonoThread *this) MONO_INTERNAL;
+void ves_icall_System_Threading_Thread_ConstructInternalThread (MonoThread *this_obj) MONO_INTERNAL;
 HANDLE ves_icall_System_Threading_Thread_Thread_internal(MonoThread *this_obj, MonoObject *start) MONO_INTERNAL;
 void ves_icall_System_Threading_InternalThread_Thread_free_internal(MonoInternalThread *this_obj, HANDLE thread) MONO_INTERNAL;
 void ves_icall_System_Threading_Thread_Sleep_internal(gint32 ms) MONO_INTERNAL;
@@ -184,7 +185,7 @@ void mono_special_static_data_free_slot (guint32 offset, guint32 size) MONO_INTE
 uint32_t mono_thread_alloc_tls   (MonoReflectionType *type) MONO_INTERNAL;
 void     mono_thread_destroy_tls (uint32_t tls_offset) MONO_INTERNAL;
 void     mono_thread_destroy_domain_tls (MonoDomain *domain) MONO_INTERNAL;
-void mono_thread_free_local_slot_values (int slot, MonoBoolean thread_local) MONO_INTERNAL;
+void mono_thread_free_local_slot_values (int slot, MonoBoolean is_thread_local) MONO_INTERNAL;
 void mono_thread_current_check_pending_interrupt (void) MONO_INTERNAL;
 
 void mono_thread_set_state (MonoInternalThread *thread, MonoThreadState state) MONO_INTERNAL;
index 9eb952f18ced93bb79222b391f007d62676ccf45..0867b3dee8509793a824eb9bc44ed098c762db7e 100755 (executable)
@@ -721,6 +721,12 @@ create_thread (MonoThread *thread, MonoInternalThread *internal, StartInfo *star
        MonoNativeThreadId tid;
        guint32 create_flags;
 
+       /*
+        * Join joinable threads to prevent running out of threads since the finalizer
+        * thread might be blocked/backlogged.
+        */
+       mono_threads_join_threads ();
+
        mono_threads_lock ();
        if (shutting_down) {
                g_free (start_info);
@@ -1339,7 +1345,7 @@ mono_wait_uninterrupted (MonoInternalThread *thread, gboolean multiple, guint32
                        continue;
 
                /* Re-calculate ms according to the time passed */
-               diff_ms = (mono_100ns_ticks () - start) / 10000;
+               diff_ms = (gint32)((mono_100ns_ticks () - start) / 10000);
                if (diff_ms >= ms) {
                        ret = WAIT_TIMEOUT;
                        break;
@@ -1363,7 +1369,8 @@ gboolean ves_icall_System_Threading_WaitHandle_WaitAll_internal(MonoArray *mono_
        /* Do this WaitSleepJoin check before creating objects */
        mono_thread_current_check_pending_interrupt ();
 
-       numhandles = mono_array_length(mono_handles);
+       /* We fail in managed if the array has more than 64 elements */
+       numhandles = (guint32)mono_array_length(mono_handles);
        handles = g_new0(HANDLE, numhandles);
 
        for(i = 0; i < numhandles; i++) {       
@@ -1398,7 +1405,7 @@ gboolean ves_icall_System_Threading_WaitHandle_WaitAll_internal(MonoArray *mono_
 gint32 ves_icall_System_Threading_WaitHandle_WaitAny_internal(MonoArray *mono_handles, gint32 ms, gboolean exitContext)
 {
        HANDLE handles [MAXIMUM_WAIT_OBJECTS];
-       guint32 numhandles;
+       uintptr_t numhandles;
        guint32 ret;
        guint32 i;
        MonoObject *waitHandle;
@@ -1991,7 +1998,7 @@ static void signal_thread_state_change (MonoInternalThread *thread)
        }
 
 #ifdef HOST_WIN32
-       QueueUserAPC ((PAPCFUNC)interruption_request_apc, thread->handle, NULL);
+       QueueUserAPC ((PAPCFUNC)interruption_request_apc, thread->handle, (ULONG_PTR)NULL);
 #else
        /* 
         * This will cause waits to be broken.
@@ -3570,7 +3577,7 @@ static const int static_data_size [NUM_STATIC_DATA_IDX] = {
 static uintptr_t* static_reference_bitmaps [NUM_STATIC_DATA_IDX];
 
 static void
-mark_tls_slots (void *addr, MonoGCMarkFunc mark_func)
+mark_tls_slots (void *addr, MonoGCMarkFunc mark_func, void *gc_data)
 {
        int i;
        gpointer *static_data = addr;
@@ -3586,7 +3593,7 @@ mark_tls_slots (void *addr, MonoGCMarkFunc mark_func)
                        void ** p = ptr;
                        while (bmap) {
                                if ((bmap & 1) && *p) {
-                                       mark_func (p);
+                                       mark_func (p, gc_data);
                                }
                                p++;
                                bmap >>= 1;
@@ -3740,6 +3747,12 @@ search_tls_slot_in_freelist (StaticDataInfo *static_data, guint32 size, guint32
        return NULL;
 }
 
+#if SIZEOF_VOID_P == 4
+#define ONE_P 1
+#else
+#define ONE_P 1ll
+#endif
+
 static void
 update_tls_reference_bitmap (guint32 offset, uintptr_t *bitmap, int numbits)
 {
@@ -3753,8 +3766,8 @@ update_tls_reference_bitmap (guint32 offset, uintptr_t *bitmap, int numbits)
        offset /= sizeof (gpointer);
        /* offset is now the bitmap offset */
        for (i = 0; i < numbits; ++i) {
-               if (bitmap [i / sizeof (uintptr_t)] & (1L << (i & (sizeof (uintptr_t) * 8 -1))))
-                       rb [(offset + i) / (sizeof (uintptr_t) * 8)] |= (1L << ((offset + i) & (sizeof (uintptr_t) * 8 -1)));
+               if (bitmap [i / sizeof (uintptr_t)] & (ONE_P << (i & (sizeof (uintptr_t) * 8 -1))))
+                       rb [(offset + i) / (sizeof (uintptr_t) * 8)] |= (ONE_P << ((offset + i) & (sizeof (uintptr_t) * 8 -1)));
        }
 }
 
@@ -4167,7 +4180,7 @@ mono_thread_request_interruption (gboolean running_managed)
                   or similar */
                /* Our implementation of this function ignores the func argument */
 #ifdef HOST_WIN32
-               QueueUserAPC ((PAPCFUNC)dummy_apc, thread->handle, NULL);
+               QueueUserAPC ((PAPCFUNC)dummy_apc, thread->handle, (ULONG_PTR)NULL);
 #else
                wapi_self_interrupt ();
 #endif
@@ -4555,7 +4568,6 @@ abort_thread_internal (MonoInternalThread *thread, gboolean can_raise_exception,
                        mono_thread_info_setup_async_call (info, self_interrupt_thread, NULL);
                mono_thread_info_finish_suspend_and_resume (info);
        } else {
-               gpointer interrupt_handle;
                /* 
                 * This will cause waits to be broken.
                 * It will also prevent the thread from entering a wait, so if the thread returns
@@ -4564,6 +4576,7 @@ abort_thread_internal (MonoInternalThread *thread, gboolean can_raise_exception,
                 * make it return.
                 */
 #ifndef HOST_WIN32
+               gpointer interrupt_handle;
                interrupt_handle = wapi_prepare_interrupt_thread (thread->handle);
 #endif
                mono_thread_info_finish_suspend_and_resume (info);
@@ -4622,7 +4635,9 @@ suspend_thread_internal (MonoInternalThread *thread, gboolean interrupt)
                if (running_managed && !protected_wrapper) {
                        transition_to_suspended (thread, info);
                } else {
+#ifndef HOST_WIN32
                        gpointer interrupt_handle;
+#endif
 
                        if (InterlockedCompareExchange (&thread->interruption_requested, 1, 0) == 0)
                                InterlockedIncrement (&thread_interruption_requested);
index 8a999f81d630dfe950a930fcda893da91a86e9f9..d02816f656a6a3e54c4a29e3833b497c68260953 100644 (file)
@@ -1,7 +1,10 @@
 #ifndef __MONO_METADATA_VERIFY_INTERNAL_H__
 #define __MONO_METADATA_VERIFY_INTERNAL_H__
 
+#include <glib.h>
 #include <mono/metadata/metadata.h>
+#include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-error.h>
 
 G_BEGIN_DECLS
 
@@ -21,7 +24,7 @@ gboolean mono_verifier_is_enabled_for_class (MonoClass *klass) MONO_INTERNAL;
 
 gboolean mono_verifier_is_method_full_trust (MonoMethod *method) MONO_INTERNAL;
 gboolean mono_verifier_is_class_full_trust (MonoClass *klass) MONO_INTERNAL;
-gboolean mono_verifier_class_is_valid_generic_instantiation (MonoClass *class) MONO_INTERNAL;
+gboolean mono_verifier_class_is_valid_generic_instantiation (MonoClass *klass) MONO_INTERNAL;
 gboolean mono_verifier_is_method_valid_generic_instantiation (MonoMethod *method) MONO_INTERNAL;
 
 gboolean mono_verifier_verify_class (MonoClass *klass) MONO_INTERNAL;
index 3c29b116e4c5522eb4a9176455a8c10ee2d8a9c2..50781a4bbf4016b6955b6eb6f6a40211525dc3a3 100644 (file)
@@ -306,8 +306,8 @@ enum {
 
 #ifdef ENABLE_VERIFIER_STATS
 
-#define MEM_ALLOC(amt) do { allocated_memory += (amt); working_set += (amt); } while (0)
-#define MEM_FREE(amt) do { working_set -= (amt); } while (0)
+#define _MEM_ALLOC(amt) do { allocated_memory += (amt); working_set += (amt); } while (0)
+#define _MEM_FREE(amt) do { working_set -= (amt); } while (0)
 
 static int allocated_memory;
 static int working_set;
@@ -338,8 +338,8 @@ init_verifier_stats (void)
 
 #else
 
-#define MEM_ALLOC(amt) do {} while (0)
-#define MEM_FREE(amt) do { } while (0)
+#define _MEM_ALLOC(amt) do {} while (0)
+#define _MEM_FREE(amt) do { } while (0)
 
 #define finish_collect_stats()
 #define init_verifier_stats()
@@ -369,7 +369,7 @@ init_verifier_stats (void)
 static gboolean
 token_bounds_check (MonoImage *image, guint32 token)
 {
-       if (image->dynamic)
+       if (image_is_dynamic (image))
                return mono_reflection_is_valid_dynamic_token ((MonoDynamicImage*)image, token);
        return image->tables [mono_metadata_token_table (token)].rows >= mono_metadata_token_index (token) && mono_metadata_token_index (token) > 0;
 }
@@ -378,7 +378,7 @@ static MonoType *
 mono_type_create_fnptr_from_mono_method (VerifyContext *ctx, MonoMethod *method)
 {
        MonoType *res = g_new0 (MonoType, 1);
-       MEM_ALLOC (sizeof (MonoType));
+       _MEM_ALLOC (sizeof (MonoType));
 
        //FIXME use mono_method_get_signature_full
        res->data.method = mono_method_signature (method);
@@ -1352,8 +1352,6 @@ is_correct_rethrow (MonoMethodHeader *header, guint offset)
                clause = &header->clauses [i];
                if (MONO_OFFSET_IN_HANDLER (clause, offset))
                        return 1;
-               if (MONO_OFFSET_IN_FILTER (clause, offset))
-                       return 1;
        }
        return 0;
 }
@@ -1500,13 +1498,13 @@ ensure_stack_size (ILCodeDesc *stack, int required)
        g_assert (new_size >= required);
 
        tmp = g_new0 (ILStackDesc, new_size);
-       MEM_ALLOC (sizeof (ILStackDesc) * new_size);
+       _MEM_ALLOC (sizeof (ILStackDesc) * new_size);
 
        if (stack->stack) {
                if (stack->size)
                        memcpy (tmp, stack->stack, stack->size * sizeof (ILStackDesc));
                g_free (stack->stack);
-               MEM_FREE (sizeof (ILStackDesc) * stack->max_size);
+               _MEM_FREE (sizeof (ILStackDesc) * stack->max_size);
        }
 
        stack->stack = tmp;
@@ -3219,9 +3217,10 @@ do_invoke_method (VerifyContext *ctx, int method_token, gboolean virtual)
                if (constrained && virtual) {
                        if (!stack_slot_is_managed_pointer (value))
                                CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Object is not a managed pointer for a constrained call at 0x%04x", ctx->ip_offset));
-                       if (!mono_metadata_type_equal_full (mono_type_get_type_byval (value->type), ctx->constrained_type, TRUE))
+                       if (!mono_metadata_type_equal_full (mono_type_get_type_byval (value->type), mono_type_get_underlying_type (ctx->constrained_type), TRUE))
                                CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Object not compatible with constrained type at 0x%04x", ctx->ip_offset));
                        copy.stype |= BOXED_MASK;
+                       copy.type = ctx->constrained_type;
                } else {
                        if (stack_slot_is_managed_pointer (value) && !mono_class_from_mono_type (value->type)->valuetype)
                                CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Cannot call a reference type using a managed pointer to the this arg at 0x%04x", ctx->ip_offset));
@@ -4419,7 +4418,7 @@ static void
 do_ldstr (VerifyContext *ctx, guint32 token)
 {
        GSList *error = NULL;
-       if (ctx->method->wrapper_type == MONO_WRAPPER_NONE && !ctx->image->dynamic) {
+       if (ctx->method->wrapper_type == MONO_WRAPPER_NONE && !image_is_dynamic (ctx->image)) {
                if (mono_metadata_token_code (token) != MONO_TOKEN_STRING) {
                        ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Invalid string token %x at 0x%04x", token, ctx->ip_offset), MONO_EXCEPTION_BAD_IMAGE);
                        return;
@@ -4850,19 +4849,19 @@ mono_method_verify (MonoMethod *method, int level)
 
        ctx.code = g_new (ILCodeDesc, ctx.header->code_size);
        ctx.code_size = ctx.header->code_size;
-       MEM_ALLOC (sizeof (ILCodeDesc) * ctx.header->code_size);
+       _MEM_ALLOC (sizeof (ILCodeDesc) * ctx.header->code_size);
 
        memset(ctx.code, 0, sizeof (ILCodeDesc) * ctx.header->code_size);
 
        ctx.num_locals = ctx.header->num_locals;
        ctx.locals = g_memdup (ctx.header->locals, sizeof (MonoType*) * ctx.header->num_locals);
-       MEM_ALLOC (sizeof (MonoType*) * ctx.header->num_locals);
+       _MEM_ALLOC (sizeof (MonoType*) * ctx.header->num_locals);
 
        if (ctx.num_locals > 0 && !ctx.header->init_locals)
                CODE_NOT_VERIFIABLE (&ctx, g_strdup_printf ("Method with locals variable but without init locals set"));
 
        ctx.params = g_new (MonoType*, ctx.max_args);
-       MEM_ALLOC (sizeof (MonoType*) * ctx.max_args);
+       _MEM_ALLOC (sizeof (MonoType*) * ctx.max_args);
 
        if (ctx.signature->hasthis)
                ctx.params [0] = method->klass->valuetype ? &method->klass->this_arg : &method->klass->byval_arg;
@@ -5002,7 +5001,7 @@ mono_method_verify (MonoMethod *method, int level)
 
        while (ip < end && ctx.valid) {
                int op_size;
-               ip_offset = ip - code_start;
+               ip_offset = (guint) (ip - code_start);
                {
                        const unsigned char *ip_copy = ip;
                        int op;
@@ -5033,7 +5032,7 @@ mono_method_verify (MonoMethod *method, int level)
                        }
                }
 
-               ctx.ip_offset = ip_offset = ip - code_start;
+               ctx.ip_offset = ip_offset =  (guint) (ip - code_start);
 
                /*We need to check against fallthrou in and out of protected blocks.
                 * For fallout we check the once a protected block ends, if the start flag is not set.
@@ -6022,7 +6021,7 @@ mono_verifier_is_enabled_for_image (MonoImage *image)
 gboolean
 mono_verifier_is_method_full_trust (MonoMethod *method)
 {
-       return mono_verifier_is_class_full_trust (method->klass) && !method->dynamic;
+       return mono_verifier_is_class_full_trust (method->klass) && !method_is_dynamic (method);
 }
 
 /*
@@ -6282,7 +6281,7 @@ mono_verifier_verify_class (MonoClass *class)
        if (!class->parent &&
                class != mono_defaults.object_class && 
                !MONO_CLASS_IS_INTERFACE (class) &&
-               (!class->image->dynamic && class->type_token != 0x2000001)) /*<Module> is the first type in the assembly*/
+               (!image_is_dynamic (class->image) && class->type_token != 0x2000001)) /*<Module> is the first type in the assembly*/
                return FALSE;
        if (class->parent) {
                if (MONO_CLASS_IS_INTERFACE (class->parent))
index cd935b50bb78fd589bc654a90f2819d07b3d3fec..f928eec806d3ddb85afc22d2f95875b2b4702f7e 100755 (executable)
@@ -276,9 +276,15 @@ endif
 
 # Create monow.exe, linked for the 'windows' subsystem
 if HOST_WIN32
+if SUPPORT_BOEHM
 monow_LDADD = $(mono_boehm_LDADD)
 monow_LDFLAGS = $(mono_boehm_LDFLAGS) -mwindows
 monow_SOURCES = $(mono_boehm_SOURCES)
+else
+monow_LDADD = $(mono_sgen_LDADD)
+monow_LDFLAGS = $(mono_sgen_LDFLAGS) -mwindows
+monow_SOURCES = $(mono_sgen_SOURCES)
+endif
 endif
 
 genmdesc_SOURCES = \
@@ -426,7 +432,8 @@ common_sources = \
        xdebug.c                        \
        mini-llvm.h                     \
        mini-llvm-cpp.h \
-       alias-analysis.c
+       alias-analysis.c        \
+       mini-cross-helpers.c
 
 test_sources =                         \
        basic-calls.cs          \
index bc5bd8e01265cbb84d5cd94f0ccf07837590c144..c260dae2c7abcf706b005ef0fc5f7e10ea103c50 100644 (file)
@@ -156,6 +156,7 @@ lower_memory_access (MonoCompile *cfg)
                g_hash_table_remove_all (addr_loads);
 
                for (ins = bb->code; ins; ins = ins->next) {
+handle_instruction:
                        switch (ins->opcode) {
                        case OP_LDADDR:
                                g_hash_table_insert (addr_loads, GINT_TO_POINTER (ins->dreg), ins);
@@ -197,7 +198,11 @@ lower_memory_access (MonoCompile *cfg)
                                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);
+                                       if (lower_load (cfg, ins, tmp)) {
+                                               needs_dce = TRUE;
+                                               /* Try to propagate known aliases if an OP_MOVE was inserted */
+                                               goto handle_instruction;
+                                       }
                                }
                                break;
 
@@ -214,7 +219,11 @@ lower_memory_access (MonoCompile *cfg)
                                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);
+                                       if (lower_store (cfg, ins, tmp)) {
+                                               needs_dce = TRUE;
+                                               /* Try to propagate known aliases if an OP_MOVE was inserted */
+                                               goto handle_instruction;
+                                       }
                                }
                                break;
 
@@ -229,6 +238,15 @@ lower_memory_access (MonoCompile *cfg)
                                        needs_dce |= lower_store_imm (cfg, ins, tmp);
                                }
                                break;
+                       case OP_CHECK_THIS:
+                       case OP_NOT_NULL:
+                               tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->sreg1));
+                               if (tmp) {
+                                       if (cfg->verbose_level > 2) { printf ("Found null check over local: "); mono_print_ins (ins); }
+                                       NULLIFY_INS (ins);
+                                       needs_dce = TRUE;
+                               }
+                               break;
                        }
                }
        }
@@ -237,13 +255,14 @@ lower_memory_access (MonoCompile *cfg)
 }
 
 static gboolean
-recompute_aliased_variables (MonoCompile *cfg)
+recompute_aliased_variables (MonoCompile *cfg, int *restored_vars)
 {
        int i;
        MonoBasicBlock *bb;
        MonoInst *ins;
        int kills = 0;
        int adds = 0;
+       *restored_vars = 0;
 
        for (i = 0; i < cfg->num_varinfo; i++) {
                MonoInst *var = cfg->varinfo [i];
@@ -275,7 +294,8 @@ recompute_aliased_variables (MonoCompile *cfg)
                        }
                }
        }
-       
+       *restored_vars = adds;
+
        mono_jit_stats.alias_found += kills;
        mono_jit_stats.alias_removed += kills - adds;
        if (kills > adds) {
@@ -299,6 +319,7 @@ TODO:
 void
 mono_local_alias_analysis (MonoCompile *cfg)
 {
+       int i, restored_vars = 1;
        if (!cfg->has_indirection)
                return;
 
@@ -319,17 +340,18 @@ mono_local_alias_analysis (MonoCompile *cfg)
 
        /*
        Some variables no longer need to be flagged as indirect, find them.
+       Since indirect vars are converted into global vregs, each pass eliminates only one level of indirection.
+       Most cases only need one pass and some 2.
        */
-       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);
+       for (i = 0; i < 3 && restored_vars > 0 && recompute_aliased_variables (cfg, &restored_vars); ++i) {
+               /*
+               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)
index 59569b46563ffd6d0a1b832feb1a0c35a6d557cc..aa04ced89dd20f011d9fa71594f5bdbfd6910623 100644 (file)
@@ -43,6 +43,7 @@
 #include <sys/stat.h>
 
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/tabledefs.h>
 #include <mono/metadata/class.h>
 #include <mono/metadata/object.h>
@@ -111,7 +112,7 @@ struct _ReadOnlyValue {
                gpointer ptr;
        } value;
 };
-static ReadOnlyValue *readonly_values = NULL;
+static ReadOnlyValue *readonly_values;
 
 typedef struct MonoAotOptions {
        char *outfile;
@@ -5324,16 +5325,25 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
        if (use_unwind_ops) {
                guint32 encoded_len;
                guint8 *encoded;
+               guint32 unwind_desc;
 
-               /* 
-                * This is a duplicate of the data in the .debug_frame section, but that
-                * section cannot be accessed using the dl interface.
-                */
                encoded = mono_unwind_ops_encode (cfg->unwind_ops, &encoded_len);
-               encode_value (get_unwind_info_offset (acfg, encoded, encoded_len), p, &p);
-               g_free (encoded);
+
+               unwind_desc = get_unwind_info_offset (acfg, encoded, encoded_len);
+               g_assert (unwind_desc < 0xffff);
+               if (cfg->has_unwind_info_for_epilog) {
+                       /*
+                        * The lower 16 bits identify the unwind descriptor, the upper 16 bits contain the offset of
+                        * the start of the epilog from the end of the method.
+                        */
+                       g_assert (cfg->code_size - cfg->epilog_begin < 0xffff);
+                       encode_value (((cfg->code_size - cfg->epilog_begin) << 16) | unwind_desc, p, &p);
+                       g_free (encoded);
+               } else {
+                       encode_value (unwind_desc, p, &p);
+               }
        } else {
-               encode_value (jinfo->used_regs, p, &p);
+               encode_value (jinfo->unwind_info, p, &p);
        }
 
        /*Encode the number of holes before the number of clauses to make decoding easier*/
@@ -7259,9 +7269,9 @@ emit_code (MonoAotCompile *acfg)
                        fprintf (acfg->fp, "    .no_dead_strip %s\n", symbol);
 
                for (i = 0; i < acfg->nmethods; ++i) {
+#ifdef MONO_ARCH_AOT_SUPPORTED
                        int call_size;
 
-#ifdef MONO_ARCH_AOT_SUPPORTED
                        if (acfg->cfgs [i])
                                arch_emit_direct_call (acfg, acfg->cfgs [i]->asm_symbol, FALSE, acfg->thumb_mixed && acfg->cfgs [i]->compile_llvm, NULL, &call_size);
                        else
@@ -7318,7 +7328,9 @@ emit_code (MonoAotCompile *acfg)
                method = cfg->orig_method;
 
                if (acfg->aot_opts.full_aot && cfg->orig_method->klass->valuetype) {
+#ifdef MONO_ARCH_AOT_SUPPORTED
                        int call_size;
+#endif
 
                        index = get_method_index (acfg, method);
                        sprintf (symbol, "ut_%d", index);
@@ -8257,8 +8269,8 @@ emit_file_info (MonoAotCompile *acfg)
                emit_int32 (acfg, align);
        }
 #else
-       emit_int32 (acfg, __alignof__ (double));
-       emit_int32 (acfg, __alignof__ (gint64));
+       emit_int32 (acfg, MONO_ABI_ALIGNOF (double));
+       emit_int32 (acfg, MONO_ABI_ALIGNOF (gint64));
 #endif
        emit_int32 (acfg, MONO_TRAMPOLINE_NUM);
        emit_int32 (acfg, acfg->tramp_page_size);
index 7ba90850d7ab0f8e6174274e103bf0a83f466dbd..c140ec6e354229a054147083fe8815d2856dc711 100644 (file)
@@ -37,6 +37,7 @@
 #include <sys/wait.h>  /* for WIFEXITED, WEXITSTATUS */
 #endif
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/tabledefs.h>
 #include <mono/metadata/class.h>
 #include <mono/metadata/object.h>
@@ -1341,7 +1342,7 @@ load_aot_module_from_cache (MonoAssembly *assembly, char **aot_name)
 
        *aot_name = NULL;
 
-       if (assembly->image->dynamic)
+       if (image_is_dynamic (assembly->image))
                return NULL;
 
        create_cache_structure ();
@@ -1583,7 +1584,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
                 */
                return;
 
-       if (assembly->image->dynamic || assembly->ref_only)
+       if (image_is_dynamic (assembly->image) || assembly->ref_only)
                return;
 
        if (mono_security_cas_enabled ())
@@ -1677,8 +1678,8 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
                align_int64 = align;
        }
 #else
-       align_double = __alignof__ (double);
-       align_int64 = __alignof__ (gint64);
+       align_double = MONO_ABI_ALIGNOF (double);
+       align_int64 = MONO_ABI_ALIGNOF (gint64);
 #endif
 
        /* Sanity check */
@@ -2291,11 +2292,11 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
                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->unwind_info = mono_cache_unwind_info (info.unw_info, info.unw_info_len);
        jinfo->d.method = method;
        jinfo->code_start = code;
        jinfo->domain_neutral = 0;
-       /* This signals that used_regs points to a normal cached unwind info */
+       /* This signals that unwind_info points to a normal cached unwind info */
        jinfo->from_aot = 0;
        jinfo->num_clauses = ei_len + nested_len;
 
@@ -2377,7 +2378,7 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
 {
        int i, buf_len, num_clauses, len;
        MonoJitInfo *jinfo;
-       guint used_int_regs, flags;
+       guint unwind_info, flags;
        gboolean has_generic_jit_info, has_dwarf_unwind_info, has_clauses, has_seq_points, has_try_block_holes, has_arch_eh_jit_info;
        gboolean from_llvm, has_gc_map;
        guint8 *p;
@@ -2400,13 +2401,10 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
        has_arch_eh_jit_info = (flags & 128) != 0;
 
        if (has_dwarf_unwind_info) {
-               guint32 offset;
-
-               offset = decode_value (p, &p);
-               g_assert (offset < (1 << 30));
-               used_int_regs = offset;
+               unwind_info = decode_value (p, &p);
+               g_assert (unwind_info < (1 << 30));
        } else {
-               used_int_regs = decode_value (p, &p);
+               unwind_info = decode_value (p, &p);
        }
        if (has_generic_jit_info)
                generic_info_size = sizeof (MonoGenericJitInfo);
@@ -2498,17 +2496,28 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
                }
 
                jinfo->code_size = code_len;
-               jinfo->used_regs = used_int_regs;
+               jinfo->unwind_info = unwind_info;
                jinfo->d.method = method;
                jinfo->code_start = code;
                jinfo->domain_neutral = 0;
                jinfo->from_aot = 1;
        }
 
+       /*
+        * Set all the 'has' flags, the mono_jit_info_get () functions depends on this to
+        * compute the addresses of data blocks.
+        */
+       if (has_generic_jit_info)
+               jinfo->has_generic_jit_info = 1;
+       if (has_arch_eh_jit_info)
+               jinfo->has_arch_eh_info = 1;
+       if (has_try_block_holes)
+               jinfo->has_try_block_holes = 1;
+
        if (has_try_block_holes) {
                MonoTryBlockHoleTableJitInfo *table;
 
-               jinfo->has_try_block_holes = 1;
+               g_assert (jinfo->has_try_block_holes);
 
                table = mono_jit_info_get_try_block_hole_table_info (jinfo);
                g_assert (table);
@@ -2525,7 +2534,7 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
        if (has_arch_eh_jit_info) {
                MonoArchEHJitInfo *eh_info;
 
-               jinfo->has_arch_eh_info = 1;
+               g_assert (jinfo->has_arch_eh_info);
 
                eh_info = mono_jit_info_get_arch_eh_info (jinfo);
                eh_info->stack_size = decode_value (p, &p);
@@ -2543,7 +2552,7 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
                MonoGenericJitInfo *gi;
                int len;
 
-               jinfo->has_generic_jit_info = 1;
+               g_assert (jinfo->has_generic_jit_info);
 
                gi = mono_jit_info_get_generic_jit_info (jinfo);
                g_assert (gi);
@@ -2688,7 +2697,8 @@ mono_aot_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len)
                mono_aot_unlock ();
        }
 
-       p = amodule->unwind_info + ji->used_regs;
+       /* The upper 16 bits of ji->unwind_info might contain the epilog offset */
+       p = amodule->unwind_info + (ji->unwind_info & 0xffff);
        *unwind_info_len = decode_value (p, &p);
        return p;
 }
@@ -3353,10 +3363,10 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
                                method = mono_get_method (image, token, NULL);
                        if (method) {
                                char *name = mono_method_full_name (method, TRUE);
-                               printf ("LAST AOT METHOD: %s.\n", name);
+                               g_print ("LAST AOT METHOD: %s.\n", name);
                                g_free (name);
                        } else {
-                               printf ("LAST AOT METHOD: %p %d\n", code, method_index);
+                               g_print ("LAST AOT METHOD: %p %d\n", code, method_index);
                        }
                }
        }
index 41cb62405cb82a0137e5573c04d5d677786123a4..bc3a617e181a09d58ec189dd14a64492dcf8b157 100644 (file)
@@ -129,12 +129,12 @@ class Tests
                return pass_bytes (0, 1, 2, 3, 4, 5, 6);
        }
 
-       static int pass_sbytes (sbyte a, sbyte b, sbyte c, sbyte d, sbyte e, sbyte f, sbyte g) {
-               return (int)(a + b + c + d + e + f + g);
+       static int pass_sbytes (sbyte a, sbyte b, sbyte c, sbyte d, sbyte e, sbyte f, sbyte g, sbyte h1, sbyte h2, sbyte h3, sbyte h4) {
+               return (int)(a + b + c + d + e + f + g + h1 + h2 + h3 + h4);
        }
 
-       public static int test_21_sparc_sbyte_argument_passing () {
-               return pass_sbytes (0, 1, 2, 3, 4, 5, 6);
+       public static int test_55_sparc_sbyte_argument_passing () {
+               return pass_sbytes (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
        }
 
        static int pass_shorts (short a, short b, short c, short d, short e, short f, short g) {
index 96db6ca37fb2cd8d7858d539776a272fc3dcc405..1d81232c3a04dbb80a94811fbdf41ee1766f2285 100644 (file)
@@ -1211,5 +1211,57 @@ class Tests
 
                return (int)res;
        }
+
+       public static int test_0_lrem_imm_1 () {
+               long b = 12L;
+               return (int)(b % 1L);
+       }
+
+       public static int test_0_lrem_imm_1_neg () {
+               long b = -2L;
+               return (int)(b % 1L);
+       }
+
+       public static int test_0_lrem_imm_2 ()
+       {
+               long x = 245345634L;
+               return (int)(x % 2L);
+       }
+
+       public static int test_1_lrem_imm_2 ()
+       {
+               long x = 24534553245L;
+               return (int)(x % 2L);
+       }
+
+       public static int test_1_lrem_imm_2_neg ()
+       {
+               long x = -24534553245L;
+               return -(int)(x % 2L);
+       }
+
+       public static int test_13_lrem_imm_32 ()
+       {
+               long x = 17389L;
+               return (int)(x % 32L);
+       }
+
+       public static int test_27_lrem_imm_32_neg ()
+       {
+               long x = -2435323L;
+               return -(int)(x % 32L);
+       }
+
+       public static int test_5_lrem_imm_large ()
+       {
+               long x = 0x1000000005L;
+               return (int)(x % 0x40000000L);
+       }
+
+       public static int test_5_lrem_imm_too_large ()
+       {
+               long x = 0x1000000005L;
+               return (int)(x % 0x80000000L);
+       }
 }
 
index 5107e999fa308434c59ea086b6991c022a4a57a2..bb6f32f9e6b22279ea5b9d055d83f4a9309f7625 100644 (file)
@@ -293,15 +293,13 @@ amd64_icompare_reg_membase: src1:i src2:b len:8
 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: dest:i len:32
 tls_get_reg: dest:i src1:i len:32
 tls_set: src1:i len:16
 tls_set_reg: src1:i src2: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
 atomic_add_i8: src1:b src2:i dest:i len:32
-atomic_add_new_i8: src1:b src2:i dest:i len:32
+atomic_exchange_i4: src1:b src2:i dest:a len:32
 atomic_exchange_i8: src1:b src2:i dest:a len:32
 atomic_cas_i4: src1:b src2:i src3:a dest:a len:24
 atomic_cas_i8: src1:b src2:i src3:a dest:a len:24
@@ -353,7 +351,6 @@ int_sub_imm: dest:i src1:i clob:1 len:8 nacl:10
 int_mul_imm: dest:i src1:i clob:1 len:32
 int_div_imm: dest:a src1:i clob:d len:32
 int_div_un_imm: dest:a src1:i clob:d len:32
-int_rem_imm: dest:a src1:a len:32 clob:d
 int_rem_un_imm: dest:d src1:i clob:a len:32
 int_and_imm: dest:i src1:i clob:1 len:8
 int_or_imm: dest:i src1:i clob:1 len:8
index 367cb5d4c5a6a54232a7f42839513002a7c29ccd..431936113c35613cc15904147fbc8904ab575fa4 100644 (file)
@@ -347,6 +347,6 @@ gc_liveness_use: len:0
 gc_spill_slot_liveness_def: len:0
 gc_param_slot_liveness_def: len:0
 
+atomic_add_i4: dest:i src1:i src2:i len:64
 atomic_exchange_i4: dest:i src1:i src2:i len:64
 atomic_cas_i4: dest:i src1:i src2:i src3:i len:64
-atomic_add_new_i4: dest:i src1:i src2:i len:64
index d57b6eeda2bf956c85d3f5b4c021ab5391c07655..7d9e40b22664406642de34d258df8576bec3941e 100644 (file)
@@ -414,8 +414,8 @@ arm64_cbzx: src1:i len:16
 arm64_cbnzw: src1:i len:16
 arm64_cbnzx: src1:i len:16
 
-atomic_add_new_i4: dest:i src1:i src2:i len:32
-atomic_add_new_i8: dest:i src1:i src2:i len:32
+atomic_add_i4: dest:i src1:i src2:i len:32
+atomic_add_i8: dest:i src1:i src2:i len:32
 atomic_exchange_i4: dest:i src1:i src2:i len:32
 atomic_exchange_i8: dest:i src1:i src2:i len:32
 atomic_cas_i4: dest:i src1:i src2:i src3:i len:32
index 5d4fec04432cc178c05a6fe646ac4e3213e8b1e0..0bae69301bd1ba0eab51d6cf33e51a0ce8cfd76c 100644 (file)
@@ -153,14 +153,12 @@ endfinally: len:96
 aot_const: dest:i len:48
 tls_get: dest:i len:48
 atomic_add_i4: src1:b src2:i dest:i len:48
-atomic_add_new_i4: src1:b src2:i dest:i len:48
-atomic_exchange_i4: src1:b src2:i dest:i len:48
 atomic_add_i8: src1:b src2:i dest:i len:48
-atomic_add_new_i8: src1:b src2:i dest:i len:48
-atomic_add_imm_new_i4: src1:b dest:i len:48
-atomic_add_imm_new_i8: src1:b dest:i len:48
+atomic_exchange_i4: src1:b src2:i dest:i len:48
 atomic_exchange_i8: src1:b src2:i dest:i len:48
 memory_barrier: len:48
+atomic_add_imm_i4: src1:b dest:i len:48
+atomic_add_imm_i8: src1:b dest:i len:48
 adc: dest:i src1:i src2:i len:48
 addcc: dest:i src1:i src2:i len:48
 subcc: dest:i src1:i src2:i len:48
index f21320cabdeb72f61bf3f32bf977f6d57e5c1fc4..44a482aad1318791135dfa69c99f0fb5d5fb1070 100644 (file)
@@ -313,4 +313,5 @@ vcall2_membase: src1:b len:16 clob:c
 
 jump_table: dest:i len:8
 
-atomic_cas_i4: src1:b src2:i src3:i dest:i len:30
+atomic_add_i4: src1:b src2:i dest:i len:20
+atomic_cas_i4: src1:b src2:i src3:i dest:i len:38
index 4bf27a306eeb686ea491db234ee474803a2a92cc..114bc3cf3b14228052d6b8dcfa07cf59ced16139 100644 (file)
@@ -380,8 +380,7 @@ vcall2_membase: src1:b len:16 clob:c
 
 jump_table: dest:i len:20
 
-atomic_add_new_i4: src1:b src2:i dest:i len:20
-atomic_add_new_i8: src1:b src2:i dest:i len:20
-
-atomic_cas_i4: src1:b src2:i src3:i dest:i len:30
-atomic_cas_i8: src1:b src2:i src3:i dest:i len:30
+atomic_add_i4: src1:b src2:i dest:i len:20
+atomic_add_i8: src1:b src2:i dest:i len:20
+atomic_cas_i4: src1:b src2:i src3:i dest:i len:38
+atomic_cas_i8: src1:b src2:i src3:i dest:i len:38
index be6a3509d1d1f13c5e8a88a455ecdc80d2f8717e..b3dce352ec640faff6fbb71abd21c2aeaab6042c 100644 (file)
@@ -56,8 +56,6 @@ and_imm: dest:i src1:i len:24
 aot_const: dest:i len:8
 atomic_add_i4: src1:b src2:i dest:i len:28
 atomic_add_i8: src1:b src2:i dest:i len:30
-atomic_add_new_i4: src1:b src2:i dest:i len:28
-atomic_add_new_i8: src1:b src2:i dest:i len:30
 atomic_exchange_i4: src1:b src2:i dest:i len:18
 atomic_exchange_i8: src1:b src2:i dest:i len:24
 br: len:6
@@ -118,11 +116,11 @@ float_conv_to_i2: dest:i src1:f len:50
 float_conv_to_i4: dest:i src1:f len:50
 float_conv_to_i8: dest:l src1:f len:50
 float_conv_to_i: dest:i src1:f len:52
-float_conv_to_r4: dest:f src1:f len:4
-float_conv_to_u1: dest:i src1:f len:66
-float_conv_to_u2: dest:i src1:f len:66
-float_conv_to_u4: dest:i src1:f len:66
-float_conv_to_u8: dest:i src1:f len:66
+float_conv_to_r4: dest:f src1:f len:8
+float_conv_to_u1: dest:i src1:f len:72
+float_conv_to_u2: dest:i src1:f len:72
+float_conv_to_u4: dest:i src1:f len:72
+float_conv_to_u8: dest:i src1:f len:72
 float_conv_to_u: dest:i src1:f len:36
 float_div: dest:f src1:f src2:f len:6
 float_div_un: dest:f src1:f src2:f len:6
@@ -135,27 +133,25 @@ float_sub: dest:f src1:f src2:f len:6
 fmove: dest:f src1:f len:4
 i8const: dest:i len:20
 icompare: src1:i src2:i len:4
-icompare_imm: src1:i len:14
+icompare_imm: src1:i len:18
 iconst: dest:i len:40
-
-
 jmp: len:46
 label: len:0
 lcall: dest:o len:22 clob:c
 lcall_membase: dest:o src1:b len:12 clob:c
 lcall_reg: dest:o src1:i len:8 clob:c
 lcompare: src1:i src2:i len:4
-load_membase: dest:i src1:b len:26
+load_membase: dest:i src1:b len:30
 loadi1_membase: dest:i src1:b len:40
-loadi2_membase: dest:i src1:b len:26
-loadi4_membase: dest:i src1:b len:26
-loadi8_membase: dest:i src1:b len:26
+loadi2_membase: dest:i src1:b len:30
+loadi4_membase: dest:i src1:b len:30
+loadi8_membase: dest:i src1:b len:30
 loadr4_membase: dest:f src1:b len:28
 loadr8_membase: dest:f src1:b len:28
-loadu1_membase: dest:i src1:b len:26
-loadu2_membase: dest:i src1:b len:26
+loadu1_membase: dest:i src1:b len:30
+loadu2_membase: dest:i src1:b len:30
 loadu4_mem: dest:i len:8
-loadu4_membase: dest:i src1:b len:26
+loadu4_membase: dest:i src1:b len:30
 localloc: dest:i src1:i len:106
 memory_barrier: len: 10
 move: dest:i src1:i len:4
@@ -177,7 +173,7 @@ s390_move: len:48 dest:b src1:b
 s390_setf4ret: dest:f src1:f len:4
 sbb: dest:i src1:i src2:i len:6
 sbb_imm: dest:i src1:i len:14
-seq_point: len:36
+seq_point: len:54
 sext_i4: dest:i src1:i len:4
 zext_i4: dest:i src1:i len:4
 shl_imm: dest:i src1:i len:10
index b239ed0e765f40303b93c9b69231189fde888ee1..ca87f2fba43975024ef370c2b354e99cd5665240 100644 (file)
@@ -149,7 +149,7 @@ call_membase: dest:a src1:b len:16 nacl:18 clob:c
 iconst: dest:i len:5
 r4const: dest:f len:15
 r8const: dest:f len:16
-store_membase_imm: dest:b len:10
+store_membase_imm: dest:b len:11
 store_membase_reg: dest:b src1:i len:7
 storei1_membase_imm: dest:b len:10
 storei1_membase_reg: dest:b src1:y len:7
@@ -301,12 +301,11 @@ bigmul: len:2 dest:l src1:a src2:i
 bigmul_un: len:2 dest:l src1:a src2:i
 sext_i1: dest:i src1:y len:3
 sext_i2: dest:i src1:y len:3
-tls_get: dest:i len:20
+tls_get: dest:i len:32
 tls_get_reg: dest:i src1:i len:20
 tls_set: src1:i len:20
 tls_set_reg: src1:i src2:i len:20
 atomic_add_i4: src1:b src2:i dest:i len:16
-atomic_add_new_i4: src1:b src2:i dest:i len:16
 atomic_exchange_i4: src1:b src2:i dest:a len:24
 atomic_cas_i4: src1:b src2:i src3:a dest:a len:24
 memory_barrier: len:16
index 3167fa5a4733330e975f4e6c8178a71d38a6f55f..742b6e93d9df10da151e554ffda327953d4e7895 100644 (file)
@@ -689,7 +689,7 @@ mono_debug_print_vars (gpointer ip, gboolean only_arguments)
  * breakpoint when the method is JITed.
  */
 
-static GPtrArray *breakpoints = NULL;
+static GPtrArray *breakpoints;
 
 static int
 mono_debugger_insert_breakpoint_full (MonoMethodDesc *desc)
index 0c809062b867bb0d739c3a2c329f70bc6a7e53a8..d902826ab2807876bb0f589ad1b55726178a92ac 100644 (file)
@@ -47,6 +47,7 @@
 #ifdef HOST_WIN32
 #ifdef _MSC_VER
 #include <winsock2.h>
+#include <process.h>
 #endif
 #include <ws2tcpip.h>
 #ifdef __GNUC__
@@ -288,7 +289,7 @@ typedef struct {
 #define HEADER_LENGTH 11
 
 #define MAJOR_VERSION 2
-#define MINOR_VERSION 34
+#define MINOR_VERSION 36
 
 typedef enum {
        CMD_SET_VM = 1,
@@ -356,7 +357,8 @@ typedef enum {
        MOD_KIND_STEP = 10,
        MOD_KIND_ASSEMBLY_ONLY = 11,
        MOD_KIND_SOURCE_FILE_ONLY = 12,
-       MOD_KIND_TYPE_NAME_ONLY = 13
+       MOD_KIND_TYPE_NAME_ONLY = 13,
+       MOD_KIND_NONE = 14
 } ModifierKind;
 
 typedef enum {
@@ -399,7 +401,9 @@ typedef enum {
 
 typedef enum {
        INVOKE_FLAG_DISABLE_BREAKPOINTS = 1,
-       INVOKE_FLAG_SINGLE_THREADED = 2
+       INVOKE_FLAG_SINGLE_THREADED = 2,
+       INVOKE_FLAG_RETURN_OUT_THIS = 4,
+       INVOKE_FLAG_RETURN_OUT_ARGS = 8
 } InvokeFlags;
 
 typedef enum {
@@ -677,6 +681,7 @@ static gboolean embedding;
 static FILE *log_file;
 
 /* Assemblies whose assembly load event has no been sent yet */
+/* Protected by the dbg lock */
 static GPtrArray *pending_assembly_loads;
 
 /* Whenever the debugger thread has exited */
@@ -691,8 +696,8 @@ static mono_mutex_t debugger_thread_exited_mutex;
 static DebuggerProfiler debugger_profiler;
 
 /* The single step request instance */
-static SingleStepReq *ss_req = NULL;
-static gpointer ss_invoke_addr = NULL;
+static SingleStepReq *ss_req;
+static gpointer ss_invoke_addr;
 
 #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
 /* Number of single stepping operations in progress */
@@ -718,6 +723,10 @@ static gboolean buffer_replies;
 static ReplyPacket reply_packets [128];
 int nreply_packets;
 
+#define dbg_lock() EnterCriticalSection (&debug_mutex)
+#define dbg_unlock() LeaveCriticalSection (&debug_mutex)
+static CRITICAL_SECTION debug_mutex;
+
 static void transport_init (void);
 static void transport_connect (const char *address);
 static gboolean transport_handshake (void);
@@ -952,6 +961,8 @@ mono_debugger_agent_parse_options (char *options)
 void
 mono_debugger_agent_init (void)
 {
+       InitializeCriticalSection (&debug_mutex);
+
        if (!agent_config.enabled)
                return;
 
@@ -1426,6 +1437,41 @@ register_socket_transport (void)
        register_transport (&trans);
 }
 
+/*
+ * socket_fd_transport_connect:
+ *
+ */
+static void
+socket_fd_transport_connect (const char *address)
+{
+       int res;
+
+       res = sscanf (address, "%d", &conn_fd);
+       if (res != 1) {
+               fprintf (stderr, "debugger-agent: socket-fd transport address is invalid: '%s'\n", address);
+               exit (1);
+       }
+
+       if (!transport_handshake ())
+               exit (1);
+}
+
+static void
+register_socket_fd_transport (void)
+{
+       DebuggerTransport trans;
+
+       /* This is the same as the 'dt_socket' transport, but receives an already connected socket fd */
+       trans.name = "socket-fd";
+       trans.connect = socket_fd_transport_connect;
+       trans.close1 = socket_transport_close1;
+       trans.close2 = socket_transport_close2;
+       trans.send = socket_transport_send;
+       trans.recv = socket_transport_recv;
+
+       register_transport (&trans);
+}
+
 #endif /* DISABLE_SOCKET_TRANSPORT */
 
 /*
@@ -1464,6 +1510,7 @@ transport_init (void)
 
 #ifndef DISABLE_SOCKET_TRANSPORT
        register_socket_transport ();
+       register_socket_fd_transport ();
 #endif
 
        for (i = 0; i < ntransports; ++i) {
@@ -1893,6 +1940,9 @@ typedef struct {
 
 /* Maps objid -> ObjRef */
 static GHashTable *objrefs;
+static GHashTable *obj_to_objref;
+/* Protected by the dbg lock */
+static MonoGHashTable *suspended_objs;
 
 static void
 free_objref (gpointer value)
@@ -1908,6 +1958,9 @@ static void
 objrefs_init (void)
 {
        objrefs = g_hash_table_new_full (NULL, NULL, NULL, free_objref);
+       obj_to_objref = g_hash_table_new (NULL, NULL);
+       suspended_objs = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_KEY_GC);
+       MONO_GC_REGISTER_ROOT_FIXED (suspended_objs);
 }
 
 static void
@@ -1917,9 +1970,6 @@ objrefs_cleanup (void)
        objrefs = NULL;
 }
 
-static GHashTable *obj_to_objref;
-static MonoGHashTable *suspended_objs;
-
 /*
  * Return an ObjRef for OBJ.
  */
@@ -1933,20 +1983,16 @@ get_objref (MonoObject *obj)
        if (obj == NULL)
                return 0;
 
-       mono_loader_lock ();
-
-       if (!obj_to_objref) {
-               obj_to_objref = g_hash_table_new (NULL, NULL);
-               suspended_objs = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_KEY_GC);
-               MONO_GC_REGISTER_ROOT_FIXED (suspended_objs);
-       }
-
        if (suspend_count) {
                /*
                 * Have to keep object refs created during suspensions alive for the duration of the suspension, so GCs during invokes don't collect them.
                 */
+               dbg_lock ();
                mono_g_hash_table_insert (suspended_objs, obj, NULL);
+               dbg_unlock ();
        }
+
+       mono_loader_lock ();
        
        /* FIXME: The tables can grow indefinitely */
 
@@ -2002,9 +2048,9 @@ true_pred (gpointer key, gpointer value, gpointer user_data)
 static void
 clear_suspended_objs (void)
 {
-       mono_loader_lock ();
+       dbg_lock ();
        mono_g_hash_table_foreach_remove (suspended_objs, true_pred, NULL);
-       mono_loader_unlock ();
+       dbg_unlock ();
 }
 
 static inline int
@@ -2120,6 +2166,7 @@ typedef struct {
 } AgentDomainInfo;
 
 /* Maps id -> Id */
+/* Protected by the dbg lock */
 static GPtrArray *ids [ID_NUM];
 
 static void
@@ -2187,6 +2234,7 @@ mono_debugger_agent_free_domain_info (MonoDomain *domain)
        domain_jit_info (domain)->agent_info = NULL;
 
        /* Clear ids referencing structures in the domain */
+       dbg_lock ();
        for (i = 0; i < ID_NUM; ++i) {
                if (ids [i]) {
                        for (j = 0; j < ids [i]->len; ++j) {
@@ -2196,6 +2244,7 @@ mono_debugger_agent_free_domain_info (MonoDomain *domain)
                        }
                }
        }
+       dbg_unlock ();
 
        mono_loader_lock ();
        g_hash_table_remove (domains, domain);
@@ -2248,6 +2297,8 @@ get_id (MonoDomain *domain, IdType type, gpointer val)
                return id->id;
        }
 
+       dbg_lock ();
+
        id = g_new0 (Id, 1);
        /* Reserve id 0 */
        id->id = ids [type]->len + 1;
@@ -2255,10 +2306,11 @@ get_id (MonoDomain *domain, IdType type, gpointer val)
        id->data.val = val;
 
        g_hash_table_insert (info->val_to_id [type], val, id);
+       g_ptr_array_add (ids [type], id);
 
-       mono_domain_unlock (domain);
+       dbg_unlock ();
 
-       g_ptr_array_add (ids [type], id);
+       mono_domain_unlock (domain);
 
        mono_loader_unlock ();
 
@@ -2280,11 +2332,11 @@ decode_ptr_id (guint8 *buf, guint8 **endbuf, guint8 *limit, IdType type, MonoDom
                return NULL;
 
        // FIXME: error handling
-       mono_loader_lock ();
+       dbg_lock ();
        g_assert (id > 0 && id <= ids [type]->len);
 
        res = g_ptr_array_index (ids [type], GPOINTER_TO_INT (id - 1));
-       mono_loader_unlock ();
+       dbg_unlock ();
 
        if (res->domain == NULL) {
                DEBUG (0, fprintf (log_file, "ERR_UNLOADED, id=%d, type=%d.\n", id, type));
@@ -2696,7 +2748,9 @@ notify_thread (gpointer key, gpointer value, gpointer user_data)
        MonoInternalThread *thread = key;
        DebuggerTlsData *tls = value;
        gsize tid = thread->tid;
+#ifndef HOST_WIN32
        int res;
+#endif
 
        if (GetCurrentThreadId () == tid || tls->terminated)
                return;
@@ -2723,7 +2777,7 @@ notify_thread (gpointer key, gpointer value, gpointer user_data)
 
        /* This is _not_ equivalent to ves_icall_System_Threading_Thread_Abort () */
 #ifdef HOST_WIN32
-       QueueUserAPC (notify_thread_apc, thread->handle, NULL);
+       QueueUserAPC (notify_thread_apc, thread->handle, (ULONG_PTR)NULL);
 #else
        if (mono_thread_info_new_interrupt_enabled ()) {
                MonoThreadInfo *info;
@@ -2945,7 +2999,9 @@ invalidate_frames (DebuggerTlsData *tls)
 static void
 suspend_current (void)
 {
+#ifndef HOST_WIN32
        int err;
+#endif
        DebuggerTlsData *tls;
 
        g_assert (debugger_thread_id != GetCurrentThreadId ());
@@ -4056,9 +4112,9 @@ static void
 assembly_load (MonoProfiler *prof, MonoAssembly *assembly, int result)
 {
        /* Sent later in jit_end () */
-       mono_loader_lock ();
+       dbg_lock ();
        g_ptr_array_add (pending_assembly_loads, assembly);
-       mono_loader_unlock ();
+       dbg_unlock ();
 }
 
 static void
@@ -4179,12 +4235,12 @@ jit_end (MonoProfiler *prof, MonoMethod *method, MonoJitInfo *jinfo, int result)
                MonoAssembly *assembly = NULL;
 
                // FIXME: Maybe store this in TLS so the thread of the event is correct ?
-               mono_loader_lock ();
+               dbg_lock ();
                if (pending_assembly_loads->len > 0) {
                        assembly = g_ptr_array_index (pending_assembly_loads, 0);
                        g_ptr_array_remove_index (pending_assembly_loads, 0);
                }
-               mono_loader_unlock ();
+               dbg_unlock ();
 
                if (assembly) {
                        process_profiler_event (EVENT_KIND_ASSEMBLY_LOAD, assembly);
@@ -4312,9 +4368,12 @@ insert_breakpoint (MonoSeqPointInfo *seq_points, MonoDomain *domain, MonoJitInfo
 
        g_ptr_array_add (bp->children, inst);
 
+       mono_loader_unlock ();
+
+       dbg_lock ();
        count = GPOINTER_TO_INT (g_hash_table_lookup (bp_locs, inst->ip));
        g_hash_table_insert (bp_locs, inst->ip, GINT_TO_POINTER (count + 1));
-       mono_loader_unlock ();
+       dbg_unlock ();
 
        if (sp->native_offset == SEQ_POINT_NATIVE_OFFSET_DEAD_CODE) {
                DEBUG (1, fprintf (log_file, "[dbg] Attempting to insert seq point at dead IL offset %d, ignoring.\n", (int)bp->il_offset));
@@ -4326,7 +4385,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 (jinfo_get_method (ji), TRUE), (int)sp->il_offset));       
+       DEBUG(1, fprintf (log_file, "[dbg] Inserted breakpoint at %s:0x%x [%p](%d).\n", mono_method_full_name (jinfo_get_method (ji), TRUE), (int)sp->il_offset, inst->ip, count));
 }
 
 static void
@@ -4337,15 +4396,16 @@ remove_breakpoint (BreakpointInstance *inst)
        MonoJitInfo *ji = inst->ji;
        guint8 *ip = inst->ip;
 
-       mono_loader_lock ();
+       dbg_lock ();
        count = GPOINTER_TO_INT (g_hash_table_lookup (bp_locs, ip));
        g_hash_table_insert (bp_locs, ip, GINT_TO_POINTER (count - 1));
-       mono_loader_unlock ();
+       dbg_unlock ();
 
        g_assert (count > 0);
 
        if (count == 1 && inst->native_offset != SEQ_POINT_NATIVE_OFFSET_DEAD_CODE) {
                mono_arch_clear_breakpoint (ji, ip);
+               DEBUG(1, fprintf (log_file, "[dbg] Clear breakpoint at %s [%p].\n", mono_method_full_name (jinfo_get_method (ji), TRUE), ip));
        }
 #else
        NOT_IMPLEMENTED;
@@ -5412,6 +5472,25 @@ ss_destroy (SingleStepReq *req)
        ss_req = NULL;
 }
 
+static void
+ss_clear_for_assembly (SingleStepReq *req, MonoAssembly *assembly)
+{
+       GSList *l;
+       gboolean found = TRUE;
+
+       while (found) {
+               found = FALSE;
+               for (l = ss_req->bps; l; l = l->next) {
+                       if (breakpoint_matches_assembly (l->data, assembly)) {
+                               clear_breakpoint (l->data);
+                               ss_req->bps = g_slist_delete_link (ss_req->bps, l);
+                               found = TRUE;
+                               break;
+                       }
+               }
+       }
+}
+
 /*
  * Called from metadata by the icall for System.Diagnostics.Debugger:Log ().
  */
@@ -6311,28 +6390,47 @@ clear_event_request (int req_id, int etype)
        mono_loader_unlock ();
 }
 
-static gboolean
-event_req_matches_assembly (EventRequest *req, MonoAssembly *assembly)
+static void
+clear_assembly_from_modifier (EventRequest *req, Modifier *m, MonoAssembly *assembly)
 {
-       if (req->event_kind == EVENT_KIND_BREAKPOINT)
-               return breakpoint_matches_assembly (req->info, assembly);
-       else {
-               int i, j;
+       int i;
 
-               for (i = 0; i < req->nmodifiers; ++i) {
-                       Modifier *m = &req->modifiers [i];
+       if (m->kind == MOD_KIND_EXCEPTION_ONLY && m->data.exc_class && m->data.exc_class->image->assembly == assembly)
+               m->kind = MOD_KIND_NONE;
+       if (m->kind == MOD_KIND_ASSEMBLY_ONLY && m->data.assemblies) {
+               int count = 0, match_count = 0, pos;
+               MonoAssembly **newassemblies;
 
-                       if (m->kind == MOD_KIND_EXCEPTION_ONLY && m->data.exc_class && m->data.exc_class->image->assembly == assembly)
-                               return TRUE;
-                       if (m->kind == MOD_KIND_ASSEMBLY_ONLY && m->data.assemblies) {
-                               for (j = 0; m->data.assemblies [j]; ++j)
-                                       if (m->data.assemblies [j] == assembly)
-                                               return TRUE;
-                       }
+               for (i = 0; m->data.assemblies [i]; ++i) {
+                       count ++;
+                       if (m->data.assemblies [i] == assembly)
+                               match_count ++;
+               }
+
+               if (match_count) {
+                       newassemblies = g_new0 (MonoAssembly*, count - match_count);
+
+                       pos = 0;
+                       for (i = 0; i < count; ++i)
+                               if (m->data.assemblies [i] != assembly)
+                                       newassemblies [pos ++] = m->data.assemblies [i];
+                       g_assert (pos == count - match_count);
+                       g_free (m->data.assemblies);
+                       m->data.assemblies = newassemblies;
                }
        }
+}
 
-       return FALSE;
+static void
+clear_assembly_from_modifiers (EventRequest *req, MonoAssembly *assembly)
+{
+       int i;
+
+       for (i = 0; i < req->nmodifiers; ++i) {
+               Modifier *m = &req->modifiers [i];
+
+               clear_assembly_from_modifier (req, m, assembly);
+       }
 }
 
 /*
@@ -6353,11 +6451,16 @@ clear_event_requests_for_assembly (MonoAssembly *assembly)
                for (i = 0; i < event_requests->len; ++i) {
                        EventRequest *req = g_ptr_array_index (event_requests, i);
 
-                       if (event_req_matches_assembly (req, assembly)) {
+                       clear_assembly_from_modifiers (req, assembly);
+
+                       if (req->event_kind == EVENT_KIND_BREAKPOINT && breakpoint_matches_assembly (req->info, assembly)) {
                                clear_event_request (req->id, req->event_kind);
                                found = TRUE;
                                break;
                        }
+
+                       if (req->event_kind == EVENT_KIND_STEP)
+                               ss_clear_for_assembly (req->info, assembly);
                }
        }
        mono_loader_unlock ();
@@ -6494,9 +6597,14 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
                        err = decode_value (sig->params [i], domain, (guint8*)&args [i], p, &p, end);
                        if (err)
                                break;
-
                        if (args [i] && ((MonoObject*)args [i])->vtable->domain != domain)
                                NOT_IMPLEMENTED;
+
+                       if (sig->params [i]->byref) {
+                               arg_buf [i] = g_alloca (sizeof (mgreg_t));
+                               *(gpointer*)arg_buf [i] = args [i];
+                               args [i] = arg_buf [i];
+                       }
                } else {
                        arg_buf [i] = g_alloca (mono_class_instance_size (mono_class_from_mono_type (sig->params [i])));
                        err = decode_value (sig->params [i], domain, arg_buf [i], p, &p, end);
@@ -6517,7 +6625,6 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
        /* 
         * Add an LMF frame to link the stack frames on the invoke method with our caller.
         */
-       /* FIXME: Move this to arch specific code */
 #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
        if (invoke->has_ctx) {
                MonoLMF **lmf_addr;
@@ -6546,7 +6653,14 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
                buffer_add_byte (buf, 0);
                buffer_add_value (buf, &mono_defaults.object_class->byval_arg, &exc, domain);
        } else {
-               buffer_add_byte (buf, 1);
+               gboolean out_this = FALSE;
+               gboolean out_args = FALSE;
+
+               if ((invoke->flags & INVOKE_FLAG_RETURN_OUT_THIS) && CHECK_PROTOCOL_VERSION (2, 35))
+                       out_this = TRUE;
+               if ((invoke->flags & INVOKE_FLAG_RETURN_OUT_ARGS) && CHECK_PROTOCOL_VERSION (2, 35))
+                       out_args = TRUE;
+               buffer_add_byte (buf, 1 + (out_this ? 2 : 0) + (out_args ? 4 : 0));
                if (sig->ret->type == MONO_TYPE_VOID) {
                        if (!strcmp (m->name, ".ctor") && !m->klass->valuetype) {
                                buffer_add_value (buf, &mono_defaults.object_class->byval_arg, &this, domain);
@@ -6570,6 +6684,21 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
                } else {
                        NOT_IMPLEMENTED;
                }
+               if (out_this)
+                       /* Return the new value of the receiver after the call */
+                       buffer_add_value (buf, &m->klass->byval_arg, this_buf, domain);
+               if (out_args) {
+                       buffer_add_int (buf, nargs);
+                       for (i = 0; i < nargs; ++i) {
+                               if (MONO_TYPE_IS_REFERENCE (sig->params [i]))
+                                       buffer_add_value (buf, sig->params [i], &args [i], domain);
+                               else if (sig->params [i]->byref)
+                                       /* add_value () does an indirection */
+                                       buffer_add_value (buf, sig->params [i], &arg_buf [i], domain);
+                               else
+                                       buffer_add_value (buf, sig->params [i], arg_buf [i], domain);
+                       }
+               }
        }
 
        tls->disable_breakpoints = FALSE;
@@ -9626,5 +9755,11 @@ mono_debugger_agent_debug_log_is_enabled (void)
        return FALSE;
 }
 
+void
+mono_debugger_agent_unhandled_exception (MonoException *exc)
+{
+       g_assert_not_reached ();
+}
+
 #endif
 
index e9536e9f5291970756ddec139cbdf78df2d270fa..07242d86138e0ce371119ddffa80e7d85e9861fe 100644 (file)
@@ -13,6 +13,7 @@
 #include "jit-icalls.h"
 
 #include <mono/metadata/gc-internal.h>
+#include <mono/metadata/abi-details.h>
 
 #ifndef DISABLE_JIT
 
@@ -476,6 +477,43 @@ mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins)
                break;
 #endif
 
+#if SIZEOF_REGISTER == 8
+       case OP_LREM_IMM:
+#endif
+       case OP_IREM_IMM: {
+               int power = mono_is_power_of_two (ins->inst_imm);
+               if (ins->inst_imm == 1) {
+                       ins->opcode = OP_ICONST;
+                       MONO_INST_NULLIFY_SREGS (ins);
+                       ins->inst_c0 = 0;
+               } else if ((ins->inst_imm > 0) && (ins->inst_imm < (1LL << 32)) && (power != -1)) {
+                       gboolean is_long = ins->opcode == OP_LREM_IMM;
+                       int compensator_reg = alloc_ireg (cfg);
+                       int intermediate_reg;
+
+                       /* Based on gcc code */
+
+                       /* Add compensation for negative numerators */
+
+                       if (power > 1) {
+                               intermediate_reg = compensator_reg;
+                               MONO_EMIT_NEW_BIALU_IMM (cfg, is_long ? OP_LSHR_IMM : OP_SHR_IMM, intermediate_reg, ins->sreg1, is_long ? 63 : 31);
+                       } else {
+                               intermediate_reg = ins->sreg1;
+                       }
+
+                       MONO_EMIT_NEW_BIALU_IMM (cfg, is_long ? OP_LSHR_UN_IMM : OP_SHR_UN_IMM, compensator_reg, intermediate_reg, (is_long ? 64 : 32) - power);
+                       MONO_EMIT_NEW_BIALU (cfg, is_long ? OP_LADD : OP_IADD, ins->dreg, ins->sreg1, compensator_reg);
+                       /* Compute remainder */
+                       MONO_EMIT_NEW_BIALU_IMM (cfg, is_long ? OP_LAND_IMM : OP_AND_IMM, ins->dreg, ins->dreg, (1 << power) - 1);
+                       /* Remove compensation */
+                       MONO_EMIT_NEW_BIALU (cfg, is_long ? OP_LSUB : OP_ISUB, ins->dreg, ins->dreg, compensator_reg);
+
+                       NULLIFY_INS (ins);
+               }
+               break;
+       }
+
        default:
                emulate = TRUE;
                break;
@@ -1519,7 +1557,7 @@ mono_decompose_array_access_opts (MonoCompile *cfg)
                                switch (ins->opcode) {
                                case OP_LDLEN:
                                        NEW_LOAD_MEMBASE_FLAGS (cfg, dest, OP_LOADI4_MEMBASE, ins->dreg, ins->sreg1,
-                                                                                       G_STRUCT_OFFSET (MonoArray, max_length), ins->flags | MONO_INST_INVARIANT_LOAD);
+                                                                                       MONO_STRUCT_OFFSET (MonoArray, max_length), ins->flags | MONO_INST_INVARIANT_LOAD);
                                        MONO_ADD_INS (cfg->cbb, dest);
                                        break;
                                case OP_BOUNDS_CHECK:
@@ -1558,7 +1596,7 @@ mono_decompose_array_access_opts (MonoCompile *cfg)
                                        break;
                                case OP_STRLEN:
                                        MONO_EMIT_NEW_LOAD_MEMBASE_OP_FLAGS (cfg, OP_LOADI4_MEMBASE, ins->dreg,
-                                                                                                                ins->sreg1, G_STRUCT_OFFSET (MonoString, length), ins->flags | MONO_INST_INVARIANT_LOAD);
+                                                                                                                ins->sreg1, MONO_STRUCT_OFFSET (MonoString, length), ins->flags | MONO_INST_INVARIANT_LOAD);
                                        break;
                                default:
                                        break;
index 5855b81ca9792f6248b26d9b0d1c8a0053f2b1c4..3a67c37ecb7f68bf8a9682960791cb4b6a9b584b 100644 (file)
@@ -57,7 +57,7 @@
 #include "version.h"
 #include "debugger-agent.h"
 
-static FILE *mini_stats_fd = NULL;
+static FILE *mini_stats_fd;
 
 static void mini_usage (void);
 
@@ -1308,7 +1308,6 @@ static const char info[] =
 #ifdef HOST_WIN32
 BOOL APIENTRY DllMain (HMODULE module_handle, DWORD reason, LPVOID reserved)
 {
-       int dummy;
        if (!mono_gc_dllmain (module_handle, reason, reserved))
                return FALSE;
 
@@ -1518,9 +1517,6 @@ mono_main (int argc, char* argv[])
        if (g_getenv ("MONO_NO_SMP"))
                mono_set_use_smp (FALSE);
        
-       if (!g_thread_supported ())
-               g_thread_init (NULL);
-
        g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
        g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR);
 
index b81a7dca3a3fa8eced768d1e8f6c1e7b5504d004..2a253a8cef8b5e52f6a0d4c1f4506d3f52970bc9 100644 (file)
 
 #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>
+
 #ifdef HAVE_UCONTEXT_H
 #include <ucontext.h>
 #endif
 
 #include <mono/arch/amd64/amd64-codegen.h>
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/tabledefs.h>
 #include <mono/metadata/threads.h>
@@ -47,7 +43,6 @@ static MonoW32ExceptionHandler segv_handler;
 
 LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter;
 void *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)
@@ -75,8 +70,13 @@ static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
        CONTEXT* ctx;
        MonoContext* sctx;
        LONG res;
+       MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+
+       /* If the thread is not managed by the runtime return early */
+       if (!jit_tls)
+               return EXCEPTION_CONTINUE_SEARCH;
 
-       mono_win_chained_exception_needs_run = FALSE;
+       jit_tls->mono_win_chained_exception_needs_run = FALSE;
        res = EXCEPTION_CONTINUE_EXECUTION;
 
        er = ep->ExceptionRecord;
@@ -114,10 +114,11 @@ static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
                W32_SEH_HANDLE_EX(fpe);
                break;
        default:
+               jit_tls->mono_win_chained_exception_needs_run = TRUE;
                break;
        }
 
-       if (mono_win_chained_exception_needs_run) {
+       if (jit_tls->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.
@@ -207,21 +208,21 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
        amd64_mov_reg_reg (code, AMD64_R11, AMD64_ARG_REG1, 8);
 
        /* Restore all registers except %rip and %r11 */
-       amd64_mov_reg_membase (code, AMD64_RAX, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, rax), 8);
-       amd64_mov_reg_membase (code, AMD64_RCX, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, rcx), 8);
-       amd64_mov_reg_membase (code, AMD64_RDX, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, rdx), 8);
-       amd64_mov_reg_membase (code, AMD64_RBX, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, rbx), 8);
-       amd64_mov_reg_membase (code, AMD64_RBP, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, rbp), 8);
-       amd64_mov_reg_membase (code, AMD64_RSI, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, rsi), 8);
-       amd64_mov_reg_membase (code, AMD64_RDI, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, rdi), 8);
-       //amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, r8), 8);
-       //amd64_mov_reg_membase (code, AMD64_R9, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, r9), 8);
-       //amd64_mov_reg_membase (code, AMD64_R10, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, r10), 8);
-       amd64_mov_reg_membase (code, AMD64_R12, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, r12), 8);
-       amd64_mov_reg_membase (code, AMD64_R13, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, r13), 8);
-       amd64_mov_reg_membase (code, AMD64_R14, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, r14), 8);
+       amd64_mov_reg_membase (code, AMD64_RAX, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, rax), 8);
+       amd64_mov_reg_membase (code, AMD64_RCX, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, rcx), 8);
+       amd64_mov_reg_membase (code, AMD64_RDX, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, rdx), 8);
+       amd64_mov_reg_membase (code, AMD64_RBX, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, rbx), 8);
+       amd64_mov_reg_membase (code, AMD64_RBP, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, rbp), 8);
+       amd64_mov_reg_membase (code, AMD64_RSI, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, rsi), 8);
+       amd64_mov_reg_membase (code, AMD64_RDI, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, rdi), 8);
+       //amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, r8), 8);
+       //amd64_mov_reg_membase (code, AMD64_R9, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, r9), 8);
+       //amd64_mov_reg_membase (code, AMD64_R10, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, r10), 8);
+       amd64_mov_reg_membase (code, AMD64_R12, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, r12), 8);
+       amd64_mov_reg_membase (code, AMD64_R13, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, r13), 8);
+       amd64_mov_reg_membase (code, AMD64_R14, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, r14), 8);
 #if !defined(__native_client_codegen__)
-       amd64_mov_reg_membase (code, AMD64_R15, AMD64_R11,  G_STRUCT_OFFSET (MonoContext, r15), 8);
+       amd64_mov_reg_membase (code, AMD64_R15, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, r15), 8);
 #endif
 
        /*
@@ -232,8 +233,8 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
         * 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_membase (code, AMD64_R8, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, rsp), 8);
+       amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11,  MONO_STRUCT_OFFSET (MonoContext, rip), 8);
        amd64_mov_reg_reg (code, AMD64_RSP, AMD64_R8, 8);
 
        /* jump to the saved IP */
@@ -293,18 +294,18 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
                amd64_alu_reg_imm (code, X86_SUB, AMD64_RSP, 8);
 
        /* set new EBP */
-       amd64_mov_reg_membase (code, AMD64_RBP, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rbp), 8);
+       amd64_mov_reg_membase (code, AMD64_RBP, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rbp), 8);
        /* load callee saved regs */
-       amd64_mov_reg_membase (code, AMD64_RBX, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rbx), 8);
-       amd64_mov_reg_membase (code, AMD64_R12, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r12), 8);
-       amd64_mov_reg_membase (code, AMD64_R13, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r13), 8);
-       amd64_mov_reg_membase (code, AMD64_R14, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r14), 8);
+       amd64_mov_reg_membase (code, AMD64_RBX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rbx), 8);
+       amd64_mov_reg_membase (code, AMD64_R12, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r12), 8);
+       amd64_mov_reg_membase (code, AMD64_R13, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r13), 8);
+       amd64_mov_reg_membase (code, AMD64_R14, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r14), 8);
 #if !defined(__native_client_codegen__)
-       amd64_mov_reg_membase (code, AMD64_R15, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r15), 8);
+       amd64_mov_reg_membase (code, AMD64_R15, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r15), 8);
 #endif
 #ifdef TARGET_WIN32
-       amd64_mov_reg_membase (code, AMD64_RDI, AMD64_ARG_REG1,  G_STRUCT_OFFSET (MonoContext, rdi), 8);
-       amd64_mov_reg_membase (code, AMD64_RSI, AMD64_ARG_REG1,  G_STRUCT_OFFSET (MonoContext, rsi), 8);
+       amd64_mov_reg_membase (code, AMD64_RDI, AMD64_ARG_REG1,  MONO_STRUCT_OFFSET (MonoContext, rdi), 8);
+       amd64_mov_reg_membase (code, AMD64_RSI, AMD64_ARG_REG1,  MONO_STRUCT_OFFSET (MonoContext, rsi), 8);
 #endif
 
        /* call the handler */
@@ -590,6 +591,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                guint8 *cfa;
                guint32 unwind_info_len;
                guint8 *unwind_info;
+               guint8 *epilog;
 
                frame->type = FRAME_TYPE_MANAGED;
 
@@ -602,6 +604,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                printf ("%s %p %p\n", ji->d.method->name, ji->code_start, ip);
                mono_print_unwind_info (unwind_info, unwind_info_len);
                */
+               epilog = (guint8*)ji->code_start + ji->code_size - (ji->unwind_info >> 16);
  
                regs [AMD64_RAX] = new_ctx->rax;
                regs [AMD64_RBX] = new_ctx->rbx;
@@ -619,7 +622,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
                mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, 
                                                   (guint8*)ji->code_start + ji->code_size,
-                                                  ip, regs, MONO_MAX_IREGS + 1, 
+                                                  ip, &epilog, regs, MONO_MAX_IREGS + 1,
                                                   save_locations, MONO_MAX_IREGS, &cfa);
 
                new_ctx->rax = regs [AMD64_RAX];
@@ -642,11 +645,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                /* Adjust IP */
                new_ctx->rip --;
 
-               if (*lmf && ((*lmf) != jit_tls->first_lmf) && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->rsp)) {
-                       /* remove any unused lmf */
-                       *lmf = (gpointer)(((guint64)(*lmf)->previous_lmf) & ~7);
-               }
-
 #ifndef MONO_AMD64_NO_PUSHES
                /* Pop arguments off the stack */
                if (ji->has_arch_eh_info)
@@ -876,11 +874,11 @@ prepare_for_guard_pages (MonoContext *mctx)
 }
 
 static void
-altstack_handle_and_restore (void *sigctx, gpointer obj, gboolean stack_ovf)
+altstack_handle_and_restore (MonoContext *ctx, gpointer obj, gboolean stack_ovf)
 {
        MonoContext mctx;
 
-       mono_arch_sigctx_to_monoctx (sigctx, &mctx);
+       mctx = *ctx;
 
        mono_handle_exception (&mctx, obj);
        if (stack_ovf)
@@ -893,11 +891,10 @@ mono_arch_handle_altstack_exception (void *sigctx, gpointer fault_addr, gboolean
 {
 #if defined(MONO_ARCH_USE_SIGACTION)
        MonoException *exc = NULL;
-       ucontext_t *ctx = (ucontext_t*)sigctx;
        MonoJitInfo *ji = mini_jit_info_table_find (mono_domain_get (), (gpointer)UCONTEXT_REG_RIP (sigctx), NULL);
        gpointer *sp;
        int frame_size;
-       ucontext_t *copied_ctx;
+       MonoContext *copied_ctx;
 
        if (stack_ovf)
                exc = mono_domain_get ()->stack_overflow_ex;
@@ -912,27 +909,15 @@ mono_arch_handle_altstack_exception (void *sigctx, gpointer fault_addr, gboolean
         *   return ip
         * 128 is the size of the red zone
         */
-       frame_size = sizeof (ucontext_t) + sizeof (gpointer) * 4 + 128;
-#ifdef __APPLE__
-       frame_size += sizeof (*ctx->uc_mcontext);
-#endif
+       frame_size = sizeof (MonoContext) + sizeof (gpointer) * 4 + 128;
        frame_size += 15;
        frame_size &= ~15;
        sp = (gpointer)(UCONTEXT_REG_RSP (sigctx) & ~15);
        sp = (gpointer)((char*)sp - frame_size);
-       copied_ctx = (ucontext_t*)(sp + 4);
+       copied_ctx = (MonoContext*)(sp + 4);
        /* the arguments must be aligned */
        sp [-1] = (gpointer)UCONTEXT_REG_RIP (sigctx);
-       /* may need to adjust pointers in the new struct copy, depending on the OS */
-       memcpy (copied_ctx, ctx, sizeof (ucontext_t));
-#ifdef __APPLE__
-       {
-               guint8 * copied_mcontext = (guint8*)copied_ctx + sizeof (ucontext_t);
-               /* uc_mcontext is a pointer, so make a copy which is stored after the ctx */
-               memcpy (copied_mcontext, ctx->uc_mcontext, sizeof (*ctx->uc_mcontext));
-               copied_ctx->uc_mcontext = (void*)copied_mcontext;
-       }
-#endif
+       mono_sigctx_to_monoctx (sigctx, copied_ctx);
        /* at the return form the signal handler execution starts in altstack_handle_and_restore() */
        UCONTEXT_REG_RIP (sigctx) = (unsigned long)altstack_handle_and_restore;
        UCONTEXT_REG_RSP (sigctx) = (unsigned long)(sp - 1);
@@ -1417,36 +1402,25 @@ mono_tasklets_arch_restore (void)
        amd64_mov_reg_reg (code, cont_reg, MONO_AMD64_ARG_REG1, 8);
        amd64_mov_reg_reg (code, AMD64_RAX, MONO_AMD64_ARG_REG2, 8);
        /* setup the copy of the stack */
-       amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, G_STRUCT_OFFSET (MonoContinuation, stack_used_size), sizeof (int));
+       amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, stack_used_size), sizeof (int));
        amd64_shift_reg_imm (code, X86_SHR, AMD64_RCX, 3);
        x86_cld (code);
-       amd64_mov_reg_membase (code, AMD64_RSI, cont_reg, G_STRUCT_OFFSET (MonoContinuation, saved_stack), sizeof (gpointer));
-       amd64_mov_reg_membase (code, AMD64_RDI, cont_reg, G_STRUCT_OFFSET (MonoContinuation, return_sp), sizeof (gpointer));
+       amd64_mov_reg_membase (code, AMD64_RSI, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, saved_stack), sizeof (gpointer));
+       amd64_mov_reg_membase (code, AMD64_RDI, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, return_sp), sizeof (gpointer));
        amd64_prefix (code, X86_REP_PREFIX);
        amd64_movsl (code);
 
        /* now restore the registers from the LMF */
-       amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, G_STRUCT_OFFSET (MonoContinuation, lmf), 8);
-       amd64_mov_reg_membase (code, AMD64_RBX, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rbx), 8);
-       amd64_mov_reg_membase (code, AMD64_RBP, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rbp), 8);
-       amd64_mov_reg_membase (code, AMD64_R12, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, r12), 8);
-       amd64_mov_reg_membase (code, AMD64_R13, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, r13), 8);
-       amd64_mov_reg_membase (code, AMD64_R14, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, r14), 8);
-#if !defined(__native_client_codegen__)
-       amd64_mov_reg_membase (code, AMD64_R15, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, r15), 8);
-#endif
-#ifdef TARGET_WIN32
-       amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rdi), 8);
-       amd64_mov_reg_membase (code, AMD64_RSI, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rsi), 8);
-#endif
-       amd64_mov_reg_membase (code, AMD64_RSP, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rsp), 8);
+       NOT_IMPLEMENTED;
+       amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, lmf), 8);
+       amd64_mov_reg_membase (code, AMD64_RSP, AMD64_RCX, MONO_STRUCT_OFFSET (MonoLMF, rsp), 8);
 
        /* restore the lmf chain */
        /*x86_mov_reg_membase (code, X86_ECX, X86_ESP, 12, 4);
        x86_mov_membase_reg (code, X86_ECX, 0, X86_EDX, 4);*/
 
        /* state is already in rax */
-       amd64_jump_membase (code, cont_reg, G_STRUCT_OFFSET (MonoContinuation, return_ip));
+       amd64_jump_membase (code, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, return_ip));
        g_assert ((code - start) <= kMaxCodeSize);
 
        nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
index 1e8d571de0db339923eeaccf627b0d0d5b25b8e6..d7fd3318f3d1e45a5a27693114a4ab2dbbf551c6 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <mono/arch/arm/arm-codegen.h>
 #include <mono/arch/arm/arm-vfp-codegen.h>
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/tabledefs.h>
 #include <mono/metadata/threads.h>
@@ -61,16 +62,16 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
        ctx_reg = ARMREG_R0;
 
        if (!mono_arch_is_soft_float ()) {
-               ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, fregs));
+               ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, fregs));
                ARM_FLDMD (code, ARM_VFP_D0, 16, ARMREG_IP);
        }
 
        /* move pc to PC */
-       ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, pc));
-       ARM_STR_IMM (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, regs) + (ARMREG_PC * sizeof (mgreg_t)));
+       ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, pc));
+       ARM_STR_IMM (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, regs) + (ARMREG_PC * sizeof (mgreg_t)));
 
        /* restore everything */
-       ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET(MonoContext, regs));
+       ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET(MonoContext, regs));
        ARM_LDM (code, ARMREG_IP, 0xffff);
 
        /* never reached */
@@ -111,8 +112,8 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
 
        /* restore all the regs from ctx (in r0), but not sp, the stack pointer */
        ctx_reg = ARMREG_R0;
-       ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, pc));
-       ARM_ADD_REG_IMM8 (code, ARMREG_LR, ctx_reg, G_STRUCT_OFFSET(MonoContext, regs) + (MONO_ARM_FIRST_SAVED_REG * sizeof (mgreg_t)));
+       ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, pc));
+       ARM_ADD_REG_IMM8 (code, ARMREG_LR, ctx_reg, MONO_STRUCT_OFFSET(MonoContext, regs) + (MONO_ARM_FIRST_SAVED_REG * sizeof (mgreg_t)));
        ARM_LDM (code, ARMREG_LR, MONO_ARM_REGSAVE_MASK);
        /* call handler at eip (r1) and set the first arg with the exception (r2) */
        ARM_MOV_REG_REG (code, ARMREG_R0, ARMREG_R2);
@@ -423,7 +424,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
                mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, 
                                                   (guint8*)ji->code_start + ji->code_size,
-                                                  ip, regs, MONO_MAX_IREGS + 8,
+                                                  ip, NULL, regs, MONO_MAX_IREGS + 8,
                                                   save_locations, MONO_MAX_IREGS, &cfa);
 
                for (i = 0; i < 16; ++i)
@@ -435,11 +436,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                        new_ctx->fregs [8 + i] = regs [MONO_MAX_IREGS + i];
 #endif
 
-               if (*lmf && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->sp)) {
-                       /* remove any unused lmf */
-                       *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~3);
-               }
-
                /* Clear thumb bit */
                new_ctx->pc &= ~1;
 
index abfe26ce30021bdf7b6fa949ad21c3cff9180236..34197145048468a709de54e097cead753f06a2f0 100644 (file)
@@ -413,7 +413,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
                mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, 
                                                   (guint8*)ji->code_start + ji->code_size,
-                                                  ip, regs, MONO_MAX_IREGS,
+                                                  ip, NULL, regs, MONO_MAX_IREGS,
                                                   save_locations, MONO_MAX_IREGS, &cfa);
 
                for (i = 0; i < MONO_MAX_IREGS; ++i)
@@ -421,11 +421,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                new_ctx->sc_pc = regs [mips_ra];
                new_ctx->sc_regs [mips_sp] = (mgreg_t)cfa;
 
-               if (*lmf && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->iregs [mips_sp])) {
-                       /* remove any unused lmf */
-                       *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~3);
-               }
-
                /* we substract 8, so that the IP points into the call instruction */
                MONO_CONTEXT_SET_IP (new_ctx, new_ctx->sc_pc - 8);
 
index ca243dfc6ed183cee82b06c4cf3bb9c1eee45e32..6c3878e97b8e4df6102126330851adae5cea167f 100644 (file)
@@ -550,7 +550,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
                        mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, 
                                                           (guint8*)ji->code_start + ji->code_size,
-                                                          ip, regs, ppc_lr + 1,
+                                                          ip, NULL, regs, ppc_lr + 1,
                                                           save_locations, MONO_MAX_IREGS, &cfa);
 
                        /* we substract 4, so that the IP points into the call instruction */
@@ -561,11 +561,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                                new_ctx->regs [i] = regs [ppc_r13 + i];
                }
 
-               if (*lmf && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->ebp)) {
-                       /* remove any unused lmf */
-                       *lmf = (*lmf)->previous_lmf;
-               }
-
                return TRUE;
        } else if (*lmf) {
                
index 38c4a5b987a41747ecbe637cb7c217b1372029c6..74c8a0f37a3dfc9fb29813eb87029ad251f7421f 100644 (file)
@@ -474,27 +474,17 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
                unwind_info = mono_jinfo_get_unwind_info (ji, &unwind_info_len);
 
-               if (*lmf && ((*lmf) != jit_tls->first_lmf) && 
-                   (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->ebp)) {
-                       /* remove any unused lmf */
-                       *lmf = (*lmf)->previous_lmf;
-               }
-
                address = (char *)ip - (char *)ji->code_start;
 
                memcpy(&regs, &ctx->uc_mcontext.gregs, sizeof(regs));
                mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start,
-                               (guint8 *) ji->code_start + ji->code_size,
-                               ip, regs, 16, save_locations, 
-                               MONO_MAX_IREGS, &cfa);
+                                                  (guint8 *) ji->code_start + ji->code_size,
+                                                  ip, NULL, regs, 16, save_locations,
+                                                  MONO_MAX_IREGS, &cfa);
                memcpy (&new_ctx->uc_mcontext.gregs, &regs, sizeof(regs));
                MONO_CONTEXT_SET_IP(new_ctx, regs[14] - 2);
                MONO_CONTEXT_SET_BP(new_ctx, cfa);
        
-               if (*lmf && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->ebp)) {
-                       /* remove any unused lmf */
-                       *lmf = (*lmf)->previous_lmf;
-               }
                return TRUE;
        } else if (*lmf) {
 
index 20d2f0facefe90102e81875de578903664e8c138..3ebe2e7a29c422b5bc72c2a65e1002cd8a1ad235 100644 (file)
@@ -350,11 +350,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
        if (ji != NULL) {
                frame->type = FRAME_TYPE_MANAGED;
 
-               if (*lmf && (MONO_CONTEXT_GET_BP (ctx) >= (gpointer)(*lmf)->ebp)) {
-                       /* remove any unused lmf */
-                       *lmf = (*lmf)->previous_lmf;
-               }
-
                /* Restore ip and sp from the saved register window */
                window = MONO_SPARC_WINDOW_ADDR (ctx->sp);
                new_ctx->ip = window [sparc_i7 - 16];
index aa10aaad593921b4ef331e96cd14143bbde88914..d335d7ea5c6c3fa92c97b57f891722683410c673 100644 (file)
@@ -9,16 +9,11 @@
 
 #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>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/arch/x86/x86-codegen.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/tabledefs.h>
@@ -47,7 +42,6 @@ static MonoW32ExceptionHandler segv_handler;
 
 LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter;
 gpointer mono_win_vectored_exception_handle;
-extern gboolean mono_win_chained_exception_needs_run;
 extern int (*gUnhandledExceptionHandler)(EXCEPTION_POINTERS*);
 
 #ifndef PROCESS_CALLBACK_FILTER_ENABLED
@@ -95,13 +89,14 @@ mono_win32_get_handle_stackoverflow (void)
        x86_mov_reg_reg (code, X86_EDI, X86_ESP, 4);
 
        /* use the new freed stack from sigcontext */
+       /* XXX replace usage of struct sigcontext with MonoContext so we can use MONO_STRUCT_OFFSET */
        x86_mov_reg_membase (code, X86_ESP, X86_EBX,  G_STRUCT_OFFSET (struct sigcontext, esp), 4);
 
        /* get the current domain */
        x86_call_code (code, mono_domain_get);
 
        /* get stack overflow exception from domain object */
-       x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoDomain, stack_overflow_ex), 4);
+       x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoDomain, stack_overflow_ex), 4);
 
        /* call mono_arch_handle_exception (sctx, stack_overflow_exception_obj) */
        x86_push_reg (code, X86_EAX);
@@ -196,8 +191,13 @@ LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
        CONTEXT* ctx;
        struct sigcontext* sctx;
        LONG res;
+       MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+
+       /* If the thread is not managed by the runtime return early */
+       if (!jit_tls)
+               return EXCEPTION_CONTINUE_SEARCH;
 
-       mono_win_chained_exception_needs_run = FALSE;
+       jit_tls->mono_win_chained_exception_needs_run = FALSE;
        res = EXCEPTION_CONTINUE_EXECUTION;
 
        er = ep->ExceptionRecord;
@@ -234,10 +234,11 @@ LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
                W32_SEH_HANDLE_EX(fpe);
                break;
        default:
+               jit_tls->mono_win_chained_exception_needs_run = TRUE;
                break;
        }
 
-       if (mono_win_chained_exception_needs_run) {
+       if (jit_tls->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.
@@ -321,16 +322,16 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
        x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
 
        /* restore EBX */
-       x86_mov_reg_membase (code, X86_EBX, X86_EAX,  G_STRUCT_OFFSET (MonoContext, ebx), 4);
+       x86_mov_reg_membase (code, X86_EBX, X86_EAX,  MONO_STRUCT_OFFSET (MonoContext, ebx), 4);
 
        /* restore EDI */
-       x86_mov_reg_membase (code, X86_EDI, X86_EAX,  G_STRUCT_OFFSET (MonoContext, edi), 4);
+       x86_mov_reg_membase (code, X86_EDI, X86_EAX,  MONO_STRUCT_OFFSET (MonoContext, edi), 4);
 
        /* restore ESI */
-       x86_mov_reg_membase (code, X86_ESI, X86_EAX,  G_STRUCT_OFFSET (MonoContext, esi), 4);
+       x86_mov_reg_membase (code, X86_ESI, X86_EAX,  MONO_STRUCT_OFFSET (MonoContext, esi), 4);
 
        /* restore EDX */
-       x86_mov_reg_membase (code, X86_EDX, X86_EAX,  G_STRUCT_OFFSET (MonoContext, edx), 4);
+       x86_mov_reg_membase (code, X86_EDX, X86_EAX,  MONO_STRUCT_OFFSET (MonoContext, edx), 4);
 
        /*
         * The context resides on the stack, in the stack frame of the
@@ -342,24 +343,24 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
         */
 
        /* load ESP into EBP */
-       x86_mov_reg_membase (code, X86_EBP, X86_EAX,  G_STRUCT_OFFSET (MonoContext, esp), 4);
+       x86_mov_reg_membase (code, X86_EBP, X86_EAX,  MONO_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);
+       x86_mov_reg_membase (code, X86_ECX, X86_EAX,  MONO_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);
+       x86_mov_reg_membase (code, X86_ECX, X86_EAX,  MONO_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);
+       x86_mov_reg_membase (code, X86_ECX, X86_EAX,  MONO_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);
+       x86_mov_reg_membase (code, X86_ECX, X86_EAX,  MONO_STRUCT_OFFSET (MonoContext, ecx), 4);
 
        /* restore ESP - 12 */
        x86_lea_membase (code, X86_ESP, X86_EBP, -12);
@@ -418,11 +419,11 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
        x86_push_reg (code, X86_EBP);
 
        /* set new EBP */
-       x86_mov_reg_membase (code, X86_EBP, X86_EAX,  G_STRUCT_OFFSET (MonoContext, ebp), 4);
+       x86_mov_reg_membase (code, X86_EBP, X86_EAX,  MONO_STRUCT_OFFSET (MonoContext, ebp), 4);
        /* restore registers used by global register allocation (EBX & ESI) */
-       x86_mov_reg_membase (code, X86_EBX, X86_EAX,  G_STRUCT_OFFSET (MonoContext, ebx), 4);
-       x86_mov_reg_membase (code, X86_ESI, X86_EAX,  G_STRUCT_OFFSET (MonoContext, esi), 4);
-       x86_mov_reg_membase (code, X86_EDI, X86_EAX,  G_STRUCT_OFFSET (MonoContext, edi), 4);
+       x86_mov_reg_membase (code, X86_EBX, X86_EAX,  MONO_STRUCT_OFFSET (MonoContext, ebx), 4);
+       x86_mov_reg_membase (code, X86_ESI, X86_EAX,  MONO_STRUCT_OFFSET (MonoContext, esi), 4);
+       x86_mov_reg_membase (code, X86_EDI, X86_EAX,  MONO_STRUCT_OFFSET (MonoContext, edi), 4);
 
        /* align stack and save ESP */
        x86_mov_reg_reg (code, X86_EDX, X86_ESP, 4);
@@ -815,7 +816,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
                mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, 
                                                   (guint8*)ji->code_start + ji->code_size,
-                                                  ip, regs, MONO_MAX_IREGS + 1,
+                                                  ip, NULL, regs, MONO_MAX_IREGS + 1,
                                                   save_locations, MONO_MAX_IREGS, &cfa);
 
                new_ctx->eax = regs [X86_EAX];
@@ -834,21 +835,8 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                /* Adjust IP */
                new_ctx->eip --;
 
-               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);
-               }
 
+#ifndef MONO_X86_NO_PUSHES
                /* Pop arguments off the stack */
                if (ji->has_arch_eh_info) {
                        int stack_size;
@@ -868,6 +856,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 #endif
                        }
                }
+#endif
 
                return TRUE;
        } else if (*lmf) {
@@ -1219,26 +1208,26 @@ mono_tasklets_arch_restore (void)
         x86_mov_reg_membase (code, X86_EAX, X86_ESP, 8, 4);
 
        /* setup the copy of the stack */
-       x86_mov_reg_membase (code, X86_ECX, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, stack_used_size), 4);
+       x86_mov_reg_membase (code, X86_ECX, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, stack_used_size), 4);
        x86_shift_reg_imm (code, X86_SHR, X86_ECX, 2);
        x86_cld (code);
-       x86_mov_reg_membase (code, X86_ESI, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, saved_stack), 4);
-       x86_mov_reg_membase (code, X86_EDI, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, return_sp), 4);
+       x86_mov_reg_membase (code, X86_ESI, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, saved_stack), 4);
+       x86_mov_reg_membase (code, X86_EDI, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, return_sp), 4);
        x86_prefix (code, X86_REP_PREFIX);
        x86_movsl (code);
 
        /* now restore the registers from the LMF */
-       x86_mov_reg_membase (code, X86_ECX, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, lmf), 4);
-       x86_mov_reg_membase (code, X86_EBX, X86_ECX, G_STRUCT_OFFSET (MonoLMF, ebx), 4);
-       x86_mov_reg_membase (code, X86_EBP, X86_ECX, G_STRUCT_OFFSET (MonoLMF, ebp), 4);
-       x86_mov_reg_membase (code, X86_ESI, X86_ECX, G_STRUCT_OFFSET (MonoLMF, esi), 4);
-       x86_mov_reg_membase (code, X86_EDI, X86_ECX, G_STRUCT_OFFSET (MonoLMF, edi), 4);
+       x86_mov_reg_membase (code, X86_ECX, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, lmf), 4);
+       x86_mov_reg_membase (code, X86_EBX, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, ebx), 4);
+       x86_mov_reg_membase (code, X86_EBP, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, ebp), 4);
+       x86_mov_reg_membase (code, X86_ESI, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, esi), 4);
+       x86_mov_reg_membase (code, X86_EDI, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, edi), 4);
 
        /* restore the lmf chain */
        /*x86_mov_reg_membase (code, X86_ECX, X86_ESP, 12, 4);
        x86_mov_membase_reg (code, X86_ECX, 0, X86_EDX, 4);*/
 
-       x86_jump_membase (code, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, return_ip));
+       x86_jump_membase (code, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, return_ip));
        g_assert ((code - start) <= 48);
        saved = start;
        return (MonoContinuationRestore)saved;
index fe65826ce4dd492759a57dec0abf4bd9a5cb5162..3f8d519677742b280076a4b2718c5fe10f315f40 100644 (file)
@@ -40,6 +40,12 @@ class GFoo3<T> {
 // The tests use arrays to pass/receive values to keep the calling convention of the methods stable, which is a current limitation of the runtime support for gsharedvt.
 //
 
+//
+// Interfaces are used to prevent the AOT compiler from discovering instantiations, thus forcing the usage of the gsharedvt
+// versions of methods. Unused vtype type arguments are used to test gsharedvt methods with ref type arguments, i.e.
+// when calling foo<T,T2> as foo<object,bool>, the gsharedvt version is used, but with a ref type argument.
+//
+
 // FIXME: Add mixed ref/noref tests, i.e. Dictionary<string, int>
 
 #if MOBILE
@@ -1019,6 +1025,7 @@ public class Tests
                return action(null, state);
        }
 
+       [Category ("!FULLAOT")]
        public static int test_0_delegate_wrappers () {
                Func<object, Pair<int, int>, Pair<int, int>> del1 = delegate (object o, Pair<int, int> p) { return p; };
                Func<object, Pair<int, int>, Pair<int, int>> del2 = delegate (object o, Pair<int, int> p) { return p; };
@@ -1459,6 +1466,42 @@ public class Tests
                var c = new ReadOnlyCollection<AnEnum> (arr);
                return c.Contains (AnEnum.Two) == false ? 0 : 1;
        }
+
+       interface IFaceCallPatching {
+               bool caller<T, T2> ();
+       }
+
+       class CallPatching2<T> {
+               T t;
+               public object o;
+
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
+               public bool callee () {
+                       return (string)o == "ABC";
+               }
+       }
+
+       class CallPatching : IFaceCallPatching {
+               public bool caller<T, T2> () {
+                       var c = new CallPatching2<T> ();
+                       c.o = "ABC";
+                       return c.callee ();
+               }
+       }
+
+       //
+       // This tests that generic calls made from gsharedvt methods are not patched normally.
+       // If they are, the first call to 'caller' would patch in the gshared version of
+       // 'callee', causing the second call to fail because the gshared version of callee
+       // wouldn't work with CallPatching2<bool> since it has a different object layout.
+       //
+       public static int test_0_call_patching () {
+               IFaceCallPatching c = new CallPatching ();
+               c.caller<object, bool> ();
+               if (!c.caller<bool, bool> ())
+                       return 1;
+               return 0;
+       }
 }
 
 // #13191
index 43bd17e2fa499d3fe6904a97f71492646718b10b..4c0950163fb8718b90cb20c9feb04f528b81fd0f 100644 (file)
@@ -214,8 +214,14 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id)
 #else
 #if defined(sparc) && !defined(__GNUC__)
 #define DIS_CMD "dis"
-#elif defined(__i386__) || defined(__x86_64__)
+#elif defined(TARGET_X86)
 #define DIS_CMD "objdump -l -d"
+#elif defined(TARGET_AMD64)
+  #if defined(HOST_WIN32)
+  #define DIS_CMD "x86_64-w64-mingw32-objdump.exe -M x86-64 -d"
+  #else
+  #define DIS_CMD "objdump -l -d"
+  #endif
 #else
 #define DIS_CMD "objdump -d"
 #endif
@@ -281,7 +287,7 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id)
        unused = system (cmd);
        g_free (cmd);
 #endif
-       
+
        cmd = g_strdup_printf (ARCH_PREFIX DIS_CMD " %s %s", objdump_args, o_file);
        unused = system (cmd);
        g_free (cmd);
index 62b2b3525a5509a9f2dded8a9443218af17b6711..13c055bd1e1ba03d072608f561c395b7bfae19be 100644 (file)
 #define USE_ELF_WRITER 1
 #endif
 
-#if defined(TARGET_ARM) && !defined(TARGET_MACH)
+#if defined(TARGET_ARM) && !defined(TARGET_MACH) && !defined(HOST_WIN32)
 #define USE_ELF_WRITER 1
 #endif
 
index 9ba92bf3765bb3fb377aba0cdfe547a704c3adb6..c208c2a4b1211f5cd77af89b691867639dbcdfc6 100644 (file)
@@ -933,15 +933,15 @@ static int ccount = 0;
                if (!(cfg->opt & MONO_OPT_ABCREM)) {                                                    \
                        MONO_EMIT_NULL_CHECK (cfg, array_reg);                                          \
                        if (COMPILE_LLVM (cfg)) \
-                               MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \
+                               MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \
                        else \
-                               MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \
+                               MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \
                } else {                                                                                                                \
                        MonoInst *ins;                                                                                          \
                        MONO_INST_NEW ((cfg), ins, OP_BOUNDS_CHECK);                            \
                        ins->sreg1 = array_reg;                                                                         \
                        ins->sreg2 = index_reg;                                                                         \
-                       ins->inst_imm = G_STRUCT_OFFSET (array_type, array_length_field); \
+                       ins->inst_imm = MONO_STRUCT_OFFSET (array_type, array_length_field); \
                        ins->flags |= MONO_INST_FAULT; \
                        MONO_ADD_INS ((cfg)->cbb, ins);                                                         \
                        (cfg)->flags |= MONO_CFG_HAS_ARRAY_ACCESS;                                      \
index 84c6f39c060ee71bee15b5c0b0c38af2d0d75b05..784179c64412c86fa7cdb933f081655e69ec94fc 100644 (file)
@@ -19,7 +19,7 @@ mono_main_with_options (int argc, char *argv [])
                GPtrArray *array = g_ptr_array_new ();
                GString *buffer = g_string_new ("");
                const char *p;
-               int i;
+               unsigned i;
                gboolean in_quotes = FALSE;
                char quote_char = '\0';
 
index 4a9c33d29539581bfa3fe405320247a4801af2aa..7edaa066775ac56963e50395e88bc0272ae55aec 100644 (file)
@@ -33,7 +33,8 @@
 #endif
 
 #include <mono/utils/memcheck.h>
-
+#include "mini.h"
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/attrdefs.h>
 #include <mono/metadata/loader.h>
@@ -60,7 +61,6 @@
 #include <mono/utils/mono-memory-model.h>
 #include <mono/metadata/mono-basic-block.h>
 
-#include "mini.h"
 #include "trace.h"
 
 #include "ir-emit.h"
@@ -139,13 +139,13 @@ int mono_op_to_op_imm_noemul (int opcode);
 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;
-static MonoMethodSignature *helper_sig_domain_get = NULL;
-static MonoMethodSignature *helper_sig_generic_class_init_trampoline = NULL;
-static MonoMethodSignature *helper_sig_generic_class_init_trampoline_llvm = NULL;
-static MonoMethodSignature *helper_sig_rgctx_lazy_fetch_trampoline = NULL;
-static MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline = NULL;
-static MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline_llvm = NULL;
+static MonoMethodSignature *helper_sig_class_init_trampoline;
+static MonoMethodSignature *helper_sig_domain_get;
+static MonoMethodSignature *helper_sig_generic_class_init_trampoline;
+static MonoMethodSignature *helper_sig_generic_class_init_trampoline_llvm;
+static MonoMethodSignature *helper_sig_rgctx_lazy_fetch_trampoline;
+static MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline;
+static MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline_llvm;
 
 /*
  * Instruction metadata
@@ -1523,7 +1523,7 @@ mini_emit_interface_bitmap_check (MonoCompile *cfg, int intf_bit_reg, int base_r
 static void
 mini_emit_load_intf_bit_reg_class (MonoCompile *cfg, int intf_bit_reg, int klass_reg, MonoClass *klass)
 {
-       mini_emit_interface_bitmap_check (cfg, intf_bit_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, interface_bitmap), klass);
+       mini_emit_interface_bitmap_check (cfg, intf_bit_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, interface_bitmap), klass);
 }
 
 /* 
@@ -1533,7 +1533,7 @@ mini_emit_load_intf_bit_reg_class (MonoCompile *cfg, int intf_bit_reg, int klass
 static void
 mini_emit_load_intf_bit_reg_vtable (MonoCompile *cfg, int intf_bit_reg, int vtable_reg, MonoClass *klass)
 {
-       mini_emit_interface_bitmap_check (cfg, intf_bit_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, interface_bitmap), klass);
+       mini_emit_interface_bitmap_check (cfg, intf_bit_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, interface_bitmap), klass);
 }
 
 /* 
@@ -1564,7 +1564,7 @@ mini_emit_max_iid_check_vtable (MonoCompile *cfg, int vtable_reg, MonoClass *kla
 {
        int max_iid_reg = alloc_preg (cfg);
                
-       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, max_iid_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, max_interface_id));
+       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, max_iid_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, max_interface_id));
        mini_emit_max_iid_check (cfg, max_iid_reg, klass, false_target);
 }
 
@@ -1575,7 +1575,7 @@ mini_emit_max_iid_check_class (MonoCompile *cfg, int klass_reg, MonoClass *klass
 {
        int max_iid_reg = alloc_preg (cfg);
 
-       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, max_iid_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, max_interface_id));          
+       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, max_iid_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, max_interface_id));
        mini_emit_max_iid_check (cfg, max_iid_reg, klass, false_target);
 }
 
@@ -1589,11 +1589,11 @@ mini_emit_isninst_cast_inst (MonoCompile *cfg, int klass_reg, MonoClass *klass,
        mono_class_setup_supertypes (klass);
 
        if (klass->idepth > MONO_DEFAULT_SUPERTABLE_SIZE) {
-               MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, idepth));
+               MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, idepth));
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, idepth_reg, klass->idepth);
                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBLT_UN, false_target);
        }
-       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, supertypes));
+       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, supertypes));
        MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stype, stypes_reg, ((klass->idepth - 1) * SIZEOF_VOID_P));
        if (klass_ins) {
                MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, stype, klass_ins->dreg);
@@ -1689,14 +1689,14 @@ mini_emit_castclass_inst (MonoCompile *cfg, int obj_reg, int klass_reg, MonoClas
                int eclass_reg = alloc_preg (cfg);
 
                g_assert (!klass_inst);
-               MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, rank));
+               MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, rank));
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rank_reg, klass->rank);
                MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
-               //              MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, cast_class));
+               //              MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, cast_class));
                if (klass->cast_class == mono_defaults.object_class) {
                        int parent_reg = alloc_preg (cfg);
-                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, G_STRUCT_OFFSET (MonoClass, parent));
+                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, MONO_STRUCT_OFFSET (MonoClass, parent));
                        mini_emit_class_check_branch (cfg, parent_reg, mono_defaults.enum_class->parent, OP_PBNE_UN, object_is_null);
                        mini_emit_class_check (cfg, eclass_reg, mono_defaults.enum_class);
                } else if (klass->cast_class == mono_defaults.enum_class->parent) {
@@ -1714,7 +1714,7 @@ mini_emit_castclass_inst (MonoCompile *cfg, int obj_reg, int klass_reg, MonoClas
                if ((klass->rank == 1) && (klass->byval_arg.type == MONO_TYPE_SZARRAY) && (obj_reg != -1)) {
                        /* Check that the object is a vector too */
                        int bounds_reg = alloc_preg (cfg);
-                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg, obj_reg, G_STRUCT_OFFSET (MonoArray, bounds));
+                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg, obj_reg, MONO_STRUCT_OFFSET (MonoArray, bounds));
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, bounds_reg, 0);
                        MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
                }
@@ -1726,11 +1726,11 @@ mini_emit_castclass_inst (MonoCompile *cfg, int obj_reg, int klass_reg, MonoClas
                mono_class_setup_supertypes (klass);
 
                if (klass->idepth > MONO_DEFAULT_SUPERTABLE_SIZE) {
-                       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, idepth));
+                       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, idepth));
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, idepth_reg, klass->idepth);
                        MONO_EMIT_NEW_COND_EXC (cfg, LT_UN, "InvalidCastException");
                }
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, supertypes));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, supertypes));
                MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stype, stypes_reg, ((klass->idepth - 1) * SIZEOF_VOID_P));
                mini_emit_class_check_inst (cfg, stype, klass, klass_inst);
        }
@@ -1930,7 +1930,7 @@ emit_push_lmf (MonoCompile *cfg)
                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);
+               EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_reg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), lmf_ins->dreg);
                /* Set new LMF */
                emit_tls_set (cfg, lmf_reg, TLS_KEY_LMF);
        } else {
@@ -1947,7 +1947,7 @@ emit_push_lmf (MonoCompile *cfg)
 
                        MONO_ADD_INS (cfg->cbb, ins);
                        lmf_reg = alloc_preg (cfg);
-                       EMIT_NEW_BIALU_IMM (cfg, lmf_ins, OP_PADD_IMM, lmf_reg, jit_tls_dreg, G_STRUCT_OFFSET (MonoJitTlsData, lmf));
+                       EMIT_NEW_BIALU_IMM (cfg, lmf_ins, OP_PADD_IMM, lmf_reg, jit_tls_dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, lmf));
                } else {
                        lmf_ins = mono_emit_jit_icall (cfg, mono_get_lmf_addr, NULL);
                }
@@ -1967,7 +1967,7 @@ emit_push_lmf (MonoCompile *cfg)
                        /* call pthread_getspecific () */
                        jit_tls_ins = mono_emit_jit_icall (cfg, pthread_getspecific, args);
                        /* lmf_addr = &jit_tls->lmf */
-                       EMIT_NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, cfg->lmf_addr_var->dreg, jit_tls_ins->dreg, G_STRUCT_OFFSET (MonoJitTlsData, lmf));
+                       EMIT_NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, cfg->lmf_addr_var->dreg, jit_tls_ins->dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, lmf));
                        lmf_ins = ins;
 #else
                        lmf_ins = mono_emit_jit_icall (cfg, mono_get_lmf_addr, NULL);
@@ -1982,7 +1982,7 @@ emit_push_lmf (MonoCompile *cfg)
                prev_lmf_reg = alloc_preg (cfg);
                /* Save previous_lmf */
                EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, cfg->lmf_addr_var->dreg, 0);
-               EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf), prev_lmf_reg);
+               EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_reg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), prev_lmf_reg);
                /* Set new lmf */
                EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, cfg->lmf_addr_var->dreg, 0, lmf_reg);
        }
@@ -2008,7 +2008,7 @@ emit_pop_lmf (MonoCompile *cfg)
        if (cfg->lmf_ir_mono_lmf && mini_tls_get_supported (cfg, TLS_KEY_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));
+               EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_reg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
                /* Set new LMF */
                emit_tls_set (cfg, prev_lmf_reg, TLS_KEY_LMF);
        } else {
@@ -2022,7 +2022,7 @@ emit_pop_lmf (MonoCompile *cfg)
                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_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_reg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
                EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_addr_reg, 0, prev_lmf_reg);
        }
 }
@@ -2344,7 +2344,6 @@ callvirt_to_call (int opcode)
        return -1;
 }
 
-#ifdef MONO_ARCH_HAVE_IMT
 /* Either METHOD or IMT_ARG needs to be set */
 static void
 emit_imt_argument (MonoCompile *cfg, MonoCallInst *call, MonoMethod *method, MonoInst *imt_arg)
@@ -2398,7 +2397,6 @@ emit_imt_argument (MonoCompile *cfg, MonoCallInst *call, MonoMethod *method, Mon
        mono_arch_emit_imt_argument (cfg, call, imt_arg);
 #endif
 }
-#endif
 
 static MonoJumpInfo *
 mono_patch_info_new (MonoMemPool *mp, int ip, MonoJumpInfoType type, gconstpointer target)
@@ -2755,7 +2753,7 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
 
                        /* Make a call to delegate->invoke_impl */
                        call->inst.inst_basereg = this_reg;
-                       call->inst.inst_offset = G_STRUCT_OFFSET (MonoDelegate, invoke_impl);
+                       call->inst.inst_offset = MONO_STRUCT_OFFSET (MonoDelegate, invoke_impl);
                        MONO_ADD_INS (cfg->cbb, (MonoInst*)call);
 
                        /* We must emit a dummy use here because the delegate trampoline will
@@ -2809,17 +2807,15 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
                        call->inst.opcode = callvirt_to_call (call->inst.opcode);
                } else {
                        vtable_reg = alloc_preg (cfg);
-                       MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, this_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+                       MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, this_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
                        if (method->klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
                                slot_reg = -1;
-#ifdef MONO_ARCH_HAVE_IMT
                                if (mono_use_imt) {
                                        guint32 imt_slot = mono_method_get_imt_slot (method);
                                        emit_imt_argument (cfg, call, call->method, imt_arg);
                                        slot_reg = vtable_reg;
                                        offset = ((gint32)imt_slot - MONO_IMT_SIZE) * SIZEOF_VOID_P;
                                }
-#endif
                                if (slot_reg == -1) {
                                        slot_reg = alloc_preg (cfg);
                                        mini_emit_load_intf_reg_vtable (cfg, slot_reg, vtable_reg, method->klass);
@@ -2827,14 +2823,12 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
                                }
                        } else {
                                slot_reg = vtable_reg;
-                               offset = G_STRUCT_OFFSET (MonoVTable, vtable) +
+                               offset = MONO_STRUCT_OFFSET (MonoVTable, vtable) +
                                        ((mono_method_get_vtable_index (method)) * (SIZEOF_VOID_P));
-#ifdef MONO_ARCH_HAVE_IMT
                                if (imt_arg) {
                                        g_assert (mono_method_signature (method)->generic_param_count);
                                        emit_imt_argument (cfg, call, call->method, imt_arg);
                                }
-#endif
                        }
 
                        call->inst.sreg1 = slot_reg;
@@ -3307,7 +3301,7 @@ emit_get_rgctx (MonoCompile *cfg, MonoMethod *method, int context_used)
                        int vtable_reg;
 
                        vtable_reg = alloc_preg (cfg);
-                       EMIT_NEW_LOAD_MEMBASE (cfg, vtable_var, OP_LOAD_MEMBASE, vtable_reg, mrgctx_var->dreg, G_STRUCT_OFFSET (MonoMethodRuntimeGenericContext, class_vtable));
+                       EMIT_NEW_LOAD_MEMBASE (cfg, vtable_var, OP_LOAD_MEMBASE, vtable_reg, mrgctx_var->dreg, MONO_STRUCT_OFFSET (MonoMethodRuntimeGenericContext, class_vtable));
                        vtable_var->type = STACK_PTR;
                }
 
@@ -3317,7 +3311,7 @@ emit_get_rgctx (MonoCompile *cfg, MonoMethod *method, int context_used)
                int vtable_reg;
        
                vtable_reg = alloc_preg (cfg);
-               EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, vtable_reg, this->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
+               EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, vtable_reg, this->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable));
                return ins;
        }
 }
@@ -3486,7 +3480,7 @@ emit_get_gsharedvt_info (MonoCompile *cfg, gpointer data, MonoRgctxInfoType rgct
        idx = get_gsharedvt_info_slot (cfg, data, rgctx_type);
        /* Load info->entries [idx] */
        dreg = alloc_preg (cfg);
-       EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, cfg->gsharedvt_info_var->dreg, G_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
+       EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, cfg->gsharedvt_info_var->dreg, MONO_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
 
        return ins;
 }
@@ -3569,12 +3563,12 @@ save_cast_details (MonoCompile *cfg, MonoClass *klass, int obj_reg, gboolean nul
                }
 
                MONO_ADD_INS (cfg->cbb, tls_get);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
 
-               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_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, tls_get->dreg, MONO_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);
+               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, tls_get->dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, class_cast_to), to_klass_reg);
 
                if (null_check) {
                        MONO_START_BB (cfg, is_null_bb);
@@ -3593,7 +3587,7 @@ reset_cast_details (MonoCompile *cfg)
 
                MONO_ADD_INS (cfg->cbb, tls_get);
                /* It is enough to reset the from field */
-               MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STORE_MEMBASE_IMM, tls_get->dreg, G_STRUCT_OFFSET (MonoJitTlsData, class_cast_from), 0);
+               MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STORE_MEMBASE_IMM, tls_get->dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, class_cast_from), 0);
        }
 }
 
@@ -3610,11 +3604,11 @@ mini_emit_check_array_type (MonoCompile *cfg, MonoInst *obj, MonoClass *array_cl
 
        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));
+       MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable));
 
        if (cfg->opt & MONO_OPT_SHARED) {
                int class_reg = alloc_preg (cfg);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, class_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, class_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
                if (cfg->compile_aot) {
                        int klass_reg = alloc_preg (cfg);
                        MONO_EMIT_NEW_CLASSCONST (cfg, klass_reg, array_class);
@@ -3700,8 +3694,8 @@ handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, int context_use
        int rank_reg = alloc_dreg (cfg ,STACK_I4);
 
        obj_reg = sp [0]->dreg;
-       MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
-       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, rank));
+       MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, rank));
 
        /* FIXME: generics */
        g_assert (klass->rank == 0);
@@ -3710,8 +3704,8 @@ handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, int context_use
        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rank_reg, 0);
        MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
 
-       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
-       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, element_class));
+       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
+       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, element_class));
 
        if (context_used) {
                MonoInst *element_class;
@@ -4111,12 +4105,12 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context
        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));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
                mini_emit_iface_cast (cfg, vtable_reg, klass, NULL, NULL);
        } else {
                int klass_reg = alloc_preg (cfg);
 
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
 
                if (!klass->rank && !cfg->compile_aot && !(cfg->opt & MONO_OPT_SHARED) && (klass->flags & TYPE_ATTRIBUTE_SEALED)) {
                        /* the remoting code is broken, access the class for now */
@@ -4129,12 +4123,12 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context
                                }
                                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, vtable_reg, vt);
                        } else {
-                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
                                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, klass_reg, klass);
                        }
                        MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
                } else {
-                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
                        mini_emit_castclass_inst (cfg, obj_reg, klass_reg, klass, klass_inst, is_null_bb);
                }
        }
@@ -4195,7 +4189,7 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, obj_reg, 0);
        MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_null_bb);
 
-       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
 
        if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
                g_assert (!context_used);
@@ -4209,14 +4203,14 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
                        int eclass_reg = alloc_preg (cfg);
 
                        g_assert (!context_used);
-                       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, rank));
+                       MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, rank));
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rank_reg, klass->rank);
                        MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, false_bb);
-                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
-                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, cast_class));
+                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
+                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, cast_class));
                        if (klass->cast_class == mono_defaults.object_class) {
                                int parent_reg = alloc_preg (cfg);
-                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, G_STRUCT_OFFSET (MonoClass, parent));
+                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, MONO_STRUCT_OFFSET (MonoClass, parent));
                                mini_emit_class_check_branch (cfg, parent_reg, mono_defaults.enum_class->parent, OP_PBNE_UN, is_null_bb);
                                mini_emit_class_check_branch (cfg, eclass_reg, mono_defaults.enum_class, OP_PBEQ, is_null_bb);
                                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, false_bb);
@@ -4233,7 +4227,7 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
                                if ((klass->rank == 1) && (klass->byval_arg.type == MONO_TYPE_SZARRAY)) {
                                        /* Check that the object is a vector too */
                                        int bounds_reg = alloc_preg (cfg);
-                                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg, obj_reg, G_STRUCT_OFFSET (MonoArray, bounds));
+                                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg, obj_reg, MONO_STRUCT_OFFSET (MonoArray, bounds));
                                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, bounds_reg, 0);
                                        MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, false_bb);
                                }
@@ -4243,7 +4237,7 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
                        }
                } else if (mono_class_is_nullable (klass)) {
                        g_assert (!context_used);
-                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
                        /* the is_null_bb target simply copies the input register to the output */
                        mini_emit_isninst_cast (cfg, klass_reg, klass->cast_class, false_bb, is_null_bb);
                } else {
@@ -4259,13 +4253,13 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
                                        }
                                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, vtable_reg, vt);
                                } else {
-                                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+                                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
                                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, klass_reg, klass);
                                }
                                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, false_bb);
                                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, is_null_bb);
                        } else {
-                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
                                /* the is_null_bb target simply copies the input register to the output */
                                mini_emit_isninst_cast_inst (cfg, klass_reg, klass, klass_inst, false_bb, is_null_bb);
                        }
@@ -4322,16 +4316,16 @@ handle_cisinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
 #endif
 
                tmp_reg = alloc_preg (cfg);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
 #ifndef DISABLE_REMOTING
                mini_emit_iface_cast (cfg, tmp_reg, klass, interface_fail_bb, true_bb);
                MONO_START_BB (cfg, interface_fail_bb);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
                
                mini_emit_class_check_branch (cfg, klass_reg, mono_defaults.transparent_proxy_class, OP_PBNE_UN, false_bb);
 
                tmp_reg = alloc_preg (cfg);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, tmp_reg, 0);
                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, false2_bb);                
 #else
@@ -4340,16 +4334,16 @@ handle_cisinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
        } else {
 #ifndef DISABLE_REMOTING
                tmp_reg = alloc_preg (cfg);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
 
                mini_emit_class_check_branch (cfg, klass_reg, mono_defaults.transparent_proxy_class, OP_PBNE_UN, no_proxy_bb);          
                tmp_reg = alloc_preg (cfg);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
 
                tmp_reg = alloc_preg (cfg);             
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, tmp_reg, 0);
                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, no_proxy_bb);
                
@@ -4424,22 +4418,22 @@ handle_ccastclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
 #ifndef DISABLE_REMOTING
                NEW_BBLOCK (cfg, interface_fail_bb);
        
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
                mini_emit_iface_cast (cfg, tmp_reg, klass, interface_fail_bb, ok_result_bb);
                MONO_START_BB (cfg, interface_fail_bb);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
 
                mini_emit_class_check (cfg, klass_reg, mono_defaults.transparent_proxy_class);
 
                tmp_reg = alloc_preg (cfg);             
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, tmp_reg, 0);
                MONO_EMIT_NEW_COND_EXC (cfg, EQ, "InvalidCastException");
                
                MONO_EMIT_NEW_ICONST (cfg, dreg, 1);
                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
 #else
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
                mini_emit_iface_cast (cfg, tmp_reg, klass, NULL, NULL);
                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, ok_result_bb);
 #endif
@@ -4447,16 +4441,16 @@ handle_ccastclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
 #ifndef DISABLE_REMOTING
                NEW_BBLOCK (cfg, no_proxy_bb);
 
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
                mini_emit_class_check_branch (cfg, klass_reg, mono_defaults.transparent_proxy_class, OP_PBNE_UN, no_proxy_bb);          
 
                tmp_reg = alloc_preg (cfg);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
 
                tmp_reg = alloc_preg (cfg);
-               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, tmp_reg, 0);
                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, no_proxy_bb);
 
@@ -4501,7 +4495,7 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
 {
        MonoInst *ptr;
        int dreg;
-       gpointer *trampoline;
+       MonoDelegateTrampInfo *trampoline;
        MonoInst *obj, *method_ins, *tramp_ins;
        MonoDomain *domain;
        guint8 **code_slot;
@@ -4515,22 +4509,17 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
        /* Set target field */
        /* Optimize away setting of NULL target */
        if (!(target->opcode == OP_PCONST && target->inst_p0 == 0)) {
-               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, target), target->dreg);
+               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, target), target->dreg);
                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_NEW_BIALU_IMM (cfg, ptr, OP_PADD_IMM, dreg, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, target));
                        emit_write_barrier (cfg, ptr, target);
                }
        }
 
        /* Set method field */
        method_ins = emit_get_rgctx_method (cfg, context_used, method, MONO_RGCTX_INFO_METHOD);
-       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, method), method_ins->dreg);
-       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);
-       }
+       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, method), method_ins->dreg);
        /* 
         * To avoid looking up the compiled code belonging to the target method
         * in mono_delegate_trampoline (), we allocate a per-domain memory slot to
@@ -4558,7 +4547,7 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
                        else
                                EMIT_NEW_PCONST (cfg, code_slot_ins, code_slot);
                }
-               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, method_code), code_slot_ins->dreg);           
+               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, method_code), code_slot_ins->dreg);                
        }
 
        /* Set invoke_impl field */
@@ -4570,10 +4559,17 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
                del_tramp->method = context_used ? NULL : method;
                EMIT_NEW_AOTCONST (cfg, tramp_ins, MONO_PATCH_INFO_DELEGATE_TRAMPOLINE, del_tramp);
        } else {
-               trampoline = mono_create_delegate_trampoline_with_method (cfg->domain, klass, context_used ? NULL : method);
+               trampoline = mono_create_delegate_trampoline_info (cfg->domain, klass, context_used ? NULL : method);
                EMIT_NEW_PCONST (cfg, tramp_ins, trampoline);
        }
-       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, invoke_impl), tramp_ins->dreg);
+
+       dreg = alloc_preg (cfg);
+       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, tramp_ins->dreg, MONO_STRUCT_OFFSET (MonoDelegateTrampInfo, invoke_impl));
+       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, invoke_impl), dreg);
+
+       dreg = alloc_preg (cfg);
+       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, tramp_ins->dreg, MONO_STRUCT_OFFSET (MonoDelegateTrampInfo, method_ptr));
+       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr), dreg);
 
        /* All the checks which are in mono_delegate_ctor () are done by the delegate trampoline */
 
@@ -4820,7 +4816,7 @@ mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
        if (size == 1 || size == 2 || size == 4 || size == 8) {
                static const int fast_log2 [] = { 1, 0, 1, -1, 2, -1, -1, -1, 3 };
 
-               EMIT_NEW_X86_LEA (cfg, ins, array_reg, index2_reg, fast_log2 [size], G_STRUCT_OFFSET (MonoArray, vector));
+               EMIT_NEW_X86_LEA (cfg, ins, array_reg, index2_reg, fast_log2 [size], MONO_STRUCT_OFFSET (MonoArray, vector));
                ins->klass = mono_class_get_element_class (klass);
                ins->type = STACK_MP;
 
@@ -4843,7 +4839,7 @@ mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_MUL_IMM, mult_reg, index2_reg, size);
        }
        MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, array_reg, mult_reg);
-       NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, G_STRUCT_OFFSET (MonoArray, vector));
+       NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, MONO_STRUCT_OFFSET (MonoArray, vector));
        ins->klass = mono_class_get_element_class (klass);
        ins->type = STACK_MP;
        MONO_ADD_INS (cfg->cbb, ins);
@@ -4895,21 +4891,21 @@ mini_emit_ldelema_2_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
 
        /* range checking */
        MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg, 
-                                      arr->dreg, G_STRUCT_OFFSET (MonoArray, bounds));
+                                      arr->dreg, MONO_STRUCT_OFFSET (MonoArray, bounds));
 
        MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, low1_reg, 
-                                      bounds_reg, G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+                                      bounds_reg, MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
        MONO_EMIT_NEW_BIALU (cfg, OP_PSUB, realidx1_reg, index1, low1_reg);
        MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, high1_reg, 
-                                      bounds_reg, G_STRUCT_OFFSET (MonoArrayBounds, length));
+                                      bounds_reg, MONO_STRUCT_OFFSET (MonoArrayBounds, length));
        MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, high1_reg, realidx1_reg);
        MONO_EMIT_NEW_COND_EXC (cfg, LE_UN, "IndexOutOfRangeException");
 
        MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, low2_reg, 
-                                      bounds_reg, sizeof (MonoArrayBounds) + G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+                                      bounds_reg, sizeof (MonoArrayBounds) + MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
        MONO_EMIT_NEW_BIALU (cfg, OP_PSUB, realidx2_reg, index2, low2_reg);
        MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, high2_reg, 
-                                      bounds_reg, sizeof (MonoArrayBounds) + G_STRUCT_OFFSET (MonoArrayBounds, length));
+                                      bounds_reg, sizeof (MonoArrayBounds) + MONO_STRUCT_OFFSET (MonoArrayBounds, length));
        MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, high2_reg, realidx2_reg);
        MONO_EMIT_NEW_COND_EXC (cfg, LE_UN, "IndexOutOfRangeException");
 
@@ -4917,7 +4913,7 @@ mini_emit_ldelema_2_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
        MONO_EMIT_NEW_BIALU (cfg, OP_PADD, sum_reg, mult_reg, realidx2_reg);
        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_PMUL_IMM, mult2_reg, sum_reg, size);
        MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, mult2_reg, arr->dreg);
-       NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, G_STRUCT_OFFSET (MonoArray, vector));
+       NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, MONO_STRUCT_OFFSET (MonoArray, vector));
 
        ins->type = STACK_MP;
        ins->klass = klass;
@@ -5066,7 +5062,7 @@ emit_array_store (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, gboolean sa
                } else if (sp [1]->opcode == OP_ICONST) {
                        int array_reg = sp [0]->dreg;
                        int index_reg = sp [1]->dreg;
-                       int offset = (mono_class_array_element_size (klass) * sp [1]->inst_c0) + G_STRUCT_OFFSET (MonoArray, vector);
+                       int offset = (mono_class_array_element_size (klass) * sp [1]->inst_c0) + MONO_STRUCT_OFFSET (MonoArray, vector);
 
                        if (safety_checks)
                                MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, index_reg);
@@ -5275,7 +5271,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        MONO_EMIT_BOUNDS_CHECK (cfg, args [0]->dreg, MonoString, length, index_reg);
 
 #if defined(TARGET_X86) || defined(TARGET_AMD64)
-                       EMIT_NEW_X86_LEA (cfg, ins, args [0]->dreg, index_reg, 1, G_STRUCT_OFFSET (MonoString, chars));
+                       EMIT_NEW_X86_LEA (cfg, ins, args [0]->dreg, index_reg, 1, MONO_STRUCT_OFFSET (MonoString, chars));
                        add_reg = ins->dreg;
                        /* Avoid a warning */
                        mult_reg = 0;
@@ -5285,7 +5281,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SHL_IMM, mult_reg, index_reg, 1);
                        MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, mult_reg, args [0]->dreg);
                        EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADU2_MEMBASE, dreg, 
-                                                                  add_reg, G_STRUCT_OFFSET (MonoString, chars));
+                                                                  add_reg, MONO_STRUCT_OFFSET (MonoString, chars));
 #endif
                        type_from_op (ins, NULL, NULL);
                        return ins;
@@ -5306,7 +5302,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        /* The corlib functions check for oob already. */
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SHL_IMM, mult_reg, args [1]->dreg, 1);
                        MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, mult_reg, args [0]->dreg);
-                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI2_MEMBASE_REG, add_reg, G_STRUCT_OFFSET (MonoString, chars), args [2]->dreg);
+                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI2_MEMBASE_REG, add_reg, MONO_STRUCT_OFFSET (MonoString, chars), args [2]->dreg);
                        return cfg->cbb->last_ins;
                } else 
                        return NULL;
@@ -5315,8 +5311,8 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                if (strcmp (cmethod->name, "GetType") == 0) {
                        int dreg = alloc_ireg_ref (cfg);
                        int vt_reg = alloc_preg (cfg);
-                       MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vt_reg, args [0]->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
-                       EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, vt_reg, G_STRUCT_OFFSET (MonoVTable, type));
+                       MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vt_reg, args [0]->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+                       EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, vt_reg, MONO_STRUCT_OFFSET (MonoVTable, type));
                        type_from_op (ins, NULL, NULL);
 
                        return ins;
@@ -5356,22 +5352,22 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        NEW_BBLOCK (cfg, szarray_bb);
 
                        EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, ins, OP_LOAD_MEMBASE, bounds_reg,
-                                                                                args [0]->dreg, G_STRUCT_OFFSET (MonoArray, bounds));
+                                                                                args [0]->dreg, MONO_STRUCT_OFFSET (MonoArray, bounds));
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, bounds_reg, 0);
                        MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, szarray_bb);
                        /* Non-szarray case */
                        if (get_length)
                                EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADI4_MEMBASE, dreg,
-                                                                          bounds_reg, G_STRUCT_OFFSET (MonoArrayBounds, length));
+                                                                          bounds_reg, MONO_STRUCT_OFFSET (MonoArrayBounds, length));
                        else
                                EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADI4_MEMBASE, dreg,
-                                                                          bounds_reg, G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+                                                                          bounds_reg, MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
                        MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
                        MONO_START_BB (cfg, szarray_bb);
                        /* Szarray case */
                        if (get_length)
                                EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADI4_MEMBASE, dreg,
-                                                                          args [0]->dreg, G_STRUCT_OFFSET (MonoArray, max_length));
+                                                                          args [0]->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length));
                        else
                                MONO_EMIT_NEW_ICONST (cfg, dreg, 0);
                        MONO_START_BB (cfg, end_bb);
@@ -5390,9 +5386,9 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        int dreg = alloc_ireg (cfg);
                        int vtable_reg = alloc_preg (cfg);
                        MONO_EMIT_NEW_LOAD_MEMBASE_OP_FAULT (cfg, OP_LOAD_MEMBASE, vtable_reg, 
-                                                                                                args [0]->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
+                                                                                                args [0]->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable));
                        EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADU1_MEMBASE, dreg,
-                                                                  vtable_reg, G_STRUCT_OFFSET (MonoVTable, rank));
+                                                                  vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, rank));
                        type_from_op (ins, NULL, NULL);
 
                        return ins;
@@ -5400,7 +5396,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        int dreg = alloc_ireg (cfg);
 
                        EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, ins, OP_LOADI4_MEMBASE, dreg, 
-                                                                                args [0]->dreg, G_STRUCT_OFFSET (MonoArray, max_length));
+                                                                                args [0]->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length));
                        type_from_op (ins, NULL, NULL);
 
                        return ins;
@@ -5409,7 +5405,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
        } else if (cmethod->klass == runtime_helpers_class) {
 
                if (strcmp (cmethod->name, "get_OffsetToStringData") == 0) {
-                       EMIT_NEW_ICONST (cfg, ins, G_STRUCT_OFFSET (MonoString, chars));
+                       EMIT_NEW_ICONST (cfg, ins, MONO_STRUCT_OFFSET (MonoString, chars));
                        return ins;
                } else
                        return NULL;
@@ -5498,27 +5494,34 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
 
 #if SIZEOF_REGISTER == 8
                if (strcmp (cmethod->name, "Read") == 0 && (fsig->params [0]->type == MONO_TYPE_I8)) {
+                       MonoInst *load_ins;
+
+                       emit_memory_barrier (cfg, FullBarrier);
+
                        /* 64 bit reads are already atomic */
-                       MONO_INST_NEW (cfg, ins, OP_LOADI8_MEMBASE);
-                       ins->dreg = mono_alloc_preg (cfg);
-                       ins->inst_basereg = args [0]->dreg;
-                       ins->inst_offset = 0;
-                       MONO_ADD_INS (cfg->cbb, ins);
+                       MONO_INST_NEW (cfg, load_ins, OP_LOADI8_MEMBASE);
+                       load_ins->dreg = mono_alloc_preg (cfg);
+                       load_ins->inst_basereg = args [0]->dreg;
+                       load_ins->inst_offset = 0;
+                       MONO_ADD_INS (cfg->cbb, load_ins);
+
+                       emit_memory_barrier (cfg, FullBarrier);
+
+                       ins = load_ins;
                }
 #endif
 
-#ifdef MONO_ARCH_HAVE_ATOMIC_ADD
                if (strcmp (cmethod->name, "Increment") == 0) {
                        MonoInst *ins_iconst;
                        guint32 opcode = 0;
 
                        if (fsig->params [0]->type == MONO_TYPE_I4) {
-                               opcode = OP_ATOMIC_ADD_NEW_I4;
-                               cfg->has_atomic_add_new_i4 = TRUE;
+                               opcode = OP_ATOMIC_ADD_I4;
+                               cfg->has_atomic_add_i4 = TRUE;
                        }
 #if SIZEOF_REGISTER == 8
                        else if (fsig->params [0]->type == MONO_TYPE_I8)
-                               opcode = OP_ATOMIC_ADD_NEW_I8;
+                               opcode = OP_ATOMIC_ADD_I8;
 #endif
                        if (opcode) {
                                if (!mono_arch_opcode_supported (opcode))
@@ -5533,7 +5536,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                                ins->inst_basereg = args [0]->dreg;
                                ins->inst_offset = 0;
                                ins->sreg2 = ins_iconst->dreg;
-                               ins->type = (opcode == OP_ATOMIC_ADD_NEW_I4) ? STACK_I4 : STACK_I8;
+                               ins->type = (opcode == OP_ATOMIC_ADD_I4) ? STACK_I4 : STACK_I8;
                                MONO_ADD_INS (cfg->cbb, ins);
                        }
                } else if (strcmp (cmethod->name, "Decrement") == 0) {
@@ -5541,12 +5544,12 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        guint32 opcode = 0;
 
                        if (fsig->params [0]->type == MONO_TYPE_I4) {
-                               opcode = OP_ATOMIC_ADD_NEW_I4;
-                               cfg->has_atomic_add_new_i4 = TRUE;
+                               opcode = OP_ATOMIC_ADD_I4;
+                               cfg->has_atomic_add_i4 = TRUE;
                        }
 #if SIZEOF_REGISTER == 8
                        else if (fsig->params [0]->type == MONO_TYPE_I8)
-                               opcode = OP_ATOMIC_ADD_NEW_I8;
+                               opcode = OP_ATOMIC_ADD_I8;
 #endif
                        if (opcode) {
                                if (!mono_arch_opcode_supported (opcode))
@@ -5561,19 +5564,19 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                                ins->inst_basereg = args [0]->dreg;
                                ins->inst_offset = 0;
                                ins->sreg2 = ins_iconst->dreg;
-                               ins->type = (opcode == OP_ATOMIC_ADD_NEW_I4) ? STACK_I4 : STACK_I8;
+                               ins->type = (opcode == OP_ATOMIC_ADD_I4) ? STACK_I4 : STACK_I8;
                                MONO_ADD_INS (cfg->cbb, ins);
                        }
                } else if (strcmp (cmethod->name, "Add") == 0) {
                        guint32 opcode = 0;
 
                        if (fsig->params [0]->type == MONO_TYPE_I4) {
-                               opcode = OP_ATOMIC_ADD_NEW_I4;
-                               cfg->has_atomic_add_new_i4 = TRUE;
+                               opcode = OP_ATOMIC_ADD_I4;
+                               cfg->has_atomic_add_i4 = TRUE;
                        }
 #if SIZEOF_REGISTER == 8
                        else if (fsig->params [0]->type == MONO_TYPE_I8)
-                               opcode = OP_ATOMIC_ADD_NEW_I8;
+                               opcode = OP_ATOMIC_ADD_I8;
 #endif
                        if (opcode) {
                                if (!mono_arch_opcode_supported (opcode))
@@ -5583,13 +5586,11 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                                ins->inst_basereg = args [0]->dreg;
                                ins->inst_offset = 0;
                                ins->sreg2 = args [1]->dreg;
-                               ins->type = (opcode == OP_ATOMIC_ADD_NEW_I4) ? STACK_I4 : STACK_I8;
+                               ins->type = (opcode == OP_ATOMIC_ADD_I4) ? STACK_I4 : STACK_I8;
                                MONO_ADD_INS (cfg->cbb, ins);
                        }
                }
-#endif /* MONO_ARCH_HAVE_ATOMIC_ADD */
 
-#ifdef MONO_ARCH_HAVE_ATOMIC_EXCHANGE
                if (strcmp (cmethod->name, "Exchange") == 0) {
                        guint32 opcode;
                        gboolean is_ref = fsig->params [0]->type == MONO_TYPE_OBJECT;
@@ -5639,9 +5640,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]);
                }
-#endif /* MONO_ARCH_HAVE_ATOMIC_EXCHANGE */
-#ifdef MONO_ARCH_HAVE_ATOMIC_CAS
+
                if ((strcmp (cmethod->name, "CompareExchange") == 0)) {
                        int size = 0;
                        gboolean is_ref = mini_type_is_reference (cfg, fsig->params [1]);
@@ -5678,7 +5677,6 @@ 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]);
                }
-#endif /* MONO_ARCH_HAVE_ATOMIC_CAS */
 
                if (strcmp (cmethod->name, "MemoryBarrier") == 0)
                        ins = emit_memory_barrier (cfg, FullBarrier);
@@ -6512,7 +6510,7 @@ initialize_array_data (MonoMethod *method, gboolean aot, unsigned char *ip, Mono
                    return NULL;
                *out_size = size;
                /*g_print ("optimized in %s: size: %d, numelems: %d\n", method->name, size, newarr->inst_newa_len->inst_c0);*/
-               if (!method->klass->image->dynamic) {
+               if (!image_is_dynamic (method->klass->image)) {
                        field_index = read32 (ip + 2) & 0xffffff;
                        mono_metadata_field_info (method->klass->image, field_index - 1, NULL, &rva, NULL);
                        data_ptr = mono_image_rva_map (method->klass->image, rva);
@@ -6749,7 +6747,7 @@ emit_managed_static_data_access (MonoCompile *cfg, MonoInst *thread_ins, int off
        // idx = (offset >> 24) - 1;
        // return ((char*) thread->static_data [idx]) + (offset & 0xffffff);
        static_data_reg = alloc_ireg (cfg);
-       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, static_data_reg, thread_ins->dreg, G_STRUCT_OFFSET (MonoInternalThread, static_data));
+       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, static_data_reg, thread_ins->dreg, MONO_STRUCT_OFFSET (MonoInternalThread, static_data));
        idx_reg = alloc_ireg (cfg);
        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, idx_reg, offset_reg, 24);
        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISUB_IMM, idx_reg, idx_reg, 1);
@@ -7203,7 +7201,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                cfg->gsharedvt_locals_var = locals_var;
 
                dreg = alloc_ireg (cfg);
-               MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, dreg, var->dreg, G_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, locals_size));
+               MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, dreg, var->dreg, MONO_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, locals_size));
 
                MONO_INST_NEW (cfg, ins, OP_LOCALLOC);
                ins->dreg = locals_var->dreg;
@@ -7787,6 +7785,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        EMIT_NEW_ARGLOAD (cfg, call->args [i], i);
 
                                mono_arch_emit_call (cfg, call);
+                               cfg->param_area = MAX(cfg->param_area, call->stack_usage);
                                MONO_ADD_INS (bblock, (MonoInst*)call);
                        } else {
                                for (i = 0; i < num_args; ++i)
@@ -8391,8 +8390,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                        /*
                         * Making generic calls out of gsharedvt methods.
+                        * This needs to be used for all generic calls, not just ones with a gsharedvt signature, to avoid
+                        * patching gshared method addresses into a gsharedvt method.
                         */
-                       if (cmethod && cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, fsig)) {
+                       if (cmethod && cfg->gsharedvt && (mini_is_gsharedvt_signature (cfg, fsig) || cmethod->is_inflated || cmethod->klass->generic_class)) {
                                MonoRgctxInfoType info_type;
 
                                if (virtual) {
@@ -10376,7 +10377,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                //      return ((char*) thread->static_data [idx]) + (offset & 0xffffff);
                                MONO_ADD_INS (cfg->cbb, thread_ins);
                                static_data_reg = alloc_ireg (cfg);
-                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, static_data_reg, thread_ins->dreg, G_STRUCT_OFFSET (MonoInternalThread, static_data));
+                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, static_data_reg, thread_ins->dreg, MONO_STRUCT_OFFSET (MonoInternalThread, static_data));
 
                                if (cfg->compile_aot) {
                                        int offset_reg, offset2_reg, idx_reg;
@@ -10746,7 +10747,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                MonoInst *iargs [3];
                                int add_reg = alloc_ireg_mp (cfg);
 
-                               EMIT_NEW_BIALU_IMM (cfg, iargs [0], OP_PADD_IMM, add_reg, ins->dreg, G_STRUCT_OFFSET (MonoArray, vector));
+                               EMIT_NEW_BIALU_IMM (cfg, iargs [0], OP_PADD_IMM, add_reg, ins->dreg, MONO_STRUCT_OFFSET (MonoArray, vector));
                                if (cfg->compile_aot) {
                                        EMIT_NEW_AOTCONST_TOKEN (cfg, iargs [1], MONO_PATCH_INFO_RVA, method->klass->image, GPOINTER_TO_UINT(field_token), STACK_PTR, NULL);
                                } else {
@@ -10843,7 +10844,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        } else if (sp [1]->opcode == OP_ICONST) {
                                int array_reg = sp [0]->dreg;
                                int index_reg = sp [1]->dreg;
-                               int offset = (mono_class_array_element_size (klass) * sp [1]->inst_c0) + G_STRUCT_OFFSET (MonoArray, vector);
+                               int offset = (mono_class_array_element_size (klass) * sp [1]->inst_c0) + MONO_STRUCT_OFFSET (MonoArray, vector);
 
                                MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, index_reg);
                                EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, array_reg, offset);
@@ -10932,7 +10933,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        if (!src_var)
                                src_var = mono_compile_create_var_for_vreg (cfg, &mono_defaults.typed_reference_class->byval_arg, OP_LOCAL, sp [0]->dreg);
                        EMIT_NEW_VARLOADA (cfg, src, src_var, src_var->inst_vtype);
-                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, src->dreg, G_STRUCT_OFFSET (MonoTypedRef, klass));
+                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, src->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, klass));
 
                        if (context_used) {
                                MonoInst *klass_ins;
@@ -10946,7 +10947,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        } else {
                                mini_emit_class_check (cfg, klass_reg, klass);
                        }
-                       EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, src->dreg, G_STRUCT_OFFSET (MonoTypedRef, value));
+                       EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, src->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, value));
                        ins->type = STACK_MP;
                        *sp++ = ins;
                        ip += 5;
@@ -10975,22 +10976,22 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                int type_reg = alloc_preg (cfg);
 
                                const_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
-                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, klass), const_ins->dreg);
-                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, type_reg, const_ins->dreg, G_STRUCT_OFFSET (MonoClass, byval_arg));
-                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, type), type_reg);
+                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, klass), const_ins->dreg);
+                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, type_reg, const_ins->dreg, MONO_STRUCT_OFFSET (MonoClass, byval_arg));
+                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, type), type_reg);
                        } else if (cfg->compile_aot) {
                                int const_reg = alloc_preg (cfg);
                                int type_reg = alloc_preg (cfg);
 
                                MONO_EMIT_NEW_CLASSCONST (cfg, const_reg, klass);
-                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, klass), const_reg);
-                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, type_reg, const_reg, G_STRUCT_OFFSET (MonoClass, byval_arg));
-                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, type), type_reg);
+                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, klass), const_reg);
+                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, type_reg, const_reg, MONO_STRUCT_OFFSET (MonoClass, byval_arg));
+                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, type), type_reg);
                        } else {
-                               MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STOREP_MEMBASE_IMM, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, type), &klass->byval_arg);
-                               MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STOREP_MEMBASE_IMM, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, klass), klass);
+                               MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STOREP_MEMBASE_IMM, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, type), &klass->byval_arg);
+                               MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STOREP_MEMBASE_IMM, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, klass), klass);
                        }
-                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, value), sp [0]->dreg);
+                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, value), sp [0]->dreg);
 
                        EMIT_NEW_TEMPLOAD (cfg, ins, loc->inst_c0);
                        ins->type = STACK_VTYPE;
@@ -11733,7 +11734,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                if ((sp > stack_start) && (ip + 6 + 5 < end) && ip_in_bb (cfg, bblock, ip + 6) && (ip [6] == CEE_NEWOBJ)) {
                                        MonoMethod *ctor_method = mini_get_method (cfg, method, read32 (ip + 7), NULL, generic_context);
                                        if (ctor_method && (ctor_method->klass->parent == mono_defaults.multicastdelegate_class)) {
-                                               MonoInst *target_ins;
+                                               MonoInst *target_ins, *handle_ins;
                                                MonoMethod *invoke;
                                                int invoke_context_used;
 
@@ -11762,12 +11763,15 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                        ip += 6;
                                                        if (cfg->verbose_level > 3)
                                                                g_print ("converting (in B%d: stack: %d) %s", bblock->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
-                                                       sp --;
-                                                       *sp = handle_delegate_ctor (cfg, ctor_method->klass, target_ins, cmethod, context_used);
-                                                       CHECK_CFG_EXCEPTION;
-                                                       ip += 5;                        
-                                                       sp ++;
-                                                       break;
+                                                       if ((handle_ins = handle_delegate_ctor (cfg, ctor_method->klass, target_ins, cmethod, context_used))) {
+                                                               sp --;
+                                                               *sp = handle_ins;
+                                                               CHECK_CFG_EXCEPTION;
+                                                               ip += 5;
+                                                               sp ++;
+                                                               break;
+                                                       }
+                                                       ip -= 6;
                                                }
 #endif
                                        }
@@ -12058,7 +12062,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                bblock->flags |= BB_EXCEPTION_UNSAFE;
 
-                               g_assert (handler_offset != -1);
+                               if (handler_offset == -1)
+                                       UNVERIFIED;
 
                                EMIT_NEW_TEMPLOAD (cfg, load, mono_find_exvar_for_offset (cfg, handler_offset)->inst_c0);
                                MONO_INST_NEW (cfg, ins, OP_RETHROW);
@@ -12083,7 +12088,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                CHECK_STACK_OVF (1);
                                CHECK_OPSIZE (6);
                                token = read32 (ip + 2);
-                               if (mono_metadata_token_table (token) == MONO_TABLE_TYPESPEC && !method->klass->image->dynamic && !generic_context) {
+                               if (mono_metadata_token_table (token) == MONO_TABLE_TYPESPEC && !image_is_dynamic (method->klass->image) && !generic_context) {
                                        MonoType *type = mono_type_create_from_typespec (image, token);
                                        val = mono_type_size (type, &ialign);
                                } else {
@@ -12110,7 +12115,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                if (!src_var)
                                        src_var = mono_compile_create_var_for_vreg (cfg, &mono_defaults.typed_reference_class->byval_arg, OP_LOCAL, sp [0]->dreg);
                                EMIT_NEW_VARLOADA (cfg, src, src_var, src_var->inst_vtype);
-                               EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &mono_defaults.typehandle_class->byval_arg, src->dreg, G_STRUCT_OFFSET (MonoTypedRef, type));
+                               EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &mono_defaults.typehandle_class->byval_arg, src->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, type));
                                *sp++ = ins;
                                ip += 2;
                                break;
@@ -12368,7 +12373,11 @@ mono_op_to_op_imm (int opcode)
        case OP_LSHR:
                return OP_LSHR_IMM;
        case OP_LSHR_UN:
-               return OP_LSHR_UN_IMM;          
+               return OP_LSHR_UN_IMM;
+#if SIZEOF_REGISTER == 8
+       case OP_LREM:
+               return OP_LREM_IMM;
+#endif
 
        case OP_COMPARE:
                return OP_COMPARE_IMM;
@@ -13232,7 +13241,7 @@ mono_spill_global_vars (MonoCompile *cfg, gboolean *need_local_opts)
                                                g_assert_not_reached ();
                                        }
                                        reg2 = alloc_ireg (cfg);
-                                       NEW_LOAD_MEMBASE (cfg, load2, OP_LOADI4_MEMBASE, reg2, reg1, G_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
+                                       NEW_LOAD_MEMBASE (cfg, load2, OP_LOADI4_MEMBASE, reg2, reg1, MONO_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
                                        /* Load the locals area address */
                                        reg3 = alloc_ireg (cfg);
                                        if (locals_var->opcode == OP_REGOFFSET) {
index b5fed14d8d22f584ac059dfff08b2e0dff1a9586..a09d3d79064ddfde150db0a3557ccb684057d273 100644 (file)
@@ -20,6 +20,7 @@
 #include <unistd.h>
 #endif
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/threads.h>
 #include "debugger-agent.h"
 #include "mini-gc.h"
 
-#ifdef HOST_WIN32
-static gint jit_tls_offset = -1;
-#endif
-
 #ifdef MONO_XEN_OPT
 static gboolean optimize_for_xen = TRUE;
 #else
@@ -70,13 +67,6 @@ static CRITICAL_SECTION mini_arch_mutex;
 MonoBreakpointInfo
 mono_breakpoint_info [MONO_BREAKPOINT_ARRAY_SIZE];
 
-/* Structure used by the sequence points in AOTed code */
-typedef struct {
-       gpointer ss_trigger_page;
-       gpointer bp_trigger_page;
-       gpointer bp_addrs [MONO_ZERO_LEN_ARRAY];
-} SeqPointInfo;
-
 /*
  * The code generated for sequence points reads from this location, which is
  * made read-only when single stepping is enabled.
@@ -536,14 +526,10 @@ typedef struct {
 #define DEBUG(a) if (cfg->verbose_level > 1) a
 
 #ifdef HOST_WIN32
-#define PARAM_REGS 4
-
 static AMD64_Reg_No param_regs [] = { AMD64_RCX, AMD64_RDX, AMD64_R8, AMD64_R9 };
 
 static AMD64_Reg_No return_regs [] = { AMD64_RAX, AMD64_RDX };
 #else
-#define PARAM_REGS 6
 static AMD64_Reg_No param_regs [] = { AMD64_RDI, AMD64_RSI, AMD64_RDX, AMD64_RCX, AMD64_R8, AMD64_R9 };
 
  static AMD64_Reg_No return_regs [] = { AMD64_RAX, AMD64_RDX };
@@ -1117,15 +1103,8 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
                        }
                        /* fall through */
                case MONO_TYPE_VALUETYPE:
-                       add_valuetype (gsctx, sig, ainfo, sig->params [i], FALSE, &gr, &fr, &stack_size);
-                       break;
                case MONO_TYPE_TYPEDBYREF:
-#if defined( HOST_WIN32 ) || defined( __native_client_codegen__ )
                        add_valuetype (gsctx, sig, ainfo, sig->params [i], FALSE, &gr, &fr, &stack_size);
-#else
-                       stack_size += sizeof (MonoTypedRef);
-                       ainfo->storage = ArgOnStack;
-#endif
                        break;
                case MONO_TYPE_U8:
                case MONO_TYPE_I8:
@@ -1738,19 +1717,20 @@ mono_arch_allocate_vars (MonoCompile *cfg)
                offset = 0;
        }
 
-       if (cfg->method->save_lmf) {
-               /* The LMF var is allocated normally */
-       } else {
-               if (cfg->arch.omit_fp)
-                       cfg->arch.reg_save_area_offset = offset;
-               /* Reserve space for callee saved registers */
-               for (i = 0; i < AMD64_NREG; ++i)
-                       if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->used_int_regs & (1 << i))) {
-                               offset += sizeof(mgreg_t);
-                       }
-               if (!cfg->arch.omit_fp)
-                       cfg->arch.reg_save_area_offset = -offset;
-       }
+       cfg->arch.saved_iregs = cfg->used_int_regs;
+       if (cfg->method->save_lmf)
+               /* Save all callee-saved registers normally, and restore them when unwinding through an LMF */
+               cfg->arch.saved_iregs |= (1 << AMD64_RBX) | (1 << AMD64_R12) | (1 << AMD64_R13) | (1 << AMD64_R14) | (1 << AMD64_R15);
+
+       if (cfg->arch.omit_fp)
+               cfg->arch.reg_save_area_offset = offset;
+       /* Reserve space for callee saved registers */
+       for (i = 0; i < AMD64_NREG; ++i)
+               if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->arch.saved_iregs & (1 << i))) {
+                       offset += sizeof(mgreg_t);
+               }
+       if (!cfg->arch.omit_fp)
+               cfg->arch.reg_save_area_offset = -offset;
 
        if (sig_ret->type != MONO_TYPE_VOID) {
                switch (cinfo->ret.storage) {
@@ -2027,13 +2007,13 @@ mono_arch_create_vars (MonoCompile *cfg)
        if (cfg->method->save_lmf)
                cfg->create_lmf_var = TRUE;
 
-#if !defined(HOST_WIN32)
        if (cfg->method->save_lmf) {
                cfg->lmf_ir = TRUE;
+#if !defined(HOST_WIN32)
                if (mono_get_lmf_tls_offset () != -1 && !optimize_for_xen)
                        cfg->lmf_ir_mono_lmf = TRUE;
-       }
 #endif
+       }
 
 #ifndef MONO_AMD64_NO_PUSHES
        cfg->arch_eh_jit_info = 1;
@@ -2617,12 +2597,6 @@ typedef struct {
        CallInfo *cinfo;
 } ArchDynCallInfo;
 
-typedef struct {
-       mgreg_t regs [PARAM_REGS];
-       mgreg_t res;
-       guint8 *ret;
-} DynCallArgs;
-
 static gboolean
 dyn_call_supported (MonoMethodSignature *sig, CallInfo *cinfo)
 {
@@ -3304,12 +3278,9 @@ mono_arch_lowering_pass (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_IDIV_IMM:
                case OP_IDIV_UN_IMM:
                case OP_IREM_UN_IMM:
-                       mono_decompose_op_imm (cfg, bb, ins);
-                       break;
+               case OP_LREM_IMM:
                case OP_IREM_IMM:
-                       /* Keep the opcode if we can implement it efficiently */
-                       if (!((ins->inst_imm > 0) && (mono_is_power_of_two (ins->inst_imm) != -1)))
-                               mono_decompose_op_imm (cfg, bb, ins);
+                       mono_decompose_op_imm (cfg, bb, ins);
                        break;
                case OP_COMPARE_IMM:
                case OP_LCOMPARE_IMM:
@@ -3422,7 +3393,7 @@ mono_emit_stack_alloc (MonoCompile *cfg, guchar *code, MonoInst* tree)
        int need_touch = FALSE;
 
 #if defined(HOST_WIN32)
-               need_touch = TRUE;
+       need_touch = TRUE;
 #elif defined(MONO_ARCH_SIGSEGV_ON_ALTSTACK)
        if (!tree->flags & MONO_INST_INIT)
                need_touch = TRUE;
@@ -3656,9 +3627,22 @@ guint8*
 mono_amd64_emit_tls_get (guint8* code, int dreg, int tls_offset)
 {
 #ifdef HOST_WIN32
-       g_assert (tls_offset < 64);
-       x86_prefix (code, X86_GS_PREFIX);
-       amd64_mov_reg_mem (code, dreg, (tls_offset * 8) + 0x1480, 8);
+       if (tls_offset < 64) {
+               x86_prefix (code, X86_GS_PREFIX);
+               amd64_mov_reg_mem (code, dreg, (tls_offset * 8) + 0x1480, 8);
+       } else {
+               guint8 *buf [16];
+
+               g_assert (tls_offset < 0x440);
+               /* Load TEB->TlsExpansionSlots */
+               x86_prefix (code, X86_GS_PREFIX);
+               amd64_mov_reg_mem (code, dreg, 0x1780, 8);
+               amd64_test_reg_reg (code, dreg, dreg);
+               buf [0] = code;
+               amd64_branch (code, X86_CC_EQ, code, TRUE);
+               amd64_mov_reg_membase (code, dreg, dreg, (tls_offset * 8) - 0x200, 8);
+               amd64_patch (buf [0], code);
+       }
 #elif defined(__APPLE__)
        x86_prefix (code, X86_GS_PREFIX);
        amd64_mov_reg_mem (code, dreg, tls_gs_offset + (tls_offset * 8), 8);
@@ -3760,8 +3744,6 @@ mono_arch_translate_tls_offset (int offset)
 static guint8*
 emit_setup_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, int cfa_offset)
 {
-       int i;
-
        /* 
         * The ip field is not set, the exception handling code will obtain it from the stack location pointed to by the sp field.
         */
@@ -3769,114 +3751,22 @@ emit_setup_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, int cfa_offse
         * sp is saved right before calls but we need to save it here too so
         * async stack walks would work.
         */
-       amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsp), AMD64_RSP, 8);
-       /* Skip method (only needed for trampoline LMF frames) */
-       /* Save callee saved regs */
-       for (i = 0; i < MONO_MAX_IREGS; ++i) {
-               int offset;
-
-               switch (i) {
-               case AMD64_RBX: offset = G_STRUCT_OFFSET (MonoLMF, rbx); break;
-               case AMD64_RBP: offset = G_STRUCT_OFFSET (MonoLMF, rbp); break;
-               case AMD64_R12: offset = G_STRUCT_OFFSET (MonoLMF, r12); break;
-               case AMD64_R13: offset = G_STRUCT_OFFSET (MonoLMF, r13); break;
-               case AMD64_R14: offset = G_STRUCT_OFFSET (MonoLMF, r14); break;
-#ifndef __native_client_codegen__
-               case AMD64_R15: offset = G_STRUCT_OFFSET (MonoLMF, r15); break;
-#endif
-#ifdef HOST_WIN32
-               case AMD64_RDI: offset = G_STRUCT_OFFSET (MonoLMF, rdi); break;
-               case AMD64_RSI: offset = G_STRUCT_OFFSET (MonoLMF, rsi); break;
-#endif
-               default:
-                       offset = -1;
-                       break;
-               }
-
-               if (offset != -1) {
-                       amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + offset, i, 8);
-                       if ((cfg->arch.omit_fp || (i != AMD64_RBP)) && cfa_offset != -1)
-                               mono_emit_unwind_op_offset (cfg, code, i, - (cfa_offset - (lmf_offset + offset)));
-               }
-       }
+       amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rsp), AMD64_RSP, 8);
+       /* Save rbp */
+       amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp), AMD64_RBP, 8);
+       if (cfg->arch.omit_fp && cfa_offset != -1)
+               mono_emit_unwind_op_offset (cfg, code, AMD64_RBP, - (cfa_offset - (lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp))));
 
        /* These can't contain refs */
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF);
-#ifdef HOST_WIN32
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), SLOT_NOREF);
-#endif
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rip), SLOT_NOREF);
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsp), SLOT_NOREF);
-
+       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF);
+       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rip), SLOT_NOREF);
+       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rsp), SLOT_NOREF);
        /* These are handled automatically by the stack marking code */
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbx), SLOT_NOREF);
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbp), SLOT_NOREF);
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r12), SLOT_NOREF);
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r13), SLOT_NOREF);
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r14), SLOT_NOREF);
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r15), SLOT_NOREF);
-#ifdef HOST_WIN32
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rdi), SLOT_NOREF);
-       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsi), SLOT_NOREF);
-#endif
+       mini_gc_set_slot_type_from_fp (cfg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp), SLOT_NOREF);
 
        return code;
 }
 
-#ifdef HOST_WIN32
-/*
- * emit_push_lmf:
- *
- *   Emit code to push an LMF structure on the LMF stack.
- */
-static guint8*
-emit_push_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, gboolean *args_clobbered)
-{
-       if (jit_tls_offset != -1) {
-               code = mono_amd64_emit_tls_get (code, AMD64_RAX, jit_tls_offset);
-               amd64_alu_reg_imm (code, X86_ADD, AMD64_RAX, G_STRUCT_OFFSET (MonoJitTlsData, lmf));
-       } else {
-               /* 
-                * The call might clobber argument registers, but they are already
-                * saved to the stack/global regs.
-                */
-               if (args_clobbered)
-                       *args_clobbered = TRUE;
-               code = emit_call (cfg, code, MONO_PATCH_INFO_INTERNAL_METHOD, 
-                                                 (gpointer)"mono_get_lmf_addr", TRUE);         
-       }
-
-       /* Save lmf_addr */
-       amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), AMD64_RAX, sizeof(gpointer));
-       /* Save previous_lmf */
-       amd64_mov_reg_membase (code, AMD64_R11, AMD64_RAX, 0, sizeof(gpointer));
-       amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), AMD64_R11, sizeof(gpointer));
-       /* Set new lmf */
-       amd64_lea_membase (code, AMD64_R11, cfg->frame_reg, lmf_offset);
-       amd64_mov_membase_reg (code, AMD64_RAX, 0, AMD64_R11, sizeof(gpointer));
-
-       return code;
-}
-#endif
-
-#ifdef HOST_WIN32
-/*
- * emit_pop_lmf:
- *
- *   Emit code to pop an LMF structure from the LMF stack.
- */
-static guint8*
-emit_pop_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset)
-{
-       /* Restore previous lmf */
-       amd64_mov_reg_membase (code, AMD64_RCX, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof(gpointer));
-       amd64_mov_reg_membase (code, AMD64_R11, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), sizeof(gpointer));
-       amd64_mov_membase_reg (code, AMD64_R11, 0, AMD64_RCX, sizeof(gpointer));
-
-       return code;
-}
-#endif
-
 #define REAL_PRINT_REG(text,reg) \
 mono_assert (reg >= 0); \
 amd64_push_reg (code, AMD64_RAX); \
@@ -4345,7 +4235,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
 
                                /* Load info var */
                                amd64_mov_reg_membase (code, AMD64_R11, info_var->inst_basereg, info_var->inst_offset, 8);
-                               val = ((offset) * sizeof (guint8*)) + G_STRUCT_OFFSET (SeqPointInfo, bp_addrs);
+                               val = ((offset) * sizeof (guint8*)) + MONO_STRUCT_OFFSET (SeqPointInfo, bp_addrs);
                                /* Load the info->bp_addrs [offset], which is either a valid address or the address of a trigger page */
                                amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, val, 8);
                                amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, 0, 8);
@@ -4533,32 +4423,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                amd64_div_reg_size (code, ins->sreg2, FALSE, 4);
                        }
                        break;
-               case OP_IREM_IMM: {
-                       int power = mono_is_power_of_two (ins->inst_imm);
-
-                       g_assert (ins->sreg1 == X86_EAX);
-                       g_assert (ins->dreg == X86_EAX);
-                       g_assert (power >= 0);
-
-                       if (power == 0) {
-                               amd64_mov_reg_imm (code, ins->dreg, 0);
-                               break;
-                       }
-
-                       /* Based on gcc code */
-
-                       /* Add compensation for negative dividents */
-                       amd64_mov_reg_reg_size (code, AMD64_RDX, AMD64_RAX, 4);
-                       if (power > 1)
-                               amd64_shift_reg_imm_size (code, X86_SAR, AMD64_RDX, 31, 4);
-                       amd64_shift_reg_imm_size (code, X86_SHR, AMD64_RDX, 32 - power, 4);
-                       amd64_alu_reg_reg_size (code, X86_ADD, AMD64_RAX, AMD64_RDX, 4);
-                       /* Compute remainder */
-                       amd64_alu_reg_imm_size (code, X86_AND, AMD64_RAX, (1 << power) - 1, 4);
-                       /* Remove compensation */
-                       amd64_alu_reg_reg_size (code, X86_SUB, AMD64_RAX, AMD64_RDX, 4);
-                       break;
-               }
                case OP_LMUL_OVF:
                        amd64_imul_reg_reg (code, ins->sreg1, ins->sreg2);
                        EMIT_COND_SYSTEM_EXCEPTION (X86_CC_O, FALSE, "OverflowException");
@@ -5002,12 +4866,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
 
                        /* Save result */
                        amd64_mov_reg_membase (code, AMD64_R11, var->inst_basereg, var->inst_offset, 8);
-                       amd64_mov_membase_reg (code, AMD64_R11, G_STRUCT_OFFSET (DynCallArgs, res), AMD64_RAX, 8);
+                       amd64_mov_membase_reg (code, AMD64_R11, MONO_STRUCT_OFFSET (DynCallArgs, res), AMD64_RAX, 8);
                        break;
                }
                case OP_AMD64_SAVE_SP_TO_LMF: {
                        MonoInst *lmf_var = cfg->lmf_var;
-                       amd64_mov_membase_reg (code, lmf_var->inst_basereg, lmf_var->inst_offset + G_STRUCT_OFFSET (MonoLMF, rsp), AMD64_RSP, 8);
+                       amd64_mov_membase_reg (code, lmf_var->inst_basereg, lmf_var->inst_offset + MONO_STRUCT_OFFSET (MonoLMF, rsp), AMD64_RSP, 8);
                        break;
                }
                case OP_X86_PUSH:
@@ -5700,25 +5564,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        int dreg = ins->dreg;
                        guint32 size = (ins->opcode == OP_ATOMIC_ADD_I4) ? 4 : 8;
 
-                       if (dreg == ins->inst_basereg)
-                               dreg = AMD64_R11;
-                       
-                       if (dreg != ins->sreg2)
-                               amd64_mov_reg_reg (code, ins->dreg, ins->sreg2, size);
-
-                       x86_prefix (code, X86_LOCK_PREFIX);
-                       amd64_xadd_membase_reg (code, ins->inst_basereg, ins->inst_offset, dreg, size);
-
-                       if (dreg != ins->dreg)
-                               amd64_mov_reg_reg (code, ins->dreg, dreg, size);
-
-                       break;
-               }
-               case OP_ATOMIC_ADD_NEW_I4:
-               case OP_ATOMIC_ADD_NEW_I8: {
-                       int dreg = ins->dreg;
-                       guint32 size = (ins->opcode == OP_ATOMIC_ADD_NEW_I4) ? 4 : 8;
-
                        if ((dreg == ins->sreg2) || (dreg == ins->inst_basereg))
                                dreg = AMD64_R11;
 
@@ -6666,7 +6511,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        MonoBasicBlock *bb;
        MonoMethodSignature *sig;
        MonoInst *ins;
-       int alloc_size, pos, i, cfa_offset, quad, max_epilog_size;
+       int alloc_size, pos, i, cfa_offset, quad, max_epilog_size, save_area_offset;
        guint8 *code;
        CallInfo *cinfo;
        MonoInst *lmf_var = cfg->lmf_var;
@@ -6843,7 +6688,6 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        }
 #endif
 
-#ifndef TARGET_WIN32
        if (mini_get_debug_options ()->init_stacks) {
                /* Fill the stack frame with a dummy value to force deterministic behavior */
        
@@ -6874,43 +6718,38 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RSP, -8, 8);
                amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RSP, -16, 8);
        }
-#endif 
 
        /* Save LMF */
-       if (method->save_lmf) {
+       if (method->save_lmf)
                code = emit_setup_lmf (cfg, code, lmf_var->inst_offset, cfa_offset);
-       }
 
        /* Save callee saved registers */
-       if (!method->save_lmf) {
-               gint32 save_area_offset;
-
-               if (cfg->arch.omit_fp) {
-                       save_area_offset = cfg->arch.reg_save_area_offset;
-                       /* Save caller saved registers after sp is adjusted */
-                       /* The registers are saved at the bottom of the frame */
-                       /* FIXME: Optimize this so the regs are saved at the end of the frame in increasing order */
-               } else {
-                       /* The registers are saved just below the saved rbp */
-                       save_area_offset = cfg->arch.reg_save_area_offset;
-               }
-
-               for (i = 0; i < AMD64_NREG; ++i)
-                       if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->used_int_regs & (1 << i))) {
-                               amd64_mov_membase_reg (code, cfg->frame_reg, save_area_offset, i, 8);
+       if (cfg->arch.omit_fp) {
+               save_area_offset = cfg->arch.reg_save_area_offset;
+               /* Save caller saved registers after sp is adjusted */
+               /* The registers are saved at the bottom of the frame */
+               /* FIXME: Optimize this so the regs are saved at the end of the frame in increasing order */
+       } else {
+               /* The registers are saved just below the saved rbp */
+               save_area_offset = cfg->arch.reg_save_area_offset;
+       }
 
-                               if (cfg->arch.omit_fp) {
-                                       mono_emit_unwind_op_offset (cfg, code, i, - (cfa_offset - save_area_offset));
-                                       /* These are handled automatically by the stack marking code */
-                                       mini_gc_set_slot_type_from_cfa (cfg, - (cfa_offset - save_area_offset), SLOT_NOREF);
-                               } else {
-                                       mono_emit_unwind_op_offset (cfg, code, i, - (-save_area_offset + (2 * 8)));
-                                       // FIXME: GC
-                               }
+       for (i = 0; i < AMD64_NREG; ++i) {
+               if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->arch.saved_iregs & (1 << i))) {
+                       amd64_mov_membase_reg (code, cfg->frame_reg, save_area_offset, i, 8);
 
-                               save_area_offset += 8;
-                               async_exc_point (code);
+                       if (cfg->arch.omit_fp) {
+                               mono_emit_unwind_op_offset (cfg, code, i, - (cfa_offset - save_area_offset));
+                               /* These are handled automatically by the stack marking code */
+                               mini_gc_set_slot_type_from_cfa (cfg, - (cfa_offset - save_area_offset), SLOT_NOREF);
+                       } else {
+                               mono_emit_unwind_op_offset (cfg, code, i, - (-save_area_offset + (2 * 8)));
+                               // FIXME: GC
                        }
+
+                       save_area_offset += 8;
+                       async_exc_point (code);
+               }
        }
 
        /* store runtime generic context */
@@ -7107,13 +6946,8 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                }
        }
 
-#ifdef HOST_WIN32
-       if (method->save_lmf) {
-               code = emit_push_lmf (cfg, code, lmf_var->inst_offset, &args_clobbered);
-       }
-#else
-       args_clobbered = TRUE;
-#endif
+       if (cfg->method->save_lmf)
+               args_clobbered = TRUE;
 
        if (trace) {
                args_clobbered = TRUE;
@@ -7210,7 +7044,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
 
                if (cfg->compile_aot) {
                        amd64_mov_reg_membase (code, AMD64_R11, info_var->inst_basereg, info_var->inst_offset, 8);
-                       amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, G_STRUCT_OFFSET (SeqPointInfo, ss_trigger_page), 8);
+                       amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, MONO_STRUCT_OFFSET (SeqPointInfo, ss_trigger_page), 8);
                } else {
                        amd64_mov_reg_imm (code, AMD64_R11, (guint64)ss_trigger_page);
                }
@@ -7233,7 +7067,8 @@ mono_arch_emit_epilog (MonoCompile *cfg)
        int max_epilog_size;
        CallInfo *cinfo;
        gint32 lmf_offset = cfg->lmf_var ? ((MonoInst*)cfg->lmf_var)->inst_offset : -1;
-       
+       gint32 save_area_offset = cfg->arch.reg_save_area_offset;
+
        max_epilog_size = get_max_epilog_size (cfg);
 
        while (cfg->code_len + max_epilog_size > (cfg->code_size - 16)) {
@@ -7244,6 +7079,14 @@ mono_arch_emit_epilog (MonoCompile *cfg)
 
        code = cfg->native_code + cfg->code_len;
 
+       cfg->has_unwind_info_for_epilog = TRUE;
+
+       /* Mark the start of the epilog */
+       mono_emit_unwind_op_mark_loc (cfg, code, 0);
+
+       /* Save the uwind state which is needed by the out-of-line code */
+       mono_emit_unwind_op_remember_state (cfg, code);
+
        if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
                code = mono_arch_instrument_epilog (cfg, mono_trace_leave_method, code, TRUE);
 
@@ -7251,18 +7094,14 @@ mono_arch_emit_epilog (MonoCompile *cfg)
        pos = 0;
        
        if (method->save_lmf) {
-#ifdef HOST_WIN32
-               code = emit_pop_lmf (cfg, code, lmf_offset);
-#endif
-
                /* check if we need to restore protection of the stack after a stack overflow */
-               if (mono_get_jit_tls_offset () != -1) {
+               if (!cfg->compile_aot && mono_get_jit_tls_offset () != -1) {
                        guint8 *patch;
                        code = mono_amd64_emit_tls_get (code, AMD64_RCX, mono_get_jit_tls_offset ());
                        /* we load the value in a separate instruction: this mechanism may be
                         * used later as a safer way to do thread interruption
                         */
-                       amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RCX, G_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 8);
+                       amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RCX, MONO_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 8);
                        x86_alu_reg_imm (code, X86_CMP, X86_ECX, 0);
                        patch = code;
                        x86_branch8 (code, X86_CC_Z, 0, FALSE);
@@ -7272,46 +7111,22 @@ mono_arch_emit_epilog (MonoCompile *cfg)
                } else {
                        /* FIXME: maybe save the jit tls in the prolog */
                }
-
-               /* Restore caller saved regs */
                if (cfg->used_int_regs & (1 << AMD64_RBP)) {
-                       amd64_mov_reg_membase (code, AMD64_RBP, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbp), 8);
-               }
-               if (cfg->used_int_regs & (1 << AMD64_RBX)) {
-                       amd64_mov_reg_membase (code, AMD64_RBX, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbx), 8);
-               }
-               if (cfg->used_int_regs & (1 << AMD64_R12)) {
-                       amd64_mov_reg_membase (code, AMD64_R12, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r12), 8);
-               }
-               if (cfg->used_int_regs & (1 << AMD64_R13)) {
-                       amd64_mov_reg_membase (code, AMD64_R13, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r13), 8);
-               }
-               if (cfg->used_int_regs & (1 << AMD64_R14)) {
-                       amd64_mov_reg_membase (code, AMD64_R14, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r14), 8);
-               }
-               if (cfg->used_int_regs & (1 << AMD64_R15)) {
-#if defined(__default_codegen__)
-                       amd64_mov_reg_membase (code, AMD64_R15, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, r15), 8);
-#elif defined(__native_client_codegen__)
-                       g_assert_not_reached();
-#endif
-               }
-#ifdef HOST_WIN32
-               if (cfg->used_int_regs & (1 << AMD64_RDI)) {
-                       amd64_mov_reg_membase (code, AMD64_RDI, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rdi), 8);
-               }
-               if (cfg->used_int_regs & (1 << AMD64_RSI)) {
-                       amd64_mov_reg_membase (code, AMD64_RSI, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsi), 8);
+                       amd64_mov_reg_membase (code, AMD64_RBP, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp), 8);
                }
-#endif
-       } else {
-               gint32 save_area_offset = cfg->arch.reg_save_area_offset;
+       }
 
-               for (i = 0; i < AMD64_NREG; ++i)
-                       if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->used_int_regs & (1 << i))) {
+       /* Restore callee saved regs */
+       for (i = 0; i < AMD64_NREG; ++i) {
+               if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->arch.saved_iregs & (1 << i))) {
+                       /* Restore only used_int_regs, not arch.saved_iregs */
+                       if (cfg->used_int_regs & (1 << i)) {
                                amd64_mov_reg_membase (code, i, cfg->frame_reg, save_area_offset, 8);
-                               save_area_offset += 8;
+                               mono_emit_unwind_op_same_value (cfg, code, i);
+                               async_exc_point (code);
                        }
+                       save_area_offset += 8;
+               }
        }
 
        /* Load returned vtypes into registers if needed */
@@ -7340,14 +7155,20 @@ mono_arch_emit_epilog (MonoCompile *cfg)
        }
 
        if (cfg->arch.omit_fp) {
-               if (cfg->arch.stack_alloc_size)
+               if (cfg->arch.stack_alloc_size) {
                        amd64_alu_reg_imm (code, X86_ADD, AMD64_RSP, cfg->arch.stack_alloc_size);
+               }
        } else {
                amd64_leave (code);
+               mono_emit_unwind_op_same_value (cfg, code, AMD64_RBP);
        }
+       mono_emit_unwind_op_def_cfa (cfg, code, AMD64_RSP, 8);
        async_exc_point (code);
        amd64_ret (code);
 
+       /* Restore the unwind state to be the same as before the epilog */
+       mono_emit_unwind_op_restore_state (cfg, code);
+
        cfg->code_len = code - cfg->native_code;
 
        g_assert (cfg->code_len < cfg->code_size);
@@ -7946,15 +7767,15 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
 
                /* Replace the this argument with the target */
                amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
-               amd64_mov_reg_membase (code, AMD64_ARG_REG1, AMD64_RAX, G_STRUCT_OFFSET (MonoDelegate, target), 8);
-               amd64_jump_membase (code, AMD64_RAX, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+               amd64_mov_reg_membase (code, AMD64_ARG_REG1, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 8);
+               amd64_jump_membase (code, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
 
                g_assert ((code - start) < 64);
        } else {
                start = code = mono_global_codeman_reserve (64);
 
                if (param_count == 0) {
-                       amd64_jump_membase (code, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+                       amd64_jump_membase (code, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
                } else {
                        /* We have to shift the arguments left */
                        amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
@@ -7969,7 +7790,7 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
 #endif
                        }
 
-                       amd64_jump_membase (code, AMD64_RAX, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+                       amd64_jump_membase (code, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
                }
                g_assert ((code - start) < 64);
        }
@@ -8081,21 +7902,9 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
 void
 mono_arch_finish_init (void)
 {
-#ifdef HOST_WIN32
-       /* 
-        * We need to init this multiple times, since when we are first called, the key might not
-        * be initialized yet.
-        */
-       jit_tls_offset = mono_get_jit_tls_key ();
-
-       /* Only 64 tls entries can be accessed using inline code */
-       if (jit_tls_offset >= 64)
-               jit_tls_offset = -1;
-#else
-#ifdef MONO_XEN_OPT
+#if !defined(HOST_WIN32) && defined(MONO_XEN_OPT)
        optimize_for_xen = access ("/proc/xen", F_OK) == 0;
 #endif
-#endif
 }
 
 void
@@ -8103,8 +7912,6 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
 {
 }
 
-#ifdef MONO_ARCH_HAVE_IMT
-
 #if defined(__default_codegen__)
 #define CMP_SIZE (6 + 1)
 #define CMP_REG_REG_SIZE (4 + 1)
@@ -8307,7 +8114,6 @@ mono_arch_find_imt_method (mgreg_t *regs, guint8 *code)
 {
        return (MonoMethod*)regs [MONO_ARCH_IMT_REG];
 }
-#endif
 
 MonoVTable*
 mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code)
@@ -8731,3 +8537,19 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
 }
 
 #endif
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+       switch (opcode) {
+       case OP_ATOMIC_ADD_I4:
+       case OP_ATOMIC_ADD_I8:
+       case OP_ATOMIC_EXCHANGE_I4:
+       case OP_ATOMIC_EXCHANGE_I8:
+       case OP_ATOMIC_CAS_I4:
+       case OP_ATOMIC_CAS_I8:
+               return TRUE;
+       default:
+               return FALSE;
+       }
+}
index 9c1c7ca15a348371d3d323f1066dc8a846d9816e..b7c974e3acd295a4b24eac8d68c1d030eff1ae23 100644 (file)
@@ -167,9 +167,6 @@ struct MonoLMF {
         * If the third lowest bit is set, then this is a MonoLMFTramp structure.
         */
        gpointer    previous_lmf;
-#ifdef HOST_WIN32
-       gpointer    lmf_addr;
-#endif
 #if defined(__default_codegen__) || defined(HOST_WIN32)
        guint64     rip;
 #elif defined(__native_client_codegen__)
@@ -177,17 +174,8 @@ struct MonoLMF {
        /* this allows the structure to match for 32-bit compilers.    */
        guint64     rip __attribute__ ((aligned(8)));
 #endif
-       guint64     rbx;
        guint64     rbp;
        guint64     rsp;
-       guint64     r12;
-       guint64     r13;
-       guint64     r14;
-       guint64     r15;
-#ifdef HOST_WIN32
-       guint64     rdi;
-       guint64     rsi;
-#endif
 };
 
 /* LMF structure used by the JIT trampolines */
@@ -202,6 +190,7 @@ typedef struct MonoCompileArch {
        gint32 reg_save_area_offset;
        gint32 stack_alloc_size;
        gint32 sp_fp_offset;
+       guint32 saved_iregs;
        gboolean omit_fp, omit_fp_computed, no_pushes;
        gpointer cinfo;
        gint32 async_point_count;
@@ -214,6 +203,28 @@ typedef struct MonoCompileArch {
        gpointer lmf_var;
 } MonoCompileArch;
 
+
+
+#ifdef HOST_WIN32
+#define PARAM_REGS 4
+#else
+#define PARAM_REGS 6
+#endif
+
+/* Structure used by the sequence points in AOTed code */
+typedef struct {
+       gpointer ss_trigger_page;
+       gpointer bp_trigger_page;
+       gpointer bp_addrs [MONO_ZERO_LEN_ARRAY];
+} SeqPointInfo;
+
+typedef struct {
+       mgreg_t regs [PARAM_REGS];
+       mgreg_t res;
+       guint8 *ret;
+} DynCallArgs;
+
+
 #define MONO_CONTEXT_SET_LLVM_EXC_REG(ctx, exc) do { (ctx)->rax = (gsize)exc; } while (0)
 
 #define MONO_ARCH_INIT_TOP_LMF_ENTRY(lmf)
@@ -298,7 +309,7 @@ typedef struct MonoCompileArch {
 
 #define MONO_ARCH_NOMAP32BIT
 
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
 
 #define REG_RAX 7
 #define REG_RCX 4
@@ -345,11 +356,7 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
-#define MONO_ARCH_HAVE_ATOMIC_CAS 1
 #define MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES 1
-#define MONO_ARCH_HAVE_IMT 1
 #define MONO_ARCH_HAVE_TLS_GET (mono_amd64_have_tls_get ())
 #define MONO_ARCH_IMT_REG AMD64_R10
 #define MONO_ARCH_IMT_SCRATCH_REG AMD64_R11
index e6ebc8dea7e851849a18dcdc7462c3c076ef96b6..eff7174271e83652930b6e7c3fdc9e8a5c6f6b32 100644 (file)
@@ -12,6 +12,7 @@
 #include "mini.h"
 #include <string.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/utils/mono-mmap.h>
@@ -152,13 +153,6 @@ static gpointer ss_trigger_page;
 /* Enabled breakpoints read from this trigger page */
 static gpointer bp_trigger_page;
 
-/* Structure used by the sequence points in AOTed code */
-typedef struct {
-       gpointer ss_trigger_page;
-       gpointer bp_trigger_page;
-       guint8* bp_addrs [MONO_ZERO_LEN_ARRAY];
-} SeqPointInfo;
-
 /*
  * TODO:
  * floating point support: on ARM it is a mess, there are at least 3
@@ -208,7 +202,9 @@ int mono_exc_esp_offset = 0;
        }                                                                                                                                       \
        } while (0)
 
+#ifndef DISABLE_JIT
 static void mono_arch_compute_omit_fp (MonoCompile *cfg);
+#endif
 
 const char*
 mono_arch_regname (int reg)
@@ -461,7 +457,7 @@ emit_save_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset)
                                                         (gpointer)"pthread_getspecific");
                code = emit_call_seq (cfg, code);
                /* lmf_addr = &jit_tls->lmf */
-               lmf_offset = G_STRUCT_OFFSET (MonoJitTlsData, lmf);
+               lmf_offset = MONO_STRUCT_OFFSET (MonoJitTlsData, lmf);
                g_assert (arm_is_imm8 (lmf_offset));
                ARM_ADD_REG_IMM (code, ARMREG_R0, ARMREG_R0, lmf_offset, 0);
 
@@ -484,18 +480,18 @@ emit_save_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset)
         */
        code = emit_big_add (code, ARMREG_R1, ARMREG_SP, lmf_offset);
        /* r0 is the result from mono_get_lmf_addr () */
-       ARM_STR_IMM (code, ARMREG_R0, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, lmf_addr));
+       ARM_STR_IMM (code, ARMREG_R0, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, lmf_addr));
        /* new_lmf->previous_lmf = *lmf_addr */
-       ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
-       ARM_STR_IMM (code, ARMREG_IP, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_STR_IMM (code, ARMREG_IP, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
        /* *(lmf_addr) = r1 */
-       ARM_STR_IMM (code, ARMREG_R1, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_STR_IMM (code, ARMREG_R1, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
        /* Skip method (only needed for trampoline LMF frames) */
-       ARM_STR_IMM (code, ARMREG_SP, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, sp));
-       ARM_STR_IMM (code, ARMREG_FP, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, fp));
+       ARM_STR_IMM (code, ARMREG_SP, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, sp));
+       ARM_STR_IMM (code, ARMREG_FP, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, fp));
        /* save the current IP */
        ARM_MOV_REG_REG (code, ARMREG_IP, ARMREG_PC);
-       ARM_STR_IMM (code, ARMREG_IP, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, ip));
+       ARM_STR_IMM (code, ARMREG_IP, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, ip));
 
        for (i = 0; i < sizeof (MonoLMF); i += sizeof (mgreg_t))
                mini_gc_set_slot_type_from_fp (cfg, lmf_offset + i, SLOT_NOREF);
@@ -603,11 +599,11 @@ emit_restore_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset)
        }
 
        /* ip = previous_lmf */
-       ARM_LDR_IMM (code, ARMREG_IP, basereg, offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_LDR_IMM (code, ARMREG_IP, basereg, offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
        /* lr = lmf_addr */
-       ARM_LDR_IMM (code, ARMREG_LR, basereg, offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr));
+       ARM_LDR_IMM (code, ARMREG_LR, basereg, offset + MONO_STRUCT_OFFSET (MonoLMF, lmf_addr));
        /* *(lmf_addr) = previous_lmf */
-       ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
 
        return code;
 }
@@ -682,8 +678,8 @@ get_delegate_invoke_impl (gboolean has_target, gboolean param_count, guint32 *co
                start = code = mono_global_codeman_reserve (12);
 
                /* Replace the this argument with the target */
-               ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
-               ARM_LDR_IMM (code, ARMREG_R0, ARMREG_R0, G_STRUCT_OFFSET (MonoDelegate, target));
+               ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
+               ARM_LDR_IMM (code, ARMREG_R0, ARMREG_R0, MONO_STRUCT_OFFSET (MonoDelegate, target));
                ARM_MOV_REG_REG (code, ARMREG_PC, ARMREG_IP);
 
                g_assert ((code - start) <= 12);
@@ -695,7 +691,7 @@ get_delegate_invoke_impl (gboolean has_target, gboolean param_count, guint32 *co
                size = 8 + param_count * 4;
                start = code = mono_global_codeman_reserve (size);
 
-               ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+               ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
                /* slide down the arguments */
                for (i = 0; i < param_count; ++i) {
                        ARM_MOV_REG_REG (code, (ARMREG_R0 + i), (ARMREG_R0 + i + 1));
@@ -811,10 +807,13 @@ mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
 void
 mono_arch_cpu_init (void)
 {
-#if defined(__APPLE__)
-       i8_align = 4;
-#else
-       i8_align = __alignof__ (gint64);
+       i8_align = MONO_ABI_ALIGNOF (gint64);
+#ifdef MONO_CROSS_COMPILE
+       /* Need to set the alignment of i8 since it can different on the target */
+#ifdef TARGET_ANDROID
+       /* linux gnueabi */
+       mono_type_set_alignment (MONO_TYPE_I8, i8_align);
+#endif
 #endif
 }
 
@@ -832,12 +831,12 @@ create_function_wrapper (gpointer function)
        ARM_SUB_REG_IMM8 (code, ARMREG_SP, ARMREG_SP, sizeof (MonoContext));
 
        /* save ip, lr and pc into their correspodings ctx.regs slots. */
-       ARM_STR_IMM (code, ARMREG_IP, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, regs) + sizeof (mgreg_t) * ARMREG_IP);
-       ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_LR);
-       ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_PC);
+       ARM_STR_IMM (code, ARMREG_IP, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, regs) + sizeof (mgreg_t) * ARMREG_IP);
+       ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_LR);
+       ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_PC);
 
        /* save r0..r10 and fp */
-       ARM_ADD_REG_IMM8 (code, ARMREG_IP, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, regs));
+       ARM_ADD_REG_IMM8 (code, ARMREG_IP, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, regs));
        ARM_STM (code, ARMREG_IP, 0x0fff);
 
        /* now we can update fp. */
@@ -846,11 +845,11 @@ create_function_wrapper (gpointer function)
        /* make ctx.esp hold the actual value of sp at the beginning of this method. */
        ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_FP, sizeof (MonoContext));
        ARM_STR_IMM (code, ARMREG_R0, ARMREG_IP, 4 * ARMREG_SP);
-       ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_SP);
+       ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_SP);
 
        /* make ctx.eip hold the address of the call. */
        ARM_SUB_REG_IMM8 (code, ARMREG_LR, ARMREG_LR, 4);
-       ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, pc));
+       ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, pc));
 
        /* r0 now points to the MonoContext */
        ARM_MOV_REG_REG (code, ARMREG_R0, ARMREG_FP);
@@ -871,12 +870,12 @@ create_function_wrapper (gpointer function)
        ARM_BLX_REG (code, ARMREG_IP);
 
        /* we're back; save ctx.eip and ctx.esp into the corresponding regs slots. */
-       ARM_LDR_IMM (code, ARMREG_R0, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, pc));
-       ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_LR);
-       ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_PC);
+       ARM_LDR_IMM (code, ARMREG_R0, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, pc));
+       ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_LR);
+       ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_PC);
 
        /* make ip point to the regs array, then restore everything, including pc. */
-       ARM_ADD_REG_IMM8 (code, ARMREG_IP, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, regs));
+       ARM_ADD_REG_IMM8 (code, ARMREG_IP, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, regs));
        ARM_LDM (code, ARMREG_IP, 0xffff);
 
        mono_arch_flush_icache (start, code - start);
@@ -1217,13 +1216,6 @@ typedef struct {
 
 #define DEBUG(a)
 
-#ifndef __GNUC__
-/*#define __alignof__(a) sizeof(a)*/
-#define __alignof__(type) G_STRUCT_OFFSET(struct { char c; type x; }, x)
-#endif
-
-#define PARAM_REGS 4
-
 static void inline
 add_general (guint *gr, guint *stack_size, ArgInfo *ainfo, gboolean simple)
 {
@@ -1972,7 +1964,7 @@ mono_arch_allocate_vars (MonoCompile *cfg)
                offset += size;
        }
 
-       if (cfg->has_atomic_exchange_i4 || cfg->has_atomic_cas_i4 || cfg->has_atomic_add_new_i4) {
+       if (cfg->has_atomic_exchange_i4 || cfg->has_atomic_cas_i4 || cfg->has_atomic_add_i4) {
                /* Allocate a temporary used by the atomic ops */
                size = 4;
                align = 4;
@@ -2598,19 +2590,13 @@ mono_arch_is_inst_imm (gint64 imm)
        return TRUE;
 }
 
-#define DYN_CALL_STACK_ARGS 6
-
 typedef struct {
        MonoMethodSignature *sig;
        CallInfo *cinfo;
+       MonoType *rtype;
+       MonoType **param_types;
 } ArchDynCallInfo;
 
-typedef struct {
-       mgreg_t regs [PARAM_REGS + DYN_CALL_STACK_ARGS];
-       mgreg_t res, res2;
-       guint8 *ret;
-} DynCallArgs;
-
 static gboolean
 dyn_call_supported (CallInfo *cinfo, MonoMethodSignature *sig)
 {
@@ -2692,6 +2678,7 @@ mono_arch_dyn_call_prepare (MonoMethodSignature *sig)
 {
        ArchDynCallInfo *info;
        CallInfo *cinfo;
+       int i;
 
        cinfo = get_call_info (NULL, NULL, sig);
 
@@ -2704,6 +2691,10 @@ mono_arch_dyn_call_prepare (MonoMethodSignature *sig)
        // FIXME: Preprocess the info to speed up start_dyn_call ()
        info->sig = sig;
        info->cinfo = cinfo;
+       info->rtype = mini_replace_type (sig->ret);
+       info->param_types = g_new0 (MonoType*, sig->param_count);
+       for (i = 0; i < sig->param_count; ++i)
+               info->param_types [i] = mini_replace_type (sig->params [i]);
        
        return (MonoDynCallInfo*)info;
 }
@@ -2744,7 +2735,7 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
                p->regs [greg ++] = (mgreg_t)ret;
 
        for (i = pindex; i < sig->param_count; i++) {
-               MonoType *t = mono_type_get_underlying_type (sig->params [i]);
+               MonoType *t = dinfo->param_types [i];
                gpointer *arg = args [arg_index ++];
                ArgInfo *ainfo = &dinfo->cinfo->args [i + sig->hasthis];
                int slot = -1;
@@ -2832,13 +2823,11 @@ void
 mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
 {
        ArchDynCallInfo *ainfo = (ArchDynCallInfo*)info;
-       MonoMethodSignature *sig = ((ArchDynCallInfo*)info)->sig;
-       MonoType *ptype;
+       MonoType *ptype = ainfo->rtype;
        guint8 *ret = ((DynCallArgs*)buf)->ret;
        mgreg_t res = ((DynCallArgs*)buf)->res;
        mgreg_t res2 = ((DynCallArgs*)buf)->res2;
 
-       ptype = mini_type_get_underlying_type (NULL, sig->ret);
        switch (ptype->type) {
        case MONO_TYPE_VOID:
                *(gpointer*)ret = NULL;
@@ -4166,7 +4155,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        break;
                case OP_ATOMIC_EXCHANGE_I4:
                case OP_ATOMIC_CAS_I4:
-               case OP_ATOMIC_ADD_NEW_I4: {
+               case OP_ATOMIC_ADD_I4: {
                        int tmpreg;
                        guint8 *buf [16];
 
@@ -4206,10 +4195,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                ARM_CMP_REG_IMM (code, tmpreg, 0, 0);
                                buf [2] = code;
                                ARM_B_COND (code, ARMCOND_NE, 0);
-                               arm_patch (buf [2], buf [1]);
+                               arm_patch (buf [2], buf [0]);
                                arm_patch (buf [1], code);
                                break;
-                       case OP_ATOMIC_ADD_NEW_I4:
+                       case OP_ATOMIC_ADD_I4:
                                buf [0] = code;
                                ARM_DMB (code, ARM_DMB_SY);
                                ARM_LDREX_REG (code, ARMREG_LR, ins->sreg1);
@@ -4481,7 +4470,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
 
                                ARM_LDR_IMM (code, dreg, info_var->inst_basereg, info_var->inst_offset);
                                /* Add the offset */
-                               val = ((offset / 4) * sizeof (guint8*)) + G_STRUCT_OFFSET (SeqPointInfo, bp_addrs);
+                               val = ((offset / 4) * sizeof (guint8*)) + MONO_STRUCT_OFFSET (SeqPointInfo, bp_addrs);
                                /* Load the info->bp_addrs [offset], which is either 0 or the address of a trigger page */
                                if (arm_is_imm12 ((int)val)) {
                                        ARM_LDR_IMM (code, dreg, dreg, val);
@@ -5006,8 +4995,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
 
                        /* Save result */
                        ARM_LDR_IMM (code, ARMREG_IP, var->inst_basereg, var->inst_offset);
-                       ARM_STR_IMM (code, ARMREG_R0, ARMREG_IP, G_STRUCT_OFFSET (DynCallArgs, res)); 
-                       ARM_STR_IMM (code, ARMREG_R1, ARMREG_IP, G_STRUCT_OFFSET (DynCallArgs, res2)); 
+                       ARM_STR_IMM (code, ARMREG_R0, ARMREG_IP, MONO_STRUCT_OFFSET (DynCallArgs, res)); 
+                       ARM_STR_IMM (code, ARMREG_R1, ARMREG_IP, MONO_STRUCT_OFFSET (DynCallArgs, res2)); 
                        break;
                }
                case OP_THROW: {
@@ -6131,7 +6120,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
 
                        ARM_LDR_IMM (code, dreg, info_var->inst_basereg, info_var->inst_offset);
                        /* Load the trigger page addr */
-                       ARM_LDR_IMM (code, dreg, dreg, G_STRUCT_OFFSET (SeqPointInfo, ss_trigger_page));
+                       ARM_LDR_IMM (code, dreg, dreg, MONO_STRUCT_OFFSET (SeqPointInfo, ss_trigger_page));
                        ARM_STR_IMM (code, dreg, ss_trigger_page_var->inst_basereg, ss_trigger_page_var->inst_offset);
                }
        }
@@ -6420,8 +6409,6 @@ mono_arch_flush_register_windows (void)
 {
 }
 
-#ifdef MONO_ARCH_HAVE_IMT
-
 #ifndef DISABLE_JIT
 
 void
@@ -6907,8 +6894,6 @@ mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckI
        return start;
 }
 
-#endif
-
 mgreg_t
 mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
 {
@@ -6933,8 +6918,7 @@ mono_arch_get_trampolines (gboolean aot)
        return mono_arm_get_exception_trampolines (aot);
 }
 
-
-#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
+#if defined(MONO_ARCH_SOFT_DEBUG_SUPPORTED)
 /*
  * mono_arch_set_breakpoint:
  *
@@ -7212,9 +7196,9 @@ gboolean
 mono_arch_opcode_supported (int opcode)
 {
        switch (opcode) {
+       case OP_ATOMIC_ADD_I4:
        case OP_ATOMIC_EXCHANGE_I4:
        case OP_ATOMIC_CAS_I4:
-       case OP_ATOMIC_ADD_NEW_I4:
                return v7_supported;
        default:
                return FALSE;
index cba8a33a7442ad1adfd34e8a9221d25fcc4803d5..7c3fd9ad0412e7af3f2b956764d546c4ad87726b 100644 (file)
  * reproduceable results for benchmarks */
 #define MONO_ARCH_CODE_ALIGNMENT 32
 
+/* Argument marshallings for calls between gsharedvt and normal code */
+typedef enum {
+       GSHAREDVT_ARG_NONE = 0,
+       GSHAREDVT_ARG_BYVAL_TO_BYREF = 1,
+       GSHAREDVT_ARG_BYREF_TO_BYVAL = 2,
+       GSHAREDVT_ARG_BYREF_TO_BYVAL_I1 = 3,
+       GSHAREDVT_ARG_BYREF_TO_BYVAL_I2 = 4,
+       GSHAREDVT_ARG_BYREF_TO_BYVAL_U1 = 5,
+       GSHAREDVT_ARG_BYREF_TO_BYVAL_U2 = 6
+} GSharedVtArgMarshal;
+
 /* Return value marshalling for calls between gsharedvt and normal code */
 typedef enum {
        GSHAREDVT_RET_NONE = 0,
@@ -156,6 +167,23 @@ typedef struct {
        int map [MONO_ZERO_LEN_ARRAY];
 } GSharedVtCallInfo;
 
+/* Structure used by the sequence points in AOTed code */
+typedef struct {
+       gpointer ss_trigger_page;
+       gpointer bp_trigger_page;
+       guint8* bp_addrs [MONO_ZERO_LEN_ARRAY];
+} SeqPointInfo;
+
+
+#define PARAM_REGS 4
+#define DYN_CALL_STACK_ARGS 6
+
+typedef struct {
+       mgreg_t regs [PARAM_REGS + DYN_CALL_STACK_ARGS];
+       mgreg_t res, res2;
+       guint8 *ret;
+} DynCallArgs;
+
 void arm_patch (guchar *code, const guchar *target);
 guint8* mono_arm_emit_load_imm (guint8 *code, int dreg, guint32 val);
 int mono_arm_is_rotated_imm8 (guint32 val, gint *rot_amount);
@@ -235,7 +263,6 @@ typedef struct MonoCompileArch {
 #define ARM_NUM_REG_FPARGS 0
 
 #define MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES 1
-#define MONO_ARCH_HAVE_IMT 1
 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
 
 #define MONO_ARCH_AOT_SUPPORTED 1
@@ -246,7 +273,10 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_DYN_CALL_SUPPORTED 1
 #define MONO_ARCH_DYN_CALL_PARAM_AREA 24
 
+#ifndef MONO_CROSS_COMPILE
 #define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1
+#endif
+
 #define MONO_ARCH_HAVE_EXCEPTIONS_INIT 1
 #define MONO_ARCH_HAVE_GET_TRAMPOLINES 1
 #define MONO_ARCH_HAVE_CONTEXT_SET_INT_REG 1
@@ -263,10 +293,6 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_HAVE_OP_TAIL_CALL 1
 #endif
 #define MONO_ARCH_HAVE_DUMMY_INIT 1
-#define MONO_ARCH_HAVE_OPCODE_SUPPORTED 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
-#define MONO_ARCH_HAVE_ATOMIC_CAS 1
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
 
 #if defined(__native_client__)
 #undef MONO_ARCH_SOFT_DEBUG_SUPPORTED
index 6e5bf2f8586b331670c76f02325d0cb7585f3d95..66eb8fcdcf2f0c78f58f12ca2fd5bfeae4091fd7 100644 (file)
@@ -1452,6 +1452,8 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                                                if (k != j)
                                                        sreg_masks [k] &= ~ (regmask (dest_sreg));
                                        }
+                                       /* See below */
+                                       dreg_mask &= ~ (regmask (dest_sreg));
                                } else {
                                        val = rs->vassign [sreg];
                                        if (val == -1) {
@@ -1471,7 +1473,7 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
                                                                sreg_masks [k] &= ~ (regmask (dest_sreg));
                                                }
                                                /* 
-                                                * Prevent the dreg from being allocate to dest_sreg 
+                                                * Prevent the dreg from being allocated to dest_sreg
                                                 * too, since it could force sreg1 to be allocated to 
                                                 * the same reg on x86.
                                                 */
diff --git a/mono/mini/mini-cross-helpers.c b/mono/mini/mini-cross-helpers.c
new file mode 100644 (file)
index 0000000..dede99f
--- /dev/null
@@ -0,0 +1,13 @@
+#include "config.h"
+
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/mini/mini-cross-helpers.c"
+#else
+
+void mono_cross_helpers_run (void);
+
+void
+mono_cross_helpers_run (void)
+{
+}
+#endif
index 221082759f7bcbe51b0ef034a0b922aa3e06654b..7659466cd243880bbea1d68d553d76a3a6dace32 100644 (file)
@@ -217,6 +217,14 @@ find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *res, Mo
        if (!err)
                return (gpointer)-1;
 
+       if (*lmf && ((*lmf) != jit_tls->first_lmf) && ((gpointer)MONO_CONTEXT_GET_SP (new_ctx) >= (gpointer)(*lmf))) {
+               /*
+                * Remove any unused lmf.
+                * Mask out the lower bits which might be used to hold additional information.
+                */
+               *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~(SIZEOF_VOID_P -1));
+       }
+
        /* Convert between the new and the old APIs */
        switch (frame.type) {
        case FRAME_TYPE_MANAGED:
@@ -369,6 +377,14 @@ mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
        if (!err)
                return FALSE;
 
+       if (*lmf && ((*lmf) != jit_tls->first_lmf) && ((gpointer)MONO_CONTEXT_GET_SP (new_ctx) >= (gpointer)(*lmf))) {
+               /*
+                * Remove any unused lmf.
+                * Mask out the lower bits which might be used to hold additional information.
+                */
+               *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~(SIZEOF_VOID_P -1));
+       }
+
        if (frame->ji && !frame->ji->async)
                method = jinfo_get_method (frame->ji);
 
@@ -1800,7 +1816,7 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
                                        mono_profiler_exception_clause_handler (method, ei->flags, i);
                                        jit_tls->orig_ex_ctx_set = FALSE;
                                        MONO_CONTEXT_SET_IP (ctx, ei->handler_start);
-                                       *(mono_get_lmf_addr ()) = lmf;
+                                       mono_set_lmf (lmf);
 #ifndef DISABLE_PERFCOUNTERS
                                        mono_perfcounters->exceptions_depth += frame_count;
 #endif
@@ -1828,7 +1844,7 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
 #ifndef DISABLE_PERFCOUNTERS
                                        mono_perfcounters->exceptions_finallys++;
 #endif
-                                       *(mono_get_lmf_addr ()) = lmf;
+                                       mono_set_lmf (lmf);
                                        if (ji->from_llvm) {
                                                /* 
                                                 * LLVM compiled finally handlers follow the design
@@ -2221,6 +2237,8 @@ print_stack_frame_to_string (StackFrameInfo *frame, MonoContext *ctx, gpointer d
        return FALSE;
 }
 
+#ifndef MONO_CROSS_COMPILE
+
 static gboolean handling_sigsegv = FALSE;
 
 /*
@@ -2248,7 +2266,7 @@ mono_handle_native_sigsegv (int signal, void *ctx)
                        ;
 #else
                while (1) {
-                       sleep (0);
+                       sleep (1);
                }
 #endif
        }
@@ -2344,6 +2362,16 @@ mono_handle_native_sigsegv (int signal, void *ctx)
        }
 }
 
+#else
+
+void
+mono_handle_native_sigsegv (int signal, void *ctx)
+{
+       g_assert_not_reached ();
+}
+
+#endif /* !MONO_CROSS_COMPILE */
+
 static void
 mono_print_thread_dump_internal (void *sigctx, MonoContext *start_ctx)
 {
@@ -2352,7 +2380,10 @@ mono_print_thread_dump_internal (void *sigctx, MonoContext *start_ctx)
        MonoContext ctx;
 #endif
        GString* text = g_string_new (0);
-       char *name, *wapi_desc;
+       char *name;
+#ifndef HOST_WIN32
+       char *wapi_desc;
+#endif
        GError *error = NULL;
 
        if (thread->name) {
@@ -2728,5 +2759,6 @@ mono_jinfo_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len)
        if (ji->from_aot)
                return mono_aot_get_unwind_info (ji, unwind_info_len);
        else
-               return mono_get_cached_unwind_info (ji->used_regs, unwind_info_len);
+               /* The upper 16 bits of ji->unwind_info might contain the epilog offset */
+               return mono_get_cached_unwind_info (ji->unwind_info & 0xffff, unwind_info_len);
 }
index 5589d99eabb0e1f78f2ded0de3c90e7d7e1b0b27..8ca1eebfe5b6bcdc5728d5a4861c2d06e3c31e5e 100644 (file)
 //#if 0
 #if defined(MONO_ARCH_GC_MAPS_SUPPORTED)
 
+#include <mono/metadata/sgen-conf.h>
 #include <mono/metadata/gc-internal.h>
 #include <mono/utils/mono-counters.h>
 
-#if SIZEOF_VOID_P == 4
-typedef guint32 mword;
-#else
-typedef guint64 mword;
-#endif
-
 #define SIZEOF_SLOT ((int)sizeof (mgreg_t))
 
 #define GC_BITS_PER_WORD (sizeof (mword) * 8)
@@ -598,7 +593,9 @@ thread_suspend_func (gpointer user_data, void *sigctx, MonoContext *ctx)
 
        if (tls->tid != GetCurrentThreadId ()) {
                /* Happens on osx because threads are not suspended using signals */
+#ifndef TARGET_WIN32
                gboolean res;
+#endif
 
                g_assert (tls->info);
 #ifdef TARGET_WIN32
@@ -1106,7 +1103,7 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
  * pass.
  */
 static void
-precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
+precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end, void *gc_data)
 {
        int findex, i;
        FrameInfo *fi;
@@ -1144,7 +1141,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
                                        MonoObject *obj = *ptr;
                                        if (obj) {
                                                DEBUG (fprintf (logfile, "\tref %s0x%x(fp)=%p: %p ->", (guint8*)ptr >= (guint8*)fi->fp ? "" : "-", ABS ((int)((gssize)ptr - (gssize)fi->fp)), ptr, obj));
-                                               *ptr = mono_gc_scan_object (obj);
+                                               *ptr = mono_gc_scan_object (obj, gc_data);
                                                DEBUG (fprintf (logfile, " %p.\n", *ptr));
                                        } else {
                                                DEBUG (fprintf (logfile, "\tref %s0x%x(fp)=%p: %p.\n", (guint8*)ptr >= (guint8*)fi->fp ? "" : "-", ABS ((int)((gssize)ptr - (gssize)fi->fp)), ptr, obj));
@@ -1185,7 +1182,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
 
                        if (obj) {
                                DEBUG (fprintf (logfile, "\treg %s saved at %p: %p ->", mono_arch_regname (fi->regs [i]), ptr, obj));
-                               *ptr = mono_gc_scan_object (obj);
+                               *ptr = mono_gc_scan_object (obj, gc_data);
                                DEBUG (fprintf (logfile, " %p.\n", *ptr));
                        } else {
                                DEBUG (fprintf (logfile, "\treg %s saved at %p: %p\n", mono_arch_regname (fi->regs [i]), ptr, obj));
@@ -1213,7 +1210,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
  * structure filled up by thread_suspend_func. 
  */
 static void
-thread_mark_func (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise)
+thread_mark_func (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise, void *gc_data)
 {
        TlsData *tls = user_data;
 
@@ -1224,7 +1221,7 @@ thread_mark_func (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gb
        if (!precise)
                conservative_pass (tls, stack_start, stack_end);
        else
-               precise_pass (tls, stack_start, stack_end);
+               precise_pass (tls, stack_start, stack_end, gc_data);
 }
 
 #ifndef DISABLE_JIT
@@ -1869,7 +1866,11 @@ sp_offset_to_fp_offset (MonoCompile *cfg, int sp_offset)
 #elif defined(TARGET_X86)
        /* The offset is computed from the sp at the start of the call sequence */
        g_assert (cfg->frame_reg == X86_EBP);
+#ifdef MONO_X86_NO_PUSHES
+       return (- cfg->arch.sp_fp_offset + sp_offset);
+#else
        return (- cfg->arch.sp_fp_offset - sp_offset);  
+#endif
 #else
        NOT_IMPLEMENTED;
        return -1;
@@ -2056,7 +2057,11 @@ compute_frame_size (MonoCompile *cfg)
 #ifdef TARGET_AMD64
        min_offset = MIN (min_offset, -cfg->arch.sp_fp_offset);
 #elif defined(TARGET_X86)
+#ifdef MONO_X86_NO_PUSHES
+       min_offset = MIN (min_offset, -cfg->arch.sp_fp_offset);
+#else
        min_offset = MIN (min_offset, - (cfg->arch.sp_fp_offset + cfg->arch.param_area_size));
+#endif
 #elif defined(TARGET_ARM)
        // FIXME:
 #elif defined(TARGET_s390X)
index ab9245f26a948d2f0786bd28cc63b5e0fc41ed1f..4c42fd9a75042117473634cfdbb8016781a5300b 100644 (file)
@@ -1343,9 +1343,6 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
 
                if (virtual) {
                        /* Same as in mono_emit_method_call_full () */
-#ifndef MONO_ARCH_HAVE_IMT
-                       NOT_IMPLEMENTED;
-#endif
                        if ((method->klass->parent == mono_defaults.multicastdelegate_class) && (!strcmp (method->name, "Invoke"))) {
                                /* See mono_emit_method_call_full () */
                                /* The gsharedvt trampoline will recognize this constant */
@@ -2689,7 +2686,9 @@ mini_method_get_rgctx (MonoMethod *m)
 gboolean
 mini_type_is_vtype (MonoCompile *cfg, MonoType *t)
 {
-    return MONO_TYPE_ISSTRUCT (t) || mini_is_gsharedvt_variable_type (cfg, t);
+       t = mini_native_type_replace_type (t);
+
+       return MONO_TYPE_ISSTRUCT (t) || mini_is_gsharedvt_variable_type (cfg, t);
 }
 
 gboolean
index 17cc1f9f2f7f50c8ce62031fde85e2ef3bc19bfb..7d74ad8f45f34aead1f502d2d46f48a2d6006a8d 100644 (file)
@@ -1487,10 +1487,10 @@ mono_arch_lowering_pass (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_LOADR8_MEMBASE:
                case OP_ATOMIC_EXCHANGE_I4:
                case OP_ATOMIC_EXCHANGE_I8:
-               case OP_ATOMIC_ADD_NEW_I4:
-               case OP_ATOMIC_ADD_NEW_I8:
-               case OP_ATOMIC_ADD_IMM_NEW_I4:
-               case OP_ATOMIC_ADD_IMM_NEW_I8:
+               case OP_ATOMIC_ADD_I4:
+               case OP_ATOMIC_ADD_I8:
+               case OP_ATOMIC_ADD_IMM_I4:
+               case OP_ATOMIC_ADD_IMM_I8:
                        /* There are no membase instructions on ia64 */
                        if (ins->inst_offset == 0) {
                                break;
@@ -2934,12 +2934,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_MEMORY_BARRIER:
                        ia64_mf (code);
                        break;
-               case OP_ATOMIC_ADD_IMM_NEW_I4:
+               case OP_ATOMIC_ADD_IMM_I4:
                        g_assert (ins->inst_offset == 0);
                        ia64_fetchadd4_acq_hint (code, ins->dreg, ins->inst_basereg, ins->inst_imm, 0);
                        ia64_adds_imm (code, ins->dreg, ins->inst_imm, ins->dreg);
                        break;
-               case OP_ATOMIC_ADD_IMM_NEW_I8:
+               case OP_ATOMIC_ADD_IMM_I8:
                        g_assert (ins->inst_offset == 0);
                        ia64_fetchadd8_acq_hint (code, ins->dreg, ins->inst_basereg, ins->inst_imm, 0);
                        ia64_adds_imm (code, ins->dreg, ins->inst_imm, ins->dreg);
@@ -2951,7 +2951,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_ATOMIC_EXCHANGE_I8:
                        ia64_xchg8_hint (code, ins->dreg, ins->inst_basereg, ins->sreg2, 0);
                        break;
-               case OP_ATOMIC_ADD_NEW_I4: {
+               case OP_ATOMIC_ADD_I4: {
                        guint8 *label, *buf;
 
                        /* From libatomic_ops */
@@ -2971,7 +2971,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        ia64_add (code, ins->dreg, GP_SCRATCH_REG, ins->sreg2);
                        break;
                }
-               case OP_ATOMIC_ADD_NEW_I8: {
+               case OP_ATOMIC_ADD_I8: {
                        guint8 *label, *buf;
 
                        /* From libatomic_ops */
@@ -4526,8 +4526,6 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
 {
 }
 
-#ifdef MONO_ARCH_HAVE_IMT
-
 /*
  * LOCKING: called with the domain lock held
  */
@@ -4638,7 +4636,6 @@ mono_arch_emit_imt_argument (MonoCompile *cfg, MonoCallInst *call, MonoInst *imt
 {
        /* Done by the implementation of the CALL_MEMBASE opcodes */
 }
-#endif
 
 gpointer
 mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
@@ -4669,9 +4666,9 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
                        guint32 opcode;
 
                        if (fsig->params [0]->type == MONO_TYPE_I4)
-                               opcode = OP_ATOMIC_ADD_IMM_NEW_I4;
+                               opcode = OP_ATOMIC_ADD_IMM_I4;
                        else if (fsig->params [0]->type == MONO_TYPE_I8)
-                               opcode = OP_ATOMIC_ADD_IMM_NEW_I8;
+                               opcode = OP_ATOMIC_ADD_IMM_I8;
                        else
                                g_assert_not_reached ();
                        MONO_INST_NEW (cfg, ins, opcode);
@@ -4684,9 +4681,9 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
                        guint32 opcode;
 
                        if (fsig->params [0]->type == MONO_TYPE_I4)
-                               opcode = OP_ATOMIC_ADD_IMM_NEW_I4;
+                               opcode = OP_ATOMIC_ADD_IMM_I4;
                        else if (fsig->params [0]->type == MONO_TYPE_I8)
-                               opcode = OP_ATOMIC_ADD_IMM_NEW_I8;
+                               opcode = OP_ATOMIC_ADD_IMM_I8;
                        else
                                g_assert_not_reached ();
                        MONO_INST_NEW (cfg, ins, opcode);
@@ -4708,9 +4705,9 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
 
                        if (is_imm) {
                                if (fsig->params [0]->type == MONO_TYPE_I4)
-                                       opcode = OP_ATOMIC_ADD_IMM_NEW_I4;
+                                       opcode = OP_ATOMIC_ADD_IMM_I4;
                                else if (fsig->params [0]->type == MONO_TYPE_I8)
-                                       opcode = OP_ATOMIC_ADD_IMM_NEW_I8;
+                                       opcode = OP_ATOMIC_ADD_IMM_I8;
                                else
                                        g_assert_not_reached ();
 
@@ -4719,12 +4716,12 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
                                ins->inst_basereg = args [0]->dreg;
                                ins->inst_offset = 0;
                                ins->inst_imm = imm;
-                               ins->type = (opcode == OP_ATOMIC_ADD_IMM_NEW_I4) ? STACK_I4 : STACK_I8;
+                               ins->type = (opcode == OP_ATOMIC_ADD_IMM_I4) ? STACK_I4 : STACK_I8;
                        } else {
                                if (fsig->params [0]->type == MONO_TYPE_I4)
-                                       opcode = OP_ATOMIC_ADD_NEW_I4;
+                                       opcode = OP_ATOMIC_ADD_I4;
                                else if (fsig->params [0]->type == MONO_TYPE_I8)
-                                       opcode = OP_ATOMIC_ADD_NEW_I8;
+                                       opcode = OP_ATOMIC_ADD_I8;
                                else
                                        g_assert_not_reached ();
 
@@ -4733,7 +4730,7 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
                                ins->inst_basereg = args [0]->dreg;
                                ins->inst_offset = 0;
                                ins->sreg2 = args [1]->dreg;
-                               ins->type = (opcode == OP_ATOMIC_ADD_NEW_I4) ? STACK_I4 : STACK_I8;
+                               ins->type = (opcode == OP_ATOMIC_ADD_I4) ? STACK_I4 : STACK_I8;
                        }
                        MONO_ADD_INS (cfg->cbb, ins);
                }
@@ -4754,3 +4751,17 @@ mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
        /* FIXME: implement */
        g_assert_not_reached ();
 }
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+       switch (opcode) {
+       case OP_ATOMIC_ADD_I4:
+       case OP_ATOMIC_ADD_I8:
+       case OP_ATOMIC_EXCHANGE_I4:
+       case OP_ATOMIC_EXCHANGE_I8:
+               return TRUE;
+       default:
+               return FALSE;
+       }
+}
index 4d4f1df44317af2ca40fe79bc3e1d48c4bded62e..d419bc26c728aaa2d9f100ff610ec629b50ce66c 100644 (file)
@@ -114,8 +114,6 @@ unw_dyn_region_info_t* mono_ia64_create_unwind_region (Ia64CodegenState *code);
 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
 #define MONO_ARCH_HAVE_SAVE_UNWIND_INFO 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
-#define MONO_ARCH_HAVE_IMT 1
 #define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
 #define MONO_ARCH_THIS_AS_FIRST_ARG 1
 
index 1f4775368c90fd71af4a0090a8327ef6a09f07e9..032059d93149ca46cc3c04ba2db74a23b0ae05c3 100644 (file)
 //
 
 #include "config.h"
-//undef those as llvm defines them on its own config.h as well.
-#undef PACKAGE_BUGREPORT
-#undef PACKAGE_NAME
-#undef PACKAGE_STRING
-#undef PACKAGE_TARNAME
-#undef PACKAGE_VERSION
 
 #include <stdint.h>
 
index 9da527eaf357d7af1eb77a526a6c215151a72e23..df6de20bab48786bcf4caed9ec1b139896289f9c 100644 (file)
@@ -313,6 +313,8 @@ type_to_simd_type (int type)
 static LLVMTypeRef
 type_to_llvm_type (EmitContext *ctx, MonoType *t)
 {
+       t = mini_replace_type (t);
+
        if (t->byref)
                return LLVMPointerType (LLVMInt8Type (), 0);
        switch (t->type) {
@@ -1069,11 +1071,13 @@ sig_to_llvm_sig_full (EmitContext *ctx, MonoMethodSignature *sig, LLVMCallInfo *
        int i, j, pindex, vret_arg_pindex = 0;
        int *pindexes;
        gboolean vretaddr = FALSE;
+       MonoType *rtype;
 
        if (sinfo)
                memset (sinfo, 0, sizeof (LLVMSigInfo));
 
-       ret_type = type_to_llvm_type (ctx, sig->ret);
+       rtype = mini_replace_type (sig->ret);
+       ret_type = type_to_llvm_type (ctx, rtype);
        CHECK_FAILURE (ctx);
 
        if (cinfo && cinfo->ret.storage == LLVMArgVtypeInReg) {
@@ -1086,7 +1090,7 @@ sig_to_llvm_sig_full (EmitContext *ctx, MonoMethodSignature *sig, LLVMCallInfo *
                } else {
                        g_assert_not_reached ();
                }
-       } else if (cinfo && mini_type_is_vtype (ctx->cfg, sig->ret)) {
+       } else if (cinfo && mini_type_is_vtype (ctx->cfg, rtype)) {
                g_assert (cinfo->ret.storage == LLVMArgVtypeRetAddr);
                vretaddr = TRUE;
                ret_type = LLVMVoidType ();
@@ -3324,12 +3328,12 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                        values [ins->dreg] = mono_llvm_build_atomic_rmw (builder, LLVM_ATOMICRMW_OP_XCHG, args [0], args [1]);
                        break;
                }
-               case OP_ATOMIC_ADD_NEW_I4:
-               case OP_ATOMIC_ADD_NEW_I8: {
+               case OP_ATOMIC_ADD_I4:
+               case OP_ATOMIC_ADD_I8: {
                        LLVMValueRef args [2];
                        LLVMTypeRef t;
                                
-                       if (ins->opcode == OP_ATOMIC_ADD_NEW_I4)
+                       if (ins->opcode == OP_ATOMIC_ADD_I4)
                                t = LLVMInt32Type ();
                        else
                                t = LLVMInt64Type ();
@@ -3343,7 +3347,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                }
                case OP_ATOMIC_CAS_I4:
                case OP_ATOMIC_CAS_I8: {
-                       LLVMValueRef args [3];
+                       LLVMValueRef args [3], val;
                        LLVMTypeRef t;
                                
                        if (ins->opcode == OP_ATOMIC_CAS_I4)
@@ -3356,7 +3360,13 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
                        args [1] = convert (ctx, values [ins->sreg3], t);
                        /* new value */
                        args [2] = convert (ctx, values [ins->sreg2], t);
-                       values [ins->dreg] = mono_llvm_build_cmpxchg (builder, args [0], args [1], args [2]);
+                       val = mono_llvm_build_cmpxchg (builder, args [0], args [1], args [2]);
+#if LLVM_API_VERSION >= 1
+                       /* cmpxchg returns a pair */
+                       values [ins->dreg] = LLVMBuildExtractValue (builder, val, 0, "");
+#else
+                       values [ins->dreg] = val;
+#endif
                        break;
                }
                case OP_MEMORY_BARRIER: {
index 235fd33a449b15e2c2d8b4e2f8c0f2f900d8871b..cc32f05f72828cf9f1a6a06fcded6d33be8a6bfe 100644 (file)
@@ -15,6 +15,7 @@
 #include <string.h>
 #include <asm/cachectl.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/utils/mono-mmap.h>
@@ -551,8 +552,8 @@ get_delegate_invoke_impl (gboolean has_target, gboolean param_count, guint32 *co
                start = code = mono_global_codeman_reserve (16);
 
                /* Replace the this argument with the target */
-               mips_lw (code, mips_temp, mips_a0, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
-               mips_lw (code, mips_a0, mips_a0, G_STRUCT_OFFSET (MonoDelegate, target));
+               mips_lw (code, mips_temp, mips_a0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
+               mips_lw (code, mips_a0, mips_a0, MONO_STRUCT_OFFSET (MonoDelegate, target));
                mips_jr (code, mips_temp);
                mips_nop (code);
 
@@ -565,7 +566,7 @@ get_delegate_invoke_impl (gboolean has_target, gboolean param_count, guint32 *co
                size = 16 + param_count * 4;
                start = code = mono_global_codeman_reserve (size);
 
-               mips_lw (code, mips_temp, mips_a0, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+               mips_lw (code, mips_temp, mips_a0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
                /* slide down the arguments */
                for (i = 0; i < param_count; ++i) {
                        mips_move (code, mips_a0 + i, mips_a0 + i + 1);
@@ -5844,8 +5845,6 @@ mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
        return ctx->sc_regs [reg];
 }
 
-#ifdef MONO_ARCH_HAVE_IMT
-
 #define ENABLE_WRONG_METHOD_CHECK 0
 
 #define MIPS_LOAD_SEQUENCE_LENGTH      8
@@ -5999,7 +5998,6 @@ mono_arch_find_imt_method (mgreg_t *regs, guint8 *code)
 {
        return (MonoMethod*) regs [MONO_ARCH_IMT_REG];
 }
-#endif
 
 MonoVTable*
 mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code)
@@ -6142,3 +6140,9 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
 }
 
 #endif /* MONO_ARCH_SOFT_DEBUG_SUPPORTED */
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+       return FALSE;
+}
index 7476469c2711742fead279f319b7431504e019cb..c94f7c898f36c621c9b8286e562cba50fb84db01 100644 (file)
@@ -257,7 +257,6 @@ typedef struct MonoCompileArch {
 #define MIPS_LAST_FPARG_REG    mips_f19
 #endif
 
-#define MONO_ARCH_HAVE_IMT     1
 #define MONO_ARCH_IMT_REG      mips_t0
 
 #define MONO_ARCH_VTABLE_REG   mips_a0
index b1a31ee16d760a892f4782aa404a173625e0442f..e667a4c08f5050f328c1637ebfe03f84674cd5a8 100644 (file)
@@ -847,32 +847,36 @@ MINI_OP(OP_XMOVE,   "xmove", XREG, XREG, NONE)
 MINI_OP(OP_XZERO,   "xzero", XREG, NONE, NONE)
 MINI_OP(OP_XPHI,       "xphi", XREG, NONE, NONE)
 
-/* Atomic specific
-
-       Note, OP_ATOMIC_ADD_IMM_NEW_I4 and
-       OP_ATOMIC_ADD_NEW_I4 returns the new
-       value compared to OP_ATOMIC_ADD_I4 that
-       returns the old value.
-
-       OP_ATOMIC_ADD_NEW_I4 is used by
-       Interlocked::Increment and Interlocked:Decrement
-       and atomic_add_i4 by Interlocked::Add
+/*
+ * These are used for efficient implementation of the
+ * methods on the System.Threading.Interlocked class
+ * on architectures that support it. This is checked
+ * via mono_arch_opcode_supported ().
+ *
+ * Note that while the 32-bit variants are used on
+ * both 32-bit and 64-bit systems, the 64-bit variants
+ * are only used if the system is 64-bit. If that is
+ * not the case, the fallback code in the runtime is
+ * used instead. This is done because decomposing the
+ * 64-bit variants to instructions operating on 32-bit
+ * registers is very complicated on some architectures.
+ *
+ * The memory_barrier instruction translates to a full
+ * acquire/release barrier. Such a memory barrier is
+ * implied at the beginning and end of all other atomic
+ * operations, such that they ensure sequential
+ * consistency.
+ *
+ * All of these return the new value at the given
+ * memory location after performing the operation.
 */
 MINI_OP(OP_ATOMIC_ADD_I4, "atomic_add_i4", IREG, IREG, IREG)
-MINI_OP(OP_ATOMIC_ADD_NEW_I4, "atomic_add_new_i4", IREG, IREG, IREG)
-MINI_OP(OP_ATOMIC_ADD_IMM_I4, "atomic_add_imm_i4", IREG, IREG, NONE)
-MINI_OP(OP_ATOMIC_ADD_IMM_NEW_I4, "atomic_add_imm_new_i4", IREG, IREG, NONE)
-MINI_OP(OP_ATOMIC_EXCHANGE_I4, "atomic_exchange_i4", IREG, IREG, IREG)
-
 MINI_OP(OP_ATOMIC_ADD_I8, "atomic_add_i8", IREG, IREG, IREG)
-MINI_OP(OP_ATOMIC_ADD_NEW_I8, "atomic_add_new_i8", IREG, IREG, IREG)
-MINI_OP(OP_ATOMIC_ADD_IMM_I8, "atomic_add_imm_i8", IREG, IREG, NONE)
-MINI_OP(OP_ATOMIC_ADD_IMM_NEW_I8, "atomic_add_imm_new_i8", IREG, IREG, NONE)
+MINI_OP(OP_ATOMIC_EXCHANGE_I4, "atomic_exchange_i4", IREG, IREG, IREG)
 MINI_OP(OP_ATOMIC_EXCHANGE_I8, "atomic_exchange_i8", IREG, IREG, IREG)
-MINI_OP(OP_MEMORY_BARRIER, "memory_barrier", NONE, NONE, NONE)
-
 MINI_OP3(OP_ATOMIC_CAS_I4, "atomic_cas_i4", IREG, IREG, IREG, IREG)
 MINI_OP3(OP_ATOMIC_CAS_I8, "atomic_cas_i8", IREG, IREG, IREG, IREG)
+MINI_OP(OP_MEMORY_BARRIER, "memory_barrier", NONE, NONE, NONE)
 
 /* Conditional move opcodes.
  * Must be in the same order as the matching CEE_B... opcodes
@@ -1077,6 +1081,9 @@ MINI_OP(OP_S390_ISUB_OVF_UN,    "s390_int_sub_ovf_un", IREG, IREG, IREG)
 #endif
 
 #if defined(__ia64__)
+MINI_OP(OP_ATOMIC_ADD_IMM_I4, "atomic_add_imm_i4", IREG, IREG, NONE)
+MINI_OP(OP_ATOMIC_ADD_IMM_I8, "atomic_add_imm_i8", IREG, IREG, NONE)
+
 MINI_OP(OP_IA64_LOAD,          "ia64_load", NONE, NONE, NONE)
 MINI_OP(OP_IA64_LOADI1,        "ia64_loadi1", NONE, NONE, NONE)
 MINI_OP(OP_IA64_LOADU1,        "ia64_loadu1", NONE, NONE, NONE)
index 67f5725de6ae2db75799a1b7a7f980ed203a4de6..d26b4af4e92b4f23f34af747865109a140a43c2a 100644 (file)
@@ -296,6 +296,7 @@ SIG_HANDLER_FUNC (static, sigusr1_signal_handler)
 #define FULL_STAT_PROFILER_BACKTRACE 0
 #endif
 
+#ifdef SIGPROF
 #if defined(__ia64__) || defined(__sparc__) || defined(sparc) || defined(__s390__) || defined(s390)
 
 SIG_HANDLER_FUNC (static, sigprof_signal_handler)
@@ -384,6 +385,7 @@ SIG_HANDLER_FUNC (static, sigprof_signal_handler)
        mono_chain_signal (SIG_HANDLER_PARAMS);
 }
 
+#endif
 #endif
 
 SIG_HANDLER_FUNC (static, sigquit_signal_handler)
index 69a1d3d78aa16d9558fff6e6d915d9a95f816ec0..d3ebe5de2aaa8b786a9fa893aec1b7834216f458 100644 (file)
@@ -12,6 +12,7 @@
 #include "mini.h"
 #include <string.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/utils/mono-proclib.h>
@@ -391,14 +392,14 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
                        code = mono_ppc_create_pre_code_ftnptr (code);
 
                /* Replace the this argument with the target */
-               ppc_ldptr (code, ppc_r0, G_STRUCT_OFFSET (MonoDelegate, method_ptr), ppc_r3);
+               ppc_ldptr (code, ppc_r0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr), ppc_r3);
 #ifdef PPC_USES_FUNCTION_DESCRIPTOR
                /* it's a function descriptor */
                /* Can't use ldptr as it doesn't work with r0 */
                ppc_ldptr_indexed (code, ppc_r0, 0, ppc_r0);
 #endif
                ppc_mtctr (code, ppc_r0);
-               ppc_ldptr (code, ppc_r3, G_STRUCT_OFFSET (MonoDelegate, target), ppc_r3);
+               ppc_ldptr (code, ppc_r3, MONO_STRUCT_OFFSET (MonoDelegate, target), ppc_r3);
                ppc_bcctr (code, PPC_BR_ALWAYS, 0);
 
                g_assert ((code - start) <= size);
@@ -412,7 +413,7 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
                if (!aot)
                        code = mono_ppc_create_pre_code_ftnptr (code);
 
-               ppc_ldptr (code, ppc_r0, G_STRUCT_OFFSET (MonoDelegate, method_ptr), ppc_r3);
+               ppc_ldptr (code, ppc_r0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr), ppc_r3);
 #ifdef PPC_USES_FUNCTION_DESCRIPTOR
                /* it's a function descriptor */
                ppc_ldptr_indexed (code, ppc_r0, 0, ppc_r0);
@@ -2429,6 +2430,7 @@ loop_start:
                case OP_IDIV_IMM:
                case OP_IREM_IMM:
                case OP_IREM_UN_IMM:
+               CASE_PPC64 (OP_LREM_IMM) {
                        NEW_INS (cfg, temp, OP_ICONST);
                        temp->inst_c0 = ins->inst_imm;
                        temp->dreg = mono_alloc_ireg (cfg);
@@ -2441,9 +2443,12 @@ loop_start:
                                ins->opcode = OP_IDIV_UN;
                        else if (ins->opcode == OP_IREM_UN_IMM)
                                ins->opcode = OP_IREM_UN;
+                       else if (ins->opcode == OP_LREM_IMM)
+                               ins->opcode = OP_LREM;
                        last_ins = temp;
                        /* handle rem separately */
                        goto loop_start;
+               }
                case OP_IREM:
                case OP_IREM_UN:
                CASE_PPC64 (OP_LREM)
@@ -4384,22 +4389,36 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        else
                                ppc_mr (code, ins->dreg, ins->sreg1);
                        break;
-               case OP_ATOMIC_ADD_NEW_I4:
-               case OP_ATOMIC_ADD_NEW_I8: {
-                       guint8 *loop = code, *branch;
+               case OP_ATOMIC_ADD_I4:
+               CASE_PPC64 (OP_ATOMIC_ADD_I8) {
+                       int location = ins->inst_basereg;
+                       int addend = ins->sreg2;
+                       guint8 *loop, *branch;
                        g_assert (ins->inst_offset == 0);
-                       if (ins->opcode == OP_ATOMIC_ADD_NEW_I4)
-                               ppc_lwarx (code, ppc_r0, 0, ins->inst_basereg);
+
+                       loop = code;
+                       ppc_sync (code);
+                       if (ins->opcode == OP_ATOMIC_ADD_I4)
+                               ppc_lwarx (code, ppc_r0, 0, location);
+#ifdef __mono_ppc64__
                        else
-                               ppc_ldarx (code, ppc_r0, 0, ins->inst_basereg);
-                       ppc_add (code, ppc_r0, ppc_r0, ins->sreg2);
-                       if (ins->opcode == OP_ATOMIC_ADD_NEW_I4)
-                               ppc_stwcxd (code, ppc_r0, 0, ins->inst_basereg);
+                               ppc_ldarx (code, ppc_r0, 0, location);
+#endif
+
+                       ppc_add (code, ppc_r0, ppc_r0, addend);
+
+                       if (ins->opcode == OP_ATOMIC_ADD_I4)
+                               ppc_stwcxd (code, ppc_r0, 0, location);
+#ifdef __mono_ppc64__
                        else
-                               ppc_stdcxd (code, ppc_r0, 0, ins->inst_basereg);
+                               ppc_stdcxd (code, ppc_r0, 0, location);
+#endif
+
                        branch = code;
                        ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
                        ppc_patch (branch, loop);
+
+                       ppc_sync (code);
                        ppc_mr (code, ins->dreg, ppc_r0);
                        break;
                }
@@ -4426,16 +4445,18 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        guint8 *start, *not_equal, *lost_reservation;
 
                        start = code;
+                       ppc_sync (code);
                        if (ins->opcode == OP_ATOMIC_CAS_I4)
                                ppc_lwarx (code, ppc_r0, 0, location);
 #ifdef __mono_ppc64__
                        else
                                ppc_ldarx (code, ppc_r0, 0, location);
 #endif
-                       ppc_cmp (code, 0, ins->opcode == OP_ATOMIC_CAS_I4 ? 0 : 1, ppc_r0, comparand);
 
+                       ppc_cmp (code, 0, ins->opcode == OP_ATOMIC_CAS_I4 ? 0 : 1, ppc_r0, comparand);
                        not_equal = code;
                        ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
+
                        if (ins->opcode == OP_ATOMIC_CAS_I4)
                                ppc_stwcxd (code, value, 0, location);
 #ifdef __mono_ppc64__
@@ -4446,8 +4467,9 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        lost_reservation = code;
                        ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
                        ppc_patch (lost_reservation, start);
-
                        ppc_patch (not_equal, code);
+
+                       ppc_sync (code);
                        ppc_mr (code, ins->dreg, ppc_r0);
                        break;
                }
@@ -5537,8 +5559,6 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
 {
 }
 
-#ifdef MONO_ARCH_HAVE_IMT
-
 #define CMP_SIZE (PPC_LOAD_SEQUENCE_LENGTH + 4)
 #define BR_SIZE 4
 #define LOADSTORE_SIZE 4
@@ -5694,7 +5714,6 @@ mono_arch_find_imt_method (mgreg_t *regs, guint8 *code)
 
        return (MonoMethod*)(gsize) r [MONO_ARCH_IMT_REG];
 }
-#endif
 
 MonoVTable*
 mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code)
@@ -5941,3 +5960,19 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
 }
 
 #endif
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+       switch (opcode) {
+       case OP_ATOMIC_ADD_I4:
+       case OP_ATOMIC_CAS_I4:
+#ifdef TARGET_POWERPC64
+       case OP_ATOMIC_ADD_I8:
+       case OP_ATOMIC_CAS_I8:
+#endif
+               return TRUE;
+       default:
+               return FALSE;
+       }
+}
index 13b6adb5376fccf0bc1957d16eb5fdc27b8de21c..dcc1c5fae282ceb718968eb76979057494613a5a 100644 (file)
@@ -68,7 +68,6 @@ typedef struct MonoCompileArch {
 #ifdef __mono_ppc64__
 #define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS
 #define MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
 #define PPC_USES_FUNCTION_DESCRIPTOR
 
 #ifndef __mono_ilp32__
@@ -95,7 +94,6 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1
 #define MONO_ARCH_EMULATE_FREM 1
 #define MONO_ARCH_BIGMUL_INTRINS 1
-#define MONO_ARCH_HAVE_ATOMIC_CAS 1
 
 /* Parameters used by the register allocator */
 #define MONO_ARCH_CALLEE_REGS ((0xff << ppc_r3) | (1 << ppc_r11) | (1 << ppc_r12))
@@ -171,7 +169,6 @@ typedef struct MonoCompileArch {
 #endif /* HAVE_WORKING_SIGALTSTACK */
 
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
-#define MONO_ARCH_HAVE_IMT 1
 #define MONO_ARCH_IMT_REG ppc_r12
 
 #define MONO_ARCH_VTABLE_REG   ppc_r12
index 5374adc8b029f1c637417f777d1560339a3186e2..96c054d4c5793eaab0ffc94a5d3305d0e2a94d84 100644 (file)
@@ -59,7 +59,7 @@ if (ins->inst_target_bb->native_offset) {                                     \
 #define EMIT_COND_SYSTEM_EXCEPTION(cond,exc_name)                      \
         do {                                                           \
                mono_add_patch_info (cfg, code - cfg->native_code,      \
-                                   MONO_PATCH_INFO_EXC, exc_name);     \
+                                    MONO_PATCH_INFO_EXC, exc_name);    \
                s390_jcl (code, cond, 0);                               \
        } while (0); 
 
@@ -232,7 +232,7 @@ if (ins->inst_target_bb->native_offset) {                                   \
 #define S390_TRACE_STACK_SIZE (5*sizeof(gpointer)+4*sizeof(gdouble))
 
 #define BREAKPOINT_SIZE                sizeof(breakpoint_t)
-#define S390X_NOP_SIZE         sizeof(I_Format)
+#define S390X_NOP_SIZE         sizeof(RR_Format)
 
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
 
@@ -257,7 +257,10 @@ if (ins->inst_target_bb->native_offset) {                                  \
 
 #include "mini.h"
 #include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/profiler-private.h>
@@ -267,6 +270,7 @@ if (ins->inst_target_bb->native_offset) {                                   \
 
 #include "mini-s390x.h"
 #include "cpu-s390x.h"
+#include "support-s390x.h"
 #include "jit-icalls.h"
 #include "ir-emit.h"
 #include "trace.h"
@@ -381,7 +385,7 @@ static __inline__ void emit_unwind_regs(MonoCompile *, guint8 *, int, int, long)
 
 int mono_exc_esp_offset = 0;
 
-static int indent_level = 0;
+__thread int indent_level = 0;
 
 static gint appdomain_tls_offset = -1,
            lmf_tls_offset = -1,
@@ -393,14 +397,6 @@ gboolean lmf_addr_key_inited = FALSE;
 
 facilityList_t facs;
 
-#if 0
-
-extern __thread MonoDomain *tls_appdomain;
-extern __thread MonoThread *tls_current_object;
-extern __thread gpointer   mono_lmf_addr;
-               
-#endif
-
 /*
  * The code generated for sequence points reads from this location, 
  * which is made read-only when single stepping is enabled.
@@ -414,6 +410,8 @@ static gpointer bp_trigger_page;
 
 breakpoint_t breakpointCode;
 
+static CRITICAL_SECTION mini_arch_mutex;
+
 /*====================== End of Global Variables ===================*/
 
 /*------------------------------------------------------------------*/
@@ -626,7 +624,7 @@ indent (int diff) {
        if (diff < 0)
                indent_level += diff;
        v = indent_level;
-       printf("[%3d] ",v);
+       printf("%p [%3d] ",pthread_self(),v);
        while (v-- > 0) {
                printf (". ");
        }
@@ -1262,20 +1260,7 @@ mono_arch_init (void)
 {
        guint8 *code;
 
-#if 0
-       /*
-        * When we do an architectural level set at z9 or better 
-        * we can use the STFLE instruction to show us
-        * what hardware facilities are available
-        */
-       int lFacility = sizeof(facs) % 8;
-
-       memset((char *) &facs, 0, sizeof(facs));
-
-       __asm__ ("      lgfr    0,%1\n"
-                "      stfle   %0\n"
-                : "=m" (facs) : "r" (lFacility) : "0", "cc");
-#endif
+       InitializeCriticalSection (&mini_arch_mutex);
 
        ss_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ);
        bp_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ);
@@ -1302,6 +1287,11 @@ mono_arch_init (void)
 void
 mono_arch_cleanup (void)
 {
+       if (ss_trigger_page)
+               mono_vfree (ss_trigger_page, mono_pagesize ());
+       if (bp_trigger_page)
+               mono_vfree (bp_trigger_page, mono_pagesize ());
+       DeleteCriticalSection (&mini_arch_mutex);
 }
 
 /*========================= End of Function ========================*/
@@ -2608,54 +2598,23 @@ mono_arch_instrument_prolog (MonoCompile *cfg, void *func, void *p,
        if (cfg->method->save_lmf)
                parmOffset -= sizeof(MonoLMF);
        fpOffset   = parmOffset + (5*sizeof(gpointer));
-       if ((!mono_hwcap_s390x_has_ld) && (fpOffset > 4096)) {
-               s390_lgr (code, s390_r12, STK_BASE);
-               baseReg = s390_r12;
-               while (fpOffset > 4096) {
-                       s390_aghi (code, baseReg, 4096);
-                       fpOffset   -= 4096;
-                       parmOffset -= 4096;
-               }
-       } else {
-               baseReg = STK_BASE;
-       }       
+       baseReg = STK_BASE;
 
        s390_stmg (code, s390_r2, s390_r6, STK_BASE, parmOffset);
-       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));
-               s390_stdy (code, s390_f6, 0, STK_BASE, fpOffset+3*sizeof(gdouble));
-       } else {
-               s390_std  (code, s390_f0, 0, baseReg, fpOffset);
-               s390_std  (code, s390_f2, 0, baseReg, fpOffset+sizeof(gdouble));
-               s390_std  (code, s390_f4, 0, baseReg, fpOffset+2*sizeof(gdouble));
-               s390_std  (code, s390_f6, 0, baseReg, fpOffset+3*sizeof(gdouble));
-       }
-       s390_basr (code, s390_r13, 0);
-       s390_j    (code, 10);
-       s390_llong(code, cfg->method);
-       s390_llong(code, func);
-       s390_lg   (code, s390_r2, 0, s390_r13, 4);
-       if (mono_hwcap_s390x_has_ld)
-               s390_lay  (code, s390_r3, 0, STK_BASE, parmOffset);
-       else
-               s390_la   (code, s390_r3, 0, baseReg, parmOffset);
+       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));
+       s390_stdy (code, s390_f6, 0, STK_BASE, fpOffset+3*sizeof(gdouble));
+       S390_SET  (code, s390_r1, func);
+       S390_SET  (code, s390_r2, cfg->method);
+       s390_lay  (code, s390_r3, 0, STK_BASE, parmOffset);
        s390_lgr  (code, s390_r4, STK_BASE);
        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 (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));
-               s390_ldy  (code, s390_f0, 0, STK_BASE, fpOffset);
-       } else {
-               s390_ld   (code, s390_f6, 0, baseReg, fpOffset+3*sizeof(gdouble));
-               s390_ld   (code, s390_f4, 0, baseReg, fpOffset+2*sizeof(gdouble));
-               s390_ld   (code, s390_f2, 0, baseReg, fpOffset+sizeof(gdouble));
-               s390_ld   (code, s390_f0, 0, baseReg, fpOffset);
-       }
+       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));
+       s390_ldy  (code, s390_f0, 0, STK_BASE, fpOffset);
        s390_lmg  (code, s390_r2, s390_r6, STK_BASE, parmOffset);
 
        return code;
@@ -2756,12 +2715,8 @@ handle_enum:
                break;
        }
 
-       s390_basr (code, s390_r13, 0);
-       s390_j    (code, 10);
-       s390_llong(code, cfg->method);
-       s390_llong(code, func);
-       s390_lg   (code, s390_r2, 0, s390_r13, 4);
-       s390_lg   (code, s390_r1, 0, s390_r13, 12);
+       S390_SET  (code, s390_r1, func);
+       S390_SET  (code, s390_r2, cfg->method);
        s390_basr (code, s390_r14, s390_r1);
 
        switch (save_mode) {
@@ -2890,14 +2845,14 @@ emit_float_to_int (MonoCompile *cfg, guchar *code, int dreg, int sreg, int size,
                }
        } else {
                short *o[1];
-               s390_basr   (code, s390_r13, 0);
-               s390_j      (code, 10);
-               s390_llong  (code, 0x41e0000000000000llu);
-               s390_llong  (code, 0x41f0000000000000llu);
+               S390_SET    (code, s390_r13, 0x41e0000000000000llu);
+               s390_ldgr   (code, s390_f14, s390_r13);
                s390_ldr    (code, s390_f15, sreg);
-               s390_cdb    (code, s390_f15, 0, s390_r13, 4);
+               s390_cdbr   (code, s390_f15, s390_f14);
                s390_jl     (code, 0); CODEPTR (code, o[0]);
-               s390_sdb    (code, s390_f15, 0, s390_r13, 12);
+               S390_SET    (code, s390_r13, 0x41f0000000000000llu);
+               s390_ldgr   (code, s390_f14, s390_r13);
+               s390_sdbr   (code, s390_f15, s390_f14);
                s390_cfdbr  (code, dreg, 7, s390_f15);
                s390_j      (code, 4);
                PTRSLOT (code, o[0]);
@@ -3017,28 +2972,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                }
                        break;
                case OP_STOREI4_MEMBASE_IMM: {
-                       if (s390_is_imm16(ins->inst_imm)) {
-                               s390_lghi (code, s390_r0, ins->inst_imm);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_lg   (code, s390_r0, 0, s390_r13, 4);
-                       }
+                       s390_lgfi (code, s390_r0, ins->inst_imm);
                        S390_LONG (code, sty, st, s390_r0, 0, 
                                   ins->inst_destbasereg, ins->inst_offset);
                }
                        break;
                case OP_STORE_MEMBASE_IMM:
                case OP_STOREI8_MEMBASE_IMM: {
-                       if (s390_is_imm16(ins->inst_imm)) {
-                               s390_lghi (code, s390_r0, ins->inst_imm);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_lg   (code, s390_r0, 0, s390_r13, 4);
-                       }
+                       S390_SET (code, s390_r0, ins->inst_imm);
                        S390_LONG (code, stg, stg, s390_r0, 0, 
                                   ins->inst_destbasereg, ins->inst_offset);
                }
@@ -3104,90 +3045,35 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                }
                        break;
                case OP_LCONV_TO_I1: {
-#if 0
                        s390_lgbr (code, ins->dreg, ins->sreg1);
-#else
-                       s390_sllg (code, ins->dreg, ins->sreg1, 0, 56);
-                       s390_srag (code, ins->dreg, ins->dreg, 0, 56);
-#endif
                }
                        break;
                case OP_LCONV_TO_I2: {
-#if 0
                        s390_lghr (code, ins->dreg, ins->sreg1);
-#else
-                       s390_sllg (code, ins->dreg, ins->sreg1, 0, 48);
-                       s390_srag (code, ins->dreg, ins->dreg, 0, 48);
-#endif
                }
                        break;
                case OP_LCONV_TO_U1: {
-#if 0
-                       s390_llghr (code, ins->dreg, ins->sreg1);
-#else
-                       if (ins->dreg != ins->sreg1)
-                               s390_lgr  (code, ins->dreg, ins->sreg1);
-                       s390_lghi  (code, s390_r0, 0xff);
-                       s390_ngr   (code, ins->dreg, s390_r0);
-#endif
+                       s390_llgcr (code, ins->dreg, ins->sreg1);
                }
                        break;
                case OP_LCONV_TO_U2: {
-#if 0
                        s390_llghr (code, ins->dreg, ins->sreg1);
-#else
-                       if (ins->dreg != ins->sreg1)
-                               s390_lgr  (code, ins->dreg, ins->sreg1);
-                       s390_lghi  (code, s390_r0, -1);
-                       s390_srlg  (code, s390_r0, s390_r0, 0, 48);
-                       s390_ngr   (code, ins->dreg, s390_r0);
-#endif
                }
                        break;
                case OP_ICONV_TO_I1: {
-#if 0
-                       s390_lbr  (code, ins->dreg, ins->sreg1);
-#else
-                       if (ins->dreg != ins->sreg1)
-                               s390_lr  (code, ins->dreg, ins->sreg1);
-                       s390_sll (code, ins->dreg, 0, 24);
-                       s390_sra (code, ins->dreg, 0, 24);
-                       
-#endif
+                       s390_lgbr  (code, ins->dreg, ins->sreg1);
                }
                        break;
                case OP_ICONV_TO_I2: {
-#if 0
-                       s390_lhr  (code, ins->dreg, ins->sreg1);
-#else
-                       if (ins->dreg != ins->sreg1)
-                               s390_lr  (code, ins->dreg, ins->sreg1);
-                       s390_sll (code, ins->dreg, 0, 16);
-                       s390_sra (code, ins->dreg, 0, 16);
-#endif
+                       s390_lghr  (code, ins->dreg, ins->sreg1);
                }
                        break;
                case OP_ICONV_TO_U1: {
-#if 0
-                       s390_llcr (code, ins->dreg, ins->sreg1);
-#else
-                       if (ins->dreg != ins->sreg1)
-                               s390_lr  (code, ins->dreg, ins->sreg1);
-                       s390_lhi  (code, s390_r0, 0xff);
-                       s390_nr   (code, ins->dreg, s390_r0);
-#endif
+                       s390_llgcr (code, ins->dreg, ins->sreg1);
                }
                        break;
                case OP_ICONV_TO_U2: {
-#if 0
-                       s390_llhr (code, ins->dreg, ins->sreg1);
-#else
-                       if (ins->dreg != ins->sreg1)
-                               s390_lr  (code, ins->dreg, ins->sreg1);
-                       s390_lhi  (code, s390_r0, -1);
-                       s390_srl  (code, s390_r0, 0, 16);
-                       s390_nr   (code, ins->dreg, s390_r0);
-#endif
+                       s390_llghr (code, ins->dreg, ins->sreg1);
                }
                        break;
                case OP_COMPARE: 
@@ -3207,50 +3093,25 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        break;
                case OP_COMPARE_IMM:
                case OP_LCOMPARE_IMM: {
-                       if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_lghi (code, s390_r0, ins->inst_imm);
-                               if (is_unsigned (ins->next))
-                                       s390_clgr (code, ins->sreg1, s390_r0);
-                               else
-                                       s390_cgr  (code, ins->sreg1, s390_r0);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               if (is_unsigned (ins->next))
-                                       s390_clg  (code, ins->sreg1, 0, s390_r13, 4);
-                               else
-                                       s390_cg   (code, ins->sreg1, 0, s390_r13, 4);
-                       }
+                       S390_SET (code, s390_r0, ins->inst_imm);
+                       if (is_unsigned (ins->next))
+                               s390_clgr (code, ins->sreg1, s390_r0);
+                       else
+                               s390_cgr  (code, ins->sreg1, s390_r0);
                }
                        break;
                case OP_ICOMPARE_IMM: {
-                       if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_lghi (code, s390_r0, ins->inst_imm);
-                               if (is_unsigned (ins->next))
-                                       s390_clr  (code, ins->sreg1, s390_r0);
-                               else
-                                       s390_cr   (code, ins->sreg1, s390_r0);
-                       }
-                       else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 4);
-                               s390_word (code, ins->inst_imm);
-                               if (is_unsigned (ins->next))
-                                       s390_cl  (code, ins->sreg1, 0, s390_r13, 4);
-                               else
-                                       s390_c   (code, ins->sreg1, 0, s390_r13, 4);
-                       }
+                       S390_SET (code, s390_r0, ins->inst_imm);
+                       if (is_unsigned (ins->next))
+                               s390_clr  (code, ins->sreg1, s390_r0);
+                       else
+                               s390_cr   (code, ins->sreg1, s390_r0);
                }
                        break;
                case OP_BREAK: {
-                       s390_basr  (code, s390_r13, 0);
-                       s390_j     (code, 6);
                        mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_ABS, 
                                             mono_break);
-                       s390_llong (code, mono_break);
-                       s390_lg    (code, s390_r14, 0, s390_r13, 4);
-                        s390_basr  (code, s390_r14, s390_r14);
+                       S390_CALL_TEMPLATE (code, s390_r14);
                }
                        break;
                case OP_ADDCC: {
@@ -3274,11 +3135,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        }
                        if (s390_is_imm16 (ins->inst_imm)) {
                                s390_aghi (code, ins->dreg, ins->inst_imm);
+                       } else if (s390_is_imm32 (ins->inst_imm)) {
+                               s390_agfi (code, ins->dreg, ins->inst_imm);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_ag   (code, ins->dreg, 0, s390_r13, 4);
+                               S390_SET  (code, s390_r0, ins->inst_imm);
+                               s390_agr  (code, ins->dreg, s390_r0);
                        }
                }
                        break;
@@ -3298,11 +3159,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                s390_lghi  (code, s390_r0, ins->inst_imm);
                                s390_alcgr (code, ins->dreg, s390_r0);
                        } else {
-                               s390_basr  (code, s390_r13, 0);
-                               s390_j     (code, 6);
-                               s390_llong (code, ins->inst_imm);
-                               s390_lg    (code, s390_r13, 0, s390_r13, 4);
-                               s390_alcgr (code, ins->dreg, s390_r13);
+                               S390_SET   (code, s390_r0, ins->inst_imm);
+                               s390_alcgr (code, ins->dreg, s390_r0);
                        }
                }
                        break;
@@ -3359,13 +3217,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                s390_lgr   (code, ins->dreg, ins->sreg1);
                        }
                        if (s390_is_imm16 (-ins->inst_imm)) {
-                               s390_lghi  (code, s390_r0, ins->inst_imm);
-                               s390_slgr  (code, ins->dreg, s390_r0);
+                               s390_aghi  (code, ins->dreg, -ins->inst_imm);
+                       } else if (s390_is_imm32 (-ins->inst_imm)) {
+                               s390_slgfi  (code, ins->dreg, ins->inst_imm);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_slg  (code, ins->dreg, 0, s390_r13, 4);
+                               S390_SET  (code, s390_r0, ins->inst_imm);
+                               s390_slgr (code, ins->dreg, s390_r0);
                        }
                }
                        break;
@@ -3374,13 +3231,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                s390_lgr   (code, ins->dreg, ins->sreg1);
                        }
                        if (s390_is_imm16 (-ins->inst_imm)) {
-                               s390_lghi  (code, s390_r0, ins->inst_imm);
-                               s390_slgr  (code, ins->dreg, s390_r0);
+                               s390_aghi  (code, ins->dreg, -ins->inst_imm);
+                       } else if (s390_is_imm32 (-ins->inst_imm)) {
+                               s390_slgfi (code, ins->dreg, ins->inst_imm);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_slg  (code, ins->dreg, 0, s390_r13, 4);
+                               S390_SET  (code, s390_r0, ins->inst_imm);
+                               s390_slgr (code, ins->dreg, s390_r0);
                        }
                }
                        break;
@@ -3392,10 +3248,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                s390_lghi  (code, s390_r0, ins->inst_imm);
                                s390_slbgr (code, ins->dreg, s390_r0);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_slbg (code, ins->dreg, 0, s390_r13, 4);
+                               S390_SET  (code, s390_r0, ins->inst_imm);
+                               s390_slbgr(code, ins->dreg, s390_r0);
                        }
                }
                        break;
@@ -3435,15 +3289,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        if (ins->dreg != ins->sreg1) {
                                s390_lgr  (code, ins->dreg, ins->sreg1);
                        }
-                       if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_lghi  (code, s390_r0, ins->inst_imm);
-                               s390_ngr  (code, ins->dreg, s390_r0);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_ng   (code, ins->dreg, 0, s390_r13, 4);
-                       }
+                       S390_SET_MASK (code, s390_r0, ins->inst_imm);
+                       s390_ngr (code, ins->dreg, s390_r0);
                }
                        break;
                case OP_LDIV: {
@@ -3491,15 +3338,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        if (ins->dreg != ins->sreg1) {
                                s390_lgr  (code, ins->dreg, ins->sreg1);
                        }
-                       if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_lghi (code, s390_r0, ins->inst_imm);
-                               s390_ogr  (code, ins->dreg, s390_r0);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_og   (code, ins->dreg, 0, s390_r13, 4);
-                       }
+                       S390_SET_MASK(code, s390_r0, ins->inst_imm);
+                       s390_ogr (code, ins->dreg, s390_r0);
                }
                        break;
                case OP_LXOR: {
@@ -3521,15 +3361,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        if (ins->dreg != ins->sreg1) {
                                s390_lgr  (code, ins->dreg, ins->sreg1);
                        }
-                       if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_lghi  (code, s390_r0, ins->inst_imm);
-                               s390_xgr  (code, ins->dreg, s390_r0);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_xg   (code, ins->dreg, 0, s390_r13, 4);
-                       }
+                       S390_SET_MASK (code, s390_r0, ins->inst_imm);
+                       s390_xgr (code, ins->dreg, s390_r0);
                }
                        break;
                case OP_LSHL: {
@@ -3595,11 +3428,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        }
                        if (s390_is_imm16 (ins->inst_imm)) {
                                s390_lghi (code, s390_r13, ins->inst_imm);
+                       } else if (s390_is_imm32 (ins->inst_imm)) {
+                               s390_lgfi (code, s390_r13, ins->inst_imm);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_lg   (code, s390_r13, 0, s390_r13, 4);
+                               S390_SET (code, s390_r13, ins->inst_imm);
                        }
                        s390_msgr (code, ins->dreg, s390_r13);
                }
@@ -3654,12 +3486,9 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                s390_lgfr (code, ins->dreg, ins->sreg1);
                        }
                        if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_aghi(code, ins->dreg, ins->inst_imm);
+                               s390_aghi (code, ins->dreg, ins->inst_imm);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 4);
-                               s390_word (code, ins->inst_imm);
-                               s390_agf  (code, ins->dreg, 0, s390_r13, 4);
+                               s390_afi  (code, ins->dreg, ins->inst_imm);
                        }
                }
                        break;
@@ -3671,11 +3500,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                s390_lghi  (code, s390_r0, ins->inst_imm);
                                s390_alcgr (code, ins->dreg, s390_r0);
                        } else {
-                               s390_basr  (code, s390_r13, 0);
-                               s390_j     (code, 4);
-                               s390_word  (code, ins->inst_imm);
-                               s390_lgf   (code, s390_r13, 0, s390_r13, 4);
-                               s390_alcgr (code, ins->dreg, s390_r13);
+                               S390_SET   (code, s390_r0, ins->inst_imm);
+                               s390_alcgr (code, ins->dreg, s390_r0);
                        }
                }
                        break;
@@ -3715,18 +3541,13 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        if (s390_is_imm16 (-ins->inst_imm)) {
                                s390_aghi (code, ins->dreg, -ins->inst_imm);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 4);
-                               s390_word (code, ins->inst_imm);
-                               s390_sgf  (code, ins->dreg, 0, s390_r13, 4);
+                               s390_agfi (code, ins->dreg, -ins->inst_imm);
                        }
                }
                        break;
                case OP_ISBB_IMM: {
-                       s390_basr (code, s390_r13, 0);
-                       s390_j    (code, 4);
-                       s390_word (code, ins->inst_imm);
-                       s390_slgf (code, ins->dreg, 0, s390_r13, 4);
+                       S390_SET (code, s390_r0, ins->inst_imm);
+                       s390_slgfr (code, ins->dreg, s390_r0);
                }
                        break;
                case OP_ISUB_OVF:
@@ -3768,15 +3589,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        if (ins->dreg != ins->sreg1) {
                                s390_lgfr (code, ins->dreg, ins->sreg1);
                        }
-                       if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_lghi (code, s390_r0, ins->inst_imm);
-                               s390_ngr  (code, ins->dreg, s390_r0);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_ng   (code, ins->dreg, 0, s390_r13, 4);
-                       }
+                       S390_SET_MASK (code, s390_r0, ins->inst_imm);
+                       s390_ngr  (code, ins->dreg, s390_r0);
                }
                        break;
                case OP_IDIV: {
@@ -3796,14 +3610,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_IDIV_IMM: {
                        if (s390_is_imm16 (ins->inst_imm)) {
                                s390_lghi (code, s390_r13, ins->inst_imm);
-                               s390_lgfr (code, s390_r0, ins->sreg1);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 4);
-                               s390_word (code, ins->inst_imm);
-                               s390_lgfr (code, s390_r0, ins->sreg1);
-                               s390_lgf  (code, s390_r13, 0, s390_r13, 4);
+                               s390_lgfi (code, s390_r13, ins->inst_imm);
                        }
+                       s390_lgfr (code, s390_r0, ins->sreg1);
                        s390_srda (code, s390_r0, 0, 32);
                        s390_dr   (code, s390_r0, ins->sreg2);
                        s390_lgfr (code, ins->dreg, s390_r1);
@@ -3825,14 +3635,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_IREM_IMM: {
                        if (s390_is_imm16 (ins->inst_imm)) {
                                s390_lghi (code, s390_r13, ins->inst_imm);
-                               s390_lgfr (code, s390_r0, ins->sreg1);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 4);
-                               s390_word (code, ins->inst_imm);
-                               s390_lgfr (code, s390_r0, ins->sreg1);
-                               s390_lgf  (code, s390_r13, 0, s390_r13, 4);
+                               s390_lgfi (code, s390_r13, ins->inst_imm);
                        }
+                       s390_lgfr (code, s390_r0, ins->sreg1);
                        s390_srda (code, s390_r0, 0, 32);
                        s390_dr   (code, s390_r0, ins->sreg2);
                        s390_lgfr (code, ins->dreg, s390_r0);
@@ -3847,15 +3653,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        if (ins->dreg != ins->sreg1) {
                                s390_lgfr (code, ins->dreg, ins->sreg1);
                        }
-                       if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_lghi (code, s390_r0, ins->inst_imm);
-                               s390_ogr  (code, ins->dreg, s390_r0);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_og   (code, ins->dreg, 0, s390_r13, 4);
-                       }
+                       S390_SET_MASK (code, s390_r0, ins->inst_imm);
+                       s390_ogr  (code, ins->dreg, s390_r0);
                }
                        break;
                case OP_IXOR: {
@@ -3867,15 +3666,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        if (ins->dreg != ins->sreg1) {
                                s390_lgfr (code, ins->dreg, ins->sreg1);
                        }
-                       if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_lghi (code, s390_r0, ins->inst_imm);
-                               s390_xgr  (code, ins->dreg, s390_r0);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_imm);
-                               s390_xg   (code, ins->dreg, 0, s390_r13, 4);
-                       }
+                       S390_SET_MASK (code, s390_r0, ins->inst_imm);
+                       s390_xgr  (code, ins->dreg, s390_r0);
                }
                        break;
                case OP_ISHL: {
@@ -3936,14 +3728,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                s390_lgfr (code, ins->dreg, ins->sreg1);
                        }
                        if (s390_is_imm16 (ins->inst_imm)) {
-                               s390_lghi (code, s390_r13, ins->inst_imm);
+                               s390_lghi (code, s390_r0, ins->inst_imm);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 4);
-                               s390_word (code, ins->inst_imm);
-                               s390_lgf  (code, s390_r13, 0, s390_r13, 4);
+                               s390_lgfi (code, s390_r0, ins->inst_imm);
                        }
-                       s390_msr  (code, ins->dreg, s390_r13);
+                       s390_msr  (code, ins->dreg, s390_r0);
                }
                        break;
                case OP_IMUL_OVF: {
@@ -3976,32 +3765,19 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        break;
                case OP_ICONST: 
                case OP_I8CONST: {
-                       if (s390_is_imm16(ins->inst_c0)) {
-                               s390_lghi (code, ins->dreg, ins->inst_c0);
-                       } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_c0);
-                               s390_lg   (code, ins->dreg, 0, s390_r13, 4);
-                       }
+                       S390_SET (code, ins->dreg, ins->inst_c0);
                }
                        break;
                case OP_AOTCONST: {
-                       s390_basr (code, s390_r13, 0);
-                       s390_j    (code, 6);
                        mono_add_patch_info (cfg, code - cfg->native_code, 
                                (MonoJumpInfoType)ins->inst_i1, ins->inst_p0);
-                       s390_llong(code, 0);
-                       s390_lg   (code,ins->dreg, 0, s390_r13, 4);
+                       S390_LOAD_TEMPLATE (code, ins->dreg);
                }
                        break;
                case OP_JUMP_TABLE: {
                        mono_add_patch_info (cfg, code - cfg->native_code, 
                                (MonoJumpInfoType)ins->inst_i1, ins->inst_p0);
-                       s390_basr  (code, s390_r13, 0);
-                       s390_j     (code, 6);
-                       s390_llong (code, 0);
-                       s390_lg    (code, ins->dreg, 0, s390_r13, 4);
+                       S390_LOAD_TEMPLATE (code, ins->dreg);
                }
                        break;
                case OP_MOVE:
@@ -4024,32 +3800,32 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        s390_llgfr (code, ins->dreg, ins->sreg1);
                        break;
                case OP_LCONV_TO_OVF_U4:
-                       s390_basr (code, s390_r13, 0);
-                       s390_j    (code, 6);
-                       s390_llong(code, 4294967295);
-                       s390_clg  (code, ins->sreg1, 0, s390_r13, 4);   
+                       S390_SET  (code, s390_r0, 4294967295);
+                       s390_clgr (code, ins->sreg1, s390_r0);
                        EMIT_COND_SYSTEM_EXCEPTION (S390_CC_GT, "OverflowException");
                        s390_ltgr (code, ins->sreg1, ins->sreg1);
                        EMIT_COND_SYSTEM_EXCEPTION (S390_CC_LT, "OverflowException");
                        s390_llgfr(code, ins->dreg, ins->sreg1);
                        break;
                case OP_LCONV_TO_OVF_I4_UN:
-                       s390_basr (code, s390_r13, 0);
-                       s390_j    (code, 6);
-                       s390_llong(code, 2147483647);
-                       s390_cg   (code, ins->sreg1, 0, s390_r13, 4);
+                       S390_SET  (code, s390_r0, 2147483647);
+                       s390_cgr  (code, ins->sreg1, s390_r0);
                        EMIT_COND_SYSTEM_EXCEPTION (S390_CC_GT, "OverflowException");
                        s390_ltgr (code, ins->sreg1, ins->sreg1);
                        EMIT_COND_SYSTEM_EXCEPTION (S390_CC_LT, "OverflowException");
                        s390_lgfr (code, ins->dreg, ins->sreg1);
                        break;
-               case OP_FMOVE:
-               case OP_FCONV_TO_R4: {
+               case OP_FMOVE: {
                        if (ins->dreg != ins->sreg1) {
                                s390_ldr   (code, ins->dreg, ins->sreg1);
                        }
                }
                        break;
+               case OP_FCONV_TO_R4: {
+                       s390_ledbr (code, ins->dreg, ins->sreg1);
+                       s390_ldebr (code, ins->dreg, ins->dreg);
+               }
+                       break;
                case OP_S390_SETF4RET: {
                        s390_ledbr (code, ins->dreg, ins->sreg1);
                }
@@ -4057,11 +3833,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_TLS_GET: {
                        if (s390_is_imm16 (ins->inst_offset)) {
                                s390_lghi (code, s390_r13, ins->inst_offset);
+                       } else if (s390_is_imm32 (ins->inst_offset)) {
+                               s390_lgfi (code, s390_r13, ins->inst_offset);
                        } else {
-                               s390_bras (code, s390_r13, 0);
-                               s390_j    (code, 4);
-                               s390_llong(code, ins->inst_offset);
-                               s390_lg   (code, s390_r13, 0, s390_r13, 4);
+                               S390_SET  (code, s390_r13, ins->inst_offset);
                        }
                        s390_ear (code, s390_r1, 0);
                        s390_sllg(code, s390_r1, s390_r1, 0, 32);
@@ -4095,21 +3870,18 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_ARGLIST: {
                        int offset = cfg->sig_cookie + cfg->stack_usage;
 
-                       if (s390_is_imm16 (offset))
+                       if (s390_is_imm16 (offset)) {
                                s390_lghi (code, s390_r0, offset);
-                       else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, offset);
-                               s390_lg   (code, s390_r0, 0, s390_r13, 0);
+                       } else if (s390_is_imm32 (offset)) {
+                               s390_lgfi (code, s390_r0, offset);
+                       } else {
+                               S390_SET  (code, s390_r0, offset);
                        }
                        s390_agr  (code, s390_r0, cfg->frame_reg);
                        s390_stg  (code, s390_r0, 0, ins->sreg1, 0);
                }
                        break;
                case OP_FCALL: {
-                       s390_basr (code, s390_r13, 0);
-                       s390_j    (code, 6);
                        call = (MonoCallInst*)ins;
                        if (ins->flags & MONO_INST_HAS_METHOD)
                                mono_add_patch_info (cfg, code-cfg->native_code,
@@ -4119,9 +3891,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                mono_add_patch_info (cfg, code-cfg->native_code,
                                                     MONO_PATCH_INFO_ABS, 
                                                     call->fptr);
-                       s390_llong(code, 0);
-                       s390_lg   (code, s390_r14, 0, s390_r13, 4);
-                       s390_basr (code, s390_r14, s390_r14);
+                       S390_CALL_TEMPLATE (code, s390_r14);
                        if (call->signature->ret->type == MONO_TYPE_R4)
                                s390_ldebr (code, s390_f0, s390_f0);
                }
@@ -4131,8 +3901,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_VCALL2:
                case OP_VOIDCALL:
                case OP_CALL: {
-                       s390_basr (code, s390_r13, 0);
-                       s390_j    (code, 6);
                        call = (MonoCallInst*)ins;
                        if (ins->flags & MONO_INST_HAS_METHOD)
                                mono_add_patch_info (cfg, code-cfg->native_code,
@@ -4142,9 +3910,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                mono_add_patch_info (cfg, code-cfg->native_code,
                                                     MONO_PATCH_INFO_ABS, 
                                                     call->fptr);
-                       s390_llong(code, 0);
-                       s390_lg   (code, s390_r14, 0, s390_r13, 4);
-                       s390_basr (code, s390_r14, s390_r14);
+                       S390_CALL_TEMPLATE (code, s390_r14);
                }
                        break;
                case OP_FCALL_REG: {
@@ -4204,13 +3970,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                int lmfOffset = cfg->stack_usage - sizeof(MonoLMF);
 
                                s390_lgr (code, s390_r13, cfg->frame_reg);
-                               if (s390_is_imm16(lmfOffset))
+                               if (s390_is_imm16(lmfOffset)) {
                                        s390_aghi (code, s390_r13, lmfOffset);
-                               else {
-                                       s390_basr (code, s390_r14, 0);
-                                       s390_j    (code, 4);
-                                       s390_word (code, lmfOffset);
-                                       s390_agf  (code, s390_r13, 0, s390_r14, 4);
+                               } else if (s390_is_imm32(lmfOffset)) {
+                                       s390_agfi (code, s390_r13, lmfOffset);
+                               } else {
+                                       S390_SET  (code, s390_r13, lmfOffset);
                                }
                                s390_lgr (code, s390_r14, STK_BASE);
                                s390_sgr (code, s390_r14, s390_r1);
@@ -4236,24 +4001,16 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        break;
                case OP_THROW: {
                        s390_lgr  (code, s390_r2, ins->sreg1);
-                       s390_basr (code, s390_r13, 0);
-                       s390_j    (code, 6);
                        mono_add_patch_info (cfg, code-cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD, 
                                             (gpointer) "mono_arch_throw_exception");
-                       s390_llong(code, 0);
-                       s390_lg   (code, s390_r14, 0, s390_r13, 4);
-                       s390_basr (code, s390_r14, s390_r14);
+                       S390_CALL_TEMPLATE(code, s390_r14);
                }
                        break;
                case OP_RETHROW: {
                        s390_lgr  (code, s390_r2, ins->sreg1);
-                       s390_basr (code, s390_r13, 0);
-                       s390_j    (code, 6);
                        mono_add_patch_info (cfg, code-cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD, 
                                             (gpointer) "mono_arch_rethrow_exception");
-                       s390_llong(code, 0);
-                       s390_lg   (code, s390_r14, 0, s390_r13, 4);
-                       s390_basr (code, s390_r14, s390_r14);
+                       S390_CALL_TEMPLATE(code, s390_r14);
                }
                        break;
                case OP_START_HANDLER: {
@@ -4329,6 +4086,13 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                         */
                        for (i = 0; i < (BREAKPOINT_SIZE / S390X_NOP_SIZE); ++i)
                                s390_nop (code);
+
+                       /*
+                        * Add an additional nop so skipping the bp doesn't cause the ip to point
+                        * to another IL offset.
+                        */
+                       s390_nop (code);
+
                        break;
                }
        
@@ -4465,11 +4229,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        if (*((double *) ins->inst_p0) == 0) {
                                s390_lzdr (code, ins->dreg);
                        } else {
-                               s390_basr  (code, s390_r13, 0);
-                               s390_j     (code, 6);
-                               s390_llong (code, ins->inst_p0);
-                               s390_lg    (code, s390_r13, 0, s390_r13, 4);
-                               s390_ld    (code, ins->dreg, 0, s390_r13, 0);
+                               S390_SET  (code, s390_r13, ins->inst_p0);
+                               s390_ld   (code, ins->dreg, 0, s390_r13, 0);
                        }
                }
                        break;
@@ -4477,10 +4238,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        if (*((float *) ins->inst_p0) == 0) {
                                s390_lzdr (code, ins->dreg);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, ins->inst_p0);
-                               s390_lg   (code, s390_r13, 0, s390_r13, 4);
+                               S390_SET  (code, s390_r13, ins->inst_p0);
                                s390_ldeb (code, ins->dreg, 0, s390_r13, 0);
                        }
                }
@@ -4510,28 +4268,25 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_ICONV_TO_R_UN: {
                        s390_cdfbr (code, ins->dreg, ins->sreg1);
                        s390_ltr   (code, ins->sreg1, ins->sreg1);
-                       s390_jnl   (code, 12);
-                       s390_basr  (code, s390_r13, 0);
-                       s390_j     (code, 6);
-                       s390_word  (code, 0x41f00000);
-                       s390_word  (code, 0);
-                       s390_adb   (code, ins->dreg, 0, s390_r13, 4);
+                       s390_jnl   (code, 8);
+                       S390_SET   (code, s390_r13, 0x41f0000000000000llu);
+                       s390_ldgr  (code, s390_f15, s390_r13);
+                       s390_adbr  (code, ins->dreg, s390_f15);
                }
                        break;
                case OP_LCONV_TO_R_UN: {
                        s390_cdgbr (code, ins->dreg, ins->sreg1);
                        s390_ltgr  (code, ins->sreg1, ins->sreg1);
-                       s390_jnl   (code, 12);
-                       s390_basr  (code, s390_r13, 0);
-                       s390_j     (code, 6);
-                       s390_word  (code, 0x41f00000);
-                       s390_word  (code, 0);
-                       s390_adb   (code, ins->dreg, 0, s390_r13, 4);
+                       s390_jnl   (code, 8);
+                       S390_SET   (code, s390_r13, 0x41f0000000000000llu);
+                       s390_ldgr  (code, s390_f15, s390_r13);
+                       s390_adbr  (code, ins->dreg, s390_f15);
                }
                        break;
                case OP_LCONV_TO_R4:
                case OP_ICONV_TO_R4: {
-                       s390_cdgbr (code, ins->dreg, ins->sreg1);
+                       s390_cegbr (code, ins->dreg, ins->sreg1);
+                       s390_ldebr (code, ins->dreg, ins->dreg);
                }
                        break;
                case OP_LCONV_TO_R8:
@@ -4733,31 +4488,31 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                        if (ins->inst_offset > 0) {
                                                if (s390_is_imm16 (ins->inst_offset)) {
                                                        s390_aghi (code, s390_r0, ins->inst_offset);
+                                               } else if (s390_is_imm32 (ins->inst_offset)) {
+                                                       s390_agfi (code, s390_r0, ins->inst_offset);
                                                } else {
-                                                       s390_basr (code, s390_r13, 0);
-                                                       s390_j    (code, 6);
-                                                       s390_llong(code, ins->inst_offset);
-                                                       s390_ag   (code, s390_r0, 0, s390_r13, 4);
+                                                       S390_SET  (code, s390_r13, ins->inst_offset);
+                                                       s390_agr  (code, s390_r0, s390_r13);
                                                }
                                        }
                                        s390_lgr  (code, s390_r12, ins->sreg1);
                                        if (ins->inst_imm > 0) {
                                                if (s390_is_imm16 (ins->inst_imm)) {
                                                        s390_aghi (code, s390_r12, ins->inst_imm);
+                                               } else if (s390_is_imm32 (ins->inst_imm)) {
+                                                       s390_agfi (code, s390_r12, ins->inst_imm);
                                                } else {
-                                                       s390_basr (code, s390_r13, 0);
-                                                       s390_j    (code, 6);
-                                                       s390_llong(code, ins->inst_imm);
-                                                       s390_ag   (code, s390_r12, 0, s390_r13, 4);
+                                                       S390_SET  (code, s390_r13, ins->inst_imm);
+                                                       s390_agr  (code, s390_r12, s390_r13);
                                                }
                                        }
                                        if (s390_is_imm16 (ins->backend.size)) {
                                                s390_lghi (code, s390_r1, ins->backend.size);
+                                       } else if (s390_is_imm32 (ins->inst_offset)) {
+                                               s390_agfi (code, s390_r1, ins->backend.size);
                                        } else {
-                                               s390_basr (code, s390_r13, 0);
-                                               s390_j    (code, 6);
-                                               s390_llong(code, ins->backend.size);
-                                               s390_lg   (code, s390_r1, 0, s390_r13, 4);
+                                               S390_SET  (code, s390_r13, ins->backend.size);
+                                               s390_agr  (code, s390_r1, s390_r13);
                                        }
                                        s390_lgr  (code, s390_r13, s390_r1);
                                        s390_mvcle(code, s390_r0, s390_r12, 0, 0);
@@ -4775,15 +4530,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        s390_lgr (code, ins->dreg, s390_r1);
                }
                        break;  
-               case OP_ATOMIC_ADD_NEW_I8: {
-                       s390_lgr (code, s390_r1, ins->sreg2);
-                       s390_lg  (code, s390_r0, 0, ins->inst_basereg, ins->inst_offset);
-                       s390_agr (code, s390_r1, s390_r0);
-                       s390_csg (code, s390_r0, s390_r1, ins->inst_basereg, ins->inst_offset);
-                       s390_jnz (code, -10);
-                       s390_lgr (code, ins->dreg, s390_r1);
-               }
-                       break;  
                case OP_ATOMIC_EXCHANGE_I8: {
                        s390_lg  (code, s390_r0, 0, ins->inst_basereg, ins->inst_offset);
                        s390_csg (code, s390_r0, ins->sreg2, ins->inst_basereg, ins->inst_offset);
@@ -4800,15 +4546,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        s390_lgfr(code, ins->dreg, s390_r1);
                }
                        break;  
-               case OP_ATOMIC_ADD_NEW_I4: {
-                       s390_lgfr(code, s390_r1, ins->sreg2);
-                       s390_lgf (code, s390_r0, 0, ins->inst_basereg, ins->inst_offset);
-                       s390_agr (code, s390_r1, s390_r0);
-                       s390_cs  (code, s390_r0, s390_r1, ins->inst_basereg, ins->inst_offset);
-                       s390_jnz (code, -9);
-                       s390_lgfr(code, ins->dreg, s390_r1);
-               }
-                       break;  
                case OP_ATOMIC_EXCHANGE_I4: {
                        s390_l   (code, s390_r0, 0, ins->inst_basereg, ins->inst_offset);
                        s390_cs  (code, s390_r0, ins->sreg2, ins->inst_basereg, ins->inst_offset);
@@ -4820,11 +4557,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        s390_lgr  (code, ins->dreg, ins->sreg1);
                        if (s390_is_imm16 (cfg->stack_offset)) {
                                s390_aghi (code, ins->dreg, cfg->stack_offset);
+                       } else if (s390_is_imm32 (cfg->stack_offset)) {
+                               s390_agfi (code, ins->dreg, cfg->stack_offset);
                        } else {
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-                               s390_llong(code, cfg->stack_offset);
-                               s390_ag   (code, ins->dreg, 0, s390_r13, 4);
+                               S390_SET  (code, s390_r13, cfg->stack_offset);
+                               s390_agr  (code, ins->dreg, s390_r13);
                        }
                }
                        break;  
@@ -4901,33 +4638,36 @@ mono_arch_patch_code (MonoMethod *method, MonoDomain *domain,
 
                switch (patch_info->type) {
                        case MONO_PATCH_INFO_IP:
-                       case MONO_PATCH_INFO_EXC_NAME:
                        case MONO_PATCH_INFO_LDSTR:
                        case MONO_PATCH_INFO_TYPE_FROM_HANDLE: 
                        case MONO_PATCH_INFO_LDTOKEN: 
                        case MONO_PATCH_INFO_EXC:
-                       case MONO_PATCH_INFO_ABS:
+                               s390_patch_addr (ip, (guint64) target);
+                               continue;
                        case MONO_PATCH_INFO_METHOD:
-                       case MONO_PATCH_INFO_RGCTX_FETCH:
                        case MONO_PATCH_INFO_INTERNAL_METHOD:
-                       case MONO_PATCH_INFO_CLASS_INIT:
                        case MONO_PATCH_INFO_JIT_ICALL_ADDR:
+                       case MONO_PATCH_INFO_CLASS_INIT:
                        case MONO_PATCH_INFO_GENERIC_CLASS_INIT:
-                               s390_patch_addr (ip, (guint64) target);
+                       case MONO_PATCH_INFO_RGCTX_FETCH:
+                       case MONO_PATCH_INFO_ABS: {
+                               S390_EMIT_CALL (ip, target);
                                continue;
+                       }
                        case MONO_PATCH_INFO_SWITCH: 
                                /*----------------------------------*/
                                /* ip points at the basr r13,0/j +4 */
                                /* instruction the vtable value     */
                                /* follows this (i.e. ip+6)         */
                                /*----------------------------------*/
-                               *((gconstpointer *)(ip+6)) = target;
+                               S390_EMIT_LOAD (ip, target);
                                continue;
                        case MONO_PATCH_INFO_METHODCONST:
                        case MONO_PATCH_INFO_CLASS:
                        case MONO_PATCH_INFO_IMAGE:
                        case MONO_PATCH_INFO_FIELD:
                        case MONO_PATCH_INFO_IID:
+                       case MONO_PATCH_INFO_EXC_NAME:
                                target = S390_RELATIVE(target, ip);
                                s390_patch_rel (ip, (guint64) target);
                                continue;
@@ -5109,13 +4849,15 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        s390_lgr  (code, s390_r11, STK_BASE);
        if (s390_is_imm16 (alloc_size)) {
                s390_aghi (code, STK_BASE, -alloc_size);
-       } else { 
+       } else if (s390_is_imm32 (alloc_size)) { 
+               s390_agfi (code, STK_BASE, -alloc_size);
+       } else {
                int stackSize = alloc_size;
-               while (stackSize > 32767) {
-                       s390_aghi (code, STK_BASE, -32767);
-                       stackSize -= 32767;
+               while (stackSize > INT_MAX) {
+                       s390_agfi (code, STK_BASE, -INT_MAX);
+                       stackSize -= INT_MAX;
                }
-               s390_aghi (code, STK_BASE, -stackSize);
+               s390_agfi (code, STK_BASE, -stackSize);
        }
        s390_stg  (code, s390_r11, 0, STK_BASE, 0);
 
@@ -5282,14 +5024,10 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                /* On return from this call r2 have the address of the &lmf      */
                /*---------------------------------------------------------------*/
                if (lmf_addr_tls_offset == -1) {
-                       s390_basr(code, s390_r14, 0);
-                       s390_j   (code, 6);
                        mono_add_patch_info (cfg, code - cfg->native_code, 
                                             MONO_PATCH_INFO_INTERNAL_METHOD, 
                                             (gpointer)"mono_get_lmf_addr");
-                       s390_llong(code, 0);
-                       s390_lg   (code, s390_r1, 0, s390_r14, 4);
-                       s390_basr (code, s390_r14, s390_r1);
+                       S390_CALL_TEMPLATE(code, s390_r1);
                } else {
                        /*-------------------------------------------------------*/
                        /* Get LMF by getting value from thread level storage    */
@@ -5325,10 +5063,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                /*---------------------------------------------------------------*/     
                /* save method info                                              */     
                /*---------------------------------------------------------------*/     
-               s390_basr  (code, s390_r1, 0);                                          
-               s390_j     (code, 6);
-               s390_llong (code, method);                                              
-               s390_lg    (code, s390_r1, 0, s390_r1, 4);                      
+               S390_SET   (code, s390_r1, method);
                s390_stg   (code, s390_r1, 0, s390_r13,                                 
                            G_STRUCT_OFFSET(MonoLMF, method));                          
                                                                                
@@ -5499,27 +5234,19 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
                                /*---------------------------------------------*/
                                /* Patch the parameter passed to the handler   */ 
                                /*---------------------------------------------*/
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
-//                             s390_llong(code, patch_info->data.target);
-                               s390_llong(code, exc_class->type_token);
+                               S390_SET  (code, s390_r2, exc_class->type_token);
                                /*---------------------------------------------*/
                                /* Load return address & parameter register    */
                                /*---------------------------------------------*/
                                s390_larl (code, s390_r14, (guint64)S390_RELATIVE((patch_info->ip.i +
                                                           cfg->native_code + 8), code));
-                               s390_lg   (code, s390_r2, 0, s390_r13, 4);
                                /*---------------------------------------------*/
                                /* Reuse the current patch to set the jump     */
                                /*---------------------------------------------*/
-                               s390_basr (code, s390_r13, 0);
-                               s390_j    (code, 6);
                                patch_info->type      = MONO_PATCH_INFO_INTERNAL_METHOD;
                                patch_info->data.name = "mono_arch_throw_corlib_exception";
                                patch_info->ip.i      = code - cfg->native_code;
-                               s390_llong(code, 0);
-                               s390_lg   (code, s390_r1, 0, s390_r13, 4);
-                               s390_br   (code, s390_r1);
+                               S390_BR_TEMPLATE (code, s390_r1);
                        }
                        break;
                }
@@ -5572,7 +5299,7 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
 
 /*------------------------------------------------------------------*/
 /*                                                                  */
-/* Name                - mono_arch_emit_inst_for_method                        */
+/* Name                - mono_arch_emit_inst_for_method                    */
 /*                                                                  */
 /*------------------------------------------------------------------*/
 
@@ -5745,7 +5472,7 @@ mono_arch_flush_register_windows (void)
 gboolean 
 mono_arch_is_inst_imm (gint64 imm)
 {
-       return s390_is_imm16 (imm);
+       return s390_is_imm32 (imm);
 }
 
 /*========================= End of Function ========================*/
@@ -5819,7 +5546,40 @@ mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
 }
 
 /*========================= End of Function ========================*/
+/*------------------------------------------------------------------*/
+/*                                                                  */
+/* Name                - mono_arch_install_handler_block_guard             */
+/*                                                                  */
+/* Function    -                                                   */
+/*                                                                 */
+/*------------------------------------------------------------------*/
+
+gpointer
+mono_arch_install_handler_block_guard (MonoJitInfo *ji, MonoJitExceptionInfo *clause, 
+                                      MonoContext *ctx, gpointer new_value)
+{
+       int offset;
+       gpointer *sp, old_value;
+       char *bp;
+
+       offset = clause->exvar_offset;
+
+       /*Load the spvar*/
+       bp = MONO_CONTEXT_GET_BP (ctx);
+       sp = *(gpointer*)(bp + offset);
+
+       old_value = *sp;
+       if (old_value < ji->code_start || (char*)old_value > ((char*)ji->code_start + ji->code_size))
+               return old_value;
+
+       *sp = new_value;
+
+       return old_value;
+}
 
+/*========================= End of Function ========================*/
 /*------------------------------------------------------------------*/
 /*                                                                  */
 /* Name                - get_delegate_invoke_impl.                         */
@@ -5839,8 +5599,8 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
                start = code = mono_global_codeman_reserve (size);
 
                /* Replace the this argument with the target */
-               s390_lg   (code, s390_r1, 0, s390_r2, G_STRUCT_OFFSET(MonoDelegate, method_ptr));
-               s390_lg   (code, s390_r2, 0, s390_r2, G_STRUCT_OFFSET(MonoDelegate, target));
+               s390_lg   (code, s390_r1, 0, s390_r2, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
+               s390_lg   (code, s390_r2, 0, s390_r2, MONO_STRUCT_OFFSET (MonoDelegate, target));
                s390_br   (code, s390_r1);
                g_assert ((code - start) <= size);
 
@@ -5851,7 +5611,7 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
                size = 32 + param_count * 8;
                start = code = mono_global_codeman_reserve (size);
 
-               s390_lg   (code, s390_r1, 0, s390_r2, G_STRUCT_OFFSET(MonoDelegate, method_ptr));
+               s390_lg   (code, s390_r1, 0, s390_r2, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
                /* slide down the arguments */
                for (i = 0; i < param_count; ++i) {
                        s390_lgr (code, (s390_r2 + i), (s390_r2 + i + 1));
@@ -6027,55 +5787,39 @@ mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain,
                if (item->is_equals) {
                        if (item->check_target_idx) {
                                if (!item->compare_done) {
-                                       s390_basr (code, s390_r13, s390_r0);
-                                       s390_j    (code, 6);
-                                       s390_llong(code, item->key);
-                                       s390_lg   (code, s390_r0, 0, s390_r13, 4);
+                                       S390_SET  (code, s390_r0, item->key);
                                        s390_cgr  (code, s390_r0, MONO_ARCH_IMT_REG);
                                }
                                item->jmp_code = (guint8*) code;
                                s390_jcl (code, S390_CC_NE, 0);
                                
-                               s390_basr (code, s390_r13, s390_r0);
-                               s390_j    (code, 6);
-                               if (item->has_target_code)  {
-                                       s390_llong(code, item->value.target_code);
-                                       s390_lg   (code, s390_r1, 0, s390_r13, 4);
-                               } else {        
-                                       s390_llong(code, (&(vtable->vtable [item->value.vtable_slot])));
-                                       s390_lg   (code, s390_r1, 0, s390_r13, 4);
-                                       s390_lg   (code, s390_r1, 0, s390_r1, 0);
+                               if (item->has_target_code) {
+                                       S390_SET (code, s390_r1, item->value.target_code);
+                               } else {
+                                       S390_SET (code, s390_r1, (&(vtable->vtable [item->value.vtable_slot])));
+                                       s390_lg  (code, s390_r1, 0, s390_r1, 0);
                                }
                                s390_br   (code, s390_r1);
                        } else {
                                if (fail_tramp) {
                                        gint64  target;
 
-                                       s390_basr (code, s390_r13, s390_r0);
-                                       s390_j    (code, 6);
-                                       s390_llong(code, item->key);
-                                       s390_lg   (code, s390_r0, 0, s390_r13, 4);
+                                       S390_SET  (code, s390_r0, item->key);
                                        s390_cgr  (code, s390_r0, MONO_ARCH_IMT_REG);
                                        item->jmp_code = (guint8*) code;
                                        s390_jcl  (code, S390_CC_NE, 0);
-                                       s390_basr (code, s390_r13, s390_r0);
-                                       s390_j    (code, 6);
                                        if (item->has_target_code) {
-                                               s390_llong(code, item->value.target_code);
-                                               s390_lg   (code, s390_r1, 0, s390_r13, 4);
+                                               S390_SET (code, s390_r1, item->value.target_code);
                                        } else {
                                                g_assert (vtable);
-                                               s390_llong(code, (&(vtable->vtable [item->value.vtable_slot])));
-                                               s390_lg   (code, s390_r1, 0, s390_r13, 4);
+                                               S390_SET  (code, s390_r1, 
+                                                          (&(vtable->vtable [item->value.vtable_slot])));
                                                s390_lg   (code, s390_r1, 0, s390_r1, 0);
                                        }
                                        s390_br   (code, s390_r1);
                                        target = S390_RELATIVE(code, item->jmp_code);
                                        s390_patch_rel(item->jmp_code+2, target);
-                                       s390_basr (code, s390_r13, s390_r0);
-                                       s390_j    (code, 6);
-                                       s390_llong(code, fail_tramp);
-                                       s390_lg   (code, s390_r1, 0, s390_r13, 4);
+                                       S390_SET  (code, s390_r1, fail_tramp);
                                        s390_br   (code, s390_r1);
                                        item->jmp_code = NULL;
                                } else {
@@ -6083,28 +5827,21 @@ mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain,
 #if ENABLE_WRONG_METHOD_CHECK
                                        g_assert_not_reached ();
 #endif
-                                       s390_basr (code, s390_r13, s390_r0);
-                                       s390_j    (code, 6);
-                                       s390_llong(code, (&(vtable->vtable [item->value.vtable_slot])));
-                                       s390_lg   (code, s390_r1, 0, s390_r13, 4);
+                                       S390_SET (code, s390_r1, (&(vtable->vtable [item->value.vtable_slot])));
                                        s390_lg   (code, s390_r1, 0, s390_r1, 0);
                                        s390_br   (code, s390_r1);
-#if ENABLE_WRONG_METHOD_CHECK
-                                       g_assert_not_reached ();
-#endif
                                }
                        }
                } else {
-                       s390_basr (code, s390_r13, s390_r0);
-                       s390_j    (code, 6);
-                       s390_llong(code, item->key);
-                       s390_lg   (code, s390_r0, 0, s390_r13, 4);
+                       S390_SET  (code, s390_r0, item->key);
                        s390_cgr  (code, MONO_ARCH_IMT_REG, s390_r0);
                        item->jmp_code = (guint8 *) code;
                        s390_jcl  (code, S390_CC_GE, 0);
                }
        }
-       /* patch the branches to get to the target items */
+       /* 
+        * patch the branches to get to the target items 
+        */
        for (i = 0; i < count; ++i) {
                MonoIMTCheckItem *item = imt_entries [i];
                if (item->jmp_code) {
@@ -6242,7 +5979,10 @@ gboolean
 mono_arch_is_breakpoint_event (void *info, void *sigctx)
 {
        siginfo_t* sinfo = (siginfo_t*) info;
-       /* Sometimes the address is off by 4 */
+
+       /* 
+        * Sometimes the address is off by 4 
+        */
        if (sinfo->si_addr >= bp_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)bp_trigger_page + 128)
                return TRUE;
        else
@@ -6264,7 +6004,7 @@ mono_arch_is_breakpoint_event (void *info, void *sigctx)
 void
 mono_arch_skip_breakpoint (MonoContext *ctx, MonoJitInfo *ji)
 {
-       MONO_CONTEXT_SET_IP (ctx, (guint8*)MONO_CONTEXT_GET_IP (ctx) + BREAKPOINT_SIZE);
+       MONO_CONTEXT_SET_IP (ctx, ((guint8*)MONO_CONTEXT_GET_IP (ctx) + sizeof(RXY_Format)));
 }
 
 /*========================= End of Function ========================*/
@@ -6315,7 +6055,9 @@ mono_arch_is_single_step_event (void *info, void *sigctx)
 {
        siginfo_t* sinfo = (siginfo_t*) info;
 
-       /* Sometimes the address is off by 4 */
+       /* 
+        * Sometimes the address is off by 4 
+        */
        if (sinfo->si_addr >= ss_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)ss_trigger_page + 128)
                return TRUE;
        else
@@ -6379,3 +6121,17 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
 /*========================= End of Function ========================*/
 
 #endif
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+       switch (opcode) {
+       case OP_ATOMIC_ADD_I4:
+       case OP_ATOMIC_ADD_I8:
+       case OP_ATOMIC_EXCHANGE_I4:
+       case OP_ATOMIC_EXCHANGE_I8:
+               return TRUE;
+       default:
+               return FALSE;
+       }
+}
index a5be8f01087162cbde7ed649cf1cb945bc0464aa..50b74c51fd9de7a315072acf8d89d8c198fe984f 100644 (file)
 /* Parameters used by the register allocator */
 /*-------------------------------------------*/
 
-#define S390_LONG(loc, opy, op, r, ix, br, off)                                        \
-       if (mono_hwcap_s390x_has_ld) {                                          \
-               if (s390_is_imm20(off)) {                                       \
-                       s390_##opy (loc, r, ix, br, off);                       \
-               } else {                                                        \
-                       s390_basr (code, s390_r13, 0);                          \
-                       s390_j    (code, 6);                                    \
-                       s390_llong(code, off);                                  \
-                       s390_lg   (code, s390_r13, 0, s390_r13, 4);             \
-                       s390_##op (code, r, s390_r13, br, 0);                   \
-               }                                                               \
-       } else {                                                                \
-               if (s390_is_uimm12(off)) {                                      \
-                       s390_##op (loc, r, ix, br, off);                        \
-               } else {                                                        \
-                       s390_basr (code, s390_r13, 0);                          \
-                       s390_j    (code, 6);                                    \
-                       s390_llong(code, off);                                  \
-                       s390_lg   (code, s390_r13, 0, s390_r13, 4);             \
-                       s390_##op (code, r, s390_r13, br, 0);                   \
-               }                                                               \
-       }
-
 struct MonoLMF {
        gpointer    previous_lmf;
        gpointer    lmf_addr;
@@ -62,58 +39,15 @@ typedef struct
        void *return_address;
 } MonoS390StackFrame;
 
-typedef struct
-{
-       char    n3:1;           // N3 instructions present
-       char    zArch:1;        // z/Architecture mode installed
-       char    zAct:1;         // z/Architecture mode active
-       char    date:1;         // DATE enhancement facility
-       char    idte1:1;        // IDTE present (PST)
-       char    idte2:1;        // IDTE present (REG)
-       char    asnlx:1;        // ASN and LX reuse facility
-       char    stfle:1;        // STFLE installed
-       char    zDATe:1;        // Enhanced DAT in z mode
-       char    srstat:1;       // Sense running status facility
-       char    cSSKE:1;        // Conditional SSKE facility
-       char    topo:1;         // COnfiguration topology facility
-       char    xTrans2:1;      // Extended translation facility 2
-       char    msgSec:1;       // Message security facility
-       char    longDsp:1;      // Long displacement facility
-       char    hiPerfLD:1;     // High performance long displacement facility
-       char    hfpMAS:1;       // HFP multiply-and-add/subtrace facility
-       char    xImm:1;         // Extended immediate facility
-       char    xTrans3:1;      // Extended translation facility 3
-       char    hfpUnX:1;       // HFP unnormalized extension facility
-       char    etf2:1;         // ETF2-enhancement facility
-       char    stckf:1;        // Store-clock-fast facility
-       char    parse:1;        // Parsing enhancement facility
-       char    mvcos:1;        // MVCOS facility
-       char    todSteer:1;     // TOD-clock steering facility
-       char    etf3:1;         // ETF3-enhancement facility
-       char    xCPUtm:1;       // Extract CPU time facility
-       char    csst:1;         // Compare-swap-and-store facility
-       char    csst2:1;        // Compare-swap-and-store facility 2
-       char    giX:1;          // General instructions extension facility
-       char    exX:1;          // Execute extensions facility
-       char    ibm:1;          // IBM internal use
-       char    fps:1;          // Floating point support enhancement
-       char    dfp:1;          // Decimal floating point facility
-       char    hiDFP:1;        // High Performance DFP facility
-       char    pfpo:1;         // PFPO instruction facility
-} __attribute__((aligned(8))) facilityList_t;
-       
 // #define MONO_ARCH_SIGSEGV_ON_ALTSTACK               1
 #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN               1
 #define MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS             1
 #define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS            1
 #define MONO_ARCH_HAVE_IS_INT_OVERFLOW                 1
 #define MONO_ARCH_NEED_DIV_CHECK                       1
-#define MONO_ARCH_HAVE_ATOMIC_ADD                      1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE                         1
 #define MONO_ARCH_SIGNAL_STACK_SIZE                    256*1024
 #define MONO_ARCH_HAVE_DECOMPOSE_OPTS                  1
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE      1
-#define MONO_ARCH_HAVE_IMT                             1
 #define MONO_ARCH_HAVE_TLS_GET                         1
 #define MONO_ARCH_ENABLE_MONO_LMF_VAR                  1
 #define MONO_ARCH_IMT_REG                              s390_r9
@@ -128,6 +62,8 @@ typedef struct
 #define MONO_ARCH_GC_MAPS_SUPPORTED                    1
 #define MONO_ARCH_GSHARED_SUPPORTED                    1
 #define MONO_ARCH_MONITOR_ENTER_ADJUSTMENT             1
+#define MONO_ARCH_HAVE_HANDLER_BLOCK_GUARD             1
+#define MONO_ARCH_HAVE_INVALIDATE_METHOD               1
 
 #define S390_STACK_ALIGNMENT            8
 #define S390_FIRST_ARG_REG             s390_r2
index ec65fb5c6b9abf2b5f4d6d986f1f0995b5842a57..3b95fd970336c9f187ef0e05f7f563b96acc9190 100644 (file)
@@ -4430,3 +4430,9 @@ mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
        /* FIXME: implement */
        g_assert_not_reached ();
 }
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+       return FALSE;
+}
index f2b3b41d7963a5ae2a0c8b4ac632d74813ef8af5..4b9477845585d9a18e0d5efa1758b2b77e0bb1be 100644 (file)
@@ -102,7 +102,6 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1
 #define MONO_ARCH_EMULATE_FREM 1
 #define MONO_ARCH_NEED_DIV_CHECK 1
-#define MONO_ARCH_HAVE_IMT 1
 #define MONO_ARCH_IMT_REG sparc_g1
 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
 #define MONO_ARCH_HAVE_TLS_INIT 1
index 6e56ed5d2a0abb6b68583cd27a25666b63d6b284..5de69085b60b2b74f26e9fc62774bf7e525d6a40 100644 (file)
@@ -22,9 +22,9 @@
  */
 guint8* mono_trampoline_code [MONO_TRAMPOLINE_NUM];
 
-static GHashTable *class_init_hash_addr = NULL;
-static GHashTable *rgctx_lazy_fetch_trampoline_hash = NULL;
-static GHashTable *rgctx_lazy_fetch_trampoline_hash_addr = NULL;
+static GHashTable *class_init_hash_addr;
+static GHashTable *rgctx_lazy_fetch_trampoline_hash;
+static GHashTable *rgctx_lazy_fetch_trampoline_hash_addr;
 static guint32 trampoline_calls, jit_trampolines, unbox_trampolines, static_rgctx_trampolines;
 
 #define mono_trampolines_lock() EnterCriticalSection (&trampolines_mutex)
@@ -138,8 +138,6 @@ mono_create_static_rgctx_trampoline (MonoMethod *m, gpointer addr)
 }
 #endif
 
-#ifdef MONO_ARCH_HAVE_IMT
-
 /*
  * Either IMPL_METHOD or AOT_ADDR will be set on return.
  */
@@ -243,7 +241,6 @@ __attribute__ ((noinline))
                }
        }
 }
-#endif
 
 /*
  * This is a super-ugly hack to fix bug #616463.
@@ -406,7 +403,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
        orig_vtable_slot = vtable_slot;
        vtable_slot_to_patch = vtable_slot;
 
-#ifdef MONO_ARCH_HAVE_IMT
        /* IMT call */
        if (vt && (gpointer)vtable_slot < (gpointer)vt) {
                MonoMethod *impl_method = NULL;
@@ -464,7 +460,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
                        m = impl_method;
                }
        }
-#endif
 
        /*
         * The virtual check is needed because is_generic_method_definition (m) could
@@ -484,9 +479,7 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
                else
                        g_assert (!m->klass->generic_container);
 
-#ifdef MONO_ARCH_HAVE_IMT
                generic_virtual = mono_arch_find_imt_method (regs, code);
-#endif
                if (generic_virtual) {
                        g_assert (generic_virtual->is_inflated);
                        context.method_inst = ((MonoMethodInflated*)generic_virtual)->context.method_inst;
@@ -524,7 +517,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
                        g_assert_not_reached ();
 #endif
                } else {
-#ifdef MONO_ARCH_HAVE_IMT
                        MonoObject *this_argument = mono_arch_get_this_arg_from_call (regs, code);
 
                        vt = this_argument->vtable;
@@ -537,9 +529,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
                                mono_class_setup_supertypes (this_argument->vtable->klass);
                                klass = this_argument->vtable->klass->supertypes [m->klass->idepth - 1];
                        }
-#else
-                       NOT_IMPLEMENTED;
-#endif
                }
 
                g_assert (vtable_slot || klass);
@@ -816,11 +805,9 @@ mono_generic_virtual_remoting_trampoline (mgreg_t *regs, guint8 *code, MonoMetho
        else
                g_assert (!m->klass->generic_container);
 
-#ifdef MONO_ARCH_HAVE_IMT
        imt_method = mono_arch_find_imt_method (regs, code);
        if (imt_method->is_inflated)
                context.method_inst = ((MonoMethodInflated*)imt_method)->context.method_inst;
-#endif
        m = mono_class_inflate_generic_method (declaring, &context);
        m = mono_marshal_get_remoting_invoke_with_check (m);
 
@@ -981,24 +968,14 @@ mono_monitor_exit_trampoline (mgreg_t *regs, guint8 *code, MonoObject *obj, guin
 
 #ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
 
-typedef struct {
-       MonoMethod *invoke;
-       gpointer impl_this;
-       gpointer impl_nothis;
-       MonoMethod *method;
-       MonoMethodSignature *invoke_sig;
-       MonoMethodSignature *sig;
-       gboolean need_rgctx_tramp;
-} DelegateTrampInfo;
-
 /*
  * Precompute data to speed up mono_delegate_trampoline ().
  * METHOD might be NULL.
  */
-static gpointer
+static MonoDelegateTrampInfo*
 create_delegate_trampoline_data (MonoDomain *domain, MonoClass *klass, MonoMethod *method)
 {
-       DelegateTrampInfo *tramp_data;
+       MonoDelegateTrampInfo *tramp_data;
        MonoMethod *invoke;
        MonoError err;
 
@@ -1006,7 +983,7 @@ create_delegate_trampoline_data (MonoDomain *domain, MonoClass *klass, MonoMetho
        invoke = mono_get_delegate_invoke (klass);
        g_assert (invoke);
 
-       tramp_data = mono_domain_alloc (domain, sizeof (DelegateTrampInfo));
+       tramp_data = mono_domain_alloc (domain, sizeof (MonoDelegateTrampInfo));
        tramp_data->invoke = invoke;
        tramp_data->invoke_sig = mono_method_signature (invoke);
        tramp_data->impl_this = mono_arch_get_delegate_invoke_impl (mono_method_signature (invoke), TRUE);
@@ -1039,7 +1016,7 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr
        gboolean need_rgctx_tramp = FALSE;
        gboolean need_unbox_tramp = FALSE;
        gboolean enable_caching = TRUE;
-       DelegateTrampInfo *tramp_info = (DelegateTrampInfo*)arg;
+       MonoDelegateTrampInfo *tramp_info = (MonoDelegateTrampInfo*)arg;
        MonoMethod *invoke = tramp_info->invoke;
        guint8 *impl_this = tramp_info->impl_this;
        guint8 *impl_nothis = tramp_info->impl_nothis;
@@ -1161,6 +1138,9 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr
                        delegate->method_ptr = mono_create_static_rgctx_trampoline (method, delegate->method_ptr);
        }
 
+       /* Necessary for !code condition to fallback to slow path */
+       code = NULL;
+
        multicast = ((MonoMulticastDelegate*)delegate)->prev != NULL;
        if (!multicast && !callvirt) {
                if (method && (method->flags & METHOD_ATTRIBUTE_STATIC) && mono_method_signature (method)->param_count == mono_method_signature (invoke)->param_count + 1)
@@ -1168,18 +1148,20 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr
                        code = impl_this;
                else
                        code = delegate->target ? impl_this : impl_nothis;
+       }
 
-               if (code) {
-                       delegate->invoke_impl = mono_get_addr_from_ftnptr (code);
-                       return code;
-               }
+       if (!code) {
+               /* The general, unoptimized case */
+               m = mono_marshal_get_delegate_invoke (invoke, delegate);
+               code = mono_compile_method (m);
+               code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE);
        }
 
-       /* The general, unoptimized case */
-       m = mono_marshal_get_delegate_invoke (invoke, delegate);
-       code = mono_compile_method (m);
-       code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE);
        delegate->invoke_impl = mono_get_addr_from_ftnptr (code);
+       if (enable_caching && !callvirt && tramp_info->method) {
+               tramp_info->method_ptr = delegate->method_ptr;
+               tramp_info->invoke_impl = delegate->invoke_impl;
+       }
 
        return code;
 }
@@ -1540,30 +1522,29 @@ mono_create_jit_trampoline_from_token (MonoImage *image, guint32 token)
 
 
 /*
- * mono_create_delegate_trampoline_with_method:
+ * mono_create_delegate_trampoline_info:
  *
  *   Create a delegate trampoline for the KLASS+METHOD pair.
  */
-gpointer
-mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klass, MonoMethod *method)
+MonoDelegateTrampInfo*
+mono_create_delegate_trampoline_info (MonoDomain *domain, MonoClass *klass, MonoMethod *method)
 {
 #ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
-       gpointer ptr;
-       guint32 code_size = 0;
-       gpointer tramp_info;
+       MonoDelegateTrampInfo *tramp_info;
        MonoClassMethodPair pair, *dpair;
+       guint32 code_size = 0;
 
        pair.klass = klass;
        pair.method = method;
        mono_domain_lock (domain);
-       ptr = g_hash_table_lookup (domain_jit_info (domain)->delegate_trampoline_hash, &pair);
+       tramp_info = g_hash_table_lookup (domain_jit_info (domain)->delegate_trampoline_hash, &pair);
        mono_domain_unlock (domain);
-       if (ptr)
-               return ptr;
+       if (tramp_info)
+               return tramp_info;
 
        tramp_info = create_delegate_trampoline_data (domain, klass, method);
 
-       ptr = mono_create_specific_trampoline (tramp_info, MONO_TRAMPOLINE_DELEGATE, domain, &code_size);
+       tramp_info->invoke_impl = mono_create_specific_trampoline (tramp_info, MONO_TRAMPOLINE_DELEGATE, domain, &code_size);
        g_assert (code_size);
 
        dpair = mono_domain_alloc0 (domain, sizeof (MonoClassMethodPair));
@@ -1571,10 +1552,10 @@ mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klas
 
        /* store trampoline address */
        mono_domain_lock (domain);
-       g_hash_table_insert (domain_jit_info (domain)->delegate_trampoline_hash, dpair, ptr);
+       g_hash_table_insert (domain_jit_info (domain)->delegate_trampoline_hash, dpair, tramp_info);
        mono_domain_unlock (domain);
 
-       return ptr;
+       return tramp_info;
 #else
        return NULL;
 #endif
@@ -1583,7 +1564,11 @@ mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klas
 gpointer
 mono_create_delegate_trampoline (MonoDomain *domain, MonoClass *klass)
 {
-       return mono_create_delegate_trampoline_with_method (domain, klass, NULL);
+#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
+       return mono_create_delegate_trampoline_info (domain, klass, NULL)->invoke_impl;
+#else
+       return NULL;
+#endif
 }
 
 gpointer
index 6b6ba7ad2f94fb6989412733dfd1a098e2fd5e82..a2c9f49805dbf617c500af6139e3cdf5c9bdc99e 100644 (file)
 #define DW_CFA_lo_user           0x1c
 #define DW_CFA_hi_user           0x3f
 
+/*
+ * Mono extension, advance loc to a location stored outside the unwind info.
+ * This is required to make the unwind descriptors sharable, since otherwise each one would contain
+ * an advance_loc with a different offset just before the unwind ops for the epilog.
+ */
+#define DW_CFA_mono_advance_loc DW_CFA_lo_user
+
 /* Represents one unwind instruction */
 typedef struct {
        guint8 op; /* One of DW_CFA_... */
@@ -84,6 +91,16 @@ typedef struct {
 #define mono_emit_unwind_op_same_value(cfg,ip,reg) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_same_value, (reg), 0)
 /* Reg is saved at cfa+offset */
 #define mono_emit_unwind_op_offset(cfg,ip,reg,offset) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_offset, (reg), (offset))
+/* Save the unwind state into an implicit stack */
+#define mono_emit_unwind_op_remember_state(cfg,ip) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_remember_state, 0, 0)
+/* Restore the unwind state from the state stack */
+#define mono_emit_unwind_op_restore_state(cfg,ip) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_restore_state, 0, 0)
+/*
+ * Mark the current location as a location stored outside the unwind info, which will be passed
+ * explicitly to mono_unwind_frame () in the MARK_LOCATIONS argument. This allows the unwind info
+ * to be shared among multiple methods.
+ */
+#define mono_emit_unwind_op_mark_loc(cfg,ip,n) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_mono_advance_loc, 0, (n))
 
 /* Similar macros usable when a cfg is not available, like for trampolines */
 #define mono_add_unwind_op_def_cfa(op_list,code,buf,reg,offset) do { (op_list) = g_slist_append ((op_list), mono_create_unwind_op ((code) - (buf), DW_CFA_def_cfa, (reg), (offset))); } while (0)
@@ -127,7 +144,8 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len) MONO_INTERNAL;
 
 void
 mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, 
-                                  guint8 *start_ip, guint8 *end_ip, guint8 *ip, mgreg_t *regs, int nregs,
+                                  guint8 *start_ip, guint8 *end_ip, guint8 *ip, guint8 **mark_locations,
+                                  mgreg_t *regs, int nregs,
                                   mgreg_t **save_locations, int save_locations_len,
                                   guint8 **out_cfa) MONO_INTERNAL;
 
index bb71ec48192694ee29ae91b9ad4c347c23f7bddf..c43b1d0102f6d156e58b801e317e1c9bac36a8b5 100644 (file)
@@ -50,8 +50,6 @@
 
 #include "jit-icalls.h"
 
-gboolean mono_win_chained_exception_needs_run;
-
 void
 mono_runtime_install_handlers (void)
 {
@@ -83,7 +81,8 @@ mono_runtime_cleanup_handlers (void)
 gboolean
 SIG_HANDLER_SIGNATURE (mono_chain_signal)
 {
-       mono_win_chained_exception_needs_run = TRUE;
+       MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+       jit_tls->mono_win_chained_exception_needs_run = TRUE;
        return TRUE;
 }
 
index 02a6d1daa781c7916d546236bdc4ad61452d0368..08637dbb8e1cad77848ae3c430340771b13ebf01 100644 (file)
@@ -17,6 +17,7 @@
 #include <unistd.h>
 #endif
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/threads.h>
@@ -217,6 +218,8 @@ typedef struct {
        /* The index of the vret arg in the argument list */
        int vret_arg_index;
        int vret_arg_offset;
+       /* Argument space popped by the callee */
+       int callee_stack_pop;
        ArgInfo ret;
        ArgInfo sig_cookie;
        ArgInfo args [1];
@@ -593,6 +596,11 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
                stack_size += cinfo->stack_align_amount;
        }
 
+       if (cinfo->vtype_retaddr) {
+               /* if the function returns a struct on stack, the called method already does a ret $0x4 */
+               cinfo->callee_stack_pop = 4;
+       }
+
        cinfo->stack_usage = stack_size;
        cinfo->reg_usage = gr;
        cinfo->freg_usage = fr;
@@ -1058,7 +1066,7 @@ mono_arch_allocate_vars (MonoCompile *cfg)
        cfg->frame_reg = X86_EBP;
        offset = 0;
 
-       if (cfg->has_atomic_add_new_i4 || cfg->has_atomic_exchange_i4) {
+       if (cfg->has_atomic_add_i4 || cfg->has_atomic_exchange_i4) {
                /* The opcode implementations use callee-saved regs as scratch regs by pushing and pop-ing them, but that is not async safe */
                cfg->used_int_regs |= (1 << X86_EBX) | (1 << X86_EDI) | (1 << X86_ESI);
        }
@@ -1209,6 +1217,10 @@ mono_arch_create_vars (MonoCompile *cfg)
                cfg->vret_addr = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_ARG);
        }
 
+#ifdef MONO_X86_NO_PUSHES
+       cfg->arch.no_pushes = TRUE;
+#endif
+
        if (cfg->method->save_lmf) {
                cfg->create_lmf_var = TRUE;
                cfg->lmf_ir = TRUE;
@@ -1267,9 +1279,17 @@ emit_sig_cookie (MonoCompile *cfg, MonoCallInst *call, CallInfo *cinfo)
        if (cfg->compile_aot) {
                sig_reg = mono_alloc_ireg (cfg);
                MONO_EMIT_NEW_SIGNATURECONST (cfg, sig_reg, tmp_sig);
-               MONO_EMIT_NEW_UNALU (cfg, OP_X86_PUSH, -1, sig_reg);
+               if (cfg->arch.no_pushes) {
+                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, cinfo->sig_cookie.offset, sig_reg);
+               } else {
+                       MONO_EMIT_NEW_UNALU (cfg, OP_X86_PUSH, -1, sig_reg);
+               }
        } else {
-               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_X86_PUSH_IMM, -1, -1, tmp_sig);
+               if (cfg->arch.no_pushes) {
+                       MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STORE_MEMBASE_IMM, X86_ESP, cinfo->sig_cookie.offset, tmp_sig);
+               } else {
+                       MONO_EMIT_NEW_BIALU_IMM (cfg, OP_X86_PUSH_IMM, -1, -1, tmp_sig);
+               }
        }
 }
 
@@ -1394,6 +1414,9 @@ emit_gc_param_slot_def (MonoCompile *cfg, int sp_offset, MonoType *t)
        if (cfg->compute_gc_maps) {
                MonoInst *def;
 
+               /* Needs checking if the feature will be enabled again */
+               g_assert (!cfg->arch.no_pushes);
+
                /* On x86, the offsets are from the sp value before the start of the call sequence */
                if (t == NULL)
                        t = &mono_defaults.int_class->byval_arg;
@@ -1416,11 +1439,12 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
        sig_ret = mini_replace_type (sig->ret);
 
        cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, sig);
+       call->call_info = cinfo;
 
        if (!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG))
                sentinelpos = sig->sentinelpos + (sig->hasthis ? 1 : 0);
 
-       if (cinfo->need_stack_align) {
+       if (cinfo->need_stack_align && !cfg->arch.no_pushes) {
                MONO_INST_NEW (cfg, arg, OP_SUB_IMM);
                arg->dreg = X86_ESP;
                arg->sreg1 = X86_ESP;
@@ -1451,7 +1475,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
        /* Handle the case where there are no implicit arguments */
        if (!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG) && (n == sentinelpos)) {
                emit_sig_cookie (cfg, call, cinfo);
-               sp_offset += 4;
+               sp_offset = (cfg->arch.no_pushes) ? cinfo->sig_cookie.offset : (sp_offset + 4);
                emit_gc_param_slot_def (cfg, sp_offset, NULL);
        }
 
@@ -1462,13 +1486,23 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                int argsize;
 
                if (cinfo->vtype_retaddr && cinfo->vret_arg_index == 1 && i == 0) {
-                       /* Push the vret arg before the first argument */
                        MonoInst *vtarg;
-                       MONO_INST_NEW (cfg, vtarg, OP_X86_PUSH);
-                       vtarg->type = STACK_MP;
-                       vtarg->sreg1 = call->vret_var->dreg;
-                       MONO_ADD_INS (cfg->cbb, vtarg);
-                       sp_offset += 4;
+                       /* Push the vret arg before the first argument */
+                       if (cfg->arch.no_pushes) {
+                               MONO_INST_NEW (cfg, vtarg, OP_STORE_MEMBASE_REG);
+                               vtarg->type = STACK_MP;
+                               vtarg->inst_destbasereg = X86_ESP;
+                               vtarg->sreg1 = call->vret_var->dreg;
+                               vtarg->inst_offset = cinfo->ret.offset;
+                               MONO_ADD_INS (cfg->cbb, vtarg);
+                               sp_offset = cinfo->ret.offset;
+                       } else {
+                               MONO_INST_NEW (cfg, vtarg, OP_X86_PUSH);
+                               vtarg->type = STACK_MP;
+                               vtarg->sreg1 = call->vret_var->dreg;
+                               MONO_ADD_INS (cfg->cbb, vtarg);
+                               sp_offset += 4;
+                       }
                        emit_gc_param_slot_def (cfg, sp_offset, NULL);
                }
 
@@ -1521,48 +1555,70 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
 
                                MONO_ADD_INS (cfg->cbb, arg);
                                if (ainfo->storage != ArgValuetypeInReg) {
-                                       sp_offset += size;
+                                       sp_offset = (cfg->arch.no_pushes) ? ainfo->offset : (sp_offset + size);
                                        emit_gc_param_slot_def (cfg, sp_offset, orig_type);
                                }
                        }
                } else {
-                       argsize = 4;
-
                        switch (ainfo->storage) {
                        case ArgOnStack:
-                               arg->opcode = OP_X86_PUSH;
                                if (!t->byref) {
                                        if (t->type == MONO_TYPE_R4) {
-                                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SUB_IMM, X86_ESP, X86_ESP, 4);
-                                               arg->opcode = OP_STORER4_MEMBASE_REG;
-                                               arg->inst_destbasereg = X86_ESP;
-                                               arg->inst_offset = 0;
+                                               if (cfg->arch.no_pushes) {
+                                                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORER4_MEMBASE_REG, X86_ESP, ainfo->offset, in->dreg);
+                                               } else {
+                                                       MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SUB_IMM, X86_ESP, X86_ESP, 4);
+                                                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORER4_MEMBASE_REG, X86_ESP, 0, in->dreg);
+                                               }
                                                argsize = 4;
                                        } else if (t->type == MONO_TYPE_R8) {
-                                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SUB_IMM, X86_ESP, X86_ESP, 8);
-                                               arg->opcode = OP_STORER8_MEMBASE_REG;
-                                               arg->inst_destbasereg = X86_ESP;
-                                               arg->inst_offset = 0;
+                                               if (cfg->arch.no_pushes) {
+                                                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORER8_MEMBASE_REG, X86_ESP, ainfo->offset, in->dreg);
+                                               } else {
+                                                       MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SUB_IMM, X86_ESP, X86_ESP, 8);
+                                                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORER8_MEMBASE_REG, X86_ESP, 0, in->dreg);
+                                               }
                                                argsize = 8;
                                        } else if (t->type == MONO_TYPE_I8 || t->type == MONO_TYPE_U8) {
-                                               arg->sreg1 ++;
-                                               MONO_EMIT_NEW_UNALU (cfg, OP_X86_PUSH, -1, in->dreg + 2);
-                                               sp_offset += 4;
+                                               if (cfg->arch.no_pushes) {
+                                                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, ainfo->offset + 4, in->dreg + 2);
+                                                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, ainfo->offset, in->dreg + 1);
+                                               } else {
+                                                       MONO_EMIT_NEW_UNALU (cfg, OP_X86_PUSH, -1, in->dreg + 2);
+                                                       MONO_EMIT_NEW_UNALU (cfg, OP_X86_PUSH, -1, in->dreg + 1);
+                                                       sp_offset += 4;
+                                               }
+                                               argsize = 4;
+                                       } else {
+                                               if (cfg->arch.no_pushes) {
+                                                       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, ainfo->offset, in->dreg);
+                                               } else {
+                                                       arg->opcode = OP_X86_PUSH;
+                                                       MONO_ADD_INS (cfg->cbb, arg);
+                                               }
+                                               argsize = 4;
                                        }
+                               } else {
+                                       if (cfg->arch.no_pushes) {
+                                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, ainfo->offset, in->dreg);
+                                       } else {
+                                               arg->opcode = OP_X86_PUSH;
+                                               MONO_ADD_INS (cfg->cbb, arg);
+                                       }
+                                       argsize = 4;
                                }
                                break;
                        case ArgInIReg:
                                arg->opcode = OP_MOVE;
                                arg->dreg = ainfo->reg;
+                               MONO_ADD_INS (cfg->cbb, arg);
                                argsize = 0;
                                break;
                        default:
                                g_assert_not_reached ();
                        }
-                       
-                       MONO_ADD_INS (cfg->cbb, arg);
 
-                       sp_offset += argsize;
+                       sp_offset = (cfg->arch.no_pushes) ? ainfo->offset : (sp_offset + argsize);
 
                        if (cfg->compute_gc_maps) {
                                if (argsize == 4) {
@@ -1579,8 +1635,12 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                                        }
                                } else {
                                        /* i8/r8 */
-                                       for (j = 0; j < argsize; j += 4)
-                                               emit_gc_param_slot_def (cfg, sp_offset - j, NULL);
+                                       for (j = 0; j < argsize; j += 4) {
+                                               if (cfg->arch.no_pushes)
+                                                       emit_gc_param_slot_def (cfg, sp_offset + j, NULL);
+                                               else
+                                                       emit_gc_param_slot_def (cfg, sp_offset - j, NULL);
+                                       }
                                }
                        }
                }
@@ -1588,7 +1648,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                if (!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG) && (i == sentinelpos)) {
                        /* Emit the signature cookie just before the implicit arguments */
                        emit_sig_cookie (cfg, call, cinfo);
-                       sp_offset += 4;
+                       sp_offset = (cfg->arch.no_pushes) ? cinfo->sig_cookie.offset : (sp_offset + 4);
                        emit_gc_param_slot_def (cfg, sp_offset, NULL);
                }
        }
@@ -1609,23 +1669,29 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                                
                        mono_call_inst_add_outarg_reg (cfg, call, vtarg->dreg, cinfo->ret.reg, FALSE);
                } else if (cinfo->vtype_retaddr && cinfo->vret_arg_index == 0) {
-                       MonoInst *vtarg;
-                       MONO_INST_NEW (cfg, vtarg, OP_X86_PUSH);
-                       vtarg->type = STACK_MP;
-                       vtarg->sreg1 = call->vret_var->dreg;
-                       MONO_ADD_INS (cfg->cbb, vtarg);
-                       sp_offset += 4;
+                       if (cfg->arch.no_pushes) {
+                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, cinfo->ret.offset, call->vret_var->dreg);
+                               sp_offset = cinfo->ret.offset;
+                       } else {
+                               MonoInst *vtarg;
+                               MONO_INST_NEW (cfg, vtarg, OP_X86_PUSH);
+                               vtarg->type = STACK_MP;
+                               vtarg->sreg1 = call->vret_var->dreg;
+                               MONO_ADD_INS (cfg->cbb, vtarg);
+                               sp_offset += 4;
+                       }
                        emit_gc_param_slot_def (cfg, sp_offset, NULL);
                }
 
                /* if the function returns a struct on stack, the called method already does a ret $0x4 */
-               if (cinfo->ret.storage != ArgValuetypeInReg)
-                       cinfo->stack_usage -= 4;
+               if (!cfg->arch.no_pushes)
+                       cinfo->stack_usage -= cinfo->callee_stack_pop;
        }
 
        call->stack_usage = cinfo->stack_usage;
        call->stack_align_amount = cinfo->stack_align_amount;
-       cfg->arch.param_area_size = MAX (cfg->arch.param_area_size, sp_offset);
+       if (!cfg->arch.no_pushes)
+               cfg->arch.param_area_size = MAX (cfg->arch.param_area_size, sp_offset);
 }
 
 void
@@ -1657,24 +1723,42 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
        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);
+                       if (cfg->arch.no_pushes) {
+                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, ainfo->offset, src->dreg);
+                       } else {
+                               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);
+                       if (cfg->arch.no_pushes) {
+                               int dreg = mono_alloc_ireg (cfg);
+                               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, src->dreg, 0);
+                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, X86_ESP, ainfo->offset, dreg);
+                       } else {
+                               MONO_INST_NEW (cfg, arg, OP_X86_PUSH_MEMBASE);
+                               arg->sreg1 = src->dreg;
+                               MONO_ADD_INS (cfg->cbb, arg);
+                       }
+               } else if (size <= 20) {
+                       if (cfg->arch.no_pushes) {
+                               mini_emit_memcpy (cfg, X86_ESP, ainfo->offset, src->dreg, 0, size, 4);
+                       } else {
+                               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;
+                       if (cfg->arch.no_pushes) {
+                               // FIXME: Code growth
+                               mini_emit_memcpy (cfg, X86_ESP, ainfo->offset, 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);
+                       }
                }
        }
 }
@@ -2173,7 +2257,7 @@ emit_float_to_int (MonoCompile *cfg, guchar *code, int dreg, int size, gboolean
 }
 
 static unsigned char*
-mono_emit_stack_alloc (guchar *code, MonoInst* tree)
+mono_emit_stack_alloc (MonoCompile *cfg, guchar *code, MonoInst* tree)
 {
        int sreg = tree->sreg1;
        int need_touch = FALSE;
@@ -2217,7 +2301,10 @@ mono_emit_stack_alloc (guchar *code, MonoInst* tree)
                        x86_push_reg (code, X86_EDI);
                        x86_mov_reg_imm (code, X86_ECX, (0x1000 >> 2));
                        x86_alu_reg_reg (code, X86_XOR, X86_EAX, X86_EAX);                              
-                       x86_lea_membase (code, X86_EDI, X86_ESP, 12);
+                       if (cfg->param_area && cfg->arch.no_pushes)
+                               x86_lea_membase (code, X86_EDI, X86_ESP, 12 + ALIGN_TO (cfg->param_area, MONO_ARCH_FRAME_ALIGNMENT));
+                       else
+                               x86_lea_membase (code, X86_EDI, X86_ESP, 12);
                        x86_cld (code);
                        x86_prefix (code, X86_REP_PREFIX);
                        x86_stosl (code);
@@ -2264,7 +2351,10 @@ mono_emit_stack_alloc (guchar *code, MonoInst* tree)
                        x86_mov_reg_reg (code, X86_ECX, sreg, 4);
                x86_alu_reg_reg (code, X86_XOR, X86_EAX, X86_EAX);
                                
-               x86_lea_membase (code, X86_EDI, X86_ESP, offset);
+               if (cfg->param_area && cfg->arch.no_pushes)
+                       x86_lea_membase (code, X86_EDI, X86_ESP, offset + ALIGN_TO (cfg->param_area, MONO_ARCH_FRAME_ALIGNMENT));
+               else
+                       x86_lea_membase (code, X86_EDI, X86_ESP, offset);
                x86_cld (code);
                x86_prefix (code, X86_REP_PREFIX);
                x86_stosl (code);
@@ -2371,12 +2461,22 @@ mono_x86_emit_tls_get (guint8* code, int dreg, int tls_offset)
         * See the Under the Hood article in the May 1996 issue of Microsoft Systems 
         * Journal and/or a disassembly of the TlsGet () function.
         */
-       g_assert (tls_offset < 64);
        x86_prefix (code, X86_FS_PREFIX);
        x86_mov_reg_mem (code, dreg, 0x18, 4);
-       /* Dunno what this does but TlsGetValue () contains it */
-       x86_alu_membase_imm (code, X86_AND, dreg, 0x34, 0);
-       x86_mov_reg_membase (code, dreg, dreg, 3600 + (tls_offset * 4), 4);
+       if (tls_offset < 64) {
+               x86_mov_reg_membase (code, dreg, dreg, 3600 + (tls_offset * 4), 4);
+       } else {
+               guint8 *buf [16];
+
+               g_assert (tls_offset < 0x440);
+               /* Load TEB->TlsExpansionSlots */
+               x86_mov_reg_membase (code, dreg, dreg, 0xf94, 4);
+               x86_test_reg_reg (code, dreg, dreg);
+               buf [0] = code;
+               x86_branch (code, X86_CC_EQ, code, TRUE);
+               x86_mov_reg_membase (code, dreg, dreg, (tls_offset * 4) - 0x100, 4);
+               x86_patch (buf [0], code);
+       }
 #else
        if (optimize_for_xen) {
                x86_prefix (code, X86_GS_PREFIX);
@@ -2450,13 +2550,13 @@ static guint8*
 emit_setup_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, int cfa_offset)
 {
        /* save all caller saved regs */
-       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx), X86_EBX, sizeof (mgreg_t));
-       mono_emit_unwind_op_offset (cfg, code, X86_EBX, - cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx));
-       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi), X86_EDI, sizeof (mgreg_t));
-       mono_emit_unwind_op_offset (cfg, code, X86_EDI, - cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi));
-       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi), X86_ESI, sizeof (mgreg_t));
-       mono_emit_unwind_op_offset (cfg, code, X86_ESI, - cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi));
-       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebp), X86_EBP, sizeof (mgreg_t));
+       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebx), X86_EBX, sizeof (mgreg_t));
+       mono_emit_unwind_op_offset (cfg, code, X86_EBX, - cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebx));
+       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, edi), X86_EDI, sizeof (mgreg_t));
+       mono_emit_unwind_op_offset (cfg, code, X86_EDI, - cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, edi));
+       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esi), X86_ESI, sizeof (mgreg_t));
+       mono_emit_unwind_op_offset (cfg, code, X86_ESI, - cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esi));
+       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebp), X86_EBP, sizeof (mgreg_t));
 
        /* save the current IP */
        if (cfg->compile_aot) {
@@ -2467,17 +2567,17 @@ emit_setup_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, int cfa_offse
                mono_add_patch_info (cfg, code + 1 - cfg->native_code, MONO_PATCH_INFO_IP, NULL);
                x86_mov_reg_imm (code, X86_EAX, 0);
        }
-       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), X86_EAX, sizeof (mgreg_t));
-
-       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), SLOT_NOREF);
-       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebp), SLOT_NOREF);
-       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi), SLOT_NOREF);
-       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi), SLOT_NOREF);
-       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx), SLOT_NOREF);
-       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, esp), SLOT_NOREF);
-       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, method), SLOT_NOREF);
-       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), SLOT_NOREF);
-       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF);
+       x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, eip), X86_EAX, sizeof (mgreg_t));
+
+       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, eip), SLOT_NOREF);
+       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebp), SLOT_NOREF);
+       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esi), SLOT_NOREF);
+       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, edi), SLOT_NOREF);
+       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebx), SLOT_NOREF);
+       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esp), SLOT_NOREF);
+       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, method), SLOT_NOREF);
+       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, lmf_addr), SLOT_NOREF);
+       mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF);
 
        return code;
 }
@@ -3245,14 +3345,58 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_VCALL2:
                case OP_VOIDCALL:
                case OP_CALL:
+               case OP_FCALL_REG:
+               case OP_LCALL_REG:
+               case OP_VCALL_REG:
+               case OP_VCALL2_REG:
+               case OP_VOIDCALL_REG:
+               case OP_CALL_REG:
+               case OP_FCALL_MEMBASE:
+               case OP_LCALL_MEMBASE:
+               case OP_VCALL_MEMBASE:
+               case OP_VCALL2_MEMBASE:
+               case OP_VOIDCALL_MEMBASE:
+               case OP_CALL_MEMBASE: {
+                       CallInfo *cinfo;
+
                        call = (MonoCallInst*)ins;
-                       if (ins->flags & MONO_INST_HAS_METHOD)
-                               code = emit_call (cfg, code, MONO_PATCH_INFO_METHOD, call->method);
-                       else
-                               code = emit_call (cfg, code, MONO_PATCH_INFO_ABS, call->fptr);
+                       cinfo = (CallInfo*)call->call_info;
+
+                       switch (ins->opcode) {
+                       case OP_FCALL:
+                       case OP_LCALL:
+                       case OP_VCALL:
+                       case OP_VCALL2:
+                       case OP_VOIDCALL:
+                       case OP_CALL:
+                               if (ins->flags & MONO_INST_HAS_METHOD)
+                                       code = emit_call (cfg, code, MONO_PATCH_INFO_METHOD, call->method);
+                               else
+                                       code = emit_call (cfg, code, MONO_PATCH_INFO_ABS, call->fptr);
+                               break;
+                       case OP_FCALL_REG:
+                       case OP_LCALL_REG:
+                       case OP_VCALL_REG:
+                       case OP_VCALL2_REG:
+                       case OP_VOIDCALL_REG:
+                       case OP_CALL_REG:
+                               x86_call_reg (code, ins->sreg1);
+                               break;
+                       case OP_FCALL_MEMBASE:
+                       case OP_LCALL_MEMBASE:
+                       case OP_VCALL_MEMBASE:
+                       case OP_VCALL2_MEMBASE:
+                       case OP_VOIDCALL_MEMBASE:
+                       case OP_CALL_MEMBASE:
+                               x86_call_membase (code, ins->sreg1, ins->inst_offset);
+                               break;
+                       default:
+                               g_assert_not_reached ();
+                               break;
+                       }
                        ins->flags |= MONO_INST_GC_CALLSITE;
                        ins->backend.pc_offset = code - cfg->native_code;
-                       if (call->stack_usage && !CALLCONV_IS_STDCALL (call->signature)) {
+                       if (call->stack_usage && !CALLCONV_IS_STDCALL (call->signature) && !cfg->arch.no_pushes) {
                                /* a pop is one byte, while an add reg, imm is 3. So if there are 4 or 8
                                 * bytes to pop, we want to use pops. GCC does this (note it won't happen
                                 * for P4 or i686 because gcc will avoid using pop push at all. But we aren't
@@ -3273,56 +3417,27 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                } else {
                                        x86_alu_reg_imm (code, X86_ADD, X86_ESP, call->stack_usage);
                                }
+                       } else if (cinfo->callee_stack_pop && cfg->arch.no_pushes) {
+                               /* Have to compensate for the stack space popped by the callee */
+                               x86_alu_reg_imm (code, X86_SUB, X86_ESP, cinfo->callee_stack_pop);
                        }
                        code = emit_move_return_value (cfg, ins, code);
                        break;
-               case OP_FCALL_REG:
-               case OP_LCALL_REG:
-               case OP_VCALL_REG:
-               case OP_VCALL2_REG:
-               case OP_VOIDCALL_REG:
-               case OP_CALL_REG:
-                       call = (MonoCallInst*)ins;
-                       x86_call_reg (code, ins->sreg1);
-                       ins->flags |= MONO_INST_GC_CALLSITE;
-                       ins->backend.pc_offset = code - cfg->native_code;
-                       if (call->stack_usage && !CALLCONV_IS_STDCALL (call->signature)) {
-                               if (call->stack_usage == 4)
-                                       x86_pop_reg (code, X86_ECX);
-                               else
-                                       x86_alu_reg_imm (code, X86_ADD, X86_ESP, call->stack_usage);
-                       }
-                       code = emit_move_return_value (cfg, ins, code);
-                       break;
-               case OP_FCALL_MEMBASE:
-               case OP_LCALL_MEMBASE:
-               case OP_VCALL_MEMBASE:
-               case OP_VCALL2_MEMBASE:
-               case OP_VOIDCALL_MEMBASE:
-               case OP_CALL_MEMBASE:
-                       call = (MonoCallInst*)ins;
-
-                       x86_call_membase (code, ins->sreg1, ins->inst_offset);
-                       ins->flags |= MONO_INST_GC_CALLSITE;
-                       ins->backend.pc_offset = code - cfg->native_code;
-                       if (call->stack_usage && !CALLCONV_IS_STDCALL (call->signature)) {
-                               if (call->stack_usage == 4)
-                                       x86_pop_reg (code, X86_ECX);
-                               else
-                                       x86_alu_reg_imm (code, X86_ADD, X86_ESP, call->stack_usage);
-                       }
-                       code = emit_move_return_value (cfg, ins, code);
-                       break;
+               }
                case OP_X86_PUSH:
+                       g_assert (!cfg->arch.no_pushes);
                        x86_push_reg (code, ins->sreg1);
                        break;
                case OP_X86_PUSH_IMM:
+                       g_assert (!cfg->arch.no_pushes);
                        x86_push_imm (code, ins->inst_imm);
                        break;
                case OP_X86_PUSH_MEMBASE:
+                       g_assert (!cfg->arch.no_pushes);
                        x86_push_membase (code, ins->inst_basereg, ins->inst_offset);
                        break;
                case OP_X86_PUSH_OBJ: 
+                       g_assert (!cfg->arch.no_pushes);
                        x86_alu_reg_imm (code, X86_SUB, X86_ESP, ins->inst_imm);
                        x86_push_reg (code, X86_EDI);
                        x86_push_reg (code, X86_ESI);
@@ -3353,8 +3468,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        /* keep alignment */
                        x86_alu_reg_imm (code, X86_ADD, ins->sreg1, MONO_ARCH_LOCALLOC_ALIGNMENT - 1);
                        x86_alu_reg_imm (code, X86_AND, ins->sreg1, ~(MONO_ARCH_LOCALLOC_ALIGNMENT - 1));
-                       code = mono_emit_stack_alloc (code, ins);
+                       code = mono_emit_stack_alloc (cfg, code, ins);
                        x86_mov_reg_reg (code, ins->dreg, X86_ESP, 4);
+                        if (cfg->param_area && cfg->arch.no_pushes)
+                                x86_alu_reg_imm (code, X86_ADD, ins->dreg, ALIGN_TO (cfg->param_area, MONO_ARCH_FRAME_ALIGNMENT));
                        break;
                case OP_LOCALLOC_IMM: {
                        guint32 size = ins->inst_imm;
@@ -3365,12 +3482,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                x86_mov_reg_imm (code, ins->dreg, size);
                                ins->sreg1 = ins->dreg;
 
-                               code = mono_emit_stack_alloc (code, ins);
+                               code = mono_emit_stack_alloc (cfg, code, ins);
                                x86_mov_reg_reg (code, ins->dreg, X86_ESP, 4);
                        } else {
                                x86_alu_reg_imm (code, X86_SUB, X86_ESP, size);
                                x86_mov_reg_reg (code, ins->dreg, X86_ESP, 4);
                        }
+                        if (cfg->param_area && cfg->arch.no_pushes)
+                                x86_alu_reg_imm (code, X86_ADD, ins->dreg, ALIGN_TO (cfg->param_area, MONO_ARCH_FRAME_ALIGNMENT));
                        break;
                }
                case OP_THROW: {
@@ -3401,6 +3520,9 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_START_HANDLER: {
                        MonoInst *spvar = mono_find_spvar_for_region (cfg, bb->region);
                        x86_mov_membase_reg (code, spvar->inst_basereg, spvar->inst_offset, X86_ESP, 4);
+                       if (cfg->param_area && cfg->arch.no_pushes) {
+                               x86_alu_reg_imm (code, X86_SUB, X86_ESP, ALIGN_TO (cfg->param_area, MONO_ARCH_FRAME_ALIGNMENT));
+                       }
                        break;
                }
                case OP_ENDFINALLY: {
@@ -4261,28 +4383,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_ATOMIC_ADD_I4: {
                        int dreg = ins->dreg;
 
-                       if (dreg == ins->inst_basereg) {
-                               x86_push_reg (code, ins->sreg2);
-                               dreg = ins->sreg2;
-                       } 
-                       
-                       if (dreg != ins->sreg2)
-                               x86_mov_reg_reg (code, ins->dreg, ins->sreg2, 4);
-
-                       x86_prefix (code, X86_LOCK_PREFIX);
-                       x86_xadd_membase_reg (code, ins->inst_basereg, ins->inst_offset, dreg, 4);
-
-                       if (dreg != ins->dreg) {
-                               x86_mov_reg_reg (code, ins->dreg, dreg, 4);
-                               x86_pop_reg (code, dreg);
-                       }
-
-                       break;
-               }
-               case OP_ATOMIC_ADD_NEW_I4: {
-                       int dreg = ins->dreg;
-
-                       g_assert (cfg->has_atomic_add_new_i4);
+                       g_assert (cfg->has_atomic_add_i4);
 
                        /* hack: limit in regalloc, dreg != sreg1 && dreg != sreg2 */
                        if (ins->sreg2 == dreg) {
@@ -5246,6 +5347,11 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                cfg->frame_reg = X86_ESP;
        }
 
+       if (cfg->arch.no_pushes) {
+               cfg->stack_offset += cfg->param_area;
+               cfg->stack_offset = ALIGN_TO (cfg->stack_offset, MONO_ARCH_FRAME_ALIGNMENT);
+       }
+
        alloc_size = cfg->stack_offset;
        pos = 0;
 
@@ -5480,7 +5586,7 @@ mono_arch_emit_epilog (MonoCompile *cfg)
                        /* we load the value in a separate instruction: this mechanism may be
                         * used later as a safer way to do thread interruption
                         */
-                       x86_mov_reg_membase (code, X86_ECX, X86_ECX, G_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 4);
+                       x86_mov_reg_membase (code, X86_ECX, X86_ECX, MONO_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 4);
                        x86_alu_reg_imm (code, X86_CMP, X86_ECX, 0);
                        patch = code;
                        x86_branch8 (code, X86_CC_Z, 0, FALSE);
@@ -5493,14 +5599,14 @@ mono_arch_emit_epilog (MonoCompile *cfg)
 
                /* restore caller saved regs */
                if (cfg->used_int_regs & (1 << X86_EBX)) {
-                       x86_mov_reg_membase (code, X86_EBX, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx), 4);
+                       x86_mov_reg_membase (code, X86_EBX, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebx), 4);
                }
 
                if (cfg->used_int_regs & (1 << X86_EDI)) {
-                       x86_mov_reg_membase (code, X86_EDI, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi), 4);
+                       x86_mov_reg_membase (code, X86_EDI, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, edi), 4);
                }
                if (cfg->used_int_regs & (1 << X86_ESI)) {
-                       x86_mov_reg_membase (code, X86_ESI, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi), 4);
+                       x86_mov_reg_membase (code, X86_ESI, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esi), 4);
                }
 
                /* EBP is restored by LEAVE */
@@ -5561,8 +5667,8 @@ mono_arch_emit_epilog (MonoCompile *cfg)
                MonoJitArgumentInfo *arg_info = alloca (sizeof (MonoJitArgumentInfo) * (sig->param_count + 1));
 
                stack_to_pop = mono_arch_get_argument_info (NULL, sig, sig->param_count, arg_info);
-       } else if (cinfo->vtype_retaddr)
-               stack_to_pop = 4;
+       } else if (cinfo->callee_stack_pop)
+               stack_to_pop = cinfo->callee_stack_pop;
        else
                stack_to_pop = 0;
 
@@ -5724,8 +5830,6 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
 {
 }
 
-#ifdef MONO_ARCH_HAVE_IMT
-
 // Linear handler, the bsearch head compare is shorter
 //[2 + 4] x86_alu_reg_imm (code, X86_CMP, ins->sreg1, ins->inst_imm);
 //[1 + 1] x86_branch8(inst,cond,imm,is_signed)
@@ -5894,7 +5998,6 @@ mono_arch_find_imt_method (mgreg_t *regs, guint8 *code)
 {
        return (MonoMethod*) regs [MONO_ARCH_IMT_REG];
 }
-#endif
 
 MonoVTable*
 mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code)
@@ -6087,10 +6190,8 @@ mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
         * The stack looks like:
         * <other args>
         * <this=delegate>
-        * <return addr>
-        * <4 pointers pushed by mono_arch_create_trampoline_code ()>
         */
-       res = (((MonoObject**)esp) [5 + (offset / 4)]);
+       res = ((MonoObject**)esp) [0];
        if (cinfo)
                g_free (cinfo);
        return res;
@@ -6115,9 +6216,9 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
 
                /* Replace the this argument with the target */
                x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
-               x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoDelegate, target), 4);
+               x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 4);
                x86_mov_membase_reg (code, X86_ESP, 4, X86_ECX, 4);
-               x86_jump_membase (code, X86_EAX, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+               x86_jump_membase (code, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
 
                g_assert ((code - start) < code_reserve);
        } else {
@@ -6156,7 +6257,7 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
                        x86_mov_membase_reg (code, X86_ESP, (i+1)*4, X86_EAX, 4);
                }
 
-               x86_jump_membase (code, X86_ECX, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+               x86_jump_membase (code, X86_ECX, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
 
                g_assert ((code - start) < code_reserve);
        }
@@ -6733,6 +6834,19 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
 
 #endif
 
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+       switch (opcode) {
+       case OP_ATOMIC_ADD_I4:
+       case OP_ATOMIC_EXCHANGE_I4:
+       case OP_ATOMIC_CAS_I4:
+               return TRUE;
+       default:
+               return FALSE;
+       }
+}
+
 #if defined(ENABLE_GSHAREDVT)
 
 #include "../../../mono-extensions/mono/mini/mini-x86-gsharedvt.c"
index 995686bf94b2e2ab66ddd48839454153ed463601..05b977c547add58e58e20f6001998a6c6c4f24ba 100644 (file)
@@ -48,7 +48,7 @@ struct sigcontext {
 #endif /* __HAIKU__ */
 
 #if defined( __linux__) || defined(__sun) || defined(__APPLE__) || defined(__NetBSD__) || \
-       defined(__FreeBSD__) || defined(__OpenBSD__)
+       defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
 #define MONO_ARCH_USE_SIGACTION
 #endif
 
@@ -74,6 +74,8 @@ struct sigcontext {
 #endif /* HAVE_WORKING_SIGALTSTACK */
 #endif /* !HOST_WIN32 */
 
+/* #define MONO_X86_NO_PUSHES 1 */
+
 #define MONO_ARCH_SUPPORT_TASKLETS 1
 
 #ifndef DISABLE_SIMD
@@ -167,6 +169,7 @@ struct MonoLMF {
 typedef struct {
        gboolean need_stack_frame_inited;
        gboolean need_stack_frame;
+       gboolean no_pushes;
        int sp_fp_offset, param_area_size;
 } MonoCompileArch;
 
@@ -206,12 +209,11 @@ typedef struct {
 #define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1
 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
 #define MONO_ARCH_NEED_GOT_VAR 1
+#ifndef HOST_WIN32
+/* X86 uses jit_tls->lmf (See emit_push_lmf ()) */
 #define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
+#endif
 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
-#define MONO_ARCH_HAVE_ATOMIC_CAS 1
-#define MONO_ARCH_HAVE_IMT 1
 #define MONO_ARCH_HAVE_TLS_GET (mono_x86_have_tls_get ())
 #define MONO_ARCH_IMT_REG X86_EDX
 #define MONO_ARCH_VTABLE_REG X86_EDX
index 035f975c9f80430359e947c8c006f77b01df0f1f..dd31c02d7a6db4954b9a979ebde01717f648748a 100644 (file)
@@ -88,15 +88,15 @@ MonoNativeTlsKey mono_jit_tls_id;
 MONO_FAST_TLS_DECLARE(mono_jit_tls);
 #endif
 
-MonoTraceSpec *mono_jit_trace_calls = NULL;
+MonoTraceSpec *mono_jit_trace_calls;
 gboolean mono_compile_aot = FALSE;
 /* If this is set, no code is generated dynamically, everything is taken from AOT files */
 gboolean mono_aot_only = FALSE;
 /* Whenever to use IMT */
-gboolean mono_use_imt = ARCH_HAVE_IMT;
-MonoMethodDesc *mono_inject_async_exc_method = NULL;
+gboolean mono_use_imt = TRUE;
+MonoMethodDesc *mono_inject_async_exc_method;
 int mono_inject_async_exc_pos;
-MonoMethodDesc *mono_break_at_bb_method = NULL;
+MonoMethodDesc *mono_break_at_bb_method;
 int mono_break_at_bb_bb_num;
 gboolean mono_do_x86_stack_align = TRUE;
 const char *mono_build_date;
@@ -115,9 +115,9 @@ gboolean mono_use_llvm = FALSE;
 #define mono_jit_unlock() LeaveCriticalSection (&jit_mutex)
 static CRITICAL_SECTION jit_mutex;
 
-static MonoCodeManager *global_codeman = NULL;
+static MonoCodeManager *global_codeman;
 
-static GHashTable *jit_icall_name_hash = NULL;
+static GHashTable *jit_icall_name_hash;
 
 static MonoDebugOptions debug_options;
 
@@ -141,6 +141,8 @@ gboolean disable_vtypes_in_regs = FALSE;
 
 static GSList *tramp_infos;
 
+static void register_icalls (void);
+
 gpointer
 mono_realloc_native_code (MonoCompile *cfg)
 {
@@ -1135,6 +1137,8 @@ mono_op_imm_to_op (int opcode)
                return OP_IREM_UN;
        case OP_IREM_IMM:
                return OP_IREM;
+       case OP_LREM_IMM:
+               return OP_LREM;
        case OP_DIV_IMM:
 #if SIZEOF_REGISTER == 4
                return OP_IDIV;
@@ -1524,7 +1528,7 @@ mono_create_jump_table (MonoCompile *cfg, MonoInst *label, MonoBasicBlock **bbs,
 static MonoMethodSignature *
 mono_get_array_new_va_signature (int arity)
 {
-       static GHashTable *sighash = NULL;
+       static GHashTable *sighash;
        MonoMethodSignature *res;
        int i;
 
@@ -2360,8 +2364,8 @@ mono_allocate_stack_slots (MonoCompile *cfg, gboolean backward, guint32 *stack_s
 static mono_byte emul_opcode_hit_cache [(OP_LAST>>EMUL_HIT_SHIFT) + 1] = {0};
 static short emul_opcode_num = 0;
 static short emul_opcode_alloced = 0;
-static short *emul_opcode_opcodes = NULL;
-static MonoJitICallInfo **emul_opcode_map = NULL;
+static short *emul_opcode_opcodes;
+static MonoJitICallInfo **emul_opcode_map;
 
 MonoJitICallInfo *
 mono_find_jit_opcode_emulation (int opcode)
@@ -2950,9 +2954,6 @@ mini_get_tls_offset (MonoTlsKey key)
        case TLS_KEY_JIT_TLS:
 #ifdef HOST_WIN32
                offset = mono_get_jit_tls_key ();
-               /* Only 64 tls entries can be accessed using inline code */
-               if (offset >= 64)
-                       offset = -1;
 #else
                offset = mono_get_jit_tls_offset ();
 #endif
@@ -3062,6 +3063,16 @@ mono_get_lmf_addr_intrinsic (MonoCompile* cfg)
 
 #endif /* !DISABLE_JIT */
 
+
+static gboolean
+mini_tls_key_supported (MonoTlsKey key)
+{
+       if (!MONO_ARCH_HAVE_TLS_GET)
+               return FALSE;
+
+       return mini_get_tls_offset (key) != -1;
+}
+
 void
 mono_add_patch_info (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target)
 {
@@ -3467,7 +3478,7 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code,
        case MONO_PATCH_INFO_DELEGATE_TRAMPOLINE: {
                MonoClassMethodPair *del_tramp = patch_info->data.del_tramp;
 
-               target = mono_create_delegate_trampoline_with_method (domain, del_tramp->klass, del_tramp->method);
+               target = mono_create_delegate_trampoline_info (domain, del_tramp->klass, del_tramp->method);
                break;
        }
        case MONO_PATCH_INFO_SFLDA: {
@@ -4297,7 +4308,7 @@ create_jit_info_for_trampoline (MonoMethod *wrapper, MonoTrampInfo *info)
        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);
+       jinfo->unwind_info = mono_cache_unwind_info (uw_info, info_len);
 
        if (!info->uw_info)
                g_free (uw_info);
@@ -4380,7 +4391,6 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile)
        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;
        jinfo->domain_neutral = (cfg->opt & MONO_OPT_SHARED) != 0;
        jinfo->num_clauses = num_clauses;
 
@@ -4626,19 +4636,31 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile)
                }
        }
 
-       /* 
-        * Its possible to generate dwarf unwind info for xdebug etc, but not actually
-        * using it during runtime, hence the define.
-        */
        if (cfg->encoded_unwind_ops) {
-               jinfo->used_regs = mono_cache_unwind_info (cfg->encoded_unwind_ops, cfg->encoded_unwind_ops_len);
+               /* Generated by LLVM */
+               jinfo->unwind_info = mono_cache_unwind_info (cfg->encoded_unwind_ops, cfg->encoded_unwind_ops_len);
                g_free (cfg->encoded_unwind_ops);
        } else if (cfg->unwind_ops) {
                guint32 info_len;
                guint8 *unwind_info = mono_unwind_ops_encode (cfg->unwind_ops, &info_len);
+               guint32 unwind_desc;
 
-               jinfo->used_regs = mono_cache_unwind_info (unwind_info, info_len);
+               unwind_desc = mono_cache_unwind_info (unwind_info, info_len);
+
+               if (cfg->has_unwind_info_for_epilog) {
+                       /*
+                        * The lower 16 bits identify the unwind descriptor, the upper 16 bits contain the offset of
+                        * the start of the epilog from the end of the method.
+                        */
+                       g_assert (unwind_desc < 0xffff);
+                       g_assert (cfg->code_size - cfg->epilog_begin < 0xffff);
+                       jinfo->unwind_info = ((cfg->code_size - cfg->epilog_begin) << 16) | unwind_desc;
+               } else {
+                       jinfo->unwind_info = unwind_desc;
+               }
                g_free (unwind_info);
+       } else {
+               jinfo->unwind_info = cfg->used_int_regs;
        }
 
        return jinfo;
@@ -4901,7 +4923,9 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
        guint8 *ip;
        MonoCompile *cfg;
        int dfn, i, code_size_ratio;
+#ifndef DISABLE_SSA
        gboolean deadce_has_run = FALSE;
+#endif
        gboolean try_generic_shared, try_llvm = FALSE;
        MonoMethod *method_to_compile, *method_to_register;
        gboolean method_is_gshared = FALSE;
@@ -5816,7 +5840,7 @@ lookup_method (MonoDomain *domain, MonoMethod *method)
 }
 
 #if ENABLE_JIT_MAP
-static FILE* perf_map_file = NULL;
+static FILE* perf_map_file;
 
 void
 mono_enable_jit_map (void)
@@ -6361,7 +6385,7 @@ mono_jit_free_method (MonoDomain *domain, MonoMethod *method)
        g_hash_table_remove (domain_jit_info (domain)->dynamic_code_hash, method);
        mono_internal_hash_table_remove (&domain->jit_code_hash, method);
        g_hash_table_remove (domain_jit_info (domain)->jump_trampoline_hash, method);
-       g_hash_table_remove (domain_jit_info (domain)->runtime_invoke_hash, method);
+       mono_conc_hashtable_remove (domain_jit_info (domain)->runtime_invoke_hash, method);
 
        /* Remove jump targets in this method */
        g_hash_table_iter_init (&iter, domain_jit_info (domain)->jump_target_hash);
@@ -6439,9 +6463,9 @@ mono_jit_find_compiled_method_with_jit_info (MonoDomain *domain, MonoMethod *met
 
 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;
+MonoMethod *mono_current_single_method;
+GSList *mono_single_method_list;
+GHashTable *mono_single_method_hash;
 
 guint32
 mono_get_optimizations_for_method (MonoMethod *method, guint32 default_opt)
@@ -6502,9 +6526,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
 
        domain_info = domain_jit_info (domain);
 
-       mono_domain_lock (domain);
-       info = g_hash_table_lookup (domain_info->runtime_invoke_hash, method);
-       mono_domain_unlock (domain);            
+       info = mono_conc_hashtable_lookup (domain_info->runtime_invoke_hash, method);
 
        if (!info) {
                if (mono_security_core_clr_enabled ()) {
@@ -6645,15 +6667,11 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
                if (!info->dyn_call_info)
                        info->runtime_invoke = mono_jit_compile_method (invoke);
 
-               mono_domain_lock (domain);
-               info2 = g_hash_table_lookup (domain_info->runtime_invoke_hash, method);
+               info2 = mono_conc_hashtable_insert (domain_info->runtime_invoke_hash, method, info);
                if (info2) {
                        g_free (info);
                        info = info2;
-               } else {
-                       g_hash_table_insert (domain_info->runtime_invoke_hash, method, info);
                }
-               mono_domain_unlock (domain);
        }
 
        runtime_invoke = info->runtime_invoke;
@@ -7103,7 +7121,12 @@ mini_create_jit_domain_info (MonoDomain *domain)
        info->jit_trampoline_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
        info->delegate_trampoline_hash = g_hash_table_new (class_method_pair_hash, class_method_pair_equal);
        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);
+#ifdef HOST_WIN32
+       // FIXME:
+       info->runtime_invoke_hash = mono_conc_hashtable_new_full (&domain->lock, mono_aligned_addr_hash, NULL, NULL, runtime_invoke_info_free);
+#else
+       info->runtime_invoke_hash = mono_conc_hashtable_new_full (&domain->lock.mutex, mono_aligned_addr_hash, NULL, NULL, runtime_invoke_info_free);
+#endif
        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);
@@ -7182,7 +7205,7 @@ mini_free_jit_domain_info (MonoDomain *domain)
        if (info->static_rgctx_trampoline_hash)
                g_hash_table_destroy (info->static_rgctx_trampoline_hash);
        g_hash_table_destroy (info->llvm_vcall_trampoline_hash);
-       g_hash_table_destroy (info->runtime_invoke_hash);
+       mono_conc_hashtable_destroy (info->runtime_invoke_hash);
        g_hash_table_destroy (info->seq_points);
        g_hash_table_destroy (info->arch_seq_points);
        if (info->agent_info)
@@ -7215,6 +7238,8 @@ mini_init (const char *filename, const char *runtime_version)
 
        InitializeCriticalSection (&jit_mutex);
 
+       mono_cross_helpers_run ();
+
        /* Happens when using the embedding interface */
        if (!default_opt_set)
                default_opt = mono_parse_default_optimizations (NULL);
@@ -7236,7 +7261,6 @@ mini_init (const char *filename, const char *runtime_version)
 
        if (!global_codeman)
                global_codeman = mono_code_manager_new ();
-       jit_icall_name_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
 
        memset (&callbacks, 0, sizeof (callbacks));
        callbacks.create_ftnptr = mini_create_ftnptr;
@@ -7245,13 +7269,12 @@ mini_init (const char *filename, const char *runtime_version)
        callbacks.set_cast_details = mono_set_cast_details;
        callbacks.debug_log = mono_debugger_agent_debug_log;
        callbacks.debug_log_is_enabled = mono_debugger_agent_debug_log_is_enabled;
+       callbacks.tls_key_supported = mini_tls_key_supported;
 
-#ifdef MONO_ARCH_HAVE_IMT
        if (mono_use_imt) {
                callbacks.get_vtable_trampoline = mini_get_vtable_trampoline;
                callbacks.get_imt_trampoline = mini_get_imt_trampoline;
        }
-#endif
 
        mono_install_callbacks (&callbacks);
 
@@ -7262,7 +7285,6 @@ mini_init (const char *filename, const char *runtime_version)
 
        mono_threads_runtime_init (&ticallbacks);
 
-
        if (g_getenv ("MONO_DEBUG") != NULL)
                mini_parse_debug_options ();
 
@@ -7301,9 +7323,6 @@ mini_init (const char *filename, const char *runtime_version)
 
        mono_trampolines_init ();
 
-       if (!g_thread_supported ())
-               g_thread_init (NULL);
-
        mono_native_tls_alloc (&mono_jit_tls_id, NULL);
 
        if (default_opt & MONO_OPT_AOT)
@@ -7351,9 +7370,8 @@ mini_init (const char *filename, const char *runtime_version)
        mono_install_get_class_from_name (mono_aot_get_class_from_name);
        mono_install_jit_info_find_in_aot (mono_aot_find_jit_info);
 
-       if (debug_options.collect_pagefault_stats) {
+       if (debug_options.collect_pagefault_stats)
                mono_aot_set_make_unreadable (TRUE);
-       }
 
        if (runtime_version)
                domain = mono_init_version (filename, runtime_version);
@@ -7366,14 +7384,12 @@ mini_init (const char *filename, const char *runtime_version)
                mono_marshal_use_aot_wrappers (TRUE);
        }
 
-#ifdef MONO_ARCH_HAVE_IMT
        if (mono_use_imt) {
                if (mono_aot_only)
                        mono_install_imt_thunk_builder (mono_aot_get_imt_thunk);
                else
                        mono_install_imt_thunk_builder (mono_arch_build_imt_thunk);
        }
-#endif
 
        /*Init arch tls information only after the metadata side is inited to make sure we see dynamic appdomain tls keys*/
        mono_arch_finish_init ();
@@ -7386,6 +7402,58 @@ mini_init (const char *filename, const char *runtime_version)
        /* This should come after mono_init () too */
        mini_gc_init ();
 
+#ifndef DISABLE_JIT
+       mono_create_helper_signatures ();
+#endif
+
+       register_jit_stats ();
+
+#define JIT_CALLS_WORK
+#ifdef JIT_CALLS_WORK
+       /* Needs to be called here since register_jit_icall depends on it */
+       mono_marshal_init ();
+
+       jit_icall_name_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+
+       mono_arch_register_lowlevel_calls ();
+
+       register_icalls ();
+
+       mono_generic_sharing_init ();
+#endif
+
+#ifdef MONO_ARCH_SIMD_INTRINSICS
+       mono_simd_intrinsics_init ();
+#endif
+
+#if MONO_SUPPORT_TASKLETS
+       mono_tasklets_init ();
+#endif
+
+       if (mono_compile_aot)
+               /*
+                * Avoid running managed code when AOT compiling, since the platform
+                * might only support aot-only execution.
+                */
+               mono_runtime_set_no_exec (TRUE);
+
+#define JIT_RUNTIME_WORKS
+#ifdef JIT_RUNTIME_WORKS
+       mono_install_runtime_cleanup ((MonoDomainFunc)mini_cleanup);
+       mono_runtime_init (domain, mono_thread_start_cb, mono_thread_attach_cb);
+       mono_thread_attach (domain);
+#endif
+
+       mono_profiler_runtime_initialized ();
+
+       MONO_VES_INIT_END ();
+
+       return domain;
+}
+
+static void
+register_icalls (void)
+{
        mono_add_internal_call ("System.Diagnostics.StackFrame::get_frame_info", 
                                ves_icall_get_frame_info);
        mono_add_internal_call ("System.Diagnostics.StackTrace::get_trace", 
@@ -7404,19 +7472,6 @@ mini_init (const char *filename, const char *runtime_version)
                                mono_debugger_agent_unhandled_exception);
 #endif
 
-#ifndef DISABLE_JIT
-       mono_create_helper_signatures ();
-#endif
-
-       register_jit_stats ();
-
-#define JIT_CALLS_WORK
-#ifdef JIT_CALLS_WORK
-       /* Needs to be called here since register_jit_icall depends on it */
-       mono_marshal_init ();
-
-       mono_arch_register_lowlevel_calls ();
-
        /*
         * It's important that we pass `TRUE` as the last argument here, as
         * it causes the JIT to omit a wrapper for these icalls. If the JIT
@@ -7617,41 +7672,10 @@ mini_init (const char *filename, const char *runtime_version)
        register_icall (mono_object_isinst_with_cache, "mono_object_isinst_with_cache", "object object ptr ptr", FALSE);
 
        register_icall (mono_debugger_agent_user_break, "mono_debugger_agent_user_break", "void", FALSE);
-#endif
 
 #ifdef TARGET_IOS
        register_icall (pthread_getspecific, "pthread_getspecific", "ptr ptr", TRUE);
 #endif
-
-       mono_generic_sharing_init ();
-
-#ifdef MONO_ARCH_SIMD_INTRINSICS
-       mono_simd_intrinsics_init ();
-#endif
-
-#if MONO_SUPPORT_TASKLETS
-       mono_tasklets_init ();
-#endif
-
-       if (mono_compile_aot)
-               /* 
-                * Avoid running managed code when AOT compiling, since the platform
-                * might only support aot-only execution.
-                */
-               mono_runtime_set_no_exec (TRUE);
-
-#define JIT_RUNTIME_WORKS
-#ifdef JIT_RUNTIME_WORKS
-       mono_install_runtime_cleanup ((MonoDomainFunc)mini_cleanup);
-       mono_runtime_init (domain, mono_thread_start_cb, mono_thread_attach_cb);
-       mono_thread_attach (domain);
-#endif
-
-       mono_profiler_runtime_initialized ();
-
-       MONO_VES_INIT_END ();
-       
-       return domain;
 }
 
 MonoJitStats mono_jit_stats = {0};
@@ -7955,16 +7979,6 @@ mono_arch_get_gsharedvt_trampoline (MonoTrampInfo **info, gboolean aot)
 
 #endif
 
-#ifndef MONO_ARCH_HAVE_OPCODE_SUPPORTED
-
-gboolean
-mono_arch_opcode_supported (int opcode)
-{
-       return TRUE;
-}
-
-#endif
-
 #if defined(MONO_ARCH_GSHAREDVT_SUPPORTED) && !defined(ENABLE_GSHAREDVT)
 
 gboolean
@@ -7992,7 +8006,7 @@ typedef struct MonoJumpTableChunk {
        /* gpointer entries[total]; */
 } MonoJumpTableChunk;
 
-static MonoJumpTableChunk* g_jumptable = NULL;
+static MonoJumpTableChunk* g_jumptable;
 #define mono_jumptable_lock() EnterCriticalSection (&jumptable_mutex)
 #define mono_jumptable_unlock() LeaveCriticalSection (&jumptable_mutex)
 static CRITICAL_SECTION jumptable_mutex;
index 702daa6b813a5e0485b984bc780da12894b300d4..a15cbfa5e72262754a5f4614d473a1b886e61c12 100644 (file)
@@ -30,6 +30,7 @@
 #include <mono/utils/mono-threads.h>
 #include <mono/utils/mono-tls.h>
 #include <mono/utils/atomic.h>
+#include <mono/utils/mono-conc-hashtable.h>
 
 #define MONO_BREAKPOINT_ARRAY_SIZE 64
 
 #define printf g_print
 #endif
 
+#if !defined(HAVE_KW_THREAD) || !defined(MONO_ARCH_ENABLE_MONO_LMF_VAR)
+#define MONO_JIT_TLS_DATA_HAS_LMF
+#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 */
@@ -295,15 +300,15 @@ typedef struct
        GHashTable *class_init_trampoline_hash;
        GHashTable *jump_trampoline_hash;
        GHashTable *jit_trampoline_hash;
-       /* Maps ClassMethodPair -> DelegateTrampInfo */
        GHashTable *delegate_trampoline_hash;
+       /* Maps ClassMethodPair -> MonoDelegateTrampInfo */
        GHashTable *static_rgctx_trampoline_hash;
        GHashTable *llvm_vcall_trampoline_hash;
        /* maps MonoMethod -> MonoJitDynamicMethodInfo */
        GHashTable *dynamic_code_hash;
        GHashTable *method_code_hash;
        /* Maps methods to a RuntimeInvokeInfo structure */
-       GHashTable *runtime_invoke_hash;
+       MonoConcurrentHashTable *runtime_invoke_hash;
        /* Maps MonoMethod to a GPtrArray containing sequence point locations */
        GHashTable *seq_points;
        /* Debugger agent data */
@@ -1025,9 +1030,8 @@ typedef struct {
 typedef struct {
        gpointer          end_of_stack;
        guint32           stack_size;
-#if !defined(HAVE_KW_THREAD) || !defined(MONO_ARCH_ENABLE_MONO_LMF_VAR)
+       /* !defined(HAVE_KW_THREAD) || !defined(MONO_ARCH_ENABLE_MONO_LMF_VAR) */
        MonoLMF          *lmf;
-#endif
        MonoLMF          *first_lmf;
        gpointer         restore_stack_prot;
        guint32          handling_stack_ovf;
@@ -1060,6 +1064,11 @@ typedef struct {
         */
        MonoContext orig_ex_ctx;
        gboolean orig_ex_ctx_set;
+
+       /* 
+        * Stores if we need to run a chained exception in Windows.
+        */
+       gboolean mono_win_chained_exception_needs_run;
 } MonoJitTlsData;
 
 /*
@@ -1155,6 +1164,19 @@ typedef struct {
        gpointer entries [MONO_ZERO_LEN_ARRAY];
 } MonoGSharedVtMethodRuntimeInfo;
 
+typedef struct
+{
+       MonoMethod *invoke;
+       MonoMethod *method;
+       MonoMethodSignature *invoke_sig;
+       MonoMethodSignature *sig;
+       gpointer method_ptr;
+       gpointer invoke_impl;
+       gpointer impl_this;
+       gpointer impl_nothis;
+       gboolean need_rgctx_tramp;
+} MonoDelegateTrampInfo;
+
 typedef enum {
 #define PATCH_INFO(a,b) MONO_PATCH_INFO_ ## a,
 #include "patch-info.h"
@@ -1261,6 +1283,7 @@ typedef enum {
        MONO_TRAMPOLINE_NUM
 } MonoTrampolineType;
 
+/* These trampolines return normally to their caller */
 #define MONO_TRAMPOLINE_TYPE_MUST_RETURN(t)            \
        ((t) == MONO_TRAMPOLINE_CLASS_INIT ||           \
         (t) == MONO_TRAMPOLINE_GENERIC_CLASS_INIT ||   \
@@ -1486,10 +1509,11 @@ typedef struct {
        guint            soft_breakpoints : 1;
        guint            arch_eh_jit_info : 1;
        guint            has_indirection : 1;
-       guint            has_atomic_add_new_i4 : 1;
+       guint            has_atomic_add_i4 : 1;
        guint            has_atomic_exchange_i4 : 1;
        guint            has_atomic_cas_i4 : 1;
        guint            check_pinvoke_callconv : 1;
+       guint            has_unwind_info_for_epilog : 1;
        gpointer         debug_info;
        guint32          lmf_offset;
     guint16          *intvars;
@@ -2197,7 +2221,7 @@ gpointer          mono_create_jit_trampoline (MonoMethod *method) MONO_INTERNAL;
 gpointer          mono_create_jit_trampoline_from_token (MonoImage *image, guint32 token) MONO_INTERNAL;
 gpointer          mono_create_jit_trampoline_in_domain (MonoDomain *domain, MonoMethod *method) MONO_LLVM_INTERNAL;
 gpointer          mono_create_delegate_trampoline (MonoDomain *domain, MonoClass *klass) MONO_INTERNAL;
-gpointer          mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klass, MonoMethod *method) MONO_INTERNAL;
+MonoDelegateTrampInfo* mono_create_delegate_trampoline_info (MonoDomain *domain, MonoClass *klass, MonoMethod *method) MONO_INTERNAL;
 gpointer          mono_create_rgctx_lazy_fetch_trampoline (guint32 offset) MONO_INTERNAL;
 gpointer          mono_create_monitor_enter_trampoline (void) MONO_INTERNAL;
 gpointer          mono_create_monitor_exit_trampoline (void) MONO_INTERNAL;
@@ -2656,7 +2680,7 @@ void mono_generic_sharing_cleanup (void) MONO_INTERNAL;
 MonoClass* mini_class_get_container_class (MonoClass *class) MONO_INTERNAL;
 MonoGenericContext* mini_class_get_context (MonoClass *class) MONO_INTERNAL;
 
-MonoType* mini_replace_type (MonoType *type) MONO_INTERNAL;
+MonoType* mini_replace_type (MonoType *type) MONO_LLVM_INTERNAL;
 MonoType* mini_get_basic_type_from_generic (MonoGenericSharingContext *gsctx, MonoType *type) MONO_INTERNAL;
 MonoType* mini_type_get_underlying_type (MonoGenericSharingContext *gsctx, MonoType *type) MONO_INTERNAL;
 MonoMethod* mini_get_shared_method (MonoMethod *method) MONO_INTERNAL;
@@ -2774,6 +2798,8 @@ void mono_runtime_posix_install_handlers (void) MONO_INTERNAL;
 pid_t mono_runtime_syscall_fork (void) MONO_INTERNAL;
 void mono_gdb_render_native_backtraces (pid_t crashed_pid) MONO_INTERNAL;
 
+void mono_cross_helpers_run (void) MONO_INTERNAL;
+
 /*
  * Signal handling
  */
@@ -2800,7 +2826,7 @@ void mono_gdb_render_native_backtraces (pid_t crashed_pid) MONO_INTERNAL;
 #endif
 #endif
 
-#ifdef MONO_ARCH_USE_SIGACTION
+#if defined(MONO_ARCH_USE_SIGACTION) && !defined(HOST_WIN32)
 #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
@@ -2860,12 +2886,6 @@ gboolean SIG_HANDLER_SIGNATURE (mono_chain_signal) MONO_INTERNAL;
 #define MONO_ARCH_DYN_CALL_PARAM_AREA 0
 #endif
 
-#ifdef MONO_ARCH_HAVE_IMT
-#define ARCH_HAVE_IMT 1
-#else
-#define ARCH_HAVE_IMT 0
-#endif
-
 #ifdef MONO_ARCH_VARARG_ICALLS
 #define ARCH_VARARG_ICALLS 1
 #else
index 40c79e6280f38c5376fc57c0958b8ee60721e0d2..0e8ea1a4d7b4d2adc725597559b547ad8c2d5a78 100644 (file)
@@ -1625,6 +1625,20 @@ ncells ) {
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        static void t_14217_inner (BugStruct bug) {
     }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct EmptyStruct {
+       }
+
+       class EmptyClass {
+               public static EmptyStruct s;
+       }
+
+       // #20349
+       static int test_0_empty_struct_as_static () {
+               var s = EmptyClass.s;
+               return 0;
+       }
 }
 
 #if MOBILE
index ff737bbe9347a7b0f5d2fce3e44832386bd9c356..2fb8f0709a9efbbdb682c7e2db1af750fb40b1bd 100644 (file)
@@ -13,6 +13,7 @@
 #include "mini.h"
 #include "ir-emit.h"
 #include "mono/utils/bsearch.h"
+#include <mono/metadata/abi-details.h>
 
 /*
 General notes on SIMD intrinsics
@@ -1569,7 +1570,7 @@ mono_emit_vector_ldelema (MonoCompile *cfg, MonoType *array_type, MonoInst *arr,
 
        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_MUL_IMM, mult_reg, index2_reg, size);
        MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, array_reg, mult_reg);
-       NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, G_STRUCT_OFFSET (MonoArray, vector));
+       NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, MONO_STRUCT_OFFSET (MonoArray, vector));
        ins->type = STACK_PTR;
        MONO_ADD_INS (cfg->cbb, ins);
 
index 023d2778009bebb9a1002239cba36ec82a2427ee..801826b96e8b098caf1a5f102a3cde6b0aabce33 100644 (file)
@@ -1424,7 +1424,7 @@ mono_ssa_loop_invariant_code_motion (MonoCompile *cfg)
                                else
                                        sreg = -1;
                                if (sreg != -1) {
-                                       MonoInst *tins;
+                                       MonoInst *tins, *var;
 
                                        skip = FALSE;
                                        for (tins = ins->prev; tins; tins = tins->prev) {
@@ -1439,6 +1439,9 @@ mono_ssa_loop_invariant_code_motion (MonoCompile *cfg)
                                        }
                                        if (skip)
                                                continue;
+                                       var = get_vreg_to_inst (cfg, sreg);
+                                       if (var && (var->flags & (MONO_INST_VOLATILE|MONO_INST_INDIRECT)))
+                                               continue;
                                        ins->sreg1 = sreg;
                                }
 
index a6499d13d5f7e6a25506cc88f26287c7480ff48f..692eedfaccb823436ae257254609a91e0922239d 100644 (file)
@@ -651,7 +651,7 @@ add_expression_to_tree (MonoSsapreExpression *tree, MonoSsapreExpression *expres
 }
 
 #if (MONO_APPLY_SSAPRE_TO_SINGLE_EXPRESSION)
-static char *mono_ssapre_expression_name = NULL;
+static char *mono_ssapre_expression_name;
 static gboolean
 check_ssapre_expression_name (MonoSsapreWorkArea *area, MonoSsapreExpressionDescription *expression_description) {
        if (area->expression_is_handled_father) {
diff --git a/mono/mini/support-s390x.h b/mono/mini/support-s390x.h
new file mode 100644 (file)
index 0000000..62edcc4
--- /dev/null
@@ -0,0 +1,93 @@
+#ifndef __MONO_SUPPORT_S390X_H__
+#define __MONO_SUPPORT_S390X_H__
+
+#define S390_SET(loc, dr, v)                                   \
+       do {                                                    \
+               guint64 val = (guint64) v;                      \
+               if (s390_is_uimm16(val)) {                      \
+                       s390_llill(loc, dr, val);               \
+               } else if (s390_is_uimm32(val)) {               \
+                       s390_llilf(loc, dr, val);               \
+               } else {                                        \
+                       guint32 hi = (val) >> 32;               \
+                       guint32 lo = (val) & 0xffffffff;        \
+                       s390_iihf(loc, dr, hi);                 \
+                       s390_iilf(loc, dr, lo);                 \
+               }                                               \
+       } while (0)
+
+#define S390_LONG(loc, opy, op, r, ix, br, off)                                \
+       if (s390_is_imm20(off)) {                                       \
+               s390_##opy (loc, r, ix, br, off);                       \
+       } else {                                                        \
+               if (ix == 0) {                                          \
+                       S390_SET(loc, s390_r13, off);                   \
+                       s390_la (loc, s390_r13, s390_r13, br, 0);       \
+               } else {                                                \
+                       s390_la   (loc, s390_r13, ix, br, 0);           \
+                       S390_SET  (loc, s390_r0, off);                  \
+                       s390_agr  (loc, s390_r13, s390_r0);             \
+               }                                                       \
+               s390_##op (loc, r, 0, s390_r13, 0);                     \
+       }
+
+#define S390_SET_MASK(loc, dr, v)                              \
+       do {                                                    \
+               if (s390_is_imm16 (v)) {                        \
+                       s390_lghi (loc, dr, v);                 \
+               } else if (s390_is_imm32 (v)) {                 \
+                       s390_lgfi (loc, dr, v);                 \
+               } else {                                        \
+                       gint64 val = (gint64) v;                \
+                       guint32 hi = (val) >> 32;               \
+                       guint32 lo = (val) & 0xffffffff;        \
+                       s390_iilf(loc, dr, lo);                 \
+                       s390_iihf(loc, dr, hi);                 \
+               }                                               \
+       } while (0)
+
+#define S390_CALL_TEMPLATE(loc, r)                             \
+       do {                                                    \
+               s390_iihf (loc, r, 0);                          \
+               s390_iilf (loc, r, 0);                          \
+               s390_basr (loc, s390_r14, r);                   \
+       } while (0)
+
+#define S390_BR_TEMPLATE(loc, r)                               \
+       do {                                                    \
+               s390_iihf (loc, r, 0);                          \
+               s390_iilf (loc, r, 0);                          \
+               s390_br   (loc, r);                             \
+       } while (0)
+
+#define S390_LOAD_TEMPLATE(loc, r)                             \
+       do {                                                    \
+               s390_iihf (loc, r, 0);                          \
+               s390_iilf (loc, r, 0);                          \
+       } while (0)
+
+#define S390_EMIT_CALL(loc, t)                                 \
+       do {                                                    \
+               gint64 val = (gint64) t;                        \
+               guint32 hi = (val) >> 32;                       \
+               guint32 lo = (val) & 0xffffffff;                \
+               uintptr_t p = (uintptr_t) loc;                  \
+               p += 2;                                         \
+               *(guint32 *) p = hi;                            \
+               p += 6;                                         \
+               *(guint32 *) p = lo;                            \
+       } while (0)
+
+#define S390_EMIT_LOAD(loc, v)                                 \
+       do {                                                    \
+               gint64 val = (gint64) v;                        \
+               guint32 hi = (val) >> 32;                       \
+               guint32 lo = (val) & 0xffffffff;                \
+               uintptr_t p = (uintptr_t) loc;                  \
+               p += 2;                                         \
+               *(guint32 *) p = hi;                            \
+               p += 6;                                         \
+               *(guint32 *) p = lo;                            \
+       } while (0)
+
+#endif /* __MONO_SUPPORT_S390X_H__ */
index 6766c26a694ad7f82fb5daaf20a32cef29aa049f..9ab067a76b57cbd9ae0c4e67ebbff09c699df07d 100644 (file)
@@ -8,7 +8,7 @@
 #if defined(MONO_SUPPORT_TASKLETS)
 
 /* keepalive_stacks could be a per-stack var to avoid locking overhead */
-static MonoGHashTable *keepalive_stacks = NULL;
+static MonoGHashTable *keepalive_stacks;
 static CRITICAL_SECTION tasklets_mutex;
 #define tasklets_lock() EnterCriticalSection(&tasklets_mutex)
 #define tasklets_unlock() LeaveCriticalSection(&tasklets_mutex)
index 69f4fb6597914c55380c882fe54e3cb6827c5dc1..50d57970fe6e791d268f64c6662dbe49cf3a23ab 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 #include <glib.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
@@ -585,17 +586,17 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
                amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, 8, sizeof(gpointer));
        else
                amd64_mov_reg_imm (code, AMD64_R11, 0);
-       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rip), AMD64_R11, sizeof(mgreg_t));
+       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rip), AMD64_R11, sizeof(mgreg_t));
        /* Save fp */
        amd64_mov_reg_membase (code, AMD64_R11, AMD64_RSP, framesize, sizeof(mgreg_t));
-       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbp), AMD64_R11, sizeof(mgreg_t));
+       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp), AMD64_R11, sizeof(mgreg_t));
        /* Save sp */
        amd64_mov_reg_reg (code, AMD64_R11, AMD64_RSP, sizeof(mgreg_t));
        amd64_alu_reg_imm (code, X86_ADD, AMD64_R11, framesize + 16);
-       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsp), AMD64_R11, sizeof(mgreg_t));
+       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rsp), AMD64_R11, sizeof(mgreg_t));
        /* Save pointer to registers */
        amd64_lea_membase (code, AMD64_R11, AMD64_RBP, saved_regs_offset);
-       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMFTramp, regs), AMD64_R11, sizeof(mgreg_t));
+       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMFTramp, regs), AMD64_R11, sizeof(mgreg_t));
 
        if (aot) {
                code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_get_lmf_addr");
@@ -605,13 +606,13 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        amd64_call_reg (code, AMD64_R11);
 
        /* Save lmf_addr */
-       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), AMD64_RAX, sizeof(gpointer));
+       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), AMD64_RAX, sizeof(gpointer));
        /* Save previous_lmf */
        /* Set the lowest bit to signal that this LMF has the ip field set */
        /* Set the third lowest bit to signal that this is a MonoLMFTramp structure */
        amd64_mov_reg_membase (code, AMD64_R11, AMD64_RAX, 0, sizeof(gpointer));
        amd64_alu_reg_imm_size (code, X86_ADD, AMD64_R11, 0x5, sizeof(gpointer));
-       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), AMD64_R11, sizeof(gpointer));
+       amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), AMD64_R11, sizeof(gpointer));
        /* Set new lmf */
        amd64_lea_membase (code, AMD64_R11, AMD64_RBP, lmf_offset);
        amd64_mov_membase_reg (code, AMD64_RAX, 0, AMD64_R11, sizeof(gpointer));
@@ -658,9 +659,9 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        amd64_mov_reg_membase (code, AMD64_RAX, AMD64_RBP, res_offset, sizeof(mgreg_t));        
 
        /* Restore LMF */
-       amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof(gpointer));
+       amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof(gpointer));
        amd64_alu_reg_imm_size (code, X86_SUB, AMD64_RCX, 0x5, sizeof(gpointer));
-       amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), sizeof(gpointer));
+       amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), sizeof(gpointer));
        amd64_mov_membase_reg (code, AMD64_R11, 0, AMD64_RCX, sizeof(gpointer));
 
        /* 
@@ -833,7 +834,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
                amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
        } else {
                /* load rgctx ptr from vtable */
-               amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context), sizeof(gpointer));
+               amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context), sizeof(gpointer));
                /* is the rgctx ptr null? */
                amd64_test_reg_reg (code, AMD64_RAX, AMD64_RAX);
                /* if yes, jump to actual trampoline */
@@ -981,7 +982,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
                amd64_branch8 (code, X86_CC_Z, -1, 1);
 
                /* load obj->synchronization to RCX */
-               amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, G_STRUCT_OFFSET (MonoObject, synchronisation), 8);
+               amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 8);
 
                if (mono_gc_is_moving ()) {
                        /*if bit zero is set it's a thin hash*/
@@ -1003,7 +1004,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
                /* load MonoInternalThread* into RDX */
                code = mono_amd64_emit_tls_get (code, AMD64_RDX, mono_thread_get_tls_offset ());
                /* load TID into RDX */
-               amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 8);
+               amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 8);
 
                /* is synchronization->owner null? */
                amd64_alu_membase_imm_size (code, X86_CMP, AMD64_RCX, owner_offset, 0, 8);
@@ -1106,7 +1107,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
                amd64_branch8 (code, X86_CC_Z, -1, 1);
 
                /* load obj->synchronization to RCX */
-               amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, G_STRUCT_OFFSET (MonoObject, synchronisation), 8);
+               amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 8);
 
                if (mono_gc_is_moving ()) {
                        /*if bit zero is set it's a thin hash*/
@@ -1129,7 +1130,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
                /* load MonoInternalThread* into RDX */
                code = mono_amd64_emit_tls_get (code, AMD64_RDX, mono_thread_get_tls_offset ());
                /* load TID into RDX */
-               amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 8);
+               amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 8);
                /* is synchronization->owner == TID */
                amd64_alu_membase_reg_size (code, X86_CMP, AMD64_RCX, owner_offset, AMD64_RDX, 8);
                /* if no, jump to actual trampoline */
@@ -1228,7 +1229,7 @@ mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
 
        if (mono_get_jit_tls_offset () != -1) {
                code = mono_amd64_emit_tls_get (code, AMD64_RDI, mono_get_jit_tls_offset ());
-               amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RDI, G_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 8);
+               amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RDI, MONO_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 8);
                /* Simulate a call */
                amd64_push_reg (code, AMD64_RAX);
                amd64_jump_code (code, tramp);
index 9810f48f79cb5b47c243f5b80140dc86674e6c30..bb500a7c0f505c954834f36b68c97deb7a424337 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 #include <glib.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
@@ -296,33 +297,33 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
         */
 
        /* r0 is the result from mono_get_lmf_addr () */
-       ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, lmf_addr));
+       ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, lmf_addr));
        /* new_lmf->previous_lmf = *lmf_addr */
-       ARM_LDR_IMM (code, ARMREG_R2, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
-       ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_LDR_IMM (code, ARMREG_R2, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
        /* *(lmf_addr) = r1 */
-       ARM_STR_IMM (code, ARMREG_V1, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_STR_IMM (code, ARMREG_V1, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
        /* save method info (it's in v2) */
        if ((tramp_type == MONO_TRAMPOLINE_JIT) || (tramp_type == MONO_TRAMPOLINE_JUMP))
-               ARM_STR_IMM (code, ARMREG_V2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, method));
+               ARM_STR_IMM (code, ARMREG_V2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, method));
        else {
                ARM_MOV_REG_IMM8 (code, ARMREG_R2, 0);
-               ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, method));
+               ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, method));
        }
        /* save caller SP */
        code = mono_arm_emit_load_imm (code, ARMREG_R2, cfa_offset);
        ARM_ADD_REG_REG (code, ARMREG_R2, ARMREG_SP, ARMREG_R2);
-       ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, sp));
+       ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, sp));
        /* save caller FP */
-       ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (G_STRUCT_OFFSET (MonoLMF, iregs) + ARMREG_FP*4));
-       ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, fp));
+       ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (MONO_STRUCT_OFFSET (MonoLMF, iregs) + ARMREG_FP*4));
+       ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, fp));
        /* save the IP (caller ip) */
        if (tramp_type == MONO_TRAMPOLINE_JUMP) {
                ARM_MOV_REG_IMM8 (code, ARMREG_R2, 0);
        } else {
-               ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (G_STRUCT_OFFSET (MonoLMF, iregs) + 13*4));
+               ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (MONO_STRUCT_OFFSET (MonoLMF, iregs) + 13*4));
        }
-       ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, ip));
+       ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, ip));
 
        /* Save VFP registers. */
        if (mono_arm_is_hard_float ()) {
@@ -331,7 +332,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
                 * it's easier than attempting to store them on the stack since
                 * this trampoline code is pretty messy.
                 */
-               ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, fregs));
+               ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, fregs));
                ARM_FSTMD (code, ARM_VFP_D0, 8, ARMREG_R0);
        }
 
@@ -339,7 +340,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
         * Now we're ready to call xxx_trampoline ().
         */
        /* Arg 1: the saved registers */
-       ARM_ADD_REG_IMM (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, iregs), 0);
+       ARM_ADD_REG_IMM (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, iregs), 0);
 
        /* Arg 2: code (next address to the instruction that called us) */
        if (tramp_type == MONO_TRAMPOLINE_JUMP) {
@@ -378,7 +379,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
         * clobbered). This way we can just restore all the regs in one inst
         * and branch to IP.
         */
-       ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, iregs) + (ARMREG_R12 * sizeof (mgreg_t)));
+       ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, iregs) + (ARMREG_R12 * sizeof (mgreg_t)));
 
        /* Check for thread interruption */
        /* This is not perf critical code so no need to check the interrupt flag */
@@ -413,15 +414,15 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
         * the same state as before we executed.
         */
        /* ip = previous_lmf */
-       ARM_LDR_IMM (code, ARMREG_IP, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_LDR_IMM (code, ARMREG_IP, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
        /* lr = lmf_addr */
-       ARM_LDR_IMM (code, ARMREG_LR, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, lmf_addr));
+       ARM_LDR_IMM (code, ARMREG_LR, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, lmf_addr));
        /* *(lmf_addr) = previous_lmf */
-       ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+       ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
 
        /* Restore VFP registers. */
        if (mono_arm_is_hard_float ()) {
-               ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, fregs));
+               ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, fregs));
                ARM_FLDMD (code, ARM_VFP_D0, 8, ARMREG_R0);
        }
 
@@ -703,8 +704,8 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
                ARM_MOV_REG_REG (code, ARMREG_R1, ARMREG_R0);
        } else {
                /* load rgctx ptr from vtable */
-               g_assert (arm_is_imm12 (G_STRUCT_OFFSET (MonoVTable, runtime_generic_context)));
-               ARM_LDR_IMM (code, ARMREG_R1, ARMREG_R0, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context));
+               g_assert (arm_is_imm12 (MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context)));
+               ARM_LDR_IMM (code, ARMREG_R1, ARMREG_R0, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context));
                /* is the rgctx ptr null? */
                ARM_CMP_REG_IMM (code, ARMREG_R1, 0, 0);
                /* if yes, jump to actual trampoline */
index d7b598537d8ab2616d9998b50eee770f10d31854..9b80527ae790288c183d35d6511ce47a4d768751 100644 (file)
@@ -16,6 +16,7 @@
 #include <config.h>
 #include <glib.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
@@ -408,8 +409,8 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
                mips_move (code, mips_a1, mips_a0);
        } else {
                /* load rgctx ptr from vtable */
-               g_assert (mips_is_imm16 (G_STRUCT_OFFSET (MonoVTable, runtime_generic_context)));
-               mips_lw (code, mips_a1, mips_a0, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context));
+               g_assert (mips_is_imm16 (MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context)));
+               mips_lw (code, mips_a1, mips_a0, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context));
                /* is the rgctx ptr null? */
                /* if yes, jump to actual trampoline */
                rgctx_null_jumps [njumps ++] = code;
index aec06abc142ffdf74e8c73829635044f3f3f4bc1..6fac1a1bcb0d8547183da06ccdcf4c8b479318e8 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 #include <glib.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
@@ -545,7 +546,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
                ppc_mr (code, ppc_r4, PPC_FIRST_ARG_REG);
        } else {
                /* load rgctx ptr from vtable */
-               ppc_ldptr (code, ppc_r4, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context), PPC_FIRST_ARG_REG);
+               ppc_ldptr (code, ppc_r4, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context), PPC_FIRST_ARG_REG);
                /* is the rgctx ptr null? */
                ppc_compare_reg_imm (code, 0, ppc_r4, 0);
                /* if yes, jump to actual trampoline */
index 8f2875afdff874cb0cf258b322d5061f3b3087d5..fa664e12e11f8b57ae731c0a7afd29404193589f 100644 (file)
@@ -46,6 +46,7 @@
 #include <glib.h>
 #include <string.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
@@ -53,6 +54,7 @@
 
 #include "mini.h"
 #include "mini-s390x.h"
+#include "support-s390x.h"
 
 /*========================= End of Includes ========================*/
 
@@ -99,10 +101,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *method, gpointer addr)
 
        start = code = mono_domain_code_reserve (domain, 28);
 
-       s390_basr (code, s390_r1, 0);
-       s390_j    (code, 6);
-       s390_llong(code, addr);
-       s390_lg   (code, s390_r1, 0, s390_r1, 4);
+       S390_SET  (code, s390_r1, addr);
        s390_aghi (code, this_pos, sizeof(MonoObject));
        s390_br   (code, s390_r1);
 
@@ -129,27 +128,20 @@ mono_arch_patch_callsite (guint8 *method_start, guint8 *orig_code, guint8 *addr)
        gint32 displace;
        unsigned short opcode;
 
-       opcode = *((unsigned short *) (orig_code - 6));
-       if (opcode == 0xc0e5) {
+       opcode = *((unsigned short *) (orig_code - 2));
+       if (opcode == 0x0dee) {
+               /* This should be a 'iihf/iilf' sequence */
+               S390_EMIT_CALL((orig_code - 14), addr);
+               mono_arch_flush_icache (orig_code - 14, 12);
+       } else {
+fprintf(stderr, "%p %02x %02x %02x %02x\n",
+&orig_code[-14], orig_code[-12], orig_code[-11], orig_code[-6], orig_code[-5]);
+fflush(stderr);
                /* This is the 'brasl' instruction */
                orig_code    -= 4;
                displace = ((gssize) addr - (gssize) (orig_code - 2)) / 2;
                s390_patch_rel (orig_code, displace);
                mono_arch_flush_icache (orig_code, 4);
-       } else {
-               /* This should be a 'lg %r14,4(%r13)' then a 'basr r14, r14' instruction */
-               g_assert (orig_code [-8] == 0xe3);
-               g_assert (orig_code [-7] == 0xe0);
-               g_assert (orig_code [-6] == 0xd0);
-               g_assert (orig_code [-5] == 0x04);
-               g_assert (orig_code [-4] == 0x00);
-               g_assert (orig_code [-3] == 0x04);
-               opcode = *((unsigned short*) (orig_code - 2));
-               g_assert (opcode == 0x0dee);
-
-               /* The call address is stored in the 8 bytes preceeding the basr instruction */
-               s390_patch_addr(orig_code - 16, (gssize)addr);
-               mono_arch_flush_icache (orig_code - 16, 8);
        }
 }
 
@@ -231,7 +223,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
 {
        char *tramp_name;
        guint8 *buf, *tramp, *code;
-       int i, offset, lmfOffset;
+       int i, offset, lmfOffset, has_caller;
        GSList *unwind_ops = NULL;
        MonoJumpInfo *ji = NULL;
 
@@ -242,6 +234,12 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
                
        code = buf = mono_global_codeman_reserve(512);
                
+       if ((tramp_type == MONO_TRAMPOLINE_JUMP) ||
+           (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD)) 
+               has_caller = 0;
+       else
+               has_caller = 1;
+
        /*-----------------------------------------------------------
          STEP 0: First create a non-standard function prologue with a
          stack size big enough to save our registers.
@@ -268,10 +266,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
          method.
          ----------------------------------------------------------*/
                                
-       s390_basr (buf, s390_r13, 0);
-       s390_j    (buf, 6);
-       s390_llong(buf, mono_get_lmf_addr);
-       s390_lg   (buf, s390_r1, 0, s390_r13, 4);
+       S390_SET  (buf, s390_r1, mono_get_lmf_addr);
        s390_basr (buf, s390_r14, s390_r1);
 
        /*---------------------------------------------------------------*/
@@ -321,11 +316,10 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        /*---------------------------------------------------------------*/     
        /* save the current IP                                           */     
        /*---------------------------------------------------------------*/     
-       if (tramp_type == MONO_TRAMPOLINE_JUMP) {
-               s390_lghi  (buf, s390_r1, 0);
-       } else {
+       if (has_caller) {
                s390_lg    (buf, s390_r1, 0, s390_r1, S390_RET_ADDR_OFFSET);
-               //                      s390_la    (buf, s390_r1, 0, s390_r1, 0);
+       } else {
+               s390_lghi  (buf, s390_r1, 0);
        }
        s390_stg   (buf, s390_r1, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, eip));  
                                                                                        
@@ -351,10 +345,10 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        s390_la  (buf, s390_r2, 0, STK_BASE, CREATE_STACK_SIZE);
                
        /* Arg 2: code (next address to the instruction that called us) */
-       if (tramp_type == MONO_TRAMPOLINE_JUMP) {
-               s390_lghi (buf, s390_r3, 0);
-       } else {
+       if (has_caller) {
                s390_lg   (buf, s390_r3, 0, s390_r11, S390_RET_ADDR_OFFSET);
+       } else {
+               s390_lghi (buf, s390_r3, 0);
        }
 
        /* Arg 3: Trampoline argument */
@@ -366,11 +360,8 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        /* Arg 4: trampoline address. Ignore for now */
                
        /* Calculate call address and call the C trampoline. Return value will be in r2 */
-       s390_basr (buf, s390_r13, 0);
-       s390_j    (buf, 6);
        tramp = (guint8*)mono_get_trampoline_func (tramp_type);
-       s390_llong (buf, tramp);
-       s390_lg   (buf, s390_r1, 0, s390_r13, 4);
+       S390_SET  (buf, s390_r1, tramp);
        s390_basr (buf, s390_r14, s390_r1);
                
        /* OK, code address is now on r2. Move it to r1, so that we
@@ -426,6 +417,28 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
 
 /*========================= End of Function ========================*/
 
+/*------------------------------------------------------------------*/
+/*                                                                  */
+/* Name                - mono_arch_invalidate_method                       */
+/*                                                                  */
+/* Function    -                                                   */
+/*                                                                  */
+/*------------------------------------------------------------------*/
+
+void
+mono_arch_invalidate_method (MonoJitInfo *ji, void *func, gpointer func_arg)
+{
+       /* FIXME: This is not thread safe */
+       guint8 *code = ji->code_start;
+
+       S390_SET  (code, s390_r1, func);
+       S390_SET  (code, s390_r2, func_arg);
+       s390_br   (code, s390_r1);
+
+}
+
+/*========================= End of Function ========================*/
+
 /*------------------------------------------------------------------*/
 /*                                                                  */
 /* Name                - mono_arch_create_specific_trampoline              */
@@ -449,10 +462,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
        /*----------------------------------------------------------*/
        code = buf = mono_domain_code_reserve (domain, SPECIFIC_TRAMPOLINE_SIZE);
 
-       s390_basr (buf, s390_r1, 0);
-       s390_j    (buf, 6);
-       s390_llong(buf, arg1);
-       s390_lg   (buf, s390_r1, 0, s390_r1, 4);
+       S390_SET  (buf, s390_r1, arg1);
        displace = (tramp - buf) / 2;
        s390_jg   (buf, displace);
 
@@ -524,7 +534,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
                s390_lgr (code, s390_r1, s390_r2);
        } else {
                /* load rgctx ptr from vtable */
-               s390_lg (code, s390_r1, 0, s390_r2, G_STRUCT_OFFSET(MonoVTable, runtime_generic_context));
+               s390_lg (code, s390_r1, 0, s390_r2, MONO_STRUCT_OFFSET(MonoVTable, runtime_generic_context));
                /* is the rgctx ptr null? */
                s390_ltgr (code, s390_r1, s390_r1);
                /* if yes, jump to actual trampoline */
@@ -615,10 +625,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m,
 
        start = code = mono_domain_code_reserve (domain, buf_len);
 
-       s390_basr (code, s390_r1, 0);
-       s390_j    (code, 6);
-       s390_llong(code, mrgctx);
-       s390_lg   (code, MONO_ARCH_RGCTX_REG, 0, s390_r1, 4);
+       S390_SET  (code, MONO_ARCH_RGCTX_REG, mrgctx);
        displace = ((uintptr_t) addr - (uintptr_t) code) / 2;
        s390_jg   (code, displace);
        g_assert ((code - start) < buf_len);
@@ -630,6 +637,80 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m,
 
 /*========================= End of Function ========================*/
 
+/*------------------------------------------------------------------*/
+/*                                                                  */
+/* Name                - handler_block_trampoline_helper                   */
+/*                                                                  */
+/* Function    -                                                   */
+/*                                                                  */
+/*------------------------------------------------------------------*/
+
+static void
+handler_block_trampoline_helper (gpointer *ptr)
+{
+       MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+       *ptr = jit_tls->handler_block_return_address;
+}
+
+/*========================= End of Function ========================*/
+
+/*------------------------------------------------------------------*/
+/*                                                                  */
+/* Name                - mono_arch_create_handler_block_trampoline         */
+/*                                                                  */
+/* Function    -                                                   */
+/*                                                                  */
+/*------------------------------------------------------------------*/
+
+gpointer
+mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
+{
+       guint8 *tramp = mono_get_trampoline_code (MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD);
+       guint8 *code, *buf;
+       int tramp_size = 64;
+       MonoJumpInfo *ji = NULL;
+       GSList *unwind_ops = NULL;
+
+       g_assert (!aot);
+
+       code = buf = mono_global_codeman_reserve (tramp_size);
+
+       /*
+        * This trampoline restore the call chain of the handler block 
+        * then jumps into the code that deals with it.
+        */
+
+       if (mono_get_jit_tls_offset () != -1) {
+               s390_ear  (code, s390_r1, 0);
+               s390_sllg (code, s390_r1, s390_r1, 0, 32);
+               s390_ear  (code, s390_r1, 1);
+               S390_SET  (code, s390_r14, mono_get_jit_tls_offset());
+               s390_lg   (code, s390_r14, s390_r1, 0, G_STRUCT_OFFSET(MonoJitTlsData, handler_block_return_address));
+               /* 
+                * Simulate a call 
+                */
+               S390_SET  (code, s390_r1, tramp);
+               s390_br   (code, s390_r1);
+       } else {
+               /*
+                * Slow path uses a C helper
+                */
+               S390_SET  (code, s390_r2, tramp);
+               S390_SET  (code, s390_r1, handler_block_trampoline_helper);
+               s390_br   (code, s390_r1);
+       }
+
+       mono_arch_flush_icache (buf, code - buf);
+       g_assert (code - buf <= tramp_size);
+
+       if (info)
+               *info = mono_tramp_info_create ("handler_block_trampoline", buf, code - buf, ji, unwind_ops);
+
+       return buf;
+}
+
+/*========================= End of Function ========================*/
+
 /*------------------------------------------------------------------*/
 /*                                                                  */
 /* Name                - mono_arch_create_generic_class_init_trampoline    */
@@ -645,7 +726,6 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a
        guint8 *code, *buf;
        static int byte_offset = -1;
        static guint8 bitmask;
-       guint8 *jump;
        gint32 displace;
        int tramp_size;
        GSList *unwind_ops = NULL;
index 5d9f17dff5eddc5f61283b0bf0f170aabbca42ec..e86e061eb7a4419e38b8d78fe937f0ba41ad4993 100644 (file)
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <glib.h>
 
+#include <mono/metadata/abi-details.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/marshal.h>
@@ -25,6 +26,8 @@
 #include "mini.h"
 #include "mini-x86.h"
 
+#define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
+
 /*
  * mono_arch_get_unbox_trampoline:
  * @m: method pointer
@@ -297,9 +300,9 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
 {
        char *tramp_name;
        guint8 *buf, *code, *tramp;
-       int pushed_args, pushed_args_caller_saved;
        GSList *unwind_ops = NULL;
        MonoJumpInfo *ji = NULL;
+       int i, offset, frame_size, regarray_offset, lmf_offset, caller_ip_offset, arg_offset;
 
        unwind_ops = mono_arch_get_cie_program ();
 
@@ -310,65 +313,75 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
         * the ret address is at: esp + (pushed_args + 1) * sizeof (gpointer)
         */
 
-       /* Put all registers into an array on the stack
-        * If this code is changed, make sure to update the offset value in
-        * mono_arch_get_this_arg_from_call () in mini-x86.c.
-        */
-       x86_push_reg (code, X86_EDI);
-       x86_push_reg (code, X86_ESI);
-       x86_push_reg (code, X86_EBP);
-       x86_push_reg (code, X86_ESP);
-       x86_push_reg (code, X86_EBX);
-       x86_push_reg (code, X86_EDX);
-       x86_push_reg (code, X86_ECX);
-       x86_push_reg (code, X86_EAX);
-
-       pushed_args_caller_saved = pushed_args = 8;
-
-       /* Align stack on apple */
-       x86_alu_reg_imm (code, X86_SUB, X86_ESP, 4);
-
-       pushed_args ++;
-
-       /* save LMF begin */
-
-       /* save the IP (caller ip) */
-       if (tramp_type == MONO_TRAMPOLINE_JUMP)
-               x86_push_imm (code, 0);
-       else
-               x86_push_membase (code, X86_ESP, (pushed_args + 1) * sizeof (gpointer));
-
-       pushed_args++;
-
+       // FIXME: Unwind info
+
+       /* Compute frame offsets relative to the frame pointer %ebp */
+       arg_offset = sizeof (mgreg_t);
+       caller_ip_offset = 2 * sizeof (mgreg_t);
+       offset = 0;
+       offset += sizeof (MonoLMF);
+       lmf_offset = -offset;
+       offset += X86_NREG * sizeof (mgreg_t);
+       regarray_offset = -offset;
+       /* Argument area */
+       offset += 4 * sizeof (mgreg_t);
+       frame_size = ALIGN_TO (offset, MONO_ARCH_FRAME_ALIGNMENT);
+
+       /* Allocate frame */
        x86_push_reg (code, X86_EBP);
-       x86_push_reg (code, X86_ESI);
-       x86_push_reg (code, X86_EDI);
-       x86_push_reg (code, X86_EBX);
-
-       pushed_args += 4;
-
-       /* save ESP */
-       x86_push_reg (code, X86_ESP);
-       /* Adjust ESP so it points to the previous frame */
-       x86_alu_membase_imm (code, X86_ADD, X86_ESP, 0, (pushed_args + 2) * 4);
-
-       pushed_args ++;
-
-       /* save method info */
-       if ((tramp_type == MONO_TRAMPOLINE_JIT) || (tramp_type == MONO_TRAMPOLINE_JUMP))
-               x86_push_membase (code, X86_ESP, pushed_args * sizeof (gpointer));
-       else
-               x86_push_imm (code, 0);
-
-       pushed_args++;
-
-       /* On apple, the stack is correctly aligned to 16 bytes because pushed_args is
-        * 16 and there is the extra trampoline arg + the return ip pushed by call
-        * FIXME: Note that if an exception happens while some args are pushed
-        * on the stack, the stack will be misaligned.
-        */
-       g_assert (pushed_args == 16);
+       x86_mov_reg_reg (code, X86_EBP, X86_ESP, sizeof (mgreg_t));
+       /* There are three words on the stack, adding + 4 aligns the stack to 16, which is needed on osx */
+       x86_alu_reg_imm (code, X86_SUB, X86_ESP, frame_size + sizeof (mgreg_t));
+
+       /* Save all registers */
+       for (i = X86_EAX; i <= X86_EDI; ++i) {
+               int reg = i;
+
+               if (i == X86_EBP) {
+                       /* Save original ebp */
+                       /* EAX is already saved */
+                       x86_mov_reg_membase (code, X86_EAX, X86_EBP, 0, sizeof (mgreg_t));
+                       reg = X86_EAX;
+               } else if (i == X86_ESP) {
+                       /* Save original esp */
+                       /* EAX is already saved */
+                       x86_mov_reg_reg (code, X86_EAX, X86_EBP, sizeof (mgreg_t));
+                       /* Saved ebp + trampoline arg + return addr */
+                       x86_alu_reg_imm (code, X86_ADD, X86_EAX, 3 * sizeof (mgreg_t));
+                       reg = X86_EAX;
+               }
+               x86_mov_membase_reg (code, X86_EBP, regarray_offset + (i * sizeof (mgreg_t)), reg, sizeof (mgreg_t));
+       }
 
+       /* Setup LMF */
+       /* eip */
+       if (tramp_type == MONO_TRAMPOLINE_JUMP) {
+               x86_mov_membase_imm (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), 0, sizeof (mgreg_t));
+       } else {
+               x86_mov_reg_membase (code, X86_EAX, X86_EBP, caller_ip_offset, sizeof (mgreg_t));
+               x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), X86_EAX, sizeof (mgreg_t));
+       }
+       /* method */
+       if ((tramp_type == MONO_TRAMPOLINE_JIT) || (tramp_type == MONO_TRAMPOLINE_JUMP)) {
+               x86_mov_reg_membase (code, X86_EAX, X86_EBP, arg_offset, sizeof (mgreg_t));
+               x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, method), X86_EAX, sizeof (mgreg_t));
+       } else {
+               x86_mov_membase_imm (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, method), 0, sizeof (mgreg_t));
+       }
+       /* esp */
+       x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_ESP * sizeof (mgreg_t)), sizeof (mgreg_t));
+       x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esp), X86_EAX, sizeof (mgreg_t));
+       /* callee save registers */
+       x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_EBX * sizeof (mgreg_t)), sizeof (mgreg_t));
+       x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx), X86_EAX, sizeof (mgreg_t));
+       x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_EDI * sizeof (mgreg_t)), sizeof (mgreg_t));
+       x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi), X86_EAX, sizeof (mgreg_t));
+       x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_ESI * sizeof (mgreg_t)), sizeof (mgreg_t));
+       x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi), X86_EAX, sizeof (mgreg_t));
+       x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_EBP * sizeof (mgreg_t)), sizeof (mgreg_t));
+       x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebp), X86_EAX, sizeof (mgreg_t));
+
+       /* Push LMF */
        /* get the address of lmf for the current thread */
        if (aot) {
                code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_get_lmf_addr");
@@ -376,42 +389,36 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        } else {
                x86_call_code (code, mono_get_lmf_addr);
        }
-       /* push lmf */
-       x86_push_reg (code, X86_EAX); 
-       /* push *lfm (previous_lmf) */
-       x86_push_membase (code, X86_EAX, 0);
+       /* lmf->lmf_addr = lmf_addr (%eax) */
+       x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), X86_EAX, sizeof (mgreg_t));
+       /* lmf->previous_lmf = *(lmf_addr) */
+       x86_mov_reg_membase (code, X86_ECX, X86_EAX, 0, sizeof (mgreg_t));
        /* Signal to mono_arch_find_jit_info () that this is a trampoline frame */
-       x86_alu_membase_imm (code, X86_ADD, X86_ESP, 0, 1);
-       /* *(lmf) = ESP */
-       x86_mov_membase_reg (code, X86_EAX, 0, X86_ESP, 4);
-       /* save LFM end */
-
-       pushed_args += 2;
-
-       /* starting the call sequence */
-
-       /* FIXME: Push the trampoline address */
-       x86_push_imm (code, 0);
-
-       pushed_args++;
-
-       /* push the method info */
-       x86_push_membase (code, X86_ESP, pushed_args * sizeof (gpointer));
-
-       pushed_args++;
-
-       /* push the return address onto the stack */
-       if (tramp_type == MONO_TRAMPOLINE_JUMP)
-               x86_push_imm (code, 0);
-       else
-               x86_push_membase (code, X86_ESP, (pushed_args + 1) * sizeof (gpointer));
-       pushed_args++;
-       /* push the address of the register array */
-       x86_lea_membase (code, X86_EAX, X86_ESP, (pushed_args - 8) * sizeof (gpointer));
-       x86_push_reg (code, X86_EAX);
-
-       pushed_args++;
-
+       x86_alu_reg_imm (code, X86_ADD, X86_ECX, 1);
+       x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), X86_ECX, sizeof (mgreg_t));
+       /* *lmf_addr = lmf */
+       x86_lea_membase (code, X86_ECX, X86_EBP, lmf_offset);
+       x86_mov_membase_reg (code, X86_EAX, 0, X86_ECX, sizeof (mgreg_t));
+
+       /* Call trampoline function */
+       /* Arg 1 - registers */
+       x86_lea_membase (code, X86_EAX, X86_EBP, regarray_offset);
+       x86_mov_membase_reg (code, X86_ESP, (0 * sizeof (mgreg_t)), X86_EAX, sizeof (mgreg_t));
+       /* Arg2 - calling code */
+       if (tramp_type == MONO_TRAMPOLINE_JUMP) {
+               x86_mov_membase_imm (code, X86_ESP, (1 * sizeof (mgreg_t)), 0, sizeof (mgreg_t));
+       } else {
+               x86_mov_reg_membase (code, X86_EAX, X86_EBP, caller_ip_offset, sizeof (mgreg_t));
+               x86_mov_membase_reg (code, X86_ESP, (1 * sizeof (mgreg_t)), X86_EAX, sizeof (mgreg_t));
+       }
+       /* Arg3 - trampoline argument */
+       x86_mov_reg_membase (code, X86_EAX, X86_EBP, arg_offset, sizeof (mgreg_t));
+       x86_mov_membase_reg (code, X86_ESP, (2 * sizeof (mgreg_t)), X86_EAX, sizeof (mgreg_t));
+       /* Arg4 - trampoline address */
+       // FIXME:
+       x86_mov_membase_imm (code, X86_ESP, (3 * sizeof (mgreg_t)), 0, sizeof (mgreg_t));
+
+       // FIXME:
 #ifdef __APPLE__
        /* check the stack is aligned after the ret ip is pushed */
        /*x86_mov_reg_reg (buf, X86_EDX, X86_ESP, 4);
@@ -421,8 +428,6 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        x86_breakpoint (buf);*/
 #endif
 
-       mono_add_unwind_op_def_cfa (unwind_ops, code, buf, X86_ESP, ((pushed_args + 2) * 4));
-
        if (aot) {
                char *icall_name = g_strdup_printf ("trampoline_func_%d", tramp_type);
                code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, icall_name);
@@ -432,96 +437,53 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
                x86_call_code (code, tramp);
        }
 
-       x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4*4);
-
-       pushed_args -= 4;
+       /*
+        * Overwrite the trampoline argument with the address we need to jump to,
+        * to free %eax.
+        */
+       x86_mov_membase_reg (code, X86_EBP, arg_offset, X86_EAX, 4);
 
-       /* Check for thread interruption */
-       /* This is not perf critical code so no need to check the interrupt flag */
-       /* Align the stack on osx */
-       x86_alu_reg_imm (code, X86_SUB, X86_ESP, 3 * 4);
-       x86_push_reg (code, X86_EAX);
+       /* Check for interruptions */
        if (aot) {
                code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_thread_force_interruption_checkpoint");
                x86_call_reg (code, X86_EAX);
        } else {
                x86_call_code (code, (guint8*)mono_thread_force_interruption_checkpoint);
        }
-       x86_pop_reg (code, X86_EAX);
-       x86_alu_reg_imm (code, X86_ADD, X86_ESP, 3 * 4);
 
        /* Restore LMF */
-
-       /* ebx = previous_lmf */
-       x86_pop_reg (code, X86_EBX);
-       pushed_args--;
-       x86_alu_reg_imm (code, X86_SUB, X86_EBX, 1);
-
-       /* edi = lmf */
-       x86_pop_reg (code, X86_EDI);
-       pushed_args--;
-
-       /* *(lmf) = previous_lmf */
-       x86_mov_membase_reg (code, X86_EDI, 0, X86_EBX, 4);
-
-       /* discard method info */
-       x86_pop_reg (code, X86_ESI);
-       pushed_args--;
-
-       /* discard ESP */
-       x86_pop_reg (code, X86_ESI);
-       pushed_args--;
-
-       /* restore caller saved regs */
-       x86_pop_reg (code, X86_EBX);
-       x86_pop_reg (code, X86_EDI);
-       x86_pop_reg (code, X86_ESI);
-       x86_pop_reg (code, X86_EBP);
-
-       pushed_args -= 4;
-
-       /* discard save IP */
-       x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4);
-       pushed_args--;
-
-       /* restore LMF end */
-
-       if (!MONO_TRAMPOLINE_TYPE_MUST_RETURN (tramp_type)) {
-               /* 
-                * Overwrite the method ptr with the address we need to jump to,
-                * to free %eax.
-                */
-               x86_mov_membase_reg (code, X86_ESP, pushed_args * sizeof (gpointer), X86_EAX, 4);
+       x86_mov_reg_membase (code, X86_EAX, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), sizeof (mgreg_t));
+       x86_mov_reg_membase (code, X86_ECX, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof (mgreg_t));
+       x86_alu_reg_imm (code, X86_SUB, X86_ECX, 1);
+       x86_mov_membase_reg (code, X86_EAX, 0, X86_ECX, sizeof (mgreg_t));
+
+       /* Restore registers */
+       for (i = X86_EAX; i <= X86_EDI; ++i) {
+               if (i == X86_ESP || i == X86_EBP)
+                       continue;
+               if (i == X86_EAX && !((tramp_type == MONO_TRAMPOLINE_RESTORE_STACK_PROT) || (tramp_type == MONO_TRAMPOLINE_AOT_PLT)))
+                       continue;
+               x86_mov_reg_membase (code, i, X86_EBP, regarray_offset + (i * 4), 4);
        }
 
-       /* Restore caller saved registers */
-       x86_mov_reg_membase (code, X86_ECX, X86_ESP, (pushed_args - pushed_args_caller_saved + X86_ECX) * 4, 4);
-       x86_mov_reg_membase (code, X86_EDX, X86_ESP, (pushed_args - pushed_args_caller_saved + X86_EDX) * 4, 4);
-       if ((tramp_type == MONO_TRAMPOLINE_RESTORE_STACK_PROT) || (tramp_type == MONO_TRAMPOLINE_AOT_PLT))
-               x86_mov_reg_membase (code, X86_EAX, X86_ESP, (pushed_args - pushed_args_caller_saved + X86_EAX) * 4, 4);
-
-       if (!MONO_TRAMPOLINE_TYPE_MUST_RETURN (tramp_type)) {
-               /* Pop saved reg array + stack align */
-               x86_alu_reg_imm (code, X86_ADD, X86_ESP, 9 * 4);
-               pushed_args -= 9;
-               g_assert (pushed_args == 0);
-       } else {
-               /* Pop saved reg array + stack align + method ptr */
-               x86_alu_reg_imm (code, X86_ADD, X86_ESP, 10 * 4);
-               pushed_args -= 10;
-
-               /* We've popped one more stack item than we've pushed (the
-                  method ptr argument), so we must end up at -1. */
-               g_assert (pushed_args == -1);
-       }
+       /* Restore frame */
+       x86_leave (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 {
+       if (MONO_TRAMPOLINE_TYPE_MUST_RETURN (tramp_type)) {
+               /* Load the value returned by the trampoline */
+               x86_mov_reg_membase (code, X86_EAX, X86_ESP, 0, 4);
+               /* The trampoline returns normally, pop the trampoline argument */
+               x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4);
                x86_ret (code);
+       } else {
+               /* The trampoline argument is at the top of the stack, and it contains the address we need to branch to */
+               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);
@@ -622,7 +584,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
        x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
        if (!mrgctx) {
                /* load rgctx ptr from vtable */
-               x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context), 4);
+               x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context), 4);
                /* is the rgctx ptr null? */
                x86_test_reg_reg (code, X86_EAX, X86_EAX);
                /* if yes, jump to actual trampoline */
@@ -834,7 +796,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
                x86_branch8 (code, X86_CC_Z, -1, 1);
 
                /* load obj->synchronization to ECX */
-               x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoObject, synchronisation), 4);
+               x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 4);
 
                if (mono_gc_is_moving ()) {
                        /*if bit zero is set it's a thin hash*/
@@ -865,7 +827,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
                        code = mono_x86_emit_tls_get (code, X86_EDX, mono_thread_get_tls_offset ());
                }
                /* load TID into EDX */
-               x86_mov_reg_membase (code, X86_EDX, X86_EDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 4);
+               x86_mov_reg_membase (code, X86_EDX, X86_EDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 4);
 
                /* is synchronization->owner null? */
                x86_alu_membase_imm (code, X86_CMP, X86_ECX, owner_offset, 0);
@@ -975,7 +937,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
                x86_branch8 (code, X86_CC_Z, -1, 1);
 
                /* load obj->synchronization to ECX */
-               x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoObject, synchronisation), 4);
+               x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 4);
 
                if (mono_gc_is_moving ()) {
                        /*if bit zero is set it's a thin hash*/
@@ -1006,7 +968,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
                        code = mono_x86_emit_tls_get (code, X86_EDX, mono_thread_get_tls_offset ());
                }
                /* load TID into EDX */
-               x86_mov_reg_membase (code, X86_EDX, X86_EDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 4);
+               x86_mov_reg_membase (code, X86_EDX, X86_EDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 4);
                /* is synchronization->owner == TID */
                x86_alu_membase_reg (code, X86_CMP, X86_ECX, owner_offset, X86_EDX);
                /* if no, jump to actual trampoline */
@@ -1121,7 +1083,7 @@ mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
 
        if (mono_get_jit_tls_offset () != -1) {
                code = mono_x86_emit_tls_get (code, X86_EAX, mono_get_jit_tls_offset ());
-               x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 4);
+               x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 4);
        } else {
                /*Slow path uses a c helper*/
                x86_call_code (code, handler_block_trampoline_helper);
index 8a7d46eae49127b91fc61b1926694b968ac027b9..a993350aefd6bbc2f22b4792f563aefc00468201 100644 (file)
@@ -307,10 +307,23 @@ mono_print_unwind_info (guint8 *unwind_info, int unwind_info_len)
                                offset = decode_sleb128 (p, &p) * DWARF_DATA_ALIGN;
                                printf ("CFA: [%x] offset_extended_sf: %s at cfa-0x%x\n", pos, mono_arch_regname (mono_dwarf_reg_to_hw_reg (reg)), -offset);
                                break;
+                       case DW_CFA_same_value:
+                               reg = decode_uleb128 (p, &p);
+                               printf ("CFA: [%x] same_value: %s\n", pos, mono_arch_regname (mono_dwarf_reg_to_hw_reg (reg)));
+                               break;
                        case DW_CFA_advance_loc4:
                                pos += read32 (p);
                                p += 4;
                                break;
+                       case DW_CFA_remember_state:
+                               printf ("CFA: [%x] remember_state\n", pos);
+                               break;
+                       case DW_CFA_restore_state:
+                               printf ("CFA: [%x] restore_state\n", pos);
+                               break;
+                       case DW_CFA_mono_advance_loc:
+                               printf ("CFA: [%x] mono_advance_loc\n", pos);
+                               break;
                        default:
                                g_assert_not_reached ();
                        }
@@ -348,9 +361,31 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len)
                /* Convert the register from the hw encoding to the dwarf encoding */
                reg = mono_hw_reg_to_dwarf_reg (op->reg);
 
+               if (op->op == DW_CFA_mono_advance_loc) {
+                       /* This advances loc to its location */
+                       loc = op->when;
+               }
+
                /* Emit an advance_loc if neccesary */
                while (op->when > loc) {
-                       if (op->when - loc < 32) {
+                       if (op->when - loc > 65536) {
+                               *p ++ = DW_CFA_advance_loc4;
+                               *(guint32*)p = (guint32)(op->when - loc);
+                               g_assert (read32 (p) == (guint32)(op->when - loc));
+                               p += 4;
+                               loc = op->when;
+                       } else if (op->when - loc > 256) {
+                               *p ++ = DW_CFA_advance_loc2;
+                               *(guint16*)p = (guint16)(op->when - loc);
+                               g_assert (read16 (p) == (guint32)(op->when - loc));
+                               p += 2;
+                               loc = op->when;
+                       } else if (op->when - loc >= 32) {
+                               *p ++ = DW_CFA_advance_loc1;
+                               *(guint8*)p = (guint8)(op->when - loc);
+                               p += 1;
+                               loc = op->when;
+                       } else if (op->when - loc < 32) {
                                *p ++ = DW_CFA_advance_loc | (op->when - loc);
                                loc = op->when;
                        } else {
@@ -373,6 +408,10 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len)
                        *p ++ = op->op;
                        encode_uleb128 (reg, p, &p);
                        break;
+               case DW_CFA_same_value:
+                       *p ++ = op->op;
+                       encode_uleb128 (reg, p, &p);
+                       break;
                case DW_CFA_offset:
                        if (reg > 63) {
                                *p ++ = DW_CFA_offset_extended_sf;
@@ -383,6 +422,15 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len)
                                encode_uleb128 (op->val / DWARF_DATA_ALIGN, p, &p);
                        }
                        break;
+               case DW_CFA_remember_state:
+               case DW_CFA_restore_state:
+                       *p ++ = op->op;
+                       break;
+               case DW_CFA_mono_advance_loc:
+                       /* Only one location is supported */
+                       g_assert (op->val == 0);
+                       *p ++ = op->op;
+                       break;
                default:
                        g_assert_not_reached ();
                        break;
@@ -416,6 +464,12 @@ print_dwarf_state (int cfa_reg, int cfa_offset, int ip, int nregs, Loc *location
        printf ("\n");
 }
 
+typedef struct {
+       Loc locations [NUM_REGS];
+       guint8 reg_saved [NUM_REGS];
+       int cfa_reg, cfa_offset;
+} UnwindState;
+
 /*
  * Given the state of the current frame as stored in REGS, execute the unwind 
  * operations in unwind_info until the location counter reaches POS. The result is 
@@ -423,11 +477,13 @@ print_dwarf_state (int cfa_reg, int cfa_offset, int ip, int nregs, Loc *location
  * If SAVE_LOCATIONS is non-NULL, it should point to an array of size SAVE_LOCATIONS_LEN.
  * On return, the nth entry will point to the address of the stack slot where register
  * N was saved, or NULL, if it was not saved by this frame.
+ * MARK_LOCATIONS should contain the locations marked by mono_emit_unwind_op_mark_loc (), if any.
  * This function is signal safe.
  */
 void
 mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, 
-                                  guint8 *start_ip, guint8 *end_ip, guint8 *ip, mgreg_t *regs, int nregs,
+                                  guint8 *start_ip, guint8 *end_ip, guint8 *ip, guint8 **mark_locations,
+                                  mgreg_t *regs, int nregs,
                                   mgreg_t **save_locations, int save_locations_len,
                                   guint8 **out_cfa)
 {
@@ -436,6 +492,8 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
        int i, pos, reg, cfa_reg, cfa_offset, offset;
        guint8 *p;
        guint8 *cfa_val;
+       UnwindState state_stack [1];
+       int state_stack_pos;
 
        memset (reg_saved, 0, sizeof (reg_saved));
 
@@ -443,6 +501,7 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
        pos = 0;
        cfa_reg = -1;
        cfa_offset = -1;
+       state_stack_pos = 0;
        while (pos <= ip - start_ip && p < unwind_info + unwind_info_len) {
                int op = *p & 0xc0;
 
@@ -489,10 +548,42 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
                                locations [reg].loc_type = LOC_OFFSET;
                                locations [reg].offset = offset * DWARF_DATA_ALIGN;
                                break;
+                       case DW_CFA_same_value:
+                               reg = decode_uleb128 (p, &p);
+                               locations [reg].loc_type = LOC_SAME;
+                               break;
+                       case DW_CFA_advance_loc1:
+                               pos += *p;
+                               p += 1;
+                               break;
+                       case DW_CFA_advance_loc2:
+                               pos += read16 (p);
+                               p += 2;
+                               break;
                        case DW_CFA_advance_loc4:
                                pos += read32 (p);
                                p += 4;
                                break;
+                       case DW_CFA_remember_state:
+                               g_assert (state_stack_pos == 0);
+                               memcpy (&state_stack [0].locations, &locations, sizeof (locations));
+                               memcpy (&state_stack [0].reg_saved, &reg_saved, sizeof (reg_saved));
+                               state_stack [0].cfa_reg = cfa_reg;
+                               state_stack [0].cfa_offset = cfa_offset;
+                               state_stack_pos ++;
+                               break;
+                       case DW_CFA_restore_state:
+                               g_assert (state_stack_pos == 1);
+                               state_stack_pos --;
+                               memcpy (&locations, &state_stack [0].locations, sizeof (locations));
+                               memcpy (&reg_saved, &state_stack [0].reg_saved, sizeof (reg_saved));
+                               cfa_reg = state_stack [0].cfa_reg;
+                               cfa_offset = state_stack [0].cfa_offset;
+                               break;
+                       case DW_CFA_mono_advance_loc:
+                               g_assert (mark_locations [0]);
+                               pos = mark_locations [0] - start_ip;
+                               break;
                        default:
                                g_assert_not_reached ();
                        }
@@ -555,7 +646,7 @@ mono_unwind_cleanup (void)
  * A copy is made of the unwind info.
  * This function is useful for two reasons:
  * - many methods have the same unwind info
- * - MonoJitInfo->used_regs is an int so it can't store the pointer to the unwind info
+ * - MonoJitInfo->unwind_info is an int so it can't store the pointer to the unwind info
  */
 guint32
 mono_cache_unwind_info (guint8 *unwind_info, guint32 unwind_info_len)
index 96c79ef2712546a66db9b65f7ed299baafc56c09..2a674e579a2910519757e86ea1ff2d71e2b4b1ea 100644 (file)
@@ -20,6 +20,7 @@
 #if defined (HAVE_SYS_ZLIB)
 #include <zlib.h>
 #endif
+#include <glib.h>
 #include <mono/metadata/profiler.h>
 #include <mono/metadata/object.h>
 #include <mono/metadata/debug-helpers.h>
@@ -457,9 +458,12 @@ dump_counters (void)
                }
        } else if (counters_sort_mode == COUNTERS_SORT_TIME) {
                for (ctimestamp = counters_timestamps; ctimestamp; ctimestamp = ctimestamp->next) {
-                       fprintf (outfile, "\t%lld:%02lld:%02lld:%02lld.%03lld:\n", ctimestamp->value / 1000 / 60 / 60 / 24 % 1000,
-                               ctimestamp->value / 1000 / 60 / 60 % 24, ctimestamp->value / 1000 / 60 % 60,
-                               ctimestamp->value / 1000 % 60, ctimestamp->value % 1000);
+                       fprintf (outfile, "\t%llu:%02llu:%02llu:%02llu.%03llu:\n",
+                               (unsigned long long) (ctimestamp->value / 1000 / 60 / 60 / 24 % 1000),
+                               (unsigned long long) (ctimestamp->value / 1000 / 60 / 60 % 24),
+                               (unsigned long long) (ctimestamp->value / 1000 / 60 % 60),
+                               (unsigned long long) (ctimestamp->value / 1000 % 60),
+                               (unsigned long long) (ctimestamp->value % 1000));
 
                        for (csection = ctimestamp->sections; csection; csection = csection->next) {
                                fprintf (outfile, "\t\t%s:\n", section_name (csection->value));
@@ -485,9 +489,12 @@ dump_counters (void)
                                        counter->name, type_name (counter->type), unit_name (counter->unit), variance_name (counter->variance));
 
                                for (cvalue = counter->values; cvalue; cvalue = cvalue->next) {
-                                       snprintf (strtimestamp, sizeof (strtimestamp), "%lld:%02lld:%02lld:%02lld.%03lld", cvalue->timestamp / 1000 / 60 / 60 / 24 % 1000,
-                                               cvalue->timestamp / 1000 / 60 / 60 % 24, cvalue->timestamp / 1000 / 60 % 60,
-                                               cvalue->timestamp / 1000 % 60, cvalue->timestamp % 1000);
+                                       snprintf (strtimestamp, sizeof (strtimestamp), "%llu:%02llu:%02llu:%02llu.%03llu",
+                                               (unsigned long long) (cvalue->timestamp / 1000 / 60 / 60 / 24 % 1000),
+                                               (unsigned long long) (cvalue->timestamp / 1000 / 60 / 60 % 24),
+                                               (unsigned long long) (cvalue->timestamp / 1000 / 60 % 60),
+                                               (unsigned long long) (cvalue->timestamp / 1000 % 60),
+                                               (unsigned long long) (cvalue->timestamp % 1000));
 
                                        dump_counters_value (counter, "\t\t\t%s", strtimestamp, cvalue->buffer);
                                }
@@ -852,9 +859,9 @@ static void
 print_usym (UnmanagedSymbol* um)
 {
        if (um->parent)
-               fprintf (outfile, "\t%6d %6.2f %-36s in %s\n", um->sample_hits, um->sample_hits*100.0/num_stat_samples, um->name, um->parent->name);
+               fprintf (outfile, "\t%6zd %6.2f %-36s in %s\n", um->sample_hits, um->sample_hits*100.0/num_stat_samples, um->name, um->parent->name);
        else
-               fprintf (outfile, "\t%6d %6.2f %s\n", um->sample_hits, um->sample_hits*100.0/num_stat_samples, um->name);
+               fprintf (outfile, "\t%6zd %6.2f %s\n", um->sample_hits, um->sample_hits*100.0/num_stat_samples, um->name);
 }
 
 static int
@@ -1333,7 +1340,7 @@ heap_shot_mark_objects (HeapShot *hs)
                        fprintf (outfile, "object %p (%s) unmarked\n", (void*)hs->objects_hash [i], hs->objects_hash [i]->hklass->klass->name);
                }
        }
-       fprintf (outfile, "Total unmarked: %d/%d\n", num_unmarked, hs->objects_count);
+       fprintf (outfile, "Total unmarked: %zd/%zd\n", num_unmarked, hs->objects_count);
        free (marks);
 }
 
@@ -1426,7 +1433,7 @@ typedef struct _ThreadContext ThreadContext;
 typedef struct {
        FILE *file;
 #if defined (HAVE_SYS_ZLIB)
-       gzFile *gzfile;
+       gzFile gzfile;
 #endif
        unsigned char *buf;
        int size;
@@ -1840,7 +1847,7 @@ tracked_creation (uintptr_t obj, ClassDesc *cd, uint64_t size, BackTrace *bt, ui
        for (i = 0; i < num_tracked_objects; ++i) {
                if (tracked_objects [i] != obj)
                        continue;
-               fprintf (outfile, "Object %p created (%s, %llu bytes) at %.3f secs.\n", (void*)obj, cd->name, size, (timestamp - startup_time)/1000000000.0);
+               fprintf (outfile, "Object %p created (%s, %llu bytes) at %.3f secs.\n", (void*)obj, cd->name, (unsigned long long) size, (timestamp - startup_time)/1000000000.0);
                if (bt && bt->count) {
                        int k;
                        for (k = 0; k < bt->count; ++k)
@@ -1929,7 +1936,7 @@ decode_buffer (ProfContext *ctx)
        thread_id = read_int64 (p + 32);
        method_base = read_int64 (p + 40);
        if (debug)
-               fprintf (outfile, "buf: thread:%x, len: %d, time: %llu, file offset: %llu\n", thread_id, len, time_base, file_offset);
+               fprintf (outfile, "buf: thread:%zx, len: %d, time: %llu, file offset: %llu\n", thread_id, len, (unsigned long long) time_base, (unsigned long long) file_offset);
        thread = load_thread (ctx, thread_id);
        if (!load_data (ctx, len))
                return 0;
@@ -1956,7 +1963,7 @@ decode_buffer (ProfContext *ctx)
                        if (subtype == TYPE_GC_RESIZE) {
                                uint64_t new_size = decode_uleb128 (p, &p);
                                if (debug)
-                                       fprintf (outfile, "gc heap resized to %llu\n", new_size);
+                                       fprintf (outfile, "gc heap resized to %llu\n", (unsigned long long) new_size);
                                gc_resizes++;
                                if (new_size > max_heap_size)
                                        max_heap_size = new_size;
@@ -1964,7 +1971,7 @@ decode_buffer (ProfContext *ctx)
                                uint64_t ev = decode_uleb128 (p, &p);
                                int gen = decode_uleb128 (p, &p);
                                if (debug)
-                                       fprintf (outfile, "gc event for gen%d: %s at %llu (thread: 0x%x)\n", gen, gc_event_name (ev), time_base, thread->thread_id);
+                                       fprintf (outfile, "gc event for gen%d: %s at %llu (thread: 0x%zx)\n", gen, gc_event_name (ev), (unsigned long long) time_base, thread->thread_id);
                                if (gen > 2) {
                                        fprintf (outfile, "incorrect gc gen: %d\n", gen);
                                        break;
@@ -2033,7 +2040,7 @@ decode_buffer (ProfContext *ctx)
                                        return 0;
                                }
                                if (debug)
-                                       fprintf (outfile, "loaded class %p (%s in %p) at %llu\n", (void*)(ptr_base + ptrdiff), p, (void*)(ptr_base + imptrdiff), time_base);
+                                       fprintf (outfile, "loaded class %p (%s in %p) at %llu\n", (void*)(ptr_base + ptrdiff), p, (void*)(ptr_base + imptrdiff), (unsigned long long) time_base);
                                if (!error)
                                        add_class (ptr_base + ptrdiff, (char*)p);
                                while (*p) p++;
@@ -2045,7 +2052,7 @@ decode_buffer (ProfContext *ctx)
                                        return 0;
                                }
                                if (debug)
-                                       fprintf (outfile, "loaded image %p (%s) at %llu\n", (void*)(ptr_base + ptrdiff), p, time_base);
+                                       fprintf (outfile, "loaded image %p (%s) at %llu\n", (void*)(ptr_base + ptrdiff), p, (unsigned long long) time_base);
                                if (!error)
                                        add_image (ptr_base + ptrdiff, (char*)p);
                                while (*p) p++;
@@ -2080,7 +2087,7 @@ decode_buffer (ProfContext *ctx)
                        LOG_TIME (time_base, tdiff);
                        time_base += tdiff;
                        if (debug)
-                               fprintf (outfile, "alloced object %p, size %llu (%s) at %llu\n", (void*)OBJ_ADDR (objdiff), len, lookup_class (ptr_base + ptrdiff)->name, time_base);
+                               fprintf (outfile, "alloced object %p, size %llu (%s) at %llu\n", (void*)OBJ_ADDR (objdiff), (unsigned long long) len, lookup_class (ptr_base + ptrdiff)->name, (unsigned long long) time_base);
                        if (has_bt) {
                                num_bt = 8;
                                frames = decode_bt (sframes, &num_bt, p, &p, ptr_base);
@@ -2149,13 +2156,13 @@ decode_buffer (ProfContext *ctx)
                case TYPE_HEAP: {
                        int subtype = *p & 0xf0;
                        if (subtype == TYPE_HEAP_OBJECT) {
-                               HeapObjectDesc *ho;
+                               HeapObjectDesc *ho = NULL;
                                int i;
                                intptr_t objdiff = decode_sleb128 (p + 1, &p);
                                intptr_t ptrdiff = decode_sleb128 (p, &p);
                                uint64_t size = decode_uleb128 (p, &p);
                                uintptr_t num = decode_uleb128 (p, &p);
-                               uintptr_t ref_offset;
+                               uintptr_t ref_offset = 0;
                                uintptr_t last_obj_offset = 0;
                                ClassDesc *cd = lookup_class (ptr_base + ptrdiff);
                                if (size) {
@@ -2182,10 +2189,10 @@ decode_buffer (ProfContext *ctx)
                                                track_obj_reference (OBJ_ADDR (obj1diff), OBJ_ADDR (objdiff), cd);
                                }
                                if (debug && size)
-                                       fprintf (outfile, "traced object %p, size %llu (%s), refs: %d\n", (void*)OBJ_ADDR (objdiff), size, cd->name, num);
+                                       fprintf (outfile, "traced object %p, size %llu (%s), refs: %zd\n", (void*)OBJ_ADDR (objdiff), (unsigned long long) size, cd->name, num);
                        } else if (subtype == TYPE_HEAP_ROOT) {
                                uintptr_t num = decode_uleb128 (p + 1, &p);
-                               uintptr_t gc_num = decode_uleb128 (p, &p);
+                               uintptr_t gc_num G_GNUC_UNUSED = decode_uleb128 (p, &p);
                                int i;
                                for (i = 0; i < num; ++i) {
                                        intptr_t objdiff = decode_sleb128 (p, &p);
@@ -2389,7 +2396,7 @@ decode_buffer (ProfContext *ctx)
                                /* un unmanaged binary loaded in memory */
                                uint64_t tdiff = decode_uleb128 (p + 1, &p);
                                uintptr_t addr = decode_sleb128 (p, &p);
-                               uint64_t offset = decode_uleb128 (p, &p);
+                               uint64_t offset G_GNUC_UNUSED = decode_uleb128 (p, &p);
                                uintptr_t size = decode_uleb128 (p, &p);
                                char *name;
                                LOG_TIME (time_base, tdiff);
@@ -2403,13 +2410,14 @@ decode_buffer (ProfContext *ctx)
                        } else if (subtype == TYPE_SAMPLE_COUNTERS_DESC) {
                                uint64_t i, len = decode_uleb128 (p + 1, &p);
                                for (i = 0; i < len; i++) {
+                                       uint64_t type, unit, variance, index;
                                        uint64_t section = decode_uleb128 (p, &p);
                                        char *name = pstrdup ((char*)p);
                                        while (*p++);
-                                       uint64_t type = decode_uleb128 (p, &p);
-                                       uint64_t unit = decode_uleb128 (p, &p);
-                                       uint64_t variance = decode_uleb128 (p, &p);
-                                       uint64_t index = decode_uleb128 (p, &p);
+                                       type = decode_uleb128 (p, &p);
+                                       unit = decode_uleb128 (p, &p);
+                                       variance = decode_uleb128 (p, &p);
+                                       index = decode_uleb128 (p, &p);
                                        add_counter ((int)section, name, (int)type, (int)unit, (int)variance, (int)index);
                                }
                        } else if (subtype == TYPE_SAMPLE_COUNTERS) {
@@ -2419,7 +2427,7 @@ decode_buffer (ProfContext *ctx)
                                uint64_t timestamp = decode_uleb128 (p + 1, &p);
                                uint64_t time_between = timestamp / 1000 * 1000 * 1000 * 1000 + startup_time;
                                while (1) {
-                                       uint64_t index = decode_uleb128 (p, &p);
+                                       uint64_t type, index = decode_uleb128 (p, &p);
                                        if (index == 0)
                                                break;
 
@@ -2430,7 +2438,7 @@ decode_buffer (ProfContext *ctx)
                                                }
                                        }
 
-                                       uint64_t type = decode_uleb128 (p, &p);
+                                       type = decode_uleb128 (p, &p);
 
                                        value = calloc (1, sizeof (CounterValue));
                                        value->timestamp = timestamp;
@@ -2486,7 +2494,7 @@ decode_buffer (ProfContext *ctx)
                        break;
                }
                default:
-                       fprintf (outfile, "unhandled profiler event: 0x%x at file offset: %llu + %d (len: %d\n)\n", *p, file_offset, p - ctx->buf, len);
+                       fprintf (outfile, "unhandled profiler event: 0x%x at file offset: %llu + %lld (len: %d\n)\n", *p, (unsigned long long) file_offset, (long long) (p - ctx->buf), len);
                        exit (1);
                }
        }
@@ -2590,7 +2598,7 @@ dump_traces (TraceDesc *traces, const char *desc)
                bt = traces->traces [j].bt;
                if (!bt->count)
                        continue;
-               fprintf (outfile, "\t%llu %s from:\n", traces->traces [j].count, desc);
+               fprintf (outfile, "\t%llu %s from:\n", (unsigned long long) traces->traces [j].count, desc);
                for (k = 0; k < bt->count; ++k)
                        fprintf (outfile, "\t\t%s\n", bt->methods [k]->name);
        }
@@ -2611,12 +2619,12 @@ dump_exceptions (void)
 {
        int i;
        fprintf (outfile, "\nException summary\n");
-       fprintf (outfile, "\tThrows: %llu\n", throw_count);
+       fprintf (outfile, "\tThrows: %llu\n", (unsigned long long) throw_count);
        dump_traces (&exc_traces, "throws");
        for (i = 0; i <= MONO_EXCEPTION_CLAUSE_FAULT; ++i) {
                if (!clause_summary [i])
                        continue;
-               fprintf (outfile, "\tExecuted %s clauses: %llu\n", clause_name (i), clause_summary [i]);
+               fprintf (outfile, "\tExecuted %s clauses: %llu\n", clause_name (i), (unsigned long long) clause_summary [i]);
        }
 }
 
@@ -2656,9 +2664,9 @@ dump_monitors (void)
                        mdesc->wait_time/1000000000.0, mdesc->max_wait_time/1000000000.0, mdesc->wait_time/1000000000.0/mdesc->contentions);
                dump_traces (&mdesc->traces, "contentions");
        }
-       fprintf (outfile, "\tLock contentions: %llu\n", monitor_contention);
-       fprintf (outfile, "\tLock acquired: %llu\n", monitor_acquired);
-       fprintf (outfile, "\tLock failures: %llu\n", monitor_failed);
+       fprintf (outfile, "\tLock contentions: %llu\n", (unsigned long long) monitor_contention);
+       fprintf (outfile, "\tLock acquired: %llu\n", (unsigned long long) monitor_acquired);
+       fprintf (outfile, "\tLock failures: %llu\n", (unsigned long long) monitor_failed);
 }
 
 static void
@@ -2667,20 +2675,25 @@ dump_gcs (void)
        int i;
        fprintf (outfile, "\nGC summary\n");
        fprintf (outfile, "\tGC resizes: %d\n", gc_resizes);
-       fprintf (outfile, "\tMax heap size: %llu\n", max_heap_size);
-       fprintf (outfile, "\tObject moves: %llu\n", gc_object_moves);
+       fprintf (outfile, "\tMax heap size: %llu\n", (unsigned long long) max_heap_size);
+       fprintf (outfile, "\tObject moves: %llu\n", (unsigned long long) gc_object_moves);
        for (i = 0; i < 3; ++i) {
                if (!gc_info [i].count)
                        continue;
                fprintf (outfile, "\tGen%d collections: %d, max time: %lluus, total time: %lluus, average: %lluus\n",
-                       i, gc_info [i].count, gc_info [i].max_time / 1000, gc_info [i].total_time / 1000,
-                       gc_info [i].total_time / gc_info [i].count / 1000);
+                       i, gc_info [i].count,
+                       (unsigned long long) (gc_info [i].max_time / 1000),
+                       (unsigned long long) (gc_info [i].total_time / 1000),
+                       (unsigned long long) (gc_info [i].total_time / gc_info [i].count / 1000));
        }
        for (i = 0; i < 3; ++i) {
                if (!handle_info [i].max_live)
                        continue;
                fprintf (outfile, "\tGC handles %s: created: %llu, destroyed: %llu, max: %llu\n",
-                       get_handle_name (i), handle_info [i].created, handle_info [i].destroyed, handle_info [i].max_live);
+                       get_handle_name (i),
+                       (unsigned long long) (handle_info [i].created),
+                       (unsigned long long) (handle_info [i].destroyed),
+                       (unsigned long long) (handle_info [i].max_live));
                dump_traces (&handle_info [i].traces, "created");
        }
 }
@@ -2734,11 +2747,15 @@ dump_allocations (void)
                        fprintf (outfile, "\nAllocation summary\n");
                        fprintf (outfile, "%10s %10s %8s Type name\n", "Bytes", "Count", "Average");
                }
-               fprintf (outfile, "%10llu %10d %8llu %s\n", cd->alloc_size, cd->allocs, cd->alloc_size / cd->allocs, cd->name);
+               fprintf (outfile, "%10llu %10zd %8llu %s\n",
+                       (unsigned long long) (cd->alloc_size),
+                       cd->allocs,
+                       (unsigned long long) (cd->alloc_size / cd->allocs),
+                       cd->name);
                dump_traces (&cd->traces, "bytes");
        }
        if (allocs)
-               fprintf (outfile, "Total memory allocated: %llu bytes in %d objects\n", size, allocs);
+               fprintf (outfile, "Total memory allocated: %llu bytes in %zd objects\n", (unsigned long long) size, allocs);
 }
 
 enum {
@@ -2824,11 +2841,15 @@ dump_methods (void)
                        fprintf (outfile, "\nMethod call summary\n");
                        fprintf (outfile, "%8s %8s %10s Method name\n", "Total(ms)", "Self(ms)", "Calls");
                }
-               fprintf (outfile, "%8llu %8llu %10llu %s\n", msecs, smsecs, cd->calls, cd->name);
+               fprintf (outfile, "%8llu %8llu %10llu %s\n",
+                       (unsigned long long) (msecs),
+                       (unsigned long long) (smsecs),
+                       (unsigned long long) (cd->calls),
+                       cd->name);
                dump_traces (&cd->traces, "calls");
        }
        if (calls)
-               fprintf (outfile, "Total calls: %llu\n", calls);
+               fprintf (outfile, "Total calls: %llu\n", (unsigned long long) calls);
 }
 
 static int
@@ -2873,7 +2894,9 @@ dump_rev_claases (HeapClassRevRef *revs, int count)
                return;
        for (j = 0; j < count; ++j) {
                HeapClassDesc *cd = revs [j].klass;
-               fprintf (outfile, "\t\t%llu references from: %s\n", revs [j].count, cd->klass->name);
+               fprintf (outfile, "\t\t%llu references from: %s\n",
+                       (unsigned long long) (revs [j].count),
+                       cd->klass->name);
        }
 }
 
@@ -2897,8 +2920,12 @@ heap_shot_summary (HeapShot *hs, int hs_num, HeapShot *last_hs)
        }
        hs->sorted = sorted;
        qsort (sorted, ccount, sizeof (void*), compare_heap_class);
-       fprintf (outfile, "\n\tHeap shot %d at %.3f secs: size: %llu, object count: %llu, class count: %d, roots: %d\n",
-               hs_num, (hs->timestamp - startup_time)/1000000000.0, size, count, ccount, hs->num_roots);
+       fprintf (outfile, "\n\tHeap shot %d at %.3f secs: size: %llu, object count: %llu, class count: %d, roots: %zd\n",
+               hs_num,
+               (hs->timestamp - startup_time)/1000000000.0,
+               (unsigned long long) (size),
+               (unsigned long long) (count),
+               ccount, hs->num_roots);
        if (!verbose && ccount > 30)
                ccount = 30;
        fprintf (outfile, "\t%10s %10s %8s Class name\n", "Bytes", "Count", "Average");
@@ -2909,11 +2936,15 @@ heap_shot_summary (HeapShot *hs, int hs_num, HeapShot *last_hs)
                cd = sorted [i];
                if (last_hs)
                        ocd = heap_class_lookup (last_hs, cd->klass);
-               fprintf (outfile, "\t%10llu %10llu %8llu %s", cd->total_size, cd->count, cd->total_size / cd->count, cd->klass->name);
+               fprintf (outfile, "\t%10llu %10llu %8llu %s",
+                       (unsigned long long) (cd->total_size),
+                       (unsigned long long) (cd->count),
+                       (unsigned long long) (cd->total_size / cd->count),
+                       cd->klass->name);
                if (ocd) {
                        int64_t bdiff = cd->total_size - ocd->total_size;
                        int64_t cdiff = cd->count - ocd->count;
-                       fprintf (outfile, " (bytes: %+lld, count: %+lld)\n", bdiff, cdiff);
+                       fprintf (outfile, " (bytes: %+lld, count: %+lld)\n", (long long) bdiff, (long long) cdiff);
                } else {
                        fprintf (outfile, "\n");
                }
@@ -2928,7 +2959,7 @@ heap_shot_summary (HeapShot *hs, int hs_num, HeapShot *last_hs)
                assert (cd->rev_count == k);
                qsort (rev_sorted, cd->rev_count, sizeof (HeapClassRevRef), compare_rev_class);
                if (cd->root_references)
-                       fprintf (outfile, "\t\t%d root references (%d pinning)\n", cd->root_references, cd->pinned_references);
+                       fprintf (outfile, "\t\t%zd root references (%zd pinning)\n", cd->root_references, cd->pinned_references);
                dump_rev_claases (rev_sorted, cd->rev_count);
                free (rev_sorted);
        }
index 16b9b781ae5d4ba56c9a52fe02fc1c8625733dcd..f5ca7472a1c10e2e343589d0bacc77b76e65aac5 100644 (file)
@@ -66,8 +66,7 @@
 #include <zlib.h>
 #endif
 
-/* the architecture needs a memory fence */
-#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__arm__))
+#if defined(__linux__)
 #include <unistd.h>
 #include <sys/syscall.h>
 #include "perf_event.h"
@@ -354,7 +353,12 @@ struct _LogBuffer {
        unsigned char buf [1];
 };
 
-#define ENTER_LOG(lb,str) if ((lb)->locked) {write(2, str, strlen(str)); write(2, "\n", 1);return;} else {(lb)->locked++;}
+static inline void
+ign_res (int G_GNUC_UNUSED unused, ...)
+{
+}
+
+#define ENTER_LOG(lb,str) if ((lb)->locked) {ign_res (write(2, str, strlen(str))); ign_res (write(2, "\n", 1));return;} else {(lb)->locked++;}
 #define EXIT_LOG(lb) (lb)->locked--;
 
 typedef struct _StatBuffer StatBuffer;
@@ -379,7 +383,7 @@ struct _MonoProfiler {
        StatBuffer *stat_buffers;
        FILE* file;
 #if defined (HAVE_SYS_ZLIB)
-       gzFile *gzfile;
+       gzFile gzfile;
 #endif
        uint64_t startup_time;
        int pipe_output;
@@ -1233,7 +1237,7 @@ mono_sample_hit (MonoProfiler *profiler, unsigned char *ip, void *context)
                char buf [256];
                snprintf (buf, sizeof (buf), "hit at %p in thread %p after %llu ms\n", ip, (void*)thread_id (), (unsigned long long int)elapsed/100);
                len = strlen (buf);
-               write (2, buf, len);
+               ign_res (write (2, buf, len));
        }
        sbuf = profiler->stat_buffers;
        if (!sbuf)
@@ -1251,22 +1255,22 @@ mono_sample_hit (MonoProfiler *profiler, unsigned char *ip, void *context)
                do {
                        oldsb = profiler->stat_buffers;
                        sbuf->next = oldsb;
-                       foundsb = InterlockedCompareExchangePointer ((volatile void**)&profiler->stat_buffers, sbuf, oldsb);
+                       foundsb = InterlockedCompareExchangePointer ((void * volatile*)&profiler->stat_buffers, sbuf, oldsb);
                } while (foundsb != oldsb);
                if (do_debug)
-                       write (2, "overflow\n", 9);
+                       ign_res (write (2, "overflow\n", 9));
                /* notify the helper thread */
                if (sbuf->next->next) {
                        char c = 0;
-                       write (profiler->pipes [1], &c, 1);
+                       ign_res (write (profiler->pipes [1], &c, 1));
                        if (do_debug)
-                               write (2, "notify\n", 7);
+                               ign_res (write (2, "notify\n", 7));
                }
        }
        do {
                old_data = sbuf->data;
                new_data = old_data + 4 + bt_data.count * 3;
-               data = InterlockedCompareExchangePointer ((volatile void**)&sbuf->data, new_data, old_data);
+               data = InterlockedCompareExchangePointer ((void * volatile*)&sbuf->data, new_data, old_data);
        } while (data != old_data);
        if (old_data >= sbuf->data_end)
                return; /* lost event */
@@ -1334,6 +1338,7 @@ add_code_pointer (uintptr_t ip)
        num_code_pages += add_code_page (code_pages, size_code_pages, ip & CPAGE_MASK);
 }
 
+#if defined(HAVE_DL_ITERATE_PHDR) && defined(ELFMAG0)
 static void
 dump_ubin (const char *filename, uintptr_t load_addr, uint64_t offset, uintptr_t size)
 {
@@ -1351,6 +1356,7 @@ dump_ubin (const char *filename, uintptr_t load_addr, uint64_t offset, uintptr_t
        memcpy (logbuffer->data, filename, len);
        logbuffer->data += len;
 }
+#endif
 
 static void
 dump_usym (const char *name, uintptr_t value, uintptr_t size)
@@ -1937,12 +1943,12 @@ counters_init_add_counter (MonoCounter *counter, gpointer data)
 static void
 counters_init (MonoProfiler *profiler)
 {
-       mono_counters_foreach (counters_init_add_counter, NULL);
-
        MonoCounterAgent *agent;
        LogBuffer *logbuffer;
        int size = 1 + 5, len = 0;
 
+       mono_counters_foreach (counters_init_add_counter, NULL);
+
        for (agent = counters; agent; agent = agent->next) {
                size += strlen (mono_counter_get_name (agent->counter)) + 1 + 5 * 5;
                len += 1;
@@ -1994,9 +2000,11 @@ counters_sample (MonoProfiler *profiler, uint64_t timestamp)
        emit_byte (logbuffer, TYPE_SAMPLE_COUNTERS | TYPE_SAMPLE);
        emit_uvalue (logbuffer, timestamp);
        for (agent = counters; agent; agent = agent->next) {
+               size_t size;
+
                counter = agent->counter;
 
-               size_t size = mono_counter_get_size (counter);
+               size = mono_counter_get_size (counter);
                if (size < 0) {
                        continue; // FIXME error
                } else if (size > buffer_size) {
@@ -2087,7 +2095,7 @@ log_shutdown (MonoProfiler *prof)
        if (prof->command_port) {
                char c = 1;
                void *res;
-               write (prof->pipes [1], &c, 1);
+               ign_res (write (prof->pipes [1], &c, 1));
                pthread_join (prof->helper_thread, &res);
        }
 #endif
index 8bf57a72f7c10e0e68e48ef63215d79e455a1a1c..9266dee403c1d5f91a6182e89ae820fb85c70c25 100644 (file)
@@ -275,7 +275,7 @@ alloc_buffer (int size)
        return ptr;
 #else
        ptr = mmap (NULL, size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
-       if (ptr == (void*)-1)
+       if (ptr == MAP_FAILED)
                return NULL;
        return ptr;
 #endif
index ee543ccd6e58611d4297e63dd625b09c2c48438d..a25de4b3525a07283ddbe9c065bb2f92b5181afc 100644 (file)
@@ -32,3 +32,4 @@
 /*.exe.dylib.dSYM
 /testlist
 /testlist.sorted
+/reflection-load-dir
index 79c6f9193240873966208cd91bf95f04661d2572..80c8f7e536a958dc27cee8c1ea2a2763a2f042e6 100644 (file)
@@ -1,6 +1,6 @@
 SUBDIRS = cas assemblyresolve gc-descriptors
 
-check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-cattr-type-load test_platform test-process-exit test-messages rm-empty-logs
+check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-cattr-type-load test-reflection-load-with-context test_platform test-process-exit test-messages rm-empty-logs
 check-full: test-sgen check-local
 check-parallel: compile-tests check-full
 
@@ -43,6 +43,7 @@ STRESS_TESTS_SRC=     \
        monitor-stress.cs       \
        thread-stress.cs        \
        gc-stress.cs            \
+       gc-graystack-stress.cs          \
        exit-stress.cs          \
        process-stress.cs       \
        assembly-load-stress.cs
@@ -398,7 +399,6 @@ BASE_TEST_CS_SRC=           \
        allow-synchronous-major.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 \
        sleep.cs
 
@@ -406,19 +406,20 @@ TEST_CS_SRC_DIST= \
        $(BASE_TEST_CS_SRC)     \
        async-exc-compilation.cs \
        filter-stack.cs \
-       finally_guard.cs
+       finally_guard.cs \
+       finally_block_ending_in_dead_bb.cs
 
 TEST_CS_SRC_GEN = \
        runtime-invoke.gen.cs \
        imt_big_iface_test.cs
 
 if AMD64
-TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs
+TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs
 # #651684
 PLATFORM_DISABLED_TESTS = finally_guard.exe
 else
 if X86
-TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs
+TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs
 else
 TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN)
 endif
@@ -434,7 +435,7 @@ endif
 if X86
 
 if HOST_WIN32
-PLATFORM_DISABLED_TESTS=async-exc-compilation.exe finally_guard.exe
+PLATFORM_DISABLED_TESTS=async-exc-compilation.exe finally_guard.exe finally_block_ending_in_dead_bb.exe
 endif
 
 endif
@@ -469,6 +470,7 @@ PLATFORM_DISABLED_TESTS= abort-stress-1.exe \
                          bug-70561.exe \
                          finalizer-abort.exe \
                          finally_guard.exe \
+                         finally_block_ending_in_dead_bb.exe \
                          main-returns-abort-resetabort.exe \
                          main-returns-background-abort-resetabort.exe \
                          thread6.exe \
@@ -551,7 +553,8 @@ DISABLED_TESTS=                     \
        bug-348522.2.exe        \
        bug-459094.exe \
        delegate-invoke.exe \
-       $(PLATFORM_DISABLED_TESTS)
+       $(PLATFORM_DISABLED_TESTS) \
+       $(EXTRA_DISABLED_TESTS)
 
 DISABLED_TESTS_WRENCH= \
        $(DISABLED_TESTS)       \
@@ -562,7 +565,8 @@ DISABLED_TESTS_WRENCH=      \
        assemblyresolve_event3.exe \
        delegate2.exe   \
        finally_guard.exe \
-       gc-altstack.exe
+       gc-altstack.exe \
+       generic-xdomain.2.exe
 
 AOT_DISABLED_TESTS=constraints-load.exe
 
@@ -892,6 +896,16 @@ test-cattr-type-load: TestDriver.dll custom-attr-errors.cs custom-attr-errors-li
        @echo "Testing custom-attribute-load-exceptions.exe..."
        @$(RUNTIME) custom-attr-errors.exe > custom-attr-errors.exe.stdout 2> custom-attr-errors.exe.stderr
 
+EXTRA_DIST += reflection-load-with-context-lib.cs reflection-load-with-context-second-lib.cs reflection-load-with-context.cs
+test-reflection-load-with-context: TestDriver.dll reflection-load-with-context-lib.cs reflection-load-with-context-second-lib.cs reflection-load-with-context.cs
+       rm -rf reflection-load-dir
+       mkdir reflection-load-dir
+       $(MCS) /t:library $(srcdir)/reflection-load-with-context-second-lib.cs -out:reflection-load-dir/reflection-load-with-context-second-lib.dll
+       $(MCS) /t:library -r:reflection-load-dir/reflection-load-with-context-second-lib.dll $(srcdir)/reflection-load-with-context-lib.cs -out:reflection-load-dir/reflection-load-with-context-lib.dll
+       $(MCS) reflection-load-with-context.cs
+       @echo "Testing reflection-load-with-context.cs.exe..."
+       @$(RUNTIME) reflection-load-with-context.exe > reflection-load-with-context.exe.stdout 2> reflection-load-with-context.exe.stderr
+
 
 EXTRA_DIST += debug-casts.cs
 # This depends on TLS, so its not ran by default
@@ -915,6 +929,7 @@ SGEN_TESTS =        \
        sgen-cementing-stress.exe       \
        sgen-case-23400.exe     \
        sgen-new-threads-dont-join-stw.exe      \
+       gc-graystack-stress.exe \
        bug-17590.exe
 
 SGEN_CONFIGURATIONS =  \
@@ -1236,7 +1251,7 @@ GSHARED_TESTS = \
                generic-sealed-virtual.2.exe generic-system-arrays.2.exe        \
                generic-stack-traces.2.exe generic-stack-traces2.2.exe          \
                bug-472600.2.exe bug-473482.2.exe bug-473999.2.exe              \
-               bug-479763.2.exe generic-xdomain.2.exe                          \
+               bug-479763.2.exe                                \
                generic-type-load-exception.2.exe bug-616463.exe        \
                bug-1147.exe
 
index 29489ad49467e599b7a27a9431597fa484d858e3..0e48d9081c045dc93a7260d5534bfd6e74ec3e91 100644 (file)
@@ -30,7 +30,9 @@ public class FinalizerException {
                        Environment.Exit (0);
                };
 
-               MakeException (1024);
+               var t = new Thread (delegate () { MakeException (1024); });
+               t.Start ();
+               t.Join ();
 
                GC.Collect ();
                GC.WaitForPendingFinalizers ();
index 9b9bf2dc3df4f6d98f2759cf9e1b2f97dcd24fe9..dde31cbc345b5c5bc1adff7db1d8959454b7234b 100644 (file)
@@ -6,35 +6,25 @@ class P {
 
        static public int count = 0;
        ~P () {
-               T.finalized = true;
-               Thread.Sleep (1000);
                // Console.WriteLine ("finalizer done");
                count++;
        }
 }
 
 class T {
-
-       static public bool finalized = false;
-
-       static void makeP () {
-               P p = new P ();
-               p = null;
-       }
-
        static int Main () {
-               var t = new Thread (makeP);
-               t.Start ();
-               t.Join ();
-
-               GC.Collect ();
-               while (!finalized) {
-                       Thread.Sleep (100);
+               for (int i = 0; i < 1000; ++i) {
+                       var t = new Thread (() => {
+                                       P p = new P ();
+                               });
+                       t.Start ();
+                       t.Join ();
+
+                       GC.Collect ();
+                       GC.WaitForPendingFinalizers ();
+                       if (P.count != i + 1)
+                               return 1;
                }
-               GC.WaitForPendingFinalizers ();
-
-               if (P.count == 0)
-                       return 1;
                return 0;
        }
 }
index 4daa22ba8066120ba05ae1c63c9e0c2aed2d4b06..54eca51ef5197e10332720ead06d5652bd9e8f7d 100755 (executable)
@@ -10,7 +10,7 @@ descriptor-tests.exe : descriptor-tests.cs
        $(MCS) -Warn:0 descriptor-tests.cs
 
 descriptor-tests.cs : descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py
-       -cp $^ .
+       if [ "$(srcdir)" != "$(builddir)" ]; then cp $^ .; fi
        $(srcdir)/gen-descriptor-tests.py >descriptor-tests.cs
 
 EXTRA_DIST = descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py
diff --git a/mono/tests/gc-graystack-stress.cs b/mono/tests/gc-graystack-stress.cs
new file mode 100644 (file)
index 0000000..7d711d9
--- /dev/null
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+
+class Program {
+       
+       class Node {
+               Node child;
+               Node sibling;
+
+               public Node (int depth) : this (depth, null) {}
+
+               public Node (int depth, Node sibling) {
+                       if (depth > 0)
+                               this.child = new Node (depth - 1);
+
+                       this.sibling = sibling;
+               }
+
+               public override String ToString () {
+                       return String.Format ("Node[child={0},sibling={1}]", this.child, this.sibling);
+               }
+       }
+       
+       /**
+        * Usage : width [depth [collections]]
+        *  - width : trigger the overflow
+        *  - depth : modify the cost difference of the overflow
+        *  - collections : # of collections to perform
+        */
+       public static void Main (String[] args) {
+               int width = 125;
+               if (args.Length > 0)
+                       width = Math.Max (width, Int32.Parse (args [0]));
+
+               int depth = 10000;
+               if (args.Length > 1)
+                       depth = Math.Max (depth, Int32.Parse (args [1]));
+
+               int collections = 100;
+               if (args.Length > 2)
+                       collections = Math.Max (collections, Int32.Parse (args [2]));
+
+               Node sibling = null;
+
+               for (int i = 0; i < width; i++) {
+                       sibling = new Node(depth, sibling);
+                       if (i > 0 && i % 10 == 0)
+                               Console.Write ("+");
+               }
+
+               for (int i = 0; i < collections; i++) {
+                       GC.Collect();
+                       if (i > 0 && i % 10 == 0)
+                               Console.Write (".");
+               }
+               Console.WriteLine ();
+       }
+}
index a4d02ab1431b7cf04c9fa9ef8aacc2532ea461f6..8a0d43f3a3660255097fa2cb59e9e21a2f399697 100644 (file)
@@ -3,6 +3,7 @@
 //
 
 using System;
+using System.Text;
 using System.Runtime.InteropServices;
 
 public class Tests {
@@ -37,6 +38,12 @@ public class Tests {
                [MarshalAs (UnmanagedType.ByValArray, SizeConst=2)] public char[] a2;
        }
 
+       [StructLayout (LayoutKind.Sequential, CharSet=CharSet.Ansi)]
+       public struct ByValTStrStruct {
+               [MarshalAs (UnmanagedType.ByValTStr, SizeConst=4)] public string s1;
+               public int i;
+       }
+
        [StructLayout (LayoutKind.Sequential, CharSet=CharSet.Unicode)]
        public struct ByValWStrStruct {
                [MarshalAs (UnmanagedType.ByValTStr, SizeConst=4)] public string s1;
@@ -184,6 +191,44 @@ public class Tests {
         public string Field3;
        }
 
+       public static int test_0_byvaltstr () {
+               ByValTStrStruct s = new ByValTStrStruct ();
+
+               IntPtr p2 = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (ByValTStrStruct)));
+               Marshal.StructureToPtr(s, p2, false);
+
+               /* Check that the ByValTStr is initialized correctly */
+               for (int i = 0; i < 4; ++i)
+                       if (Marshal.ReadByte (p2, i) != 0)
+                               return 31;
+
+               s.s1 = "ABCD";
+               s.i = 55;
+
+               Marshal.StructureToPtr(s, p2, false);
+
+               ByValTStrStruct s2 = (ByValTStrStruct)Marshal.PtrToStructure (p2, typeof (ByValTStrStruct));
+
+               /* The fourth char is lost because of null-termination */
+               if (s2.s1 != "ABC")
+                       return 32;
+
+               if (s2.i != 55)
+                       return 33;
+
+               // Check that decoding also respects the size, even when there is no null terminator
+               byte[] data = Encoding.ASCII.GetBytes ("ABCDXXXX");
+               int size = Marshal.SizeOf (typeof (ByValTStrStruct));
+               IntPtr buffer = Marshal.AllocHGlobal (size);
+               Marshal.Copy (data, 0, buffer, size);
+
+               s2 = (ByValTStrStruct)Marshal.PtrToStructure (buffer, typeof (ByValTStrStruct));
+               if (s2.s1 != "ABC")
+                       return 34;
+
+               return 0;
+       }
+
        public static int test_0_byvaltstr_unicode () {
                ByValWStrStruct s = new ByValWStrStruct ();
 
index 02cfbbd40a6cacef016398732a3dc4323c730413..640f4a04d7822e98699f3a79b4b144833f1bed78 100644 (file)
@@ -218,9 +218,9 @@ public class Test
                        if (Marshal.SizeOf (typeof (TestStruct10)) != 12)
                                return 16;
                } else {
-                       if (Marshal.SizeOf (typeof (TestStruct8)) != 16)
+                       if (Marshal.SizeOf (typeof (TestStruct8)) != 16 && Marshal.SizeOf (typeof (TestStruct8)) != 12)
                                return 14;
-                       if (Marshal.SizeOf (typeof (TestStruct10)) != 16)
+                       if (Marshal.SizeOf (typeof (TestStruct10)) != 16 && Marshal.SizeOf (typeof (TestStruct10)) != 12)
                                return 16;
                }
                if (Marshal.SizeOf (typeof (TestStruct9)) != 12)
diff --git a/mono/tests/reflection-load-with-context-lib.cs b/mono/tests/reflection-load-with-context-lib.cs
new file mode 100644 (file)
index 0000000..9aca41f
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+
+namespace B
+{
+       public class MyAttribute : Attribute {
+               public Type Type { get; set; }
+               public MyAttribute (Type t) {
+                       Type = t;
+               }
+               public override string ToString () {
+                       return "My " + Type;
+               }
+       }
+
+       [My (typeof (A.ClassA))]
+       public class ClassB { // A.AnotherClassA
+
+               public ClassB () {
+                       Console.WriteLine ("IN B");
+                       Console.WriteLine (typeof (ClassB).AssemblyQualifiedName);
+                       var t = Type.GetType ("B.ClassB, reflection-load-with-context-lib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
+                       Console.WriteLine (t);
+                       t = Type.GetType ("A.ClassA, reflection-load-with-context-second-lib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
+                       Console.WriteLine ("class a: {0}", t);
+                       if (t == null)
+                               throw new Exception ("FAIL");
+               }
+       }
+}
\ No newline at end of file
diff --git a/mono/tests/reflection-load-with-context-second-lib.cs b/mono/tests/reflection-load-with-context-second-lib.cs
new file mode 100644 (file)
index 0000000..4458aad
--- /dev/null
@@ -0,0 +1,7 @@
+using System;
+
+namespace A
+{
+       public class ClassA {}
+       public class AnotherClassA {}
+}
\ No newline at end of file
diff --git a/mono/tests/reflection-load-with-context.cs b/mono/tests/reflection-load-with-context.cs
new file mode 100644 (file)
index 0000000..4c791e7
--- /dev/null
@@ -0,0 +1,26 @@
+using System;
+using System.Reflection;
+using System.IO;
+
+class Driver {
+       static int Main () {
+               var src = Path.Combine (Path.GetDirectoryName (typeof (Driver).Assembly.Location), "reflection-load-dir");
+               var dep_asm = Assembly.UnsafeLoadFrom (Path.Combine (src, "reflection-load-with-context-lib.dll"));
+               var type = dep_asm.GetType ("B.ClassB");
+               var attr_type = dep_asm.GetType ("B.MyAttribute");
+
+               try {
+                       Activator.CreateInstance (type);
+               } catch (Exception) {
+                       return 1;
+               }
+
+               try {
+                       type.GetCustomAttributes (attr_type, false);
+               } catch (Exception) {
+                       return 2;
+               }
+               return 0;
+       }
+}
+
index 0e193c307ea9148a88efdaae00946e09fe3f484a..24d5b9db8d5e0f9f2962c77fae10992af87900e7 100755 (executable)
@@ -65,6 +65,13 @@ my %tests = (
                'arg-knob' => 0, # loops
                'ratio' => 20,
        },
+       'gc-graystack-stress' => {
+               'program' => 'gc-graystack-stress.exe',
+               # width, depth, collections
+               'args' => [125, 10000, 100],
+               'arg-knob' => 2, # loops
+               'ratio' => 10,
+       },
        'thread-stress' => {
                'program' => 'thread-stress.exe',
                # loops
index d4624ea5816e763a717f521051f6dc7e2554550a..0b2579b6eae506d53853af1b10d26cab116d90cd 100644 (file)
@@ -4,6 +4,7 @@
 /.libs
 /*.la
 /*.lo
+/*.trs
 /test-gc-memfuncs
 /test-mono-linked-list-set
 /test-sgen-qsort
index 70ba8ab3a5e12ee23975fe5d4167cc8422a9d2e8..23797f64633078f2982335abc71e2341cab33041 100644 (file)
@@ -11,6 +11,7 @@ endif
 if !CROSS_COMPILE
 if !HOST_WIN32
 if SUPPORT_BOEHM
+if !PLATFORM_GNU
 
 test_sgen_qsort_SOURCES = test-sgen-qsort.c
 test_sgen_qsort_CFLAGS = $(TEST_CFLAGS)
@@ -27,10 +28,16 @@ test_mono_linked_list_set_CFLAGS = $(TEST_CFLAGS)
 test_mono_linked_list_set_LDADD = $(TEST_LDADD)
 test_mono_linked_list_set_LDFLAGS = $(TEST_LDFLAGS)
 
-noinst_PROGRAMS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set
+test_conc_hashtable_SOURCES = test-conc-hashtable.c
+test_conc_hashtable_CFLAGS = $(TEST_CFLAGS)
+test_conc_hashtable_LDADD = $(TEST_LDADD)
+test_conc_hashtable_LDFLAGS = $(TEST_LDFLAGS)
 
-TESTS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set
+noinst_PROGRAMS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set test-conc-hashtable
 
+TESTS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set test-conc-hashtable
+
+endif !PLATFORM_GNU
 endif SUPPORT_BOEHM
 endif !HOST_WIN32
 endif !CROSS_COMPILE
diff --git a/mono/unit-tests/test-conc-hashtable.c b/mono/unit-tests/test-conc-hashtable.c
new file mode 100644 (file)
index 0000000..ed09d59
--- /dev/null
@@ -0,0 +1,324 @@
+/*
+ * test-conc-hashtable.c: Unit test for the concurrent hashtable.
+ *
+ * Copyright (C) 2014 Xamarin Inc
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License 2.0 as published by the Free Software Foundation;
+ *
+ * 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License 2.0 along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "config.h"
+
+#include "utils/mono-threads.h"
+#include "utils/mono-conc-hashtable.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <assert.h>
+
+#include <pthread.h>
+
+static int
+single_writer_single_reader (void)
+{
+       mono_mutex_t mutex;
+       MonoConcurrentHashTable *h;
+       int res = 0;
+
+       mono_mutex_init (&mutex);
+       h = mono_conc_hashtable_new (&mutex, NULL, NULL);
+       mono_conc_hashtable_insert (h, GUINT_TO_POINTER (10), GUINT_TO_POINTER (20));
+       mono_conc_hashtable_insert (h, GUINT_TO_POINTER (30), GUINT_TO_POINTER (40));
+       mono_conc_hashtable_insert (h, GUINT_TO_POINTER (50), GUINT_TO_POINTER (60));
+       mono_conc_hashtable_insert (h, GUINT_TO_POINTER (2), GUINT_TO_POINTER (3));
+
+       if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (30)) != GUINT_TO_POINTER (40))
+               res = 1;
+       if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (10)) != GUINT_TO_POINTER (20))
+               res = 2;
+       if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (2)) != GUINT_TO_POINTER (3))
+               res = 3;
+       if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (50)) != GUINT_TO_POINTER (60))
+               res = 4;
+
+       mono_conc_hashtable_destroy (h);
+       mono_mutex_destroy (&mutex);
+       if (res)
+               printf ("SERIAL TEST FAILED %d\n", res);
+       return res;
+}
+
+static MonoConcurrentHashTable *hash;
+
+static void*
+pw_sr_thread (void *arg)
+{
+       int i, idx = 1000 * GPOINTER_TO_INT (arg);
+       mono_thread_info_attach ((gpointer)&arg);
+
+       for (i = 0; i < 1000; ++i)
+               mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + idx), GINT_TO_POINTER (i + 1));
+       return NULL;
+}
+
+static int
+parallel_writer_single_reader (void)
+{
+       pthread_t a,b,c;
+       mono_mutex_t mutex;
+       int i, j, res = 0;
+
+       mono_mutex_init (&mutex);
+       hash = mono_conc_hashtable_new (&mutex, NULL, NULL);
+
+       pthread_create (&a, NULL, pw_sr_thread, GINT_TO_POINTER (1));
+       pthread_create (&b, NULL, pw_sr_thread, GINT_TO_POINTER (2));
+       pthread_create (&c, NULL, pw_sr_thread, GINT_TO_POINTER (3));
+
+       pthread_join (a, NULL);
+       pthread_join (b, NULL);
+       pthread_join (c, NULL);
+
+       for (i = 0; i < 1000; ++i) {
+               for (j = 1; j < 4; ++j) {
+                       if (mono_conc_hashtable_lookup (hash, GINT_TO_POINTER (j * 1000 + i)) != GINT_TO_POINTER (i + 1)) {
+                               res = j + 1;
+                               goto done;
+                       }
+               }
+       }
+
+done:
+       mono_conc_hashtable_destroy (hash);
+       mono_mutex_destroy (&mutex);
+       if (res)
+               printf ("PAR_WRITER_SINGLE_READER TEST FAILED %d\n", res);
+       return res;
+}
+
+
+static void*
+pr_sw_thread (void *arg)
+{
+       int i = 0, idx = 100 * GPOINTER_TO_INT (arg);
+       mono_thread_info_attach ((gpointer)&arg);
+
+       while (i < 100) {
+               gpointer res = mono_conc_hashtable_lookup (hash, GINT_TO_POINTER (i + idx + 1));
+               if (!res)
+                       continue;
+               if (res != GINT_TO_POINTER ((i + idx) * 2 + 1))
+                       return GINT_TO_POINTER (i);
+               ++i;
+       }
+       return NULL;
+}
+
+static int
+single_writer_parallel_reader (void)
+{
+       pthread_t a,b,c;
+       mono_mutex_t mutex;
+       gpointer ra, rb, rc;
+       int i, res = 0;
+       ra = rb = rc = GINT_TO_POINTER (1);
+
+       mono_mutex_init (&mutex);
+       hash = mono_conc_hashtable_new (&mutex, NULL, NULL);
+
+       pthread_create (&a, NULL, pr_sw_thread, GINT_TO_POINTER (0));
+       pthread_create (&b, NULL, pr_sw_thread, GINT_TO_POINTER (1));
+       pthread_create (&c, NULL, pr_sw_thread, GINT_TO_POINTER (2));
+
+       for (i = 0; i < 100; ++i) {
+               mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i +   0 + 1), GINT_TO_POINTER ((i +   0) * 2 + 1));
+               mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 100 + 1), GINT_TO_POINTER ((i + 100) * 2 + 1));
+               mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 200 + 1), GINT_TO_POINTER ((i + 200) * 2 + 1));
+       }
+
+       pthread_join (a, &ra);
+       pthread_join (b, &rb);
+       pthread_join (c, &rc);
+       res = GPOINTER_TO_INT (ra) + GPOINTER_TO_INT (rb) + GPOINTER_TO_INT (rc);
+
+       mono_conc_hashtable_destroy (hash);
+       mono_mutex_destroy (&mutex);
+       if (res)
+               printf ("SINGLE_WRITER_PAR_READER TEST FAILED %d\n", res);
+       return res;
+}
+
+int running = 1;
+
+static void*
+pw_pr_r_thread (void *arg)
+{
+       int key, val, i;
+       mono_thread_info_attach ((gpointer)&arg);
+
+       /* i will not be incremented as long as running is set to 1, this guarantee that
+          we loop over all the keys at least once after the writer threads have finished */
+       for (i = 0; i < 2; i += 1 - running) {
+               for (key = 1; key < 3 * 1000 + 1; key++) {
+                       val = GPOINTER_TO_INT (mono_conc_hashtable_lookup (hash, GINT_TO_POINTER (key)));
+
+                       if (!val)
+                               continue;
+                       if (key != val)
+                               return GINT_TO_POINTER (key);
+               }
+       }
+       return NULL;
+}
+
+static void*
+pw_pr_w_add_thread (void *arg)
+{
+       int i, idx = 1000 * GPOINTER_TO_INT (arg);
+
+       mono_thread_info_attach ((gpointer)&arg);
+
+       for (i = idx; i < idx + 1000; i++)
+               mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 1), GINT_TO_POINTER (i + 1));
+       return NULL;
+}
+
+static void*
+pw_pr_w_del_thread (void *arg)
+{
+       int i, idx = 1000 * GPOINTER_TO_INT (arg);
+
+       mono_thread_info_attach ((gpointer)&arg);
+
+       for (i = idx; i < idx + 1000; i++)
+               mono_conc_hashtable_remove (hash, GINT_TO_POINTER (i + 1));
+       return NULL;
+}
+
+static int
+parallel_writer_parallel_reader (void)
+{
+       pthread_t wa, wb, wc, ra, rb, rc;
+       mono_mutex_t mutex;
+       gpointer a, b, c;
+       int res = 0, i;
+
+       srand(time(NULL));
+
+       mono_mutex_init (&mutex);
+       hash = mono_conc_hashtable_new (&mutex, NULL, NULL);
+
+       for (i = 0; i < 2; i++) {
+               running = 1;
+
+               pthread_create (&ra, NULL, pw_pr_r_thread, NULL);
+               pthread_create (&rb, NULL, pw_pr_r_thread, NULL);
+               pthread_create (&rc, NULL, pw_pr_r_thread, NULL);
+
+               switch (i) {
+               case 0:
+                       pthread_create (&wa, NULL, pw_pr_w_add_thread, GINT_TO_POINTER (0));
+                       pthread_create (&wb, NULL, pw_pr_w_add_thread, GINT_TO_POINTER (1));
+                       pthread_create (&wc, NULL, pw_pr_w_add_thread, GINT_TO_POINTER (2));
+                       break;
+               case 1:
+                       pthread_create (&wa, NULL, pw_pr_w_del_thread, GINT_TO_POINTER (0));
+                       pthread_create (&wb, NULL, pw_pr_w_del_thread, GINT_TO_POINTER (1));
+                       pthread_create (&wc, NULL, pw_pr_w_del_thread, GINT_TO_POINTER (2));
+                       break;
+               }
+
+               pthread_join (wa, NULL);
+               pthread_join (wb, NULL);
+               pthread_join (wc, NULL);
+
+               running = 0;
+
+               pthread_join (ra, &a);
+               pthread_join (rb, &b);
+               pthread_join (rc, &c);
+
+               res += GPOINTER_TO_INT (a) + GPOINTER_TO_INT (b) + GPOINTER_TO_INT (c);
+       }
+
+       if (res)
+               printf ("PAR_WRITER_PAR_READER TEST FAILED %d %d %d\n", GPOINTER_TO_INT (a), GPOINTER_TO_INT (b), GPOINTER_TO_INT (c));
+
+       mono_conc_hashtable_destroy (hash);
+       mono_mutex_destroy (&mutex);
+
+       return res;
+}
+
+static void
+benchmark_conc (void)
+{
+       mono_mutex_t mutex;
+       MonoConcurrentHashTable *h;
+       int i, j;
+
+       mono_mutex_init (&mutex);
+       h = mono_conc_hashtable_new (&mutex, NULL, NULL);
+
+       for (i = 1; i < 10 * 1000; ++i)
+               mono_conc_hashtable_insert (h, GUINT_TO_POINTER (i), GUINT_TO_POINTER (i));
+
+
+       for (j = 0; j < 100000; ++j)
+               for (i = 1; i < 10 * 105; ++i)
+                       mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (i));
+
+       mono_conc_hashtable_destroy (h);
+       mono_mutex_destroy (&mutex);
+
+}
+
+static void
+benchmark_glib (void)
+{
+       GHashTable *h;
+       int i, j;
+
+       h = g_hash_table_new (NULL, NULL);
+
+       for (i = 1; i < 10 * 1000; ++i)
+               g_hash_table_insert (h, GUINT_TO_POINTER (i), GUINT_TO_POINTER (i));
+
+
+       for (j = 0; j < 100000; ++j)
+               for (i = 1; i < 10 * 105; ++i)
+                       g_hash_table_lookup (h, GUINT_TO_POINTER (i));
+
+       g_hash_table_destroy (h);
+}
+
+int
+main (void)
+{
+       MonoThreadInfoCallbacks cb = { NULL };
+       int res = 0;
+
+       mono_threads_init (&cb, sizeof (MonoThreadInfo));
+       mono_thread_info_attach ((gpointer)&cb);
+
+       // benchmark_conc ();
+       // benchmark_glib ();
+
+       res += single_writer_single_reader ();
+       res += parallel_writer_single_reader ();
+       res += single_writer_parallel_reader ();
+       res += parallel_writer_parallel_reader ();
+
+       return res;
+}
\ No newline at end of file
index a8ccf8833c506601cb196bd0b9b0913a059cc3df..37c6c26d14ccd317e4448ab6568b2a397bb25f67 100644 (file)
@@ -59,7 +59,7 @@ main (void)
                        memcpy (reference, random_mem, POOL_SIZE);
                        memcpy (playground, random_mem, POOL_SIZE);
 
-                       bzero (reference + START_OFFSET + offset, size);
+                       memset (reference + START_OFFSET + offset, 0, size);
                        mono_gc_bzero_atomic (playground + START_OFFSET + offset, size);
 
                        assert (!memcmp (reference, playground, POOL_SIZE));
index 881888fcceeb927a7462689fd09d21d1df741224..801a1777460081f7279e917ffeeb917676588e6b 100644 (file)
@@ -110,7 +110,9 @@ monoutils_sources = \
        mono-hwcap.c    \
        bsearch.h       \
        bsearch.c       \
-       mono-signal-handler.h
+       mono-signal-handler.h   \
+       mono-conc-hashtable.h   \
+       mono-conc-hashtable.c
 
 arch_sources = 
 
index 7cd884e61d9fb3dd6eaf78dcb34998321fcaef2f..9ab8746f299f98ca783767ec8545aea0bab17928 100755 (executable)
 #include <glib.h>
 
 #include <mono/utils/atomic.h>
+#include <mono/utils/mono-mutex.h>
 
 #if defined (WAPI_NO_ATOMIC_ASM) || defined (BROKEN_64BIT_ATOMICS_INTRINSIC)
 
 #include <pthread.h>
 
-static pthread_mutex_t spin = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t spin G_GNUC_UNUSED = PTHREAD_MUTEX_INITIALIZER;
 
 #define NEED_64BIT_CMPXCHG_FALLBACK
 
@@ -25,21 +26,12 @@ static pthread_mutex_t spin = PTHREAD_MUTEX_INITIALIZER;
 
 #ifdef WAPI_NO_ATOMIC_ASM
 
-static mono_once_t spin_once=MONO_ONCE_INIT;
-
-static void spin_init(void)
-{
-       g_warning("Using non-atomic functions!  Expect race conditions when using process-shared handles!");
-}
-
 gint32 InterlockedCompareExchange(volatile gint32 *dest, gint32 exch,
                                  gint32 comp)
 {
        gint32 old;
        int ret;
        
-       mono_once(&spin_once, spin_init);
-       
        pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
                              (void *)&spin);
        ret = pthread_mutex_lock(&spin);
@@ -64,8 +56,6 @@ gpointer InterlockedCompareExchangePointer(volatile gpointer *dest,
        gpointer old;
        int ret;
        
-       mono_once(&spin_once, spin_init);
-       
        pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
                              (void *)&spin);
        ret = pthread_mutex_lock(&spin);
@@ -89,8 +79,6 @@ 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);
@@ -112,8 +100,6 @@ 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);
@@ -135,8 +121,6 @@ gint32 InterlockedIncrement(volatile gint32 *dest)
        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);
@@ -158,8 +142,6 @@ 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);
@@ -181,8 +163,6 @@ gint32 InterlockedDecrement(volatile gint32 *dest)
        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);
@@ -204,8 +184,6 @@ 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);
@@ -227,8 +205,6 @@ gint32 InterlockedExchange(volatile gint32 *dest, gint32 exch)
        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);
@@ -250,8 +226,6 @@ 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);
@@ -273,8 +247,6 @@ gpointer InterlockedExchangePointer(volatile gpointer *dest, gpointer exch)
        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);
@@ -296,8 +268,6 @@ gint32 InterlockedExchangeAdd(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);
@@ -319,8 +289,6 @@ 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);
@@ -342,8 +310,6 @@ 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);
@@ -364,8 +330,6 @@ 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);
@@ -386,8 +350,6 @@ 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);
@@ -408,8 +370,6 @@ 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);
@@ -430,8 +390,6 @@ 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);
@@ -451,8 +409,6 @@ 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);
@@ -470,8 +426,6 @@ 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);
@@ -489,8 +443,6 @@ 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);
@@ -508,8 +460,6 @@ 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);
@@ -527,8 +477,6 @@ 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);
@@ -568,15 +516,24 @@ gint64
 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp)
 {
        gint64 old;
+       int ret;
+       
+       pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+                             (void *)&spin);
+       ret = pthread_mutex_lock(&spin);
+       g_assert (ret == 0);
+       
+       old= *dest;
+       if(old==comp) {
+               *dest=exch;
+       }
+       
+       ret = pthread_mutex_unlock(&spin);
+       g_assert (ret == 0);
+       
+       pthread_cleanup_pop (0);
 
-       pthread_mutex_lock (&spin);
-
-       old = *dest;
-       if(old == comp)
-               *dest = exch;
-
-       pthread_mutex_unlock (&spin);
-       return old;
+       return(old);
 }
 
 #endif
index c8c70007bc751d0a55d612c230a28450c79e968f..306800cfe1d0cd508a56aafb341a815de949233c 100755 (executable)
@@ -108,13 +108,19 @@ static inline gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add)
 #endif
 #endif
 
+#ifdef HOST_WIN32
+#define TO_INTERLOCKED_ARGP(ptr) ((volatile LONG*)(ptr))
+#else
+#define TO_INTERLOCKED_ARGP(ptr) (ptr)
+#endif
+
 /* 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 gint32 InterlockedRead(volatile gint32 *src)
 {
-       return InterlockedCompareExchange (src, 0, 0);
+       return InterlockedCompareExchange (TO_INTERLOCKED_ARGP (src), 0, 0);
 }
 
 static inline gint64 InterlockedRead64(volatile gint64 *src)
@@ -129,7 +135,7 @@ static inline gpointer InterlockedReadPointer(volatile gpointer *src)
 
 static inline void InterlockedWrite(volatile gint32 *dst, gint32 val)
 {
-       InterlockedExchange (dst, val);
+       InterlockedExchange (TO_INTERLOCKED_ARGP (dst), val);
 }
 
 static inline void InterlockedWrite64(volatile gint64 *dst, gint64 val)
@@ -167,7 +173,7 @@ static inline void InterlockedWrite16(volatile gint16 *dst, gint16 val)
        mono_memory_barrier ();
 }
 
-/* Prefer GCC atomic ops if the target supports it (see configure.in). */
+/* Prefer GCC atomic ops if the target supports it (see configure.ac). */
 #elif defined(USE_GCC_ATOMIC_OPS)
 
 static inline gint32 InterlockedCompareExchange(volatile gint32 *dest,
index b4ea3770ad2af85b15e3a08af7de2fc77da7a5da..6da0fb2fc8d9c7a98fafaf697b2fc0e9b8e4d501 100644 (file)
        
 #      if defined(HAVE_KW_THREAD) && defined(USE_INCLUDED_LIBGC) && !defined(__powerpc__)
         /* The local alloc stuff is in pthread_support.c, but solaris uses solaris_threads.c */
-        /* It is also disabled on solaris/x86 by libgc/configure.in */
+        /* It is also disabled on solaris/x86 by libgc/configure.ac */
         /* 
                 * ARM has no definition for some atomic functions in gc_locks.h and
-                * support is also disabled in libgc/configure.in.
+                * support is also disabled in libgc/configure.ac.
                 */
 #       if !defined(__sparc__) && !defined(__sun) && !defined(__arm__) && !defined(__mips__)
 #                  define GC_REDIRECT_TO_LOCAL
index 1e5cad6498ea236a582ad51a272c4b0e39a31d30..4befb3b86a04ab38e593210e624d49cba37486f3 100644 (file)
@@ -127,7 +127,7 @@ struct _MonoLockFreeAllocDescriptor {
 #define SB_HEADER_SIZE 16
 #define SB_USABLE_SIZE (SB_SIZE - SB_HEADER_SIZE)
 
-#define SB_HEADER_FOR_ADDR(a)  ((gpointer)((gulong)(a) & ~(gulong)(SB_SIZE-1)))
+#define SB_HEADER_FOR_ADDR(a)  ((gpointer)((size_t)(a) & ~(size_t)(SB_SIZE-1)))
 #define DESCRIPTOR_FOR_ADDR(a) (*(Descriptor**)SB_HEADER_FOR_ADDR (a))
 
 /* Taken from SGen */
index abdcda699722247ae3ff3e2e59d2a22d82832bd5..c8f746825355aff06999f7fb40de638b2f571403 100644 (file)
@@ -28,9 +28,9 @@
 #endif
 
 static uintptr_t code_memory_used = 0;
-static gulong dynamic_code_alloc_count;
-static gulong dynamic_code_bytes_count;
-static gulong dynamic_code_frees_count;
+static size_t dynamic_code_alloc_count;
+static size_t dynamic_code_bytes_count;
+static size_t dynamic_code_frees_count;
 
 /*
  * AMD64 processors maintain icache coherency only for pages which are 
index 22623d074fb5923ebc622041d261c894645e68b0..c1d0e27a49cb85d35aca8d34865d28aaa8b63fbf 100644 (file)
 
 #define __func__ __FUNCTION__
 
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+
 #endif /* _MSC_VER */
 
 #if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN
diff --git a/mono/utils/mono-conc-hashtable.c b/mono/utils/mono-conc-hashtable.c
new file mode 100644 (file)
index 0000000..7c4637f
--- /dev/null
@@ -0,0 +1,371 @@
+/*
+ * mono-conc-hashtable.h: A mostly concurrent hashtable
+ *
+ * Author:
+ *     Rodrigo Kumpera (kumpera@gmail.com)
+ *
+ * (C) 2014 Xamarin
+ */
+
+#include "mono-conc-hashtable.h"
+#include <mono/utils/hazard-pointer.h>
+
+/* Configuration knobs. */
+
+#define INITIAL_SIZE 32
+#define LOAD_FACTOR 0.75f
+#define TOMBSTONE ((gpointer)(ssize_t)-1)
+
+typedef struct {
+       gpointer key;
+       gpointer value;
+} key_value_pair;
+
+typedef struct {
+       int table_size;
+       key_value_pair *kvs;
+} conc_table;
+
+struct _MonoConcurrentHashTable {
+       volatile conc_table *table; /* goes to HP0 */
+       GHashFunc hash_func;
+       GEqualFunc equal_func;
+       mono_mutex_t *mutex;
+       int element_count;
+       int overflow_count;
+       GDestroyNotify key_destroy_func;
+       GDestroyNotify value_destroy_func;
+};
+
+static conc_table*
+conc_table_new (int size)
+{
+       conc_table *res = g_new (conc_table, 1);
+       res->table_size = size;
+       res->kvs = g_new0 (key_value_pair, size);
+       return res;
+}
+
+static void
+conc_table_free (gpointer ptr)
+{
+       conc_table *table = ptr;
+       g_free (table->kvs);
+       g_free (table);
+}
+
+static void
+conc_table_lf_free (conc_table *table)
+{
+       mono_thread_hazardous_free_or_queue (table, conc_table_free, TRUE, FALSE);
+}
+
+
+/*
+A common problem with power of two hashtables is that it leads of bad clustering when dealing
+with aligned numbers.
+
+The solution here is to mix the bits from two primes plus the hash itself, it produces a better spread
+than just the numbers.
+*/
+
+static MONO_ALWAYS_INLINE int
+mix_hash (int hash)
+{
+       return ((hash * 215497) >> 16) ^ (hash * 1823231) + hash;
+}
+
+static MONO_ALWAYS_INLINE void
+insert_one_local (conc_table *table, GHashFunc hash_func, gpointer key, gpointer value)
+{
+       key_value_pair *kvs = table->kvs;
+       int table_mask = table->table_size - 1;
+       int hash = mix_hash (hash_func (key));
+       int i = hash & table_mask;
+
+       while (table->kvs [i].key)
+               i = (i + 1) & table_mask;
+
+       kvs [i].key = key;
+       kvs [i].value = value;
+}
+
+/* LOCKING: Must be called holding hash_table->mutex */
+static void
+expand_table (MonoConcurrentHashTable *hash_table)
+{
+       conc_table *old_table = (conc_table*)hash_table->table;
+       conc_table *new_table = conc_table_new (old_table->table_size * 2);
+       key_value_pair *kvs = old_table->kvs;
+       int i;
+
+       for (i = 0; i < old_table->table_size; ++i) {
+               if (kvs [i].key && kvs [i].key != TOMBSTONE)
+                       insert_one_local (new_table, hash_table->hash_func, kvs [i].key, kvs [i].value);
+       }
+       mono_memory_barrier ();
+       hash_table->table = new_table;
+       hash_table->overflow_count = (int)(new_table->table_size * LOAD_FACTOR);
+       conc_table_lf_free (old_table);
+}
+
+
+MonoConcurrentHashTable*
+mono_conc_hashtable_new (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func)
+{
+       MonoConcurrentHashTable *res = g_new0 (MonoConcurrentHashTable, 1);
+       res->mutex = mutex;
+       res->hash_func = hash_func ? hash_func : g_direct_hash;
+       res->equal_func = key_equal_func;
+       // res->equal_func = g_direct_equal;
+       res->table = conc_table_new (INITIAL_SIZE);
+       res->element_count = 0;
+       res->overflow_count = (int)(INITIAL_SIZE * LOAD_FACTOR);
+       return res;
+}
+
+MonoConcurrentHashTable*
+mono_conc_hashtable_new_full (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func)
+{
+       MonoConcurrentHashTable *res = mono_conc_hashtable_new (mutex, hash_func, key_equal_func);
+       res->key_destroy_func = key_destroy_func;
+       res->value_destroy_func = value_destroy_func;
+       return res;
+}
+
+
+void
+mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table)
+{
+       if (hash_table->key_destroy_func || hash_table->value_destroy_func) {
+               int i;
+               conc_table *table = (conc_table*)hash_table->table;
+               key_value_pair *kvs = table->kvs;
+
+               for (i = 0; i < table->table_size; ++i) {
+                       if (kvs [i].key && kvs [i].key != TOMBSTONE) {
+                               if (hash_table->key_destroy_func)
+                                       (hash_table->key_destroy_func) (kvs [i].key);
+                               if (hash_table->value_destroy_func)
+                                       (hash_table->value_destroy_func) (kvs [i].value);
+                       }
+               }
+       }
+       conc_table_free ((gpointer)hash_table->table);
+       g_free (hash_table);
+}
+
+gpointer
+mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key)
+{
+       MonoThreadHazardPointers* hp;
+       conc_table *table;
+       int hash, i, table_mask;
+       key_value_pair *kvs;
+       hash = mix_hash (hash_table->hash_func (key));
+       hp = mono_hazard_pointer_get ();
+
+retry:
+       table = get_hazardous_pointer ((gpointer volatile*)&hash_table->table, hp, 0);
+       table_mask = table->table_size - 1;
+       kvs = table->kvs;
+       i = hash & table_mask;
+
+       if (G_LIKELY (!hash_table->equal_func)) {
+               while (kvs [i].key) {
+                       if (key == kvs [i].key) {
+                               gpointer value;
+                               /* The read of keys must happen before the read of values */
+                               mono_memory_barrier ();
+                               value = kvs [i].value;
+                               /* FIXME check for NULL if we add suppport for removal */
+                               mono_hazard_pointer_clear (hp, 0);
+                               return value;
+                       }
+                       i = (i + 1) & table_mask;
+               }
+       } else {
+               GEqualFunc equal = hash_table->equal_func;
+
+               while (kvs [i].key) {
+                       if (kvs [i].key != TOMBSTONE && equal (key, kvs [i].key)) {
+                               gpointer value;
+                               /* The read of keys must happen before the read of values */
+                               mono_memory_barrier ();
+                               value = kvs [i].value;
+
+                               /* We just read a value been deleted, try again. */
+                               if (G_UNLIKELY (!value))
+                                       goto retry;
+
+                               mono_hazard_pointer_clear (hp, 0);
+                               return value;
+                       }
+                       i = (i + 1) & table_mask;
+               }
+       }
+
+       /* The table might have expanded and the value is now on the newer table */
+       mono_memory_barrier ();
+       if (hash_table->table != table)
+               goto retry;
+
+       mono_hazard_pointer_clear (hp, 0);
+       return NULL;
+}
+
+/**
+ * mono_conc_hashtable_remove
+ *
+ * @Returns the old value if key is already present or null
+ */
+gpointer
+mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key)
+{
+       conc_table *table;
+       key_value_pair *kvs;
+       int hash, i, table_mask;
+
+       g_assert (key != NULL && key != TOMBSTONE);
+
+       hash = mix_hash (hash_table->hash_func (key));
+       mono_mutex_lock (hash_table->mutex);
+
+       table = (conc_table*)hash_table->table;
+       kvs = table->kvs;
+       table_mask = table->table_size - 1;
+       i = hash & table_mask;
+
+       if (!hash_table->equal_func) {
+               for (;;) {
+                       if (!kvs [i].key) {
+                               mono_mutex_unlock (hash_table->mutex);
+                               return NULL; /*key not found*/
+                       }
+
+                       if (key == kvs [i].key) {
+                               gpointer value = kvs [i].value;
+                               kvs [i].value = NULL;
+                               mono_memory_barrier ();
+                               kvs [i].key = TOMBSTONE;
+
+                               mono_mutex_unlock (hash_table->mutex);
+                               if (hash_table->key_destroy_func != NULL)
+                                       (*hash_table->key_destroy_func) (key);
+                               if (hash_table->value_destroy_func != NULL)
+                                       (*hash_table->value_destroy_func) (value);
+
+                               return value;
+                       }
+                       i = (i + 1) & table_mask;
+               }
+       } else {
+               GEqualFunc equal = hash_table->equal_func;
+               for (;;) {
+                       if (!kvs [i].key) {
+                               mono_mutex_unlock (hash_table->mutex);
+                               return NULL; /*key not found*/
+                       }
+
+                       if (kvs [i].key != TOMBSTONE && equal (key, kvs [i].key)) {
+                               gpointer old_key = kvs [i].key;
+                               gpointer value = kvs [i].value;
+                               kvs [i].value = NULL;
+                               mono_memory_barrier ();
+                               kvs [i].key = TOMBSTONE;
+
+                               mono_mutex_unlock (hash_table->mutex);
+                               if (hash_table->key_destroy_func != NULL)
+                                       (*hash_table->key_destroy_func) (old_key);
+                               if (hash_table->value_destroy_func != NULL)
+                                       (*hash_table->value_destroy_func) (value);
+                               return value;
+                       }
+
+                       i = (i + 1) & table_mask;
+               }
+       }
+}
+/**
+ * mono_conc_hashtable_insert
+ *
+ * @Returns the old value if key is already present or null
+ */
+gpointer
+mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value)
+{
+       conc_table *table;
+       key_value_pair *kvs;
+       int hash, i, table_mask;
+
+       g_assert (key != NULL && key != TOMBSTONE);
+       g_assert (value != NULL);
+
+       hash = mix_hash (hash_table->hash_func (key));
+       mono_mutex_lock (hash_table->mutex);
+
+       if (hash_table->element_count >= hash_table->overflow_count)
+               expand_table (hash_table);
+
+       table = (conc_table*)hash_table->table;
+       kvs = table->kvs;
+       table_mask = table->table_size - 1;
+       i = hash & table_mask;
+
+       if (!hash_table->equal_func) {
+               for (;;) {
+                       if (!kvs [i].key || kvs [i].key == TOMBSTONE) {
+                               kvs [i].value = value;
+                               /* The write to values must happen after the write to keys */
+                               mono_memory_barrier ();
+                               kvs [i].key = key;
+                               ++hash_table->element_count;
+                               mono_mutex_unlock (hash_table->mutex);
+                               return NULL;
+                       }
+                       if (key == kvs [i].key) {
+                               gpointer value = kvs [i].value;
+                               mono_mutex_unlock (hash_table->mutex);
+                               return value;
+                       }
+                       i = (i + 1) & table_mask;
+               }
+       } else {
+               GEqualFunc equal = hash_table->equal_func;
+               for (;;) {
+                       if (!kvs [i].key || kvs [i].key == TOMBSTONE) {
+                               kvs [i].value = value;
+                               /* The write to values must happen after the write to keys */
+                               mono_memory_barrier ();
+                               kvs [i].key = key;
+                               ++hash_table->element_count;
+                               mono_mutex_unlock (hash_table->mutex);
+                               return NULL;
+                       }
+                       if (equal (key, kvs [i].key)) {
+                               gpointer value = kvs [i].value;
+                               mono_mutex_unlock (hash_table->mutex);
+                               return value;
+                       }
+                       i = (i + 1) & table_mask;
+               }
+       }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mono/utils/mono-conc-hashtable.h b/mono/utils/mono-conc-hashtable.h
new file mode 100644 (file)
index 0000000..65792bc
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * mono-conc-hashtable.h: A mostly concurrent hashtable
+ *
+ * Author:
+ *     Rodrigo Kumpera (kumpera@gmail.com)
+ *
+ * (C) 2014 Xamarin
+ */
+
+#ifndef __MONO_CONCURRENT_HASHTABLE_H__
+#define __MONO_CONCURRENT_HASHTABLE_H__
+
+#include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-mutex.h>
+#include <glib.h>
+
+typedef struct _MonoConcurrentHashTable MonoConcurrentHashTable;
+
+MonoConcurrentHashTable* mono_conc_hashtable_new (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func) MONO_INTERNAL;
+MonoConcurrentHashTable* mono_conc_hashtable_new_full (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func) MONO_INTERNAL;
+void mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table) MONO_INTERNAL;
+gpointer mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key) MONO_INTERNAL;
+gpointer mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value) MONO_INTERNAL;
+gpointer mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key) MONO_INTERNAL;
+
+#endif
+
index 8c813453f6ee4f83c2467219903504b3dc30e4df..11254802fc4606e16563ec5c8de6f2470f585a92 100755 (executable)
@@ -118,7 +118,8 @@ typedef struct {
         __asm mov [eax+0x14], esp                                                                                      \
         __asm mov [eax+0x18], esi                                                                                      \
         __asm mov [eax+0x1c], edi                                                                                      \
-        __asm call $+5                                                                                                         \
+        __asm call __mono_context_get_ip                                                                       \
+        __asm __mono_context_get_ip:                                                                           \
         __asm pop dword ptr [eax+0x20]                                                                         \
                 }                                                                                                                              \
        } while (0)
@@ -179,7 +180,12 @@ typedef struct {
 #define MONO_CONTEXT_GET_BP(ctx) ((gpointer)((ctx)->rbp))
 #define MONO_CONTEXT_GET_SP(ctx) ((gpointer)((ctx)->rsp))
 
-#if defined(__native_client__)
+#if defined (HOST_WIN32) && !defined(__GNUC__)
+/* msvc doesn't support inline assembly, so have to use a separate .asm file */
+extern void mono_context_get_current (void *);
+#define MONO_CONTEXT_GET_CURRENT(ctx) do { mono_context_get_current((void*)&(ctx)); } while (0)
+
+#elif defined(__native_client__)
 #define MONO_CONTEXT_GET_CURRENT(ctx)  \
        __asm__ __volatile__(   \
                "movq $0x0,  %%nacl:0x00(%%r15, %0, 1)\n"       \
index 9d72ba2dcd30e7cc5ed82c5330f7a0be3ce5b336..8ab20140cdaeb2ed45da999cf2ada9ed6964f81a 100644 (file)
@@ -250,10 +250,10 @@ dump_counter (MonoCounter *counter, FILE *outfile) {
                if ((counter->type & MONO_COUNTER_UNIT_MASK) == MONO_COUNTER_TIME)
                        fprintf (outfile, ENTRY_FMT "%.2f ms\n", counter->name, (double)(*(gint64*)buffer) / 10000.0);
                else
-                       fprintf (outfile, ENTRY_FMT "%lld\n", counter->name, *(gint64*)buffer);
+                       fprintf (outfile, ENTRY_FMT "%lld\n", counter->name, *(long long *)buffer);
                break;
        case MONO_COUNTER_ULONG:
-               fprintf (outfile, ENTRY_FMT "%llu\n", counter->name, *(guint64*)buffer);
+               fprintf (outfile, ENTRY_FMT "%llu\n", counter->name, *(unsigned long long *)buffer);
                break;
        case MONO_COUNTER_WORD:
                fprintf (outfile, ENTRY_FMT "%zd\n", counter->name, *(gssize*)buffer);
@@ -273,43 +273,43 @@ dump_counter (MonoCounter *counter, FILE *outfile) {
 }
 
 static gint64
-user_time ()
+user_time (void)
 {
        return mono_process_get_data (GINT_TO_POINTER (mono_process_current_pid ()), MONO_PROCESS_USER_TIME);
 }
 
 static gint64
-system_time ()
+system_time (void)
 {
        return mono_process_get_data (GINT_TO_POINTER (mono_process_current_pid ()), MONO_PROCESS_SYSTEM_TIME);
 }
 
 static gint64
-total_time ()
+total_time (void)
 {
        return mono_process_get_data (GINT_TO_POINTER (mono_process_current_pid ()), MONO_PROCESS_TOTAL_TIME);
 }
 
 static gint64
-working_set ()
+working_set (void)
 {
        return mono_process_get_data (GINT_TO_POINTER (mono_process_current_pid ()), MONO_PROCESS_WORKING_SET);
 }
 
 static gint64
-private_bytes ()
+private_bytes (void)
 {
        return mono_process_get_data (GINT_TO_POINTER (mono_process_current_pid ()), MONO_PROCESS_PRIVATE_BYTES);
 }
 
 static gint64
-virtual_bytes ()
+virtual_bytes (void)
 {
        return mono_process_get_data (GINT_TO_POINTER (mono_process_current_pid ()), MONO_PROCESS_VIRTUAL_BYTES);
 }
 
 static gint64
-page_faults ()
+page_faults (void)
 {
        return mono_process_get_data (GINT_TO_POINTER (mono_process_current_pid ()), MONO_PROCESS_FAULTS);
 }
@@ -349,19 +349,19 @@ cpu_load (int kind)
 }
 
 static double
-cpu_load_1min ()
+cpu_load_1min (void)
 {
        return cpu_load (0);
 }
 
 static double
-cpu_load_5min ()
+cpu_load_5min (void)
 {
        return cpu_load (1);
 }
 
 static double
-cpu_load_15min ()
+cpu_load_15min (void)
 {
        return cpu_load (2);
 }
@@ -374,7 +374,7 @@ static gboolean system_counters_initialized = FALSE;
 #define SYSCOUNTER_LOAD (MONO_COUNTER_SYSTEM | MONO_COUNTER_DOUBLE | MONO_COUNTER_PERCENTAGE | MONO_COUNTER_VARIABLE | MONO_COUNTER_CALLBACK)
 
 static void
-initialize_system_counters ()
+initialize_system_counters (void)
 {
        mono_counters_register ("User Time", SYSCOUNTER_TIME, &user_time);
        mono_counters_register ("System Time", SYSCOUNTER_TIME, &system_time);
@@ -417,8 +417,7 @@ mono_counters_foreach (CountersEnumCallback cb, gpointer user_data)
                size = sizeof (type);   \
                if (buffer_size < size) \
                        return -1;      \
-               type __var = cb ? ((functype)counter->addr) () : *(type*)counter->addr; \
-               memcpy (buffer, &__var, size);  \
+               *(type*)buffer = cb ? ((functype)counter->addr) () : *(type*)counter->addr; \
        } while (0);
 
 int
index 5652432adb15282bd0dc121df65e50604e9f81b5..1da46d6f24025414c314a3824850f4827537c164 100644 (file)
@@ -33,7 +33,7 @@ enum {
 };
 
 /*Keep in sync with MonoErrorInternal*/
-typedef struct {
+typedef struct _MonoError {
        unsigned short error_code;
     unsigned short hidden_0; /*DON'T TOUCH */
 
index d2f2bc5a4a9735030f340a91f861a38fac9d01c8..d5c9d254c3c95cd31648f2e6a44fb66fd1d2e483 100644 (file)
  */
 
 #include "mono/utils/mono-hwcap-s390x.h"
-
 #include <signal.h>
 
-gboolean mono_hwcap_s390x_has_ld = FALSE;
-
-static void
-catch_sigill (int sig_no, siginfo_t *info, gpointer act)
-{
-       mono_hwcap_s390x_has_ld = FALSE;
-}
+facilityList_t facs;
 
 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"
-       );
+       int lFacs = sizeof(facs) / 8;
 
-       sigaction (SIGILL, old_sa, NULL);
+       __asm__ ("      lgfr    0,%1\n"
+                "      .insn   s,0xb2b00000,%0\n"
+                : "=m" (facs) : "r" (lFacs) : "0", "cc");
 }
 
 void
 mono_hwcap_print (FILE *f)
 {
-       g_fprintf (f, "mono_hwcap_s390x_has_ld = %i\n", mono_hwcap_s390x_has_ld);
 }
index 24c76a28545a429f63072de1c7c22ed772ef0947..313aca8bcb432fbd174cfd6deaaab76a04ef1514 100644 (file)
@@ -3,6 +3,84 @@
 
 #include "mono/utils/mono-hwcap.h"
 
-extern gboolean mono_hwcap_s390x_has_ld;
+typedef struct
+{
+       char    n3:1;           // N3 instructions present
+       char    zArch:1;        // z/Architecture mode installed
+       char    zAct:1;         // z/Architecture mode active
+       char    date:1;         // DAT enhancement facility
+       char    idte1:1;        // IDTE present (PST)
+       char    idte2:1;        // IDTE present (REG)
+       char    asnlx:1;        // ASN and LX reuse facility
+       char    stfle:1;        // STFLE installed
+       char    zDATe:1;        // Enhanced DAT in z mode
+       char    srstat:1;       // Sense running status facility
+       char    cSSKE:1;        // Conditional SSKE facility
+       char    topo:1;         // Configuration topology facility
+       char    rv1:1;          // Reserved
+       char    xTrans2:1;      // Extended translation facility 2
+       char    msgSec:1;       // Message security facility
+       char    longDsp:1;      // Long displacement facility
+       char    hiPerfLD:1;     // High performance long displacement facility
+       char    hfpMAS:1;       // HFP multiply-and-add/subtrace facility
+       char    xImm:1;         // Extended immediate facility
+       char    xTrans3:1;      // Extended translation facility 3
+       char    hfpUnX:1;       // HFP unnormalized extension facility
+       char    etf2:1;         // ETF2-enhancement facility
+       char    stckf:1;        // Store-clock-fast facility
+       char    parse:1;        // Parsing enhancement facility
+       char    mvcos:1;        // MVCOS facility
+       char    todSteer:1;     // TOD-clock steering facility
+       char    etf3:1;         // ETF3-enhancement facility
+       char    xCPUtm:1;       // Extract CPU time facility
+       char    csst:1;         // Compare-swap-and-store facility
+       char    csst2:1;        // Compare-swap-and-store facility 2
+       char    giX:1;          // General instructions extension facility
+       char    exX:1;          // Execute extensions facility
+       char    em:1;           // Enhanced monitor
+       char    rv2:1;          // Reserved
+       char    spp:1;          // Set program parameters
+       char    fps:1;          // Floating point support enhancement
+       char    dfp:1;          // Decimal floating point facility
+       char    hiDFP:1;        // High Performance DFP facility
+       char    pfpo:1;         // PFPO instruction facility
+       char    doclpkia:1;     // DO/Fast BCR/CL/PK/IA
+       char    rv3:1;          // Reserved
+       char    cmpsce:1;       // CMPSC enhancement
+       char    dfpzc:1;        // DFP zoned-conversion
+       char    eh:1;           // Execution hint
+       char    lt:1;           // Load and trap
+       char    mi:1;           // Miscellaneous instruction enhancements
+       char    pa:1;           // Processor assist
+       char    cx:1;           // Constrained transactional execution
+       char    ltlb:1;         // Local TLB clearing
+       char    ia2:1;          // Interlocked access 2
+       char    rv4:1;          // Reserved;
+       char    rv5:1;          // Reserved;
+       char    rv6:1;          // Reserved;
+       char    rv7:1;          // Reserved;
+       char    rv8:1;          // Reserved;
+       char    rv9:1;          // Reserved;
+       char    rva:1;          // Reserved;
+       char    rvb:1;          // Reserved;
+       char    rvc:1;          // Reserved;
+       char    rvd:1;          // Reserved;
+       char    rve:1;          // Reserved;
+       char    rvf:1;          // Reserved;
+       char    rvg:1;          // Reserved;
+       char    rb:1;           // RRB multiple
+       char    cmc:1;          // CPU measurement counter
+       char    cms:1;          // CPU measurement sampling
+       char    rvh:4;          // Reserved
+       char    tx:1;           // Transactional execution
+       char    rvi:1;          // Reserved
+       char    axsi:1;         // Access exception/store indication
+       char    m3:1;           // Message security extension 3
+       char    m4:1;           // Message security extension 4
+       char    ed2:1;          // Enhanced DAT 2
+       int64_t end[0];         // End on a double word
+} __attribute__((aligned(8))) facilityList_t;
+       
+extern facilityList_t facs;
 
 #endif /* __MONO_UTILS_HWCAP_S390X_H__ */
index 3536d25d8445900a99b12dd7b1c67851899b809d..b7391962eaae5d35ab1e704801f7d36e533224aa 100644 (file)
@@ -188,7 +188,7 @@ mono_lls_remove (MonoLinkedListSet *list, MonoThreadHazardPointers *hp, MonoLink
                        continue;
                /* The second CAS must happen before the first. */
                mono_memory_write_barrier ();
-               if (InterlockedCompareExchangePointer ((volatile gpointer*)prev, next, cur) == cur) {
+               if (InterlockedCompareExchangePointer ((volatile gpointer*)prev, mono_lls_pointer_unmask (next), cur) == cur) {
                        /* The CAS must happen before the hazard pointer clear. */
                        mono_memory_write_barrier ();
                        mono_hazard_pointer_clear (hp, 1);
index fe8a98079f8fee5a5c54edb850b21f161c7ed6d5..60ef156b15af7ed752361b70a36a625aee3fabbc 100644 (file)
@@ -65,8 +65,8 @@ malloc_shared_area (int pid)
 static char*
 aligned_address (char *mem, size_t size, size_t alignment)
 {
-       char *aligned = (char*)((gulong)(mem + (alignment - 1)) & ~(alignment - 1));
-       g_assert (aligned >= mem && aligned + size <= mem + size + alignment && !((gulong)aligned & (alignment - 1)));
+       char *aligned = (char*)((size_t)(mem + (alignment - 1)) & ~(alignment - 1));
+       g_assert (aligned >= mem && aligned + size <= mem + size + alignment && !((size_t)aligned & (alignment - 1)));
        return aligned;
 }
 
@@ -308,13 +308,13 @@ mono_valloc (void *addr, size_t length, int flags)
        mflags |= MAP_PRIVATE;
 
        ptr = mmap (addr, length, prot, mflags, -1, 0);
-       if (ptr == (void*)-1) {
+       if (ptr == MAP_FAILED) {
                int fd = open ("/dev/zero", O_RDONLY);
                if (fd != -1) {
                        ptr = mmap (addr, length, prot, mflags, fd, 0);
                        close (fd);
                }
-               if (ptr == (void*)-1)
+               if (ptr == MAP_FAILED)
                        return NULL;
        }
        return ptr;
@@ -368,7 +368,7 @@ mono_file_map (size_t length, int flags, int fd, guint64 offset, void **ret_hand
                mflags |= MAP_32BIT;
 
        ptr = mmap (0, length, prot, mflags, fd, offset);
-       if (ptr == (void*)-1)
+       if (ptr == MAP_FAILED)
                return NULL;
        *ret_handle = (void*)length;
        return ptr;
@@ -483,6 +483,8 @@ mono_mprotect (void *addr, size_t length, int flags)
 }
 #endif // HAVE_MMAP
 
+#if defined(HAVE_SHM_OPEN) && !defined (DISABLE_SHARED_PERFCOUNTERS)
+
 static int use_shared_area;
 
 static gboolean
@@ -497,8 +499,6 @@ shared_area_disabled (void)
        return use_shared_area == -1;
 }
 
-#if defined(HAVE_SHM_OPEN) && !defined (DISABLE_SHARED_PERFCOUNTERS)
-
 static int
 mono_shared_area_instances_slow (void **array, int count, gboolean cleanup)
 {
index 835c36795a63269bb8aa022b97f236cd105d4e05..bedef4c8863d07e38382bc92b52feb5a87392bf0 100644 (file)
 #endif
 
 #ifdef HAVE_POLL
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#elif defined(HAVE_SYS_POLL_H)
 #include <sys/poll.h>
+#endif
 
 #define MONO_POLLIN            POLLIN
 #define MONO_POLLPRI           POLLPRI
index 74be0028245c4a5cf4f3180349f83bca1f949568..4ac92196e07c5cdae57975616aa4c7f54c1e2ba0 100644 (file)
@@ -25,9 +25,6 @@
 #  elif defined(__native_client__) && defined(USE_NEWLIB)
 #    define TIMESPEC struct timespec
 #    define WAIT_BLOCK(a, b) sem_trywait(a)
-#  elif defined(__OpenBSD__)
-#    define TIMESPEC struct timespec
-#    define WAIT_BLOCK(a) sem_trywait(a)
 #  else
 #    define TIMESPEC struct timespec
 #    define WAIT_BLOCK(a,b) sem_timedwait (a, b)
@@ -43,9 +40,6 @@ mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
        TIMESPEC ts, copy;
        struct timeval t;
        int res = 0;
-#if defined(__OpenBSD__)
-       int timeout;
-#endif
 
 #ifndef USE_MACH_SEMA
        if (timeout_ms == 0)
@@ -65,19 +59,7 @@ mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
                ts.tv_nsec -= NSEC_PER_SEC;
                ts.tv_sec++;
        }
-#if defined(__OpenBSD__)
-       timeout = ts.tv_sec;
-       while (timeout) {
-               if ((res = WAIT_BLOCK (sem)) == 0)
-                       return res;
-
-               if (alertable)
-                       return -1;
 
-               usleep (ts.tv_nsec / 1000);
-               timeout--;
-       }
-#else
        copy = ts;
        while ((res = WAIT_BLOCK (sem, &ts)) == -1 && errno == EINTR) {
                struct timeval current;
@@ -104,7 +86,7 @@ mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
                        ts.tv_nsec = 0;
                }
        }
-#endif
+
        /* OSX might return > 0 for error */
        if (res != 0)
                res = -1;
index daa82bbef3742d8ea07529776eefc31589ced3cf..05817a842f312a69e1c43381ec4899ad5f78c9c2 100644 (file)
 
 #if defined(TARGET_X86)
 
-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__DragonFly__)
 #include <ucontext.h>
 #endif
 #if defined(__APPLE__)
 #include <AvailabilityMacros.h>
 #endif
 
-#if defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
        #define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_eax)
        #define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_ebx)
        #define UCONTEXT_REG_ECX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_ecx)
@@ -154,7 +154,7 @@ typedef struct ucontext {
 
 #elif defined(TARGET_AMD64)
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include <ucontext.h>
 #endif
 
@@ -176,7 +176,7 @@ typedef struct ucontext {
        #define UCONTEXT_REG_R13(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r13)
        #define UCONTEXT_REG_R14(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r14)
        #define UCONTEXT_REG_R15(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r15)
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
        #define UCONTEXT_REG_RAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rax)
        #define UCONTEXT_REG_RBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rbx)
        #define UCONTEXT_REG_RCX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rcx)
index 0e95d4e878e6eb1c7f3789dc8c13b92fdd456731..cafb3fe96d03a7ddc35d3e72216ccdb8258be080 100644 (file)
@@ -66,25 +66,24 @@ mono_threads_install_dead_letter (void)
 {
        id cur, dict;
 
+       /*
+        * See the 'Dispatch Objective-C Messages Using the Method Function’s Prototype' section in
+        * the '64-Bit Transition Guide for Cocoa Touch' as to why this is required.
+        *
+        * It doesn't hurt on other architectures either, so no need to #ifdef it only for ARM64.
+        */
+
+       id (*id_objc_msgSend_id)(id, SEL, id) = (id (*)(id, SEL, id)) objc_msgSend;
+       void (*objc_msgSend_id_id)(id, SEL, id, id) = (void (*)(id, SEL, id, id)) objc_msgSend;
+
        cur = objc_msgSend ((id)nsthread, currentThread);
        if (!cur)
                return;
        dict = objc_msgSend (cur, threadDictionary);
-       if (dict && objc_msgSend (dict, objectForKey, mono_dead_letter_key) == nil) {
+       if (dict && id_objc_msgSend_id (dict, objectForKey, mono_dead_letter_key) == nil) {
                id value = objc_msgSend (objc_msgSend ((id)mono_dead_letter_class, alloc), init);
 
-#ifdef TARGET_ARM64
-               /*
-                * See the 'Dispatch Objective-C Messages Using the Method Function’s Prototype' section in
-                * the '64-Bit Transition Guide for Cocoa Touch' as to why this is required.
-                */
-               {
-                       void (*action)(id, SEL, id, id) = (void (*)(id, SEL, id, id)) objc_msgSend;
-                       action (dict, setObjectForKey, value, mono_dead_letter_key);
-               }
-#else
-               objc_msgSend (dict, setObjectForKey, value, mono_dead_letter_key);
-#endif
+               objc_msgSend_id_id (dict, setObjectForKey, value, mono_dead_letter_key);
 
                objc_msgSend (value, release);
        }
@@ -93,8 +92,8 @@ mono_threads_install_dead_letter (void)
 void
 mono_threads_init_dead_letter (void)
 {
-       id nsstring = objc_getClass ("NSString");
-       id nsautoreleasepool = objc_getClass ("NSAutoreleasePool");
+       id nsstring = (id) objc_getClass ("NSString");
+       id nsautoreleasepool = (id) objc_getClass ("NSAutoreleasePool");
        SEL stringWithUTF8String = sel_registerName ("stringWithUTF8String:");
        SEL retain = sel_registerName ("retain");
        id pool;
@@ -121,14 +120,8 @@ mono_threads_init_dead_letter (void)
        // create the dict key
        pool = objc_msgSend (objc_msgSend (nsautoreleasepool, alloc), init);
 
-#ifdef TARGET_ARM64
-       {
-               id (*action)(id, SEL, char*) = (id (*)(id, SEL, char*)) objc_msgSend;
-               mono_dead_letter_key = action(nsstring, stringWithUTF8String, "mono-dead-letter");
-       }
-#else
-       mono_dead_letter_key = objc_msgSend (nsstring, stringWithUTF8String, "mono-dead-letter");
-#endif
+       id (*objc_msgSend_char)(id, SEL, const char*) = (id (*)(id, SEL, const char*)) objc_msgSend;
+       mono_dead_letter_key = objc_msgSend_char (nsstring, stringWithUTF8String, "mono-dead-letter");
 
        objc_msgSend (mono_dead_letter_key, retain);
        objc_msgSend (pool, release);
index 37bc7580da51fd08cc59b13c61fba969a73b1fdc..8a21c553054ececad51ede4fa23538c47ce95490 100644 (file)
@@ -9,6 +9,12 @@
 
 #include <config.h>
 
+#if defined(TARGET_OSX)
+/* For pthread_main_np () */
+#define _DARWIN_C_SOURCE 1
+#include <pthread.h>
+#endif
+
 #if defined(__OpenBSD__) || defined(__FreeBSD__)
 #include <pthread.h>
 #include <pthread_np.h>
@@ -187,14 +193,13 @@ mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize)
        *staddr = (guint8*)pthread_get_stackaddr_np (pthread_self());
        *stsize = pthread_get_stacksize_np (pthread_self());
 
-
 #ifdef TARGET_OSX
        /*
         * Mavericks reports stack sizes as 512kb:
         * http://permalink.gmane.org/gmane.comp.java.openjdk.hotspot.devel/11590
         * https://bugs.openjdk.java.net/browse/JDK-8020753
         */
-       if (*stsize == 512 * 1024)
+       if (pthread_main_np () && *stsize == 512 * 1024)
                *stsize = 2048 * mono_pagesize ();
 #endif
 
index 605ebf58a7650a3e95ceb5b1422400902ba0aad2..2ab2e6596e5cf5e6d0730a9a816b9e5208dfe7fb 100644 (file)
@@ -40,19 +40,19 @@ mono_threads_core_needs_abort_syscall (void)
 void
 mono_threads_core_self_suspend (MonoThreadInfo *info)
 {
-       g_assert (0);
+       g_assert_not_reached ();
 }
 
 gboolean
 mono_threads_core_suspend (MonoThreadInfo *info)
 {
-       g_assert (0);
+       g_assert_not_reached ();
 }
 
 gboolean
 mono_threads_core_resume (MonoThreadInfo *info)
 {
-       g_assert (0);
+       g_assert_not_reached ();
 }
 
 void
@@ -190,6 +190,7 @@ __readfsdword (unsigned long offset)
 void
 mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize)
 {
+       MEMORY_BASIC_INFORMATION meminfo;
 #ifdef TARGET_AMD64
        /* win7 apis */
        NT_TIB* tib = (NT_TIB*)NtCurrentTeb();
@@ -201,9 +202,17 @@ mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize)
        guint8 *stackTop = (guint8*)*(int*)((char*)tib + 4);
        guint8 *stackBottom = (guint8*)*(int*)((char*)tib + 8);
 #endif
+       /*
+       Windows stacks are expanded on demand, one page at time. The TIB reports
+       only the currently allocated amount.
+       VirtualQuery will return the actual limit for the bottom, which is what we want.
+       */
+       if (VirtualQuery (&meminfo, &meminfo, sizeof (meminfo)) == sizeof (meminfo))
+               stackBottom = MIN (stackBottom, (guint8*)meminfo.AllocationBase);
 
        *staddr = stackBottom;
        *stsize = stackTop - stackBottom;
+
 }
 
 gboolean
index dad8850711aea22f118dd4e620180bd18e028b71..0258e2aa28fc31ca3e7556c2588dcd8aad0b6b74 100644 (file)
@@ -38,7 +38,7 @@ when it is in fact not.
 */
 static MonoSemType global_suspend_semaphore;
 
-static int thread_info_size;
+static size_t thread_info_size;
 static MonoThreadInfoCallbacks threads_callbacks;
 static MonoThreadInfoRuntimeCallbacks runtime_callbacks;
 static MonoNativeTlsKey thread_info_key, small_id_key;
@@ -741,7 +741,7 @@ mono_threads_create_thread (LPTHREAD_START_ROUTINE start, gpointer arg, guint32
 void
 mono_thread_info_get_stack_bounds (guint8 **staddr, size_t *stsize)
 {
-       return mono_threads_core_get_stack_bounds (staddr, stsize);
+       mono_threads_core_get_stack_bounds (staddr, stsize);
 }
 
 gboolean
index 457a268ad17d6732db208dac519827a4898ee61b..dbd25a8f7787a052504a9c95014b6c2cd3b1c010 100644 (file)
@@ -28,7 +28,7 @@ typedef HANDLE MonoNativeThreadHandle; /* unused */
 typedef DWORD mono_native_thread_return_t;
 
 #define MONO_NATIVE_THREAD_ID_TO_UINT(tid) (tid)
-#define MONO_UINT_TO_NATIVE_THREAD_ID(tid) (tid)
+#define MONO_UINT_TO_NATIVE_THREAD_ID(tid) ((MonoNativeThreadId)(tid))
 
 #else
 
index d7b993409991182021565d76457cd7f4dc16ddf6..f20acdc2498bb31a49f9d81cc5257c381c118ef2 100644 (file)
  * #define NO_ERRNO if strtod should not assign errno = ERANGE when
  *     the result overflows to +-Infinity or underflows to 0.
  */
-#if defined(TARGET_X86) || defined(mips) && defined(MIPSEL) || defined (__arm__)
+#if defined(TARGET_X86) || defined(mips) && defined(MIPSEL) || defined (__arm__) || defined(__aarch64__)
 
 #   define IEEE_8087
 
diff --git a/mono/utils/win64.asm b/mono/utils/win64.asm
new file mode 100644 (file)
index 0000000..15984b6
--- /dev/null
@@ -0,0 +1,43 @@
+ifdef RAX
+else
+
+.386
+.model flat, c
+
+endif
+
+.code
+
+ifdef RAX
+
+PUBLIC mono_context_get_current
+
+mono_context_get_current PROC
+;rdi has the ctx ptr
+       mov [rcx + 00h], rax
+       mov [rcx + 08h], rbx
+       mov [rcx + 10h], rcx
+       mov [rcx + 18h], rdx
+       mov [rcx + 20h], rbp
+       mov [rcx + 28h], rsp
+       mov [rcx + 30h], rsi
+       mov [rcx + 38h], rdi
+       mov [rcx + 40h], r8
+       mov [rcx + 48h], r9
+       mov [rcx + 50h], r10
+       mov [rcx + 58h], r11
+       mov [rcx + 60h], r12
+       mov [rcx + 68h], r13
+       mov [rcx + 70h], r14
+       mov [rcx + 78h], r15
+
+       lea rax, __mono_current_ip
+__mono_current_ip:
+       mov [rcx + 80h], rax
+       ret
+
+mono_context_get_current endP
+
+endif
+
+end
index 73d376b45bae85eea8e27647633407568859db2f..26b243f2b6a0e2389d422c943ba600962fed7d47 100644 (file)
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>libgc.lib;libmonoruntime.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>libgc.lib;libmonoruntimesgen.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
       <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>monosgen.def</ModuleDefinitionFile>\r
+      <ModuleDefinitionFile>monosgen64.def</ModuleDefinitionFile>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <ImportLibrary>$(Platform)\lib\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX64</TargetMachine>\r
       <LinkLibraryDependencies>false</LinkLibraryDependencies>\r
     </ProjectReference>\r
     <Link>\r
-      <AdditionalDependencies>libgc.lib;libmonoruntime.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>libgc.lib;libmonoruntimesgen.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
       <AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <ModuleDefinitionFile>monosgen.def</ModuleDefinitionFile>\r
+      <ModuleDefinitionFile>monosgen64.def</ModuleDefinitionFile>\r
       <ImportLibrary>$(Platform)\lib\$(TargetName).lib</ImportLibrary>\r
       <TargetMachine>MachineX64</TargetMachine>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
index 634c160525f1f3232b4763ce07f0931b9f3966ce..3635bdae2d58d611d345399c4860b7c3f3a55e6b 100644 (file)
@@ -1,5 +1,5 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug_SGen|Win32">\r
       <Configuration>Debug_SGen</Configuration>\r
@@ -51,6 +51,7 @@
     <ClCompile Include="..\mono\metadata\environment.c" />\r
     <ClCompile Include="..\mono\metadata\exception.c" />\r
     <ClCompile Include="..\mono\metadata\file-io.c" />\r
+    <ClCompile Include="..\mono\metadata\file-mmap-windows.c" />\r
     <ClCompile Include="..\mono\metadata\filewatcher.c" />\r
     <ClCompile Include="..\mono\metadata\gc-memfuncs.c" />\r
     <ClCompile Include="..\mono\metadata\gc.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-marksweep-par.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-marksweep.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-memory-governor.c" />\r
+    <ClCompile Include="..\mono\metadata\sgen-new-bridge.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-nursery-allocator.c" />\r
+    <ClCompile Include="..\mono\metadata\sgen-old-bridge.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-os-mach.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-os-posix.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-os-win32.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-protocol.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-simple-nursery.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-split-nursery.c" />\r
+    <ClCompile Include="..\mono\metadata\sgen-tarjan-bridge.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-toggleref.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-workers.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-fin-weak-hash.c" />\r
     <ClCompile Include="..\mono\metadata\threadpool.c" />\r
     <ClCompile Include="..\mono\metadata\threads.c" />\r
     <ClCompile Include="..\mono\metadata\verify.c" />\r
+    <ClCompile Include="..\mono\mini\mini-cross-helpers.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="..\mono\metadata\appdomain.h" />\r
       <WarningLevel>Level3</WarningLevel>\r
       <Optimization>Disabled</Optimization>\r
       <PreprocessorDefinitions>WIN32;$(SGEN_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <OmitFramePointers>false</OmitFramePointers>\r
+      <AdditionalIncludeDirectories>$(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(top_srcdir)\mono</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
index b52f26a5525e99b9752144b1e05e7475050328f3..b760ab7697180fd83ef8c0d3bc0a646d126712c7 100644 (file)
     <ClInclude Include="..\mono\utils\mono-hwcap-x86.h" />\r
     <ClInclude Include="..\mono\utils\bsearch.h" />\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <MASM Include="..\mono\utils\win64.asm">\r
+      <FileType>Document</FileType>\r
+    </MASM>\r
+  </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}</ProjectGuid>\r
     <Keyword>Win32Proj</Keyword>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
+    <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />\r
   </ImportGroup>\r
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
       <WarningLevel>Level3</WarningLevel>\r
       <Optimization>Disabled</Optimization>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>$(top_srcdir);$(top_srcdir)/eglib/src;$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
     <PreBuildEvent>\r
       <Command>winsetup.bat</Command>\r
     </PreBuildEvent>\r
+    <MASM>\r
+      <PreprocessorDefinitions>X64</PreprocessorDefinitions>\r
+    </MASM>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
   </ItemDefinitionGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
+    <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />\r
   </ImportGroup>\r
 </Project>
\ No newline at end of file
index 6a1f0d49d5448d79a932eb4435c2f4a3c42ac8bb..61d1779c336f0c0e92e509eaf94a9c5b3e3d0100 100644 (file)
@@ -243,6 +243,7 @@ mono_domain_has_type_resolve
 mono_domain_is_unloading
 mono_domain_owns_vtable_slot
 mono_domain_set
+mono_domain_set_config
 mono_domain_set_internal
 mono_domain_try_type_resolve
 mono_domain_try_unload
index b8f3c4fd165fd8d951776c8652cc35872409f2ac..7fe3206e2485d7584d46e902cd91734e3a486bac 100644 (file)
@@ -1,9 +1,9 @@
 ï»¿<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Label="MonoDefines">
-    <top_srcdir>$(MSBuildProjectDirectory)/..</top_srcdir>
-    <LIBGC_CPPFLAGS_INCLUDE>$(top_srcdir)/libgc/include</LIBGC_CPPFLAGS_INCLUDE>
-    <GLIB_CFLAGS_INCLUDE>$(top_srcdir)/eglib/src</GLIB_CFLAGS_INCLUDE>
+    <top_srcdir>$(MSBuildProjectDirectory)\..</top_srcdir>
+    <LIBGC_CPPFLAGS_INCLUDE>$(top_srcdir)\libgc\include</LIBGC_CPPFLAGS_INCLUDE>
+    <GLIB_CFLAGS_INCLUDE>$(top_srcdir)\eglib\src</GLIB_CFLAGS_INCLUDE>
     <BOEHM_DEFINES>HAVE_BOEHM_GC;HAVE_GC_H;USE_INCLUDED_LIBGC;HAVE_GC_GCJ_MALLOC;HAVE_GC_ENABLE</BOEHM_DEFINES>
     <SGEN_DEFINES>HAVE_SGEN_GC;HAVE_MOVING_COLLECTOR;HAVE_WRITE_BARRIERS</SGEN_DEFINES>
   </PropertyGroup>
index 0cbc870c9a4cba7116c78ecd693635a26aec488e..2c7a641e8a7392e9b03dabf1f4a5a54ca99f5cb4 100644 (file)
@@ -244,6 +244,7 @@ mono_domain_has_type_resolve
 mono_domain_is_unloading
 mono_domain_owns_vtable_slot
 mono_domain_set
+mono_domain_set_config
 mono_domain_set_internal
 mono_domain_try_type_resolve
 mono_domain_try_unload
diff --git a/msvc/monosgen64.def b/msvc/monosgen64.def
new file mode 100644 (file)
index 0000000..d1c62a8
--- /dev/null
@@ -0,0 +1,867 @@
+; file generated by create-windef.pl
+LIBRARY monosgen-2.0.dll
+EXPORTS
+MonoFixupCorEE
+mono_add_internal_call
+mono_aot_register_globals
+mono_aot_register_module
+mono_array_addr_with_size
+mono_array_class_get
+mono_array_clone
+mono_array_element_size
+mono_array_length
+mono_array_new
+mono_array_new_full
+mono_array_new_specific
+mono_assemblies_cleanup
+mono_assemblies_init
+mono_assembly_close
+mono_assembly_fill_assembly_name
+mono_assembly_foreach
+mono_assembly_get_assemblyref
+mono_assembly_get_image
+mono_assembly_get_main
+mono_assembly_get_object
+mono_assembly_getrootdir
+mono_assembly_invoke_load_hook
+mono_assembly_invoke_search_hook
+mono_assembly_load
+mono_assembly_load_from
+mono_assembly_load_from_full
+mono_assembly_load_full
+mono_assembly_load_module
+mono_assembly_load_reference
+mono_assembly_load_references
+mono_assembly_load_with_partial_name
+mono_assembly_loaded
+mono_assembly_loaded_full
+mono_assembly_name_free
+mono_assembly_name_get_culture
+mono_assembly_name_get_name
+mono_assembly_name_get_pubkeytoken
+mono_assembly_name_get_version
+mono_assembly_name_new
+mono_assembly_names_equal
+mono_assembly_open
+mono_assembly_open_full
+mono_assembly_set_main
+mono_assembly_setrootdir
+mono_binary_search
+mono_bitset_alloc_size
+mono_bitset_clear
+mono_bitset_clear_all
+mono_bitset_clone
+mono_bitset_copyto
+mono_bitset_count
+mono_bitset_equal
+mono_bitset_find_first
+mono_bitset_find_first_unset
+mono_bitset_find_last
+mono_bitset_find_start
+mono_bitset_foreach
+mono_bitset_free
+mono_bitset_intersection
+mono_bitset_intersection_2
+mono_bitset_invert
+mono_bitset_mem_new
+mono_bitset_new
+mono_bitset_set
+mono_bitset_set_all
+mono_bitset_size
+mono_bitset_sub
+mono_bitset_test
+mono_bitset_test_bulk
+mono_bitset_union
+mono_bounded_array_class_get
+mono_breakpoint_clean_code
+mono_check_corlib_version
+mono_class_array_element_size
+mono_class_data_size
+mono_class_describe_statics
+mono_class_enum_basetype
+mono_class_from_generic_parameter
+mono_class_from_mono_type
+mono_class_from_name
+mono_class_from_name_case
+mono_class_from_typeref
+mono_class_get
+mono_class_get_byref_type
+mono_class_get_com_object_class
+mono_class_get_element_class
+mono_class_get_event_token
+mono_class_get_events
+mono_class_get_field
+mono_class_get_field_from_name
+mono_class_get_field_token
+mono_class_get_fields
+mono_class_get_flags
+mono_class_get_full
+mono_class_get_idispatch_class
+mono_class_get_image
+mono_class_get_interfaces
+mono_class_get_interop_proxy_class
+mono_class_get_iunknown_class
+mono_class_get_method_from_name
+mono_class_get_method_from_name_flags
+mono_class_get_methods
+mono_class_get_name
+mono_class_get_namespace
+mono_class_get_nested_types
+mono_class_get_nesting_type
+mono_class_get_parent
+mono_class_get_properties
+mono_class_get_property_from_name
+mono_class_get_property_token
+mono_class_get_rank
+mono_class_get_type
+mono_class_get_type_token
+mono_class_get_variant_class
+mono_class_implements_interface
+mono_class_inflate_generic_method
+mono_class_inflate_generic_type
+mono_class_init
+mono_class_instance_size
+mono_class_interface_offset
+mono_class_is_assignable_from
+mono_class_is_delegate
+mono_class_is_enum
+mono_class_is_subclass_of
+mono_class_is_valid_enum
+mono_class_is_valuetype
+mono_class_min_align
+mono_class_name_from_token
+mono_class_num_events
+mono_class_num_fields
+mono_class_num_methods
+mono_class_num_properties
+mono_class_value_size
+mono_class_vtable
+mono_cli_rva_image_map
+mono_code_manager_cleanup
+mono_code_manager_commit
+mono_code_manager_destroy
+mono_code_manager_foreach
+mono_code_manager_init
+mono_code_manager_invalidate
+mono_code_manager_new
+mono_code_manager_new_dynamic
+mono_code_manager_reserve
+mono_code_manager_reserve_align
+mono_code_manager_set_read_only
+mono_code_manager_size
+mono_compile_method
+mono_config_cleanup
+mono_config_for_assembly
+mono_config_is_server_mode
+mono_config_parse
+mono_config_parse_memory
+mono_config_set_server_mode
+mono_config_string_for_assembly_file
+mono_context_get
+mono_context_get_desc
+mono_context_init
+mono_context_set
+mono_counters_cleanup
+mono_counters_dump
+mono_counters_enable
+mono_counters_register
+mono_custom_attrs_construct
+mono_custom_attrs_free
+mono_custom_attrs_from_assembly
+mono_custom_attrs_from_class
+mono_custom_attrs_from_event
+mono_custom_attrs_from_field
+mono_custom_attrs_from_index
+mono_custom_attrs_from_method
+mono_custom_attrs_from_param
+mono_custom_attrs_from_property
+mono_custom_attrs_get_attr
+mono_custom_attrs_has_attr
+mono_debug_add_delegate_trampoline
+mono_debug_add_method
+mono_debug_cleanup
+mono_debug_close_image
+mono_debug_close_mono_symbol_file
+mono_debug_domain_create
+mono_debug_domain_unload
+mono_debug_enabled
+mono_debug_find_method
+mono_debug_free_method_jit_info
+mono_debug_free_source_location
+mono_debug_il_offset_from_address
+mono_debug_init
+mono_debug_list_add
+mono_debug_list_remove
+mono_debug_lookup_locals
+mono_debug_lookup_method
+mono_debug_lookup_method_addresses
+mono_debug_lookup_source_location
+mono_debug_open_image_from_memory
+mono_debug_open_mono_symbols
+mono_debug_print_stack_frame
+mono_debug_print_vars
+mono_debug_remove_method
+mono_debug_symfile_free_locals
+mono_debug_symfile_free_location
+mono_debug_symfile_get_line_numbers
+mono_debug_symfile_get_line_numbers_full
+mono_debug_symfile_is_loaded
+mono_debug_symfile_lookup_locals
+mono_debug_symfile_lookup_location
+mono_debug_symfile_lookup_method
+mono_debugger_insert_breakpoint
+mono_debugger_method_has_breakpoint
+mono_debugger_run_finally
+mono_declsec_flags_from_assembly
+mono_declsec_flags_from_class
+mono_declsec_flags_from_method
+mono_declsec_get_assembly_action
+mono_declsec_get_class_action
+mono_declsec_get_demands
+mono_declsec_get_inheritdemands_class
+mono_declsec_get_inheritdemands_method
+mono_declsec_get_linkdemands
+mono_declsec_get_method_action
+mono_digest_get_public_token
+mono_disasm_code
+mono_disasm_code_one
+mono_dl_fallback_register
+mono_dl_fallback_unregister
+mono_dllmap_insert
+mono_domain_add_class_static_data
+mono_domain_assembly_open
+mono_domain_create
+mono_domain_create_appdomain
+mono_domain_finalize
+mono_domain_foreach
+mono_domain_free
+mono_domain_from_appdomain
+mono_domain_get
+mono_domain_get_by_id
+mono_domain_get_id
+mono_domain_has_type_resolve
+mono_domain_is_unloading
+mono_domain_owns_vtable_slot
+mono_domain_set
+mono_domain_set_config
+mono_domain_set_internal
+mono_domain_try_type_resolve
+mono_domain_try_unload
+mono_domain_unload
+mono_dwarf_escape_path
+mono_emit_native_call
+mono_environment_exitcode_get
+mono_environment_exitcode_set
+mono_error_cleanup
+mono_error_get_error_code
+mono_error_get_message
+mono_error_init
+mono_error_init_flags
+mono_error_ok
+mono_escape_uri_string
+mono_event_get_add_method
+mono_event_get_flags
+mono_event_get_name
+mono_event_get_object
+mono_event_get_parent
+mono_event_get_raise_method
+mono_event_get_remove_method
+mono_exception_from_name
+mono_exception_from_name_domain
+mono_exception_from_name_msg
+mono_exception_from_name_two_strings
+mono_exception_from_token
+mono_exception_from_token_two_strings
+mono_exception_walk_trace
+mono_field_from_token
+mono_field_full_name
+mono_field_get_data
+mono_field_get_flags
+mono_field_get_name
+mono_field_get_object
+mono_field_get_offset
+mono_field_get_parent
+mono_field_get_type
+mono_field_get_value
+mono_field_get_value_object
+mono_field_set_value
+mono_field_static_get_value
+mono_field_static_set_value
+mono_file_map
+mono_file_map_close
+mono_file_map_fd
+mono_file_map_open
+mono_file_map_size
+mono_file_unmap
+mono_free
+mono_free_bstr
+mono_free_method
+mono_free_verify_list
+mono_g_hash_table_destroy
+mono_g_hash_table_find
+mono_g_hash_table_foreach
+mono_g_hash_table_foreach_remove
+mono_g_hash_table_insert
+mono_g_hash_table_lookup
+mono_g_hash_table_lookup_extended
+mono_g_hash_table_new
+mono_g_hash_table_new_full
+mono_g_hash_table_new_type
+mono_g_hash_table_print_stats
+mono_g_hash_table_remove
+mono_g_hash_table_replace
+mono_g_hash_table_size
+mono_gc_collect
+mono_gc_collection_count
+mono_gc_enable_events
+mono_gc_get_generation
+mono_gc_get_heap_size
+mono_gc_get_used_size
+mono_gc_invoke_finalizers
+mono_gc_is_finalizer_thread
+mono_gc_make_root_descr_user
+mono_gc_max_generation
+mono_gc_out_of_memory
+mono_gc_reference_queue_add
+mono_gc_reference_queue_free
+mono_gc_reference_queue_new
+mono_gc_toggleref_add
+mono_gc_toggleref_register_callback
+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
+mono_gc_wbarrier_value_copy
+mono_gchandle_free
+mono_gchandle_get_target
+mono_gchandle_new
+mono_gchandle_new_weakref
+mono_get_array_class
+mono_get_boolean_class
+mono_get_byte_class
+mono_get_char_class
+mono_get_config_dir
+mono_get_corlib
+mono_get_dbnull_object
+mono_get_delegate_begin_invoke
+mono_get_delegate_end_invoke
+mono_get_delegate_invoke
+mono_get_double_class
+mono_get_enum_class
+mono_get_exception_appdomain_unloaded
+mono_get_exception_argument
+mono_get_exception_argument_null
+mono_get_exception_argument_out_of_range
+mono_get_exception_arithmetic
+mono_get_exception_array_type_mismatch
+mono_get_exception_bad_image_format
+mono_get_exception_bad_image_format2
+mono_get_exception_cannot_unload_appdomain
+mono_get_exception_class
+mono_get_exception_divide_by_zero
+mono_get_exception_execution_engine
+mono_get_exception_field_access
+mono_get_exception_file_not_found
+mono_get_exception_file_not_found2
+mono_get_exception_index_out_of_range
+mono_get_exception_invalid_cast
+mono_get_exception_invalid_operation
+mono_get_exception_io
+mono_get_exception_method_access
+mono_get_exception_missing_field
+mono_get_exception_missing_method
+mono_get_exception_not_implemented
+mono_get_exception_not_supported
+mono_get_exception_null_reference
+mono_get_exception_out_of_memory
+mono_get_exception_overflow
+mono_get_exception_reflection_type_load
+mono_get_exception_runtime_wrapped
+mono_get_exception_security
+mono_get_exception_serialization
+mono_get_exception_stack_overflow
+mono_get_exception_synchronization_lock
+mono_get_exception_thread_abort
+mono_get_exception_thread_interrupted
+mono_get_exception_thread_state
+mono_get_exception_type_initialization
+mono_get_exception_type_load
+mono_get_inflated_method
+mono_get_int16_class
+mono_get_int32_class
+mono_get_int64_class
+mono_get_intptr_class
+mono_get_machine_config
+mono_get_method
+mono_get_method_constrained
+mono_get_method_full
+mono_get_object_class
+mono_get_root_domain
+mono_get_runtime_build_info
+mono_get_sbyte_class
+mono_get_single_class
+mono_get_string_class
+mono_get_thread_class
+mono_get_trampoline_func
+mono_get_uint16_class
+mono_get_uint32_class
+mono_get_uint64_class
+mono_get_uintptr_class
+mono_get_void_class
+mono_guid_to_string
+mono_image_add_to_name_cache
+mono_image_addref
+mono_image_close
+mono_image_ensure_section
+mono_image_ensure_section_idx
+mono_image_fixup_vtable
+mono_image_get_assembly
+mono_image_get_entry_point
+mono_image_get_filename
+mono_image_get_guid
+mono_image_get_name
+mono_image_get_public_key
+mono_image_get_resource
+mono_image_get_strong_name
+mono_image_get_table_info
+mono_image_get_table_rows
+mono_image_has_authenticode_entry
+mono_image_init
+mono_image_init_name_cache
+mono_image_is_dynamic
+mono_image_load_file_for_image
+mono_image_load_module
+mono_image_loaded
+mono_image_loaded_by_guid
+mono_image_loaded_by_guid_full
+mono_image_loaded_full
+mono_image_lookup_resource
+mono_image_open
+mono_image_open_from_data
+mono_image_open_from_data_full
+mono_image_open_from_data_with_name
+mono_image_open_full
+mono_image_rva_map
+mono_image_strerror
+mono_image_strong_name_position
+mono_images_cleanup
+mono_images_init
+mono_init
+mono_init_from_assembly
+mono_init_version
+mono_inst_name
+mono_install_assembly_load_hook
+mono_install_assembly_postload_refonly_search_hook
+mono_install_assembly_postload_search_hook
+mono_install_assembly_preload_hook
+mono_install_assembly_refonly_preload_hook
+mono_install_assembly_refonly_search_hook
+mono_install_assembly_search_hook
+mono_install_runtime_cleanup
+mono_install_threadpool_item_hooks
+mono_install_threadpool_thread_hooks
+mono_install_unhandled_exception_hook
+mono_invoke_unhandled_exception_hook
+mono_is_debugger_attached
+mono_jit_cleanup
+mono_jit_exec
+mono_jit_info_get_code_size
+mono_jit_info_get_code_start
+mono_jit_info_get_method
+mono_jit_info_table_find
+mono_jit_init
+mono_jit_init_version
+mono_jit_parse_options
+mono_jit_set_aot_only
+mono_jit_set_domain
+mono_jit_set_trace_options
+mono_jit_thread_attach
+mono_ldstr
+mono_ldtoken
+mono_lls_init
+mono_load_remote_field
+mono_load_remote_field_new
+mono_local_deadce
+mono_locks_dump
+mono_lookup_icall_symbol
+mono_lookup_internal_call
+mono_lookup_pinvoke_call
+mono_main
+mono_marshal_string_to_utf16
+mono_md5_final
+mono_md5_get_digest
+mono_md5_get_digest_from_file
+mono_md5_init
+mono_md5_update
+mono_mempool_alloc
+mono_mempool_alloc0
+mono_mempool_contains_addr
+mono_mempool_destroy
+mono_mempool_empty
+mono_mempool_get_allocated
+mono_mempool_invalidate
+mono_mempool_new
+mono_mempool_new_size
+mono_mempool_stats
+mono_mempool_strdup
+mono_metadata_blob_heap
+mono_metadata_cleanup
+mono_metadata_compute_size
+mono_metadata_custom_attrs_from_index
+mono_metadata_declsec_from_index
+mono_metadata_decode_blob_size
+mono_metadata_decode_row
+mono_metadata_decode_row_col
+mono_metadata_decode_signed_value
+mono_metadata_decode_table_row
+mono_metadata_decode_table_row_col
+mono_metadata_decode_value
+mono_metadata_encode_value
+mono_metadata_events_from_typedef
+mono_metadata_field_info
+mono_metadata_field_info_with_mempool
+mono_metadata_free_array
+mono_metadata_free_inflated_signature
+mono_metadata_free_marshal_spec
+mono_metadata_free_method_signature
+mono_metadata_free_mh
+mono_metadata_free_type
+mono_metadata_generic_class_is_valuetype
+mono_metadata_get_constant_index
+mono_metadata_get_generic_param_row
+mono_metadata_get_inflated_signature
+mono_metadata_get_marshal_info
+mono_metadata_guid_heap
+mono_metadata_implmap_from_method
+mono_metadata_init
+mono_metadata_interfaces_from_typedef
+mono_metadata_load_generic_param_constraints
+mono_metadata_load_generic_params
+mono_metadata_locate
+mono_metadata_locate_token
+mono_metadata_methods_from_event
+mono_metadata_methods_from_property
+mono_metadata_nested_in_typedef
+mono_metadata_nesting_typedef
+mono_metadata_packing_from_typedef
+mono_metadata_parse_array
+mono_metadata_parse_custom_mod
+mono_metadata_parse_field_type
+mono_metadata_parse_marshal_spec
+mono_metadata_parse_method_signature
+mono_metadata_parse_method_signature_full
+mono_metadata_parse_mh
+mono_metadata_parse_mh_full
+mono_metadata_parse_param
+mono_metadata_parse_signature
+mono_metadata_parse_type
+mono_metadata_parse_type_full
+mono_metadata_parse_typedef_or_ref
+mono_metadata_properties_from_typedef
+mono_metadata_signature_alloc
+mono_metadata_signature_dup
+mono_metadata_signature_equal
+mono_metadata_string_heap
+mono_metadata_token_from_dor
+mono_metadata_translate_token_index
+mono_metadata_type_equal
+mono_metadata_type_hash
+mono_metadata_typedef_from_field
+mono_metadata_typedef_from_method
+mono_metadata_user_string
+mono_method_body_get_object
+mono_method_can_access_field
+mono_method_can_access_method
+mono_method_desc_free
+mono_method_desc_from_method
+mono_method_desc_full_match
+mono_method_desc_match
+mono_method_desc_new
+mono_method_desc_search_in_class
+mono_method_desc_search_in_image
+mono_method_full_name
+mono_method_get_class
+mono_method_get_flags
+mono_method_get_generic_container
+mono_method_get_header
+mono_method_get_index
+mono_method_get_last_managed
+mono_method_get_marshal_info
+mono_method_get_name
+mono_method_get_object
+mono_method_get_param_names
+mono_method_get_param_token
+mono_method_get_signature
+mono_method_get_signature_full
+mono_method_get_token
+mono_method_get_unmanaged_thunk
+mono_method_has_marshal_info
+mono_method_header_get_clauses
+mono_method_header_get_code
+mono_method_header_get_locals
+mono_method_header_get_num_clauses
+mono_method_signature
+mono_method_verify
+mono_mlist_alloc
+mono_mlist_append
+mono_mlist_get_data
+mono_mlist_last
+mono_mlist_length
+mono_mlist_next
+mono_mlist_prepend
+mono_mlist_remove_item
+mono_mlist_set_data
+mono_mlist_set_next
+mono_module_file_get_object
+mono_module_get_object
+mono_monitor_enter
+mono_monitor_exit
+mono_monitor_try_enter
+mono_mprotect
+mono_mutex_init_suspend_safe
+mono_object_castclass_mbyref
+mono_object_castclass_with_cache
+mono_object_clone
+mono_object_describe
+mono_object_describe_fields
+mono_object_get_class
+mono_object_get_domain
+mono_object_get_size
+mono_object_get_virtual_method
+mono_object_hash
+mono_object_is_alive
+mono_object_isinst
+mono_object_isinst_mbyref
+mono_object_isinst_with_cache
+mono_object_new
+mono_object_new_alloc_specific
+mono_object_new_fast
+mono_object_new_from_token
+mono_object_new_specific
+mono_object_to_string
+mono_object_unbox
+mono_op_to_op_imm_noemul
+mono_opcode_name
+mono_opcode_value
+mono_pagesize
+mono_param_get_objects
+mono_parse_default_optimizations
+mono_path_canonicalize
+mono_path_resolve_symlinks
+mono_pe_file_open
+mono_perfcounters_init
+mono_pmip
+mono_poll
+mono_print_method_from_ip
+mono_print_thread_dump
+mono_print_thread_dump_from_ctx
+mono_print_unhandled_exception
+mono_profiler_coverage_get
+mono_profiler_get_events
+mono_profiler_install
+mono_profiler_install_allocation
+mono_profiler_install_appdomain
+mono_profiler_install_assembly
+mono_profiler_install_class
+mono_profiler_install_code_buffer_new
+mono_profiler_install_code_chunk_destroy
+mono_profiler_install_code_chunk_new
+mono_profiler_install_coverage_filter
+mono_profiler_install_enter_leave
+mono_profiler_install_exception
+mono_profiler_install_gc
+mono_profiler_install_gc_moves
+mono_profiler_install_gc_roots
+mono_profiler_install_iomap
+mono_profiler_install_jit_compile
+mono_profiler_install_jit_end
+mono_profiler_install_method_free
+mono_profiler_install_method_invoke
+mono_profiler_install_module
+mono_profiler_install_monitor
+mono_profiler_install_runtime_initialized
+mono_profiler_install_statistical
+mono_profiler_install_statistical_call_chain
+mono_profiler_install_thread
+mono_profiler_install_thread_name
+mono_profiler_install_transition
+mono_profiler_load
+mono_profiler_set_events
+mono_property_get_flags
+mono_property_get_get_method
+mono_property_get_name
+mono_property_get_object
+mono_property_get_parent
+mono_property_get_set_method
+mono_property_get_value
+mono_property_hash_destroy
+mono_property_hash_insert
+mono_property_hash_lookup
+mono_property_hash_new
+mono_property_hash_remove_object
+mono_property_set_value
+mono_ptr_class_get
+mono_raise_exception
+mono_realloc_native_code
+mono_reflection_free_type_info
+mono_reflection_get_custom_attrs
+mono_reflection_get_custom_attrs_blob
+mono_reflection_get_custom_attrs_by_type
+mono_reflection_get_custom_attrs_data
+mono_reflection_get_custom_attrs_info
+mono_reflection_get_token
+mono_reflection_get_type
+mono_reflection_parse_type
+mono_reflection_type_from_name
+mono_reflection_type_get_type
+mono_register_bundled_assemblies
+mono_register_config_for_assembly
+mono_register_machine_config
+mono_register_symfile_for_assembly
+mono_replace_ins
+mono_runtime_class_init
+mono_runtime_cleanup
+mono_runtime_delegate_invoke
+mono_runtime_exec_main
+mono_runtime_exec_managed_code
+mono_runtime_get_main_args
+mono_runtime_init
+mono_runtime_invoke
+mono_runtime_invoke_array
+mono_runtime_is_shutting_down
+mono_runtime_object_init
+mono_runtime_quit
+mono_runtime_resource_check_limit
+mono_runtime_resource_limit
+mono_runtime_resource_set_callback
+mono_runtime_run_main
+mono_runtime_set_shutting_down
+mono_security_core_clr_get_options
+mono_security_core_clr_require_elevated_permissions
+mono_security_core_clr_set_options
+mono_security_enable_core_clr
+mono_security_set_core_clr_platform_callback
+mono_sem_post
+mono_sem_timedwait
+mono_sem_wait
+mono_set_assemblies_path
+mono_set_break_policy
+mono_set_config_dir
+mono_set_defaults
+mono_set_dirs
+mono_set_is_debugger_attached
+mono_set_rootdir
+mono_set_signal_chaining
+mono_sha1_final
+mono_sha1_get_digest
+mono_sha1_get_digest_from_file
+mono_sha1_init
+mono_sha1_update
+mono_shared_area
+mono_shared_area_for_pid
+mono_shared_area_instances
+mono_shared_area_remove
+mono_shared_area_unload
+mono_signature_explicit_this
+mono_signature_get_call_conv
+mono_signature_get_desc
+mono_signature_get_param_count
+mono_signature_get_params
+mono_signature_get_return_type
+mono_signature_hash
+mono_signature_is_instance
+mono_signature_param_is_out
+mono_signature_vararg_start
+mono_signbit_double
+mono_signbit_float
+mono_stack_walk
+mono_stack_walk_no_il
+mono_store_remote_field
+mono_store_remote_field_new
+mono_string_chars
+mono_string_equal
+mono_string_from_bstr
+mono_string_from_utf16
+mono_string_hash
+mono_string_intern
+mono_string_is_interned
+mono_string_length
+mono_string_new
+mono_string_new_len
+mono_string_new_size
+mono_string_new_utf16
+mono_string_new_wrapper
+mono_string_to_utf16
+mono_string_to_utf8
+mono_string_to_utf8_checked
+mono_stringify_assembly_name
+mono_table_info_get_rows
+mono_thread_attach
+mono_thread_cleanup
+mono_thread_create
+mono_thread_current
+mono_thread_detach
+mono_thread_exit
+mono_thread_get_main
+mono_thread_get_undeniable_exception
+mono_thread_init
+mono_thread_is_foreign
+mono_thread_manage
+mono_thread_new_init
+mono_thread_set_main
+mono_thread_set_manage_callback
+mono_thread_stop
+mono_threads_get_default_stacksize
+mono_threads_request_thread_dump
+mono_threads_set_default_stacksize
+mono_tls_key_get_offset
+mono_tls_key_set_offset
+mono_trace_set_level_string
+mono_trace_set_mask_string
+mono_type_create_from_typespec
+mono_type_full_name
+mono_type_generic_inst_is_valuetype
+mono_type_get_array_type
+mono_type_get_class
+mono_type_get_desc
+mono_type_get_modifiers
+mono_type_get_name
+mono_type_get_object
+mono_type_get_ptr_type
+mono_type_get_signature
+mono_type_get_type
+mono_type_get_underlying_type
+mono_type_is_byref
+mono_type_is_pointer
+mono_type_is_reference
+mono_type_is_struct
+mono_type_is_valid_enum_basetype
+mono_type_is_void
+mono_type_size
+mono_type_stack_size
+mono_type_to_unmanaged
+mono_unhandled_exception
+mono_unicode_from_external
+mono_unicode_to_external
+mono_upgrade_remote_class_wrapper
+mono_utf8_from_external
+mono_utf8_validate_and_len
+mono_utf8_validate_and_len_with_bounds
+mono_valloc
+mono_valloc_aligned
+mono_value_box
+mono_value_copy
+mono_value_copy_array
+mono_value_describe_fields
+mono_verify_corlib
+mono_vfree
+mono_vtable_get_static_field_data
+mono_win32_compat_CopyMemory
+mono_win32_compat_FillMemory
+mono_win32_compat_MoveMemory
+mono_win32_compat_ZeroMemory
+mono_xdebug_flush
index 4e0e44e59153b693460c6fae0e119016dc8f7e1b..872748e7f476b3e8b1fcd378b222d1a95d5828aa 100644 (file)
@@ -19,6 +19,7 @@
     <TargetFrameworkVersion>v@FX_VERSION</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
   </PropertyGroup>\r
+  @SIGNATURE@\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <DebugType>full</DebugType>\r
index 5fa1a75ec78e2938b5a0ae5f385845e4f02d7cfe..b3e6b0d6715ef51ec68663f1ddd3e3815b064f24 100644 (file)
@@ -861,7 +861,19 @@ class MsbuildGenerator {
                // Replace the template values
                //
 
+               string strongNameSection = "";
+               if (StrongNameKeyFile != null){
+                       strongNameSection = String.Format (
+                               "  <PropertyGroup>\n" +
+                               "    <SignAssembly>true</SignAssembly>\n" +
+                               "{1}" +
+                               "  </PropertyGroup>\n" + 
+                               "  <PropertyGroup>\n" + 
+                               "    <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>\n" +
+                               "  </PropertyGroup>", StrongNameKeyFile, StrongNameDelaySign ? "    <DelaySign>true</DelaySign>\n" : "");
+               }
                Csproj.output = template.
+                       Replace ("@SIGNATURE@", strongNameSection).
                        Replace ("@PROJECTGUID@", Csproj.projectGuid).
                        Replace ("@DEFINES@", defines.ToString ()).
                        Replace ("@DISABLEDWARNINGS@", string.Join (",", (from i in ignore_warning select i.ToString ()).ToArray ())).
index 6b784a3d6e8b5506f8928956d370b2d8dc52172f..2d9c2886dbccf2adea07be5586c47375c626238a 100644 (file)
@@ -168,9 +168,9 @@ CLEANFILES = etc/mono/config
 # depend on $(symlinks) to ensure 'etc/mono' directory exists
 etc/mono/config: ../data/config Makefile $(symlinks)
        d=`cd ../support && pwd`; \
-       sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
+       sed 's,target="$(prefix)/lib/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
        if test -z "$(libgdiplus_loc)"; then :; else \
-         sed 's,target="[^"]*libgdiplus[^"]*",target="$(libgdiplus_loc)",' $@t > $@tt; \
+         sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@t > $@tt; \
          mv -f $@tt $@t; fi
        mv -f $@t $@
 
index 09aff343270d79148b7d626d06724e7b6bdac232..827bc550d938fa91252db4ca620d739b939cb508 100644 (file)
@@ -8,7 +8,9 @@
  */
 
 #include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
 #include <grp.h>
 #include <stdio.h>
 #include <stdlib.h>
index d2cf5e7bcdbb95922b01c51f2200283350af380d..8d455889d7ca4c30ea10c8a6e7c2471afcec7179 100644 (file)
@@ -100,6 +100,15 @@ char *helper_Mono_Posix_readdir(void *dir) {
 }
 
 #if HAVE_GETPWNAM_R
+int helper_Mono_Posix_getpwnamuid (int mode, char *in_name, int in_uid,
+       char **account,
+       char **password,
+       int *uid,
+       int *gid,
+       char **name,
+       char **home,
+       char **shell);
+
 int helper_Mono_Posix_getpwnamuid (int mode, char *in_name, int in_uid,
        char **account,
        char **password,
index 5acf49f58615f5de5d286993192d02c8a1c87067..ef81ecc032c93b179188a7639571b038142c627c 100644 (file)
@@ -187,12 +187,13 @@ local void init_linkedlist(linkedlist_data *ll)
     ll->first_block = ll->last_block = NULL;
 }
 
+/*
 local void free_linkedlist(linkedlist_data *ll)
 {
     free_datablock(ll->first_block);
     ll->first_block = ll->last_block = NULL;
 }
-
+*/
 
 local int add_data_in_datablock(linkedlist_data *ll, const void *buf, uLong len)
 {
index 60ad23d594eb20f8d6caf2e003aee5389c2fedf3..88babdae391c1b41ad995c9f3c48c697ac0c87ec 100644 (file)
@@ -221,8 +221,10 @@ ReadEvents (gpointer sock, gpointer buffer, gint32 count, gint32 size)
                int addr_length;
                int msg_type;
                int table;
+#ifdef NL_DEBUG
                int protocol;
                int scope;
+#endif
                int rtm_type;
                gboolean have_dst;
                gboolean have_src;
@@ -250,8 +252,10 @@ ReadEvents (gpointer sock, gpointer buffer, gint32 count, gint32 size)
 
                addr_length = (family == AF_INET) ? 4 : 16;
                table = rtp->rtm_table;
+#ifdef NL_DEBUG
                protocol = rtp->rtm_protocol;
                scope = rtp->rtm_scope;
+#endif
                rtm_type = rtp->rtm_type;
                NL_DEBUG_PRINT ("\tRTMSG table: %d %s", table, FIND_RT_TABLE_NAME (table));
                if (table != RT_TABLE_MAIN && table != RT_TABLE_LOCAL)
index 9b2a2e907d775a3710f1d1cadefd514196d69cd8..8d733b21cc74072158c90ec661768dc9c6f546bf 100644 (file)
@@ -155,8 +155,10 @@ int map_Mono_Posix_Signals (int x)
                 return SIGXFSZ;
        if (x == Mono_Posix_Signals_SIGVTALRM)
                 return SIGVTALRM;
+#ifdef SIGPROF
        if (x == Mono_Posix_Signals_SIGPROF)
                 return SIGPROF;
+#endif
        if (x == Mono_Posix_Signals_SIGWINCH)
                 return SIGWINCH;
 #ifdef SIGIO
index 36b902defb93b9f12fe77e1c64afe5859db074df..dab4ccc3fe7e89cd3db7251e7c204be4d46b2162 100644 (file)
@@ -5,6 +5,9 @@
  * Author: Chris Toshok <toshok@ximian.com>
  */
 
+#include "map.h"
+#include "mph.h"
+
 #include <termios.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -12,7 +15,9 @@
 #include <errno.h>
 #if defined(__APPLE__)
 #include "fakepoll.h"
-#else
+#elif defined(HAVE_POLL_H)
+#include <poll.h>
+#elif defined(HAVE_SYS_POLL_H)
 #include <sys/poll.h>
 #endif
 #include <sys/ioctl.h>
index 78c900e9d9b2afeb460a3d24d7d0614d7bf7a027..e5b54da47b909f222d3664480c522d34d40ca1f8 100644 (file)
@@ -26,7 +26,7 @@ Mono_Posix_Syscall_L_ctermid (void)
 gint32
 Mono_Posix_Syscall_L_cuserid (void)
 {
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined (__OpenBSD__)
        return -1;
 #else
        return L_cuserid;
index 49ed549c5d2f546ffeffd31a2e3b8289fa32af1a..51b49697152b36ac93cedb5ba9ea741231deedd7 100644 (file)
@@ -158,6 +158,9 @@ FindWindowExW (gpointer hwndParent, gpointer hwndChildAfter, const char *classw,
        return func (hwndParent, hwndChildAfter, classw, window);
 }
 
+int
+SetWindowPos (gpointer hwnd, gpointer hwndInsertAfter, int x, int y, int cx, int cy, unsigned int flags);
+
 int
 SetWindowPos (gpointer hwnd, gpointer hwndInsertAfter, int x, int y, int cx, int cy, unsigned int flags)
 {
@@ -165,6 +168,9 @@ SetWindowPos (gpointer hwnd, gpointer hwndInsertAfter, int x, int y, int cx, int
        return 1;
 }
 
+int
+SendMessageA (gpointer hwnd, unsigned int msg, gpointer wparam, gpointer lparam);
+
 int
 SendMessageA (gpointer hwnd, unsigned int msg, gpointer wparam, gpointer lparam)
 {
@@ -172,6 +178,9 @@ SendMessageA (gpointer hwnd, unsigned int msg, gpointer wparam, gpointer lparam)
        return 0;
 }
 
+int
+GetWindowLongA (gpointer hwnd, int a);
+
 int
 GetWindowLongA (gpointer hwnd, int a)
 {
index 2096dcff251671ef4068bcba1c47b9f6558c4b19..e03152a773d95d4f12fe1fc7ad78b240b1cb8f60 100644 (file)
@@ -25,7 +25,9 @@
 #endif /* def HAVE_SYS_STATVFS_H */
 
 #ifdef HAVE_GETFSSTAT
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
 #include <sys/ucred.h>
 #include <sys/mount.h>
 #include <unistd.h>     /* for pathconf */
index 1759ec0fcb8e23f2435d8cb45d0e846a53b9edcb..a1c0ba0b184ee7326e5788adb0371215b5703109 100644 (file)
@@ -69,23 +69,6 @@ Mono_Posix_Syscall_settimeofday (
        return r;
 }
 
-/* Remove this at some point in the future */
-gint32
-Mono_Posix_Syscall_utimes_bad (const char *filename,
-       struct Mono_Posix_Timeval *tv)
-{
-       struct timeval _tv;
-       struct timeval *ptv = NULL;
-
-       if (tv) {
-               _tv.tv_sec  = tv->tv_sec;
-               _tv.tv_usec = tv->tv_usec;
-               ptv = &_tv;
-       }
-
-       return utimes (filename, ptv);
-}
-
 static inline struct timeval*
 copy_utimes (struct timeval* to, struct Mono_Posix_Timeval *from)
 {
index 6fed2ad2059983d4960d3dcd2b9ce0e105145f77..2d8d7cbe8006c65ac8947c4156123d3e9f330689 100644 (file)
@@ -47,6 +47,9 @@ Mono_Posix_Syscall_syslog (int priority, const char* message)
 #endif
 
 /* vararg version of syslog(3). */
+gint32
+Mono_Posix_Syscall_syslog2 (int priority, const char *format, ...);
+
 gint32
 Mono_Posix_Syscall_syslog2 (int priority, const char *format, ...)
 {
index b71a9cca1f0a153b54f5b7007b49927fcb98692e..5124af71fc948720d20fb6be1a350e0974615bc2 100644 (file)
@@ -20,7 +20,7 @@
                : lstr_at(p, n)                                             \
 )
 
-char* MPH_INTERNAL
+char*
 _mph_copy_structure_strings (
        void *to,         const mph_string_offset_t *to_offsets, 
        const void *from, const mph_string_offset_t *from_offsets, 
index 47adde38dbf44a408e189afefded1c3f91e38d66..d0911fc07647cd6fb03dc61c10f5c8b783ad0998 100644 (file)
@@ -45,7 +45,7 @@ gint WriteZStream (ZStream *stream, guchar *buffer, gint length);
 static gint flush_internal (ZStream *stream, gboolean is_final);
 
 static void *
-z_alloc (void *opaque, gsize nitems, gsize item_size)
+z_alloc (void *opaque, unsigned int nitems, unsigned int item_size)
 {
        return g_malloc0 (nitems * item_size);
 }
index 082a40cd6db81a6e8afd7685caac8c3535da25ed..ea416b7e3a33cb17ef5e3d875b9d249124ad3a4a 100644 (file)
@@ -57,6 +57,8 @@ read_entry (FILE *in, void **data)
        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;
+       case SGEN_PROTOCOL_GRAY_ENQUEUE: size = sizeof (SGenProtocolGrayQueue); break;
+       case SGEN_PROTOCOL_GRAY_DEQUEUE: size = sizeof (SGenProtocolGrayQueue); break;
        default: assert (0);
        }
 
@@ -71,168 +73,199 @@ read_entry (FILE *in, void **data)
        return (int)type;
 }
 
+static gboolean
+is_always_match (int type)
+{
+       switch (TYPE (type)) {
+       case SGEN_PROTOCOL_COLLECTION_FORCE:
+       case SGEN_PROTOCOL_COLLECTION_BEGIN:
+       case SGEN_PROTOCOL_COLLECTION_END:
+       case SGEN_PROTOCOL_CONCURRENT_START:
+       case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH:
+       case SGEN_PROTOCOL_WORLD_STOPPING:
+       case SGEN_PROTOCOL_WORLD_STOPPED:
+       case SGEN_PROTOCOL_WORLD_RESTARTING:
+       case SGEN_PROTOCOL_WORLD_RESTARTED:
+       case SGEN_PROTOCOL_THREAD_SUSPEND:
+       case SGEN_PROTOCOL_THREAD_RESTART:
+       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:
+       case SGEN_PROTOCOL_GRAY_ENQUEUE:
+       case SGEN_PROTOCOL_GRAY_DEQUEUE:
+               return TRUE;
+       default:
+               return FALSE;
+       }
+}
+
 #define WORKER_PREFIX(t)       (WORKER ((t)) ? "w" : " ")
 
 static void
 print_entry (int type, void *data)
 {
+       const char *always_prefix = is_always_match (type) ? "  " : "";
+       printf ("%s%s ", WORKER_PREFIX (type), always_prefix);
+
        switch (TYPE (type)) {
        case SGEN_PROTOCOL_COLLECTION_FORCE: {
                SGenProtocolCollectionForce *entry = data;
-               printf ("%s collection force generation %d\n", WORKER_PREFIX (type), entry->generation);
+               printf ("collection force generation %d\n", entry->generation);
                break;
        }
        case SGEN_PROTOCOL_COLLECTION_BEGIN: {
                SGenProtocolCollection *entry = data;
-               printf ("%s collection begin %d generation %d\n", WORKER_PREFIX (type), entry->index, entry->generation);
+               printf ("collection begin %d generation %d\n", entry->index, entry->generation);
                break;
        }
        case SGEN_PROTOCOL_COLLECTION_END: {
                SGenProtocolCollection *entry = data;
-               printf ("%s collection end %d generation %d\n", WORKER_PREFIX (type), entry->index, entry->generation);
+               printf ("collection end %d generation %d\n", entry->index, entry->generation);
                break;
        }
        case SGEN_PROTOCOL_CONCURRENT_START: {
-               printf ("%s concurrent start\n", WORKER_PREFIX (type));
+               printf ("concurrent start\n");
                break;
        }
        case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH: {
-               printf ("%s concurrent update or finish\n", WORKER_PREFIX (type));
+               printf ("concurrent update or finish\n");
                break;
        }
        case SGEN_PROTOCOL_WORLD_STOPPING: {
                SGenProtocolWorldStopping *entry = data;
-               printf ("%s world stopping timestamp %lld\n", WORKER_PREFIX (type), entry->timestamp);
+               printf ("world stopping timestamp %lld\n", entry->timestamp);
                break;
        }
        case SGEN_PROTOCOL_WORLD_STOPPED: {
                SGenProtocolWorldStopped *entry = data;
                long long total = entry->total_major_cards + entry->total_los_cards;
                long long marked = entry->marked_major_cards + entry->marked_los_cards;
-               printf ("%s world stopped timestamp %lld total %lld marked %lld %0.2f%%\n", WORKER_PREFIX (type), entry->timestamp, total, marked, 100.0 * (double) marked / (double) total);
+               printf ("world stopped timestamp %lld total %lld marked %lld %0.2f%%\n", entry->timestamp, total, marked, 100.0 * (double) marked / (double) total);
                break;
        }
        case SGEN_PROTOCOL_WORLD_RESTARTING: {
                SGenProtocolWorldRestarting *entry = data;
                long long total = entry->total_major_cards + entry->total_los_cards;
                long long marked = entry->marked_major_cards + entry->marked_los_cards;
-               printf ("%s world restarting generation %d timestamp %lld total %lld marked %lld %0.2f%%\n", WORKER_PREFIX (type), entry->generation, entry->timestamp, total, marked, 100.0 * (double) marked / (double) total);
+               printf ("world restarting generation %d timestamp %lld total %lld marked %lld %0.2f%%\n", entry->generation, entry->timestamp, total, marked, 100.0 * (double) marked / (double) total);
                break;
        }
        case SGEN_PROTOCOL_WORLD_RESTARTED: {
                SGenProtocolWorldRestarted *entry = data;
-               printf ("%s world restarted generation %d timestamp %lld\n", WORKER_PREFIX (type), entry->generation, entry->timestamp);
+               printf ("world restarted generation %d timestamp %lld\n", entry->generation, entry->timestamp);
                break;
        }
        case SGEN_PROTOCOL_ALLOC: {
                SGenProtocolAlloc *entry = data;
-               printf ("%s alloc obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size);
+               printf ("alloc obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_ALLOC_PINNED: {
                SGenProtocolAlloc *entry = data;
-               printf ("%s alloc pinned obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size);
+               printf ("alloc pinned obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_ALLOC_DEGRADED: {
                SGenProtocolAlloc *entry = data;
-               printf ("%s alloc degraded obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size);
+               printf ("alloc degraded obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_COPY: {
                SGenProtocolCopy *entry = data;
-               printf ("%s copy from %p to %p vtable %p size %d\n", WORKER_PREFIX (type), entry->from, entry->to, entry->vtable, entry->size);
+               printf ("copy from %p to %p vtable %p size %d\n", entry->from, entry->to, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_PIN: {
                SGenProtocolPin *entry = data;
-               printf ("%s pin obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size);
+               printf ("pin obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_MARK: {
                SGenProtocolMark *entry = data;
-               printf ("%s mark obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size);
+               printf ("mark obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_SCAN_BEGIN: {
                SGenProtocolScanBegin *entry = data;
-               printf ("%s scan_begin obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size);
+               printf ("scan_begin obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_SCAN_VTYPE_BEGIN: {
                SGenProtocolScanVTypeBegin *entry = data;
-               printf ("%s scan_vtype_begin obj %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->size);
+               printf ("scan_vtype_begin obj %p size %d\n", entry->obj, entry->size);
                break;
        }
        case SGEN_PROTOCOL_WBARRIER: {
                SGenProtocolWBarrier *entry = data;
-               printf ("%s wbarrier ptr %p value %p value_vtable %p\n", WORKER_PREFIX (type), entry->ptr, entry->value, entry->value_vtable);
+               printf ("wbarrier ptr %p value %p value_vtable %p\n", entry->ptr, entry->value, entry->value_vtable);
                break;
        }
        case SGEN_PROTOCOL_GLOBAL_REMSET: {
                SGenProtocolGlobalRemset *entry = data;
-               printf ("%s global_remset ptr %p value %p value_vtable %p\n", WORKER_PREFIX (type), entry->ptr, entry->value, entry->value_vtable);
+               printf ("global_remset ptr %p value %p value_vtable %p\n", entry->ptr, entry->value, entry->value_vtable);
                break;
        }
        case SGEN_PROTOCOL_PTR_UPDATE: {
                SGenProtocolPtrUpdate *entry = data;
-               printf ("%s ptr_update ptr %p old_value %p new_value %p vtable %p size %d\n", WORKER_PREFIX (type),
+               printf ("ptr_update ptr %p old_value %p new_value %p vtable %p size %d\n",
                                entry->ptr, entry->old_value, entry->new_value, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_CLEANUP: {
                SGenProtocolCleanup *entry = data;
-               printf ("%s cleanup ptr %p vtable %p size %d\n", WORKER_PREFIX (type), entry->ptr, entry->vtable, entry->size);
+               printf ("cleanup ptr %p vtable %p size %d\n", entry->ptr, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_EMPTY: {
                SGenProtocolEmpty *entry = data;
-               printf ("%s empty start %p size %d\n", WORKER_PREFIX (type), entry->start, entry->size);
+               printf ("empty start %p size %d\n", entry->start, entry->size);
                break;
        }
        case SGEN_PROTOCOL_THREAD_SUSPEND: {
                SGenProtocolThreadSuspend *entry = data;
-               printf ("%s thread_suspend thread %p ip %p\n", WORKER_PREFIX (type), entry->thread, entry->stopped_ip);
+               printf ("thread_suspend thread %p ip %p\n", entry->thread, entry->stopped_ip);
                break;
        }
        case SGEN_PROTOCOL_THREAD_RESTART: {
                SGenProtocolThreadRestart *entry = data;
-               printf ("%s thread_restart thread %p\n", WORKER_PREFIX (type), entry->thread);
+               printf ("thread_restart thread %p\n", entry->thread);
                break;
        }
        case SGEN_PROTOCOL_THREAD_REGISTER: {
                SGenProtocolThreadRegister *entry = data;
-               printf ("%s thread_register thread %p\n", WORKER_PREFIX (type), entry->thread);
+               printf ("thread_register thread %p\n", entry->thread);
                break;
        }
        case SGEN_PROTOCOL_THREAD_UNREGISTER: {
                SGenProtocolThreadUnregister *entry = data;
-               printf ("%s thread_unregister thread %p\n", WORKER_PREFIX (type), entry->thread);
+               printf ("thread_unregister thread %p\n", entry->thread);
                break;
        }
        case SGEN_PROTOCOL_MISSING_REMSET: {
                SGenProtocolMissingRemset *entry = data;
-               printf ("%s missing_remset obj %p obj_vtable %p offset %d value %p value_vtable %p value_pinned %d\n", WORKER_PREFIX (type),
+               printf ("missing_remset obj %p obj_vtable %p offset %d value %p value_vtable %p value_pinned %d\n",
                                entry->obj, entry->obj_vtable, entry->offset, entry->value, entry->value_vtable, entry->value_pinned);
                break;
        }
        case SGEN_PROTOCOL_CARD_SCAN: {
                SGenProtocolCardScan *entry = data;
-               printf ("%s card_scan start %p size %d\n", WORKER_PREFIX (type), entry->start, entry->size);
+               printf ("card_scan start %p size %d\n", entry->start, entry->size);
                break;
        }
        case SGEN_PROTOCOL_CEMENT: {
                SGenProtocolCement *entry = data;
-               printf ("%s cement obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size);
+               printf ("cement obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size);
                break;
        }
        case SGEN_PROTOCOL_CEMENT_RESET: {
-               printf ("%s cement_reset\n", WORKER_PREFIX (type));
+               printf ("cement_reset\n");
                break;
        }
        case SGEN_PROTOCOL_DISLINK_UPDATE: {
                SGenProtocolDislinkUpdate *entry = data;
-               printf ("%s dislink_update link %p obj %p staged %d", WORKER_PREFIX (type), entry->link, entry->obj, entry->staged);
+               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
@@ -241,7 +274,7 @@ print_entry (int type, void *data)
        }
        case SGEN_PROTOCOL_DISLINK_UPDATE_STAGED: {
                SGenProtocolDislinkUpdateStaged *entry = data;
-               printf ("%s dislink_update_staged link %p obj %p index %d", WORKER_PREFIX (type), entry->link, entry->obj, entry->index);
+               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
@@ -250,17 +283,27 @@ print_entry (int type, void *data)
        }
        case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: {
                SGenProtocolDislinkProcessStaged *entry = data;
-               printf ("%s dislink_process_staged link %p obj %p index %d\n", WORKER_PREFIX (type), entry->link, entry->obj, entry->index);
+               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 ("%s dislink_unload_begin domain %p\n", WORKER_PREFIX (type), entry->domain);
+               printf ("dislink_unload_begin domain %p\n", entry->domain);
                break;
        }
        case SGEN_PROTOCOL_DOMAIN_UNLOAD_END: {
                SGenProtocolDomainUnload *entry = data;
-               printf ("%s dislink_unload_end domain %p\n", WORKER_PREFIX (type), entry->domain);
+               printf ("dislink_unload_end domain %p\n", entry->domain);
+               break;
+       }
+       case SGEN_PROTOCOL_GRAY_ENQUEUE: {
+               SGenProtocolGrayQueue *entry = data;
+               printf ("enqueue queue %p cursor %p value %p\n", entry->queue, entry->cursor, entry->value);
+               break;
+       }
+       case SGEN_PROTOCOL_GRAY_DEQUEUE: {
+               SGenProtocolGrayQueue *entry = data;
+               printf ("dequeue queue %p cursor %p value %p\n", entry->queue, entry->cursor, entry->value);
                break;
        }
        default:
@@ -278,23 +321,6 @@ static gboolean
 is_match (gpointer ptr, int type, void *data)
 {
        switch (TYPE (type)) {
-       case SGEN_PROTOCOL_COLLECTION_FORCE:
-       case SGEN_PROTOCOL_COLLECTION_BEGIN:
-       case SGEN_PROTOCOL_COLLECTION_END:
-       case SGEN_PROTOCOL_CONCURRENT_START:
-       case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH:
-       case SGEN_PROTOCOL_WORLD_STOPPING:
-       case SGEN_PROTOCOL_WORLD_STOPPED:
-       case SGEN_PROTOCOL_WORLD_RESTARTING:
-       case SGEN_PROTOCOL_WORLD_RESTARTED:
-       case SGEN_PROTOCOL_THREAD_SUSPEND:
-       case SGEN_PROTOCOL_THREAD_RESTART:
-       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:
        case SGEN_PROTOCOL_ALLOC_DEGRADED: {
@@ -367,7 +393,17 @@ is_match (gpointer ptr, int type, void *data)
                SGenProtocolDislinkProcessStaged *entry = data;
                return ptr == entry->obj || ptr == entry->link;
        }
+       case SGEN_PROTOCOL_GRAY_ENQUEUE: {
+               SGenProtocolGrayQueue *entry = data;
+               return ptr == entry->cursor || ptr == entry->value;
+       }
+       case SGEN_PROTOCOL_GRAY_DEQUEUE: {
+               SGenProtocolGrayQueue *entry = data;
+               return ptr == entry->cursor || ptr == entry->value;
+       }
        default:
+               if (is_always_match (type))
+                       return TRUE;
                assert (0);
        }
 }
index 1084339a44f2172c1cb4b8758d216c541bf72168..0c690d3a35c4213b0746b82955c88b44bbb4f0e0 100644 (file)
@@ -1,5 +1,5 @@
 /* config.h.  Generated from config.h.in by configure.  */
-/* config.h.in.  Generated from configure.in by autoheader.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* The architecture this is running on */
 #if defined(_M_IA64)
 #error Unknown architecture
 #endif
 
+#if _WIN32_WINNT < 0x0502
+/* Required for Vectored Exception Handling.
+   Interlocked* functions are also not available in XP SP1 and below
+*/
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0502
+#endif /* _WIN32_WINNT < 0x0502 */
+
 /*
  * Features that are not required in the Windows port
  */
 /* Enable the allocation and indexing of arrays greater than Int32.MaxValue */
 /* #undef MONO_BIG_ARRAYS */
 
-/* Sizeof sock_un.sun_path */
-/* #undef MONO_SIZEOF_SUNPATH */
-
 /* Xen-specific behaviour */
 /* #define MONO_XEN_OPT 1 */