Merge pull request #649 from DavidS/feature/implement-additional-reference-path
authorAlex Rønne Petersen <alex@alexrp.com>
Tue, 2 Jul 2013 10:47:22 +0000 (03:47 -0700)
committerAlex Rønne Petersen <alex@alexrp.com>
Tue, 2 Jul 2013 10:47:22 +0000 (03:47 -0700)
xbuild: use the AdditionalReferencePath items to locate assemblies

461 files changed:
acinclude.m4
configure.in
eglib/acinclude.m4
eglib/configure.ac
external/ikvm
libgc/acinclude.m4
man/mono.1
mcs/build/profiles/basic.make
mcs/class/Facades/Makefile
mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs
mcs/class/Facades/System.Collections/AssemblyInfo.cs
mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs
mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs
mcs/class/Facades/System.ComponentModel/AssemblyInfo.cs
mcs/class/Facades/System.Diagnostics.Contracts/AssemblyInfo.cs
mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs
mcs/class/Facades/System.Diagnostics.Tools/AssemblyInfo.cs
mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs
mcs/class/Facades/System.Globalization/AssemblyInfo.cs
mcs/class/Facades/System.IO/AssemblyInfo.cs
mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs
mcs/class/Facades/System.Linq.Parallel/AssemblyInfo.cs
mcs/class/Facades/System.Linq.Queryable/AssemblyInfo.cs
mcs/class/Facades/System.Linq/AssemblyInfo.cs
mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs
mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs
mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs
mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs
mcs/class/Facades/System.Reflection.Extensions/AssemblyInfo.cs
mcs/class/Facades/System.Reflection.Primitives/AssemblyInfo.cs
mcs/class/Facades/System.Reflection/AssemblyInfo.cs
mcs/class/Facades/System.Resources.ResourceManager/AssemblyInfo.cs
mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs
mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs
mcs/class/Facades/System.Runtime.Numerics/AssemblyInfo.cs
mcs/class/Facades/System.Runtime.Serialization.Json/AssemblyInfo.cs
mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs
mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs
mcs/class/Facades/System.Runtime/AssemblyInfo.cs
mcs/class/Facades/System.Security.Principal/AssemblyInfo.cs
mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs
mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs
mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs
mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs
mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs
mcs/class/Facades/System.Threading.Tasks.Parallel/AssemblyInfo.cs
mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs
mcs/class/Facades/System.Threading/AssemblyInfo.cs
mcs/class/Facades/System.Windows/AssemblyInfo.cs [deleted file]
mcs/class/Facades/System.Windows/Makefile [deleted file]
mcs/class/Facades/System.Windows/System.Windows.dll.sources [deleted file]
mcs/class/Facades/System.Windows/TypeForwarders.cs [deleted file]
mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs
mcs/class/Facades/System.Xml.Serialization/AssemblyInfo.cs [deleted file]
mcs/class/Facades/System.Xml.Serialization/Makefile [deleted file]
mcs/class/Facades/System.Xml.Serialization/System.Xml.Serialization.dll.sources [deleted file]
mcs/class/Facades/System.Xml.Serialization/TypeForwarders.cs [deleted file]
mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs
mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs
mcs/class/Makefile
mcs/class/Mono.Cairo/Mono.Cairo.dll.sources
mcs/class/Mono.Cairo/Mono.Cairo/CairoDebug.cs [new file with mode: 0644]
mcs/class/Mono.Cairo/Mono.Cairo/Color.cs [new file with mode: 0644]
mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs
mcs/class/Mono.Cairo/Mono.Cairo/Distance.cs [new file with mode: 0644]
mcs/class/Mono.Cairo/Mono.Cairo/FontFace.cs
mcs/class/Mono.Cairo/Mono.Cairo/FontOptions.cs
mcs/class/Mono.Cairo/Mono.Cairo/GlitzSurface.cs
mcs/class/Mono.Cairo/Mono.Cairo/Gradient.cs
mcs/class/Mono.Cairo/Mono.Cairo/ImageSurface.cs
mcs/class/Mono.Cairo/Mono.Cairo/LinearGradient.cs
mcs/class/Mono.Cairo/Mono.Cairo/Matrix.cs
mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs
mcs/class/Mono.Cairo/Mono.Cairo/PSSurface.cs
mcs/class/Mono.Cairo/Mono.Cairo/Path.cs
mcs/class/Mono.Cairo/Mono.Cairo/Pattern.cs
mcs/class/Mono.Cairo/Mono.Cairo/PdfSurface.cs
mcs/class/Mono.Cairo/Mono.Cairo/Point.cs [new file with mode: 0644]
mcs/class/Mono.Cairo/Mono.Cairo/PointD.cs [new file with mode: 0644]
mcs/class/Mono.Cairo/Mono.Cairo/RadialGradient.cs
mcs/class/Mono.Cairo/Mono.Cairo/Region.cs [new file with mode: 0644]
mcs/class/Mono.Cairo/Mono.Cairo/ScaledFont.cs
mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs
mcs/class/Mono.Cairo/Mono.Cairo/Surface.cs
mcs/class/Mono.Cairo/Mono.Cairo/SurfacePattern.cs
mcs/class/Mono.Cairo/Mono.Cairo/SvgSurface.cs
mcs/class/Mono.Cairo/Mono.Cairo/Win32Surface.cs
mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs
mcs/class/Mono.Cairo/Mono.Cairo/XlibSurface.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.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.Posix/Mono.Unix.Native/NativeConvert.cs
mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeDeformatter.cs
mcs/class/Mono.Security/Mono.Security.Cryptography/PKCS1.cs
mcs/class/Mono.Security/Mono.Security.Cryptography/PKCS8.cs
mcs/class/Mono.Security/Mono.Security.Cryptography/TlsHMAC.cs
mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs
mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs
mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslHandshakeHash.cs
mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/ARC4ManagedTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/MD2ManagedTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/MD2Test.cs
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/MD4ManagedTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/MD4Test.cs
mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/GenerationServices.cs
mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewGenerator.cs
mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewProvider.cs
mcs/class/System.Core/System/TimeZoneInfo.Android.cs
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs
mcs/class/System.Core/Test/System.Linq/EnumerableMoreTest.cs
mcs/class/System.Core/monodroid_System.Core.dll.sources
mcs/class/System.Net.Http.WebRequest/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Net.Http.WebRequest/Makefile [new file with mode: 0644]
mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest.dll.sources [new file with mode: 0644]
mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest/WebRequestHandler.cs [new file with mode: 0644]
mcs/class/System.Net.Http/Assembly/AssemblyInfo.cs
mcs/class/System.Net.Http/System.Net.Http.Headers/MediaTypeHeaderValue.cs
mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs
mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
mcs/class/System.Numerics/System.Numerics-tests-net_4_0.csproj
mcs/class/System.Numerics/System.Numerics-tests-net_4_5.csproj
mcs/class/System.Numerics/System.Numerics/BigInteger.cs
mcs/class/System.Numerics/System.Numerics/ChangeLog
mcs/class/System.Numerics/System.Numerics/Complex.cs
mcs/class/System.Numerics/System.Numerics_test.dll.sources
mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs
mcs/class/System.Numerics/Test/System.Numerics/ChangeLog
mcs/class/System.Numerics/Test/System.Numerics/ComplexTest.cs [new file with mode: 0644]
mcs/class/System.Runtime.Caching/System.Runtime.Caching/MemoryCacheEntryPriorityQueue.cs
mcs/class/System.Threading.Tasks.Dataflow/Test/System.Threading.Tasks.Dataflow/ReceivingTest.cs
mcs/class/System.Threading.Tasks.Dataflow/Test/System.Threading.Tasks.Dataflow/TransformManyBlockTest.cs
mcs/class/System.Threading.Tasks.Dataflow/Test/System.Threading.Tasks.Dataflow/WriteOnceBlockTest.cs
mcs/class/System.Web/System.Web-net_4_0.csproj
mcs/class/System.Web/System.Web.Configuration_2.0/LruCache.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
mcs/class/System.Web/System.Web.dll.sources
mcs/class/System.Web/Test/System.Web.Util/MachineKeySectionUtilsTest.cs
mcs/class/System.Windows/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Windows/Makefile [new file with mode: 0644]
mcs/class/System.Windows/System.Windows.dll.sources [new file with mode: 0644]
mcs/class/System.Windows/TypeForwarders.cs [new file with mode: 0644]
mcs/class/System.Xml.Serialization/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Xml.Serialization/Makefile [new file with mode: 0644]
mcs/class/System.Xml.Serialization/System.Xml.Serialization.dll.sources [new file with mode: 0644]
mcs/class/System.Xml.Serialization/TypeForwarders.cs [new file with mode: 0644]
mcs/class/System/Makefile
mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
mcs/class/System/Mono.Http/NtlmClient.cs
mcs/class/System/System.Net.Mail/SmtpClient.cs
mcs/class/System/System.Net.Security/LocalCertificateSelectionCallback.cs
mcs/class/System/System.Net.Security/SslStream.cs
mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
mcs/class/System/System.Net/DigestClient.cs
mcs/class/System/System.Net/EndPointListener.cs
mcs/class/System/System.Net/HttpConnection.cs
mcs/class/System/System.Net/HttpListenerRequest.cs
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Net/ServicePointManager.cs
mcs/class/System/System.Net/WebClient.cs
mcs/class/System/System.Net/WebConnection.cs
mcs/class/System/System.Net/WebConnectionStream.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/OSX509Certificates.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/PublicKey.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X500DistinguishedName.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtension.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509ExtensionCollection.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509KeyUsageExtension.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtension.cs
mcs/class/System/System.Security.Cryptography/AsnEncodedData.cs
mcs/class/System/System.Text.RegularExpressions/Regex.cs
mcs/class/System/System/Uri.cs
mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs
mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainTest.cs
mcs/class/System/Test/System/UriTest.cs
mcs/class/System/Test/System/UriTest3.cs
mcs/class/System/monotouch_System.dll.sources
mcs/class/corlib/System.Diagnostics/ConditionalAttribute.cs
mcs/class/corlib/System.Diagnostics/DebuggableAttribute.cs
mcs/class/corlib/System.IO/Directory.cs
mcs/class/corlib/System.IO/Path.cs
mcs/class/corlib/System.Reflection/MonoMethod.cs
mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs
mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs
mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs
mcs/class/corlib/System.Threading.Tasks/Task.cs
mcs/class/corlib/System.Threading/SemaphoreSlim.cs
mcs/class/corlib/System/Array.cs
mcs/class/corlib/System/MulticastDelegate.cs
mcs/class/corlib/System/String.cs
mcs/class/corlib/System/TimeSpan.cs
mcs/class/corlib/Test/System.IO/DirectoryTest.cs
mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest_T.cs
mcs/class/corlib/Test/System.Runtime.CompilerServices/YieldAwaitableTest.cs
mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs
mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs
mcs/class/corlib/Test/System/AppDomainTest.cs
mcs/class/corlib/Test/System/MulticastDelegate.cs
mcs/class/corlib/Test/System/StringTest.cs
mcs/class/corlib/Test/System/TimeSpanTest.cs
mcs/class/corlib/monotouch_corlib.dll.sources [new file with mode: 0644]
mcs/class/monodoc/Makefile
mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs
mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
mcs/class/monodoc/Monodoc/providers/ecma-provider.cs
mcs/class/monodoc/Resources/mdoc-sections-css.xsl
mcs/class/monodoc/Test/Monodoc/HelpSourceTests.cs
mcs/docs/compiler.txt
mcs/errors/cs0019-34.cs [deleted file]
mcs/errors/cs0019-51.cs [deleted file]
mcs/errors/cs0019-69.cs [new file with mode: 0644]
mcs/errors/cs0019-70.cs [new file with mode: 0644]
mcs/errors/cs0029-34.cs [new file with mode: 0644]
mcs/errors/cs0034-6.cs [new file with mode: 0644]
mcs/errors/cs0120-19.cs [new file with mode: 0644]
mcs/errors/cs0161-4.cs [new file with mode: 0644]
mcs/errors/cs0266-27.cs [new file with mode: 0644]
mcs/errors/cs0266-28.cs [new file with mode: 0644]
mcs/errors/cs0458-14.cs [new file with mode: 0644]
mcs/errors/cs0458-15.cs [new file with mode: 0644]
mcs/errors/cs0458-16.cs [new file with mode: 0644]
mcs/errors/cs0464-4.cs [new file with mode: 0644]
mcs/errors/cs0464.cs
mcs/errors/cs0472-4.cs
mcs/errors/cs0647-15.cs
mcs/errors/cs0647-20.cs [new file with mode: 0644]
mcs/errors/cs0658-3.cs [new file with mode: 0644]
mcs/errors/cs1661-2.cs
mcs/errors/cs1661-3.cs [new file with mode: 0644]
mcs/mcs/anonymous.cs
mcs/mcs/assembly.cs
mcs/mcs/assign.cs
mcs/mcs/attribute.cs
mcs/mcs/cfold.cs
mcs/mcs/class.cs
mcs/mcs/codegen.cs
mcs/mcs/constant.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/expression.cs
mcs/mcs/ikvm.cs
mcs/mcs/mcs.csproj
mcs/mcs/module.cs
mcs/mcs/nullable.cs
mcs/mcs/property.cs
mcs/mcs/statement.cs
mcs/mcs/typemanager.cs
mcs/mcs/typespec.cs
mcs/tests/dtest-001.cs
mcs/tests/gtest-274.cs
mcs/tests/gtest-545.cs
mcs/tests/gtest-584.cs [new file with mode: 0644]
mcs/tests/gtest-585.cs [new file with mode: 0644]
mcs/tests/gtest-586.cs [new file with mode: 0644]
mcs/tests/gtest-587.cs [new file with mode: 0644]
mcs/tests/gtest-588.cs [new file with mode: 0644]
mcs/tests/gtest-etree-04.cs
mcs/tests/gtest-iter-29.cs [new file with mode: 0644]
mcs/tests/test-181.cs
mcs/tests/test-285.cs
mcs/tests/test-anon-124.cs
mcs/tests/test-anon-171.cs [new file with mode: 0644]
mcs/tests/test-async-42.cs [new file with mode: 0644]
mcs/tests/test-async-47.cs [new file with mode: 0644]
mcs/tests/test-async-48.cs [new file with mode: 0644]
mcs/tests/test-debug-11-ref.xml
mcs/tests/ver-il-net_4_5.xml
mcs/tools/ildasm/DataConverter.cs [deleted file]
mcs/tools/ildasm/Makefile [deleted file]
mcs/tools/ildasm/ildasm.cs [deleted file]
mcs/tools/ildasm/ildasm.exe.sources [deleted file]
mcs/tools/ildasm/tables.cs [deleted file]
mcs/tools/mdoc/Mono.Documentation/exceptions.cs
mcs/tools/mdoc/Mono.Documentation/monodocer.cs
mcs/tools/mdoc/Mono.Documentation/monodocs2slashdoc.cs
mcs/tools/mdoc/Mono.Documentation/webdoc.cs
mcs/tools/mdoc/Resources/defaulttemplate.xsl
mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest.Generic/GenericBase`1.xml
mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest/DocAttribute.xml
mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest/DocValueType.xml
mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest/UseLists.xml
mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest/Widget.xml
mcs/tools/mdoc/Test/en.expected.delete/System/Array.xml
mcs/tools/mdoc/Test/en.expected.delete/System/Environment.xml
mcs/tools/mdoc/Test/en.expected.importecmadoc/System/Array.xml
mcs/tools/mdoc/Test/en.expected.importecmadoc/System/Environment.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/GenericBase`1.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/DocAttribute.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/DocValueType.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/UseLists.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/System/Array.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/System/Environment.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/GenericBase`1.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/DocAttribute.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/DocValueType.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/UseLists.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget.xml
mcs/tools/mdoc/Test/en.expected.since/System/Array.xml
mcs/tools/mdoc/Test/en.expected.since/System/Environment.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/GenericBase`1.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/DocAttribute.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/DocValueType.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/UseLists.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget.xml
mcs/tools/mdoc/Test/en.expected/System/Array.xml
mcs/tools/mdoc/Test/en.expected/System/Environment.xml
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/Extensions.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/Func`2.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/GenericBase`1+FooEventArgs.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/GenericBase`1+NestedCollection+Enumerator.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/GenericBase`1+NestedCollection.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/GenericBase`1.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/IFoo`1.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/MyList`1+Helper`2.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/MyList`1.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/MyList`2.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Color.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/D.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/DocAttribute.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/DocValueType.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/IProcess.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/UseLists.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget+Del.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget+Direction.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget+IMenuItem.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget+NestedClass+Double+Triple+Quadruple.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget+NestedClass+Double+Triple.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget+NestedClass+Double.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget+NestedClass.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget+NestedClass`1.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget.html
mcs/tools/mdoc/Test/html.expected/NoNamespace.html
mcs/tools/mdoc/Test/html.expected/System/Action`1.html
mcs/tools/mdoc/Test/html.expected/System/Array.html
mcs/tools/mdoc/Test/html.expected/System/AsyncCallback.html
mcs/tools/mdoc/Test/html.expected/System/Environment+SpecialFolder.html
mcs/tools/mdoc/Test/html.expected/System/Environment.html
mcs/tools/mdoc/Test/msxdoc-expected.importslashdoc.xml
mcs/tools/mkbundle/mkbundle.cs
mcs/tools/xbuild/xbuild/2.0/Microsoft.Common.targets
mcs/tools/xbuild/xbuild/3.5/Microsoft.Common.targets
mcs/tools/xbuild/xbuild/4.0/Microsoft.Common.targets
mono-core.spec.in
mono/io-layer/sockets.c
mono/metadata/appdomain.c
mono/metadata/assembly.c
mono/metadata/boehm-gc.c
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/cominterop.c
mono/metadata/debug-helpers.c
mono/metadata/domain-internals.h
mono/metadata/domain.c
mono/metadata/gc-internal.h
mono/metadata/gc.c
mono/metadata/icall.c
mono/metadata/image.c
mono/metadata/marshal.c
mono/metadata/marshal.h
mono/metadata/metadata-internals.h
mono/metadata/metadata.c
mono/metadata/mono-debug.c
mono/metadata/mono-debug.h
mono/metadata/null-gc.c
mono/metadata/object.c
mono/metadata/runtime.c
mono/metadata/runtime.h
mono/metadata/sgen-alloc.c
mono/metadata/sgen-gc.c
mono/metadata/sgen-gc.h
mono/metadata/sgen-marksweep.c
mono/metadata/sgen-nursery-allocator.c
mono/metadata/socket-io.c
mono/metadata/threadpool.c
mono/metadata/threadpool.h
mono/metadata/threads-types.h
mono/metadata/threads.c
mono/metadata/verify.c
mono/mini/.gitignore
mono/mini/Makefile.am.in
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/arrays.cs
mono/mini/basic-calls.cs
mono/mini/basic-float.cs
mono/mini/basic-long.cs
mono/mini/basic-math.cs
mono/mini/basic.cs
mono/mini/cpu-amd64.md
mono/mini/cpu-x86.md
mono/mini/debug-mini.c
mono/mini/debugger-agent.c
mono/mini/driver.c
mono/mini/dwarfwriter.c
mono/mini/dwarfwriter.h
mono/mini/generics.cs
mono/mini/gshared.cs
mono/mini/ir-emit.h
mono/mini/jit-icalls.c
mono/mini/jit-icalls.h
mono/mini/main-sgen.c [new file with mode: 0644]
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-darwin.c
mono/mini/mini-exceptions.c
mono/mini/mini-generic-sharing.c
mono/mini/mini-llvm-cpp.cpp
mono/mini/mini-llvm.c
mono/mini/mini-ops.h
mono/mini/mini-ppc.c
mono/mini/mini-trampolines.c
mono/mini/mini-x86.c
mono/mini/mini-x86.h
mono/mini/mini.c
mono/mini/mini.h
mono/mini/patch-info.h
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/xdebug.c
mono/tests/Makefile.am
mono/tests/finalizer-wait.cs
mono/tests/load-missing.il
mono/tests/unload-appdomain-on-shutdown.cs [new file with mode: 0644]
mono/tests/verifier/invalid_bad_catch_clause_type.il [new file with mode: 0755]
mono/utils/mach-support-amd64.c
mono/utils/mach-support-arm.c
mono/utils/mach-support-unknown.c
mono/utils/mach-support-x86.c
mono/utils/mach-support.h
mono/utils/mono-compiler.h
mono/utils/mono-mmap.c
mono/utils/mono-mutex.c
mono/utils/mono-proclib.c
mono/utils/mono-threads.c
support/sys-mman.c
support/unistd.c

index 161bf7dccf74b51e076fb8227ff5ef84749e7a70..5b38b2fe3ef8108083daa3a4b959b5f5b795c029 100644 (file)
@@ -23,13 +23,13 @@ if test x$GCC != xyes; then
 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*)
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*)
     pic_options='-fPIC'
     ;;
 ?86-pc-cygwin*|i?86-pc-cygwin*)
     pic_options='-DDLL_EXPORT'
     ;;
-i?86-apple-darwin*)
+i?86-apple-darwin*|arm-apple-darwin*)
     pic_options='-fno-common'
     ;;
 *)
index 930ed117c3202034f0d046ffeca2a2f2d73d830d..e6a64719df53e03a6abed179354a329a1a7363c6 100644 (file)
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 #AC_PREREQ([2.62])
 
-AC_INIT(mono, [3.0.12],
+AC_INIT(mono, [3.1.0],
         [http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
 
 AC_CONFIG_SRCDIR([README])
@@ -72,6 +72,9 @@ 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
@@ -171,9 +174,8 @@ case "$host" in
                AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread is a pointer])
                libdl=
                libgc_threads=pthreads
-               # This doesn't seem to work as of 7.0 on amd64
-               with_sigaltstack=no
                use_sigposix=yes
+               has_dtrace=yes
                ;;
        *-*-*openbsd*)
                host_win32=no
@@ -314,14 +316,19 @@ case "$host" in
                        dnl Snow Leopard and newer config.guess reports as this
                        i*86-*-darwin*)
                                BROKEN_DARWIN_FLAGS="-arch i386 -D_XOPEN_SOURCE"
-                               CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_FLAGS"
+                               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_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_FLAGS"
+                               CPPFLAGS_FOR_EGLIB="$CPPFLAGS_FOR_EGLIB $BROKEN_DARWIN_CPPFLAGS"
                                CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
+                               extra_runtime_ldflags="-stack_size,0x800000"
+                               ;;
+                       x*64-*-darwin*)
+                               extra_runtime_ldflags="-stack_size,0x800000"
                                ;;
                        arm*-darwin*)
                                has_dtrace=no
@@ -351,6 +358,7 @@ 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)
@@ -490,6 +498,20 @@ 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'
@@ -510,7 +532,7 @@ if test x"$GCC" = xyes; then
 
                ORIG_CFLAGS=$CFLAGS
                # Check for the normal version, since gcc ignores unknown -Wno options
-               CFLAGS="$CFLAGS -Wunused-but-set-variable"
+               CFLAGS="$CFLAGS -Wunused-but-set-variable -Werror"
                AC_MSG_CHECKING(for -Wno-unused-but-set-variable option to gcc)
                AC_TRY_COMPILE([],[
                                return 0;
@@ -521,6 +543,12 @@ if test x"$GCC" = xyes; then
                   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"
+               fi
 else
        # The Sun Forte compiler complains about inline functions that access static variables
        # so disable all inlining.
@@ -533,20 +561,6 @@ fi
 CFLAGS="$CFLAGS -g $WARN"
 CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -g"
 
-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],
-       [])
-])
-
 # Where's the 'mcs' source tree?
 if test -d $srcdir/mcs; then
   mcsdir=mcs
@@ -2324,11 +2338,11 @@ AC_SUBST(nacl_self_host)
 
 if test "x$enable_nacl_codegen" = "xyes"; then
    MONO_NACL_ALIGN_MASK_OFF=1
-   CPPFLAGS="$CPPFLAGS -D__native_client_codegen__"
    AC_DEFINE(TARGET_NACL, 1, [...])
+   AC_DEFINE(__native_client_codegen__, 1, [...])
 else
    MONO_NACL_ALIGN_MASK_OFF=0
-   CPPFLAGS="$CPPFLAGS -D__default_codegen__"
+   AC_DEFINE(__default_codegen__, 1, [...])
 fi
 if test "x$enable_nacl_gc" = "xyes"; then
    if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
@@ -2580,7 +2594,7 @@ case "$host" in
                JIT_SUPPORTED=yes
                CPPFLAGS="$CPPFLAGS -D__ARM_EABI__ -DHAVE_ARMV6=1"
                # libgc's gc_locks.h depends on this
-           NESTED_LIBGC_FLAGS="$NESTED_LIBGC_FLAGS -DHAVE_ARMV6"
+           CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6"
                sgen_supported=true
                ;;
        arm*-linux*)
@@ -2925,7 +2939,7 @@ mono_debugger_supported=no
 AC_MSG_CHECKING(if the Mono Debugger is supported on this platform)
 if test "x$mono_debugger_supported" = "xyes"; then
        BOEHM_DEFINES="$BOEHM_DEFINES -DMONO_DEBUGGER_SUPPORTED"
-       NESTED_LIBGC_FLAGS="-DMONO_DEBUGGER_SUPPORTED"
+       CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DMONO_DEBUGGER_SUPPORTED"
 fi
 AM_CONDITIONAL(MONO_DEBUGGER_SUPPORTED, test x$mono_debugger_supported = xyes)
 AC_MSG_RESULT($mono_debugger_supported)
@@ -2945,11 +2959,6 @@ if test "x$icall_tables" = "xno"; then
    AC_DEFINE(DISABLE_ICALL_TABLES, 1, [Icall tables disabled])
 fi
 
-if test "x$mono_cv_clang" = "xyes"; then
-   # FIXME: This causes many compilation errors
-   with_tls=pthread
-fi
-
 if test "x$with_tls" = "x__thread"; then
        AC_DEFINE(HAVE_KW_THREAD, 1, [Have __thread keyword])
        # Pass the information to libgc
@@ -2958,10 +2967,7 @@ if test "x$with_tls" = "x__thread"; then
        AC_TRY_COMPILE([static __thread int foo __attribute__((tls_model("initial-exec")));], [
                ], [
                        AC_MSG_RESULT(yes)
-                       # CLANG doesn't support this yet, and it prints warnings about it
-                       if test "x$mono_cv_clang" = "xno"; then
-                               AC_DEFINE(HAVE_TLS_MODEL_ATTR, 1, [tld_model available])
-                       fi
+                       AC_DEFINE(HAVE_TLS_MODEL_ATTR, 1, [tls_model available])
                ], [
                        AC_MSG_RESULT(no)
        ])
@@ -3039,7 +3045,7 @@ if test ${TARGET} = ARM; then
                if test ${armv6} = yes; then
                   AC_DEFINE(HAVE_ARMV6, 1, "Host supports ARMV6 instructions")
                   # libgc's gc_locks.h depends on this
-                  NESTED_LIBGC_FLAGS="$NESTED_LIBGC_FLAGS -DHAVE_ARMV6"
+                  CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6"
                fi
        fi
 fi
@@ -3068,7 +3074,7 @@ case "x$gc" in
                # 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 $NESTED_LIBGC_FLAGS"
+               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
@@ -3158,7 +3164,7 @@ fi
 if test "x$enable_shared" = "xno" -a "x$enable_executables" = "xyes"; then
    LIBMONO_LA=libmini-static.la
 else
-   LIBMONO_LA=libmono-$API_VER.la
+   LIBMONO_LA=libmonosgen-$API_VER.la
 fi
 AC_SUBST(LIBMONO_LA)
 
@@ -3482,6 +3488,11 @@ if test x$host_win32 = xyes; then
    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 ;;
index e32d464dbbe4fccda68a0a0e08b515bbe8f18769..526d00c1be7822b1cfa9de6a821dd5c7ed0795e8 100644 (file)
@@ -29,7 +29,7 @@ i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
 ?86-pc-cygwin*|i?86-pc-cygwin*)
     pic_options='-DDLL_EXPORT'
     ;;
-i?86-apple-darwin*)
+i?86-apple-darwin*|arm-apple-darwin*)
     pic_options='-fno-common'
     ;;
 *)
index dfe9ec4856d4aa02c27427fdbf8ac130f67ad7ab..fdbce134b9767857b4641d0991cf384fc9911696 100644 (file)
@@ -136,10 +136,16 @@ AC_CHECK_SIZEOF(long)
 AC_CHECK_SIZEOF(long long)
 AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
 
+#
+# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
+# the detection of strndup on OS X so Mono built on 10.7+ still runs on 10.6. This can be
+# removed once support for 10.6 is dropped.
 #
 # iOS detection of strndup and getpwuid_r is faulty for some reason so let's simply avoid it
 #
-if test x$target_ios = xno; then
+if test x$target_osx = xyes; then
+AC_CHECK_FUNCS(getpwuid_r)
+elif test x$target_ios = xno; then
 AC_CHECK_FUNCS(strndup getpwuid_r)
 fi
 
index 822de0117a079369b9404429662e120bd24245d4..10b8312c8024111780ee382688cd4c8754b1f1ac 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 822de0117a079369b9404429662e120bd24245d4
+Subproject commit 10b8312c8024111780ee382688cd4c8754b1f1ac
index e32d464dbbe4fccda68a0a0e08b515bbe8f18769..526d00c1be7822b1cfa9de6a821dd5c7ed0795e8 100644 (file)
@@ -29,7 +29,7 @@ i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
 ?86-pc-cygwin*|i?86-pc-cygwin*)
     pic_options='-DDLL_EXPORT'
     ;;
-i?86-apple-darwin*)
+i?86-apple-darwin*|arm-apple-darwin*)
     pic_options='-fno-common'
     ;;
 *)
index f038e423633401d277b21e064c48c243f0487bef..bbb2e5025338947a70db0e2406d9d67271da066f 100644 (file)
@@ -3,10 +3,11 @@
 .\" Copyright 2003 Ximian, Inc. 
 .\" Copyright 2004-2011 Novell, Inc. 
 .\" Copyright 2011-2012 Xamarin Inc
+.\" Copyright 2013 7digital Media Ltd.
 .\" Author:
 .\"   Miguel de Icaza (miguel@gnu.org)
 .\"
-.TH Mono "Mono 2.11"
+.TH Mono "Mono 3.0"
 .SH NAME
 mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
 .SH SYNOPSIS
@@ -898,6 +899,18 @@ above locations. If you don't want the mapping to be performed you can set this
 variable in your environment before starting the application and no action will
 be taken.
 .TP
+\fBMONO_ASPNET_WEBCONFIG_CACHESIZE\fR
+Mono has a cache of ConfigSection objects for speeding up WebConfigurationManager
+queries. Its default size is 100 items, and when more items are needed, cache
+evictions start happening. If evictions are too frequent this could impose
+unnecessary overhead, which could be avoided by using this environment variable
+to set up a higher cache size (or to lower memory requirements by decreasing it).
+.TP
+\fBMONO_CAIRO_DEBUG_DISPOSE\fR
+If set, causes Mono.Cairo to collect stack traces when objects are allocated,
+so that the finalization/Dispose warnings include information about the
+instance's origin.
+.TP
 \fBMONO_CFG_DIR\fR
 If set, this variable overrides the default system configuration directory
 ($PREFIX/etc). It's used to locate machine.config file.
index 853d88fc363778820d5b6a6b5be1718c7690f00c..c270cc81ccf0f562604f81c10869e5364d426577 100644 (file)
@@ -66,7 +66,7 @@ do-profile-check: $(depsdir)/.stamp
            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 "*** Read INSTALL.txt for information on how to bootstrap a Mono installation." 1>&2 ; \
+                echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \
                exit 1; fi; fi
 
 
index d63f224a4232c25132a077d10c9a9764bcb6b807..6d18c6c58a3cc2dccd5a2b68f4e1d1973d13d5b4 100644 (file)
@@ -1,6 +1,6 @@
 thisdir = class/Facades
 
-net_4_5_SUBDIRS = System.Runtime System.Linq System.Xml.Serialization System.Xml.XmlSerializer \
+net_4_5_SUBDIRS = System.Runtime System.Linq System.Xml.XmlSerializer \
        System.ServiceModel.Primitives System.Xml.ReaderWriter System.Diagnostics.Debug \
        System.Runtime.Extensions System.Diagnostics.Tools System.Collections \
        System.ComponentModel.EventBasedAsync System.ComponentModel System.ObjectModel \
@@ -10,7 +10,7 @@ net_4_5_SUBDIRS = System.Runtime System.Linq System.Xml.Serialization System.Xml
        System.Text.Encoding.Extensions System.Linq.Queryable System.Linq.Expressions \
        System.Net.Primitives System.Net.Requests System.Net.NetworkInformation \
        System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml \
-       System.Runtime.Serialization.Json System.ServiceModel.Http System.Windows \
+       System.Runtime.Serialization.Json System.ServiceModel.Http \
        System.Xml.XDocument System.Threading.Tasks System.Diagnostics.Contracts \
        System.Dynamic.Runtime System.ComponentModel.Annotations System.Runtime.Numerics \
        System.Linq.Parallel System.Collections.Concurrent System.Threading.Tasks.Parallel \
index 1330eebfe653b644b7fcb166c0c360f2854e424a..685be8042b00d3a0cd124dfe36b361ee966f16b6 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index eac2a8546d9792ad5edd27a8fa42a73c6171f5c7..a96857e7f76bb6a1d4d7a28f4c86ae4fbe55c63a 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 45560dc0a8ffd7a54eb89df777c68bedde67bcb5..8aa8cbcdc165e013010ac5d66c89ccf097830e1a 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 1888558b3d95b5bc3bf8cdac0d4466067255162f..85cfdb9cc122aaefa43c4203b00d94fa55492b22 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 8fced632ad6fc92377b92b0c185ac960bb194f8f..828b771a27568b9b67799a086279c523c9ca170f 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index a510e67e13ecda5c83994959334b7cc7336e8319..2fc9947025957ab5711ee8d175505e7510821dca 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 7741b20379c6d7f5da4ce98f2155798b0922ae10..f1e987d020ad868ece9926f4d341584dbd05dda1 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 982113d36c425fc85e9c47fb4d2fcb26b530828f..b6db9a1e6435a8fb3f8987aa9a53b05cb4972081 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 159b949840e26e55770cf991c4ec46a6ae221cef..085333228a6cc45ce68cb246db87609b10702cbc 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index efc686c7071962485e2c2dd116151ab5fd45b8a0..e924712186db454a9fde173a594141516b52f191 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 9f74d5de53132e19080c678be3ab13bc504189c2..f87e3ce5ded5ab9cb2f0b45a3440f30eac698228 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index dba6a9e28ba880238061101f3258898454d2b5f0..6f25c833312d19c00c64d4d1de03a3e555f3e115 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 8840c78423bc4a4c84770c927993dd148fa28087..5824fc0e7c114e00a9f89917495c4ca9768d27e8 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 0a75081f520cd1f957c5009cf6a7ad720f6aa1ad..5c425d1487056f22ff38f6b75ad48818cdddad86 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index b5c77778007146a6122fb239fd4c7a227f1a7fcf..0c3c697408b35198796bc706962708e5a4158d22 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index c0ccc60eb33cd2aaebf826068572d6704f50220a..62f55c568473553db0ad200ae3b48e30cf1a4484 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 1c4535b8b569bd3651b239011153d4f8a300fa23..7baa4d661146535c2998f8a3ad63814436147a13 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 35cb91108acc84285481e56a648ca5c602546bf6..d75c389c82000c631aca5d2f77fc4e52ee13e604 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index f60df39635e36a1e9ab6c5d33445ffe53944642e..a7f198c67bf2c512ade2a1308d60a1d2acad89a7 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 55a23109b6ba507cb5e844f9d5a33f412497b511..9124e1b2b5e6a39e339ba9acc8de9c18ef050dd2 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 4bdc891d2132b9b43c24290646e514548e3e4534..0141d30c0ee1da43673c2a06a5efa233c64268ed 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index a2abbc8199c774c2853426197cbf81f187a9d83d..6c614cdb54909d3ec52a46e8748eb5e6211c8a7a 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index b952ba45d26750da5818e49245dd11bfb05092eb..97c869f804d848e170b673e9b76b68c492c1c210 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index e03289db95bfebf00e30e575f33a3137886e22bd..8d2517ab53f5d5f7782f2562ccbb6c099627ed14 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 4c9a3888f75a9084b3d374d4d5d7f49be272a069..fa299ae9c62bc9e792b1f33870cd8e53cce577ec 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 53f8a09700e484e3131edec6fee981d10d751f2f..3a4e894f56bd61409853085078a4cb8492b568d4 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index f98255f9e871af7ab4e31b0442a6d6c0f57c87ad..6eda657d09a31ac48013c18870ae1e108a0f2902 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 2edd785433a2e74a9efe238b421c90ba315ed7a8..b7749b990316d076ff9e525e29c90ee34e95e242 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 4401504d6f061b2c99308325012e63a6c3d1cfa8..2194c610058249ddb0d044c1461578ea61c93686 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 8a4977b101aa5dcd780ccfcd008a203750cad5a7..c921c6c1150c90eb1c121cac7fdf462203e9614d 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 0759205af52c13bb0117cb8eda54b7e9c9a3b34e..9add5807e556d5c9661a6afae25ba8aa1e61e0ea 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index ee9bc611bbdaa50eb2da74486d90e8427a7b8cae..a44d7588ec4d983772586b8179b0fb8078baec70 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index a4655ebde71c45878cdfa9abf07b44b74e59f92a..c180411f3e625f1b769892517d7659144de24402 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index f8664e47c10d5a50fb1ae458b1f0cc2d0f5ef3b1..e8e33f00cdf26501a78c12b57a1bfee14fd499a0 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index b8a22c9a25d011ddc233e983aad2894796f7f016..5f8792605086901dd3aa283acbf9b18e7c75872d 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index e84c896453982a7f0a43230d14fcd224d667b17b..4caaa79a5df178a397e5ac8e48f278e9baa53f02 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index bae148007649c32ec134e919b4bf81e005d69a80..d01e3e586a70a6ce88af3db92a7571d1b7a27392 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 02954b61fd21a8d75c377010c33b10fa5260130f..94041db6ebfbc6c94f3fa449967247397f916f4c 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 947257e059f042c537e3cfde6e24d3212ee3b922..2b90731b7ff58e6a95d3cb1a04b5fc02db367510 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
diff --git a/mcs/class/Facades/System.Windows/AssemblyInfo.cs b/mcs/class/Facades/System.Windows/AssemblyInfo.cs
deleted file mode 100644 (file)
index 347b850..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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.Windows.dll")]
-[assembly: AssemblyDescription ("System.Windows.dll")]
-[assembly: AssemblyDefaultAlias ("System.Windows.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
-[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile ("../../msfinal.pub")]
-
-[assembly: ReferenceAssembly]
diff --git a/mcs/class/Facades/System.Windows/Makefile b/mcs/class/Facades/System.Windows/Makefile
deleted file mode 100644 (file)
index b1dec77..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-thisdir = class/Facades/System.Windows
-SUBDIRS = 
-include ../../../build/rules.make
-
-LIBRARY_SUBDIR = Facades
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
-
-LIBRARY = System.Windows.dll
-LIB_MCS_FLAGS = /r:System
-
-NO_TEST = yes
-
-include ../../../build/library.make
diff --git a/mcs/class/Facades/System.Windows/System.Windows.dll.sources b/mcs/class/Facades/System.Windows/System.Windows.dll.sources
deleted file mode 100644 (file)
index 74532ef..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-AssemblyInfo.cs
-TypeForwarders.cs
-../../../build/common/Consts.cs
diff --git a/mcs/class/Facades/System.Windows/TypeForwarders.cs b/mcs/class/Facades/System.Windows/TypeForwarders.cs
deleted file mode 100644 (file)
index 18ab654..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.INotifyCollectionChanged))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ReadOnlyObservableCollection<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedAction))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventArgs))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventHandler))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Windows.Input.ICommand))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.INotifyDataErrorInfo))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataErrorsChangedEventArgs))]
-
index c29da29f54370256ef874dfe2dae4a5217e761bc..54a6d7d37a77b3f9f6ec516cf6e2206db181d882 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
diff --git a/mcs/class/Facades/System.Xml.Serialization/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.Serialization/AssemblyInfo.cs
deleted file mode 100644 (file)
index 60ad513..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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.Xml.Serialization.dll")]
-[assembly: AssemblyDescription ("System.Xml.Serialization.dll")]
-[assembly: AssemblyDefaultAlias ("System.Xml.Serialization.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
-[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile ("../../msfinal.pub")]
-
-[assembly: ReferenceAssembly]
diff --git a/mcs/class/Facades/System.Xml.Serialization/Makefile b/mcs/class/Facades/System.Xml.Serialization/Makefile
deleted file mode 100644 (file)
index eb5476b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-thisdir = class/Facades/System.Xml.Serialization
-SUBDIRS = 
-include ../../../build/rules.make
-
-LIBRARY_SUBDIR = Facades
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
-
-LIBRARY = System.Xml.Serialization.dll
-LIB_MCS_FLAGS = /r:System.Xml /r:System.ServiceModel
-
-NO_TEST = yes
-
-include ../../../build/library.make
diff --git a/mcs/class/Facades/System.Xml.Serialization/System.Xml.Serialization.dll.sources b/mcs/class/Facades/System.Xml.Serialization/System.Xml.Serialization.dll.sources
deleted file mode 100644 (file)
index 74532ef..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-AssemblyInfo.cs
-TypeForwarders.cs
-../../../build/common/Consts.cs
diff --git a/mcs/class/Facades/System.Xml.Serialization/TypeForwarders.cs b/mcs/class/Facades/System.Xml.Serialization/TypeForwarders.cs
deleted file mode 100644 (file)
index 376e38d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlMapping))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlTypeMapping))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlMappingAccess))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializer))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlArrayItemAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributeOverrides))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlElementAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyElementAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializerNamespaces))]
-
index 9ff132b549a0fb17c755b9110c77535cf64366ba..e3f2265166d9af2139b22cd1aeeda58e4b3e5212 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 85504315b3c6c16bd0aec42c02b0757ff270c0d5..4a33ba5a72fe85fa35a7dee804454451666f6267 100644 (file)
@@ -35,9 +35,9 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[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")]
 
index 45f99f40ab1ce73841b1abd9c5ea36ffc0e43512..67eeae47cbf2bc4486ef9fd79f608a13408aaae6 100644 (file)
@@ -152,6 +152,9 @@ mobile_dirs := \
        System.IO.Compression.FileSystem \
        System.ComponentModel.DataAnnotations \
        System.ComponentModel.Composition.4.5 \
+       System.Net \
+       System.Windows \
+       System.Xml.Serialization \
        Facades
 
 monodroid_dirs := \
@@ -231,6 +234,7 @@ net_4_5_dirs := \
        System.Threading.Tasks.Dataflow \
        System.ComponentModel.Composition.4.5 \
        System.Net.Http \
+       System.Net.Http.WebRequest \
        System.Web.Razor \
        System.Web.WebPages.Deployment \
        System.Web.WebPages \
@@ -245,6 +249,8 @@ net_4_5_dirs := \
        Mono.CodeContracts \
        System.IO.Compression \
        System.IO.Compression.FileSystem \
+       System.Windows \
+       System.Xml.Serialization \
        Facades
        
 net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) aot-compiler
index e95096f73f1a92c2a9e246f97ae3b6d5e49efe95..880cdf2adc32643ba361369c3aff048dc57a4591 100644 (file)
@@ -3,9 +3,12 @@
 ../../build/common/Locale.cs
 ./Mono.Cairo/Antialias.cs
 ./Mono.Cairo/Cairo.cs
+./Mono.Cairo/CairoDebug.cs
+./Mono.Cairo/Color.cs
 ./Mono.Cairo/Content.cs
 ./Mono.Cairo/Context.cs
 ./Mono.Cairo/DirectFBSurface.cs
+./Mono.Cairo/Distance.cs
 ./Mono.Cairo/Extend.cs
 ./Mono.Cairo/FillRule.cs
 ./Mono.Cairo/Filter.cs
 ./Mono.Cairo/Pattern.cs
 ./Mono.Cairo/PatternType.cs
 ./Mono.Cairo/PdfSurface.cs
+./Mono.Cairo/Point.cs
+./Mono.Cairo/PointD.cs
 ./Mono.Cairo/PSSurface.cs
 ./Mono.Cairo/RadialGradient.cs
 ./Mono.Cairo/Rectangle.cs
+./Mono.Cairo/Region.cs
 ./Mono.Cairo/ScaledFont.cs
 ./Mono.Cairo/SolidPattern.cs
 ./Mono.Cairo/Status.cs
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/CairoDebug.cs b/mcs/class/Mono.Cairo/Mono.Cairo/CairoDebug.cs
new file mode 100644 (file)
index 0000000..d694bbb
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// CairoDebug.cs
+//
+// Author:
+//   Michael Hutchinson (mhutch@xamarin.com)
+//
+// Copyright (C) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Cairo {
+
+       static class CairoDebug
+       {
+               static System.Collections.Generic.Dictionary<IntPtr,string> traces;
+
+               public static readonly bool Enabled;
+
+               static CairoDebug ()
+               {
+                       var dbg = Environment.GetEnvironmentVariable ("MONO_CAIRO_DEBUG_DISPOSE");
+                       if (dbg == null)
+                               return;
+                       Enabled = true;
+                       traces = new System.Collections.Generic.Dictionary<IntPtr,string> ();
+               }
+
+               public static void OnAllocated (IntPtr obj)
+               {
+                       if (!Enabled)
+                               throw new InvalidOperationException ();
+
+                       traces[obj] = Environment.StackTrace;
+               }
+
+               public static void OnDisposed<T> (IntPtr obj, bool disposing)
+               {
+                       if (disposing && !Enabled)
+                               throw new InvalidOperationException ();
+
+                       if (Environment.HasShutdownStarted)
+                               return;
+
+                       if (!disposing) {
+                               Console.Error.WriteLine ("{0} is leaking, programmer is missing a call to Dispose", typeof(T).FullName);
+                               if (Enabled) {
+                                       string val;
+                                       if (traces.TryGetValue (obj, out val)) {
+                                               Console.Error.WriteLine ("Allocated from:");
+                                               Console.Error.WriteLine (val);
+                                       }
+                               } else {
+                                       Console.Error.WriteLine ("Set MONO_CAIRO_DEBUG_DISPOSE to track allocation traces");
+                               }
+                       }
+
+                       if (Enabled)
+                               traces.Remove (obj);
+               }
+       }
+
+}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Color.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Color.cs
new file mode 100644 (file)
index 0000000..030089e
--- /dev/null
@@ -0,0 +1,75 @@
+//
+// Mono.Cairo.Context.cs
+//
+// Author:
+//   Duncan Mak (duncan@ximian.com)
+//   Miguel de Icaza (miguel@novell.com)
+//   Hisham Mardam Bey (hisham.mardambey@gmail.com)
+//   Alp Toker (alp@atoker.com)
+//
+// (C) Ximian Inc, 2003.
+// (C) Novell Inc, 2003.
+//
+// This is an OO wrapper API for the Cairo API.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Cairo {
+
+       public struct Color
+       {
+               public Color(double r, double g, double b) : this (r, g, b, 1.0)
+               {
+               }
+
+               public Color(double r, double g, double b, double a)
+               {
+                       this.r = r;
+                       this.g = g;
+                       this.b = b;
+                       this.a = a;
+               }
+
+               double r, g, b, a;
+
+               public double R {
+                       get { return r; }
+                       set { r = value; }
+               }
+
+               public double G {
+                       get { return g; }
+                       set { g = value; }
+               }
+
+               public double B {
+                       get { return b; }
+                       set { b = value; }
+               }
+
+               public double A {
+                       get { return a; }
+                       set { a = value; }
+               }
+       }
+}
index 5d6b7679aac9f009547ab1f9fa87b92fc14693c9..1eff46c1ec19e6c177469166a5e07290c456db03 100644 (file)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -41,117 +41,18 @@ using Cairo;
 
 namespace Cairo {
 
-        public struct Point
-        {              
-               public Point (int x, int y)
-               {
-                       this.x = x;
-                       this.y = y;
-               }
-
-               int x, y;
-               public int X {
-                       get { return x; }
-                       set { x = value; }
-               }
-
-               public int Y {
-                       get { return y; }
-                       set { y = value; }
-               }
-       }
-          
-        public struct PointD
-        {
-               public PointD (double x, double y)
-               {
-                       this.x = x;
-                       this.y = y;
-               }
-
-               double x, y;
-               public double X {
-                       get { return x; }
-                       set { x = value; }
-               }
-
-               public double Y {
-                       get { return y; }
-                       set { y = value; }
-               }
-       }
-   
-
-        public struct Distance
-        {
-               public Distance (double dx, double dy)
-               {
-                       this.dx = dx;
-                       this.dy = dy;
-               }
-
-               double dx, dy;
-               public double Dx {
-                       get { return dx; }
-                       set { dx = value; }
-               }
-
-               public double Dy {
-                       get { return dy; }
-                       set { dy = value; }
-               }
-       }
-             
-        public struct Color
-        {              
-               public Color(double r, double g, double b) : this (r, g, b, 1.0)
-               {
-               }
-
-               public Color(double r, double g, double b, double a)
-               {
-                       this.r = r;
-                       this.g = g;
-                       this.b = b;
-                       this.a = a;
-               }
-
-               double r, g, b, a;
-               
-               public double R {
-                       get { return r; }
-                       set { r = value; }
-               }
-
-               public double G {
-                       get { return g; }
-                       set { g = value; }
-               }
-               
-               public double B {
-                       get { return b; }
-                       set { b = value; }
-               }
-
-               public double A {
-                       get { return a; }
-                       set { a = value; }
-               }
-               
-       }
-   
        [Obsolete ("Renamed Cairo.Context per suggestion from cairo binding guidelines.")]
        public class Graphics : Context {
                public Graphics (IntPtr state) : base (state) {}
                public Graphics (Surface surface) : base (surface) {}
        }
 
-        public class Context : IDisposable 
-        {
-                internal IntPtr state = IntPtr.Zero;
+       public class Context : IDisposable
+       {
+               IntPtr handle = IntPtr.Zero;
 
                static int native_glyph_size, c_compiler_long_size;
-               
+
                static Context ()
                {
                        //
@@ -165,7 +66,7 @@ namespace Cairo {
                        // is 32 bits
                        //
                        int ptr_size = Marshal.SizeOf (typeof (IntPtr));
-                       
+
                        PlatformID platform = Environment.OSVersion.Platform;
                        if (platform == PlatformID.Win32NT ||
                            platform == PlatformID.Win32S ||
@@ -179,558 +80,603 @@ namespace Cairo {
                                native_glyph_size = Marshal.SizeOf (typeof (Glyph));
                        }
                }
-               
-                public Context (Surface surface)
-                {
-                       state = NativeMethods.cairo_create (surface.Handle);
-                }
-               
-               public Context (IntPtr state)
+
+               public Context (Surface surface) : this (NativeMethods.cairo_create (surface.Handle), true)
                {
-                       this.state = state;
                }
-               
+
+
+               public Context (IntPtr handle, bool owner)
+               {
+                       this.handle = handle;
+                       if (!owner)
+                               NativeMethods.cairo_reference (handle);
+                       if (CairoDebug.Enabled)
+                               CairoDebug.OnAllocated (handle);
+               }
+
+               [Obsolete]
+               public Context (IntPtr state) : this (state, true)
+               {
+               }
+
                ~Context ()
                {
                        Dispose (false);
                }
 
-               void IDisposable.Dispose ()
+               public void Dispose ()
                {
                        Dispose (true);
                        GC.SuppressFinalize (this);
                }
-               
-                protected virtual void Dispose (bool disposing)
-                {
-                       if (!disposing){
-                               Console.Error.WriteLine ("Cairo.Context: called from finalization thread, programmer is missing a call to Dispose");
-                               return;
-                       }
-                       
-                       if (state == IntPtr.Zero)
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (!disposing || CairoDebug.Enabled)
+                               CairoDebug.OnDisposed<Context> (handle, disposing);
+
+                       if (!disposing|| handle == IntPtr.Zero)
                                return;
 
-                       //Console.WriteLine ("Destroying");
-                        NativeMethods.cairo_destroy (state);
-                       state = IntPtr.Zero;
-                }
+                       NativeMethods.cairo_destroy (handle);
+                       handle = IntPtr.Zero;
 
-                public void Save ()
-                {
-                        NativeMethods.cairo_save (state);
-                }
+               }
 
-                public void Restore ()
-                {
-                        NativeMethods.cairo_restore (state);
-                }
+               public void Save ()
+               {
+                       NativeMethods.cairo_save (handle);
+               }
+
+               public void Restore ()
+               {
+                       NativeMethods.cairo_restore (handle);
+               }
 
                public Antialias Antialias {
-                       get { return NativeMethods.cairo_get_antialias (state); }
-                       set { NativeMethods.cairo_set_antialias (state, value); }
-               }
-                
-                public Cairo.Status Status {
-                        get {
-                                return NativeMethods.cairo_status (state);
-                        }
-                }
-               
-                public IntPtr Handle {
-                        get {
-                                return state;
-                        }
-                }
-                
-                public Cairo.Operator Operator {
-                        set {
-                                NativeMethods.cairo_set_operator (state, value);
-                        }
-
-                        get {
-                                return NativeMethods.cairo_get_operator (state);
-                        }
-                }
-                
-                //FIXME: obsolete this property
-                public Cairo.Color Color {
-                       set { 
-                               NativeMethods.cairo_set_source_rgba (state, value.R, value.G, value.B, value.A);
-                       }                       
-                }
-
-               [Obsolete ("Use Color property")]
-                public Cairo.Color ColorRgb {
-                       set { 
+                       get { return NativeMethods.cairo_get_antialias (handle); }
+                       set { NativeMethods.cairo_set_antialias (handle, value); }
+               }
+
+               public Cairo.Status Status {
+                       get {
+                               return NativeMethods.cairo_status (handle);
+                       }
+               }
+
+               public IntPtr Handle {
+                       get {
+                               return handle;
+                       }
+               }
+
+               public Operator Operator {
+                       set {
+                               NativeMethods.cairo_set_operator (handle, value);
+                       }
+
+                       get {
+                               return NativeMethods.cairo_get_operator (handle);
+                       }
+               }
+
+               [Obsolete ("Use SetSourceRGBA method")]
+               public Color Color {
+                       set {
+                               NativeMethods.cairo_set_source_rgba (handle, value.R, value.G, value.B, value.A);
+                       }
+               }
+
+               [Obsolete ("Use SetSourceRGBA method")]
+               public Cairo.Color ColorRgb {
+                       set {
                                Color = new Color (value.R, value.G, value.B);
                        }
-                }              
+               }
 
-                public double Tolerance {
+               public double Tolerance {
                        get {
-                               return NativeMethods.cairo_get_tolerance (state);
-                       }
-
-                        set {
-                                NativeMethods.cairo_set_tolerance (state, value);
-                        }
-                }
-                
-                public Cairo.FillRule FillRule {
-                        set {
-                                NativeMethods.cairo_set_fill_rule (state, value);
-                        }
-
-                        get {
-                                return NativeMethods.cairo_get_fill_rule (state);
-                        }
-                }
-                                        
-                public double LineWidth {
-                        set {
-                                NativeMethods.cairo_set_line_width (state, value);
-                        }
-
-                        get {
-                                return NativeMethods.cairo_get_line_width (state);
-                        }
-                }
-
-                public Cairo.LineCap LineCap {
-                        set {
-                                NativeMethods.cairo_set_line_cap (state, value);
-                        }
-
-                        get {
-                                return NativeMethods.cairo_get_line_cap (state);
-                        }
-                }
-
-                public Cairo.LineJoin LineJoin {
-                        set {
-                                NativeMethods.cairo_set_line_join (state, value);
-                        }
-
-                        get {
-                                return NativeMethods.cairo_get_line_join (state);
-                        }
-                }
-
-                public void SetDash (double [] dashes, double offset)
-                {
-                        NativeMethods.cairo_set_dash (state, dashes, dashes.Length, offset);
-                }
-
-                public Pattern Pattern {
-                        set {
-                                NativeMethods.cairo_set_source (state, value.Pointer);
-                        }
-                       
+                               return NativeMethods.cairo_get_tolerance (handle);
+                       }
+
+                       set {
+                               NativeMethods.cairo_set_tolerance (handle, value);
+                       }
+               }
+
+               public Cairo.FillRule FillRule {
+                       set {
+                               NativeMethods.cairo_set_fill_rule (handle, value);
+                       }
+
                        get {
-                               return new Pattern (NativeMethods.cairo_get_source (state));
-                       }
-                }              
-               
-                public Pattern Source {
-                        set {
-                                NativeMethods.cairo_set_source (state, value.Pointer);
-                        }
-                       
+                               return NativeMethods.cairo_get_fill_rule (handle);
+                       }
+               }
+
+               public double LineWidth {
+                       set {
+                               NativeMethods.cairo_set_line_width (handle, value);
+                       }
+
                        get {
-                               return Pattern.Lookup (NativeMethods.cairo_get_source (state));
-                       }
-                }
-
-                public double MiterLimit {
-                        set {
-                                NativeMethods.cairo_set_miter_limit (state, value);
-                        }
-
-                        get {
-                                return NativeMethods.cairo_get_miter_limit (state);
-                        }
-                }
-
-                public PointD CurrentPoint {
-                        get {
-                                double x, y;
-                                NativeMethods.cairo_get_current_point (state, out x, out y);
-                                return new PointD (x, y);
-                        }
-                }
-
-                public Cairo.Surface Target {
-                        set {
-                               if (state != IntPtr.Zero)
-                                       NativeMethods.cairo_destroy (state);
-                               
-                               state = NativeMethods.cairo_create (value.Handle);
-                        }
-
-                        get {
-                                return Cairo.Surface.LookupExternalSurface (
-                                        NativeMethods.cairo_get_target (state));
-                        }
-                }
-
-               public Cairo.ScaledFont ScaledFont {
-                        set {
-                               NativeMethods.cairo_set_scaled_font (state, value.Handle);
-                        }
-
-                        get {
-                                return new ScaledFont (NativeMethods.cairo_get_scaled_font (state));
-                        }
-                }
+                               return NativeMethods.cairo_get_line_width (handle);
+                       }
+               }
+
+               public Cairo.LineCap LineCap {
+                       set {
+                               NativeMethods.cairo_set_line_cap (handle, value);
+                       }
+
+                       get {
+                               return NativeMethods.cairo_get_line_cap (handle);
+                       }
+               }
+
+               public Cairo.LineJoin LineJoin {
+                       set {
+                               NativeMethods.cairo_set_line_join (handle, value);
+                       }
+
+                       get {
+                               return NativeMethods.cairo_get_line_join (handle);
+                       }
+               }
+
+               public void SetDash (double [] dashes, double offset)
+               {
+                       NativeMethods.cairo_set_dash (handle, dashes, dashes.Length, offset);
+               }
+
+               [Obsolete("Use GetSource/GetSource")]
+               public Pattern Pattern {
+                       set {
+                               SetSource (value);
+                       }
+                       get {
+                               return GetSource ();
+                       }
+               }
+
+               //This is obsolete because it wasn't obvious it needed to be disposed
+               [Obsolete("Use GetSource/GetSource")]
+               public Pattern Source {
+                       set {
+                               SetSource (value);
+                       }
+                       get {
+                               return GetSource ();
+                       }
+               }
+
+               public void SetSource (Pattern source)
+               {
+                       NativeMethods.cairo_set_source (handle, source.Handle);
+               }
+
+               public Pattern GetSource ()
+               {
+                       var ptr = NativeMethods.cairo_get_source (handle);
+                       return Cairo.Pattern.Lookup (ptr, false);
+               }
+
+               public double MiterLimit {
+                       set {
+                               NativeMethods.cairo_set_miter_limit (handle, value);
+                       }
+
+                       get {
+                               return NativeMethods.cairo_get_miter_limit (handle);
+                       }
+               }
+
+               public PointD CurrentPoint {
+                       get {
+                               double x, y;
+                               NativeMethods.cairo_get_current_point (handle, out x, out y);
+                               return new PointD (x, y);
+                       }
+               }
+
+               [Obsolete ("Use GetTarget/SetTarget")]
+               public Cairo.Surface Target {
+                       set {
+                               if (handle != IntPtr.Zero)
+                                       NativeMethods.cairo_destroy (handle);
+
+                               handle = NativeMethods.cairo_create (value.Handle);
+                       }
+
+                       get {
+                               return GetTarget ();
+                       }
+               }
+
+               public Surface GetTarget ()
+               {
+                       return Surface.Lookup (NativeMethods.cairo_get_target (handle), false);
+               }
+
+               public void SetTarget (Surface target)
+               {
+                       if (handle != IntPtr.Zero)
+                               NativeMethods.cairo_destroy (handle);
+                       handle = NativeMethods.cairo_create (target.Handle);
+               }
+
+               [Obsolete("Use GetScaledFont/SetScaledFont")]
+               public ScaledFont ScaledFont {
+                       set {
+                               SetScaledFont (value);
+                       }
+
+                       get {
+                               return GetScaledFont ();
+                       }
+               }
+
+               public ScaledFont GetScaledFont ()
+               {
+                       return new ScaledFont (NativeMethods.cairo_get_scaled_font (handle), false);
+               }
+
+               public void SetScaledFont (ScaledFont font)
+               {
+                       NativeMethods.cairo_set_scaled_font (handle, font.Handle);
+               }
 
                public uint ReferenceCount {
-                       get { return NativeMethods.cairo_get_reference_count (state); }
+                       get { return NativeMethods.cairo_get_reference_count (handle); }
                }
 
                public void SetSourceRGB (double r, double g, double b)
                {
-                       NativeMethods.cairo_set_source_rgb (state, r, g, b);
+                       NativeMethods.cairo_set_source_rgb (handle, r, g, b);
                }
 
                public void SetSourceRGBA (double r, double g, double b, double a)
                {
-                       NativeMethods.cairo_set_source_rgba (state, r, g, b, a);
+                       NativeMethods.cairo_set_source_rgba (handle, r, g, b, a);
                }
 
                //[Obsolete ("Use SetSource method (with double parameters)")]
                public void SetSourceSurface (Surface source, int x, int y)
                {
-                       NativeMethods.cairo_set_source_surface (state, source.Handle, x, y);
+                       NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y);
                }
 
                public void SetSource (Surface source, double x, double y)
                {
-                       NativeMethods.cairo_set_source_surface (state, source.Handle, x, y);
+                       NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y);
                }
 
                public void SetSource (Surface source)
                {
-                       NativeMethods.cairo_set_source_surface (state, source.Handle, 0, 0);
+                       NativeMethods.cairo_set_source_surface (handle, source.Handle, 0, 0);
                }
-               
+
 #region Path methods
-                
-                public void NewPath ()
-                {
-                        NativeMethods.cairo_new_path (state);
-                }
+
+               public void NewPath ()
+               {
+                       NativeMethods.cairo_new_path (handle);
+               }
 
                public void NewSubPath ()
                {
-                       NativeMethods.cairo_new_sub_path (state);
+                       NativeMethods.cairo_new_sub_path (handle);
                }
-        
-                public void MoveTo (PointD p)
-                {
+
+               public void MoveTo (PointD p)
+               {
                        MoveTo (p.X, p.Y);
-                }
+               }
 
                public void MoveTo (double x, double y)
                {
-                        NativeMethods.cairo_move_to (state, x, y);
+                       NativeMethods.cairo_move_to (handle, x, y);
                }
-                
-                public void LineTo (PointD p)
+
+               public void LineTo (PointD p)
                {
                        LineTo (p.X, p.Y);
                }
-               
+
                public void LineTo (double x, double y)
-                {
-                        NativeMethods.cairo_line_to (state, x, y);
-                }
+               {
+                       NativeMethods.cairo_line_to (handle, x, y);
+               }
 
-                public void CurveTo (PointD p1, PointD p2, PointD p3)
+               public void CurveTo (PointD p1, PointD p2, PointD p3)
                {
                        CurveTo (p1.X, p1.Y, p2.X, p2.Y, p3.X, p3.Y);
                }
-                               
-                public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
-                {
-                        NativeMethods.cairo_curve_to (state, x1, y1, x2, y2, x3, y3);
-                }
 
-                public void RelMoveTo (Distance d)
+               public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
+               {
+                       NativeMethods.cairo_curve_to (handle, x1, y1, x2, y2, x3, y3);
+               }
+
+               public void RelMoveTo (Distance d)
                {
                        RelMoveTo (d.Dx, d.Dy);
                }
-               
-                public void RelMoveTo (double dx, double dy)
-                {
-                        NativeMethods.cairo_rel_move_to (state, dx, dy);
-                }
-               
-                public void RelLineTo (Distance d)
-                {
+
+               public void RelMoveTo (double dx, double dy)
+               {
+                       NativeMethods.cairo_rel_move_to (handle, dx, dy);
+               }
+
+               public void RelLineTo (Distance d)
+               {
                        RelLineTo (d.Dx, d.Dy);
-                }
-               
-                public void RelLineTo (double dx, double dy)
+               }
+
+               public void RelLineTo (double dx, double dy)
                {
-                        NativeMethods.cairo_rel_line_to (state, dx, dy);
+                       NativeMethods.cairo_rel_line_to (handle, dx, dy);
                }
-               
-                public void RelCurveTo (Distance d1, Distance d2, Distance d3)
+
+               public void RelCurveTo (Distance d1, Distance d2, Distance d3)
                {
                        RelCurveTo (d1.Dx, d1.Dy, d2.Dx, d2.Dy, d3.Dx, d3.Dy);
                }
 
-                public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
-                {
-                        NativeMethods.cairo_rel_curve_to (state, dx1, dy1, dx2, dy2, dx3, dy3); 
-                }
+               public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
+               {
+                       NativeMethods.cairo_rel_curve_to (handle, dx1, dy1, dx2, dy2, dx3, dy3);
+               }
+
+               public void Arc (double xc, double yc, double radius, double angle1, double angle2)
+               {
+                       NativeMethods.cairo_arc (handle, xc, yc, radius, angle1, angle2);
+               }
 
-                public void Arc (double xc, double yc, double radius, double angle1, double angle2)
-                {
-                        NativeMethods.cairo_arc (state, xc, yc, radius, angle1, angle2);
-                }
+               public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2)
+               {
+                       NativeMethods.cairo_arc_negative (handle, xc, yc, radius, angle1, angle2);
+               }
 
-                public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2)
-                {
-                        NativeMethods.cairo_arc_negative (state, xc, yc, radius, angle1, angle2);
-                }
-               
-                public void Rectangle (Rectangle rectangle)
+               public void Rectangle (Rectangle rectangle)
                {
                        Rectangle (rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
                }
 
-                public void Rectangle (PointD p, double width, double height)
+               public void Rectangle (PointD p, double width, double height)
                {
                        Rectangle (p.X, p.Y, width, height);
                }
 
-                public void Rectangle (double x, double y, double width, double height)
-                {
-                        NativeMethods.cairo_rectangle (state, x, y, width, height);
-                }
-                
-                public void ClosePath ()
-                {
-                        NativeMethods.cairo_close_path (state);
-                }
+               public void Rectangle (double x, double y, double width, double height)
+               {
+                       NativeMethods.cairo_rectangle (handle, x, y, width, height);
+               }
+
+               public void ClosePath ()
+               {
+                       NativeMethods.cairo_close_path (handle);
+               }
 
-               public Path CopyPath ()
+               public Path CopyPath ()
                {
-                       return new Path (NativeMethods.cairo_copy_path (state));
+                       return new Path (NativeMethods.cairo_copy_path (handle));
                }
 
                public Path CopyPathFlat ()
                {
-                       return new Path (NativeMethods.cairo_copy_path_flat (state));
+                       return new Path (NativeMethods.cairo_copy_path_flat (handle));
                }
 
                public void AppendPath (Path path)
                {
-                       NativeMethods.cairo_append_path (state, path.handle);
+                       NativeMethods.cairo_append_path (handle, path.Handle);
                }
-               
+
 #endregion
 
 #region Painting Methods
                public void Paint ()
                {
-                       NativeMethods.cairo_paint (state);
+                       NativeMethods.cairo_paint (handle);
                }
-               
+
                public void PaintWithAlpha (double alpha)
                {
-                       NativeMethods.cairo_paint_with_alpha (state, alpha);
+                       NativeMethods.cairo_paint_with_alpha (handle, alpha);
                }
-               
+
                public void Mask (Pattern pattern)
                {
-                       NativeMethods.cairo_mask (state, pattern.Pointer);
+                       NativeMethods.cairo_mask (handle, pattern.Handle);
                }
-               
+
                public void MaskSurface (Surface surface, double surface_x, double surface_y)
                {
-                       NativeMethods.cairo_mask_surface (state, surface.Handle, surface_x, surface_y);
+                       NativeMethods.cairo_mask_surface (handle, surface.Handle, surface_x, surface_y);
+               }
+
+               public void Stroke ()
+               {
+                       NativeMethods.cairo_stroke (handle);
+               }
+
+               public void StrokePreserve ()
+               {
+                       NativeMethods.cairo_stroke_preserve (handle);
                }
-               
-                public void Stroke ()
-                {
-                        NativeMethods.cairo_stroke (state);
-                }
-               
-                public void StrokePreserve ()
-                {
-                        NativeMethods.cairo_stroke_preserve (state);
-                }              
 
                public Rectangle StrokeExtents ()
                {
                        double x1, y1, x2, y2;
-                       NativeMethods.cairo_stroke_extents (state, out x1, out y1, out x2, out y2);
-                       return new Rectangle (x1, y1, x2, y2);
+                       NativeMethods.cairo_stroke_extents (handle, out x1, out y1, out x2, out y2);
+                       return new Rectangle (x1, y1, x2 - x1, y2 - y1);
                }
 
-                public void Fill ()
-                {
-                        NativeMethods.cairo_fill (state);
-                }
+               public void Fill ()
+               {
+                       NativeMethods.cairo_fill (handle);
+               }
 
-                public Rectangle FillExtents ()
+               public Rectangle FillExtents ()
                {
                        double x1, y1, x2, y2;
-                       NativeMethods.cairo_fill_extents (state, out x1, out y1, out x2, out y2);
-                       return new Rectangle (x1, y1, x2, y2);
+                       NativeMethods.cairo_fill_extents (handle, out x1, out y1, out x2, out y2);
+                       return new Rectangle (x1, y1, x2 - x1, y2 - y1);
                }
 
                public void FillPreserve ()
                {
-                       NativeMethods.cairo_fill_preserve (state);
+                       NativeMethods.cairo_fill_preserve (handle);
                }
 
 #endregion
 
-                public void Clip ()
-                {
-                        NativeMethods.cairo_clip (state);
-                }
+               public void Clip ()
+               {
+                       NativeMethods.cairo_clip (handle);
+               }
 
                public void ClipPreserve ()
                {
-                       NativeMethods.cairo_clip_preserve (state);
+                       NativeMethods.cairo_clip_preserve (handle);
                }
-               
+
                public void ResetClip ()
                {
-                       NativeMethods.cairo_reset_clip (state);
+                       NativeMethods.cairo_reset_clip (handle);
                }
-               
+
                public bool InStroke (double x, double y)
                {
-                       return NativeMethods.cairo_in_stroke (state, x, y);
+                       return NativeMethods.cairo_in_stroke (handle, x, y);
                }
 
                public bool InFill (double x, double y)
                {
-                       return NativeMethods.cairo_in_fill (state, x, y);
+                       return NativeMethods.cairo_in_fill (handle, x, y);
                }
 
                public Pattern PopGroup ()
                {
-                       return Pattern.Lookup (NativeMethods.cairo_pop_group (state));
+                       return Pattern.Lookup (NativeMethods.cairo_pop_group (handle), true);
                }
 
                public void PopGroupToSource ()
                {
-                       NativeMethods.cairo_pop_group_to_source (state);
+                       NativeMethods.cairo_pop_group_to_source (handle);
                }
 
                public void PushGroup ()
                {
-                       NativeMethods.cairo_push_group (state);
+                       NativeMethods.cairo_push_group (handle);
                }
 
                public void PushGroup (Content content)
                {
-                       NativeMethods.cairo_push_group_with_content (state, content);
+                       NativeMethods.cairo_push_group_with_content (handle, content);
                }
 
+               [Obsolete ("Use GetGroupTarget()")]
                public Surface GroupTarget {
                        get {
-                               IntPtr surface = NativeMethods.cairo_get_group_target (state);
-                               return Surface.LookupSurface (surface);
+                               return GetGroupTarget ();
                        }
                }
 
-                public void Rotate (double angle)
-                {
-                        NativeMethods.cairo_rotate (state, angle);
-                }
+               public Surface GetGroupTarget ()
+               {
+                       IntPtr surface = NativeMethods.cairo_get_group_target (handle);
+                       return Surface.Lookup (surface, false);
+               }
 
-                public void Scale (double sx, double sy)
-                {
-                        NativeMethods.cairo_scale (state, sx, sy);
-                }
+               public void Rotate (double angle)
+               {
+                       NativeMethods.cairo_rotate (handle, angle);
+               }
+
+               public void Scale (double sx, double sy)
+               {
+                       NativeMethods.cairo_scale (handle, sx, sy);
+               }
+
+               public void Translate (double tx, double ty)
+               {
+                       NativeMethods.cairo_translate (handle, tx, ty);
+               }
 
-                public void Translate (double tx, double ty)
-                {
-                        NativeMethods.cairo_translate (state, tx, ty);
-                }
-                
                public void Transform (Matrix m)
                {
-                       NativeMethods.cairo_transform (state, m);
+                       NativeMethods.cairo_transform (handle, m);
                }
-                       
-#region Methods that will become obsolete in the long term, after 1.2.5 becomes wildly available
-               
-               //[Obsolete("Use UserToDevice instead")]
+
+               [Obsolete("Use UserToDevice instead")]
                public void TransformPoint (ref double x, ref double y)
                {
-                       NativeMethods.cairo_user_to_device (state, ref x, ref y);
+                       NativeMethods.cairo_user_to_device (handle, ref x, ref y);
                }
-               
-               //[Obsolete("Use UserToDeviceDistance instead")]
-                public void TransformDistance (ref double dx, ref double dy) 
+
+               [Obsolete("Use UserToDeviceDistance instead")]
+               public void TransformDistance (ref double dx, ref double dy)
                {
-                       NativeMethods.cairo_user_to_device_distance (state, ref dx, ref dy);
+                       NativeMethods.cairo_user_to_device_distance (handle, ref dx, ref dy);
                }
-                       
-               //[Obsolete("Use InverseTransformPoint instead")]
+
+               [Obsolete("Use InverseTransformPoint instead")]
                public void InverseTransformPoint (ref double x, ref double y)
                {
-                       NativeMethods.cairo_device_to_user (state, ref x, ref y);
+                       NativeMethods.cairo_device_to_user (handle, ref x, ref y);
                }
 
-               //[Obsolete("Use DeviceToUserDistance instead")]
+               [Obsolete("Use DeviceToUserDistance instead")]
                public void InverseTransformDistance (ref double dx, ref double dy)
                {
-                       NativeMethods.cairo_device_to_user_distance (state, ref dx, ref dy);
+                       NativeMethods.cairo_device_to_user_distance (handle, ref dx, ref dy);
                }
-#endregion
-               
+
                public void UserToDevice (ref double x, ref double y)
                {
-                       NativeMethods.cairo_user_to_device (state, ref x, ref y);
+                       NativeMethods.cairo_user_to_device (handle, ref x, ref y);
                }
-               
-                public void UserToDeviceDistance (ref double dx, ref double dy) 
+
+               public void UserToDeviceDistance (ref double dx, ref double dy)
                {
-                       NativeMethods.cairo_user_to_device_distance (state, ref dx, ref dy);
+                       NativeMethods.cairo_user_to_device_distance (handle, ref dx, ref dy);
                }
-                       
+
                public void DeviceToUser (ref double x, ref double y)
                {
-                       NativeMethods.cairo_device_to_user (state, ref x, ref y);
+                       NativeMethods.cairo_device_to_user (handle, ref x, ref y);
                }
 
                public void DeviceToUserDistance (ref double dx, ref double dy)
                {
-                       NativeMethods.cairo_device_to_user_distance (state, ref dx, ref dy);
+                       NativeMethods.cairo_device_to_user_distance (handle, ref dx, ref dy);
                }
-               
-                public Cairo.Matrix Matrix {
-                        set {
-                                NativeMethods.cairo_set_matrix (state, value);
-                        }
 
-                        get {
+               public Matrix Matrix {
+                       set {
+                               NativeMethods.cairo_set_matrix (handle, value);
+                       }
+
+                       get {
                                Matrix m = new Matrix();
-                               NativeMethods.cairo_get_matrix (state, m);
-                                return m;
-                        }
-                }
+                               NativeMethods.cairo_get_matrix (handle, m);
+                               return m;
+                       }
+               }
 
                public void SetFontSize (double scale)
                {
-                       NativeMethods.cairo_set_font_size (state, scale);
+                       NativeMethods.cairo_set_font_size (handle, scale);
                }
 
                public void IdentityMatrix ()
                {
-                       NativeMethods.cairo_identity_matrix (state);
+                       NativeMethods.cairo_identity_matrix (handle);
                }
-               
+
                [Obsolete ("Use SetFontSize() instead.")]
                public void FontSetSize (double scale)
                {
@@ -741,23 +687,23 @@ namespace Cairo {
                public double FontSize {
                        set { SetFontSize (value); }
                }
-               
+
                public Matrix FontMatrix {
                        get {
                                Matrix m;
-                               NativeMethods.cairo_get_font_matrix (state, out m);
+                               NativeMethods.cairo_get_font_matrix (handle, out m);
                                return m;
                        }
-                       set { NativeMethods.cairo_set_font_matrix (state, value); }
+                       set { NativeMethods.cairo_set_font_matrix (handle, value); }
                }
 
                public FontOptions FontOptions {
                        get {
                                FontOptions options = new FontOptions ();
-                               NativeMethods.cairo_get_font_options (state, options.Handle);
+                               NativeMethods.cairo_get_font_options (handle, options.Handle);
                                return options;
                        }
-                       set { NativeMethods.cairo_set_font_options (state, value.Handle); }
+                       set { NativeMethods.cairo_set_font_options (handle, value.Handle); }
                }
 
                [StructLayout(LayoutKind.Sequential)]
@@ -787,7 +733,7 @@ namespace Cairo {
                        } else {
                                foreach (Glyph g in glyphs){
                                        NativeGlyph_4byte_longs n = new NativeGlyph_4byte_longs (g);
-                                       
+
                                        Marshal.StructureToPtr (n, (IntPtr)pos, false);
                                        pos += native_glyph_size;
                                }
@@ -796,52 +742,52 @@ namespace Cairo {
                        return dest;
                }
 
-                public void ShowGlyphs (Glyph[] glyphs)
+               public void ShowGlyphs (Glyph[] glyphs)
                {
-                        IntPtr ptr;
+                       IntPtr ptr;
 
-                        ptr = FromGlyphToUnManagedMemory (glyphs);
-                        
-                        NativeMethods.cairo_show_glyphs (state, ptr, glyphs.Length);
+                       ptr = FromGlyphToUnManagedMemory (glyphs);
 
-                        Marshal.FreeHGlobal (ptr);             
+                       NativeMethods.cairo_show_glyphs (handle, ptr, glyphs.Length);
+
+                       Marshal.FreeHGlobal (ptr);
                }
 
                [Obsolete("The matrix argument was never used, use ShowGlyphs(Glyphs []) instead")]
-                public void ShowGlyphs (Matrix matrix, Glyph[] glyphs)
-                {
+               public void ShowGlyphs (Matrix matrix, Glyph[] glyphs)
+               {
                        ShowGlyphs (glyphs);
-                }
+               }
 
                [Obsolete("The matrix argument was never used, use GlyphPath(Glyphs []) instead")]
-                public void GlyphPath (Matrix matrix, Glyph[] glyphs)
-                {
+               public void GlyphPath (Matrix matrix, Glyph[] glyphs)
+               {
                        GlyphPath (glyphs);
                }
 
                public void GlyphPath (Glyph[] glyphs)
                {
-                        IntPtr ptr;
+                       IntPtr ptr;
+
+                       ptr = FromGlyphToUnManagedMemory (glyphs);
 
-                        ptr = FromGlyphToUnManagedMemory (glyphs);
+                       NativeMethods.cairo_glyph_path (handle, ptr, glyphs.Length);
 
-                        NativeMethods.cairo_glyph_path (state, ptr, glyphs.Length);
+                       Marshal.FreeHGlobal (ptr);
 
-                        Marshal.FreeHGlobal (ptr);
+               }
 
-                }
+               public FontExtents FontExtents {
+                       get {
+                               FontExtents f_extents;
+                               NativeMethods.cairo_font_extents (handle, out f_extents);
+                               return f_extents;
+                       }
+               }
 
-                public FontExtents FontExtents {
-                        get {
-                                FontExtents f_extents;
-                                NativeMethods.cairo_font_extents (state, out f_extents);
-                                return f_extents;
-                        }
-                }
-               
                public void CopyPage ()
                {
-                       NativeMethods.cairo_copy_page (state);
+                       NativeMethods.cairo_copy_page (handle);
                }
 
                [Obsolete ("Use SelectFontFace() instead.")]
@@ -850,24 +796,34 @@ namespace Cairo {
                        SelectFontFace (family, slant, weight);
                }
 
+               [Obsolete("Use GetFontFace/SetFontFace")]
                public FontFace ContextFontFace {
                        get {
-                               return Cairo.FontFace.Lookup (NativeMethods.cairo_get_font_face (state));
+                               return GetContextFontFace ();
                        }
-
                        set {
-                               NativeMethods.cairo_set_font_face (state, value == null ? IntPtr.Zero : value.Handle);
+                               SetContextFontFace (value);
                        }
                }
-               
+
+               public FontFace GetContextFontFace ()
+               {
+                       return Cairo.FontFace.Lookup (NativeMethods.cairo_get_font_face (handle), false);
+               }
+
+               public void SetContextFontFace (FontFace value)
+               {
+                       NativeMethods.cairo_set_font_face (handle, value == null ? IntPtr.Zero : value.Handle);
+               }
+
                public void SelectFontFace (string family, FontSlant slant, FontWeight weight)
                {
-                       NativeMethods.cairo_select_font_face (state, family, slant, weight);
+                       NativeMethods.cairo_select_font_face (handle, family, slant, weight);
                }
 
                public void ShowPage ()
                {
-                       NativeMethods.cairo_show_page (state);
+                       NativeMethods.cairo_show_page (handle);
                }
 
                private static byte[] TerminateUtf8(byte[] utf8)
@@ -891,35 +847,35 @@ namespace Cairo {
 
                public void ShowText(string str)
                {
-                       NativeMethods.cairo_show_text(state, TerminateUtf8(str));
+                       NativeMethods.cairo_show_text (handle, TerminateUtf8(str));
                }
 
                public void ShowText(byte[] utf8)
                {
-                       NativeMethods.cairo_show_text(state, TerminateUtf8(utf8));
+                       NativeMethods.cairo_show_text (handle, TerminateUtf8(utf8));
                }
 
                public void TextPath(string str)
                {
-                       NativeMethods.cairo_text_path(state, TerminateUtf8(str));
+                       NativeMethods.cairo_text_path (handle, TerminateUtf8(str));
                }
 
                public void TextPath(byte[] utf8)
                {
-                       NativeMethods.cairo_text_path(state, TerminateUtf8(utf8));
+                       NativeMethods.cairo_text_path (handle, TerminateUtf8(utf8));
                }
 
                public TextExtents TextExtents(string s)
                {
                        TextExtents extents;
-                       NativeMethods.cairo_text_extents(state, TerminateUtf8(s), out extents);
+                       NativeMethods.cairo_text_extents (handle, TerminateUtf8(s), out extents);
                        return extents;
                }
 
                public TextExtents TextExtents(byte[] utf8)
                {
                        TextExtents extents;
-                       NativeMethods.cairo_text_extents(state, TerminateUtf8(utf8), out extents);
+                       NativeMethods.cairo_text_extents (handle, TerminateUtf8(utf8), out extents);
                        return extents;
                }
 
@@ -929,11 +885,11 @@ namespace Cairo {
 
                        TextExtents extents;
 
-                       NativeMethods.cairo_glyph_extents (state, ptr, glyphs.Length, out extents);
+                       NativeMethods.cairo_glyph_extents (handle, ptr, glyphs.Length, out extents);
 
                        Marshal.FreeHGlobal (ptr);
 
                        return extents;
                }
-        }
+       }
 }
index a2ae169e73221254baa6a586009239a889d5da79..afa57b7dff1f4b210e4d353c3227b28569dda0ef 100644 (file)
@@ -36,11 +36,8 @@ namespace Cairo {
                }
 
                public DirectFBSurface (IntPtr dfb, IntPtr dfb_surface)
+                       : base (NativeMethods.cairo_directfb_surface_create (dfb, dfb_surface), true)
                {
-                       surface = NativeMethods.cairo_directfb_surface_create (dfb, dfb_surface);
-                       lock (surfaces.SyncRoot) {
-                               surfaces [surface] = this;
-                       }
                }
        }
 }
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Distance.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Distance.cs
new file mode 100644 (file)
index 0000000..7cba372
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// Mono.Cairo.Context.cs
+//
+// Author:
+//   Duncan Mak (duncan@ximian.com)
+//   Miguel de Icaza (miguel@novell.com)
+//   Hisham Mardam Bey (hisham.mardambey@gmail.com)
+//   Alp Toker (alp@atoker.com)
+//
+// (C) Ximian Inc, 2003.
+// (C) Novell Inc, 2003.
+//
+// This is an OO wrapper API for the Cairo API.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Cairo {
+
+       public struct Distance
+       {
+               public Distance (double dx, double dy)
+               {
+                       this.dx = dx;
+                       this.dy = dy;
+               }
+
+               double dx, dy;
+               public double Dx {
+                       get { return dx; }
+                       set { dx = value; }
+               }
+
+               public double Dy {
+                       get { return dy; }
+                       set { dy = value; }
+               }
+       }
+}
index efa479b6d52dfd756d49abc84f23ca939ea892c6..19d8163c35fea4f0f8b9d17db74b6158d01a2f21 100644 (file)
@@ -38,42 +38,48 @@ namespace Cairo
        {
                IntPtr handle;
 
-               internal static FontFace Lookup (IntPtr handle)
+               internal static FontFace Lookup (IntPtr handle, bool owner)
                {
                        if (handle == IntPtr.Zero)
                                return null;
-
-                       NativeMethods.cairo_font_face_reference (handle);
-
-                       return new FontFace (handle);
+                       return new FontFace (handle, owner);
                }
 
                ~FontFace ()
                {
-                       // Since Cairo is not thread safe, we can not unref the
-                       // font_face here, the programmer must do this with Dispose
-
-                       Console.Error.WriteLine ("Programmer forgot to call Dispose on the FontFace");
                        Dispose (false);
                }
 
                public void Dispose ()
                {
                        Dispose (true);
+                       GC.SuppressFinalize (this);
                }
 
                protected virtual void Dispose (bool disposing)
                {
-                       if (disposing)
-                               NativeMethods.cairo_font_face_destroy (handle);
+                       if (!disposing || CairoDebug.Enabled)
+                               CairoDebug.OnDisposed<FontFace> (handle, disposing);
+
+                       if (!disposing|| handle == IntPtr.Zero)
+                               return;
+
+                       NativeMethods.cairo_font_face_destroy (handle);
                        handle = IntPtr.Zero;
-                       GC.SuppressFinalize (this);
                }
-               
-               // TODO: make non-public when all entry points are complete in binding
-               public FontFace (IntPtr handle)
+
+               [Obsolete]
+               public FontFace (IntPtr handle) : this (handle, true)
+               {
+               }
+
+               public FontFace (IntPtr handle, bool owned)
                {
                        this.handle = handle;
+                       if (!owned)
+                               NativeMethods.cairo_font_face_reference (handle);
+                       if (CairoDebug.Enabled)
+                               CairoDebug.OnAllocated (handle);
                }
 
                public IntPtr Handle {
index 476910f1b1d35396394f8c83430a0366139aa88f..5269d54dfac2ca504e8a29cf3c883292292fed00 100644 (file)
@@ -33,11 +33,9 @@ namespace Cairo
        public class FontOptions : IDisposable
        {
                IntPtr handle;
-               bool disposed;
 
-               public FontOptions ()
+               public FontOptions () : this (NativeMethods.cairo_font_options_create ())
                {
-                       handle = NativeMethods.cairo_font_options_create ();
                }
 
                ~FontOptions ()
@@ -48,6 +46,8 @@ namespace Cairo
                internal FontOptions (IntPtr handle)
                {
                        this.handle = handle;
+                       if (CairoDebug.Enabled)
+                               CairoDebug.OnAllocated (handle);
                }
 
                public FontOptions Copy ()
@@ -55,9 +55,10 @@ namespace Cairo
                        return new FontOptions (NativeMethods.cairo_font_options_copy (handle));
                }
 
+               [Obsolete ("Use Dispose()")]
                public void Destroy ()
                {
-                       NativeMethods.cairo_font_options_destroy (handle);
+                       Dispose ();
                }
 
                public void Dispose ()
@@ -66,13 +67,16 @@ namespace Cairo
                        GC.SuppressFinalize (this);
                }
 
-               private void Dispose (bool disposing)
+               protected virtual void Dispose (bool disposing)
                {
-                       if (!disposed) {
-                               Destroy ();
-                               handle = IntPtr.Zero;
-                       }
-                       disposed = true;
+                       if (!disposing || CairoDebug.Enabled)
+                               CairoDebug.OnDisposed<FontOptions> (handle, disposing);
+
+                       if (!disposing|| handle == IntPtr.Zero)
+                               return;
+
+                       NativeMethods.cairo_font_options_destroy (handle);
+                       handle = IntPtr.Zero;
                }
 
                public static bool operator == (FontOptions options, FontOptions other)
index a8cd700a532358aa181f78ab5cae56fec3e4db46..6da1ac6a934e78424b20d4f1fadf55eb6b6c59df 100644 (file)
@@ -36,11 +36,8 @@ namespace Cairo {
                }
 
                public GlitzSurface (IntPtr glitz_surface)
+                       : base (NativeMethods.cairo_glitz_surface_create (glitz_surface), true)
                {
-                       surface = NativeMethods.cairo_glitz_surface_create (glitz_surface);
-                       lock (surfaces.SyncRoot) {
-                               surfaces [surface] = this;
-                       }
                }
        }
 }
index c15980b071c2a5448a38ed8649eab093c5d5922d..0fb617e421fa7c092508982d140ad13b63197b72 100644 (file)
@@ -1,4 +1,4 @@
-//                                                   
+//
 // Mono.Cairo.Gradient.cs
 //
 // Author: Jordi Mas (jordi@ximian.com)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 using System;
 
 namespace Cairo {
-   
+
        public class Gradient : Pattern
        {
-               protected Gradient (IntPtr handle) : base (handle)
+               protected Gradient (IntPtr handle, bool owned) : base (handle, owned)
                {
                }
 
+               [Obsolete]
                protected Gradient ()
                {
                }
@@ -44,20 +45,20 @@ namespace Cairo {
                public int ColorStopCount {
                        get {
                                int cnt;
-                               NativeMethods.cairo_pattern_get_color_stop_count (pattern, out cnt);
+                               NativeMethods.cairo_pattern_get_color_stop_count (Handle, out cnt);
                                return cnt;
                        }
                }
 
-               public Status AddColorStop (double offset, Cairo.Color c)
+               public Status AddColorStop (double offset, Color c)
                {
-                       NativeMethods.cairo_pattern_add_color_stop_rgba (pattern, offset, c.R, c.G, c.B, c.A);
+                       NativeMethods.cairo_pattern_add_color_stop_rgba (Handle, offset, c.R, c.G, c.B, c.A);
                        return Status;
                }
 
-               public Status AddColorStopRgb (double offset, Cairo.Color c)
+               public Status AddColorStopRgb (double offset, Color c)
                {
-                       NativeMethods.cairo_pattern_add_color_stop_rgb (pattern, offset, c.R, c.G, c.B);
+                       NativeMethods.cairo_pattern_add_color_stop_rgb (Handle, offset, c.R, c.G, c.B);
                        return Status;
                }
        }
index 659833a7cc48918d8fedf74753724e713ce5dbd7..98143fe8e22543efeda94ddba4631f6ea29b1efd 100644 (file)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -37,60 +37,49 @@ using System.Runtime.InteropServices;
 
 namespace Cairo {
 
-        public class ImageSurface : Surface
-        {
+       public class ImageSurface : Surface
+       {
                internal ImageSurface (IntPtr handle, bool owns) : base (handle, owns)
                {
                }
 
                public ImageSurface (Format format, int width, int height)
+                       : base (NativeMethods.cairo_image_surface_create (format, width, height), true)
                {
-                       surface = NativeMethods.cairo_image_surface_create (format, width, height);
-                       lock (surfaces.SyncRoot){
-                               surfaces [surface] = this;
-                       }
                }
-               
+
                [Obsolete ("Use ImageSurface (byte[] data, Cairo.Format format, int width, int height, int stride)")]
-               public ImageSurface (ref byte[] data, Cairo.Format format, int width, int height, int stride) :this (data, format, width, height, stride)
+               public ImageSurface (ref byte[] data, Cairo.Format format, int width, int height, int stride)
+                       : this (data, format, width, height, stride)
                {
                }
 
-               public ImageSurface (byte[] data, Cairo.Format format, int width, int height, int stride)
+               public ImageSurface (byte[] data, Format format, int width, int height, int stride)
+                       : base (NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride), true)
                {
-                       surface = NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride);
-                       lock (surfaces.SyncRoot){
-                               surfaces [surface] = this;
-                       }
                }
 
-               public ImageSurface (IntPtr data, Cairo.Format format, int width, int height, int stride)
+               public ImageSurface (IntPtr data, Format format, int width, int height, int stride)
+                       : base (NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride), true)
                {
-                       surface = NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride);
-                       lock (surfaces.SyncRoot){
-                               surfaces [surface] = this;
-                       }
                }
-               
+
                public ImageSurface (string filename)
+                       : base (NativeMethods.cairo_image_surface_create_from_png (filename), true)
                {
-                       surface = NativeMethods.cairo_image_surface_create_from_png (filename);
-                       lock (surfaces.SyncRoot){
-                               surfaces [surface] = this;
-                       }
                }
-               
+
                public int Width {
-                       get { return NativeMethods.cairo_image_surface_get_width (surface); }
+                       get { return NativeMethods.cairo_image_surface_get_width (Handle); }
                }
-               
+
                public int Height {
-                       get { return NativeMethods.cairo_image_surface_get_height (surface); }
+                       get { return NativeMethods.cairo_image_surface_get_height (Handle); }
                }
-               
+
                public byte[] Data {
                        get {
-                               IntPtr ptr = NativeMethods.cairo_image_surface_get_data (surface);
+                               IntPtr ptr = NativeMethods.cairo_image_surface_get_data (Handle);
                                int length = Height * Stride;
                                byte[] data = new byte[length];
                                Marshal.Copy (ptr, data, 0, length);
@@ -100,16 +89,16 @@ namespace Cairo {
 
                public IntPtr DataPtr {
                        get {
-                               return NativeMethods.cairo_image_surface_get_data (surface);
+                               return NativeMethods.cairo_image_surface_get_data (Handle);
                        }
                }
 
                public Format Format {
-                       get { return NativeMethods.cairo_image_surface_get_format (surface); }
+                       get { return NativeMethods.cairo_image_surface_get_format (Handle); }
                }
 
                public int Stride {
-                       get { return NativeMethods.cairo_image_surface_get_stride (surface); }
+                       get { return NativeMethods.cairo_image_surface_get_stride (Handle); }
                }
        }
 }
index 58d8e21ab8a8024a50362e0a461ce926b339b776..85fdea84a2c53c4252576db7c424c7532b6d3d54 100644 (file)
@@ -1,4 +1,4 @@
-//                                                   
+//
 // Mono.Cairo.LinearGradient.cs
 //
 // Author: Jordi Mas (jordi@ximian.com)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 using System;
 
 namespace Cairo {
-   
+
        public class LinearGradient : Gradient
        {
-               internal LinearGradient (IntPtr handle) : base (handle)
+               internal LinearGradient (IntPtr handle, bool owned) : base (handle, owned)
                {
                }
 
                public LinearGradient (double x0, double y0, double x1, double y1)
+                       : base (NativeMethods.cairo_pattern_create_linear (x0, y0, x1, y1), true)
                {
-                       pattern = NativeMethods.cairo_pattern_create_linear (x0, y0, x1, y1);
                }
 
                public PointD[] LinearPoints {
-                        get {
+                       get {
                                double x0, y0, x1, y1;
                                PointD[] points = new PointD [2];
 
-                               NativeMethods.cairo_pattern_get_linear_points (pattern, out x0, out y0, out x1, out y1);
+                               NativeMethods.cairo_pattern_get_linear_points (Handle, out x0, out y0, out x1, out y1);
 
                                points[0] = new PointD (x0, y0);
                                points[1] = new PointD (x1, y1);
                                return points;
-                        }
-                }
-
+                       }
+               }
        }
 }
 
index 79e1f359e1dd35db9b18688311ddf22e3371c025..83ffce49d2b2663c06239614fbf12535fd2546fd 100644 (file)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -36,110 +36,110 @@ using System.Runtime.InteropServices;
 
 namespace Cairo {
 
-       [StructLayout(LayoutKind.Sequential)]
-        public class Matrix : ICloneable
-        {              
+       [StructLayout(LayoutKind.Sequential)]
+       public class Matrix : ICloneable
+       {
                public double Xx;
                public double Yx;
-               public double Xy; 
+               public double Xy;
                public double Yy;
-               public double X0; 
+               public double X0;
                public double Y0;
 
                public Matrix (double xx, double yx, double xy, double yy,
                                double x0, double y0)
-               {               
+               {
                        this.Xx = xx; this.Yx = yx; this.Xy = xy;
                        this.Yy = yy; this.X0 = x0; this.Y0 = y0;
                }
-                
-                public Matrix ()
+
+               public Matrix ()
                {
                        this.InitIdentity ();
                }
-               
+
                public bool IsIdentity ()
                {
                        return (this == new Matrix ());
                }
-                       
-                public void InitIdentity ()
-                {
-                       // this.Init(1,0,0,1,0,0);
-                       NativeMethods.cairo_matrix_init_identity (this);
-                }
-               
+
+               public void InitIdentity ()
+               {
+                       // this.Init(1,0,0,1,0,0);
+                       NativeMethods.cairo_matrix_init_identity (this);
+               }
+
                public void Init (double xx, double yx, double xy, double yy,
                                  double x0, double y0)
                {
                        this.Xx = xx; this.Yx = yx; this.Xy = xy;
                        this.Yy = yy; this.X0 = x0; this.Y0 = y0;
                }
-               
+
                public void InitTranslate (double tx, double ty)
-               {               
+               {
                        //this.Init (1, 0, 0, 1, tx, ty);
                        NativeMethods.cairo_matrix_init_translate (this, tx, ty);
-               }               
-                                              
+               }
+
                public void Translate (double tx, double ty)
                {
                        NativeMethods.cairo_matrix_translate (this, tx, ty);
                }
-               
-                public void InitScale (double sx, double sy)
-                {
+
+               public void InitScale (double sx, double sy)
+               {
                        //this.Init (sx, 0, 0, sy, 0, 0);
-                       NativeMethods.cairo_matrix_init_scale (this, sx, sy);
-                }              
-               
-                public void Scale (double sx, double sy)
-                {
+                       NativeMethods.cairo_matrix_init_scale (this, sx, sy);
+               }
+
+               public void Scale (double sx, double sy)
+               {
                        NativeMethods.cairo_matrix_scale (this, sx, sy);
-                }
-
-                public void InitRotate (double radians)
-                {
-                       /*
-                       double s, c;
-                       s = Math.Sin (radians);
-                       c = Math.Cos (radians);
-                       this.Init (c, s, -s, c, 0, 0);
-                       */
-                       NativeMethods.cairo_matrix_init_rotate (this, radians);
-                }              
-               
-                public void Rotate (double radians)
-                {
+               }
+
+               public void InitRotate (double radians)
+               {
+                       /*
+                       double s, c;
+                       s = Math.Sin (radians);
+                       c = Math.Cos (radians);
+                       this.Init (c, s, -s, c, 0, 0);
+                       */
+                       NativeMethods.cairo_matrix_init_rotate (this, radians);
+               }
+
+               public void Rotate (double radians)
+               {
                        NativeMethods.cairo_matrix_rotate (this, radians);
-                }
+               }
 
-                public Cairo.Status Invert ()
-                {
+               public Cairo.Status Invert ()
+               {
                        return NativeMethods.cairo_matrix_invert (this);
-                }
+               }
 
                public void Multiply (Matrix b)
                {
                        Matrix a = (Matrix) this.Clone ();
                        NativeMethods.cairo_matrix_multiply (this, a, b);
                }
-               
+
                public static Matrix Multiply (Matrix a, Matrix b) {
                        Matrix result = new Matrix ();
                        NativeMethods.cairo_matrix_multiply (result, a, b);
                        return result;
                }
-                       
-               
-                public void TransformDistance (ref double dx, ref double dy)
+
+
+               public void TransformDistance (ref double dx, ref double dy)
                {
-                        NativeMethods.cairo_matrix_transform_distance (this, ref dx, ref dy);
-                }
+                       NativeMethods.cairo_matrix_transform_distance (this, ref dx, ref dy);
+               }
 
-                public void TransformPoint (ref double x, ref double y)
-                {
-                        NativeMethods.cairo_matrix_transform_point (this, ref x, ref y);
+               public void TransformPoint (ref double x, ref double y)
+               {
+                       NativeMethods.cairo_matrix_transform_point (this, ref x, ref y);
                }
 
                public override String ToString ()
@@ -148,7 +148,7 @@ namespace Cairo {
                                this.Xx, this.Yx, this.Xy, this.Yy, this.X0, this.Y0);
                        return s;
                }
-               
+
                public static bool operator == (Matrix lhs, Matrix rhs)
                {
                        return (lhs.Xx == rhs.Xx &&
@@ -158,14 +158,14 @@ namespace Cairo {
                                lhs.X0 == rhs.X0 &&
                                lhs.Y0 == rhs.Y0 );
                }
-               
+
                public static bool operator != (Matrix lhs, Matrix rhs)
                {
-                       return !(lhs==rhs);     
+                       return !(lhs==rhs);
                }
-               
-               
-               
+
+
+
                public override bool Equals(object o)
                {
                        if (! (o is Matrix))
@@ -173,7 +173,7 @@ namespace Cairo {
                        else
                                return (this == (Matrix) o);
                }
-               
+
                public override int GetHashCode()
                {
                        return  (int)this.Xx ^ (int)this.Xx>>32 ^
@@ -183,11 +183,11 @@ namespace Cairo {
                                (int)this.X0 ^ (int)this.X0>>32 ^
                                (int)this.Y0 ^ (int)this.Y0>>32;
                }
-               
+
                public object Clone()
                {
                        return this.MemberwiseClone ();
                }
-               
-        }
+
+       }
 }
index 855c282f6aa6f229802183f503af013ecdec416b..c53f0009c0019c37312a8f0bc1517fc60665ee71 100644 (file)
@@ -36,8 +36,8 @@ using System.Runtime.InteropServices;
 
 namespace Cairo
 {
-       // sort these so it is easier to find what is missing
-       // http://www.cairographics.org/manual/ix01.html
+       // sort the functions like in the following page so it is easier to find what is missing
+       // http://cairographics.org/manual/index-all.html
 
        internal static class NativeMethods
        {
@@ -86,9 +86,6 @@ namespace Cairo
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern IntPtr cairo_create (IntPtr target);
 
-               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern uint cairo_get_reference_count (IntPtr surface);
-               
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_curve_to (IntPtr cr, double x1, double y1, double x2, double y2, double x3, double y3);
                
@@ -240,6 +237,9 @@ namespace Cairo
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern Operator cairo_get_operator (IntPtr cr);
                
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern uint cairo_get_reference_count (IntPtr surface);
+
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern IntPtr cairo_get_source (IntPtr cr);
                
@@ -292,9 +292,6 @@ namespace Cairo
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern int cairo_image_surface_get_width  (IntPtr surface);
 
-               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern uint cairo_surface_get_reference_count (IntPtr surface);
-               
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                [return: MarshalAs (UnmanagedType.U1)]
                internal static extern bool cairo_in_fill (IntPtr cr, double x, double y);
@@ -453,10 +450,10 @@ namespace Cairo
                //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                //internal static extern IntPtr cairo_ps_surface_create_for_stream (string filename, double width, double height);
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern void cairo_ps_surface_begin_page_setup (IntPtr surface);
+               internal static extern void cairo_ps_surface_dsc_begin_page_setup (IntPtr surface);
                
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               internal static extern void cairo_ps_surface_begin_setup (IntPtr surface);
+               internal static extern void cairo_ps_surface_dsc_begin_setup (IntPtr surface);
                
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_ps_surface_dsc_comment (IntPtr surface, string comment);
@@ -485,6 +482,75 @@ namespace Cairo
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_reference (IntPtr cr);
                
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern bool cairo_region_contains_point (IntPtr region, int x, int y);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern RegionOverlap cairo_region_contains_rectangle (IntPtr region, ref RectangleInt rectangle);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern IntPtr cairo_region_copy (IntPtr original);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern IntPtr cairo_region_create ();
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern IntPtr cairo_region_create_rectangle (ref RectangleInt rect);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern IntPtr cairo_region_create_rectangles (RectangleInt[] rects, int count);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern void cairo_region_destroy (IntPtr region);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern bool cairo_region_equal (IntPtr a, IntPtr b);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern void cairo_region_get_extents (IntPtr region, out RectangleInt extents);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern void cairo_region_get_rectangle (IntPtr region, int nth, out RectangleInt rectangle);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern Status cairo_region_intersect (IntPtr dst, IntPtr other);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern Status cairo_region_intersect_rectangle (IntPtr dst, ref RectangleInt rectangle);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern bool cairo_region_is_empty (IntPtr region);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern int cairo_region_num_rectangles (IntPtr region);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern IntPtr cairo_region_reference (IntPtr region);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern Status cairo_region_status (IntPtr region);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern Status cairo_region_subtract (IntPtr dst, IntPtr other);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern Status cairo_region_subtract_rectangle (IntPtr dst, ref RectangleInt rectangle);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern void cairo_region_translate (IntPtr region, int dx, int dy);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern Status cairo_region_union (IntPtr dst, IntPtr other);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern Status cairo_region_union_rectangle (IntPtr dst, ref RectangleInt rectangle);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern Status cairo_region_xor (IntPtr dst, IntPtr other);
+
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern Status cairo_region_xor_rectangle (IntPtr dst, ref RectangleInt rectangle);
+
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_rel_curve_to (IntPtr cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3);
                
@@ -667,6 +733,9 @@ namespace Cairo
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_surface_get_font_options (IntPtr surface, IntPtr FontOptions);
 
+               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+               internal static extern uint cairo_surface_get_reference_count (IntPtr surface);
+
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern SurfaceType cairo_surface_get_type (IntPtr surface);
                
index 1304be6230a295fa69dd921dc5edf431ba3d6767..9d6b73be68996272d7251ab88e8189288070bf56 100644 (file)
@@ -37,31 +37,28 @@ namespace Cairo {
                }
 
                public PSSurface (string filename, double width, double height)
+                       : base (NativeMethods.cairo_ps_surface_create (filename, width, height), true)
                {
-                       surface = NativeMethods.cairo_ps_surface_create (filename, width, height);
-                       lock (surfaces.SyncRoot){
-                               surfaces [surface] = this;
-                       }
                }
 
                public void BeginPageSetup ()
                {
-                       NativeMethods.cairo_ps_surface_begin_page_setup (surface);
+                       NativeMethods.cairo_ps_surface_dsc_begin_page_setup (Handle);
                }
 
                public void BeginSetup ()
                {
-                       NativeMethods.cairo_ps_surface_begin_setup (surface);
+                       NativeMethods.cairo_ps_surface_dsc_begin_setup (Handle);
                }
 
                public void DscComment (string comment)
                {
-                       NativeMethods.cairo_ps_surface_dsc_comment (surface, comment);
+                       NativeMethods.cairo_ps_surface_dsc_comment (Handle, comment);
                }
 
                public void SetSize (double width, double height)
                {
-                       NativeMethods.cairo_ps_surface_set_size (surface, width, height);
+                       NativeMethods.cairo_ps_surface_set_size (Handle, width, height);
                }
        }
 }
index 97cfb8e2862f1ed297ce5af26a63520ab9d6a89a..184c606cf3470b851e09c0c51de29ea8f7972d95 100644 (file)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -34,13 +34,15 @@ using Cairo;
 
 namespace Cairo {
 
-        public class Path : IDisposable 
-        {
-                internal IntPtr handle = IntPtr.Zero;
-               
+       public class Path : IDisposable
+       {
+               IntPtr handle = IntPtr.Zero;
+
                internal Path (IntPtr handle)
                {
                        this.handle = handle;
+                       if (CairoDebug.Enabled)
+                               CairoDebug.OnAllocated (handle);
                }
 
                ~Path ()
@@ -48,25 +50,24 @@ namespace Cairo {
                        Dispose (false);
                }
 
-               
+               public IntPtr Handle { get { return handle; } }
+
                public void Dispose ()
                {
                        Dispose (true);
                        GC.SuppressFinalize (this);
                }
-               
-                protected virtual void Dispose (bool disposing)
-                {
-                       if (!disposing){
-                               Console.Error.WriteLine ("Cairo.Context: called from finalization thread, programmer is missing a call to Dispose");
-                               return;
-                       }
-                       
-                       if (handle == IntPtr.Zero)
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (!disposing || CairoDebug.Enabled)
+                               CairoDebug.OnDisposed<Path> (handle, disposing);
+
+                       if (!disposing|| handle == IntPtr.Zero)
                                return;
 
-                        NativeMethods.cairo_path_destroy (handle);
+                       NativeMethods.cairo_path_destroy (handle);
                        handle = IntPtr.Zero;
-                }
-        }
+               }
+       }
 }
index ebe4b70eaf5f3e8b3585f1f17240753d0d21acc5..bc0a962a218d59d5ff42a45289a56e7c2f5c8f40 100644 (file)
@@ -1,4 +1,4 @@
-//                                                   
+//
 // Mono.Cairo.Pattern.cs
 //
 // Author: Jordi Mas (jordi@ximian.com)
@@ -32,116 +32,124 @@ using System.Collections;
 
 namespace Cairo {
    
-        public class Pattern : IDisposable
-        {
-                protected IntPtr pattern = IntPtr.Zero;
+       public class Pattern : IDisposable
+       {
+               [Obsolete]
+               protected IntPtr pattern = IntPtr.Zero;
 
-               internal static Pattern Lookup (IntPtr pattern)
+               public static Pattern Lookup (IntPtr pattern, bool owner)
                {
                        if (pattern == IntPtr.Zero)
                                return null;
-
-                       object x = patterns [pattern];
-                       if (x != null)
-                               return (Pattern) x;
                        
                        PatternType pt = NativeMethods.cairo_pattern_get_type (pattern);
                        switch (pt) {
                        case PatternType.Solid:
-                               return new SolidPattern (pattern);
+                               return new SolidPattern (pattern, owner);
                        case PatternType.Surface:
-                               return new SurfacePattern (pattern);
+                               return new SurfacePattern (pattern, owner);
                        case PatternType.Linear:
-                               return new LinearGradient (pattern);
+                               return new LinearGradient (pattern, owner);
                        case PatternType.Radial:
-                               return new RadialGradient (pattern);
+                               return new RadialGradient (pattern, owner);
                        default:
-                               return new Pattern (pattern);
+                               return new Pattern (pattern, owner);
                        }
                }
-               
-                protected Pattern ()
-                {
-                }
 
-               static Hashtable patterns = new Hashtable ();
+               [Obsolete]
+               protected Pattern ()
+               {
+               }
                
-               internal Pattern (IntPtr ptr)
+               internal Pattern (IntPtr handle, bool owned)
                {
-                       lock (patterns){
-                               patterns [ptr] = this;
-                       }
-                       pattern = ptr;
+                       Handle = handle;
+                       if (!owned)
+                               NativeMethods.cairo_pattern_reference (handle);
+                       if (CairoDebug.Enabled)
+                               CairoDebug.OnAllocated (handle);
                }
 
                ~Pattern ()
                {
+                       Dispose (false);
                }
                
-                [Obsolete ("Use the SurfacePattern constructor")]
-                public Pattern (Surface surface)
-                {
-                        pattern = NativeMethods.cairo_pattern_create_for_surface (surface.Handle);
-                }
+               [Obsolete ("Use the SurfacePattern constructor")]
+               public Pattern (Surface surface)
+                       : this ( NativeMethods.cairo_pattern_create_for_surface (surface.Handle), true)
+               {
+               }
                
-                protected void Reference ()
-                {
-                        NativeMethods.cairo_pattern_reference (pattern);
-                }
+               [Obsolete]
+               protected void Reference ()
+               {
+                       NativeMethods.cairo_pattern_reference (pattern);
+               }
 
                public void Dispose ()
                {
                        Dispose (true);
+                       GC.SuppressFinalize (this);
                }
 
                protected virtual void Dispose (bool disposing)
                {
-                       if (disposing)
-                               Destroy ();
-                       GC.SuppressFinalize (this);
+                       if (!disposing || CairoDebug.Enabled)
+                               CairoDebug.OnDisposed<Pattern> (Handle, disposing);
+
+                       if (!disposing|| Handle == IntPtr.Zero)
+                               return;
+
+                       NativeMethods.cairo_pattern_destroy (Handle);
+                       Handle = IntPtr.Zero;
                }
-               
-                public void Destroy ()
-                {
-                       if (pattern != IntPtr.Zero){
-                               NativeMethods.cairo_pattern_destroy (pattern);
-                               pattern = IntPtr.Zero;
-                       }
-                       lock (patterns){
-                               patterns.Remove (this);
-                       }
-                }
-               
+
+               [Obsolete ("Use Dispose()")]
+               public void Destroy ()
+               {
+                       Dispose ();
+               }
+
                public Status Status
                {
-                       get { return NativeMethods.cairo_pattern_status (pattern); }
+                       get { return NativeMethods.cairo_pattern_status (Handle); }
                }
 
                public Extend Extend
                {
-                       get { return NativeMethods.cairo_pattern_get_extend (pattern); }
-                       set { NativeMethods.cairo_pattern_set_extend (pattern, value); }
+                       get { return NativeMethods.cairo_pattern_get_extend (Handle); }
+                       set { NativeMethods.cairo_pattern_set_extend (Handle, value); }
                }
-       
-                public Matrix Matrix {
-                        set { 
-                               NativeMethods.cairo_pattern_set_matrix (pattern, value);
+
+               public Matrix Matrix {
+                       set {
+                               NativeMethods.cairo_pattern_set_matrix (Handle, value);
                        }
 
-                        get {
+                       get {
                                Matrix m = new Matrix ();
-                               NativeMethods.cairo_pattern_get_matrix (pattern, m);
+                               NativeMethods.cairo_pattern_get_matrix (Handle, m);
                                return m;
-                        }
-                }
+                       }
+               }
 
-                public IntPtr Pointer {
-                        get { return pattern; }
-                }              
+#pragma warning disable 612
+               public IntPtr Handle {
+                       get { return pattern; }
+                       private set { pattern = value; }
+               }
+#pragma warning restore 612
+
+               [Obsolete]
+               public IntPtr Pointer {
+                       get { return pattern; }
+               }
 
                public PatternType PatternType {
-                       get { return NativeMethods.cairo_pattern_get_type (pattern); }
+                       get { return NativeMethods.cairo_pattern_get_type (Handle); }
                }
-        }
+       }
 }
 
index f3a184bb5a764f48cb4e75588e31307676d50eca..c980f249ed06ae2626cb83c9e565498d11b82fbc 100644 (file)
@@ -37,16 +37,13 @@ namespace Cairo {
                }
 
                public PdfSurface (string filename, double width, double height)
+                       : base (NativeMethods.cairo_pdf_surface_create (filename, width, height), true)
                {
-                       surface = NativeMethods.cairo_pdf_surface_create (filename, width, height);
-                       lock (surfaces.SyncRoot){
-                               surfaces [surface] = this;
-                       }
                }
 
                public void SetSize (double width, double height)
                {
-                       NativeMethods.cairo_pdf_surface_set_size (surface, width, height);
+                       NativeMethods.cairo_pdf_surface_set_size (Handle, width, height);
                }
        }
 }
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Point.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Point.cs
new file mode 100644 (file)
index 0000000..e72ca6c
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// Mono.Cairo.Context.cs
+//
+// Author:
+//   Duncan Mak (duncan@ximian.com)
+//   Miguel de Icaza (miguel@novell.com)
+//   Hisham Mardam Bey (hisham.mardambey@gmail.com)
+//   Alp Toker (alp@atoker.com)
+//
+// (C) Ximian Inc, 2003.
+// (C) Novell Inc, 2003.
+//
+// This is an OO wrapper API for the Cairo API.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Cairo {
+       public struct Point
+       {
+               public Point (int x, int y)
+               {
+                       this.x = x;
+                       this.y = y;
+               }
+
+               int x, y;
+               public int X {
+                       get { return x; }
+                       set { x = value; }
+               }
+
+               public int Y {
+                       get { return y; }
+                       set { y = value; }
+               }
+       }
+}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/PointD.cs b/mcs/class/Mono.Cairo/Mono.Cairo/PointD.cs
new file mode 100644 (file)
index 0000000..c2e3587
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// Mono.Cairo.Context.cs
+//
+// Author:
+//   Duncan Mak (duncan@ximian.com)
+//   Miguel de Icaza (miguel@novell.com)
+//   Hisham Mardam Bey (hisham.mardambey@gmail.com)
+//   Alp Toker (alp@atoker.com)
+//
+// (C) Ximian Inc, 2003.
+// (C) Novell Inc, 2003.
+//
+// This is an OO wrapper API for the Cairo API.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Cairo {
+
+       public struct PointD
+       {
+               public PointD (double x, double y)
+               {
+                       this.x = x;
+                       this.y = y;
+               }
+
+               double x, y;
+               public double X {
+                       get { return x; }
+                       set { x = value; }
+               }
+
+               public double Y {
+                       get { return y; }
+                       set { y = value; }
+               }
+       }
+}
index df9c329057dd71107b2ff1004f6bd90c42d041d3..6422e00d6e4e778219c400072ba8cf5136353185 100644 (file)
@@ -1,4 +1,4 @@
-//                                                   
+//
 // Mono.Cairo.Pattern.cs
 //
 // Author: Jordi Mas (jordi@ximian.com)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 using System;
 
 namespace Cairo {
-   
+
        public class RadialGradient : Gradient
        {
-               internal RadialGradient (IntPtr handle) : base (handle)
+               internal RadialGradient (IntPtr handle, bool owned) : base (handle, owned)
                {
                }
 
                public RadialGradient (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
+                       : base (NativeMethods.cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1), true)
                {
-                       pattern = NativeMethods.cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1);
                }
        }
 }
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Region.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Region.cs
new file mode 100644 (file)
index 0000000..cd0ba33
--- /dev/null
@@ -0,0 +1,196 @@
+// Copyright (C) 2011 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace Cairo
+{
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct RectangleInt {
+               public int X;
+               public int Y;
+               public int Width;
+               public int Height;
+       }
+
+       public enum RegionOverlap {
+               In,
+               Out,
+               Part,
+       }
+
+       public class Region : IDisposable {
+
+               IntPtr handle;
+               public IntPtr Handle {
+                       get { return handle; }
+               }
+
+               [Obsolete]
+               public Region (IntPtr handle) : this (handle, false) {}
+
+               public Region (IntPtr handle, bool owned)
+               {
+                       this.handle = handle;
+                       if (!owned)
+                               NativeMethods.cairo_region_reference (handle);
+                       if (CairoDebug.Enabled)
+                               CairoDebug.OnAllocated (handle);
+               }
+
+               public Region () : this (NativeMethods.cairo_region_create () , true)
+               {
+               }
+
+               public Region (RectangleInt rect)
+               {
+                       handle = NativeMethods.cairo_region_create_rectangle (ref rect);
+               }
+
+               public Region (RectangleInt[] rects)
+               {
+                       handle = NativeMethods.cairo_region_create_rectangles (rects, rects.Length);
+               }
+
+               public Region Copy ()
+               {
+                       return new Region (NativeMethods.cairo_region_copy (Handle), true);
+               }
+
+               ~Region ()
+               {
+                       Dispose (false);
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (!disposing || CairoDebug.Enabled)
+                               CairoDebug.OnDisposed<Region> (handle, disposing);
+
+                       if (!disposing|| handle == IntPtr.Zero)
+                               return;
+
+                       NativeMethods.cairo_region_destroy (Handle);
+                       handle = IntPtr.Zero;
+               }
+
+               public override bool Equals (object obj)
+               {
+                       return (obj is Region) && NativeMethods.cairo_region_equal (Handle, (obj as Region).Handle);
+               }
+
+               public override int GetHashCode ()
+               {
+                       return Handle.GetHashCode ();
+               }
+
+               public Status Status {
+                       get { return NativeMethods.cairo_region_status (Handle); }
+               }
+
+               public RectangleInt Extents {
+                       get {
+                               RectangleInt result;
+                               NativeMethods.cairo_region_get_extents (Handle, out result);
+                               return result;
+                       }
+               }
+
+               public int NumRectangles {
+                       get { return NativeMethods.cairo_region_num_rectangles (Handle); }
+               }
+
+               public RectangleInt GetRectangle (int nth)
+               {
+                       RectangleInt val;
+                       NativeMethods.cairo_region_get_rectangle (Handle, nth, out val);
+                       return val;
+               }
+
+               public bool IsEmpty {
+                       get { return NativeMethods.cairo_region_is_empty (Handle); }
+               }
+
+               public RegionOverlap ContainsPoint (RectangleInt rectangle)
+               {
+                       return NativeMethods.cairo_region_contains_rectangle (Handle, ref rectangle);
+               }
+
+               public bool ContainsPoint (int x, int y)
+               {
+                       return NativeMethods.cairo_region_contains_point (Handle, x, y);
+               }
+
+               public void Translate (int dx, int dy)
+               {
+                       NativeMethods.cairo_region_translate (Handle, dx, dy);
+               }
+
+               public Status Subtract (Region other)
+               {
+                       return NativeMethods.cairo_region_subtract (Handle, other.Handle);
+               }
+
+               public Status SubtractRectangle (RectangleInt rectangle)
+               {
+                       return NativeMethods.cairo_region_subtract_rectangle (Handle, ref rectangle);
+               }
+
+               public Status Intersect (Region other)
+               {
+                       return NativeMethods.cairo_region_intersect (Handle, other.Handle);
+               }
+
+               public Status IntersectRectangle (RectangleInt rectangle)
+               {
+                       return NativeMethods.cairo_region_intersect_rectangle (Handle, ref rectangle);
+               }
+
+               public Status Union (Region other)
+               {
+                       return NativeMethods.cairo_region_union (Handle, other.Handle);
+               }
+
+               public Status UnionRectangle (RectangleInt rectangle)
+               {
+                       return NativeMethods.cairo_region_union_rectangle (Handle, ref rectangle);
+               }
+
+               public Status Xor (Region other)
+               {
+                       return NativeMethods.cairo_region_xor (Handle, other.Handle);
+               }
+
+               public Status XorRectangle (RectangleInt rectangle)
+               {
+                       return NativeMethods.cairo_region_xor_rectangle (Handle, ref rectangle);
+               }
+       }
+}
index 2b0f6cf0c5fb5a8a6cb9f223e4022b815741e458..937194607af414e35fbb5ee6a0b80b02a7949c07 100644 (file)
@@ -32,14 +32,18 @@ namespace Cairo {
        {
                protected IntPtr handle = IntPtr.Zero;
 
-               internal ScaledFont (IntPtr handle)
+               internal ScaledFont (IntPtr handle, bool owner)
                {
                        this.handle = handle;
+                       if (!owner)
+                               NativeMethods.cairo_scaled_font_reference (handle);
+                       if (CairoDebug.Enabled)
+                               CairoDebug.OnAllocated (handle);
                }
 
                public ScaledFont (FontFace fontFace, Matrix matrix, Matrix ctm, FontOptions options)
+                       : this (NativeMethods.cairo_scaled_font_create (fontFace.Handle, matrix, ctm, options.Handle), true)
                {
-                       handle = NativeMethods.cairo_scaled_font_create (fontFace.Handle, matrix, ctm, options.Handle);
                }
 
                ~ScaledFont ()
@@ -47,19 +51,19 @@ namespace Cairo {
                        Dispose (false);
                }
 
-                public IntPtr Handle {
-                        get {
-                                return handle;
-                        }
-                }
+               public IntPtr Handle {
+                       get {
+                               return handle;
+                       }
+               }
 
                public FontExtents FontExtents {
-                        get {
-                                FontExtents extents;
-                                NativeMethods.cairo_scaled_font_extents (handle, out extents);
-                                return extents;
-                        }
-                }
+                       get {
+                               FontExtents extents;
+                               NativeMethods.cairo_scaled_font_extents (handle, out extents);
+                               return extents;
+                       }
+               }
 
                public Matrix FontMatrix {
                        get {
@@ -99,16 +103,21 @@ namespace Cairo {
 
                protected virtual void Dispose (bool disposing)
                {
-                       if (disposing) {
-                               NativeMethods.cairo_scaled_font_destroy (handle);
-                               handle = IntPtr.Zero;
-                       }
+                       if (!disposing || CairoDebug.Enabled)
+                               CairoDebug.OnDisposed<ScaledFont> (handle, disposing);
+
+                       if (!disposing|| handle == IntPtr.Zero)
+                               return;
+
+                       NativeMethods.cairo_scaled_font_destroy (handle);
+                       handle = IntPtr.Zero;
+               }
+
+               [Obsolete]
+               protected void Reference ()
+               {
+                       NativeMethods.cairo_scaled_font_reference (handle);
                }
-               
-                protected void Reference ()
-                {
-                        NativeMethods.cairo_scaled_font_reference (handle);
-                }
        }
 }
 
index 44dba86a97d9acbf3ae527b89b59c5bb88d4350e..875b3fbf155d9ff19cfe56bda148a7b96f058c21 100644 (file)
@@ -1,4 +1,4 @@
-//                                                   
+//
 // Mono.Cairo.Pattern.cs
 //
 // Author: Jordi Mas (jordi@ximian.com)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 using System;
 
 namespace Cairo {
-   
+
        public class SolidPattern : Pattern
        {
-               internal SolidPattern (IntPtr handle) : base (handle)
+               internal SolidPattern (IntPtr handle, bool owned) : base (handle, owned)
                {
                }
 
                public SolidPattern (Color color)
+                       : base (NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A), true)
                {
-                       pattern = NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A);
                }
 
                public SolidPattern (double r, double g, double b)
+                       : base (NativeMethods.cairo_pattern_create_rgb (r, g, b), true)
                {
-                       pattern = NativeMethods.cairo_pattern_create_rgb (r, g, b);
                }
 
                public SolidPattern (double r, double g, double b, double a)
+                       : base (NativeMethods.cairo_pattern_create_rgba (r, g, b, a), true)
                {
-                       NativeMethods.cairo_pattern_create_rgba (r, g, b, a);
                }
 
                public SolidPattern (Color color, bool solid)
+                       : base (solid
+                                       ? NativeMethods.cairo_pattern_create_rgb (color.R, color.G, color.B)
+                                       : NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A),
+                               true)
                {
-                       if (solid)
-                               pattern = NativeMethods.cairo_pattern_create_rgb (color.R, color.G, color.B);
-                       else
-                               pattern = NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A);
                }
 
                public Color Color {
-                        get {
+                       get {
                                double red, green, blue, alpha;
-
-                               NativeMethods.cairo_pattern_get_rgba  (pattern, out red, out green, out blue, out alpha);
+                               NativeMethods.cairo_pattern_get_rgba  (Handle, out red, out green, out blue, out alpha);
                                return new Color (red, green, blue, alpha);
-                        }
-                }
+                       }
+               }
        }
 }
 
index 862cbdc606d85ac92f2556106359da1aa97ae3f7..07e0d4d997547e0a66698faaa66fa5affa8f1356 100644 (file)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -38,94 +38,88 @@ using System.Collections;
 
 namespace Cairo {
 
-       public class Surface : IDisposable 
-        {                                              
+       public class Surface : IDisposable
+       {
+               [Obsolete]
                protected static Hashtable surfaces = new Hashtable ();
-                internal IntPtr surface = IntPtr.Zero;
 
+               IntPtr handle = IntPtr.Zero;
+
+               [Obsolete]
                protected Surface()
                {
                }
-               
-                protected Surface (IntPtr ptr, bool owns)
-                {
-                        surface = ptr;
-                       lock (surfaces.SyncRoot){
-                               surfaces [ptr] = this;
-                       }
-                       if (!owns)
-                               NativeMethods.cairo_surface_reference (ptr);
-                }
-
-               static internal Surface LookupExternalSurface (IntPtr p)
-               {
-                       lock (surfaces.SyncRoot){
-                               object o = surfaces [p];
-                               if (o == null){
-                                       return new Surface (p, false);
-                               }
-                               return (Surface) o;
-                       }
-               }               
 
-               static internal Surface LookupSurface (IntPtr surface)
+               [Obsolete]
+               protected Surface (IntPtr ptr) : this (ptr, true)
+               {
+               }
+
+               protected Surface (IntPtr handle, bool owner)
+               {
+                       this.handle = handle;
+                       if (!owner)
+                               NativeMethods.cairo_surface_reference (handle);
+                       if (CairoDebug.Enabled)
+                               CairoDebug.OnAllocated (handle);
+               }
+
+               public static Surface Lookup (IntPtr surface, bool owned)
                {
                        SurfaceType st = NativeMethods.cairo_surface_get_type (surface);
                        switch (st) {
                        case SurfaceType.Image:
-                               return new ImageSurface (surface, true);
+                               return new ImageSurface (surface, owned);
                        case SurfaceType.Xlib:
-                               return new XlibSurface (surface, true);
+                               return new XlibSurface (surface, owned);
                        case SurfaceType.Xcb:
-                               return new XcbSurface (surface, true);
+                               return new XcbSurface (surface, owned);
                        case SurfaceType.Glitz:
-                               return new GlitzSurface (surface, true);
+                               return new GlitzSurface (surface, owned);
                        case SurfaceType.Win32:
-                               return new Win32Surface (surface, true);
-
+                               return new Win32Surface (surface, owned);
                        case SurfaceType.Pdf:
-                               return new PdfSurface (surface, true);
+                               return new PdfSurface (surface, owned);
                        case SurfaceType.PS:
-                               return new PSSurface (surface, true);
+                               return new PSSurface (surface, owned);
                        case SurfaceType.DirectFB:
-                               return new DirectFBSurface (surface, true);
+                               return new DirectFBSurface (surface, owned);
                        case SurfaceType.Svg:
-                               return new SvgSurface (surface, true);
-
+                               return new SvgSurface (surface, owned);
                        default:
-                               return Surface.LookupExternalSurface (surface);
+                               return new Surface (surface, owned);
                        }
                }
-               
+
                [Obsolete ("Use an ImageSurface constructor instead.")]
-                public static Cairo.Surface CreateForImage (
-                        ref byte[] data, Cairo.Format format, int width, int height, int stride)
-                {
-                        IntPtr p = NativeMethods.cairo_image_surface_create_for_data (
-                                data, format, width, height, stride);
-                        
-                        return new Cairo.Surface (p, true);
-                }
+               public static Cairo.Surface CreateForImage (
+                       ref byte[] data, Cairo.Format format, int width, int height, int stride)
+               {
+                       IntPtr p = NativeMethods.cairo_image_surface_create_for_data (
+                               data, format, width, height, stride);
+
+                       return new Cairo.Surface (p, true);
+               }
 
                [Obsolete ("Use an ImageSurface constructor instead.")]
-                public static Cairo.Surface CreateForImage (
-                        Cairo.Format format, int width, int height)
-                {
-                        IntPtr p = NativeMethods.cairo_image_surface_create (
-                                format, width, height);
+               public static Cairo.Surface CreateForImage (
+                       Cairo.Format format, int width, int height)
+               {
+                       IntPtr p = NativeMethods.cairo_image_surface_create (
+                               format, width, height);
 
-                        return new Cairo.Surface (p, true);
-                }
+                       return new Cairo.Surface (p, true);
+               }
 
 
-                public Cairo.Surface CreateSimilar (
-                        Cairo.Content content, int width, int height)
-                {
-                        IntPtr p = NativeMethods.cairo_surface_create_similar (
-                                this.Handle, content, width, height);
+               public Cairo.Surface CreateSimilar (
+                       Cairo.Content content, int width, int height)
+               {
+                       IntPtr p = NativeMethods.cairo_surface_create_similar (
+                               this.Handle, content, width, height);
 
-                        return new Cairo.Surface (p, true);
-                }
+                       return new Cairo.Surface (p, true);
+               }
 
                ~Surface ()
                {
@@ -133,9 +127,9 @@ namespace Cairo {
                }
 
                //[Obsolete ("Use Context.SetSource() followed by Context.Paint()")]
-               public void Show (Context gr, double x, double y) 
+               public void Show (Context gr, double x, double y)
                {
-                       NativeMethods.cairo_set_source_surface (gr.Handle, surface, x, y);
+                       NativeMethods.cairo_set_source_surface (gr.Handle, handle, x, y);
                        NativeMethods.cairo_paint (gr.Handle);
                }
 
@@ -147,91 +141,92 @@ namespace Cairo {
 
                protected virtual void Dispose (bool disposing)
                {
-                       if (surface == IntPtr.Zero)
+                       if (!disposing || CairoDebug.Enabled)
+                               CairoDebug.OnDisposed<Surface> (handle, disposing);
+
+                       if (!disposing|| handle == IntPtr.Zero)
                                return;
-                       
-                       lock (surfaces.SyncRoot)
-                               surfaces.Remove (surface);
 
-                       NativeMethods.cairo_surface_destroy (surface);
-                       surface = IntPtr.Zero;
+                       NativeMethods.cairo_surface_destroy (handle);
+                       handle = IntPtr.Zero;
                }
-               
+
                public Status Finish ()
                {
-                       NativeMethods.cairo_surface_finish (surface);
+                       NativeMethods.cairo_surface_finish (handle);
                        return Status;
                }
-               
+
                public void Flush ()
                {
-                       NativeMethods.cairo_surface_flush (surface);
+                       NativeMethods.cairo_surface_flush (handle);
                }
-               
+
                public void MarkDirty ()
                {
                        NativeMethods.cairo_surface_mark_dirty (Handle);
                }
-               
+
                public void MarkDirty (Rectangle rectangle)
                {
                        NativeMethods.cairo_surface_mark_dirty_rectangle (Handle, (int)rectangle.X, (int)rectangle.Y, (int)rectangle.Width, (int)rectangle.Height);
                }
-               
-                public IntPtr Handle {
-                        get {
-                               return surface;
+
+               public IntPtr Handle {
+                       get {
+                               return handle;
                        }
-                }
+               }
 
                public PointD DeviceOffset {
                        get {
                                double x, y;
-                               NativeMethods.cairo_surface_get_device_offset (surface, out x, out y);
+                               NativeMethods.cairo_surface_get_device_offset (handle, out x, out y);
                                return new PointD (x, y);
                        }
 
                        set {
-                               NativeMethods.cairo_surface_set_device_offset (surface, value.X, value.Y);
+                               NativeMethods.cairo_surface_set_device_offset (handle, value.X, value.Y);
                        }
                }
-               
+
+               [Obsolete ("Use Dispose()")]
                public void Destroy()
                {
-                       Dispose (true);
+                       Dispose ();
                }
 
                public void SetFallbackResolution (double x, double y)
                {
-                       NativeMethods.cairo_surface_set_fallback_resolution (surface, x, y);
+                       NativeMethods.cairo_surface_set_fallback_resolution (handle, x, y);
                }
 
                public void WriteToPng (string filename)
                {
-                       NativeMethods.cairo_surface_write_to_png (surface, filename);
+                       NativeMethods.cairo_surface_write_to_png (handle, filename);
                }
-               
+
                [Obsolete ("Use Handle instead.")]
-                public IntPtr Pointer {
-                        get {
-                               return surface;
+               public IntPtr Pointer {
+                       get {
+                               return handle;
                        }
-                }
-               
+               }
+
                public Status Status {
-                       get { return NativeMethods.cairo_surface_status (surface); }
+                       get { return NativeMethods.cairo_surface_status (handle); }
                }
 
                public Content Content {
-                       get { return NativeMethods.cairo_surface_get_content (surface); }
+                       get { return NativeMethods.cairo_surface_get_content (handle); }
                }
 
                public SurfaceType SurfaceType {
-                       get { return NativeMethods.cairo_surface_get_type (surface); }
+                       get { return NativeMethods.cairo_surface_get_type (handle); }
                }
 
                public uint ReferenceCount {
-                       get { return NativeMethods.cairo_surface_get_reference_count (surface); }
+                       get { return NativeMethods.cairo_surface_get_reference_count (handle); }
                }
-        }
+       }
 }
index f4f4298c5498a69b17f1cb2a3a5431f231d7df1f..4422b11d41dc899da6aa8edfa5a31fcd8ca23e55 100644 (file)
@@ -1,4 +1,4 @@
-//                                                   
+//
 // Mono.Cairo.Pattern.cs
 //
 // Author: Jordi Mas (jordi@ximian.com)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 using System;
 
 namespace Cairo {
-   
+
        public class SurfacePattern : Pattern
        {
-               internal SurfacePattern (IntPtr handle) : base (handle)
+               internal SurfacePattern (IntPtr handle, bool owned) : base (handle, owned)
                {
                }
 
                public SurfacePattern (Surface surface)
+                       : base (NativeMethods.cairo_pattern_create_for_surface (surface.Handle), true)
                {
-                       pattern = NativeMethods.cairo_pattern_create_for_surface (surface.Handle);
                }
 
-               public Extend Extend {
-                       set { NativeMethods.cairo_pattern_set_extend (pattern, value); }
-                       get { return NativeMethods.cairo_pattern_get_extend (pattern); }
+               //no idea why this is here, the base one is identical, but we can't remove it now
+               public new Extend Extend {
+                       set { NativeMethods.cairo_pattern_set_extend (Handle, value); }
+                       get { return NativeMethods.cairo_pattern_get_extend (Handle); }
                }
 
                public Filter Filter {
-                       set { NativeMethods.cairo_pattern_set_filter (pattern, value); }
-                       get { return NativeMethods.cairo_pattern_get_filter (pattern); }
+                       set { NativeMethods.cairo_pattern_set_filter (Handle, value); }
+                       get { return NativeMethods.cairo_pattern_get_filter (Handle); }
                }
        }
 }
index 10da981e0ee05b8c70f3f8983d685e299e49744b..418295011fde1c26a144ab920ab513b634844902 100644 (file)
@@ -37,16 +37,13 @@ namespace Cairo {
                }
 
                public SvgSurface (string filename, double width, double height)
+                       : base (NativeMethods.cairo_svg_surface_create (filename, width, height), true)
                {
-                       surface = NativeMethods.cairo_svg_surface_create (filename, width, height);
-                       lock (surfaces.SyncRoot){
-                               surfaces [surface] = this;
-                       }
                }
 
                public void RestrictToVersion (SvgVersion version)
                {
-                       NativeMethods.cairo_svg_surface_restrict_to_version (surface, version);
+                       NativeMethods.cairo_svg_surface_restrict_to_version (Handle, version);
                }
        }
 }
index fbb22270acad984c1d43e1e1ab9e9b231042bf3f..dd244286dff508a90832ea9ac88cd2aaa1afe99c 100644 (file)
@@ -37,12 +37,8 @@ namespace Cairo {
                }
                
                public Win32Surface (IntPtr hdc)
+                       : base (NativeMethods.cairo_win32_surface_create (hdc), true)
                {
-                       surface = NativeMethods.cairo_win32_surface_create (hdc);
-                       lock (surfaces.SyncRoot) {
-                               surfaces [surface] = this;
-                       }
                }
        }
-
 }
index 97f5f2f6f797a0471d0080d5fc07cc6b4bb93575..142ebf9e31a0530bf5fafa8a4a7cb4e322f0940d 100644 (file)
@@ -36,24 +36,19 @@ namespace Cairo {
                }
 
                public XcbSurface (IntPtr connection, uint drawable, IntPtr visual, int width, int height)
+                       : base (NativeMethods.cairo_xcb_surface_create (connection, drawable, visual, width, height), true)
                {
-                       surface = NativeMethods.cairo_xcb_surface_create (connection, drawable, visual, width, height);
-                       lock (surfaces.SyncRoot) {
-                               surfaces [surface] = this;
-                       }
                }
 
                public static XcbSurface FromBitmap (IntPtr connection, uint bitmap, IntPtr screen, int width, int height)
                {
-                       IntPtr ptr;
-
-                       ptr = NativeMethods.cairo_xcb_surface_create_for_bitmap (connection, bitmap, screen, width, height);
+                       IntPtr ptr = NativeMethods.cairo_xcb_surface_create_for_bitmap (connection, bitmap, screen, width, height);
                        return new XcbSurface (ptr, true);
                }
 
                public void SetSize (int width, int height)
                {
-                       NativeMethods.cairo_xcb_surface_set_size (surface, width, height);
+                       NativeMethods.cairo_xcb_surface_set_size (Handle, width, height);
                }
        }
 }
index ef010feea5935886e5f00e5fdee9460041c901a3..c0003a491e61f3afafefcbb4ebbfb025a1052f75 100644 (file)
@@ -39,11 +39,8 @@ namespace Cairo {
        public class XlibSurface : Surface
        {
                public XlibSurface (IntPtr display, IntPtr drawable, IntPtr visual, int width, int height)
+                       : base (NativeMethods.cairo_xlib_surface_create (display, drawable, visual, width, height), true)
                {
-                       surface = NativeMethods.cairo_xlib_surface_create (display, drawable, visual, width, height);
-                       lock (surfaces.SyncRoot){
-                               surfaces [surface] = this;
-                       }
                }
 
                public XlibSurface (IntPtr ptr, bool own) : base (ptr, own)
@@ -52,48 +49,46 @@ namespace Cairo {
 
                public static XlibSurface FromBitmap (IntPtr display, IntPtr bitmap, IntPtr screen, int width, int height)
                {
-                       IntPtr  ptr;
-
-                       ptr = NativeMethods.cairo_xlib_surface_create_for_bitmap (display, bitmap, screen, width, height);
+                       IntPtr ptr = NativeMethods.cairo_xlib_surface_create_for_bitmap (display, bitmap, screen, width, height);
                        return new XlibSurface(ptr, true);
                }
 
                public void SetDrawable (IntPtr drawable, int width, int height)
                {
-                       NativeMethods.cairo_xlib_surface_set_drawable (surface, drawable, width, height);
+                       NativeMethods.cairo_xlib_surface_set_drawable (Handle, drawable, width, height);
                }
 
                public void SetSize (int width, int height)
                {
-                       NativeMethods.cairo_xlib_surface_set_size (surface, width, height);
+                       NativeMethods.cairo_xlib_surface_set_size (Handle, width, height);
                }
 
                public int Depth {
-                       get { return NativeMethods.cairo_xlib_surface_get_depth (surface); }
+                       get { return NativeMethods.cairo_xlib_surface_get_depth (Handle); }
                }
                
                public IntPtr Display {
-                       get { return NativeMethods.cairo_xlib_surface_get_display (surface); }
+                       get { return NativeMethods.cairo_xlib_surface_get_display (Handle); }
                }
 
                public IntPtr Drawable {
-                       get { return NativeMethods.cairo_xlib_surface_get_drawable (surface); }
+                       get { return NativeMethods.cairo_xlib_surface_get_drawable (Handle); }
                }
 
                public int Height {
-                       get { return NativeMethods.cairo_xlib_surface_get_height (surface); }
+                       get { return NativeMethods.cairo_xlib_surface_get_height (Handle); }
                }
 
                public IntPtr Screen {
-                       get { return NativeMethods.cairo_xlib_surface_get_screen (surface); }
+                       get { return NativeMethods.cairo_xlib_surface_get_screen (Handle); }
                }
 
                public IntPtr Visual {
-                       get { return NativeMethods.cairo_xlib_surface_get_visual (surface); }
+                       get { return NativeMethods.cairo_xlib_surface_get_visual (Handle); }
                }
 
                public int Width {
-                       get { return NativeMethods.cairo_xlib_surface_get_width (surface); }
+                       get { return NativeMethods.cairo_xlib_surface_get_width (Handle); }
                }
 
        }
index e8d5f58c8edbe18b68889dbf166a6caeb9f4b801..105ff4fb67dbe949566a7949661634af7f4d3164 100644 (file)
@@ -395,7 +395,7 @@ namespace Mono.Debugger.Soft
                 * with newer runtimes, and vice versa.
                 */
                internal const int MAJOR_VERSION = 2;
-               internal const int MINOR_VERSION = 23;
+               internal const int MINOR_VERSION = 24;
 
                enum WPSuspendPolicy {
                        NONE = 0,
@@ -519,7 +519,8 @@ namespace Mono.Debugger.Soft
                        GET_INFO = 6,
                        GET_BODY = 7,
                        RESOLVE_TOKEN = 8,
-                       GET_CATTRS = 9
+                       GET_CATTRS = 9,
+                       MAKE_GENERIC_METHOD = 10
                }
 
                enum CmdType {
@@ -1875,6 +1876,11 @@ namespace Mono.Debugger.Soft
                        return ReadCattrs (r);
                }
 
+               internal long Method_MakeGenericMethod (long id, long[] args) {
+                       PacketReader r = SendReceive (CommandSet.METHOD, (int)CmdMethod.MAKE_GENERIC_METHOD, new PacketWriter ().WriteId (id).WriteInt (args.Length).WriteIds (args));
+                       return r.ReadId ();
+               }
+
                /*
                 * THREAD
                 */
@@ -2321,6 +2327,8 @@ namespace Mono.Debugger.Soft
 
                public void ForceDisconnect ()
                {
+                       closed = true;
+                       disconnected = true;
                        TransportClose ();
                }
        }
index ac97cb02fb43742c806aedec74020c48f04d6e00..04717c61062dbc191a2f8c662782b326a74eb8d6 100644 (file)
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Text;
 using System.Reflection;
 using C = Mono.Cecil;
@@ -306,6 +307,30 @@ namespace Mono.Debugger.Soft
                        return type_args;
                }
 
+               // Since protocol version 2.24
+               public MethodMirror MakeGenericMethod (TypeMirror[] args) {
+                       if (args == null)
+                               throw new ArgumentNullException ("args");
+                       foreach (var a in args)
+                               if (a == null)
+                                       throw new ArgumentNullException ("args");
+
+                       if (!IsGenericMethodDefinition)
+                               throw new InvalidOperationException ("not a generic method definition");
+
+                       if (GetGenericArguments ().Length != args.Length)
+                               throw new ArgumentException ("Incorrect length");
+
+                       vm.CheckProtocolVersion (2, 24);
+                       long id = -1;
+                       try {
+                               id = vm.conn.Method_MakeGenericMethod (Id, args.Select (t => t.Id).ToArray ());
+                       } catch (CommandException) {
+                               throw new InvalidOperationException ();
+                       }
+                       return vm.GetMethod (id);
+               }
+
                public IList<int> ILOffsets {
                        get {
                                if (debug_info == null)
index d6a2a7896fc2a25457512ef2defa4ca7b78f04c5..b77458b44110eeee8ce8ee64e36dcf4b2d5011f3 100644 (file)
@@ -124,7 +124,7 @@ namespace Mono.Debugger.Soft
                                conn.VM_Resume ();
                        } catch (CommandException ex) {
                                if (ex.ErrorCode == ErrorCode.NOT_SUSPENDED)
-                                       throw new InvalidOperationException ("The vm is not suspended.");
+                                       throw new VMNotSuspendedException ();
                                else
                                        throw;
                        }
@@ -290,7 +290,7 @@ namespace Mono.Debugger.Soft
                        case ErrorCode.INVALID_FRAMEID:
                                throw new InvalidStackFrameException ();
                        case ErrorCode.NOT_SUSPENDED:
-                               throw new InvalidOperationException ("The vm is not suspended.");
+                               throw new VMNotSuspendedException ();
                        case ErrorCode.NOT_IMPLEMENTED:
                                throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
                        case ErrorCode.ABSENT_INFORMATION:
@@ -691,4 +691,11 @@ namespace Mono.Debugger.Soft
                        get; set;
                }
        }
+
+       public class VMNotSuspendedException : InvalidOperationException
+       {
+               public VMNotSuspendedException () : base ("The vm is not suspended.")
+               {
+               }
+       }
 }
index 7d475e7dd0bb49d8db51b02508d14996699ffe16..26c45e10d5b800b874b5f6aafcf5f62f1e1937a2 100644 (file)
@@ -223,6 +223,12 @@ public class Tests : TestsBase
                }
        }
 
+       public static void wait_one ()
+       {
+               ManualResetEvent evt = new ManualResetEvent (false);
+               evt.WaitOne ();
+       }
+
        public static int Main (String[] args) {
                tls_i = 42;
 
@@ -241,6 +247,10 @@ public class Tests : TestsBase
                        unhandled_exception_user ();
                        return 0;
                }
+               if (args.Length >0 && args [0] == "wait-one") {
+                       wait_one ();
+                       return 0;
+               }
                breakpoints ();
                single_stepping ();
                arguments ();
@@ -523,6 +533,7 @@ public class Tests : TestsBase
                locals2<string> (null, 5, "ABC", ref s);
                locals3 ();
                locals6 ();
+               locals7<int> (22);
        }
 
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
@@ -638,6 +649,12 @@ public class Tests : TestsBase
        public static void locals6_6 (int arg) {
        }
 
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void locals7<T> (T arg) {
+               T t = arg;
+               T t2 = t;
+       }
+
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        public static void line_numbers () {
                LineNumbers.ln1 ();
@@ -1151,6 +1168,10 @@ public class Tests : TestsBase
                set_gc_suspend_field ();
                gc_suspend_1 ();
        }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void generic_method<T> () where T : class {
+       }
 }
 
 class TypeLoadClass {
index d998b4c021e430a64ed67f3318c594c3a9829fae..5d3f8794c7a28243c1a306a1c0c184371df5a490 100644 (file)
@@ -24,6 +24,7 @@ public class DebuggerTests
        VirtualMachine vm;
        MethodMirror entry_point;
        StepEventRequest step_req;
+       bool forceExit;
 
        void AssertThrows<ExType> (Action del) where ExType : Exception {
                bool thrown = false;
@@ -47,7 +48,13 @@ public class DebuggerTests
                return es [0];
        }
 
-       void Start (string[] args) {
+       void Start (params string[] args) {
+               Start (false, args);
+       }
+
+       void Start (bool forceExit, params string[] args) {
+               this.forceExit = forceExit;
+
                if (!listening) {
                        var pi = new Diag.ProcessStartInfo ();
 
@@ -155,6 +162,7 @@ public class DebuggerTests
 
        [SetUp]
        public void SetUp () {
+               ThreadMirror.NativeTransitions = false;
                Start (new string [] { "dtest-app.exe" });
        }
 
@@ -167,6 +175,9 @@ public class DebuggerTests
                        step_req.Disable ();
 
                vm.Resume ();
+               if (forceExit)
+                       vm.Exit (0);
+
                while (true) {
                        Event e = GetNextEvent ();
 
@@ -175,6 +186,7 @@ public class DebuggerTests
 
                        vm.Resume ();
                }
+               vm = null;
        }
 
        [Test]
@@ -1551,6 +1563,37 @@ public class DebuggerTests
                        });
 
                req.Disable ();
+
+               // gsharedvt
+               be = run_until ("locals7");
+
+               req = vm.CreateStepRequest (be.Thread);
+               req.Enable ();
+               step_req = req;
+
+               // Skip nop
+               e = step_once ();
+
+               // Test that locals are initialized
+               frame = e.Thread.GetFrames () [0];
+               val = frame.GetValue (frame.Method.GetLocal ("t"));
+               AssertValue (0, val);
+
+               // Execute t = arg
+               e = step_once ();
+               Assert.AreEqual ("locals7", (e as StepEvent).Method.Name);
+
+               // Execute t2 = t
+               e = step_once ();
+               Assert.AreEqual ("locals7", (e as StepEvent).Method.Name);
+
+               frame = e.Thread.GetFrames () [0];
+               val = frame.GetValue (frame.Method.GetParameters ()[0]);
+               AssertValue (22, val);
+               val = frame.GetValue (frame.Method.GetLocal ("t"));
+               AssertValue (22, val);
+               val = frame.GetValue (frame.Method.GetLocal ("t2"));
+               AssertValue (22, val);
        }
 
        [Test]
@@ -3174,6 +3217,92 @@ public class DebuggerTests
                var o2 = entry_point.DeclaringType.GetValue (entry_point.DeclaringType.GetField ("gc_suspend_field")) as ObjectMirror;
                Assert.IsNull (o2);
        }
+
+       [Test]
+       public void MakeGenericMethod () {
+               Event e = run_until ("bp1");
+
+               var intm = vm.RootDomain.GetCorrespondingType (typeof (int));
+               var stringm = vm.RootDomain.GetCorrespondingType (typeof (string));
+               var gm = entry_point.DeclaringType.GetMethod ("generic_method");
+               var res = gm.MakeGenericMethod (new TypeMirror [] { stringm });
+               var args = res.GetGenericArguments ();
+               Assert.AreEqual (1, args.Length);
+               Assert.AreEqual (stringm, args [0]);
+
+               // Error checking
+               AssertThrows<ArgumentNullException> (delegate {
+                               gm.MakeGenericMethod (null);
+                       });
+               AssertThrows<ArgumentNullException> (delegate {
+                               gm.MakeGenericMethod (new TypeMirror [] { null });
+                       });
+               AssertThrows<ArgumentException> (delegate {
+                               gm.MakeGenericMethod (new TypeMirror [] { stringm, stringm });
+                       });
+               AssertThrows<InvalidOperationException> (delegate {
+                               gm.MakeGenericMethod (new TypeMirror [] { intm });
+                       });
+               AssertThrows<InvalidOperationException> (delegate {
+                               entry_point.DeclaringType.GetMethod ("Main").MakeGenericMethod (new TypeMirror [] { intm });
+                       });
+       }
+
+       [Test]
+       public void InspectThreadSuspenedOnWaitOne () {
+               TearDown ();
+               Start (true, "dtest-app.exe", "wait-one" );
+
+               ThreadMirror.NativeTransitions = true;
+
+               var evt = run_until ("wait_one");
+               Assert.IsNotNull (evt, "#1");
+
+               var thread = evt.Thread;
+               Assert.AreEqual (ThreadState.Running, thread.ThreadState, "#1.1");
+
+               var frames = thread.GetFrames ();
+               Assert.IsNotNull (frames, "#2");
+               Assert.AreEqual (2, frames.Length, "#3");
+               Assert.AreEqual ("wait_one", frames [0].Method.Name, "#4");
+               Assert.AreEqual ("Main", frames [1].Method.Name, "#5");
+
+               vm.Resume ();
+
+               Thread.Sleep (500); //FIXME this is racy, maybe single step? or something?
+
+               vm.Suspend ();
+               Assert.AreEqual (ThreadState.WaitSleepJoin, thread.ThreadState, "#6");
+
+               frames = thread.GetFrames ();
+               Assert.AreEqual (4, frames.Length, "#7");
+               Assert.AreEqual ("WaitOne_internal", frames [0].Method.Name, "#8");
+               Assert.AreEqual ("WaitOne", frames [1].Method.Name, "#8.1");
+               Assert.AreEqual ("wait_one", frames [2].Method.Name, "#9");
+               Assert.AreEqual ("Main", frames [3].Method.Name, "#10");
+
+
+               var frame = frames [0];
+               Assert.IsTrue (frame.IsNativeTransition, "#11.1");
+               try {
+                       frame.GetThis ();
+                       Assert.Fail ("Known limitation - can't get info from m2n frames");
+               } catch (AbsentInformationException) {}
+
+               frame = frames [1];
+               Assert.IsFalse (frame.IsNativeTransition, "#12.1");
+               var wait_one_this = frame.GetThis ();
+               Assert.IsNotNull (wait_one_this, "#12.2");
+
+               frame = frames [2];
+               var locals = frame.GetVisibleVariables ();
+               Assert.AreEqual (1, locals.Count, "#13.1");
+
+               var local_0 = frame.GetValue (locals [0]);
+               Assert.IsNotNull (local_0, "#13.2");
+
+               Assert.AreEqual (wait_one_this, local_0, "#14.2");
+       }
 }
 
 }
index 4c56a293d517780d16e64f0e8107db4c6cf71dad..7951d08ae17377a58246b6f81b3df14cdecaf317 100644 (file)
@@ -183,6 +183,8 @@ namespace Mono.Unix.Native {
                        return '-';
                }
 
+               public static readonly DateTime UnixEpoch =
+                       new DateTime (year:1970, month:1, day:1, hour:0, minute:0, second:0, kind:DateTimeKind.Utc);
                public static readonly DateTime LocalUnixEpoch = 
                        new DateTime (1970, 1, 1);
                public static readonly TimeSpan LocalUtcOffset = 
@@ -200,15 +202,18 @@ namespace Mono.Unix.Native {
 
                public static DateTime FromTimeT (long time)
                {
-                       DateTime r = LocalUnixEpoch.AddSeconds ((double) time + 
-                                       LocalUtcOffset.TotalSeconds);
-                       return r;
+                       return UnixEpoch.AddSeconds (time).ToLocalTime ();
                }
 
                public static long ToTimeT (DateTime time)
                {
-                       TimeSpan unixTime = time.Subtract (LocalUnixEpoch) - LocalUtcOffset;
-                       return (long) unixTime.TotalSeconds;
+                       if (time.Kind == DateTimeKind.Unspecified)
+                               throw new ArgumentException ("DateTimeKind.Unspecified is not supported. Use Local or Utc times.", "time");
+
+                       if (time.Kind == DateTimeKind.Local)
+                               time = time.ToUniversalTime ();
+
+                       return (long) (time - UnixEpoch).TotalSeconds;
                }
 
                public static OpenFlags ToOpenFlags (FileMode mode, FileAccess access)
index cc74cca20ae732e538fccdb688d34957040c4374..1efcec91abde0a83b6cbc5f89caae1111a368937 100644 (file)
@@ -198,11 +198,11 @@ namespace Mono.Security.Authenticode {
                        HashAlgorithm ha = null; 
                        switch (signedHash.Length) {
                                case 16:
-                                       ha = HashAlgorithm.Create ("MD5"); 
+                                       ha = MD5.Create (); 
                                        hash = GetHash (ha);
                                        break;
                                case 20:
-                                       ha = HashAlgorithm.Create ("SHA1");
+                                       ha = SHA1.Create ();
                                        hash = GetHash (ha);
                                        break;
                                default:
index d26a02ea69168c8e049ce0f2920c2b9563685533..4e579eee94ae2bab77cd3bd121a7fe3928487bc5 100644 (file)
@@ -426,7 +426,7 @@ namespace Mono.Security.Cryptography {
                        return mask;
                }
 
-               static internal string HashNameFromOid (string oid)
+               static internal string HashNameFromOid (string oid, bool throwOnError = true)
                {
                        switch (oid) {
                        case "1.2.840.113549.1.1.2":    // MD2 with RSA encryption 
@@ -448,7 +448,9 @@ namespace Mono.Security.Cryptography {
                        case "1.3.36.3.3.1.2":
                                return "RIPEMD160";
                        default:
-                               throw new CryptographicException ("Unsupported hash algorithm: " + oid);
+                               if (throwOnError)
+                                       throw new CryptographicException ("Unsupported hash algorithm: " + oid);
+                               return null;
                        }
                }
                
@@ -478,7 +480,12 @@ namespace Mono.Security.Cryptography {
                        case "RIPEMD160":
                                return RIPEMD160.Create ();
                        default:
-                               throw new CryptographicException ("Unsupported hash algorithm: " + name);
+                               try {
+                                       return (HashAlgorithm) Activator.CreateInstance (Type.GetType (name));
+                               }
+                               catch {
+                                       throw new CryptographicException ("Unsupported hash algorithm: " + name);
+                               }
                        }
 #else
                        return HashAlgorithm.Create (name);
index 164466487e138f644ec944ef589c51c838771f06..352e4649b0ef2c19d327d36ff15b3a0fd54d557f 100644 (file)
@@ -3,10 +3,11 @@
 //     ftp://ftp.rsasecurity.com/pub/pkcs/doc/pkcs-8.doc
 //
 // Author:
-//     Sebastien Pouliot <sebastien@ximian.com>
+//     Sebastien Pouliot <sebastien@xamarin.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
 // Copyright (C) 2004-2006 Novell Inc. (http://www.novell.com)
+// Copyright 2013 Xamarin Inc. (http://www.xamarin.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 using System;
 using System.Collections;
 using System.Security.Cryptography;
-using System.Text;
 
 using Mono.Security.X509;
 
 namespace Mono.Security.Cryptography {
 
-#if INSIDE_CORLIB
-       internal
-#else
+#if !INSIDE_CORLIB
        public 
 #endif
        sealed class PKCS8 {
@@ -279,6 +277,11 @@ namespace Mono.Security.Cryptography {
                                        rsa.ImportParameters (param);
                                }
                                catch (CryptographicException) {
+#if MONOTOUCH
+                                       // there's no machine-wide store available for iOS so we can drop the dependency on
+                                       // CspParameters (which drops other things, like XML key persistance, unless used elsewhere)
+                                       throw;
+#else
                                        // this may cause problem when this code is run under
                                        // the SYSTEM identity on Windows (e.g. ASP.NET). See
                                        // http://bugzilla.ximian.com/show_bug.cgi?id=77559
@@ -286,6 +289,7 @@ namespace Mono.Security.Cryptography {
                                        csp.Flags = CspProviderFlags.UseMachineKeyStore;
                                        rsa = new RSACryptoServiceProvider (csp);
                                        rsa.ImportParameters (param);
+#endif
                                }
                                return rsa;
                        }
index 722d2e53b4f9c2f2daad4f07e6f25b6d328795a8..1e09d552a21b29ec0e3533087ac33090220a20e3 100644 (file)
@@ -115,14 +115,9 @@ namespace Mono.Security.Cryptography
                        this.Initialize();
                }
 
-               public HMAC(string hashName, byte[] rgbKey)
+               public HMAC (HashAlgorithm ha, byte[] rgbKey)
                {
-                       // Create the hash
-                       if (hashName == null || hashName.Length == 0)
-                       {
-                               hashName = "MD5";
-                       }
-                       hash = HashAlgorithm.Create(hashName);
+                       hash = ha;
                        // Set HashSizeValue
                        HashSizeValue = hash.HashSize;
 
index 52a39e0c25bc62949898019adae60fd693b44caf..6d78fc9d38632340661a6579bf218a64c5f7a7d2 100644 (file)
@@ -115,6 +115,18 @@ namespace Mono.Security.Protocol.Tls
                        }
                }
 
+               internal HashAlgorithm CreateHashAlgorithm ()
+               {
+                       switch (hashAlgorithmType) {
+                       case HashAlgorithmType.Md5:
+                               return MD5.Create ();
+                       case HashAlgorithmType.Sha1:
+                               return SHA1.Create ();
+                       default:
+                               return null;
+                       }
+               }
+
                public HashAlgorithmType HashAlgorithmType
                {
                        get { return this.hashAlgorithmType; }
@@ -389,10 +401,10 @@ namespace Mono.Security.Protocol.Tls
                        Buffer.BlockCopy(secret, (secret.Length - secretLen), secret2, 0, secretLen);
 
                        // Secret 1 processing
-                       byte[] p_md5 = Expand("MD5", secret1, seed, length);
+                       byte[] p_md5 = Expand (MD5.Create (), secret1, seed, length);
 
                        // Secret 2 processing
-                       byte[] p_sha = Expand("SHA1", secret2, seed, length);
+                       byte[] p_sha = Expand (SHA1.Create (), secret2, seed, length);
 
                        // Perfor XOR of both results
                        byte[] masterSecret = new byte[length];
@@ -404,16 +416,16 @@ namespace Mono.Security.Protocol.Tls
                        return masterSecret;
                }
                
-               public byte[] Expand(string hashName, byte[] secret, byte[] seed, int length)
+               public byte[] Expand (HashAlgorithm hash, byte[] secret, byte[] seed, int length)
                {
-                       int hashLength  = hashName == "MD5" ? 16 : 20;
+                       int hashLength  = hash.HashSize / 8;
                        int     iterations      = (int)(length / hashLength);
                        if ((length % hashLength) > 0)
                        {
                                iterations++;
                        }
                        
-                       M.HMAC          hmac    = new M.HMAC(hashName, secret);
+                       M.HMAC          hmac    = new M.HMAC (hash, secret);
                        TlsStream       resMacs = new TlsStream();
                        
                        byte[][] hmacs = new byte[iterations + 1][];
@@ -503,13 +515,13 @@ namespace Mono.Security.Protocol.Tls
                        if (this.context is ClientContext)
                        {
                                this.clientHMAC = new M.HMAC(
-                                       this.HashAlgorithmName,
+                                       CreateHashAlgorithm (),
                                        this.context.Negotiating.ClientWriteMAC);
                        }
                        else
                        {
                                this.serverHMAC = new M.HMAC(
-                                       this.HashAlgorithmName,
+                                       CreateHashAlgorithm (),
                                        this.context.Negotiating.ServerWriteMAC);
                        }
                }
@@ -574,13 +586,13 @@ namespace Mono.Security.Protocol.Tls
                        if (this.context is ClientContext)
                        {
                                this.serverHMAC = new M.HMAC(
-                                       this.HashAlgorithmName,
+                                       CreateHashAlgorithm (),
                                        this.context.Negotiating.ServerWriteMAC);
                        }
                        else
                        {
                                this.clientHMAC = new M.HMAC(
-                                       this.HashAlgorithmName,
+                                       CreateHashAlgorithm (),
                                        this.context.Negotiating.ClientWriteMAC);
                        }
                }
index 14540520be2aa531b01fdee6be30f2fb09acf066..ae9b9d56c19eac4c0b480923814b07768ad39b4f 100644 (file)
@@ -74,7 +74,7 @@ namespace Mono.Security.Protocol.Tls
 
                public override byte[] ComputeServerRecordMAC(ContentType contentType, byte[] fragment)
                {
-                       HashAlgorithm   hash    = HashAlgorithm.Create(this.HashAlgorithmName);
+                       HashAlgorithm hash = CreateHashAlgorithm ();
 
                        byte[] smac = this.Context.Read.ServerWriteMAC;
                        hash.TransformBlock (smac, 0, smac.Length, smac, 0);
@@ -107,7 +107,7 @@ namespace Mono.Security.Protocol.Tls
 
                public override byte[] ComputeClientRecordMAC(ContentType contentType, byte[] fragment)
                {
-                       HashAlgorithm   hash    = HashAlgorithm.Create(this.HashAlgorithmName);
+                       HashAlgorithm hash = CreateHashAlgorithm ();
 
                        byte[] cmac = this.Context.Current.ClientWriteMAC;
                        hash.TransformBlock (cmac, 0, cmac.Length, cmac, 0);
index fba03390993686e42cafa6c282e1e793ba59f60f..2a670b40d5158b9b178ea99408fbb80041cdf280 100644 (file)
@@ -47,8 +47,8 @@ namespace Mono.Security.Protocol.Tls
                public SslHandshakeHash(byte[] secret)
                {
                        // Create md5 and sha1 hashes
-                       this.md5 = HashAlgorithm.Create("MD5");
-                       this.sha = HashAlgorithm.Create("SHA1");
+                       this.md5 = MD5.Create ();
+                       this.sha = SHA1.Create ();
                        
                        // Set HashSizeValue
                        this.HashSizeValue = md5.HashSize + sha.HashSize;
index 1bea107fd55548973256a8b8a60168440609e90e..11be419681b1abe55aa502fe916dd7aab511351a 100644 (file)
@@ -289,8 +289,11 @@ namespace Mono.Security.X509 {
                                if (certhash == null) {
                                        if ((decoder == null) || (decoder.Count < 1))
                                                return null;
+                                       string algo = PKCS1.HashNameFromOid (m_signaturealgo, false);
+                                       if (algo == null)
+                                               return null;
                                        byte[] toBeSigned = decoder [0].GetBytes ();
-                                       using (var hash = PKCS1.CreateFromOid (m_signaturealgo))
+                                       using (var hash = PKCS1.CreateFromName (algo))
                                                certhash = hash.ComputeHash (toBeSigned, 0, toBeSigned.Length);
                                }
                                return (byte[]) certhash.Clone ();
index e2c9e9fac9cec1fe1e0755742900c508b4a4923c..110311adf1a75f5fff38284e6ed1027cd07dbc20 100644 (file)
@@ -23,7 +23,7 @@ namespace MonoTests.Mono.Security.Cryptography {
        //      http://wp.netscape.com/eng/ssl3/traces/trc-clnt-ex.html
 
        [TestFixture]
-       public class ARC4ManagedTest : Assertion {
+       public class ARC4ManagedTest {
 
                // because most crypto stuff works with byte[] buffers
                static public void AssertEquals (string msg, byte[] array1, byte[] array2) 
@@ -31,9 +31,9 @@ namespace MonoTests.Mono.Security.Cryptography {
                        if ((array1 == null) && (array2 == null))
                                return;
                        if (array1 == null)
-                               Fail (msg + " -> First array is NULL");
+                               Assert.Fail (msg + " -> First array is NULL");
                        if (array2 == null)
-                               Fail (msg + " -> Second array is NULL");
+                               Assert.Fail (msg + " -> Second array is NULL");
                
                        bool a = (array1.Length == array2.Length);
                        if (a) {
@@ -46,7 +46,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                        }
                        msg += " -> Expected " + BitConverter.ToString (array1, 0);
                        msg += " is different than " + BitConverter.ToString (array2, 0);
-                       Assert (msg, a);
+                       Assert.IsTrue (a, msg);
                }
 
                // from ref. a
@@ -205,10 +205,10 @@ namespace MonoTests.Mono.Security.Cryptography {
                public void DefaultProperties () 
                {
                        ARC4Managed rc4 = new ARC4Managed ();
-                       Assert ("CanReuseTransform", !rc4.CanReuseTransform);
-                       Assert ("CanTransformMultipleBlocks", rc4.CanTransformMultipleBlocks);
-                       AssertEquals ("InputBlockSize", 1, rc4.InputBlockSize);
-                       AssertEquals ("OutputBlockSize", 1, rc4.OutputBlockSize);
+                       Assert.IsFalse (rc4.CanReuseTransform, "CanReuseTransform");
+                       Assert.IsTrue (rc4.CanTransformMultipleBlocks, "CanTransformMultipleBlocks");
+                       Assert.AreEqual (1, rc4.InputBlockSize, "InputBlockSize");
+                       Assert.AreEqual (1, rc4.OutputBlockSize, "OutputBlockSize");
                }
                
                [Test]
@@ -217,9 +217,9 @@ namespace MonoTests.Mono.Security.Cryptography {
                        ARC4Managed rc4 = new ARC4Managed ();
                        rc4.GenerateKey ();
                        rc4.GenerateIV ();
-                       AssertEquals ("Key.Length", 16, rc4.Key.Length);
-                       AssertEquals ("KeySize", 128, rc4.KeySize);
-                       AssertEquals ("IV.Length", 0, rc4.IV.Length);
+                       Assert.AreEqual (16, rc4.Key.Length, "Key.Length");
+                       Assert.AreEqual (128, rc4.KeySize, "KeySize");
+                       Assert.AreEqual (0, rc4.IV.Length, "IV.Length");
                }
 
                [Test]
index 5f6469abf1d425bf94becb0a2faef27f753fbde5..01462d5adc9024c9d8b22aacd2a4609357b1f4d8 100644 (file)
@@ -32,7 +32,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                {
                        // try creating ourselve using Create
                        HashAlgorithm h = MD2.Create ("MD2Managed");
-                       Assert ("MD2Managed", (h is MD2Managed));
+                       Assert.IsTrue ((h is MD2Managed), "MD2Managed");
                }
        }
-}
\ No newline at end of file
+}
index b7307cc9b1b50a7291ab0de542c2cc10b458ca5c..6fb7abdceff978b5bb059528e3b1bfb714d37e64 100644 (file)
@@ -24,10 +24,20 @@ namespace MonoTests.Mono.Security.Cryptography {
 
        // MD2 is a abstract class - so ALL of the test included here wont be tested
        // on the abstract class but should be tested in ALL its descendants.
-       public abstract class MD2Test : Assertion {
+       public abstract class MD2Test {
 
                protected MD2 hash;
 
+               static void Fail (string msg)
+               {
+                       Assert.Fail (msg);
+               }
+
+               static void AssertEquals (string msg, int expected, int actual)
+               {
+                       Assert.AreEqual (expected, actual, msg);
+               }
+
                // because most crypto stuff works with byte[] buffers
                static public void AssertEquals (string msg, byte[] array1, byte[] array2) 
                {
@@ -51,7 +61,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                                msg += " -> Expected " + BitConverter.ToString (array1, 0);
                                msg += " is different than " + BitConverter.ToString (array2, 0);
                        }
-                       Assert (msg, a);
+                       Assert.IsTrue (a, msg);
                }
 
                // MD2 ("") = 8350e5a3e24c153df2275c9f80692773
@@ -232,7 +242,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                {
                        // create the default implementation
                        HashAlgorithm h = MD2.Create ();
-                       Assert ("MD2Managed", (h is MD2Managed));
+                       Assert.IsTrue ((h is MD2Managed), "MD2Managed");
                        // Note: will fail is default is changed in machine.config
                }
        }
index ff0bcfb8056a5562390e81d644e223c03b443127..32de43caeb3e962e92643f5ad3ad1ebb47c0a7c5 100644 (file)
@@ -32,7 +32,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                {
                        // try creating ourselve using Create
                        HashAlgorithm h = MD4.Create ("MD4Managed");
-                       Assert ("MD4Managed", (h is MD4Managed));
+                       Assert.IsTrue ((h is MD4Managed), "MD4Managed");
                }
        }
-}
\ No newline at end of file
+}
index dd36e8fa412911d19cf3d67b5ff43b8fbb1b8a68..c14738f6d081936f18371c2c1840e1f575fae704 100644 (file)
@@ -24,19 +24,24 @@ namespace MonoTests.Mono.Security.Cryptography {
 
        // MD4 is a abstract class - so ALL of the test included here wont be tested
        // on the abstract class but should be tested in ALL its descendants.
-       public abstract class MD4Test : Assertion {
+       public abstract class MD4Test {
 
                protected MD4 hash;
 
+               static void AssertEquals (string msg, int expected, int actual)
+               {
+                       Assert.AreEqual (expected, actual, msg);
+               }
+
                // because most crypto stuff works with byte[] buffers
                static public void AssertEquals (string msg, byte[] array1, byte[] array2) 
                {
                        if ((array1 == null) && (array2 == null))
                                return;
                        if (array1 == null)
-                               Assertion.Fail (msg + " -> First array is NULL");
+                               Assert.Fail (msg + " -> First array is NULL");
                        if (array2 == null)
-                               Assertion.Fail (msg + " -> Second array is NULL");
+                               Assert.Fail (msg + " -> Second array is NULL");
 
                        bool a = (array1.Length == array2.Length);
                        if (a) {
@@ -51,7 +56,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                                msg += " -> Expected " + BitConverter.ToString (array1, 0);
                                msg += " is different than " + BitConverter.ToString (array2, 0);
                        }
-                       Assertion.Assert (msg, a);
+                       Assert.IsTrue (a, msg);
                }
 
                // MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0
@@ -232,7 +237,7 @@ namespace MonoTests.Mono.Security.Cryptography {
                {
                        // create the default implementation
                        HashAlgorithm h = MD4.Create ();
-                       Assert ("MD4Managed", (h is MD4Managed));
+                       Assert.IsTrue ((h is MD4Managed), "MD4Managed");
                        // Note: will fail is default is changed in machine.config
                }
        }
index 455b7ce27fe2a73d32f17f7ff56bbb4e56dac9d1..b6ac428a3c86c489c18e30e91a549bd7fb9e782c 100644 (file)
@@ -1,3 +1,4 @@
+#if !MONOTOUCH
 // -----------------------------------------------------------------------
 // Copyright (c) Microsoft Corporation.  All rights reserved.
 // -----------------------------------------------------------------------
@@ -331,3 +332,4 @@ namespace Microsoft.Internal
         }
     }
 }
+#endif
index b9f2c41fef0d9819310557bd1eaf6e816e437027..9199e0ede3e7e668208f52f954843912789600dd 100644 (file)
@@ -1,4 +1,5 @@
-// -----------------------------------------------------------------------
+#if !MONOTOUCH
+// -----------------------------------------------------------------------
 // Copyright (c) Microsoft Corporation.  All rights reserved.
 // -----------------------------------------------------------------------
 using System;
@@ -379,3 +380,4 @@ namespace System.ComponentModel.Composition
 
     }
 }
+#endif
index 6c660fcf658a2abc0ea5efbec9f5b8b8caef9570..3ac6fd6859822b45da8ef5d88711090308aa2eb1 100644 (file)
@@ -32,6 +32,7 @@ namespace System.ComponentModel.Composition
                 {
                     if(!metadataViewType.IsAttributeDefined<MetadataViewImplementationAttribute>())
                     {
+#if !MONOTOUCH
                         try
                         {
                             proxyType = MetadataViewGenerator.GenerateView(metadataViewType);
@@ -40,6 +41,9 @@ namespace System.ComponentModel.Composition
                         {
                             throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, Strings.NotSupportedInterfaceMetadataView, metadataViewType.FullName), ex);
                         }
+#else
+                       throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, Strings.NotSupportedInterfaceMetadataView, metadataViewType.FullName));
+#endif
                     }
                     else
                     {
@@ -83,6 +87,7 @@ namespace System.ComponentModel.Composition
                 }
                 catch (TargetInvocationException ex)
                 {
+#if !MONOTOUCH
                     //Unwrap known failures that we want to present as CompositionContractMismatchException
                     if(metadataViewType.IsInterface)
                     {
@@ -107,6 +112,7 @@ namespace System.ComponentModel.Composition
                                 ex.InnerException.Data[MetadataViewGenerator.MetadataItemTargetType]), ex);
                         }
                     }
+#endif
                     throw;
                 }
             }
index 9518191c849b440568cd1ab4d086ee0a01623add..498df578696ef3dc31a28ea843b7d26d62828d40 100644 (file)
@@ -185,7 +185,7 @@ namespace System {
 
                                start = length = 0;
 
-                               int i = Array.BinarySearch (names, name);
+                               int i = Array.BinarySearch (names, name, StringComparer.Ordinal);
                                if (i < 0)
                                        return null;
 
@@ -291,6 +291,40 @@ namespace System {
                                        return buf.ToString ();
                                return null;
                        }
+
+#if SELF_TEST
+                       /*
+                        * Compile:
+                        *    mcs  /out:tzi.exe "/d:INSIDE_CORLIB;MONODROID;NET_4_0;LIBC;SELF_TEST" System/TimeZone*.cs ../../build/common/Consts.cs
+                        * Prep:
+                        *    mkdir -p usr/share/zoneinfo
+                        *    android_root=`adb shell echo '$ANDROID_ROOT' | tr -d "\r"`
+                        *    adb pull $android_root/usr/share/zoneinfo usr/share/zoneinfo
+                        * Run:
+                        *    ANDROID_ROOT=`pwd` mono tzi.exe
+                        */
+                       static void Main (string[] args)
+                       {
+                               Console.WriteLine ("Version: {0}", version);
+                               for (int i = 0; i < names.Length; ++i) {
+                                       Console.Write ("{0,3}\tname={1,-40} start={2,-10} length={3,-4} offset=0x{4,8}",
+                                                       i, names [i], starts [i], lengths [i], offsets [i].ToString ("x8"));
+                                       try {
+                                               TimeZoneInfo zone = _GetTimeZone (names [i]);
+                                               if (zone != null)
+                                                       Console.Write (" {0}", zone);
+                                               else {
+                                                       Console.Write (" ERROR:null Index? {0}",
+                                                                       Array.BinarySearch (names, names [i], StringComparer.Ordinal));
+                                               }
+                                       } catch (Exception e) {
+                                               Console.WriteLine ();
+                                               Console.Write ("ERROR: {0}", e);
+                                       }
+                                       Console.WriteLine ();
+                               }
+                       }
+#endif
                }
        }
 }
index cb4f58b31e0f4a7d94f4d9e86d90f7761448b0cb..128678f91f8a96405de8e80c18c48305e1873850 100644 (file)
@@ -98,12 +98,13 @@ namespace MonoTests.System.Linq.Expressions {
                }
 
                [Test]
-#if MOBILE
-               [Category ("NotWorking")] // String:Intern () is linked away
-#endif
                [ExpectedException (typeof (ArgumentException))]
                public void InstanceTypeDoesntMatchMethodDeclaringType ()
                {
+#if MOBILE
+                       // ensure that String.Intern won't be removed by the linker
+                       string s = String.Intern (String.Empty);
+#endif
                        Expression.Call (Expression.Constant (1), typeof (string).GetMethod ("Intern"));
                }
 
index 30b6738d4474aaa837dc2f242582b00c6800cd67..f5559ae00ea98c4d6b1ced3571c68675e2efaf60 100644 (file)
@@ -608,15 +608,27 @@ namespace MonoTests.System.Linq {
                        AssertException<ArgumentNullException> (delegate () { ((IEnumerable<string>) null).Contains ("2", (IEqualityComparer<string>) EqualityComparer<string>.Default); });
                }
 
+               static void IsFalse(bool b, int[] data) {
+                       if (b) {
+                               Console.WriteLine (data.Contains (0));
+                               object o = null;
+                               o.ToString ();
+                               Assert.IsFalse (true);
+                       }
+                       //Console.WriteLine ("HIT!");
+               }
+
                [Test]
                public void ContainsTest ()
                {
                        int [] data = { 5, 2, 3, 1, 6 };
-
+                       ICollection<int> icoll = data;
 
                        // Contains<TSource> (TSource)
                        Assert.IsTrue (data.Contains (2));
-                       Assert.IsFalse (data.Contains (0));
+                       for (int i = 0; i < 50; ++i)
+                               Console.WriteLine (icoll.Contains (0));//Console.WriteLine (data.Contains (0));
+                       IsFalse (data.Contains (0), data);
 
                        // Contains<TSource> (TSource, IEqualityComparer<TSource>)
                        Assert.IsTrue (data.Contains (2, EqualityComparer<int>.Default));
index 51cb4e882d9c3bab278ae6fdcbf59257cab36725..c681f5a1f8b7bd6df177f0dce7e23161cf15a96f 100644 (file)
@@ -3,6 +3,7 @@
 #include dynamic_System.Core.dll.sources
 
 System/TimeZoneInfo.Android.cs
+System.Security.Cryptography/AesCryptoServiceProvider.cs
 System.Security.Cryptography/AesManaged.cs
 System.Security.Cryptography/AesTransform.cs
 
diff --git a/mcs/class/System.Net.Http.WebRequest/Assembly/AssemblyInfo.cs b/mcs/class/System.Net.Http.WebRequest/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..c74c9c9
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Information about this assembly is defined by the following attributes. 
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle ("System.Net.Http.WebRequest.dll")]
+[assembly: AssemblyDescription ("System.Net.Http.WebRequest.dll")]
+[assembly: AssemblyDefaultAlias ("System.Net.Http.WebRequest.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ComVisible (false)]
+
diff --git a/mcs/class/System.Net.Http.WebRequest/Makefile b/mcs/class/System.Net.Http.WebRequest/Makefile
new file mode 100644 (file)
index 0000000..2af118a
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Net.Http.WebRequest
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Net.Http.WebRequest.dll
+
+LIB_MCS_FLAGS = -r:System.Net.Http.dll -r:System.dll
+
+TEST_MCS_FLAGS = -r:System.Net.Http.dll
+
+include ../../build/library.make
diff --git a/mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest.dll.sources b/mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest.dll.sources
new file mode 100644 (file)
index 0000000..ea3f5d0
--- /dev/null
@@ -0,0 +1,4 @@
+../../build/common/Consts.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Net.Http.WebRequest/WebRequestHandler.cs
diff --git a/mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest/WebRequestHandler.cs b/mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest/WebRequestHandler.cs
new file mode 100644 (file)
index 0000000..b19e6b8
--- /dev/null
@@ -0,0 +1,154 @@
+//
+// WebRequestHandler.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.Net.Cache;
+using System.Net.Security;
+using System.Security.Principal;
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.Net.Http
+{
+       public class WebRequestHandler : HttpClientHandler
+       {
+               bool allowPipelining;
+               RequestCachePolicy cachePolicy;
+               AuthenticationLevel authenticationLevel;
+               TimeSpan continueTimeout;
+               TokenImpersonationLevel impersonationLevel;
+               int maxResponseHeadersLength;
+               int readWriteTimeout;
+               RemoteCertificateValidationCallback serverCertificateValidationCallback;
+               bool unsafeAuthenticatedConnectionSharing;
+
+               public WebRequestHandler ()
+               {
+                       allowPipelining = true;
+                       authenticationLevel = AuthenticationLevel.MutualAuthRequested;
+                       cachePolicy = System.Net.WebRequest.DefaultCachePolicy;
+                       continueTimeout = TimeSpan.FromMilliseconds (350);
+                       impersonationLevel = TokenImpersonationLevel.Delegation;
+                       maxResponseHeadersLength = HttpWebRequest.DefaultMaximumResponseHeadersLength;
+                       readWriteTimeout = 300000;
+                       serverCertificateValidationCallback = null;
+                       unsafeAuthenticatedConnectionSharing = false;
+               }
+
+               public bool AllowPipelining {
+                       get { return allowPipelining; }
+                       set {
+                               EnsureModifiability ();
+                               allowPipelining = value;
+                       }
+               }
+
+               public RequestCachePolicy CachePolicy {
+                       get { return cachePolicy; }
+                       set {
+                               EnsureModifiability ();
+                               cachePolicy = value;
+                       }
+               }
+
+               public AuthenticationLevel AuthenticationLevel {
+                       get { return authenticationLevel; }
+                       set {
+                               EnsureModifiability ();
+                               authenticationLevel = value;
+                       }
+               }
+
+               [MonoTODO]
+               public X509CertificateCollection ClientCertificates {
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public TimeSpan ContinueTimeout {
+                       get { return continueTimeout; }
+                       set {
+                               EnsureModifiability ();
+                               continueTimeout = value;
+                       }
+               }
+
+               public TokenImpersonationLevel ImpersonationLevel {
+                       get { return impersonationLevel; }
+                       set {
+                               EnsureModifiability ();
+                               impersonationLevel = value;
+                       }
+               }
+
+               public int MaxResponseHeadersLength {
+                       get { return maxResponseHeadersLength; }
+                       set {
+                               EnsureModifiability ();
+                               maxResponseHeadersLength = value;
+                       }
+               }
+
+               public int ReadWriteTimeout {
+                       get { return readWriteTimeout; }
+                       set {
+                               EnsureModifiability ();
+                               readWriteTimeout = value;
+                       }
+               }
+
+               [MonoTODO]
+               public RemoteCertificateValidationCallback ServerCertificateValidationCallback {
+                       get { return serverCertificateValidationCallback; }
+                       set {
+                               EnsureModifiability ();
+                               serverCertificateValidationCallback = value;
+                       }
+               }
+
+               public bool UnsafeAuthenticatedConnectionSharing {
+                       get { return unsafeAuthenticatedConnectionSharing; }
+                       set {
+                               EnsureModifiability ();
+                               unsafeAuthenticatedConnectionSharing = value;
+                       }
+               }
+
+               internal override HttpWebRequest CreateWebRequest (HttpRequestMessage request)
+               {
+                       HttpWebRequest wr = base.CreateWebRequest (request);
+
+                       wr.Pipelined = allowPipelining;
+                       wr.AuthenticationLevel = authenticationLevel;
+                       wr.CachePolicy = cachePolicy;
+                       wr.ImpersonationLevel = impersonationLevel;
+                       wr.MaximumResponseHeadersLength = maxResponseHeadersLength;
+                       wr.ReadWriteTimeout = readWriteTimeout;
+                       wr.UnsafeAuthenticatedConnectionSharing = unsafeAuthenticatedConnectionSharing;
+
+                       return wr;
+               }
+       }
+}
+
index 869ab38bc95ef97f051374682be282473a69ef47..8e2d0dfeff3a1fff94f8d6626e08e82d7df944f4 100644 (file)
@@ -57,3 +57,5 @@ using System.Runtime.InteropServices;
 
 [assembly: ComVisible (false)]
 
+[assembly: InternalsVisibleTo ("System.Net.Http.WebRequest, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
+
index f8d351e243f937b88bf6f3e97da9a49c80833a98..042fa7cd2dca2c1e6046f1912e890c4078a8a655 100644 (file)
@@ -85,7 +85,8 @@ namespace System.Net.Http.Headers
                                        throw new ArgumentNullException ("MediaType");
 
                                string temp;
-                               if (TryParseMediaType (new Lexer (value), out temp) != Token.Type.End)
+                               var token = TryParseMediaType (new Lexer (value), out temp);
+                               if (token == null || token.Value.Kind != Token.Type.End)
                                        throw new FormatException ();
 
                                media_type = temp;
index 2714835fee85f637165a8799484d14482ff6c1fa..1e1fcbf1021ffd69ea9e7814a9b69bbffec4c2c5 100644 (file)
@@ -38,7 +38,7 @@ namespace System.Net.Http
                static readonly TimeSpan TimeoutDefault = TimeSpan.FromSeconds (100);
 
                Uri base_address;
-               CancellationTokenSource cancellation_token;
+               CancellationTokenSource cts;
                bool disposed;
                HttpRequestHeaders headers;
                long buffer_size;
@@ -59,6 +59,7 @@ namespace System.Net.Http
                {
                        buffer_size = int.MaxValue;
                        timeout = TimeoutDefault;
+                       cts = new CancellationTokenSource ();
                }
 
                public Uri BaseAddress {
@@ -102,10 +103,9 @@ namespace System.Net.Http
 
                public void CancelPendingRequests ()
                {
-                       if (cancellation_token != null)
-                               cancellation_token.Cancel ();
-
-                       cancellation_token = new CancellationTokenSource ();
+                       // Cancel only any already running requests not any new request after this cancellation
+                       using (var c = Interlocked.Exchange (ref cts, new CancellationTokenSource ()))
+                               c.Cancel ();
                }
 
                protected override void Dispose (bool disposing)
@@ -113,8 +113,7 @@ namespace System.Net.Http
                        if (disposing && !disposed) {
                                disposed = true;
 
-                               if (cancellation_token != null)
-                                       cancellation_token.Dispose ();
+                               cts.Dispose ();
                        }
                        
                        base.Dispose (disposing);
@@ -264,33 +263,25 @@ namespace System.Net.Http
 
                async Task<HttpResponseMessage> SendAsyncWorker (HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
                {
-                       try {
-                               if (cancellation_token == null)
-                                       cancellation_token = new CancellationTokenSource ();
-
-                               using (var cts = CancellationTokenSource.CreateLinkedTokenSource (cancellation_token.Token, cancellationToken)) {
-                                       cts.CancelAfter (timeout);
+                       using (var lcts = CancellationTokenSource.CreateLinkedTokenSource (cts.Token, cancellationToken)) {
+                               lcts.CancelAfter (timeout);
 
-                                       var task = base.SendAsync (request, cts.Token);
-                                       if (task == null)
-                                               throw new InvalidOperationException ("Handler failed to return a value");
+                               var task = base.SendAsync (request, lcts.Token);
+                               if (task == null)
+                                       throw new InvalidOperationException ("Handler failed to return a value");
                                        
-                                       var response = await task.ConfigureAwait (false);
-                                       if (response == null)
-                                               throw new InvalidOperationException ("Handler failed to return a response");
-
-                                       //
-                                       // Read the content when default HttpCompletionOption.ResponseContentRead is set
-                                       //
-                                       if (response.Content != null && (completionOption & HttpCompletionOption.ResponseHeadersRead) == 0) {
-                                               await response.Content.LoadIntoBufferAsync (MaxResponseContentBufferSize).ConfigureAwait (false);
-                                       }
-                                       
-                                       return response;
+                               var response = await task.ConfigureAwait (false);
+                               if (response == null)
+                                       throw new InvalidOperationException ("Handler failed to return a response");
+
+                               //
+                               // Read the content when default HttpCompletionOption.ResponseContentRead is set
+                               //
+                               if (response.Content != null && (completionOption & HttpCompletionOption.ResponseHeadersRead) == 0) {
+                                       await response.Content.LoadIntoBufferAsync (MaxResponseContentBufferSize).ConfigureAwait (false);
                                }
-                       } finally {
-                               cancellation_token.Dispose ();
-                               cancellation_token = null;
+                                       
+                               return response;
                        }
                }
 
index 68004b990133bdb3f1956725e540b8fcc320f63c..720fc6812a678f156118c326c70056744dd58525 100644 (file)
@@ -58,7 +58,7 @@ namespace System.Net.Http
                        useProxy = true;
                }
 
-               void EnsureModifiability ()
+               internal void EnsureModifiability ()
                {
                        if (sentRequest)
                                throw new InvalidOperationException (
@@ -219,7 +219,7 @@ namespace System.Net.Http
                        base.Dispose (disposing);
                }
 
-               HttpWebRequest CreateWebRequest (HttpRequestMessage request)
+               internal virtual HttpWebRequest CreateWebRequest (HttpRequestMessage request)
                {
                        var wr = new HttpWebRequest (request.RequestUri);
                        wr.ThrowOnError = false;
index 6651be4a64fac113d36b852cf72cbec8efe32fa4..818a90d855220117589cf4367f7176b64f02d677 100644 (file)
@@ -684,6 +684,16 @@ namespace MonoTests.System.Net.Http
                        Assert.That (client.GetStringAsync ("Computer").Result != null);
                }
 
+               [Test]
+               [Category ("MobileNotWorking")] // Missing encoding
+               public void GetString_Many ()
+               {
+                       var client = new HttpClient ();
+                       var t1 = client.GetStringAsync ("http://www.google.com");
+                       var t2 = client.GetStringAsync ("http://www.google.com");
+                       Assert.IsTrue (Task.WaitAll (new [] { t1, t2 }, WaitTimeout));          
+               }
+
                [Test]
                public void GetByteArray_ServerError ()
                {
index cba210eaad92cc4808eca35434490e248e989cb1..f6f242108e615d0a367b751a56de97c7b050976f 100644 (file)
@@ -44,7 +44,8 @@
   </PropertyGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <ItemGroup>\r
-    <Compile Include="Test\System.Numerics\BigIntegerTest.cs" />\r  </ItemGroup>\r
+    <Compile Include="Test\System.Numerics\BigIntegerTest.cs" />\r
+    <Compile Include="Test\System.Numerics\ComplexTest.cs" />\r  </ItemGroup>\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
        Other similar extension points exist, see Microsoft.Common.targets.\r
   <Target Name="BeforeBuild">\r
index d1429d9435fe69ba29d818b82147c7211c201c6b..8b420cf10d32b528774a7952928c0756bd8b12dc 100644 (file)
@@ -44,7 +44,8 @@
   </PropertyGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <ItemGroup>\r
-    <Compile Include="Test\System.Numerics\BigIntegerTest.cs" />\r  </ItemGroup>\r
+    <Compile Include="Test\System.Numerics\BigIntegerTest.cs" />\r
+    <Compile Include="Test\System.Numerics\ComplexTest.cs" />\r  </ItemGroup>\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
        Other similar extension points exist, see Microsoft.Common.targets.\r
   <Target Name="BeforeBuild">\r
index 39c80a6bd379b1a8c8f82856e2e39058535a9b44..816ca2ffceeb3a6a250e8b1f682e77919a3f658d 100644 (file)
@@ -324,7 +324,7 @@ namespace System.Numerics {
                }
 
                public bool IsEven {
-                       get { return (data [0] & 0x1) == 0; }
+                       get { return sign == 0 || (data [0] & 0x1) == 0; }
                }               
 
                public bool IsOne {
@@ -384,6 +384,8 @@ namespace System.Numerics {
 
                public static explicit operator int (BigInteger value)
                {
+                       if (value.sign == 0)
+                               return 0;
                        if (value.data.Length > 1)
                                throw new OverflowException ();
                        uint data = value.data [0];
@@ -404,6 +406,8 @@ namespace System.Numerics {
                [CLSCompliantAttribute (false)]
                public static explicit operator uint (BigInteger value)
                {
+                       if (value.sign == 0)
+                               return 0;
                        if (value.data.Length > 1 || value.sign == -1)
                                throw new OverflowException ();
                        return value.data [0];
@@ -478,6 +482,8 @@ namespace System.Numerics {
                [CLSCompliantAttribute (false)]
                public static explicit operator ulong (BigInteger value)
                {
+                       if (value.sign == 0)
+                               return 0;
                        if (value.data.Length > 2 || value.sign == -1)
                                throw new OverflowException ();
 
@@ -741,6 +747,9 @@ namespace System.Numerics {
 
                public static BigInteger operator++ (BigInteger value)
                {
+                       if (value.sign == 0)
+                               return One;
+
                        short sign = value.sign;
                        uint[] data = value.data;
                        if (data.Length == 1) {
@@ -760,6 +769,9 @@ namespace System.Numerics {
 
                public static BigInteger operator-- (BigInteger value)
                {
+                       if (value.sign == 0)
+                               return MinusOne;
+
                        short sign = value.sign;
                        uint[] data = value.data;
                        if (data.Length == 1) {
@@ -1033,11 +1045,18 @@ namespace System.Numerics {
                        int bit_shift = shift & 0x1F;
                        int carry_shift = 32 - bit_shift;
 
-                       for (int i = 0; i < data.Length; ++i) {
-                               uint word = data [i];
-                               res [i + idx_shift] |= word << bit_shift;
-                               if (i + idx_shift + 1 < res.Length)
-                                       res [i + idx_shift + 1] = word >> carry_shift;
+                       if (carry_shift == 32) {
+                               for (int i = 0; i < data.Length; ++i) {
+                                       uint word = data [i];
+                                       res [i + idx_shift] |= word << bit_shift;
+                               }
+                       } else {
+                               for (int i = 0; i < data.Length; ++i) {
+                                       uint word = data [i];
+                                       res [i + idx_shift] |= word << bit_shift;
+                                       if (i + idx_shift + 1 < res.Length)
+                                               res [i + idx_shift + 1] = word >> carry_shift;
+                               }
                        }
 
                        return new BigInteger ((short)sign, res);
@@ -1071,13 +1090,23 @@ namespace System.Numerics {
                        uint[] res = new uint [size];
                        int carry_shift = 32 - bit_shift;
 
-                       for (int i = data.Length - 1; i >= idx_shift; --i) {
-                               uint word = data [i];
+                       if (carry_shift == 32) {
+                               for (int i = data.Length - 1; i >= idx_shift; --i) {
+                                       uint word = data [i];
+
+                                       if (i - idx_shift < res.Length)
+                                               res [i - idx_shift] |= word >> bit_shift;
+                               }
+                       } else {
+                               for (int i = data.Length - 1; i >= idx_shift; --i) {
+                                       uint word = data [i];
+
+                                       if (i - idx_shift < res.Length)
+                                               res [i - idx_shift] |= word >> bit_shift;
+                                       if (i - idx_shift - 1 >= 0)
+                                               res [i - idx_shift - 1] = word << carry_shift;
+                               }
 
-                               if (i - idx_shift < res.Length)
-                                       res [i - idx_shift] |= word >> bit_shift;
-                               if (i - idx_shift - 1 >= 0)
-                                       res [i - idx_shift - 1] = word << carry_shift;
                        }
 
                        //Round down instead of toward zero
@@ -1273,9 +1302,13 @@ namespace System.Numerics {
                {
                        if (sign != other.sign)
                                return false;
-                       if (data.Length != other.data.Length)
+
+                       int alen = data != null ? data.Length : 0;
+                       int blen = other.data != null ? other.data.Length : 0;
+
+                       if (alen != blen)
                                return false;
-                       for (int i = 0; i < data.Length; ++i) {
+                       for (int i = 0; i < alen; ++i) {
                                if (data [i] != other.data [i])
                                        return false;
                        }
@@ -1687,14 +1720,14 @@ namespace System.Numerics {
 
                public static BigInteger GreatestCommonDivisor (BigInteger left, BigInteger right)
                {
-                       if (left.data.Length == 1 && left.data [0] == 1)
+                       if (left.sign != 0 && left.data.Length == 1 && left.data [0] == 1)
                                return new BigInteger (1, ONE);
-                       if (right.data.Length == 1 && right.data [0] == 1)
+                       if (right.sign != 0 && right.data.Length == 1 && right.data [0] == 1)
                                return new BigInteger (1, ONE);
                        if (left.IsZero)
-                               return right;
+                               return Abs(right);
                        if (right.IsZero)
-                               return left;
+                               return Abs(left);
 
                        BigInteger x = new BigInteger (1, left.data);
                        BigInteger y = new BigInteger (1, right.data);
@@ -1801,8 +1834,9 @@ namespace System.Numerics {
                public override int GetHashCode ()
                {
                        uint hash = (uint)(sign * 0x01010101u);
+                       int len = data != null ? data.Length : 0;
 
-                       for (int i = 0; i < data.Length; ++i)
+                       for (int i = 0; i < len; ++i)
                                hash ^= data [i];
                        return (int)hash;
                }
@@ -2168,8 +2202,8 @@ namespace System.Numerics {
 
                static int CoreCompare (uint[] a, uint[] b)
                {
-                       int     al = a.Length;
-                       int bl = b.Length;
+                       int al = a != null ? a.Length : 0;
+                       int bl = b != null ? b.Length : 0;
 
                        if (al > bl)
                                return 1;
index 7871730a242a8fc87af6cc2af273a0ac381e5844..02bc81a4533a275892a918af2d6424a9c9c155a8 100644 (file)
@@ -1,3 +1,13 @@
+2013-06-12 Christoph Ruegg <git@cdrnet.ch>
+
+       * BigInteger.cs: Fix GreatestCommonDivisor to
+       return absolute value if one of the args is zero.
+
+2013-06-09 Christoph Ruegg <git@cdrnet.ch>
+
+       * Complex.cs: Fix IFormattable.ToString to pass custom
+       format strings to double.ToString instead of string.Format.
+
 2010-07-12  Jb Evain  <jbevain@novell.com>
 
        * Complex.cs: implement IFormattable.
index 7f870fce6601c182fe57bc1e3f1ff8c3ec430aa5..6c172751b38ec23c1ae4deb7ede853e274f63733 100644 (file)
@@ -338,12 +338,12 @@ namespace System.Numerics {
 
                public string ToString (string format)
                {
-                       return string.Format ("({0}, {1})", string.Format (format, real), string.Format (format, imaginary));
+                       return string.Format ("({0}, {1})", real.ToString (format), imaginary.ToString (format));
                }
 
                public string ToString (string format, IFormatProvider provider)
                {
-                       return string.Format ("({0}, {1})", string.Format (provider, format, real), string.Format (provider, format, imaginary));
+                       return string.Format ("({0}, {1})", real.ToString (format, provider), imaginary.ToString (format, provider));
                }
        }
 }
index 27223aee50d231fe926ffb63f41e477ae9698405..3511abf825567cc4e5ff77c724ce2016d0f6d5f4 100644 (file)
@@ -1 +1,2 @@
 System.Numerics/BigIntegerTest.cs
+System.Numerics/ComplexTest.cs
index cc20c787370d768ee4be0506bbe8293c09ba9d7f..098c50854b78f1be97ebd61df42710541e7ccbbc 100644 (file)
@@ -150,6 +150,9 @@ namespace MonoTests.System.Numerics
                        Assert.AreEqual (2, (int)BigInteger.GreatestCommonDivisor (-12345678, -8765432), "#14");
 
                        Assert.AreEqual (40, (int)BigInteger.GreatestCommonDivisor (5581 * 40, 6671 * 40), "#15");
+
+                       Assert.AreEqual (5, (int)BigInteger.GreatestCommonDivisor (-5, 0), "#16");
+                       Assert.AreEqual (5, (int)BigInteger.GreatestCommonDivisor (0, -5), "#17");
                }
 
                [Test]
@@ -925,5 +928,222 @@ namespace MonoTests.System.Numerics
                        Assert.AreEqual (-1, b.CompareTo (2000));
                        Assert.AreEqual (-1, b.CompareTo (-2000));
                }
+
+               [Test]
+               public void LeftShitByInt ()
+               {
+                       var v = BigInteger.Parse("230794411440927908251127453634");
+
+                       Assert.AreEqual ("230794411440927908251127453634", (v << 0).ToString (), "#0");
+                       Assert.AreEqual ("461588822881855816502254907268", (v << 1).ToString (), "#1");
+                       Assert.AreEqual ("923177645763711633004509814536", (v << 2).ToString (), "#2");
+                       Assert.AreEqual ("1846355291527423266009019629072", (v << 3).ToString (), "#3");
+                       Assert.AreEqual ("3692710583054846532018039258144", (v << 4).ToString (), "#4");
+                       Assert.AreEqual ("7385421166109693064036078516288", (v << 5).ToString (), "#5");
+                       Assert.AreEqual ("14770842332219386128072157032576", (v << 6).ToString (), "#6");
+                       Assert.AreEqual ("29541684664438772256144314065152", (v << 7).ToString (), "#7");
+                       Assert.AreEqual ("59083369328877544512288628130304", (v << 8).ToString (), "#8");
+                       Assert.AreEqual ("118166738657755089024577256260608", (v << 9).ToString (), "#9");
+                       Assert.AreEqual ("236333477315510178049154512521216", (v << 10).ToString (), "#10");
+                       Assert.AreEqual ("472666954631020356098309025042432", (v << 11).ToString (), "#11");
+                       Assert.AreEqual ("945333909262040712196618050084864", (v << 12).ToString (), "#12");
+                       Assert.AreEqual ("1890667818524081424393236100169728", (v << 13).ToString (), "#13");
+                       Assert.AreEqual ("3781335637048162848786472200339456", (v << 14).ToString (), "#14");
+                       Assert.AreEqual ("7562671274096325697572944400678912", (v << 15).ToString (), "#15");
+                       Assert.AreEqual ("15125342548192651395145888801357824", (v << 16).ToString (), "#16");
+                       Assert.AreEqual ("30250685096385302790291777602715648", (v << 17).ToString (), "#17");
+                       Assert.AreEqual ("60501370192770605580583555205431296", (v << 18).ToString (), "#18");
+                       Assert.AreEqual ("121002740385541211161167110410862592", (v << 19).ToString (), "#19");
+                       Assert.AreEqual ("242005480771082422322334220821725184", (v << 20).ToString (), "#20");
+                       Assert.AreEqual ("484010961542164844644668441643450368", (v << 21).ToString (), "#21");
+                       Assert.AreEqual ("968021923084329689289336883286900736", (v << 22).ToString (), "#22");
+                       Assert.AreEqual ("1936043846168659378578673766573801472", (v << 23).ToString (), "#23");
+                       Assert.AreEqual ("3872087692337318757157347533147602944", (v << 24).ToString (), "#24");
+                       Assert.AreEqual ("7744175384674637514314695066295205888", (v << 25).ToString (), "#25");
+                       Assert.AreEqual ("15488350769349275028629390132590411776", (v << 26).ToString (), "#26");
+                       Assert.AreEqual ("30976701538698550057258780265180823552", (v << 27).ToString (), "#27");
+                       Assert.AreEqual ("61953403077397100114517560530361647104", (v << 28).ToString (), "#28");
+                       Assert.AreEqual ("123906806154794200229035121060723294208", (v << 29).ToString (), "#29");
+                       Assert.AreEqual ("247813612309588400458070242121446588416", (v << 30).ToString (), "#30");
+                       Assert.AreEqual ("495627224619176800916140484242893176832", (v << 31).ToString (), "#31");
+                       Assert.AreEqual ("991254449238353601832280968485786353664", (v << 32).ToString (), "#32");
+                       Assert.AreEqual ("1982508898476707203664561936971572707328", (v << 33).ToString (), "#33");
+                       Assert.AreEqual ("3965017796953414407329123873943145414656", (v << 34).ToString (), "#34");
+                       Assert.AreEqual ("7930035593906828814658247747886290829312", (v << 35).ToString (), "#35");
+                       Assert.AreEqual ("15860071187813657629316495495772581658624", (v << 36).ToString (), "#36");
+                       Assert.AreEqual ("31720142375627315258632990991545163317248", (v << 37).ToString (), "#37");
+                       Assert.AreEqual ("63440284751254630517265981983090326634496", (v << 38).ToString (), "#38");
+                       Assert.AreEqual ("126880569502509261034531963966180653268992", (v << 39).ToString (), "#39");
+                       Assert.AreEqual ("253761139005018522069063927932361306537984", (v << 40).ToString (), "#40");
+                       Assert.AreEqual ("507522278010037044138127855864722613075968", (v << 41).ToString (), "#41");
+                       Assert.AreEqual ("1015044556020074088276255711729445226151936", (v << 42).ToString (), "#42");
+                       Assert.AreEqual ("2030089112040148176552511423458890452303872", (v << 43).ToString (), "#43");
+                       Assert.AreEqual ("4060178224080296353105022846917780904607744", (v << 44).ToString (), "#44");
+                       Assert.AreEqual ("8120356448160592706210045693835561809215488", (v << 45).ToString (), "#45");
+                       Assert.AreEqual ("16240712896321185412420091387671123618430976", (v << 46).ToString (), "#46");
+                       Assert.AreEqual ("32481425792642370824840182775342247236861952", (v << 47).ToString (), "#47");
+                       Assert.AreEqual ("64962851585284741649680365550684494473723904", (v << 48).ToString (), "#48");
+                       Assert.AreEqual ("129925703170569483299360731101368988947447808", (v << 49).ToString (), "#49");
+                       Assert.AreEqual ("259851406341138966598721462202737977894895616", (v << 50).ToString (), "#50");
+                       Assert.AreEqual ("519702812682277933197442924405475955789791232", (v << 51).ToString (), "#51");
+                       Assert.AreEqual ("1039405625364555866394885848810951911579582464", (v << 52).ToString (), "#52");
+                       Assert.AreEqual ("2078811250729111732789771697621903823159164928", (v << 53).ToString (), "#53");
+                       Assert.AreEqual ("4157622501458223465579543395243807646318329856", (v << 54).ToString (), "#54");
+                       Assert.AreEqual ("8315245002916446931159086790487615292636659712", (v << 55).ToString (), "#55");
+                       Assert.AreEqual ("16630490005832893862318173580975230585273319424", (v << 56).ToString (), "#56");
+                       Assert.AreEqual ("33260980011665787724636347161950461170546638848", (v << 57).ToString (), "#57");
+                       Assert.AreEqual ("66521960023331575449272694323900922341093277696", (v << 58).ToString (), "#58");
+                       Assert.AreEqual ("133043920046663150898545388647801844682186555392", (v << 59).ToString (), "#59");
+                       Assert.AreEqual ("266087840093326301797090777295603689364373110784", (v << 60).ToString (), "#60");
+                       Assert.AreEqual ("532175680186652603594181554591207378728746221568", (v << 61).ToString (), "#61");
+                       Assert.AreEqual ("1064351360373305207188363109182414757457492443136", (v << 62).ToString (), "#62");
+                       Assert.AreEqual ("2128702720746610414376726218364829514914984886272", (v << 63).ToString (), "#63");
+                       Assert.AreEqual ("4257405441493220828753452436729659029829969772544", (v << 64).ToString (), "#64");
+                       Assert.AreEqual ("8514810882986441657506904873459318059659939545088", (v << 65).ToString (), "#65");
+                       Assert.AreEqual ("17029621765972883315013809746918636119319879090176", (v << 66).ToString (), "#66");
+                       Assert.AreEqual ("34059243531945766630027619493837272238639758180352", (v << 67).ToString (), "#67");
+                       Assert.AreEqual ("68118487063891533260055238987674544477279516360704", (v << 68).ToString (), "#68");
+                       Assert.AreEqual ("136236974127783066520110477975349088954559032721408", (v << 69).ToString (), "#69");
+               }
+
+
+               [Test]
+               public void RightShitByInt ()
+               {
+                       var v = BigInteger.Parse("230794411440927908251127453634");
+                       v = v * BigInteger.Pow (2, 70);
+
+                       Assert.AreEqual ("272473948255566133040220955950698177909118065442816", (v >> 0).ToString (), "#0");
+                       Assert.AreEqual ("136236974127783066520110477975349088954559032721408", (v >> 1).ToString (), "#1");
+                       Assert.AreEqual ("68118487063891533260055238987674544477279516360704", (v >> 2).ToString (), "#2");
+                       Assert.AreEqual ("34059243531945766630027619493837272238639758180352", (v >> 3).ToString (), "#3");
+                       Assert.AreEqual ("17029621765972883315013809746918636119319879090176", (v >> 4).ToString (), "#4");
+                       Assert.AreEqual ("8514810882986441657506904873459318059659939545088", (v >> 5).ToString (), "#5");
+                       Assert.AreEqual ("4257405441493220828753452436729659029829969772544", (v >> 6).ToString (), "#6");
+                       Assert.AreEqual ("2128702720746610414376726218364829514914984886272", (v >> 7).ToString (), "#7");
+                       Assert.AreEqual ("1064351360373305207188363109182414757457492443136", (v >> 8).ToString (), "#8");
+                       Assert.AreEqual ("532175680186652603594181554591207378728746221568", (v >> 9).ToString (), "#9");
+                       Assert.AreEqual ("266087840093326301797090777295603689364373110784", (v >> 10).ToString (), "#10");
+                       Assert.AreEqual ("133043920046663150898545388647801844682186555392", (v >> 11).ToString (), "#11");
+                       Assert.AreEqual ("66521960023331575449272694323900922341093277696", (v >> 12).ToString (), "#12");
+                       Assert.AreEqual ("33260980011665787724636347161950461170546638848", (v >> 13).ToString (), "#13");
+                       Assert.AreEqual ("16630490005832893862318173580975230585273319424", (v >> 14).ToString (), "#14");
+                       Assert.AreEqual ("8315245002916446931159086790487615292636659712", (v >> 15).ToString (), "#15");
+                       Assert.AreEqual ("4157622501458223465579543395243807646318329856", (v >> 16).ToString (), "#16");
+                       Assert.AreEqual ("2078811250729111732789771697621903823159164928", (v >> 17).ToString (), "#17");
+                       Assert.AreEqual ("1039405625364555866394885848810951911579582464", (v >> 18).ToString (), "#18");
+                       Assert.AreEqual ("519702812682277933197442924405475955789791232", (v >> 19).ToString (), "#19");
+                       Assert.AreEqual ("259851406341138966598721462202737977894895616", (v >> 20).ToString (), "#20");
+                       Assert.AreEqual ("129925703170569483299360731101368988947447808", (v >> 21).ToString (), "#21");
+                       Assert.AreEqual ("64962851585284741649680365550684494473723904", (v >> 22).ToString (), "#22");
+                       Assert.AreEqual ("32481425792642370824840182775342247236861952", (v >> 23).ToString (), "#23");
+                       Assert.AreEqual ("16240712896321185412420091387671123618430976", (v >> 24).ToString (), "#24");
+                       Assert.AreEqual ("8120356448160592706210045693835561809215488", (v >> 25).ToString (), "#25");
+                       Assert.AreEqual ("4060178224080296353105022846917780904607744", (v >> 26).ToString (), "#26");
+                       Assert.AreEqual ("2030089112040148176552511423458890452303872", (v >> 27).ToString (), "#27");
+                       Assert.AreEqual ("1015044556020074088276255711729445226151936", (v >> 28).ToString (), "#28");
+                       Assert.AreEqual ("507522278010037044138127855864722613075968", (v >> 29).ToString (), "#29");
+                       Assert.AreEqual ("253761139005018522069063927932361306537984", (v >> 30).ToString (), "#30");
+                       Assert.AreEqual ("126880569502509261034531963966180653268992", (v >> 31).ToString (), "#31");
+                       Assert.AreEqual ("63440284751254630517265981983090326634496", (v >> 32).ToString (), "#32");
+                       Assert.AreEqual ("31720142375627315258632990991545163317248", (v >> 33).ToString (), "#33");
+                       Assert.AreEqual ("15860071187813657629316495495772581658624", (v >> 34).ToString (), "#34");
+                       Assert.AreEqual ("7930035593906828814658247747886290829312", (v >> 35).ToString (), "#35");
+                       Assert.AreEqual ("3965017796953414407329123873943145414656", (v >> 36).ToString (), "#36");
+                       Assert.AreEqual ("1982508898476707203664561936971572707328", (v >> 37).ToString (), "#37");
+                       Assert.AreEqual ("991254449238353601832280968485786353664", (v >> 38).ToString (), "#38");
+                       Assert.AreEqual ("495627224619176800916140484242893176832", (v >> 39).ToString (), "#39");
+                       Assert.AreEqual ("247813612309588400458070242121446588416", (v >> 40).ToString (), "#40");
+                       Assert.AreEqual ("123906806154794200229035121060723294208", (v >> 41).ToString (), "#41");
+                       Assert.AreEqual ("61953403077397100114517560530361647104", (v >> 42).ToString (), "#42");
+                       Assert.AreEqual ("30976701538698550057258780265180823552", (v >> 43).ToString (), "#43");
+                       Assert.AreEqual ("15488350769349275028629390132590411776", (v >> 44).ToString (), "#44");
+                       Assert.AreEqual ("7744175384674637514314695066295205888", (v >> 45).ToString (), "#45");
+                       Assert.AreEqual ("3872087692337318757157347533147602944", (v >> 46).ToString (), "#46");
+                       Assert.AreEqual ("1936043846168659378578673766573801472", (v >> 47).ToString (), "#47");
+                       Assert.AreEqual ("968021923084329689289336883286900736", (v >> 48).ToString (), "#48");
+                       Assert.AreEqual ("484010961542164844644668441643450368", (v >> 49).ToString (), "#49");
+                       Assert.AreEqual ("242005480771082422322334220821725184", (v >> 50).ToString (), "#50");
+                       Assert.AreEqual ("121002740385541211161167110410862592", (v >> 51).ToString (), "#51");
+                       Assert.AreEqual ("60501370192770605580583555205431296", (v >> 52).ToString (), "#52");
+                       Assert.AreEqual ("30250685096385302790291777602715648", (v >> 53).ToString (), "#53");
+                       Assert.AreEqual ("15125342548192651395145888801357824", (v >> 54).ToString (), "#54");
+                       Assert.AreEqual ("7562671274096325697572944400678912", (v >> 55).ToString (), "#55");
+                       Assert.AreEqual ("3781335637048162848786472200339456", (v >> 56).ToString (), "#56");
+                       Assert.AreEqual ("1890667818524081424393236100169728", (v >> 57).ToString (), "#57");
+                       Assert.AreEqual ("945333909262040712196618050084864", (v >> 58).ToString (), "#58");
+                       Assert.AreEqual ("472666954631020356098309025042432", (v >> 59).ToString (), "#59");
+                       Assert.AreEqual ("236333477315510178049154512521216", (v >> 60).ToString (), "#60");
+                       Assert.AreEqual ("118166738657755089024577256260608", (v >> 61).ToString (), "#61");
+                       Assert.AreEqual ("59083369328877544512288628130304", (v >> 62).ToString (), "#62");
+                       Assert.AreEqual ("29541684664438772256144314065152", (v >> 63).ToString (), "#63");
+                       Assert.AreEqual ("14770842332219386128072157032576", (v >> 64).ToString (), "#64");
+                       Assert.AreEqual ("7385421166109693064036078516288", (v >> 65).ToString (), "#65");
+                       Assert.AreEqual ("3692710583054846532018039258144", (v >> 66).ToString (), "#66");
+                       Assert.AreEqual ("1846355291527423266009019629072", (v >> 67).ToString (), "#67");
+                       Assert.AreEqual ("923177645763711633004509814536", (v >> 68).ToString (), "#68");
+                       Assert.AreEqual ("461588822881855816502254907268", (v >> 69).ToString (), "#69");
+               }
+
+               [Test]
+               public void Bug10887 ()
+               {
+                       BigInteger b = 0;
+                       for(int i = 1; i <= 16; i++)
+                               b = b * 256 + i;
+                       BigInteger p = BigInteger.Pow (2, 32);
+                       Assert.AreEqual ("1339673755198158349044581307228491536", b.ToString (), "#1");
+                       Assert.AreEqual ("1339673755198158349044581307228491536", ((b << 32) / p).ToString (), "#2");
+                       Assert.AreEqual ("1339673755198158349044581307228491536", (b * p >> 32).ToString (), "#3");
+               }
+
+               [Test]
+               public void DefaultCtorWorks ()
+               {
+                       var a = new BigInteger ();
+                       Assert.AreEqual (BigInteger.One, ++a, "#1");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (BigInteger.MinusOne, --a, "#2");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (BigInteger.MinusOne, ~a, "#3");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual ("0", a.ToString (), "#4");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (true, a == a, "#5");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (false, a < a, "#6");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (true, a < 10l, "#7");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (true, a.IsEven, "#8");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (0, (int)a, "#9");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (0, (uint)a, "#10");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (0, (ulong)a, "#11");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (true, a.Equals (a), "#12");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (a, BigInteger.Min (a, a), "#13");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (a, BigInteger.GreatestCommonDivisor (a, a), "#14");
+
+                       a = new BigInteger ();
+                       Assert.AreEqual (BigInteger.Zero.GetHashCode (), a.GetHashCode (), "#15");
+               }
        }
 }
index 45754ed8bdb49db5d1f7e47e0af0ba63eabaf37c..ec7ae1f94b4cf85f9518da5f72c4ce43323a6bc6 100644 (file)
@@ -1,3 +1,13 @@
+2013-06-13 Christoph Ruegg <git@cdrnet.ch>
+
+       * BigIntegerTest.cs: Extended tests for
+       GreatestCommonDivisor to cover zero-args.
+
+2013-06-09 Christoph Ruegg <git@cdrnet.ch>
+
+       * ComplexTest.cs: Created; Tests ToString
+       with special format strings.
+
 2010-03-06 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * BigIntegerTest.cs: Tests for decimal stuff.
diff --git a/mcs/class/System.Numerics/Test/System.Numerics/ComplexTest.cs b/mcs/class/System.Numerics/Test/System.Numerics/ComplexTest.cs
new file mode 100644 (file)
index 0000000..781c2c9
--- /dev/null
@@ -0,0 +1,32 @@
+// ComplexTest.cs
+//
+// Authors:
+//   Christoph Ruegg <git@cdrnet.ch>
+//
+// Copyright (C) 2013 Novell, Inc (http://www.novell.com)
+//
+
+using System;
+using System.Numerics;
+using System.Globalization;
+using NUnit.Framework;
+
+namespace MonoTests.System.Numerics
+{
+       [TestFixture]
+       public class ComplexTest
+       {
+               [Test]
+               public void TestToStringFormats ()
+               {
+                       Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString (), "#1");
+                       Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString ("G"), "#2");
+                       Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString ((string)null), "#3");
+
+                       IFormatProvider provider = CultureInfo.InvariantCulture;
+                       Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString (provider), "#4");
+                       Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString ("G", provider), "#5");
+                       Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString ((string)null, provider), "#6");
+               }
+       }
+}
index dceb63bfc593b3b78d1e5cb2d5da82560fdce2be..45b0ace1186f212f3f6349c4f4fcd40bfc8e10f4 100644 (file)
@@ -65,8 +65,12 @@ namespace System.Runtime.Caching
                        }
 
                        if (heapCount >= heapSize) {
-                               heapSize <<= 1;
-                               Array.Resize <MemoryCacheEntry> (ref heap, heapSize);
+                               checked {
+                                       heapSize <<= 1;
+                               }
+
+                               if (heapSize <= Int32.MaxValue)
+                                       Array.Resize <MemoryCacheEntry> (ref heap, heapSize);
                        }
 
                        return heap;
@@ -78,10 +82,14 @@ namespace System.Runtime.Caching
                                return null;
 
                        if (heapSize > HEAP_RESIZE_THRESHOLD) {
-                               int halfTheSize = heapSize >> 1;
-
-                               if (heapCount < halfTheSize)
-                                       Array.Resize <MemoryCacheEntry> (ref heap, halfTheSize + (heapCount / 3));
+                               int halfTheSize, newSize;
+                               checked {
+                                       halfTheSize = heapSize >> 1;
+                                       newSize = halfTheSize + (heapCount / 3);
+                               }
+
+                               if ((heapCount < halfTheSize) && newSize > -1)
+                                       Array.Resize <MemoryCacheEntry> (ref heap, newSize);
                        }
                        
                        return heap;
@@ -99,7 +107,7 @@ namespace System.Runtime.Caching
                                queueLock.EnterWriteLock ();
                                locked = true;
                                heap = GetHeapWithGrow ();
-                               heap [heapCount++] = item;
+                               heap [checked(heapCount++)] = item;
                                BubbleUp (heap);
                        } finally {
                                if (locked)
@@ -122,7 +130,7 @@ namespace System.Runtime.Caching
                                        return null;
 
                                ret = heap [0];
-                               index = --heapCount;
+                               index = checked(--heapCount);
                                heap [0] = heap [index];
                                heap [index] = null;
                                
@@ -164,7 +172,7 @@ namespace System.Runtime.Caching
                        while (selected < heapCount && heap [selected].ExpiresAt < item.ExpiresAt) {
                                heap [index] = heap [selected];
                                index = selected;
-                               left = (index << 1) + 1;
+                               left = checked((index << 1) + 1);
                                right = left + 1;
                                selected = right < heapCount && heap [right].ExpiresAt < heap [left].ExpiresAt ? right : left;
                        }
@@ -179,8 +187,8 @@ namespace System.Runtime.Caching
                        if (heapCount <= 1)
                                return;
                        
-                       index = heapCount - 1;
-                       parentIndex = (index - 1) >> 1;
+                       index = checked(heapCount - 1);
+                       parentIndex = checked((index - 1) >> 1);
 
                        item = heap [index];
                        while (index > 0) {
index 034604af33bed82559ecfb90958423b47c9120e1..6955048fe34abb22773962d2cbb42ab27907ac86 100644 (file)
@@ -230,10 +230,17 @@ namespace MonoTests.System.Threading.Tasks.Dataflow {
                        scheduler.ExecuteAll ();
                        Assert.IsTrue (target.HasPostponed);
 
-                       ((IDataflowBlock)source).Fault (new Exception ());
+                       var exception = new Exception ();
+                       ((IDataflowBlock)source).Fault (exception);
 
                        scheduler.ExecuteAll ();
-                       Thread.Sleep (100);
+
+                       try {
+                               source.Completion.Wait (1000);
+                               Assert.Fail ("Task must be faulted");
+                       } catch (AggregateException ex) {
+                               Assert.AreEqual (exception, ex.InnerException, "#9");
+                       }
 
                        Assert.IsTrue (source.Completion.IsFaulted);
                        int value;
@@ -254,27 +261,33 @@ namespace MonoTests.System.Threading.Tasks.Dataflow {
                        var target = new TestTargetBlock<int> { Postpone = true };
                        Assert.IsNotNull (source.LinkTo (target));
 
-                       Assert.IsTrue (source.Post (1));
-                       Assert.IsTrue (source.Post (2));
-                       Assert.IsTrue (source.Post (3));
-                       Thread.Sleep (500);
-                       Assert.IsTrue (target.HasPostponed);
+                       Assert.IsTrue (source.Post (1), "#1");
+                       Assert.IsTrue (source.Post (2), "#2");
+                       Assert.IsTrue (source.Post (3), "#3");
+                       target.PostponedEvent.Wait (1000);
+                       Assert.IsTrue (target.HasPostponed, "#4");
 
-                       ((IDataflowBlock)source).Fault (new Exception ());
+                       var exception = new Exception ();
+                       ((IDataflowBlock)source).Fault (exception);
 
-                       Thread.Sleep (100);
+                       source.Completion.Wait (1000);
 
-                       Assert.IsFalse (source.Completion.IsFaulted);
+                       Assert.IsFalse (source.Completion.IsFaulted, "#5");
                        int value;
-                       Assert.IsTrue (target.RetryPostponed (out value));
-                       Assert.AreEqual (1, value);
+                       Assert.IsTrue (target.RetryPostponed (out value), "#6");
+                       Assert.AreEqual (1, value, "#7");
 
                        evt.Set ();
 
-                       Thread.Sleep (100);
+                       try {
+                               source.Completion.Wait (1000);
+                               Assert.Fail ("Task must be faulted");
+                       } catch (AggregateException ex) {
+                               Assert.AreEqual (exception, ex.InnerException, "#9");
+                       }
 
-                       Assert.IsTrue (source.Completion.IsFaulted);
-                       Assert.IsFalse (target.RetryPostponed (out value));
+                       Assert.IsTrue (source.Completion.IsFaulted, "#10");
+                       Assert.IsFalse (target.RetryPostponed (out value), "#11");
                }
 
                [Test]
@@ -382,6 +395,8 @@ namespace MonoTests.System.Threading.Tasks.Dataflow {
 
                public T DirectlyAccepted { get; private set; }
 
+               public ManualResetEventSlim PostponedEvent = new ManualResetEventSlim ();
+
                public DataflowMessageStatus OfferMessage (
                        DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T> source,
                        bool consumeToAccept)
@@ -391,6 +406,7 @@ namespace MonoTests.System.Threading.Tasks.Dataflow {
 
                        if (Postpone) {
                                postponed = Tuple.Create (source, messageHeader);
+                               PostponedEvent.Set ();
                                return DataflowMessageStatus.Postponed;
                        }
 
index 1a0adfb45ab0f5e6ade87a496643d170239ef591..9d6ece4f8fcf12fa3d986eb5233e029068aab79c 100644 (file)
@@ -85,11 +85,11 @@ namespace MonoTests.System.Threading.Tasks.Dataflow {
                        var action = new ActionBlock<int> (i => received = true);
                        transformMany.LinkTo (action);
 
-                       Assert.IsTrue (transformMany.Post (1));
+                       Assert.IsTrue (transformMany.Post (1), "#1");
 
                        transformMany.Complete ();
-                       Assert.IsTrue (transformMany.Completion.Wait (100));
-                       Assert.IsFalse (received);
+                       Assert.IsTrue (transformMany.Completion.Wait (100), "#2");
+                       Assert.IsFalse (received, "#3");
                }
 
                [Test]
index 1d59b64bd611ac5982589b05176bef0d17380084..320df00fb9b56e06a8e6b6554b593d4c12af82e3 100644 (file)
@@ -55,13 +55,13 @@ namespace MonoTests.System.Threading.Tasks.Dataflow {
                        block.LinkTo (action1);
                        block.LinkTo (action2);
 
-                       Assert.IsTrue (block.Post (42));
-                       Assert.IsFalse (block.Post (43));
+                       Assert.IsTrue (block.Post (42), "#1");
+                       Assert.IsFalse (block.Post (43), "#2");
 
-                       Assert.IsTrue (evt.Wait (100));
+                       Assert.IsTrue (evt.Wait (100), "#3");
 
-                       Assert.IsTrue (act1);
-                       Assert.IsTrue (act2);
+                       Assert.IsTrue (act1, "#4");
+                       Assert.IsTrue (act2, "#5");
                }
 
                [Test]
index 1a6861ddef2bcaf78979d8a5360dbc793b25c454..84e6a859a1286376caafd5fa17e0b8b64c2f99f4 100644 (file)
     <Compile Include="System.Web.Configuration_2.0\IConfigMapPathFactory.cs" />\r
     <Compile Include="System.Web.Configuration_2.0\IdentitySection.cs" />\r
     <Compile Include="System.Web.Configuration_2.0\IRemoteWebConfigurationHostServer.cs" />\r
+    <Compile Include="System.Web.Configuration_2.0\LruCache.cs" />\r
     <Compile Include="System.Web.Configuration_2.0\LowerCaseStringConverter.cs" />\r
     <Compile Include="System.Web.Configuration_2.0\MachineKeyCompatibilityMode.cs" />\r
     <Compile Include="System.Web.Configuration_2.0\MachineKeyRegistryStorage.cs" />\r
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/LruCache.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/LruCache.cs
new file mode 100644 (file)
index 0000000..3bd9599
--- /dev/null
@@ -0,0 +1,144 @@
+//
+// A simple LRU cache
+//
+// Authors:
+//   Miguel de Icaza (miguel@gnome.org)
+//   Andres G. Aragoneses (andres@7digital.com)
+//
+// Copyright 2010 Miguel de Icaza
+// Copyright 2013 7digital Media Ltd.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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;
+
+namespace System.Web.Configuration {
+
+       class LruCache<TKey, TValue> {
+               Dictionary<TKey, LinkedListNode <TValue>> dict;
+               Dictionary<LinkedListNode<TValue>, TKey> revdict;
+               LinkedList<TValue> list;
+               int entry_limit;
+
+               bool eviction_warning_shown;
+               int evictions;
+               bool size_overriden;
+
+               internal string EvictionWarning { set; private get; }
+
+               public LruCache (int entryLimit)
+               {
+                       entry_limit = entryLimit;
+                       dict = new Dictionary<TKey, LinkedListNode<TValue>> ();
+                       revdict = new Dictionary<LinkedListNode<TValue>, TKey> ();
+                       list = new LinkedList<TValue> ();
+               }
+
+               //for debugging: public int Count { get { return dict.Count; } }
+
+               void Evict ()
+               {
+                       var last = list.Last;
+                       if (last == null)
+                               return;
+
+                       var key = revdict [last];
+
+                       dict.Remove (key);
+                       revdict.Remove (last);
+                       list.RemoveLast ();
+                       DisposeValue (last.Value);
+                       evictions++;
+
+                       if (!String.IsNullOrEmpty (EvictionWarning) && !eviction_warning_shown && (evictions >= entry_limit)) {
+                               Console.Error.WriteLine ("WARNING: " + EvictionWarning);
+                               eviction_warning_shown = true;
+                       }
+               }
+
+               public void Clear ()
+               {
+                       foreach (var element in list) {
+                               DisposeValue (element);
+                       }
+
+                       dict.Clear ();
+                       revdict.Clear ();
+                       list.Clear ();
+                       eviction_warning_shown = false;
+                       evictions = 0;
+               }
+
+               void DisposeValue (TValue value)
+               {
+                       if (value is IDisposable) {
+                               ((IDisposable)value).Dispose ();
+                       }
+               }
+
+               public bool TryGetValue (TKey key, out TValue value)
+               {
+                       LinkedListNode<TValue> node;
+
+                       if (dict.TryGetValue (key, out node)){
+                               list.Remove (node);
+                               list.AddFirst (node);
+
+                               value = node.Value;
+                               return true;
+                       }
+                       value = default (TValue);
+                       return false;
+               }
+
+               public void Add (TKey key, TValue value)
+               {
+                       LinkedListNode<TValue> node;
+
+                       if (dict.TryGetValue (key, out node)){
+
+                               // If we already have a key, move it to the front
+                               list.Remove (node);
+                               list.AddFirst (node);
+
+                               // Remove the old value
+                               DisposeValue (node.Value);
+
+                               node.Value = value;
+                               return;
+                       }
+
+                       if (dict.Count >= entry_limit)
+                               Evict ();
+
+                       // Adding new node
+                       node = new LinkedListNode<TValue> (value);
+                       list.AddFirst (node);
+                       dict [key] = node;
+                       revdict [node] = key;
+               }
+
+               public override string ToString ()
+               {
+                       return "LRUCache dict={0} revdict={1} list={2}";
+               }
+       }
+}
index 9c7b8524e48114c8ae935e909c22188d42058ad9..63cca69d6e643b3d3ca11c9190d6861ed01976be 100644 (file)
@@ -72,11 +72,10 @@ namespace System.Web.Configuration {
                
                // See comment for the cacheLock field at top of System.Web.Caching/Cache.cs
                static readonly ReaderWriterLockSlim sectionCacheLock;
-               
+
 #if !TARGET_J2EE
                static IInternalConfigConfigurationFactory configFactory;
                static Hashtable configurations = Hashtable.Synchronized (new Hashtable ());
-               static Dictionary <int, object> sectionCache = new Dictionary <int, object> ();
                static Hashtable configPaths = Hashtable.Synchronized (new Hashtable ());
                static bool suppressAppReload;
 #else
@@ -188,9 +187,28 @@ namespace System.Web.Configuration {
                                }
                        }
                }
+
+               const int DEFAULT_SECTION_CACHE_SIZE = 100;
+               const string CACHE_SIZE_OVERRIDING_KEY = "MONO_ASPNET_WEBCONFIG_CACHESIZE";
+               static LruCache<int, object> sectionCache;
                
                static WebConfigurationManager ()
                {
+                       var section_cache_size = DEFAULT_SECTION_CACHE_SIZE;
+                       int section_cache_size_override;
+                       bool size_overriden = false;
+                       if (int.TryParse (Environment.GetEnvironmentVariable (CACHE_SIZE_OVERRIDING_KEY), out section_cache_size_override)) {
+                               section_cache_size = section_cache_size_override;
+                               size_overriden = true;
+                               Console.WriteLine ("WebConfigurationManager's LRUcache Size overriden to: {0} (via {1})", section_cache_size_override, CACHE_SIZE_OVERRIDING_KEY);
+                       }
+                       sectionCache = new LruCache<int, object> (section_cache_size);
+                       string eviction_warning = "WebConfigurationManager's LRUcache evictions count reached its max size";
+                       if (!size_overriden)
+                               eviction_warning += String.Format ("{0}Cache Size: {1} (overridable via {2})",
+                                                                  Environment.NewLine, section_cache_size, CACHE_SIZE_OVERRIDING_KEY);
+                       sectionCache.EvictionWarning = eviction_warning;
+
                        configFactory = ConfigurationManager.ConfigurationFactory;
                        _Configuration.SaveStart += ConfigurationSaveHandler;
                        _Configuration.SaveEnd += ConfigurationSaveHandler;
@@ -452,7 +470,7 @@ namespace System.Web.Configuration {
                                baseCacheKey ^= configPath.GetHashCode ();
                        
                        try {
-                               sectionCacheLock.EnterReadLock ();
+                               sectionCacheLock.EnterWriteLock ();
                                
                                object o;
                                if (pathPresent) {
@@ -468,7 +486,7 @@ namespace System.Web.Configuration {
                                if (sectionCache.TryGetValue (baseCacheKey, out o))
                                        return o;
                        } finally {
-                               sectionCacheLock.ExitReadLock ();
+                               sectionCacheLock.ExitWriteLock ();
                        }
 
                        string cachePath = null;
@@ -693,29 +711,19 @@ namespace System.Web.Configuration {
                {
                        object cachedSection;
 
+                       bool locked = false;
                        try {
-                               if (!sectionCacheLock.TryEnterUpgradeableReadLock (SECTION_CACHE_LOCK_TIMEOUT))
+                               if (!sectionCacheLock.TryEnterWriteLock (SECTION_CACHE_LOCK_TIMEOUT))
                                        return;
-                                       
+                               locked = true;
+
                                if (sectionCache.TryGetValue (key, out cachedSection) && cachedSection != null)
                                        return;
 
-                               try {
-                                       if (!sectionCacheLock.TryEnterWriteLock (SECTION_CACHE_LOCK_TIMEOUT))
-                                               return;
-                                       sectionCache.Add (key, section);
-                               } finally {
-                                       try {
-                                               sectionCacheLock.ExitWriteLock ();
-                                       } catch (SynchronizationLockException) {
-                                               // we can ignore it here
-                                       }
-                               }
+                               sectionCache.Add (key, section);
                        } finally {
-                               try {
-                                       sectionCacheLock.ExitUpgradeableReadLock ();
-                               } catch (SynchronizationLockException) {
-                                       // we can ignore it here
+                               if (locked) {
+                                       sectionCacheLock.ExitWriteLock ();
                                }
                        }
                }
index 377652f2aef91f01fc32b0b9658ce489580311dc..449b02e34be98f536b35dc7a3f49cc7b3dbb789b 100644 (file)
@@ -191,6 +191,7 @@ System.Web.Configuration_2.0/IConfigMapPath.cs
 System.Web.Configuration_2.0/IConfigMapPathFactory.cs
 System.Web.Configuration_2.0/IRemoteWebConfigurationHostServer.cs
 System.Web.Configuration_2.0/LowerCaseStringConverter.cs
+System.Web.Configuration_2.0/LruCache.cs
 System.Web.Configuration_2.0/MachineKeyRegistryStorage.cs
 System.Web.Configuration_2.0/MachineKeySection.cs
 System.Web.Configuration_2.0/MachineKeyValidation.cs
index ee7207ac3acc06404b4666da21090ec833262642..b92554ec98aaad28d2464d75ed0e31a9b8b22ae0 100644 (file)
@@ -57,7 +57,17 @@ namespace MonoTests.System.Web.Util {
                        // changing last byte (padding)
                        byte be = encdata [encdata.Length - 1];
                        encdata [encdata.Length - 1] = ChangeByte (be);
-                       Assert.IsNull (MachineKeySectionUtils.Decrypt (section, encdata), "bad padding");
+                       byte[] result = MachineKeySectionUtils.Decrypt (section, encdata);
+                       // this will return null if a bad padding is detected - OTOH since we're using a random key and we
+                       // encrypt a random IV it's possible the decrypted stuff will randomly have a "valid" padding (there's
+                       // only so much possible values and the bots runs those tests pretty often and give false positive)
+                       // To avoid this we fallback to ensure the data is invalid (if should be empty)
+                       int total = 0;
+                       if (result != null) {
+                               for (int i=0; i < result.Length; i++)
+                                       total += result [i];
+                       }
+                       Assert.IsTrue (result == null || total != 0, "bad padding");
                }
 
                [Test]
diff --git a/mcs/class/System.Windows/AssemblyInfo.cs b/mcs/class/System.Windows/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..9c9952d
--- /dev/null
@@ -0,0 +1,44 @@
+//
+// TypeForwarders.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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.Windows.dll")]
+[assembly: AssemblyDescription ("System.Windows.dll")]
+[assembly: AssemblyDefaultAlias ("System.Windows.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
diff --git a/mcs/class/System.Windows/Makefile b/mcs/class/System.Windows/Makefile
new file mode 100644 (file)
index 0000000..3ace126
--- /dev/null
@@ -0,0 +1,10 @@
+thisdir = class/System.Windows
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Windows.dll
+LIB_MCS_FLAGS = /r:System
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Windows/System.Windows.dll.sources b/mcs/class/System.Windows/System.Windows.dll.sources
new file mode 100644 (file)
index 0000000..d75b28a
--- /dev/null
@@ -0,0 +1,3 @@
+AssemblyInfo.cs
+TypeForwarders.cs
+../../build/common/Consts.cs
diff --git a/mcs/class/System.Windows/TypeForwarders.cs b/mcs/class/System.Windows/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..18ab654
--- /dev/null
@@ -0,0 +1,36 @@
+//
+// TypeForwarders.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.INotifyCollectionChanged))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ReadOnlyObservableCollection<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedAction))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventHandler))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Windows.Input.ICommand))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.INotifyDataErrorInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataErrorsChangedEventArgs))]
+
diff --git a/mcs/class/System.Xml.Serialization/AssemblyInfo.cs b/mcs/class/System.Xml.Serialization/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..fb3bd00
--- /dev/null
@@ -0,0 +1,44 @@
+//
+// TypeForwarders.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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.Xml.Serialization.dll")]
+[assembly: AssemblyDescription ("System.Xml.Serialization.dll")]
+[assembly: AssemblyDefaultAlias ("System.Xml.Serialization.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
diff --git a/mcs/class/System.Xml.Serialization/Makefile b/mcs/class/System.Xml.Serialization/Makefile
new file mode 100644 (file)
index 0000000..3f8df6b
--- /dev/null
@@ -0,0 +1,10 @@
+thisdir = class/System.Xml.Serialization
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Xml.Serialization.dll
+LIB_MCS_FLAGS = /r:System.Xml /r:System.ServiceModel
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Xml.Serialization/System.Xml.Serialization.dll.sources b/mcs/class/System.Xml.Serialization/System.Xml.Serialization.dll.sources
new file mode 100644 (file)
index 0000000..d75b28a
--- /dev/null
@@ -0,0 +1,3 @@
+AssemblyInfo.cs
+TypeForwarders.cs
+../../build/common/Consts.cs
diff --git a/mcs/class/System.Xml.Serialization/TypeForwarders.cs b/mcs/class/System.Xml.Serialization/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..376e38d
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// TypeForwarders.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlMapping))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlTypeMapping))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlMappingAccess))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlArrayItemAttributes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributeOverrides))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlElementAttributes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyElementAttributes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializerNamespaces))]
+
index 84425f018f70b02a04bc17ffd86cb8eac64b0da7..4a3bd989644fe5b88607775eebbb594d21ba00b6 100644 (file)
@@ -27,7 +27,7 @@ ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 -unsafe $(RESOURCE_FILES:%=-resource:%)
 TEST_MCS_FLAGS += -r:System.Configuration
 PROFILE_ANY_MOBILE := $(filter monotouch monodroid, $(PROFILE))
-NOT_SL := $(filter net_2_0 net_4_0 net_4_5 monotouch monotouch_runtime monodroid mobile, $(PROFILE))
+NOT_SL := $(filter net_2_0 net_4_0 net_4_5 monotouch_runtime monodroid mobile, $(PROFILE))
 endif
 ifeq (2.1, $(FRAMEWORK_VERSION))
 LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
@@ -36,7 +36,7 @@ LIB_MCS_FLAGS += -d:SECURITY_DEP
 endif
 endif
 ifeq (monotouch, $(PROFILE))
-LIB_MCS_FLAGS += -d:FULL_AOT_RUNTIME
+LIB_MCS_FLAGS += -d:FULL_AOT_RUNTIME -d:SECURITY_DEP
 endif
 
 EXTRA_DISTFILES = \
index e5d9e5e7e669b6fa293eed9d2037467b419084eb..0f8322efc76c4d28f3d0d3573a5448059b630a1e 100644 (file)
@@ -1597,9 +1597,13 @@ namespace Mono.CSharp
 
                static void FillKeywordTable ()
                {
-                       keywordsTable = new Hashtable ();
-                       foreach (string keyword in keywords) {
-                               keywordsTable.Add (keyword, keyword);
+                       lock (keywords) {
+                               if (keywordsTable == null) {
+                                       keywordsTable = new Hashtable ();
+                                       foreach (string keyword in keywords) {
+                                               keywordsTable.Add (keyword, keyword);
+                                       }
+                               }
                        }
                }
 
index 784f1eef0b2e229d9fd701960d092bd069f9477a..0eb2c4aea2ef2c3b12fce8fe53ae6b6405474faf 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security.Protocol.Ntlm;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security.Protocol.Ntlm;
+#endif
 
 using System;
 using System.Collections;
 using System.Net;
-using MonoSecurity::Mono.Security.Protocol.Ntlm;
 
 namespace Mono.Http
 {
index e3113f500f2d5d69df61018d08cd9dcfbaff3009..5b496e14ce55587de1c814557d30cfd9afce411c 100644 (file)
 //
 
 #if SECURITY_DEP
+
+#if MONOTOUCH
+using System.Security.Cryptography.X509Certificates;
+#else
 extern alias PrebuiltSystem;
+using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
+#endif
+
 #endif
 
 using System;
@@ -49,10 +56,6 @@ using System.Configuration;
 using System.Net.Security;
 using System.Security.Authentication;
 
-#if SECURITY_DEP
-using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
-#endif
-
 namespace System.Net.Mail {
        public class SmtpClient
 #if NET_4_0
index a10abf90489f7519d6a4630dc261c015dfe8517d..0cbf96fda2f404cfe61dfc0c125abc5dbe4077dd 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+#else
 extern alias PrebuiltSystem;
-
 using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
+#endif
 
 using System.Security.Cryptography.X509Certificates;
 
index 0ea27f465281db75b0d12f30ecf9e57a9955edfc..331d4cb8045f275f588859fd6cb08e9a1ad66516 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+
+using CipherAlgorithmType = System.Security.Authentication.CipherAlgorithmType;
+using HashAlgorithmType = System.Security.Authentication.HashAlgorithmType;
+using ExchangeAlgorithmType = System.Security.Authentication.ExchangeAlgorithmType;
+
+using MonoCipherAlgorithmType = Mono.Security.Protocol.Tls.CipherAlgorithmType;
+using MonoHashAlgorithmType = Mono.Security.Protocol.Tls.HashAlgorithmType;
+using MonoExchangeAlgorithmType = Mono.Security.Protocol.Tls.ExchangeAlgorithmType;
+using MonoSecurityProtocolType = Mono.Security.Protocol.Tls.SecurityProtocolType;
+#else
 extern alias PrebuiltSystem;
 extern alias MonoSecurity;
 
 using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
 
-using System;
-using System.IO;
-using System.Net;
-using System.Security.Authentication;
-using System.Security.Cryptography.X509Certificates;
-using System.Security.Principal;
-using System.Security.Cryptography;
-using MonoSecurity::Mono.Security.Protocol.Tls;
-
 using CipherAlgorithmType = System.Security.Authentication.CipherAlgorithmType;
 using HashAlgorithmType = System.Security.Authentication.HashAlgorithmType;
 using ExchangeAlgorithmType = System.Security.Authentication.ExchangeAlgorithmType;
@@ -57,6 +60,17 @@ using MonoHashAlgorithmType = MonoSecurity::Mono.Security.Protocol.Tls.HashAlgor
 using MonoExchangeAlgorithmType = MonoSecurity::Mono.Security.Protocol.Tls.ExchangeAlgorithmType;
 using MonoSecurityProtocolType = MonoSecurity::Mono.Security.Protocol.Tls.SecurityProtocolType;
 
+using MonoSecurity::Mono.Security.Protocol.Tls;
+#endif
+
+using System;
+using System.IO;
+using System.Net;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+using System.Security.Principal;
+using System.Security.Cryptography;
+
 #if NET_4_5
 using System.Threading.Tasks;
 #endif
@@ -353,7 +367,12 @@ namespace System.Net.Security
                                return null;
                        };
 
-                       if (validation_callback != null)
+                       if (validation_callback != null) {
+#if MONOTOUCH
+                               var helper = new ServicePointManager.ChainValidationHelper (this, targetHost);
+                               helper.ServerCertificateValidationCallback = validation_callback;
+                               s.ServerCertValidation2 += new CertificateValidationCallback2 (helper.ValidateChain);
+#else
                                s.ServerCertValidationDelegate = delegate (X509Certificate cert, int [] certErrors) {
                                        X509Chain chain = new X509Chain ();
                                        X509Certificate2 x2 = (cert as X509Certificate2);
@@ -393,6 +412,8 @@ namespace System.Net.Security
 
                                        return validation_callback (this, cert, chain, errors);
                                };
+#endif
+                       }
                        if (selection_callback != null)
                                s.ClientCertSelectionDelegate = OnCertificateSelection;
 
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f04cb3c054343cab67538bc1473ce826cc0ce76c 100644 (file)
@@ -0,0 +1,97 @@
+//
+// ClientWebSocket.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_5
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace System.Net.WebSockets
+{
+       [MonoTODO]
+       public class ClientWebSocket : WebSocket
+       {
+               public ClientWebSocketOptions Options {
+                       get { throw new NotImplementedException (); }
+               }
+
+               public Task ConnectAsync (Uri uri, CancellationToken cancellationToken)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               #region implemented abstract members of WebSocket
+               public override void Abort ()
+               {
+                       throw new NotImplementedException ();
+               }
+               public override Task CloseAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
+               {
+                       throw new NotImplementedException ();
+               }
+               public override Task CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
+               {
+                       throw new NotImplementedException ();
+               }
+               public override Task<WebSocketReceiveResult> ReceiveAsync (ArraySegment<byte> buffer, CancellationToken cancellationToken)
+               {
+                       throw new NotImplementedException ();
+               }
+               public override Task SendAsync (ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken)
+               {
+                       throw new NotImplementedException ();
+               }
+               public override void Dispose ()
+               {
+                       throw new NotImplementedException ();
+               }
+               public override WebSocketCloseStatus? CloseStatus {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override string CloseStatusDescription {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override WebSocketState State {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override string SubProtocol {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+               #endregion
+       }
+}
+
+#endif
+
index 903d52755b942ad10c78d31fa8cb21b8471662c1..be618771eb9ee0ad5b37fdd9157da238b21f6fb1 100644 (file)
@@ -250,7 +250,7 @@ namespace System.Net
 
                        // build the hash object (only MD5 is defined in RFC2617)
                        if ((parser.Algorithm == null) || (parser.Algorithm.ToUpper ().StartsWith ("MD5")))
-                               hash = HashAlgorithm.Create ("MD5");
+                               hash = MD5.Create ();
 
                        return true;
                }
index 09f3197a7a4e844d7302d9a418d4801124bd21f8..909101100999098d3e2f99bff94e6306de28fcf3 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security.Authenticode;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security.Authenticode;
+#endif
 
 using System.IO;
 using System.Net.Sockets;
@@ -38,7 +43,6 @@ using System.Collections.Generic;
 using System.Security.Cryptography;
 using System.Security.Cryptography.X509Certificates;
 using System.Threading;
-using MonoSecurity::Mono.Security.Authenticode;
 
 namespace System.Net {
        sealed class EndPointListener
index a34f19024c80761d1d16660ed488d4b62bd8ee33..33080c2d77b9a1d463c3e3f61bbb4a0ff4eef9fd 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security.Protocol.Tls;
+#endif
 
 using System.IO;
 using System.Net.Sockets;
@@ -38,7 +43,6 @@ using System.Text;
 using System.Threading;
 using System.Security.Cryptography;
 using System.Security.Cryptography.X509Certificates;
-using MonoSecurity::Mono.Security.Protocol.Tls;
 
 namespace System.Net {
        sealed class HttpConnection
index 6329e359a4fd27e72a31be770aec7f1341b531d6..c72d21d1d82f3c44e19c7f9d381d434336cc33aa 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security.Protocol.Tls;
+#endif
 
 using System.Collections;
 using System.Collections.Specialized;
@@ -44,7 +49,6 @@ using System.Security.Authentication.ExtendedProtection;
 #if NET_4_5
 using System.Threading.Tasks;
 #endif
-using MonoSecurity::Mono.Security.Protocol.Tls;
 
 namespace System.Net {
        public sealed class HttpListenerRequest
index 3b55624cfc881336fc3fd63689bf6ca8ed84a223..84d59f6802517fa65be1681fc9cf57f1d8940597 100644 (file)
@@ -421,6 +421,10 @@ namespace System.Net
                        if (idx >= 0)
                                return false;
 
+                       IPAddress ipaddr;
+                       if (IPAddress.TryParse (val, out ipaddr))
+                               return true;
+
                        string u = scheme + "://" + val + "/";
                        return Uri.IsWellFormedUriString (u, UriKind.Absolute);
                }
index b0615a651b44d8ed13184339f8b4f98e0a93f01c..a6d456293e63c54d739ab11e50275875d419bab1 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+using MSX = Mono.Security.X509;
+using Mono.Security.X509.Extensions;
+#else
 extern alias MonoSecurity;
-
-using System.Text.RegularExpressions;
 using MonoSecurity::Mono.Security.X509.Extensions;
 using MonoSecurity::Mono.Security.Protocol.Tls;
 using MSX = MonoSecurity::Mono.Security.X509;
 #endif
 
+using System.Text.RegularExpressions;
+#endif
+
 using System;
 using System.Collections;
 using System.Collections.Specialized;
@@ -72,10 +78,12 @@ namespace System.Net
        public class ServicePointManager {
                class SPKey {
                        Uri uri; // schema/host/port
+                       Uri proxy;
                        bool use_connect;
 
-                       public SPKey (Uri uri, bool use_connect) {
+                       public SPKey (Uri uri, Uri proxy, bool use_connect) {
                                this.uri = uri;
+                               this.proxy = proxy;
                                this.use_connect = use_connect;
                        }
 
@@ -87,8 +95,16 @@ namespace System.Net
                                get { return use_connect; }
                        }
 
+                       public bool UsesProxy {
+                               get { return proxy != null; }
+                       }
+
                        public override int GetHashCode () {
-                               return uri.GetHashCode () + ((use_connect) ? 1 : 0);
+                               int hash = 23;
+                               hash = hash * 31 + ((use_connect) ? 1 : 0);
+                               hash = hash * 31 + uri.GetHashCode ();
+                               hash = hash * 31 + (proxy != null ? proxy.GetHashCode () : 0);
+                               return hash;
                        }
 
                        public override bool Equals (object obj) {
@@ -97,7 +113,13 @@ namespace System.Net
                                        return false;
                                }
 
-                               return (uri.Equals (other.uri) && other.use_connect == use_connect);
+                               if (!uri.Equals (other.uri))
+                                       return false;
+                               if (use_connect != other.use_connect || UsesProxy != other.UsesProxy)
+                                       return false;
+                               if (UsesProxy && !proxy.Equals (other.proxy))
+                                       return false;
+                               return true;
                        }
                }
 
@@ -325,7 +347,7 @@ namespace System.Net
                        
                        ServicePoint sp = null;
                        lock (servicePoints) {
-                               SPKey key = new SPKey (origAddress, useConnect);
+                               SPKey key = new SPKey (origAddress, usesProxy ? address : null, useConnect);
                                sp = servicePoints [key] as ServicePoint;
                                if (sp != null)
                                        return sp;
@@ -392,6 +414,7 @@ namespace System.Net
                internal class ChainValidationHelper {
                        object sender;
                        string host;
+                       RemoteCertificateValidationCallback cb;
 
 #if !MONOTOUCH
                        static bool is_macosx = System.IO.File.Exists (OSX509Certificates.SecurityLibrary);
@@ -410,19 +433,19 @@ namespace System.Net
                        }
 #endif
 
-                       public ChainValidationHelper (object sender)
+                       public ChainValidationHelper (object sender, string hostName)
                        {
                                this.sender = sender;
+                               host = hostName;
                        }
 
-                       public string Host {
+                       public RemoteCertificateValidationCallback ServerCertificateValidationCallback {
                                get {
-                                       if (host == null && sender is HttpWebRequest)
-                                               host = ((HttpWebRequest) sender).Address.Host;
-                                       return host;
+                                       if (cb == null)
+                                               cb = ServicePointManager.ServerCertificateValidationCallback;
+                                       return cb;
                                }
-
-                               set { host = value; }
+                               set { cb = value; }
                        }
 
                        // Used when the obsolete ICertificatePolicy is set to DefaultCertificatePolicy
@@ -435,7 +458,6 @@ namespace System.Net
                                        return null;
 
                                ICertificatePolicy policy = ServicePointManager.CertificatePolicy;
-                               RemoteCertificateValidationCallback cb = ServicePointManager.ServerCertificateValidationCallback;
 
                                X509Certificate2 leaf = new X509Certificate2 (certs [0].RawData);
                                int status11 = 0; // Error code passed to the obsolete ICertificatePolicy callback
@@ -448,7 +470,7 @@ namespace System.Net
                                // the certificates that the server provided (which generally does not include the root) so, only  
                                // if there's a user callback, we'll create the X509Chain but won't build it
                                // ref: https://bugzilla.xamarin.com/show_bug.cgi?id=7245
-                               if (cb != null) {
+                               if (ServerCertificateValidationCallback != null) {
 #endif
                                chain = new X509Chain ();
                                chain.ChainPolicy = new X509ChainPolicy ();
@@ -478,7 +500,7 @@ namespace System.Net
                                                status11 = -2146762490; //CERT_E_PURPOSE 0x800B0106
                                        }
 
-                                       if (!CheckServerIdentity (certs [0], Host)) {
+                                       if (!CheckServerIdentity (certs [0], host)) {
                                                errors |= SslPolicyErrors.RemoteCertificateNameMismatch;
                                                status11 = -2146762481; // CERT_E_CN_NO_MATCH 0x800B010F
                                        }
@@ -488,7 +510,7 @@ namespace System.Net
                                        // Ideally we should return the SecTrustResult
                                        OSX509Certificates.SecTrustResult trustResult = OSX509Certificates.SecTrustResult.Deny;
                                        try {
-                                               trustResult = OSX509Certificates.TrustEvaluateSsl (certs, Host);
+                                               trustResult = OSX509Certificates.TrustEvaluateSsl (certs, host);
                                                // We could use the other values of trustResult to pass this extra information
                                                // to the .NET 2 callback for values like SecTrustResult.Confirm
                                                result = (trustResult == OSX509Certificates.SecTrustResult.Proceed ||
@@ -534,8 +556,8 @@ namespace System.Net
                                        user_denied = !result && !(policy is DefaultCertificatePolicy);
                                }
                                // If there's a 2.0 callback, it takes precedence
-                               if (cb != null) {
-                                       result = cb (sender, leaf, chain, errors);
+                               if (ServerCertificateValidationCallback != null) {
+                                       result = ServerCertificateValidationCallback (sender, leaf, chain, errors);
                                        user_denied = !result;
                                }
                                return new ValidationResult (result, user_denied, status11);
index 4e1993f7e585c46c19b3ef53edb7beb4b6da6622..66358a6a65a00e7658fc019970771db798385f1d 100644 (file)
@@ -326,15 +326,16 @@ namespace System.Net
                                        
                                        int nread = 0;
                                        long notify_total = 0;
-                                       while ((nread = st.Read (buffer, 0, length)) != 0){
-                                               if (async){
-                                                       notify_total += nread;
+                                       while ((nread = st.Read (buffer, 0, length)) != 0) {
+                                               notify_total += nread;
+                                               if (async)
                                                        OnDownloadProgressChanged (
                                                                new DownloadProgressChangedEventArgs (notify_total, response.ContentLength, userToken));
-                                                                                                     
-                                               }
                                                f.Write (buffer, 0, nread);
                                        }
+
+                                       if (cLength > 0 && notify_total < cLength)
+                                               throw new WebException ("Download aborted prematurely.", WebExceptionStatus.ReceiveFailure);
                                } catch (ThreadInterruptedException){
                                        if (request != null)
                                                request.Abort ();
index 9f80440ccdf26d912f95d199df4a12f469900aa1..a3b8cb7da85cc8bfc446d6fe3f84eceb9140a0e0 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+#else
 extern alias MonoSecurity;
-
 using MonoSecurity::Mono.Security.Protocol.Tls;
 #endif
 
+#endif
+
 using System.IO;
 using System.Collections;
 using System.Net.Sockets;
@@ -93,19 +97,15 @@ namespace System.Net
                Exception connect_exception;
                static object classLock = new object ();
                static Type sslStream;
+#if !MONOTOUCH
                static PropertyInfo piClient;
                static PropertyInfo piServer;
                static PropertyInfo piTrustFailure;
+#endif
 
 #if MONOTOUCH
-                static MethodInfo start_wwan;
-
-                static WebConnection ()
-                {
-                        Type type = Type.GetType ("MonoTouch.ObjCRuntime.Runtime, monotouch");
-                       if (type != null)
-                               start_wwan = type.GetMethod ("StartWWAN", new Type [] { typeof (System.Uri) });
-                }
+               [System.Runtime.InteropServices.DllImport ("__Internal")]
+               static extern void monotouch_start_wwan (string uri);
 #endif
 
                public WebConnection (WebConnectionGroup group, ServicePoint sPoint)
@@ -165,10 +165,8 @@ namespace System.Net
 
                                if (hostEntry == null) {
 #if MONOTOUCH
-                                       if (start_wwan != null) {
-                                               start_wwan.Invoke (null, new object [1] { sPoint.Address });
-                                               hostEntry = sPoint.HostEntry;
-                                       }
+                                       monotouch_start_wwan (sPoint.Address.ToString ());
+                                       hostEntry = sPoint.HostEntry;
                                        if (hostEntry == null) {
 #endif
                                                status = sPoint.UsesProxy ? WebExceptionStatus.ProxyNameResolutionFailure :
@@ -244,18 +242,21 @@ namespace System.Net
 #else
                                // HttpsClientStream is an internal glue class in Mono.Security.dll
                                sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " +
-                                                       Consts.AssemblyMono_Security, false);
+                                                       Consts.AssemblySystem, false);
 
                                if (sslStream == null) {
                                        string msg = "Missing Mono.Security.dll assembly. " +
                                                        "Support for SSL/TLS is unavailable.";
 
+                                       Console.WriteLine (msg);
                                        throw new NotSupportedException (msg);
                                }
 #endif
+#if !MONOTOUCH
                                piClient = sslStream.GetProperty ("SelectedClientCertificate");
                                piServer = sslStream.GetProperty ("ServerCertificate");
                                piTrustFailure = sslStream.GetProperty ("TrustFailure");
+#endif
                        }
                }
 
@@ -434,14 +435,17 @@ namespace System.Net
                                                        if (!ok)
                                                                return false;
                                                }
-
+#if SECURITY_DEP
+#if MONOTOUCH
+                                               nstream = new HttpsClientStream (serverStream, request.ClientCertificates, request, buffer);
+#else
                                                object[] args = new object [4] { serverStream,
-                                                                               request.ClientCertificates,
-                                                                               request, buffer};
+                                                       request.ClientCertificates,
+                                                       request, buffer};
                                                nstream = (Stream) Activator.CreateInstance (sslStream, args);
-#if SECURITY_DEP
+#endif
                                                SslClientStream scs = (SslClientStream) nstream;
-                                               var helper = new ServicePointManager.ChainValidationHelper (request);
+                                               var helper = new ServicePointManager.ChainValidationHelper (request, request.Address.Host);
                                                scs.ServerCertValidation2 += new CertificateValidationCallback2 (helper.ValidateChain);
 #endif
                                                certsAvailable = false;
@@ -562,7 +566,7 @@ namespace System.Net
 
                        cnc.position = 0;
 
-                       WebConnectionStream stream = new WebConnectionStream (cnc);
+                       WebConnectionStream stream = new WebConnectionStream (cnc, data);
                        bool expect_content = ExpectContent (data.StatusCode, data.request.Method);
                        string tencoding = null;
                        if (expect_content)
@@ -613,8 +617,14 @@ namespace System.Net
                internal void GetCertificates () 
                {
                        // here the SSL negotiation have been done
+#if SECURITY_DEP && MONOTOUCH
+                       HttpsClientStream s = (nstream as HttpsClientStream);
+                       X509Certificate client = s.SelectedClientCertificate;
+                       X509Certificate server = s.ServerCertificate;
+#else
                        X509Certificate client = (X509Certificate) piClient.GetValue (nstream, null);
                        X509Certificate server = (X509Certificate) piServer.GetValue (nstream, null);
+#endif
                        sPoint.SetCertificates (client, server);
                        certsAvailable = (server != null);
                }
@@ -936,20 +946,23 @@ namespace System.Net
                        }
 
                        int nbytes = 0;
+                       bool done = false;
                        WebAsyncResult wr = null;
                        IAsyncResult nsAsync = ((WebAsyncResult) result).InnerAsyncResult;
                        if (chunkedRead && (nsAsync is WebAsyncResult)) {
                                wr = (WebAsyncResult) nsAsync;
                                IAsyncResult inner = wr.InnerAsyncResult;
-                               if (inner != null && !(inner is WebAsyncResult))
+                               if (inner != null && !(inner is WebAsyncResult)) {
                                        nbytes = s.EndRead (inner);
+                                       done = nbytes == 0;
+                               }
                        } else if (!(nsAsync is WebAsyncResult)) {
                                nbytes = s.EndRead (nsAsync);
                                wr = (WebAsyncResult) result;
+                               done = nbytes == 0;
                        }
 
                        if (chunkedRead) {
-                               bool done = (nbytes == 0);
                                try {
                                        chunkStream.WriteAndReadBack (wr.Buffer, wr.Offset, wr.Size, ref nbytes);
                                        if (!done && nbytes == 0 && chunkStream.WantMore)
@@ -1150,9 +1163,16 @@ namespace System.Net
                                }
 
                                // if SSL is in use then check for TrustFailure
-                               if (ssl && (bool) piTrustFailure.GetValue (nstream, null)) {
-                                       wes = WebExceptionStatus.TrustFailure;
-                                       msg = "Trust failure";
+                               if (ssl) {
+#if SECURITY_DEP && MONOTOUCH
+                                       HttpsClientStream https = (nstream as HttpsClientStream);
+                                       if (https.TrustFailure) {
+#else
+                                       if ((bool) piTrustFailure.GetValue (nstream, null)) {
+#endif
+                                               wes = WebExceptionStatus.TrustFailure;
+                                               msg = "Trust failure";
+                                       }
                                }
 
                                HandleError (wes, e, msg);
index ff370e9e8ba78d1e6f6275a49b9f6cb34570def0..90507d8b5c7ca0e0de51a154ae595dd6793a04a2 100644 (file)
@@ -68,24 +68,24 @@ namespace System.Net
                AsyncCallback cb_wrapper; // Calls to ReadCallbackWrapper or WriteCallbacWrapper
                internal bool IgnoreIOErrors;
 
-               public WebConnectionStream (WebConnection cnc)
-               {
-                       if (cnc.Data == null)
-                               throw new InvalidOperationException ("cnc.Data was not initialized");
-                       if (cnc.Data.Headers == null)
-                               throw new InvalidOperationException ("cnc.Data.Headers was not initialized");
-                       if (cnc.Data.request == null)
-                               throw new InvalidOperationException ("cnc.Data.request was not initialized");
+               public WebConnectionStream (WebConnection cnc, WebConnectionData data)
+               {          
+                       if (data == null)
+                               throw new InvalidOperationException ("data was not initialized");
+                       if (data.Headers == null)
+                               throw new InvalidOperationException ("data.Headers was not initialized");
+                       if (data.request == null)
+                               throw new InvalidOperationException ("data.request was not initialized");
                        isRead = true;
                        cb_wrapper = new AsyncCallback (ReadCallbackWrapper);
                        pending = new ManualResetEvent (true);
-                       this.request = cnc.Data.request;
+                       this.request = data.request;
                        read_timeout = request.ReadWriteTimeout;
                        write_timeout = read_timeout;
                        this.cnc = cnc;
-                       string contentType = cnc.Data.Headers ["Transfer-Encoding"];
+                       string contentType = data.Headers ["Transfer-Encoding"];
                        bool chunkedRead = (contentType != null && contentType.IndexOf ("chunked", StringComparison.OrdinalIgnoreCase) != -1);
-                       string clength = cnc.Data.Headers ["Content-Length"];
+                       string clength = data.Headers ["Content-Length"];
                        if (!chunkedRead && clength != null && clength != "") {
                                try {
                                        contentLength = Int32.Parse (clength);
index 9aaf8a462ecde5fed9ae2a71a9fe1e2c24c79da5..33e27cf23720653e89388e8602fb563941a08821 100644 (file)
 //
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using MSX = Mono.Security.X509;
+#else
 extern alias MonoSecurity;
+using MSX = MonoSecurity::Mono.Security.X509;
+#endif
 
 using System;
 using System.Runtime.InteropServices;
-using MSX = MonoSecurity::Mono.Security.X509;
 
 namespace System.Security.Cryptography.X509Certificates {
 
index 45772c29b4f872a08716c83ac64209c04980ca88..3122a108d4aac9a2028cc2075cc37d384b4def12 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security;
+using Mono.Security.Cryptography;
+using MSX = Mono.Security.X509;
+#else
 extern alias MonoSecurity;
-
 using MonoSecurity::Mono.Security;
 using MonoSecurity::Mono.Security.Cryptography;
 using MSX = MonoSecurity::Mono.Security.X509;
+#endif
 
 namespace System.Security.Cryptography.X509Certificates {
 
index 6130257f88f1cf73d1f0b8d009b53c37158fa3fd..db0377e12a871846e3c79d62c57f16590494a6ec 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security;
+using MX = Mono.Security.X509;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+using MX = MonoSecurity::Mono.Security.X509;
+#endif
 
 using System.Collections;
 using System.Text;
 
-using MonoSecurity::Mono.Security;
-using MX = MonoSecurity::Mono.Security.X509;
-
 namespace System.Security.Cryptography.X509Certificates {
 
        [MonoTODO ("Some X500DistinguishedNameFlags options aren't supported, like DoNotUsePlusSign, DoNotUseQuotes and ForceUTF8Encoding")]
index 1a3eff95e7d39af0dc3231046439dde2a1d0b654..f3ffaaa47f117cb81dd9b0bd4c4e72d37812a61d 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+#endif
 
 using System.Text;
 
-using MonoSecurity::Mono.Security;
-
 namespace System.Security.Cryptography.X509Certificates {
 
        public sealed class X509BasicConstraintsExtension : X509Extension {
index 18107591585cdfe6f7ae39be74aaea57eefe2719..300e1140e1d3a60f930f5591e19cdd2ebcd9fbdb 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security;
+using Mono.Security.Cryptography;
+using MX = Mono.Security.X509;
+#else
 extern alias MonoSecurity;
 
 using MonoSecurity::Mono.Security;
@@ -36,11 +41,16 @@ using MonoSecurity::Mono.Security.Cryptography;
 using MX = MonoSecurity::Mono.Security.X509;
 #endif
 
+#endif
+
 using System.IO;
 using System.Text;
 
 namespace System.Security.Cryptography.X509Certificates {
 
+#if NET_4_0
+       [Serializable]
+#endif
        public class X509Certificate2 : X509Certificate {
 #if !SECURITY_DEP
                // Used in Mono.Security HttpsClientStream
@@ -580,7 +590,7 @@ namespace System.Security.Cryptography.X509Certificates {
                        if (_cert == null)
                                throw new CryptographicException (empty_error);
 
-                       X509Chain chain = (X509Chain) CryptoConfig.CreateFromName ("X509Chain");
+                       X509Chain chain = X509Chain.Create ();
                        if (!chain.Build (this))
                                return false;
                        // TODO - check chain and other stuff ???
index 7dfd434c85a054e9e0fb35aa97062cd3d2069aeb..7550c0608cb753a93971d423c516427e5e8588f7 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using MX = Mono.Security.X509;
+#else
 extern alias MonoSecurity;
+using MX = MonoSecurity::Mono.Security.X509;
+#endif
 
 using System.Collections;
 using System.Text;
 
-using MX = MonoSecurity::Mono.Security.X509;
-
 namespace System.Security.Cryptography.X509Certificates {
 
        public class X509Chain {
@@ -235,7 +238,11 @@ namespace System.Security.Cryptography.X509Certificates {
 
                public static X509Chain Create ()
                {
+#if FULL_AOT_RUNTIME
+                       return new X509Chain ();
+#else
                        return (X509Chain) CryptoConfig.CreateFromName ("X509Chain");
+#endif
                }
 
                // private stuff
index ebc7df34b7e9c68c724d63adf14cde40149c1740..19ddcb8bd92286d3b12646286dce209af902ef22 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+#endif
 
 using System.Text;
 
-using MonoSecurity::Mono.Security;
-
 namespace System.Security.Cryptography.X509Certificates {
 
        public sealed class X509EnhancedKeyUsageExtension : X509Extension {
index f08ae933b4516d759706d546bbecd95a30f4bed6..bceabd05723e60fa11021e7495c16a26f9751b6d 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security;
+using MX = Mono.Security.X509;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+using MX = MonoSecurity::Mono.Security.X509;
+#endif
 
 using System.Collections;
-using Mono.Security;
-using MX = Mono.Security.X509;
 
 namespace System.Security.Cryptography.X509Certificates {
 
@@ -51,13 +56,13 @@ namespace System.Security.Cryptography.X509Certificates {
                        _list = new ArrayList ();
                }
 
-               internal X509ExtensionCollection (MonoSecurity::Mono.Security.X509.X509Certificate cert)
+               internal X509ExtensionCollection (MX.X509Certificate cert)
                {
                        _list = new ArrayList (cert.Extensions.Count);
                        if (cert.Extensions.Count == 0)
                                return;
 
-                       foreach (MonoSecurity::Mono.Security.X509.X509Extension ext in cert.Extensions) {
+                       foreach (MX.X509Extension ext in cert.Extensions) {
                                bool critical = ext.Critical;
                                string oid = ext.Oid;
                                byte[] raw_data = null;
index ac7e05387511b019f3425b21f2aef3cd2d1f0813..69f56faece63dbe338571f442ab2d699588fd65c 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+#endif
 
 using System.Text;
 
-using MonoSecurity::Mono.Security;
-
 namespace System.Security.Cryptography.X509Certificates {
 
        public sealed class X509KeyUsageExtension : X509Extension {
index 208754d9fd800bc34f5169aa5da5118e49167170..58966329d043f789d62fe93a419bb519562e0896 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using MX = Mono.Security.X509;
+#else
 extern alias MonoSecurity;
+using MX = MonoSecurity::Mono.Security.X509;
+#endif
 
 using System.Security.Permissions;
-using MX = MonoSecurity::Mono.Security.X509;
 
 namespace System.Security.Cryptography.X509Certificates {
 
index b7a7af852fc06554de833ed6ffac788465a13ec0..fe2114afe1782ed9fd8fa799f5b89faa20580b99 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security;
+using Mono.Security.Cryptography;
+#else
 extern alias MonoSecurity;
-
-using System.Text;
-
 using MonoSecurity::Mono.Security;
 using MonoSecurity::Mono.Security.Cryptography;
+#endif
+
+using System.Text;
 
 namespace System.Security.Cryptography.X509Certificates {
 
index 14b8ccedfabdccb9b3726b9d2e30a6072857991c..995f1b220c2d68b4ce5b1d04a970fe9be9c3e21f 100644 (file)
 
 #if SECURITY_DEP
 
+#if MONOTOUCH
+using Mono.Security;
+using Mono.Security.Cryptography;
+#else
 extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+using MonoSecurity::Mono.Security.Cryptography;
+#endif
 
 using System.Security.Cryptography.X509Certificates;
 using System.Text;
 
-using MonoSecurity::Mono.Security;
-using MonoSecurity::Mono.Security.Cryptography;
-
 namespace System.Security.Cryptography {
 
        internal enum AsnDecodeStatus {
index 4748b403f54aa0e4dd2edb841c92237acd432e6c..f8c7de813486431073fe9ce74c34ba01ff70f178 100644 (file)
@@ -31,7 +31,9 @@ using System;
 using System.Text;
 using System.Collections;
 using System.Reflection;
+#if !FULL_AOT_RUNTIME
 using System.Reflection.Emit;
+#endif
 using System.Runtime.Serialization;
 
 using RegularExpression = System.Text.RegularExpressions.Syntax.RegularExpression;
index 38708615c4c5cb76412c24596d8c0c1a088eca5a..9e8c8cd6eb58a8c956fd382df66bdac04ef181bb 100644 (file)
@@ -209,6 +209,9 @@ namespace System {
                                        success = false;
                                        break;
                                }
+
+                               if (success && isAbsoluteUri && (path.Length > 0))
+                                       path = EscapeString (path);
                        }
                }
 
index 2062cf84f62b9ab07d4f4783d02404c07b314480..6fa403c60758dd086031128faf0c0b7037700541 100644 (file)
@@ -1032,7 +1032,7 @@ namespace MonoTests.System.Net.Sockets {
                        
                        client.BeginReceive (BRCallback, client);
 
-                       IPEndPoint ep = new IPEndPoint (Dns.GetHostEntry (string.Empty).AddressList[0], 1237);
+                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 1237);
                        byte[] send_bytes = new byte[] {10, 11, 12, 13};
                        client.Send (send_bytes, send_bytes.Length, ep);
 
@@ -1052,7 +1052,7 @@ namespace MonoTests.System.Net.Sockets {
                public void Available ()
                {
                        UdpClient client = new UdpClient (1238);
-                       IPEndPoint ep = new IPEndPoint (Dns.GetHostEntry (string.Empty).AddressList[0], 1238);
+                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 1238);
                        byte[] bytes = new byte[] {10, 11, 12, 13};
                        
                        client.Send (bytes, bytes.Length, ep);
index efdd05e7b19a2469fa3b881ff18b7b6c551de47f..f0826d1c9902938fe975f2a12554f06926ef5876 100644 (file)
@@ -2480,7 +2480,40 @@ namespace MonoTests.System.Net
 
                        Assert.AreEqual (null, req.Headers.Get ("Date"));
                }
+               
+               [Test]
+               // Bug #12393
+               public void TestIPv6Host ()
+               {
+                       var address = "2001:0000:0000:0001:0001:0001:0157:0000";
+                       var address2 = '[' + address + ']';
+                       var uri = new Uri (string.Format ("http://{0}/test.css", address2));
+                       var hwr = (HttpWebRequest)WebRequest.Create (uri);
+
+                       hwr.Host = address2;
+                       Assert.AreEqual (address2, hwr.Host, "#1");
+               }
+
+               [Test]
+               // Bug #12393
+               [Category ("NotWorking")]
+               public void TestIPv6Host2 ()
+               {
+                       var address = "2001:0000:0000:0001:0001:0001:0157:0000";
+                       var address2 = '[' + address + ']';
+                       var uri = new Uri (string.Format ("http://{0}/test.css", address2));
+                       var hwr = (HttpWebRequest)WebRequest.Create (uri);
+
+                       try {
+                               hwr.Host = address;
+                               Assert.Fail ("#1");
+                       } catch (ArgumentException) {
+                               ;
+                       }
+               }
 #endif
+
+
                class ListenerScope : IDisposable {
                        EventWaitHandle completed;
                        public HttpListener listener;
index 0a860c137ed04d3e169a1a7648aecfc8e63ae7f8..9439f666cc81426a827153c47709eefe32fae101 100644 (file)
@@ -284,14 +284,9 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates {
                public void StaticCreation () 
                {
                        X509Chain c = X509Chain.Create ();
-#if MOBILE
-                       Assert.IsNull (c);
-#else
                        CheckDefaultChain (c);
-#endif
                }
 
-#if !MOBILE
                [Test]
                public void CreateViaCryptoConfig ()
                {
@@ -299,7 +294,6 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates {
                        Assert.AreEqual (typeof (X509Chain), CryptoConfig.CreateFromName ("X509Chain").GetType (), "X509Chain");
                        Assert.IsNull (CryptoConfig.CreateFromName ("System.Security.Cryptography.X509Certificates.X509Chain"), "System.Security.Cryptography.X509Certificates.X509Chain");
                }
-#endif
        }
 }
 
index 3c0c66dd5d7eefc306bc942a7a184b3e9e75c53f..508e1307993018782d889aeea5da971a371de287 100644 (file)
@@ -1876,5 +1876,17 @@ namespace MonoTests.System
                        string escaped = uri.GetComponents (UriComponents.Fragment, UriFormat.UriEscaped);
                        Assert.AreEqual ("id=1%262&sort=asc", escaped, "UriEscaped");
                }
+
+               [Test]
+               // Bug #12631
+               public void LocalPathWithBaseUrl ()
+               {
+                       var mainUri = new Uri ("http://www.imdb.com");
+                       var uriPath = "/title/tt0106521";
+
+                       Uri result;
+                       Assert.IsTrue (Uri.TryCreate (mainUri, uriPath, out result), "#1");
+                       Assert.AreEqual ("http://www.imdb.com/title/tt0106521", result.ToString (), "#2");
+               }
        }
 }
index da4e7c4d5503344a62c467c9947dafc8f5882368..8fe73931954eb6023ebd7176a3a88b0fb135c95c 100644 (file)
@@ -181,6 +181,9 @@ namespace MonoTests.System
                        uri = new Uri ("http://dummy.com");
                        Assert.IsTrue (Uri.TryCreate (relative, UriKind.Relative, out uri), "relative-Relative");
                        Assert.AreEqual (relative, uri.OriginalString, "relative-RelativeOrAbsolute-OriginalString");
+
+                       Assert.IsTrue (Uri.TryCreate ("http://mono-project.com/☕", UriKind.Absolute, out uri), "highunicode-Absolute");
+                       Assert.AreEqual("http://mono-project.com/%E2%98%95", uri.AbsoluteUri, "highunicode-Absolute-AbsoluteUri");
                }
 
                [Test] // TryCreate (String, UriKind, Uri)
index 8dce31d234c5b119f6502c1b4dbf3c9b3baf94c0..7bb9316feb58c8635592e618ee4b6865d842aa51 100644 (file)
@@ -1,2 +1,76 @@
 #include mobile_System.dll.sources
 MonoTouch/MonoPInvokeCallbackAttribute.cs
+../Mono.Security/Mono.Security.Authenticode/PrivateKey.cs
+../Mono.Security/Mono.Security.Cryptography/MD5SHA1.cs
+../Mono.Security/Mono.Security.Cryptography/TlsHMAC.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse2.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/MessageBase.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/NtlmAuthLevel.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/NtlmFlags.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/Type1Message.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/Type2Message.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/Type3Message.cs
+../Mono.Security/Mono.Security.Protocol.Tls/Alert.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherAlgorithmType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteCollection.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteFactory.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ClientContext.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ClientSessionCache.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ContentType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/Context.cs
+../Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ExchangeAlgorithmType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/HandshakeState.cs
+../Mono.Security/Mono.Security.Protocol.Tls/HashAlgorithmType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs
+../Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureDeformatter.cs
+../Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureFormatter.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SecurityCompressionType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SecurityParameters.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ServerContext.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslHandshakeHash.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsClientSettings.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsException.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsServerSettings.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake/ClientCertificateType.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeType.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientKeyExchange.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificateRequest.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHelloDone.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificateVerify.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientKeyExchange.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificateRequest.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerHelloDone.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerKeyExchange.cs
+../Mono.Security/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtension.cs
+../Mono.Security/Mono.Security.X509.Extensions/ExtendedKeyUsageExtension.cs
+../Mono.Security/Mono.Security.X509.Extensions/GeneralNames.cs
+../Mono.Security/Mono.Security.X509.Extensions/NetscapeCertTypeExtension.cs
+../Mono.Security/Mono.Security.X509.Extensions/SubjectAltNameExtension.cs
index 51b2e810087ba9daf2eeb4a673732982827d7f22..a942d65ff981fbb6eb643760fd964a351eba9004 100644 (file)
@@ -1,5 +1,5 @@
 //
-// System.Collections.DebuggableAttribute.cs
+// ConditionalAttribute.cs
 //
 // Author:
 //   Nick Drochak II (ndrochak@gol.com)
index 1c05373daaac4088535018a8030f37bf1f279bf9..a12203b1fc11d76df250132863ff6038b9f4688f 100644 (file)
@@ -1,5 +1,5 @@
 //
-// System.Collections.DebuggableAttribute.cs
+// DebuggableAttribute.cs
 //
 // Author:
 //   Nick Drochak II (ndrochak@gol.com)
index 99586d35531707c29054613cbd5c56d3c89b1809..6066c031cba72eb04542b7c30d45fd55193eb802 100644 (file)
@@ -537,7 +537,6 @@ namespace System.IO
                        IntPtr handle;
                        MonoIOError error;
                        FileAttributes rattr;
-                       
                        string s = MonoIO.FindFirst (path, path_with_pattern, out rattr, out error, out handle);
                        try {
                                while (s != null) {
@@ -545,7 +544,7 @@ namespace System.IO
                                        if (((rattr & FileAttributes.Directory) == 0) && rattr != 0)
                                                rattr |= FileAttributes.Normal;
 
-                                       if ((rattr & FileAttributes.ReparsePoint) == 0 && (rattr & kind) != 0)
+                                       if ((rattr & kind) != 0)
                                                yield return s;
 
                                        s = MonoIO.FindNext (handle, out rattr, out error);
@@ -563,7 +562,7 @@ namespace System.IO
 
                                try {
                                        while (s != null) {
-                                               if ((rattr & FileAttributes.Directory) != 0)
+                                               if ((rattr & FileAttributes.Directory) != 0 && (rattr & FileAttributes.ReparsePoint) == 0)
                                                        foreach (string child in EnumerateKind (s, searchPattern, searchOption, kind))
                                                                yield return child;
                                                s = MonoIO.FindNext (handle, out rattr, out error);
index 22de37d7cf1acc9a2aee5624573bba4e69c2067a..3eeb79195bd09c68918b50cc03fa43f08ffffbda 100644 (file)
@@ -289,6 +289,30 @@ namespace System.IO {
                        return fullpath;
                }
 
+               [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+               // http://msdn.microsoft.com/en-us/library/windows/desktop/aa364963%28v=vs.85%29.aspx
+               // http://www.codeproject.com/Tips/223321/Win32-API-GetFullPathName
+               private static extern int GetFullPathName(string path, int numBufferChars, StringBuilder buffer, ref IntPtr lpFilePartOrNull); 
+
+               internal static string GetFullPathName(string path)
+               {
+                       const int MAX_PATH = 260;
+                       StringBuilder buffer = new StringBuilder(MAX_PATH);
+                       IntPtr ptr = IntPtr.Zero;
+                       int length = GetFullPathName(path, MAX_PATH, buffer, ref ptr);
+                       if (length == 0)
+                       {
+                               int error = Marshal.GetLastWin32Error();
+                               throw new IOException("Windows API call to GetFullPathName failed, Windows error code: " + error);
+                       }
+                       else if (length > MAX_PATH)
+                       {
+                               buffer = new StringBuilder(length);
+                               GetFullPathName(path, length, buffer, ref ptr);
+                       }
+                       return buffer.ToString();
+               }
+
                internal static string WindowsDriveAdjustment (string path)
                {
                        // two special cases to consider when a drive is specified
@@ -304,7 +328,7 @@ namespace System.IO {
                                if (current [0] == path [0])
                                        path = current; // we return it
                                else
-                                       path += '\\';
+                                       path = GetFullPathName(path); // we have to use the GetFullPathName Windows API
                        } else if ((path [2] != Path.DirectorySeparatorChar) && (path [2] != Path.AltDirectorySeparatorChar)) {
                                // second, the drive + a directory is specified *without* a separator between them (e.g. C:dir).
                                // If the current directory is on the specified drive...
@@ -312,8 +336,8 @@ namespace System.IO {
                                        // then specified directory is appended to the current drive directory
                                        path = Path.Combine (current, path.Substring (2, path.Length - 2));
                                } else {
-                                       // if not, then just pretend there was a separator (Path.Combine won't work in this case)
-                                       path = String.Concat (path.Substring (0, 2), DirectorySeparatorStr, path.Substring (2, path.Length - 2));
+                                       // we have to use the GetFullPathName Windows API
+                                       path = GetFullPathName(path);
                                }
                        }
                        return path;
@@ -462,6 +486,10 @@ namespace System.IO {
                                        if (ex.hresult != MonoIO.FileAlreadyExistsHResult || count ++ > 65536)
                                                throw;
                                }
+                               catch (UnauthorizedAccessException ex) {
+                                       if (count ++ > 65536)
+                                               throw new IOException (ex.Message, ex);
+                               }
                        } while (f == null);
                        
                        f.Close();
index f46c01a226d083de05a8f7cb9a741f2511e56347..0b0cd4c6fb48ecaab882e42b1743cdc0f2856e30 100644 (file)
@@ -323,8 +323,8 @@ namespace System.Reflection {
                }
 
                static bool ShouldPrintFullName (Type type) {
-                       return type.IsClass && (!type.IsPointer ||
-                               (!type.GetElementType ().IsPrimitive && !type.GetElementType ().IsNested));
+                       return type.IsGenericType || (type.IsClass && (!type.IsPointer ||
+                               (!type.GetElementType ().IsPrimitive && !type.GetElementType ().IsNested)));
                }
 
                public override string ToString () {
@@ -464,6 +464,7 @@ namespace System.Reflection {
 #endif
        }
        
+       [Serializable()]
        [StructLayout (LayoutKind.Sequential)]
        internal class MonoCMethod : ConstructorInfo, ISerializable
        {
index 9bed9aaabc7190a1799eaa39d42bc20a203660b4..ab2c8cadd674d00725363363a557cc11f5d910d2 100644 (file)
@@ -52,10 +52,12 @@ namespace System.Runtime.CompilerServices
 
                public void GetResult ()
                {
-                       if (task.Status != TaskStatus.RanToCompletion) {
+                       if (!task.IsCompleted)
+                               task.WaitCore (Timeout.Infinite, CancellationToken.None);
+
+                       if (task.Status != TaskStatus.RanToCompletion)
                                // Merge current and dispatched stack traces if there is any
                                ExceptionDispatchInfo.Capture (HandleUnexpectedTaskResult (task)).Throw ();
-                       }
                }
 
                internal static Exception HandleUnexpectedTaskResult (Task task)
@@ -66,7 +68,7 @@ namespace System.Runtime.CompilerServices
                        case TaskStatus.Faulted:
                                return task.Exception.InnerException;
                        default:
-                               return new InvalidOperationException ("The task has not finished yet");
+                               throw new ArgumentException ("Should never be reached");
                        }
                }
 
index bd1b0d4401f8e31fccf8a27c791a618f97e02e68..f12db5fe57814cf91ada45c557aa4c5aa1b581fa 100644 (file)
@@ -29,6 +29,7 @@
 
 #if NET_4_5
 
+using System.Threading;
 using System.Threading.Tasks;
 using System.Runtime.ExceptionServices;
 
@@ -51,6 +52,9 @@ namespace System.Runtime.CompilerServices
 
                public TResult GetResult ()
                {
+                       if (!task.IsCompleted)
+                               task.WaitCore (Timeout.Infinite, CancellationToken.None);
+
                        if (task.Status != TaskStatus.RanToCompletion)
                                ExceptionDispatchInfo.Capture (TaskAwaiter.HandleUnexpectedTaskResult (task)).Throw ();
 
index 4d05e06ac4e6c55fdafb8d188b43b0fdab79b76e..32bf463ec4deeae42495f5c5f2ae381b83d0c02d 100755 (executable)
@@ -165,7 +165,21 @@ namespace System.Security.Cryptography {
                        case "tripledes":
                        case "3des":
                                return new TripleDESCryptoServiceProvider ();
-                       default:
+                       case "x509chain":
+                               name = "System.Security.Cryptography.X509Certificates.X509Chain, System";
+                               break;
+                       case "aes":
+                               name = "System.Security.Cryptography.AesManaged, System.Core";
+                               break;
+                       }
+
+                       try {
+                               // last resort, the request type might be available (if care is taken for the type not to be linked 
+                               // away) and that can allow some 3rd party code to work (e.g. extra algorithms) and make a few more
+                               // unit tests happy
+                               return Activator.CreateInstance (Type.GetType (name));
+                       }
+                       catch {
                                // method doesn't throw any exception
                                return null;
                        }
index f85d509f41c8a5c9e9e6234221310803a3cfd812..5133e20351d14bafb5dad9755472cee980f7d942 100644 (file)
@@ -46,8 +46,6 @@ namespace System.Threading.Tasks
                // and for Parent property.
                [System.ThreadStatic]
                static Task current;
-               [System.ThreadStatic]
-               static Action<Task> childWorkAdder;
                
                // parent is the outer task in which this task is created
                readonly Task parent;
@@ -371,18 +369,7 @@ namespace System.Threading.Tasks
                internal void Schedule ()
                {
                        Status = TaskStatus.WaitingToRun;
-                       
-                       // If worker is null it means it is a local one, revert to the old behavior
-                       // If TaskScheduler.Current is not being used, the scheduler was explicitly provided, so we must use that
-                       if (scheduler != TaskScheduler.Current || childWorkAdder == null || HasFlag (creationOptions, TaskCreationOptions.PreferFairness)) {
-                               scheduler.QueueTask (this);
-                       } else {
-                               /* Like the semantic of the ABP paper describe it, we add ourselves to the bottom 
-                                * of our Parent Task's ThreadWorker deque. It's ok to do that since we are in
-                                * the correct Thread during the creation
-                                */
-                               childWorkAdder (this);
-                       }
+                       scheduler.QueueTask (this);
                }
                
                void ThreadStart ()
@@ -654,25 +641,7 @@ namespace System.Threading.Tasks
                        if (millisecondsTimeout < -1)
                                throw new ArgumentOutOfRangeException ("millisecondsTimeout");
 
-                       bool result = true;
-
-                       if (!IsCompleted) {
-                               // If the task is ready to be run and we were supposed to wait on it indefinitely without cancellation, just run it
-                               if (Status == TaskStatus.WaitingToRun && millisecondsTimeout == Timeout.Infinite && scheduler != null && !cancellationToken.CanBeCanceled)
-                                       scheduler.RunInline (this, true);
-
-                               if (!IsCompleted) {
-                                       var continuation = new ManualResetContinuation ();
-                                       try {
-                                               ContinueWith (continuation);
-                                               result = continuation.Event.Wait (millisecondsTimeout, cancellationToken);
-                                       } finally {
-                                               if (!result)
-                                                       RemoveContinuation (continuation);
-                                               continuation.Dispose ();
-                                       }
-                               }
-                       }
+                       bool result = WaitCore (millisecondsTimeout, cancellationToken);
 
                        if (IsCanceled)
                                throw new AggregateException (new TaskCanceledException (this));
@@ -683,6 +652,32 @@ namespace System.Threading.Tasks
 
                        return result;
                }
+
+               internal bool WaitCore (int millisecondsTimeout, CancellationToken cancellationToken)
+               {
+                       if (IsCompleted)
+                               return true;
+
+                       // If the task is ready to be run and we were supposed to wait on it indefinitely without cancellation, just run it
+                       if (Status == TaskStatus.WaitingToRun && millisecondsTimeout == Timeout.Infinite && scheduler != null && !cancellationToken.CanBeCanceled)
+                               scheduler.RunInline (this, true);
+
+                       bool result = true;
+
+                       if (!IsCompleted) {
+                               var continuation = new ManualResetContinuation ();
+                               try {
+                                       ContinueWith (continuation);
+                                       result = continuation.Event.Wait (millisecondsTimeout, cancellationToken);
+                               } finally {
+                                       if (!result)
+                                               RemoveContinuation (continuation);
+                                       continuation.Dispose ();
+                               }
+                       }
+
+                       return result;
+               }
                
                public static void WaitAll (params Task[] tasks)
                {
index 3b63c4231d6ae2446f4f3c5af56fe0d6f57e0f8f..3a75238f4dfe390f68e1987546f77a826f7db304 100644 (file)
@@ -54,7 +54,7 @@ namespace System.Threading
 
                        this.maxCount = maxCount;
                        this.currCount = initialCount;
-                       this.handle = new ManualResetEvent (initialCount == 0);
+                       this.handle = new ManualResetEvent (initialCount > 0);
                }
 
                public void Dispose ()
index 2f90fbd131be5a982ef04f7d984020f5b257d767..91654019f146e6f8dde8272b6ca8848ad29a540c 100644 (file)
@@ -105,14 +105,16 @@ namespace System
                                T value;
                                GetGenericValueImpl (i, out value);
                                if (item == null){
-                                       if (value == null)
+                                       if (value == null) {
                                                return true;
+                                       }
 
                                        continue;
                                }
-                               
-                               if (item.Equals (value))
+
+                               if (item.Equals (value)) {
                                        return true;
+                               }
                        }
 
                        return false;
index 96555328227fc14a119aec9f5f696df8f1ede534..ab7583652c2fd5cf6a75f28c27d4c4a79dd53722 100644 (file)
@@ -162,6 +162,7 @@ namespace System
                                clone = clone.prev;
                        }
 
+                       clone.SetMulticastInvoke ();
                        clone.prev = (MulticastDelegate)this.Clone ();
 
                        for (clone = clone.prev, orig = this.prev; orig != null; orig = orig.prev) {
index 937b9214582ab5fdb3638cbe1c8a80dd9a31b47d..4c8ea8d7481cd4f1a3b6d8f140f2aff79fe1d7f2 100644 (file)
@@ -1278,11 +1278,11 @@ namespace System
                {
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       if (value.length == 0)
+                       if (value.Length == 0)
                                return 0;
                        if (this.length == 0)
                                return -1;
-                       return CultureInfo.CurrentCulture.CompareInfo.IndexOf (this, value, 0, length, CompareOptions.Ordinal);
+                       return CultureInfo.CurrentCulture.CompareInfo.IndexOf (this, value, 0, length, CompareOptions.None);
                }
 
                public int IndexOf (String value, int startIndex)
@@ -1516,7 +1516,10 @@ namespace System
 
                public bool Contains (String value)
                {
-                       return IndexOf (value) != -1;
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+
+                       return IndexOfOrdinalUnchecked (value, 0, Length) != -1;
                }
 
                public static bool IsNullOrEmpty (String value)
@@ -3081,6 +3084,43 @@ namespace System
                        memcpy4 (dest, src, size);
                }
 
+               /* Used by the runtime */
+               internal static unsafe void bzero (byte *dest, int len) {
+                       memset (dest, 0, len);
+               }
+
+               internal static unsafe void bzero_aligned_1 (byte *dest, int len) {
+                       ((byte*)dest) [0] = 0;
+               }
+
+               internal static unsafe void bzero_aligned_2 (byte *dest, int len) {
+                       ((short*)dest) [0] = 0;
+               }
+
+               internal static unsafe void bzero_aligned_4 (byte *dest, int len) {
+                       ((int*)dest) [0] = 0;
+               }
+
+               internal static unsafe void bzero_aligned_8 (byte *dest, int len) {
+                       ((long*)dest) [0] = 0;
+               }
+
+               internal static unsafe void memcpy_aligned_1 (byte *dest, byte *src, int size) {
+                       ((byte*)dest) [0] = ((byte*)src) [0];
+               }                       
+
+               internal static unsafe void memcpy_aligned_2 (byte *dest, byte *src, int size) {
+                       ((short*)dest) [0] = ((short*)src) [0];
+               }                       
+
+               internal static unsafe void memcpy_aligned_4 (byte *dest, byte *src, int size) {
+                       ((int*)dest) [0] = ((int*)src) [0];
+               }                       
+
+               internal static unsafe void memcpy_aligned_8 (byte *dest, byte *src, int size) {
+                       ((long*)dest) [0] = ((long*)src) [0];
+               }                       
+
                internal static unsafe void CharCopy (char *dest, char *src, int count) {
                        // Same rules as for memcpy, but with the premise that 
                        // chars can only be aligned to even addresses if their
index 67d8c897a12863abd274674bef533a07b58c5494..e448a889d0e7337d4e1034b17842bc263e9655ff 100644 (file)
@@ -439,7 +439,7 @@ namespace System
                {
                        result = TimeSpan.Zero;
 
-                       if (formats == null || formats.Length == 0)
+                       if (input == null || formats == null || formats.Length == 0)
                                return false;
 
                        Parser p = new Parser (input, formatProvider);
index 716a01390020af7ea1615c39497129e8b751d843..dd17fc3c95fba962daaf16b132d173ddd093c7d4 100644 (file)
 //\r
 \r
 using System;\r
+using System.Collections.Generic;\r
 using System.Diagnostics;\r
 using System.Globalization;\r
 using System.IO;\r
 using System.Text;\r
 using System.Threading;\r
 \r
+#if !MONOTOUCH\r
+using Mono.Unix;\r
+#endif\r
 using NUnit.Framework;\r
 \r
 namespace MonoTests.System.IO\r
@@ -43,7 +47,53 @@ public class DirectoryTest
                if (Directory.Exists (TempFolder))\r
                        Directory.Delete (TempFolder, true);\r
        }\r
+#if !MONOTOUCH\r
+       [Test] //BXC #12461\r
+       public void EnumerateFilesListSymlinks ()\r
+       {\r
+               if (!RunningOnUnix)\r
+                       return;\r
 \r
+               var afile = Path.Combine (TempFolder, "afile.src");\r
+               var bfile = Path.Combine (TempFolder, "bfile.src");\r
+               var cdir = Path.Combine (TempFolder, "cdir.src");\r
+\r
+               File.AppendAllText (afile, "hello");\r
+               var info = new UnixFileInfo (afile);\r
+               info.CreateSymbolicLink (bfile);\r
+               Directory.CreateDirectory (cdir);\r
+\r
+               var files0 = Directory.GetFiles (TempFolder, "*.src");\r
+               Array.Sort (files0);\r
+               Assert.AreEqual (2, files0.Length, "#1");\r
+               Assert.AreEqual (afile, files0 [0], "#2");\r
+               Assert.AreEqual (bfile, files0 [1], "#3");\r
+\r
+#if NET_4_0\r
+               var files1 = new List<string> (Directory.EnumerateFiles (TempFolder, "*.src")).ToArray ();\r
+               Array.Sort (files1);\r
+               Assert.AreEqual (2, files1.Length, "#1.b");\r
+               Assert.AreEqual (afile, files1 [0], "#2.b");\r
+               Assert.AreEqual (bfile, files1 [1], "#3.b");\r
+#endif\r
+\r
+               var files2 = Directory.GetFileSystemEntries (TempFolder, "*.src");\r
+               Array.Sort (files2);\r
+               Assert.AreEqual (3, files2.Length, "#1.c");\r
+               Assert.AreEqual (afile, files2 [0], "#2.c");\r
+               Assert.AreEqual (bfile, files2 [1], "#3.c");\r
+               Assert.AreEqual (cdir, files2 [2], "#4.c");\r
+\r
+#if NET_4_0\r
+               var files3 = new List<string> (Directory.EnumerateFileSystemEntries (TempFolder, "*.src")).ToArray ();\r
+               Array.Sort (files3);\r
+               Assert.AreEqual (3, files3.Length, "#1.d");\r
+               Assert.AreEqual (afile, files3 [0], "#2.d");\r
+               Assert.AreEqual (bfile, files3 [1], "#3.d");\r
+               Assert.AreEqual (cdir, files3 [2], "#4.d");\r
+#endif\r
+       }\r
+#endif\r
        [Test]\r
        public void CreateDirectory ()\r
        {\r
index 064cd9c76c93cb63e71c559192c754897bc45551..a0859fff295a4f6148d59578ecc3de09599e994c 100644 (file)
@@ -771,6 +771,18 @@ namespace MonoTests.System.Reflection
                }
 #endif
 
+
+               public int? Bug12856 ()
+               {
+                       return null;
+               }
+
+               [Test] //Bug #12856
+               public void MethodToStringShouldPrintFullNameOfGenericStructs ()
+               {
+                       var m = GetType ().GetMethod ("Bug12856");
+                       Assert.AreEqual ("System.Nullable`1[System.Int32] Bug12856()", m.ToString (), "#1");
+               }
        }
        
 #if NET_2_0
index 3c8c88e15adde16944fd25a76efdbf9fb36feacd..52409b4f188f443b82bd0054cf54c07334341f05 100644 (file)
@@ -58,21 +58,6 @@ namespace MonoTests.System.Runtime.CompilerServices
                        }
                }
 
-               [Test]
-               public void GetResultNotCompleted ()
-               {
-                       TaskAwaiter awaiter;
-
-                       var task = new Task (() => { });
-                       awaiter = task.GetAwaiter ();
-
-                       try {
-                               awaiter.GetResult ();
-                               Assert.Fail ();
-                       } catch (InvalidOperationException) {
-                       }
-               }
-
                [Test]
                public void GetResultCanceled ()
                {
index 6ea7651e07918275347808ed9184e8478650e246..0980b4ac3aec500ba49d190bcf911e3b1ccda47f 100644 (file)
@@ -88,21 +88,6 @@ namespace MonoTests.System.Runtime.CompilerServices
                        }
                }
 
-               [Test]
-               public void GetResultNotCompleted ()
-               {
-                       TaskAwaiter<int> awaiter;
-
-                       task = new Task<int> (() => 1);
-                       awaiter = task.GetAwaiter ();
-
-                       try {
-                               awaiter.GetResult ();
-                               Assert.Fail ();
-                       } catch (InvalidOperationException) {
-                       }
-               }
-
                [Test]
                public void GetResultCanceled ()
                {
index 0a3289f6d24e1d57e85de0221f781b1028a2caec..cc53f6a8d99a221337ae91ef80686c61ed619ceb 100644 (file)
@@ -91,13 +91,21 @@ namespace MonoTests.System.Runtime.CompilerServices
                }
 
                YieldAwaitable.YieldAwaiter a;
+               SynchronizationContext sc;
 
                [SetUp]
                public void Setup ()
                {
+                       sc = SynchronizationContext.Current;
                        a = new YieldAwaitable ().GetAwaiter ();
                }
 
+               [TearDown]
+               public void TearDown ()
+               {
+                       SynchronizationContext.SetSynchronizationContext (sc);
+               }
+
                [Test]
                public void IsCompleted ()
                {
@@ -120,6 +128,8 @@ namespace MonoTests.System.Runtime.CompilerServices
                public void OnCompleted_2 ()
                {
                        TaskScheduler scheduler = null;
+                       SynchronizationContext.SetSynchronizationContext (null);
+
                        var mre = new ManualResetEvent (false);
 
                        a.OnCompleted (() => {
@@ -136,6 +146,7 @@ namespace MonoTests.System.Runtime.CompilerServices
                {
                        var scheduler = new MyScheduler ();
                        TaskScheduler ran_scheduler = null;
+                       SynchronizationContext.SetSynchronizationContext (null);                        
 
                        var t = Task.Factory.StartNew (() => {
                                var mre = new ManualResetEvent (false);
@@ -160,20 +171,13 @@ namespace MonoTests.System.Runtime.CompilerServices
                        var mre = new ManualResetEvent (false);
 
                        var context = new MyContext ();
-                       var old = SynchronizationContext.Current;                       
-                       try {
-                               SynchronizationContext.SetSynchronizationContext (context);
-                               a.OnCompleted (() => {
-                                       context_ran = SynchronizationContext.Current;
-                                       mre.Set ();
-                               });
-
-                               Assert.IsTrue (mre.WaitOne (1000), "#1");
-
-                       } finally {
-                               SynchronizationContext.SetSynchronizationContext (old);
-                       }
+                       SynchronizationContext.SetSynchronizationContext (context);
+                       a.OnCompleted (() => {
+                               context_ran = SynchronizationContext.Current;
+                               mre.Set ();
+                       });
 
+                       Assert.IsTrue (mre.WaitOne (1000), "#1");
                        Assert.IsNull (context_ran, "#2");
                }
        }
index 4c84824c912b1a374e9f52263533836562f02f65..d3a1e2de3c4df48af34024155eb0582a0a96284e 100644 (file)
@@ -213,6 +213,9 @@ namespace MonoTests.System.Security.Principal {
                }
 
                [Test]
+#if __IOS__
+               [Ignore ("https://bugzilla.xamarin.com/show_bug.cgi?id=12789")]
+#endif
                public void SerializeRoundTrip () 
                {
                        WindowsIdentity wi = WindowsIdentity.GetCurrent ();
index b02ef641b93d0ac6de214667dd9419ff3ee44dc8..951e41ee1aaed8284ced896501d6e5aeccf3612c 100644 (file)
@@ -28,7 +28,6 @@
 
 using System;
 using System.Threading;
-using System.Threading.Tasks;
 using NUnit.Framework;
 
 namespace MonoTests.System.Threading
index 54ba7cef2a80f9ca3c9048507b379763915e68e6..1d88666538f50e9ec25e0f6acd9a61fd6a1d4ac3 100644 (file)
@@ -3261,6 +3261,74 @@ namespace MonoTests.System
                }
 #endif
 
+               public class StuffToPick
+               {
+                       public StuffToPick () {}
+                       public void Method () {}
+                       public int Property { get; set; }
+                       public event Action Event;
+                       public int Field;
+                       public void GenericMethod<T> () {}
+               }
+
+               public class StuffToPick<T>
+               {
+                       public StuffToPick () {}
+                       public void Method () {}
+                       public int Property { get; set; }
+                       public event Action Event;
+                       public int Field;
+                       public void GenericMethod<T> () {}
+               }
+
+               static void TestSerialization (CrossDomainTester tester, object o)
+               {
+                       Assert.AreSame (o, tester.ReturnArg0 (o), "serializing_type_" + o.GetType ());
+               }
+
+               [Test] //BXC #12611
+               public void ReflectionObjectsAreSerializableTest ()
+               {
+                       ad = CreateTestDomain (tempDir, true);
+                       CrossDomainTester tester = CreateCrossDomainTester (ad);
+
+                       TestSerialization (tester, typeof (StuffToPick));
+                       TestSerialization (tester, typeof (StuffToPick).GetConstructor(new Type [0]));
+                       TestSerialization (tester, typeof (StuffToPick).GetMethod ("Method"));
+                       TestSerialization (tester, typeof (StuffToPick).GetProperty ("Property"));
+                       TestSerialization (tester, typeof (StuffToPick).GetEvent ("Event"));
+                       TestSerialization (tester, typeof (StuffToPick).GetField ("Field"));
+                       TestSerialization (tester, typeof (StuffToPick).GetMethod ("GenericMethod"));
+
+                       TestSerialization (tester, typeof (StuffToPick<>));
+                       TestSerialization (tester, typeof (StuffToPick<>).GetConstructor(new Type [0]));
+                       TestSerialization (tester, typeof (StuffToPick<>).GetMethod ("Method"));
+                       TestSerialization (tester, typeof (StuffToPick<>).GetProperty ("Property"));
+                       TestSerialization (tester, typeof (StuffToPick<>).GetEvent ("Event"));
+                       TestSerialization (tester, typeof (StuffToPick<>).GetField ("Field"));
+                       TestSerialization (tester, typeof (StuffToPick<>).GetMethod ("GenericMethod"));
+
+                       TestSerialization (tester, typeof (StuffToPick<int>));
+                       TestSerialization (tester, typeof (StuffToPick<int>).GetConstructor(new Type [0]));
+                       TestSerialization (tester, typeof (StuffToPick<int>).GetMethod ("Method"));
+                       TestSerialization (tester, typeof (StuffToPick<int>).GetProperty ("Property"));
+                       TestSerialization (tester, typeof (StuffToPick<int>).GetEvent ("Event"));
+                       TestSerialization (tester, typeof (StuffToPick<int>).GetField ("Field"));
+                       TestSerialization (tester, typeof (StuffToPick<int>).GetMethod ("GenericMethod"));
+               }
+
+               [Test] //BXC #12611
+               [Category ("NotWorking")] // Serialization can't handle generic methods
+               public void GenericReflectionObjectsAreSerializableTest ()
+               {
+                       ad = CreateTestDomain (tempDir, true);
+                       CrossDomainTester tester = CreateCrossDomainTester (ad);
+
+                       TestSerialization (tester, typeof (StuffToPick).GetMethod ("GenericMethod").MakeGenericMethod (typeof (int)));
+                       TestSerialization (tester, typeof (StuffToPick<>).GetMethod ("GenericMethod").MakeGenericMethod (typeof (int)));
+                       TestSerialization (tester, typeof (StuffToPick<int>).GetMethod ("GenericMethod").MakeGenericMethod (typeof (int)));
+               }
+
                private static AppDomain CreateTestDomain (string baseDirectory, bool assemblyResolver)
                {
                        AppDomainSetup setup = new AppDomainSetup ();
@@ -3395,6 +3463,11 @@ namespace MonoTests.System
                                        return true;
                                }
                        }
+
+                       public object ReturnArg0 (object obj)
+                       {
+                               return obj;
+                       }
                }
 
                [Serializable ()]
index 4004ceaa2589b154cec692083b2af0ea7bcfee5f..21df8695667057fbfc7318277b0052e91dd54156 100644 (file)
@@ -98,5 +98,35 @@ public class MulticastDelegateTest {
                res = del1( ref val );\r
                Assert.AreEqual("abbcbbd", val , "#A05");\r
        }\r
+\r
+       [Test] //Bug #12536\r
+       public void TestCombineBothDirections ()\r
+       {\r
+               MyDelegate dela = new MyDelegate( MethodA );\r
+               MyDelegate delb = new MyDelegate( MethodB );\r
+               MyDelegate delc = new MyDelegate( MethodC );\r
+               MyDelegate deld = new MyDelegate( MethodD );\r
+\r
+               string val;\r
+               char res;\r
+\r
+               MyDelegate a = dela + delb;\r
+               val = "";\r
+               res = a (ref val);\r
+               Assert.AreEqual ("ab", val, "#1");\r
+               Assert.AreEqual ('b', res, "#2");\r
+\r
+               MyDelegate b = delc + deld;\r
+               val = "";\r
+               res = b (ref val);\r
+               Assert.AreEqual ("cd", val, "#3");\r
+               Assert.AreEqual ('d', res, "#4");\r
+\r
+               MyDelegate c = a + b;\r
+               val = "";\r
+               res = c (ref val);\r
+               Assert.AreEqual ("abcd", val, "#5");\r
+               Assert.AreEqual ('d', res, "#6");\r
+       }\r
 }\r
 }\r
index ffa822b6aee77c2aeed275d59cd5888868fa3233..489070c6ad6cabf463912e720d2c2c1fe871a51e 100644 (file)
@@ -2274,7 +2274,25 @@ public class StringTest
                Assert.IsTrue ("ABC".Contains ("ABC"));
                Assert.IsTrue ("ABC".Contains ("AB"));
                Assert.IsTrue (!"ABC".Contains ("AD"));
-               Assert.IsTrue (!"encyclop�dia".Contains("encyclopaedia"));
+               Assert.IsTrue (!"encyclopædia".Contains("encyclopaedia"));
+       }
+
+       [Test]
+       public void IndexOfIsCultureAwareWhileContainsIsNot ()
+       {
+               string a = "encyclopædia";
+               string b = "encyclopaedia";
+               Assert.IsFalse (a.Contains (b), "#1");
+               Assert.IsTrue (a.Contains ("æ"), "#1.1");
+               Assert.IsFalse (b.Contains ("æ"), "#1.2");
+               Assert.AreEqual (0, a.IndexOf (b), "#2");
+               Assert.AreEqual (8, a.IndexOf ('æ'), "#3");
+               Assert.AreEqual (-1, b.IndexOf ('æ'), "#4");
+               Assert.AreEqual (8, a.IndexOf ("æ"), "#5");
+               Assert.AreEqual (8, b.IndexOf ("æ"), "#6");
+
+               Assert.AreEqual (0, CultureInfo.CurrentCulture.CompareInfo.IndexOf (a, b, 0, a.Length, CompareOptions.None), "#7");
+               Assert.AreEqual (-1, CultureInfo.CurrentCulture.CompareInfo.IndexOf (a, b, 0, a.Length, CompareOptions.Ordinal), "#8");
        }
 
        [Test]
index 02d7e715107a07d09706995d03d965e8200a65c4..fdbd60607dbe4a98c4c5312cde18142b44282d97 100644 (file)
@@ -1322,6 +1322,8 @@ public class TimeSpanTest {
                TryParseExactHelper ("10:12", new string [0], true, "dontcare");
                TryParseExactHelper ("10:12", new string [] { String.Empty }, true, "dontcare");
                TryParseExactHelper ("10:12", new string [] { null }, true, "dontcare");
+
+               TryParseExactHelper (null, new string [] { null }, true, "dontcare");
        }
 
        void TryParseExactHelper (string input, string [] formats, bool error, string expected, IFormatProvider formatProvider = null,
diff --git a/mcs/class/corlib/monotouch_corlib.dll.sources b/mcs/class/corlib/monotouch_corlib.dll.sources
new file mode 100644 (file)
index 0000000..9e173da
--- /dev/null
@@ -0,0 +1 @@
+#include corlib.dll.sources
\ No newline at end of file
index aa7fc35e059d2411bb2c2cc25a40faa1c63b5e0e..795cae98daf8595657b6b85bc56de12c39292787 100644 (file)
@@ -117,6 +117,8 @@ LIB_MCS_FLAGS = \
        /r:System.Xml.Linq.dll                                            \
        /r:System.Configuration.dll
 
+CLEAN_FILES += $(the_lib).config
+
 TEST_MCS_FLAGS = /r:System.dll /r:System.Core.dll /r:System.Xml.dll
 
 DOC_SOURCE_DIRS = \
index c73ed1907e25691a2dad7604e5fa4b77d891a25d..c15c6137786a511569b25f0f4e809a630dd4dd10 100644 (file)
@@ -113,6 +113,7 @@ namespace Monodoc.Generators.Html
                public class ExtensionObject
                {
                        bool quiet = true;
+                       Dictionary<string, System.Reflection.Assembly> assemblyCache = new Dictionary<string, System.Reflection.Assembly> ();
 
                        public string Colorize(string code, string lang)
                        {
@@ -216,7 +217,11 @@ namespace Monodoc.Generators.Html
                                        System.Reflection.Assembly assembly = null;
                                
                                        try {
-                                               assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
+                                               if (!assemblyCache.TryGetValue (assemblyname, out assembly)) {
+                                                       assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
+                                                       if (assembly != null)
+                                                               assemblyCache[assemblyname] = assembly;
+                                               }
                                        } catch (Exception) {
                                                // nothing.
                                        }
@@ -272,7 +277,13 @@ namespace Monodoc.Generators.Html
                                        if (assemblyname == string.Empty)
                                                return string.Empty;
 
-                                       var assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
+                                       System.Reflection.Assembly assembly;
+                                       if (!assemblyCache.TryGetValue (assemblyname, out assembly)) {
+                                               assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
+                                               if (assembly != null)
+                                                       assemblyCache[assemblyname] = assembly;
+                                       }
+
                                        if (assembly == null)
                                                return string.Empty;
 
index 0fc4012de174ec62fc16f5071e761abc82b325ae..360889f6a732e84415f73ff1e1f07d8715cbc90b 100644 (file)
@@ -426,8 +426,11 @@ namespace Monodoc.Providers
                public static int GetNodeLevel (Node node)
                {
                        int i = 0;
-                       for (; !node.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase); i++)
+                       for (; !node.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase); i++) {
                                node = node.Parent;
+                               if (node == null)
+                                       return i - 1;
+                       }
                        return i - 1;
                }
 
index 1cb79c87e946e8cee769f12433857a9b72664eef..53e54c4310bec6f0a4791fec6603e4be6597bc71 100644 (file)
@@ -274,7 +274,8 @@ namespace Monodoc.Providers
                Node GetNodeTypeParent (Node node)
                {
                        // Type nodes are always at level 2 so we just need to get there
-                       while (node != null && node.Parent != null && !node.Parent.Parent.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase))
+                       while (node != null && node.Parent != null
+                              && !node.Parent.Parent.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase) && node.Parent.Parent.Parent != null)
                                node = node.Parent;
                        return node;
                }
index 11772ee344b7784d70a2b8f181c0a7d900c23da1..243406214ceacb675a0967371c9c25bd60c3d31b 100644 (file)
                <xsl:param name="id" />
                <h2>Syntax</h2>
                <div class="Signature">
-                       <xsl:attribute name="id">
-                         <xsl:copy-of select="$id" />
-                       </xsl:attribute>
+      <xsl:if test="$id != ''">
+        <xsl:attribute name="id">
+          <xsl:copy-of select="$id" />
+        </xsl:attribute>
+      </xsl:if>
                        <xsl:copy-of select="$content" />
                </div>
        </xsl:template>
index f837c7ed38bafc362bc0167bf11710dc18481716..867c9b793898dfb675e3aa05f15da5df70e6ec4c 100644 (file)
@@ -7,6 +7,7 @@ using NUnit.Framework;
 
 using Monodoc;
 using Monodoc.Generators;
+using Monodoc.Providers;
 
 // Used by ReachabilityWithCrefsTest
 // using HtmlAgilityPack;
@@ -153,6 +154,23 @@ namespace MonoTests.Monodoc
                        Assert.IsTrue (rootTree.RenderUrl ("T:System.IComparable{T}", generator, out result), "#6");
                }
 
+               [Test]
+               public void PublicUrlOnUnattachedHelpSourceRoot ()
+               {
+                       // Unattached help source have no root:/ URL attributed
+                       var hs = new EcmaHelpSource (Path.Combine (BaseDir, "sources", "netdocs"), false);
+                       var rootTree = RootTree.LoadTree (Path.GetFullPath (BaseDir), false);
+                       hs.RootTree = rootTree;
+                       Assert.IsNull (hs.Tree.RootNode.PublicUrl);
+                       var nsChildUrl = hs.Tree.RootNode.ChildNodes.First ().PublicUrl;
+                       Assert.IsNotNull (nsChildUrl);
+                       StringAssert.StartsWith ("N:", nsChildUrl);
+                       // Verify GetNodeTypeParent
+                       var typeNode = hs.Tree.RootNode.ChildNodes.First ().ChildNodes.First ();
+                       var metaNode = typeNode.ChildNodes.First (cn => cn.Element == "M");
+                       StringAssert.StartsWith (typeNode.PublicUrl, metaNode.PublicUrl);
+               }
+
                /*
                [Test, Ignore ("Mono documentation is full of syntax errors so we can't use it reliably for this test")]
                public void ReachabilityWithCrefsTest ()
index aff44d051b12829c905b4216da3f8cbe3bf0f9a4..328f174f71d4dd87f590ea3c4e8f4841ac7a3a0a 100755 (executable)
        $ csharp -v -v
 
        This will turn on the parser debugging output and will
-       generate a lot of data when parsing its input.
+       generate a lot of data when parsing its input (make sure that
+       your parser has been compiled with the -v flag, see above for 
+       details).
 
        To start with a new completion scheme, type your C# code and
        then hit the tab key to trigger the completion engine.  In the
        We then rebuild our compiler:
 
        (cd mcs/; make cs-parser.jay)
-       (cd tools/csharplib; make install)
+       (cd class/Mono.CSharp; make install)
 
        And re-run csharp:
 
diff --git a/mcs/errors/cs0019-34.cs b/mcs/errors/cs0019-34.cs
deleted file mode 100644 (file)
index de0a2ee..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// CS0019: Operator `==' cannot be applied to operands of type `int' and `null'
-// Line: 10
-// Compiler options: -langversion:ISO-1 
-
-class C
-{
-       static int Foo { get { return 3; } set {} }
-       
-       static void Main ()
-       {
-               if (Foo == null) {}
-       }
-}
diff --git a/mcs/errors/cs0019-51.cs b/mcs/errors/cs0019-51.cs
deleted file mode 100644 (file)
index 8dd9e93..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// CS0019: Operator `+' cannot be applied to operands of type `null' and `MyTypeImplicitOnly?'
-// Line: 13
-
-struct MyTypeImplicitOnly
-{
-}
-
-class C
-{
-       static void Main ()
-       {
-               MyTypeImplicitOnly? mt = null;
-               mt = null + mt;
-       }
-}
diff --git a/mcs/errors/cs0019-69.cs b/mcs/errors/cs0019-69.cs
new file mode 100644 (file)
index 0000000..ed5d67e
--- /dev/null
@@ -0,0 +1,24 @@
+// CS0019: Operator `==' cannot be applied to operands of type `S' and `S'
+// Line: 22
+
+struct S
+{
+       public static implicit operator E (S s)
+       {
+               return 0;
+       }
+}
+
+public enum E
+{
+}
+
+class C
+{
+       public static void Main ()
+       {
+               S s;
+               S s2;
+               var x = s == s2;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0019-70.cs b/mcs/errors/cs0019-70.cs
new file mode 100644 (file)
index 0000000..a8a3787
--- /dev/null
@@ -0,0 +1,21 @@
+// CS0019: Operator `&&' cannot be applied to operands of type `S?' and `S?'
+// Line: 20
+
+struct S
+{
+       public static S operator & (S s, S i)
+       {
+               return s;
+       }
+}
+
+class C
+{
+       public static void Main ()
+       {
+               S? s = new S ();
+               S? s2 = null;
+
+               var res = s && s2;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0029-34.cs b/mcs/errors/cs0029-34.cs
new file mode 100644 (file)
index 0000000..6febb9a
--- /dev/null
@@ -0,0 +1,15 @@
+// CS0029: Cannot implicitly convert type `string' to `MyTypeImplicitOnly?'
+// Line: 13
+
+struct MyTypeImplicitOnly
+{
+}
+
+class C
+{
+       static void Main ()
+       {
+               MyTypeImplicitOnly? mt = null;
+               mt = null + mt;
+       }
+}
diff --git a/mcs/errors/cs0034-6.cs b/mcs/errors/cs0034-6.cs
new file mode 100644 (file)
index 0000000..d6ebe8e
--- /dev/null
@@ -0,0 +1,25 @@
+// CS0034: Operator `==' is ambiguous on operands of type `Foo' and `Foo'
+// Line: 23
+
+public struct Foo
+{
+       public static implicit operator int? (Foo f)
+       {
+               return 1;
+       }
+
+       public static implicit operator bool? (Foo f)
+       {
+               return false;
+       }
+}
+
+class C
+{
+       public static void Main ()
+       {
+               Foo f;
+               Foo f2;
+               var v = f == f2;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0120-19.cs b/mcs/errors/cs0120-19.cs
new file mode 100644 (file)
index 0000000..f7e0fee
--- /dev/null
@@ -0,0 +1,27 @@
+// CS0120: An object reference is required to access non-static member `MainClass.Callback()'
+// Line: 9
+
+using System;
+
+class MainClass : BaseClass
+{
+       public MainClass (string a, Action callback)
+               : base (a, () => Callback ())
+       {
+       }
+
+       private void Callback ()
+       {
+       }
+}
+
+public class BaseClass
+{
+       public BaseClass (string a, int b)
+       {
+       }
+
+       public BaseClass (string a, Action callback)
+       {
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0161-4.cs b/mcs/errors/cs0161-4.cs
new file mode 100644 (file)
index 0000000..faeaf57
--- /dev/null
@@ -0,0 +1,15 @@
+// CS0161: `T.Main()': not all code paths return a value
+// Line: 6
+// CSC bug: The error is not reported even if it should as in other unreachable cases
+
+class T {
+       public static int Main ()
+       {
+               switch (1) {
+               case 1:
+                       return 0;
+               default:
+                       break;
+               }
+       }
+}
diff --git a/mcs/errors/cs0266-27.cs b/mcs/errors/cs0266-27.cs
new file mode 100644 (file)
index 0000000..a9c84e7
--- /dev/null
@@ -0,0 +1,15 @@
+// CS0266: Cannot implicitly convert type `E?' to `E'. An explicit conversion exists (are you missing a cast?)
+// Line: 13
+
+enum E
+{
+}
+
+class C
+{
+       public static void Main ()
+       {
+               E e = 0;
+               E r = e + null;
+       }
+}
diff --git a/mcs/errors/cs0266-28.cs b/mcs/errors/cs0266-28.cs
new file mode 100644 (file)
index 0000000..364ae8e
--- /dev/null
@@ -0,0 +1,15 @@
+// CS0266: Cannot implicitly convert type `int?' to `E'. An explicit conversion exists (are you missing a cast?)
+// Line: 13
+
+enum E
+{
+}
+
+class C
+{
+       public static void Main ()
+       {
+               E e = 0;
+               E r = e - null;
+       }
+}
diff --git a/mcs/errors/cs0458-14.cs b/mcs/errors/cs0458-14.cs
new file mode 100644 (file)
index 0000000..865b7ba
--- /dev/null
@@ -0,0 +1,16 @@
+// CS0458: The result of the expression is always `null' of type `int?'
+// Line: 14
+// Compiler options: -warnaserror -warn:2
+
+public enum E
+{
+}
+
+class C
+{
+       public static void Main ()
+       {
+               E? e = null;
+               var res = e - null;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0458-15.cs b/mcs/errors/cs0458-15.cs
new file mode 100644 (file)
index 0000000..1174b41
--- /dev/null
@@ -0,0 +1,26 @@
+// CS0458: The result of the expression is always `null' of type `short?'
+// Line: 24
+// Compiler options: -warnaserror -warn:2
+
+struct S
+{
+       public static short operator + (S s, S i)
+       {
+               return 2;
+       }
+
+       public static int? operator + (S? s, int? i)
+       {
+               return 2;
+       }
+
+}
+
+class C
+{
+       public static void Main ()
+       {
+               S? s = new S ();
+               var x = s + (S?)null;
+       }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0458-16.cs b/mcs/errors/cs0458-16.cs
new file mode 100644 (file)
index 0000000..f43cea2
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0458: The result of the expression is always `null' of type `int?'
+// Line: 9
+// Compiler options: -warnaserror -warn:2
+
+public class C
+{
+       public static void Main ()
+       {
+               int? s = null;
+               int? v = s + null;
+       }
+}
diff --git a/mcs/errors/cs0464-4.cs b/mcs/errors/cs0464-4.cs
new file mode 100644 (file)
index 0000000..0fdf607
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0464: The result of comparing type `int?' with null is always `false'
+// Line: 10
+// Compiler options: -warnaserror -warn:2
+
+class C
+{
+       public static void Main ()
+       {
+               int? k = 1;
+               var x = k > null;
+       }
+}
\ No newline at end of file
index b6ae39620265cc6b22e42507f88276f187fbe23d..bea7b5268d8b033b54a6e95b3451e44a141faef6 100644 (file)
@@ -1,4 +1,4 @@
-// CS0464: The result of comparing type `int' with null is always `false'
+// CS0464: The result of comparing type `int?' with null is always `false'
 // Line: 9
 // Compiler options: -warnaserror -warn:2
 
index 5af1c08b0d296c78fcf46233118deb9763812820..9c99b3a446dcf9674e40961b5db21a2b37e57111 100644 (file)
@@ -1,4 +1,4 @@
-// CS0472: The result of comparing value type `int' with null is always `false'
+// CS0472: The result of comparing value type `long' with null is always `false'
 // Line: 9
 // Compiler options: -warnaserror -warn:2
 
index 9b0f8789db0954d00e3632f69abbdd8a801f74d2..104d2dbd0a6da342e6a9ddec48178a237e469a61 100644 (file)
@@ -1,11 +1,11 @@
-// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value.'
+// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value'
 // Line: 8
 
 using System.Runtime.CompilerServices;
 
 class Test
 {
-       [MethodImplAttribute(444)]
+       [MethodImplAttribute(445)]
        public void test ()
        {
        }
diff --git a/mcs/errors/cs0647-20.cs b/mcs/errors/cs0647-20.cs
new file mode 100644 (file)
index 0000000..2b03f1c
--- /dev/null
@@ -0,0 +1,12 @@
+// 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/cs0658-3.cs b/mcs/errors/cs0658-3.cs
new file mode 100644 (file)
index 0000000..a53a934
--- /dev/null
@@ -0,0 +1,5 @@
+// CS0658: `value' is invalid attribute target. All attributes in this attribute section will be ignored
+// Line : 5
+// Compiler options: -warnaserror -warn:1
+
+[reply] ["asd"]  
\ No newline at end of file
index d7ed5a505f147d8afc027d5d66840a903340f866..a7035ef01951051449f0857d98e2c53cdaafc262 100644 (file)
@@ -1,7 +1,6 @@
 // CS1661: Cannot convert `lambda expression' to delegate type `C.WithOutParam' since there is a parameter mismatch
 // Line: 10
 
-
 class C
 {
        delegate void WithOutParam (out string value);
@@ -9,5 +8,5 @@ class C
        static void Main() 
        {
                WithOutParam o = (string l) => { return; };
-    }
+       }
 }
diff --git a/mcs/errors/cs1661-3.cs b/mcs/errors/cs1661-3.cs
new file mode 100644 (file)
index 0000000..d437e01
--- /dev/null
@@ -0,0 +1,12 @@
+// CS1661: Cannot convert `anonymous method' to delegate type `System.Predicate<T>' since there is a parameter mismatch
+// Line: 8
+
+class Test<T>
+{
+       void test (Test<T> t, System.Predicate<T> p)
+       {
+               test (t, delegate (Test<T> item) {
+                       return false;
+               });
+       }
+}
index 0e90b56126ac287d553fa059525a8ec33f94c9d7..26a77a41a05755a1319ffe31e7579251bb23da9b 100644 (file)
@@ -315,8 +315,11 @@ namespace Mono.CSharp {
 
                        var hoisted = localVariable.HoistedVariant;
                        if (hoisted != null && hoisted.Storey != this && hoisted.Storey is StateMachine) {
-                               // TODO: It's too late the field is defined in HoistedLocalVariable ctor
+                               //
+                               // Variable is already hoisted but we need it in storey which can be shared
+                               //
                                hoisted.Storey.hoisted_locals.Remove (hoisted);
+                               hoisted.Storey.Members.Remove (hoisted.Field);
                                hoisted = null;
                        }
 
@@ -728,6 +731,12 @@ namespace Mono.CSharp {
                        this.field = field;
                }
 
+               public Field Field {
+                       get {
+                               return field;
+                       }
+               }
+
                public AnonymousMethodStorey Storey {
                        get {
                                return storey;
@@ -848,12 +857,6 @@ namespace Mono.CSharp {
 
                #region Properties
 
-               public Field Field {
-                       get {
-                               return field;
-                       }
-               }
-
                public bool IsAssigned { get; set; }
 
                public ParameterReference Parameter {
@@ -893,12 +896,6 @@ namespace Mono.CSharp {
                        : base (storey, field)
                {
                }
-
-               public Field Field {
-                       get {
-                               return field;
-                       }
-               }
        }
 
        //
@@ -1044,10 +1041,10 @@ namespace Mono.CSharp {
                                                return false;
                                        
                                        if (p_mod == Parameter.Modifier.NONE)
-                                               ec.Report.Error (1677, loc, "Parameter `{0}' should not be declared with the `{1}' keyword",
-                                                             (i + 1).ToString (), Parameter.GetModifierSignature (Parameters.FixedParameters [i].ModFlags));
+                                               ec.Report.Error (1677, Parameters[i].Location, "Parameter `{0}' should not be declared with the `{1}' keyword",
+                                                             (i + 1).ToString (), Parameter.GetModifierSignature (Parameters [i].ModFlags));
                                        else
-                                               ec.Report.Error (1676, loc, "Parameter `{0}' must be declared with the `{1}' keyword",
+                                               ec.Report.Error (1676, Parameters[i].Location, "Parameter `{0}' must be declared with the `{1}' keyword",
                                                              (i+1).ToString (), Parameter.GetModifierSignature (p_mod));
                                        error = true;
                                }
@@ -1057,18 +1054,17 @@ namespace Mono.CSharp {
 
                                TypeSpec type = invoke_pd.Types [i];
                                
-                               // We assume that generic parameters are always inflated
-                               if (TypeManager.IsGenericParameter (type))
-                                       continue;
-                               
-                               if (TypeManager.HasElementType (type) && TypeManager.IsGenericParameter (TypeManager.GetElementType (type)))
+                               //
+                               // Assumes that generic mvar parameters are always inflated
+                               //
+                               if (ImplicitDelegateCreation.ContainsMethodTypeParameter (type))
                                        continue;
                                
                                if (!TypeSpecComparer.IsEqual (invoke_pd.Types [i], Parameters.Types [i])) {
                                        if (ignore_errors)
                                                return false;
                                        
-                                       ec.Report.Error (1678, loc, "Parameter `{0}' is declared as type `{1}' but should be `{2}'",
+                                       ec.Report.Error (1678, Parameters [i].Location, "Parameter `{0}' is declared as type `{1}' but should be `{2}'",
                                                      (i+1).ToString (),
                                                      Parameters.Types [i].GetSignatureForError (),
                                                      invoke_pd.Types [i].GetSignatureForError ());
@@ -1661,18 +1657,25 @@ namespace Mono.CSharp {
                                        if (src_block.HasCapturedThis) {
                                                //
                                                // Remove hoisted 'this' request when simple instance method is
-                                               // enough (no hoisted variables only 'this')
+                                               // enough. No hoisted variables only 'this' and don't need to
+                                               // propagate this to value type state machine.
                                                //
-                                               if (src_block.ParametersBlock.StateMachine == null)
+                                               StateMachine sm_parent = null;
+                                               var pb = src_block.ParametersBlock;
+                                               do {
+                                                       sm_parent = pb.StateMachine;
+                                                       pb = pb.Parent == null ? null : pb.Parent.ParametersBlock;
+                                               } while (sm_parent == null && pb != null);
+
+                                               if (sm_parent == null) {
                                                        top_block.RemoveThisReferenceFromChildrenBlock (src_block);
-
-                                               //
-                                               // Special case where parent class is used to emit instance method
-                                               // because currect storey is of value type (async host). We cannot
-                                               // use ldftn on non-boxed instances either to share mutated state
-                                               //
-                                               if (sm != null && sm.Kind == MemberKind.Struct) {
-                                                       parent = sm.Parent.PartialContainer;
+                                               } else if (sm_parent.Kind == MemberKind.Struct) {
+                                                       //
+                                                       // Special case where parent class is used to emit instance method
+                                                       // because currect storey is of value type (async host). We cannot
+                                                       // use ldftn on non-boxed instances either to share mutated state
+                                                       //
+                                                       parent = sm_parent.Parent.PartialContainer;
                                                }
                                        }
 
index 3a7cb71aaa8172736a13af9dd9ea5ad1e413bfec..b2e4e9a20181b84e86a02b000a20ffed083fdd32 100644 (file)
@@ -1179,15 +1179,27 @@ namespace Mono.CSharp
                                if (loaded.Contains (key))
                                        continue;
 
-                               // A corlib assembly is the first assembly which contains System.Object
-                               if (corlib_assembly == null && HasObjectType (a)) {
-                                       corlib_assembly = a;
-                                       continue;
-                               }
-
                                loaded.Add (key);
                        }
 
+                       if (corlib_assembly == null) {
+                               //
+                               // Requires second pass because HasObjectType can trigger assembly load event
+                               //
+                               for (int i = 0; i < loaded.Count; ++i) {
+                                       var assembly = loaded [i];
+
+                                       //
+                                       // corlib assembly is the first referenced assembly which contains System.Object
+                                       //
+                                       if (HasObjectType (assembly.Item2)) {
+                                               corlib_assembly = assembly.Item2;
+                                               loaded.RemoveAt (i);
+                                               break;
+                                       }
+                               }
+                       }
+
                        foreach (var entry in module.Compiler.Settings.AssemblyReferencesAliases) {
                                a = LoadAssemblyFile (entry.Item2, false);
                                if (a == null)
index cd32b0978662b70ce5e293fa3e677ee81a0fab8c..61cb8e239275e94c9375e11e2958f804567b6f8d 100644 (file)
@@ -804,8 +804,17 @@ namespace Mono.CSharp {
                        // Otherwise, if the selected operator is a predefined operator
                        //
                        Binary b = source as Binary;
-                       if (b == null && source is ReducedExpression)
-                               b = ((ReducedExpression) source).OriginalExpression as Binary;
+                       if (b == null) {
+                               if (source is ReducedExpression)
+                                       b = ((ReducedExpression) source).OriginalExpression as Binary;
+                               else if (source is Nullable.LiftedBinaryOperator) {
+                                       var po = ((Nullable.LiftedBinaryOperator) source);
+                                       if (po.UserOperator == null)
+                                               b = po.Binary;
+                               } else if (source is TypeCast) {
+                                       b = ((TypeCast) source).Child as Binary;
+                               }
+                       }
 
                        if (b != null) {
                                //
index a76a59f753786e76949f3cfc7594075d7dfec38e..d40665d116a18377e4839b61bf73460d39ae8278 100644 (file)
@@ -385,6 +385,19 @@ namespace Mono.CSharp {
                        return HasSecurityAttribute && IsSecurityActionValid ();
                }
 
+               static bool IsValidMethodImplOption (int value)
+               {
+                       //
+                       // Allow to use AggressiveInlining on any runtime/corlib
+                       //
+                       MethodImplOptions all = (MethodImplOptions) 256;
+                       foreach (MethodImplOptions v in System.Enum.GetValues (typeof (MethodImplOptions))) {
+                               all |= v;
+                       }
+
+                       return ((MethodImplOptions) value | all) == all;
+               }
+
                static bool IsValidArgumentType (TypeSpec t)
                {
                        if (t.IsArray) {
@@ -1025,10 +1038,14 @@ namespace Mono.CSharp {
                                                                        if (string.IsNullOrEmpty (value))
                                                                                Error_AttributeEmitError ("DllName cannot be empty or null");
                                                                }
-                                                       } else if (Type == predefined.MethodImpl && pt.BuiltinType == BuiltinTypeSpec.Type.Short &&
-                                                               !System.Enum.IsDefined (typeof (MethodImplOptions), ((Constant) arg_expr).GetValue ().ToString ())) {
-                                                               Error_AttributeEmitError ("Incorrect argument value.");
-                                                               return;
+                                                       } 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");
+                                                                       }
+                                                               }
                                                        }
                                                }
 
@@ -1988,7 +2005,7 @@ namespace Mono.CSharp {
                        if (ac != null) {
                                element = GetTransformationFlags (ac.Element);
                                if (element == null)
-                                       return null;
+                                       return new bool[] { false, false };
 
                                bool[] res = new bool[element.Length + 1];
                                res[0] = false;
index 2e453ab724ee715f7561985da524b23d1ec88724..361216652889d2eea740cefa33189a5b8fb9d8d1 100644 (file)
@@ -183,11 +183,11 @@ namespace Mono.CSharp {
                        switch (oper){
                        case Binary.Operator.BitwiseOr:
                                //
-                               // bool? operator &(bool? x, bool? y);
+                               // bool? operator |(bool? x, bool? y);
                                //
                                if ((lt.BuiltinType == BuiltinTypeSpec.Type.Bool && right is NullLiteral) ||
                                        (rt.BuiltinType == BuiltinTypeSpec.Type.Bool && left is NullLiteral)) {
-                                       var b = new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+                                       var b = new Binary (oper, left, right).ResolveOperator (ec);
 
                                        // false | null => null
                                        // null | false => null
@@ -231,7 +231,7 @@ namespace Mono.CSharp {
                                //
                                if ((lt.BuiltinType == BuiltinTypeSpec.Type.Bool && right is NullLiteral) ||
                                        (rt.BuiltinType == BuiltinTypeSpec.Type.Bool && left is NullLiteral)) {
-                                       var b = new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+                                       var b = new Binary (oper, left, right).ResolveOperator (ec);
 
                                        // false & null => false
                                        // null & false => false
@@ -495,7 +495,7 @@ namespace Mono.CSharp {
                                if (left is NullLiteral && right is NullLiteral) {
                                        var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                        lifted_int.ResolveAsType (ec);
-                                       return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+                                       return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                }
 
                                if (!DoBinaryNumericPromotions (ec, ref left, ref right))
@@ -592,7 +592,7 @@ namespace Mono.CSharp {
                                if (left is NullLiteral && right is NullLiteral) {
                                        var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                        lifted_int.ResolveAsType (ec);
-                                       return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+                                       return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                }
 
                                if (!DoBinaryNumericPromotions (ec, ref left, ref right))
@@ -688,7 +688,7 @@ namespace Mono.CSharp {
                                if (left is NullLiteral && right is NullLiteral) {
                                        var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                        lifted_int.ResolveAsType (ec);
-                                       return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+                                       return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                }
 
                                if (!DoBinaryNumericPromotions (ec, ref left, ref right))
@@ -788,7 +788,7 @@ namespace Mono.CSharp {
                                if (left is NullLiteral && right is NullLiteral) {
                                        var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                        lifted_int.ResolveAsType (ec);
-                                       return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+                                       return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                }
 
                                if (!DoBinaryNumericPromotions (ec, ref left, ref right))
@@ -878,7 +878,7 @@ namespace Mono.CSharp {
                                if (left is NullLiteral && right is NullLiteral) {
                                        var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                        lifted_int.ResolveAsType (ec);
-                                       return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+                                       return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                }
 
                                IntConstant ic = right.ConvertImplicitly (ec.BuiltinTypes.Int) as IntConstant;
@@ -899,7 +899,7 @@ namespace Mono.CSharp {
 
                                // null << value => null
                                if (left is NullLiteral)
-                                       return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+                                       return (Constant) new Binary (oper, left, right).ResolveOperator (ec);
 
                                left = left.ConvertImplicitly (ec.BuiltinTypes.Int);
                                if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Int)
@@ -915,7 +915,7 @@ namespace Mono.CSharp {
                                if (left is NullLiteral && right is NullLiteral) {
                                        var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                        lifted_int.ResolveAsType (ec);
-                                       return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+                                       return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                }
 
                                IntConstant sic = right.ConvertImplicitly (ec.BuiltinTypes.Int) as IntConstant;
@@ -935,7 +935,7 @@ namespace Mono.CSharp {
 
                                // null >> value => null
                                if (left is NullLiteral)
-                                       return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+                                       return (Constant) new Binary (oper, left, right).ResolveOperator (ec);
 
                                left = left.ConvertImplicitly (ec.BuiltinTypes.Int);
                                if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Int)
@@ -1037,11 +1037,7 @@ namespace Mono.CSharp {
                                        if (left is NullLiteral) {
                                                var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                                lifted_int.ResolveAsType (ec);
-                                               return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
-                                       }
-
-                                       if (left is Nullable.LiftedNull) {
-                                               return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+                                               return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                        }
                                }
 
@@ -1077,11 +1073,7 @@ namespace Mono.CSharp {
                                        if (left is NullLiteral) {
                                                var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                                lifted_int.ResolveAsType (ec);
-                                               return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
-                                       }
-
-                                       if (left is Nullable.LiftedNull) {
-                                               return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+                                               return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                        }
                                }
 
@@ -1117,11 +1109,7 @@ namespace Mono.CSharp {
                                        if (left is NullLiteral) {
                                                var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                                lifted_int.ResolveAsType (ec);
-                                               return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
-                                       }
-
-                                       if (left is Nullable.LiftedNull) {
-                                               return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+                                               return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                        }
                                }
 
@@ -1157,11 +1145,7 @@ namespace Mono.CSharp {
                                        if (left is NullLiteral) {
                                                var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
                                                lifted_int.ResolveAsType (ec);
-                                               return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
-                                       }
-
-                                       if (left is Nullable.LiftedNull) {
-                                               return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+                                               return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
                                        }
                                }
 
index 8875c59cd824f8e86edb63e098555f2220c6faeb..a3f25539cfad5c860c55cb48815f3c39b17a566e 100644 (file)
@@ -1178,7 +1178,7 @@ namespace Mono.CSharp
                                }
 
                                bool pair_found = false;
-                               for (int ii = i + 1; ii < members.Count; ++ii) {
+                               for (int ii = 0; ii < members.Count; ++ii) {
                                        var o_b = members[ii] as Operator;
                                        if (o_b == null || o_b.OperatorType != matching_type)
                                                continue;
index 9bb7066758d4d12a332b04ae472497558b776eed..f2b22b9547c4e85127c34298560ba2a87a2fe58d 100644 (file)
@@ -258,6 +258,9 @@ namespace Mono.CSharp
 
                public void BeginCatchBlock (TypeSpec type)
                {
+                       if (IsAnonymousStoreyMutateRequired)
+                               type = CurrentAnonymousMethod.Storey.Mutator.Mutate (type);
+
                        ig.BeginCatchBlock (type.GetMetaInfo ());
                }
 
index aceaedf7e7bf9471059428823a1a10b0f233723b..397d72c9a4ae7653be65733999a337aaf1567695 100644 (file)
@@ -3,11 +3,11 @@
 //
 // Author:
 //   Miguel de Icaza (miguel@ximian.com)
-//   Marek Safar (marek.safar@seznam.cz)
+//   Marek Safar (marek.safar@gmail.com)
 //
 // Copyright 2001-2003 Ximian, Inc.
 // Copyright 2003-2008 Novell, Inc.
-// Copyright 2011 Xamarin Inc
+// Copyright 2011-2013 Xamarin Inc
 //
 
 using System;
@@ -89,7 +89,7 @@ namespace Mono.CSharp {
                        if (this.type == type)
                                return this;
 
-                       if (Convert.ImplicitNumericConversion (this, type) == null
+                       if (!Convert.ImplicitNumericConversionExists (this.type, type)
                                return null;
 
                        bool fail;                      
index 3c5ebeae4b3cbeb7ec73acdd7fe7c1cd6a122f3e..bfbfe0374955c5e6fc33957e3ecd2527d8594a99 100644 (file)
@@ -479,7 +479,7 @@ namespace Mono.CSharp {
                        }
                        
                        if (expr_type != expr.Type)
-                               return new Nullable.Lifted (conv, unwrap, target_type).Resolve (ec);
+                               return new Nullable.LiftedConversion (conv, unwrap, target_type).Resolve (ec);
 
                        return Nullable.Wrap.Create (conv, target_type);
                }
@@ -1097,14 +1097,16 @@ namespace Mono.CSharp {
                        TypeSpec source_type = source.Type;
                        TypeSpec target_type = target;
                        Expression source_type_expr;
+                       bool nullable_source = false;
 
                        if (source_type.IsNullableType) {
                                // No unwrapping conversion S? -> T for non-reference types
                                if (implicitOnly && !TypeSpec.IsReferenceType (target_type) && !target_type.IsNullableType) {
                                        source_type_expr = source;
                                } else {
-                                       source_type_expr = Nullable.Unwrap.Create (source);
+                                       source_type_expr = Nullable.Unwrap.CreateUnwrapped (source);
                                        source_type = source_type_expr.Type;
+                                       nullable_source = true;
                                }
                        } else {
                                source_type_expr = source;
@@ -1231,26 +1233,48 @@ namespace Mono.CSharp {
                        //
                        if (t_x != target_type) {
                                //
-                               // User operator is of T?, no need to lift it
+                               // User operator is of T?
                                //
-                               if (t_x == target && t_x.IsNullableType)
-                                       return source;
+                               if (t_x.IsNullableType && target.IsNullableType) {
+                                       //
+                                       // User operator return type does not match target type we need
+                                       // yet another conversion. This should happen for promoted numeric
+                                       // types only
+                                       //
+                                       if (t_x != target) {
+                                               var unwrap = Nullable.Unwrap.CreateUnwrapped (source);
 
-                               source = implicitOnly ?
-                                       ImplicitConversionStandard (ec, source, target_type, loc) :
-                                       ExplicitConversionStandard (ec, source, target_type, loc);
+                                               source = implicitOnly ?
+                                                       ImplicitConversionStandard (ec, unwrap, target_type, loc) :
+                                                       ExplicitConversionStandard (ec, unwrap, target_type, loc);
 
-                               if (source == null)
-                                       return null;
+                                               if (source == null)
+                                                       return null;
+
+                                               source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (ec);
+                                       }
+                               } else {
+                                       source = implicitOnly ?
+                                               ImplicitConversionStandard (ec, source, target_type, loc) :
+                                               ExplicitConversionStandard (ec, source, target_type, loc);
+
+                                       if (source == null)
+                                               return null;
+                               }
                        }
 
+
                        //
-                       // Source expression is of nullable type, lift the result in the case it's null and
-                       // not nullable/lifted user operator is used
+                       // Source expression is of nullable type and underlying conversion returns
+                       // only non-nullable type we need to lift it manually
                        //
-                       if (source_type_expr is Nullable.Unwrap && !s_x.IsNullableType && (TypeSpec.IsReferenceType (target) || target_type != target))
-                               source = new Nullable.Lifted (source, source_type_expr, target).Resolve (ec);
-                       else if (target_type != target)
+                       if (nullable_source && !s_x.IsNullableType)
+                               return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (ec);
+
+                       //
+                       // Target is of nullable type but source type is not, wrap the result expression
+                       //
+                       if (target.IsNullableType && !t_x.IsNullableType)
                                source = Nullable.Wrap.Create (source, target);
 
                        return source;
@@ -1414,6 +1438,9 @@ namespace Mono.CSharp {
                                Expression am = ame.Compatible (ec, target_type);
                                if (am != null)
                                        return am.Resolve (ec);
+
+                               // Avoid CS1503 after CS1661
+                               return ErrorExpression.Instance;
                        }
 
                        if (expr_type == InternalType.Arglist && target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec)
@@ -2165,7 +2192,7 @@ namespace Mono.CSharp {
                                        if (e == null)
                                                return null;
 
-                                       return new Nullable.Lifted (e, unwrap, target_type).Resolve (ec);
+                                       return new Nullable.LiftedConversion (e, unwrap, target_type).Resolve (ec);
                                }
                                if (expr_type.BuiltinType == BuiltinTypeSpec.Type.Object) {
                                        return new UnboxCast (expr, target_type);
index e5ecaa22626634f1b11ed4d1944469ec55f48981..45b95d40aae601c8682f0b4b38fedb5dd082352e 100644 (file)
@@ -667,7 +667,7 @@ attribute_sections
                var sect = (List<Attribute>) $2;
                if (attrs == null)
                        attrs = new Attributes (sect);
-               else
+               else if (sect != null)
                        attrs.AddAttributes (sect);
                $$ = attrs;
          }
@@ -736,7 +736,7 @@ attribute_section_cont
          }
        | error
          {
-               $$ = CheckAttributeTarget (GetTokenName (yyToken), GetLocation ($1)); 
+               CheckAttributeTarget (GetTokenName (yyToken), GetLocation ($1)); 
                $$ = null;
          }
        ;       
@@ -5806,6 +5806,11 @@ throw_statement
                $$ = new Throw ((Expression) $2, GetLocation ($1));
                lbag.AddStatement ($$, GetLocation ($3));
          }
+       | THROW expression error
+         {
+               Error_SyntaxError (yyToken);
+               $$ = new Throw ((Expression) $2, GetLocation ($1));
+         }
        | THROW error
          {
                Error_SyntaxError (yyToken);
index b59aab461834e328f5b85890045af3f97b3fbd8f..37447f6df9b474f548b0f7c708b3f66ef719d6fe 100644 (file)
@@ -250,6 +250,9 @@ namespace Mono.CSharp
                public const int EvalCompilationUnitParserCharacter = 0x100001;
                public const int EvalUsingDeclarationsParserCharacter = 0x100002;
                public const int DocumentationXref = 0x100003;
+
+               const int UnicodeLS = 0x2028;
+               const int UnicodePS = 0x2029;
                
                //
                // XML documentation buffer. The save point is used to divide
@@ -1806,18 +1809,25 @@ namespace Mono.CSharp
                                x = reader.Read ();
                        }
                        
-                       if (x == '\r') {
-                               if (peek_char () == '\n') {
-                                       putback_char = -1;
-                               }
+                       if (x <= 13) {
+                               if (x == '\r') {
+                                       if (peek_char () == '\n') {
+                                               putback_char = -1;
+                                       }
 
-                               x = '\n';
-                               advance_line ();
-                       } else if (x == '\n') {
+                                       x = '\n';
+                                       advance_line ();
+                               } else if (x == '\n') {
+                                       advance_line ();
+                               } else {
+                                       col++;
+                               }
+                       } else if (x >= UnicodeLS && x <= UnicodePS) {
                                advance_line ();
                        } else {
                                col++;
                        }
+
                        return x;
                }
 
@@ -1849,7 +1859,7 @@ namespace Mono.CSharp
                                throw new InternalErrorException (string.Format ("Secondary putback [{0}] putting back [{1}] is not allowed", (char)putback_char, (char) c), Location);
                        }
 
-                       if (c == '\n' || col == 0) {
+                       if (c == '\n' || col == 0 || (c >= UnicodeLS && c <= UnicodePS)) {
                                // It won't happen though.
                                line--;
                                ref_line--;
@@ -1931,7 +1941,7 @@ namespace Mono.CSharp
                        int has_identifier_argument = (int)(cmd & PreprocessorDirective.RequiresArgument);
                        int pos = 0;
 
-                       while (c != -1 && c != '\n') {
+                       while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS) {
                                if (c == '\\' && has_identifier_argument >= 0) {
                                        if (has_identifier_argument != 0) {
                                                has_identifier_argument = 1;
@@ -1958,10 +1968,7 @@ namespace Mono.CSharp
                                        // Eat single-line comments
                                        //
                                        get_char ();
-                                       do {
-                                               c = get_char ();
-                                       } while (c != -1 && c != '\n');
-
+                                       ReadToEndOfLine ();
                                        break;
                                }
 
@@ -2023,10 +2030,7 @@ namespace Mono.CSharp
                                //
                                // Eat any remaining characters to continue parsing on next line
                                //
-                               while (c != -1 && c != '\n') {
-                                       c = get_char ();
-                               }
-
+                               ReadToEndOfLine ();
                                return false;
                        }
 
@@ -2035,10 +2039,7 @@ namespace Mono.CSharp
                                //
                                // Eat any remaining characters to continue parsing on next line
                                //
-                               while (c != -1 && c != '\n') {
-                                       c = get_char ();
-                               }
-
+                               ReadToEndOfLine ();
                                return new_line != 0;
                        }
 
@@ -2052,13 +2053,11 @@ namespace Mono.CSharp
                                c = 0;
                        }
 
-                       if (c != '\n' && c != '/' && c != '"') {
+                       if (c != '\n' && c != '/' && c != '"' && c != UnicodeLS && c != UnicodePS) {
                                //
                                // Eat any remaining characters to continue parsing on next line
                                //
-                               while (c != -1 && c != '\n') {
-                                       c = get_char ();
-                               }
+                               ReadToEndOfLine ();
 
                                Report.Error (1578, loc, "Filename, single-line comment or end-of-line expected");
                                return true;
@@ -2074,16 +2073,15 @@ namespace Mono.CSharp
                                }
                        }
 
-                       if (c == '\n') {
+                       if (c == '\n' || c == UnicodeLS || c == UnicodePS) {
+
                        } else if (c == '/') {
                                ReadSingleLineComment ();
                        } else {
                                //
                                // Eat any remaining characters to continue parsing on next line
                                //
-                               while (c != -1 && c != '\n') {
-                                       c = get_char ();
-                               }
+                               ReadToEndOfLine ();
 
                                Error_EndLineExpected ();
                                return true;
@@ -2318,7 +2316,7 @@ namespace Mono.CSharp
                string TokenizeFileName (ref int c)
                {
                        var string_builder = new StringBuilder ();
-                       while (c != -1 && c != '\n') {
+                       while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS) {
                                c = get_char ();
                                if (c == '"') {
                                        c = get_char ();
@@ -2366,25 +2364,28 @@ namespace Mono.CSharp
                                        Report.Warning (1692, 1, Location, "Invalid number");
 
                                        // Read everything till the end of the line or file
-                                       do {
-                                               c = get_char ();
-                                       } while (c != -1 && c != '\n');
+                                       ReadToEndOfLine ();
                                }
                        }
 
                        return number;
                }
 
+               void ReadToEndOfLine ()
+               {
+                       int c;
+                       do {
+                               c = get_char ();
+                       } while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS);
+               }
+
                void ReadSingleLineComment ()
                {
                        if (peek_char () != '/')
                                Report.Warning (1696, 1, Location, "Single-line comment or end-of-line expected");
 
                        // Read everything till the end of the line or file
-                       int c;
-                       do {
-                               c = get_char ();
-                       } while (c != -1 && c != '\n');
+                       ReadToEndOfLine ();
                }
 
                /// <summary>
@@ -2410,7 +2411,7 @@ namespace Mono.CSharp
 
                                                var loc = Location;
 
-                                               if (c == '\n' || c == '/') {
+                                               if (c == '\n' || c == '/' || c == UnicodeLS || c == UnicodePS) {
                                                        if (c == '/')
                                                                ReadSingleLineComment ();
 
@@ -2436,7 +2437,7 @@ namespace Mono.CSharp
                                                                                Report.RegisterWarningRegion (loc).WarningEnable (loc, code, context);
                                                                        }
                                                                }
-                                                       } while (code >= 0 && c != '\n' && c != -1);
+                                                       } while (code >= 0 && c != '\n' && c != -1 && c != UnicodeLS && c != UnicodePS);
                                                }
 
                                                return;
@@ -2446,8 +2447,7 @@ namespace Mono.CSharp
                                Report.Warning (1634, 1, Location, "Expected disable or restore");
 
                                // Eat any remaining characters on the line
-                               while (c != '\n' && c != -1)
-                                       c = get_char ();
+                               ReadToEndOfLine ();
 
                                return;
                        }
@@ -2927,7 +2927,7 @@ namespace Mono.CSharp
                                        return Token.LITERAL;
                                }
 
-                               if (c == '\n') {
+                               if (c == '\n' || c == UnicodeLS || c == UnicodePS) {
                                        if (!quoted) {
                                                Report.Error (1010, Location, "Newline in constant");
 
@@ -3150,6 +3150,8 @@ namespace Mono.CSharp
                                        case '\v':
                                        case '\r':
                                        case '\n':
+                                       case UnicodeLS:
+                                       case UnicodePS:
                                        case '/':
                                                next = peek_token ();
                                                if (next == Token.COMMA || next == Token.CLOSE_BRACKET)
@@ -3180,6 +3182,7 @@ namespace Mono.CSharp
                                                case Token.FOREACH:
                                                case Token.TYPEOF:
                                                case Token.WHILE:
+                                               case Token.SWITCH:
                                                case Token.USING:
                                                case Token.DEFAULT:
                                                case Token.DELEGATE:
@@ -3367,7 +3370,7 @@ namespace Mono.CSharp
                                                        }
                                                }
 
-                                               while ((d = get_char ()) != -1 && d != '\n');
+                                               ReadToEndOfLine ();
 
                                                any_token_seen |= tokens_seen;
                                                tokens_seen = false;
@@ -3405,7 +3408,7 @@ namespace Mono.CSharp
                                                        if (docAppend)
                                                                xml_comment_buffer.Append ((char) d);
                                                        
-                                                       if (d == '\n'){
+                                                       if (d == '\n' || d == UnicodeLS || d == UnicodePS){
                                                                any_token_seen |= tokens_seen;
                                                                tokens_seen = false;
                                                                // 
@@ -3455,6 +3458,8 @@ namespace Mono.CSharp
                                        return is_number (c, false);
 
                                case '\n': // white space
+                               case UnicodeLS:
+                               case UnicodePS:
                                        any_token_seen |= tokens_seen;
                                        tokens_seen = false;
                                        comments_seen = false;
@@ -3491,7 +3496,7 @@ namespace Mono.CSharp
                                                        continue;
                                                }
 
-                                               if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\v' )
+                                               if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\v' || c == UnicodeLS || c == UnicodePS)
                                                        continue;
 
                                                if (c == '#') {
@@ -3575,7 +3580,7 @@ namespace Mono.CSharp
                                return Token.LITERAL;
                        }
 
-                       if (c == '\n') {
+                       if (c == '\n' || c == UnicodeLS || c == UnicodePS) {
                                Report.Error (1010, start_location, "Newline in constant");
                                return Token.ERROR;
                        }
@@ -3596,7 +3601,7 @@ namespace Mono.CSharp
 
                                // Try to recover, read until newline or next "'"
                                while ((c = get_char ()) != -1) {
-                                       if (c == '\n' || c == '\'')
+                                       if (c == '\n' || c == '\'' || c == UnicodeLS || c == UnicodePS)
                                                break;
                                }
                        }
index 13a2a4c7bcf971abd38c1b322d7cf01d890b441c..329e04eec3c7f8108a6add06ce6240163e5feaf6 100644 (file)
@@ -663,7 +663,7 @@ namespace Mono.CSharp {
                //
                // Returns true when type is MVAR or has MVAR reference
                //
-               static bool ContainsMethodTypeParameter (TypeSpec type)
+               public static bool ContainsMethodTypeParameter (TypeSpec type)
                {
                        var tps = type as TypeParameterSpec;
                        if (tps != null)
index abc646c2298ca53887b38152f4f35582c938539f..e24e008e809c128af043cac0196ca28d7fb2f787 100644 (file)
@@ -511,6 +511,23 @@ namespace Mono.CSharp {
                        return e;
                }
 
+               public Constant ResolveLabelConstant (ResolveContext rc)
+               {
+                       var expr = Resolve (rc);
+                       if (expr == null)
+                               return null;
+
+                       Constant c = expr as Constant;
+                       if (c == null) {
+                               if (c.type != InternalType.ErrorType)
+                                       rc.Report.Error (150, StartLocation, "A constant value is expected");
+
+                               return null;
+                       }
+
+                       return c;
+               }
+
                public virtual void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
                {
                        rc.Module.Compiler.Report.Error (182, loc,
@@ -1253,8 +1270,20 @@ namespace Mono.CSharp {
                public static Expression Create (Expression child, TypeSpec type)
                {
                        Constant c = child as Constant;
-                       if (c != null)
-                               return new EmptyConstantCast (c, type);
+                       if (c != null) {
+                               var enum_constant = c as EnumConstant;
+                               if (enum_constant != null)
+                                       c = enum_constant.Child;
+
+                               if (!(c is ReducedExpression.ReducedConstantExpression)) {
+                                       if (c.Type == type)
+                                               return c;
+
+                                       var res = c.ConvertImplicitly (type);
+                                       if (res != null)
+                                               return res;
+                               }
+                       }
 
                        EmptyCast e = child as EmptyCast;
                        if (e != null)
@@ -1680,7 +1709,11 @@ namespace Mono.CSharp {
                public override void Emit (EmitContext ec)
                {
                        base.Emit (ec);
+                       Emit (ec, mode);
+               }
 
+               public static void Emit (EmitContext ec, Mode mode)
+               {
                        if (ec.HasSet (EmitContext.Options.CheckedScope)) {
                                switch (mode){
                                case Mode.I1_U1: ec.Emit (OpCodes.Conv_Ovf_U1); break;
@@ -1949,7 +1982,7 @@ namespace Mono.CSharp {
        //
        public class ReducedExpression : Expression
        {
-               sealed class ReducedConstantExpression : EmptyConstantCast
+               public sealed class ReducedConstantExpression : EmptyConstantCast
                {
                        readonly Expression orig_expr;
 
@@ -4672,7 +4705,7 @@ namespace Mono.CSharp {
                                // is used as argument or delegate conversion
                                //
                                if (!Convert.ImplicitConversionExists (ec, argument.Expr, parameter)) {
-                                       return 2;
+                                       return parameter.IsDelegate && argument.Expr is AnonymousMethodExpression ? 2 : 3;
                                }
                        }
 
index 8d5bf8ae01e893f48c07eb72891c6445a110063a..14776484844ffafb07da563b3be88b150e706349 100644 (file)
@@ -1868,6 +1868,8 @@ namespace Mono.CSharp
                {
                        protected readonly TypeSpec left;
                        protected readonly TypeSpec right;
+                       protected readonly TypeSpec left_unwrap;
+                       protected readonly TypeSpec right_unwrap;
                        public readonly Operator OperatorsMask;
                        public TypeSpec ReturnType;
 
@@ -1891,45 +1893,183 @@ namespace Mono.CSharp
                                if ((op_mask & Operator.ValuesOnlyMask) != 0)
                                        throw new InternalErrorException ("Only masked values can be used");
 
+                               if ((op_mask & Operator.NullableMask) != 0) {
+                                       left_unwrap = Nullable.NullableInfo.GetUnderlyingType (ltype);
+                                       right_unwrap = Nullable.NullableInfo.GetUnderlyingType (rtype);
+                               } else {
+                                       left_unwrap = ltype;
+                                       right_unwrap = rtype;
+                               }
+
                                this.left = ltype;
                                this.right = rtype;
                                this.OperatorsMask = op_mask;
                                this.ReturnType = return_type;
                        }
 
-                       public virtual Expression ConvertResult (ResolveContext ec, Binary b)
+                       public bool IsLifted {
+                               get {
+                                       return (OperatorsMask & Operator.NullableMask) != 0;
+                               }
+                       }
+
+                       public virtual Expression ConvertResult (ResolveContext rc, Binary b)
                        {
+                               Constant c;
+
+                               var left_expr = b.left;
+                               var right_expr = b.right;
+
                                b.type = ReturnType;
 
-                               b.left = Convert.ImplicitConversion (ec, b.left, left, b.left.Location);
-                               b.right = Convert.ImplicitConversion (ec, b.right, right, b.right.Location);
+                               if (IsLifted) {
+                                       if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+                                               b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+                                               b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+                                       }
+
+                                       if (right_expr.IsNull) {
+                                               if ((b.oper & Operator.EqualityMask) != 0) {
+                                                       if (!left_expr.Type.IsNullableType && left_expr.Type == left_unwrap)
+                                                               return b.CreateLiftedValueTypeResult (rc, left_unwrap);
+                                               } else if ((b.oper & Operator.BitwiseMask) != 0) {
+                                                       if (left_unwrap.BuiltinType != BuiltinTypeSpec.Type.Bool)
+                                                               return Nullable.LiftedNull.CreateFromExpression (rc, b);
+                                               } else {
+                                                       b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+                                                       b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
+                                                       if ((b.Oper & (Operator.ArithmeticMask | Operator.ShiftMask)) != 0)
+                                                               return Nullable.LiftedNull.CreateFromExpression (rc, b);
+
+                                                       return b.CreateLiftedValueTypeResult (rc, left);
+                                               }
+                                       } else if (left_expr.IsNull) {
+                                               if ((b.oper & Operator.EqualityMask) != 0) {
+                                                       if (!right_expr.Type.IsNullableType && right_expr.Type == right_unwrap)
+                                                               return b.CreateLiftedValueTypeResult (rc, right_unwrap);
+                                               } else if ((b.oper & Operator.BitwiseMask) != 0) {
+                                                       if (right_unwrap.BuiltinType != BuiltinTypeSpec.Type.Bool)
+                                                               return Nullable.LiftedNull.CreateFromExpression (rc, b);
+                                               } else {
+                                                       b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+                                                       b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
+                                                       if ((b.Oper & (Operator.ArithmeticMask | Operator.ShiftMask)) != 0)
+                                                               return Nullable.LiftedNull.CreateFromExpression (rc, b);
+
+                                                       return b.CreateLiftedValueTypeResult (rc, right);
+                                               }
+                                       }
+                               }
 
                                //
                                // A user operators does not support multiple user conversions, but decimal type
                                // is considered to be predefined type therefore we apply predefined operators rules
                                // and then look for decimal user-operator implementation
                                //
-                               if (left.BuiltinType == BuiltinTypeSpec.Type.Decimal)
-                                       return b.ResolveUserOperator (ec, b.left, b.right);
+                               if (left.BuiltinType == BuiltinTypeSpec.Type.Decimal) {
+                                       b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+                                       b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
+                                       return b.ResolveUserOperator (rc, b.left, b.right);
+                               }
 
-                               var c = b.right as Constant;
+                               c = right_expr as Constant;
                                if (c != null) {
-                                       if (c.IsDefaultValue && (b.oper == Operator.Addition || b.oper == Operator.Subtraction || (b.oper == Operator.BitwiseOr && !(b is Nullable.LiftedBinaryOperator))))
-                                               return ReducedExpression.Create (b.left, b).Resolve (ec);
+                                       if (c.IsDefaultValue) {
+                                               //
+                                               // Optimizes
+                                               // 
+                                               // (expr + 0) to expr
+                                               // (expr - 0) to expr
+                                               // (bool? | false) to bool?
+                                               //
+                                               if (b.oper == Operator.Addition || b.oper == Operator.Subtraction ||
+                                                       (b.oper == Operator.BitwiseOr && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && c is BoolConstant)) {
+                                                       b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+                                                       return ReducedExpression.Create (b.left, b).Resolve (rc);
+                                               }
+                                       } else {
+                                               //
+                                               // Optimizes
+                                               //
+                                               // (bool? & true) to bool?
+                                               //
+                                               if (IsLifted && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && b.oper == Operator.BitwiseAnd) {
+                                                       return ReducedExpression.Create (b.left, b).Resolve (rc);
+                                               }
+                                       }
+
                                        if ((b.oper == Operator.Multiply || b.oper == Operator.Division) && c.IsOneInteger)
-                                               return ReducedExpression.Create (b.left, b).Resolve (ec);
-                                       return b;
+                                               return ReducedExpression.Create (b.left, b).Resolve (rc);
+
+                                       if ((b.oper & Operator.ShiftMask) != 0 && c is IntConstant) {
+                                               b.right = new IntConstant (rc.BuiltinTypes, ((IntConstant) c).Value & GetShiftMask (left_unwrap), b.right.Location);
+                                       }
                                }
 
                                c = b.left as Constant;
                                if (c != null) {
-                                       if (c.IsDefaultValue && (b.oper == Operator.Addition || (b.oper == Operator.BitwiseOr && !(b is Nullable.LiftedBinaryOperator))))
-                                               return ReducedExpression.Create (b.right, b).Resolve (ec);
+                                       if (c.IsDefaultValue) {
+                                               //
+                                               // Optimizes
+                                               // 
+                                               // (0 + expr) to expr
+                                               // (false | bool?) to bool?
+                                               //
+                                               if (b.oper == Operator.Addition ||
+                                                       (b.oper == Operator.BitwiseOr && right_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && c is BoolConstant)) {
+                                                       b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+                                                       return ReducedExpression.Create (b.right, b).Resolve (rc);
+                                               }
+                                       } else {
+                                               //
+                                               // Optimizes
+                                               //
+                                               // (true & bool?) to bool?
+                                               //
+                                               if (IsLifted && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && b.oper == Operator.BitwiseAnd) {
+                                                       return ReducedExpression.Create (b.right, b).Resolve (rc);
+                                               }
+                                       }
+
                                        if (b.oper == Operator.Multiply && c.IsOneInteger)
-                                               return ReducedExpression.Create (b.right, b).Resolve (ec);
-                                       return b;
+                                               return ReducedExpression.Create (b.right, b).Resolve (rc);
+                               }
+
+                               if (IsLifted) {
+                                       var lifted = new Nullable.LiftedBinaryOperator (b);
+
+                                       TypeSpec ltype, rtype;
+                                       if (b.left.Type.IsNullableType) {
+                                               lifted.UnwrapLeft = new Nullable.Unwrap (b.left);
+                                               ltype = left_unwrap;
+                                       } else {
+                                               ltype = left;
+                                       }
+
+                                       if (b.right.Type.IsNullableType) {
+                                               lifted.UnwrapRight = new Nullable.Unwrap (b.right);
+                                               rtype = right_unwrap;
+                                       } else {
+                                               rtype = right;
+                                       }
+
+                                       lifted.Left = b.left.IsNull ?
+                                               b.left :
+                                               Convert.ImplicitConversion (rc, lifted.UnwrapLeft ?? b.left, ltype, b.left.Location);
+
+                                       lifted.Right = b.right.IsNull ?
+                                               b.right :
+                                               Convert.ImplicitConversion (rc, lifted.UnwrapRight ?? b.right, rtype, b.right.Location);
+
+                                       return lifted.Resolve (rc);
                                }
 
+                               b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+                               b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
                                return b;
                        }
 
@@ -1953,16 +2093,22 @@ namespace Mono.CSharp
 
                        public PredefinedOperator ResolveBetterOperator (ResolveContext ec, PredefinedOperator best_operator)
                        {
+                               if ((OperatorsMask & Operator.DecomposedMask) != 0)
+                                       return best_operator;
+
+                               if ((best_operator.OperatorsMask & Operator.DecomposedMask) != 0)
+                                       return this;
+
                                int result = 0;
                                if (left != null && best_operator.left != null) {
-                                       result = OverloadResolver.BetterTypeConversion (ec, best_operator.left, left);
+                                       result = OverloadResolver.BetterTypeConversion (ec, best_operator.left_unwrap, left_unwrap);
                                }
 
                                //
                                // When second argument is same as the first one, the result is same
                                //
                                if (right != null && (left != right || best_operator.left != best_operator.right)) {
-                                       result |= OverloadResolver.BetterTypeConversion (ec, best_operator.right, right);
+                                       result |= OverloadResolver.BetterTypeConversion (ec, best_operator.right_unwrap, right_unwrap);
                                }
 
                                if (result == 0 || result > 2)
@@ -2007,44 +2153,6 @@ namespace Mono.CSharp
                        }
                }
 
-               sealed class PredefinedShiftOperator : PredefinedOperator
-               {
-                       public PredefinedShiftOperator (TypeSpec ltype, TypeSpec rtype, Operator op_mask)
-                               : base (ltype, rtype, op_mask)
-                       {
-                       }
-
-                       public override Expression ConvertResult (ResolveContext ec, Binary b)
-                       {
-                               b.left = Convert.ImplicitConversion (ec, b.left, left, b.left.Location);
-
-                               Expression expr_tree_expr = Convert.ImplicitConversion (ec, b.right, right, b.right.Location);
-
-                               int right_mask = left.BuiltinType == BuiltinTypeSpec.Type.Int || left.BuiltinType == BuiltinTypeSpec.Type.UInt ? 0x1f : 0x3f;
-
-                               //
-                               // b = b.left >> b.right & (0x1f|0x3f)
-                               //
-                               b.right = new Binary (Operator.BitwiseAnd,
-                                       b.right, new IntConstant (ec.BuiltinTypes, right_mask, b.right.Location)).Resolve (ec);
-
-                               //
-                               // Expression tree representation does not use & mask
-                               //
-                               b.right = ReducedExpression.Create (b.right, expr_tree_expr).Resolve (ec);
-                               b.type = ReturnType;
-
-                               //
-                               // Optimize shift by 0
-                               //
-                               var c = b.right as Constant;
-                               if (c != null && c.IsDefaultValue)
-                                       return ReducedExpression.Create (b.left, b).Resolve (ec);
-
-                               return b;
-                       }
-               }
-
                sealed class PredefinedEqualityOperator : PredefinedOperator
                {
                        MethodSpec equal_method, inequal_method;
@@ -2198,21 +2306,22 @@ namespace Mono.CSharp
                        LogicalMask             = 1 << 10,
                        AdditionMask    = 1 << 11,
                        SubtractionMask = 1 << 12,
-                       RelationalMask  = 1 << 13
+                       RelationalMask  = 1 << 13,
+
+                       DecomposedMask  = 1 << 19,
+                       NullableMask    = 1 << 20,
                }
 
-               protected enum State
+               enum State : byte
                {
                        None = 0,
                        Compound = 1 << 1,
-                       LeftNullLifted = 1 << 2,
-                       RightNullLifted = 1 << 3
                }
 
                readonly Operator oper;
-               protected Expression left, right;
-               protected State state;
-               Expression enum_conversion;
+               Expression left, right;
+               State state;
+               ConvCast.Mode enum_conversion;
 
                public Binary (Operator oper, Expression left, Expression right, bool isCompound)
                        : this (oper, left, right)
@@ -2353,7 +2462,7 @@ namespace Mono.CSharp
                                oper, l, r);
                }
                
-               protected void Error_OperatorCannotBeApplied (ResolveContext ec, Expression left, Expression right)
+               void Error_OperatorCannotBeApplied (ResolveContext ec, Expression left, Expression right)
                {
                        Error_OperatorCannotBeApplied (ec, left, right, OperName (oper), loc);
                }
@@ -2452,7 +2561,7 @@ namespace Mono.CSharp
                        return left.ContainsEmitWithAwait () || right.ContainsEmitWithAwait ();
                }
 
-               public static void EmitOperatorOpcode (EmitContext ec, Operator oper, TypeSpec l)
+               public static void EmitOperatorOpcode (EmitContext ec, Operator oper, TypeSpec l, Expression right)
                {
                        OpCode opcode;
 
@@ -2509,6 +2618,11 @@ namespace Mono.CSharp
                                break;
 
                        case Operator.RightShift:
+                               if (!(right is IntConstant)) {
+                                       ec.EmitInt (GetShiftMask (l));
+                                       ec.Emit (OpCodes.And);
+                               }
+
                                if (IsUnsigned (l))
                                        opcode = OpCodes.Shr_Un;
                                else
@@ -2516,6 +2630,11 @@ namespace Mono.CSharp
                                break;
                                
                        case Operator.LeftShift:
+                               if (!(right is IntConstant)) {
+                                       ec.EmitInt (GetShiftMask (l));
+                                       ec.Emit (OpCodes.And);
+                               }
+
                                opcode = OpCodes.Shl;
                                break;
 
@@ -2584,6 +2703,11 @@ namespace Mono.CSharp
                        ec.Emit (opcode);
                }
 
+               static int GetShiftMask (TypeSpec type)
+               {
+                       return type.BuiltinType == BuiltinTypeSpec.Type.Int || type.BuiltinType == BuiltinTypeSpec.Type.UInt ? 0x1f : 0x3f;
+               }
+
                static bool IsUnsigned (TypeSpec t)
                {
                        switch (t.BuiltinType) {
@@ -2603,8 +2727,10 @@ namespace Mono.CSharp
                        return t.BuiltinType == BuiltinTypeSpec.Type.Float || t.BuiltinType == BuiltinTypeSpec.Type.Double;
                }
 
-               Expression ResolveOperator (ResolveContext ec)
+               public Expression ResolveOperator (ResolveContext rc)
                {
+                       eclass = ExprClass.Value;
+
                        TypeSpec l = left.Type;
                        TypeSpec r = right.Type;
                        Expression expr;
@@ -2613,54 +2739,105 @@ namespace Mono.CSharp
                        //
                        // Handles predefined primitive types
                        //
-                       if (BuiltinTypeSpec.IsPrimitiveType (l) && BuiltinTypeSpec.IsPrimitiveType (r)) {
+                       if ((BuiltinTypeSpec.IsPrimitiveType (l) || (l.IsNullableType && BuiltinTypeSpec.IsPrimitiveType (Nullable.NullableInfo.GetUnderlyingType (l)))) &&
+                               (BuiltinTypeSpec.IsPrimitiveType (r) || (r.IsNullableType && BuiltinTypeSpec.IsPrimitiveType (Nullable.NullableInfo.GetUnderlyingType (r))))) {
                                if ((oper & Operator.ShiftMask) == 0) {
-                                       if (l.BuiltinType != BuiltinTypeSpec.Type.Bool && !DoBinaryOperatorPromotion (ec))
+                                       if (!DoBinaryOperatorPromotion (rc))
                                                return null;
 
-                                       primitives_only = true;
+                                       primitives_only = BuiltinTypeSpec.IsPrimitiveType (l) && BuiltinTypeSpec.IsPrimitiveType (r);
                                }
                        } else {
                                // Pointers
                                if (l.IsPointer || r.IsPointer)
-                                       return ResolveOperatorPointer (ec, l, r);
+                                       return ResolveOperatorPointer (rc, l, r);
 
-                               // Enums
                                bool lenum = l.IsEnum;
                                bool renum = r.IsEnum;
-                               if (lenum || renum) {
-                                       expr = ResolveOperatorEnum (ec, lenum, renum, l, r);
+                               if ((oper & (Operator.ComparisonMask | Operator.BitwiseMask)) != 0) {
+                                       //
+                                       // Enumerations
+                                       //
+                                       if (IsEnumOrNullableEnum (l) || IsEnumOrNullableEnum (r)) {
+                                               expr = ResolveSingleEnumOperators (rc, lenum, renum, l, r);
 
-                                       if (expr != null)
-                                               return expr;
-                               }
+                                               if (expr == null)
+                                                       return null;
 
-                               // Delegates
-                               if ((oper == Operator.Addition || oper == Operator.Subtraction) && (l.IsDelegate || r.IsDelegate)) {
-                                               
-                                       expr = ResolveOperatorDelegate (ec, l, r);
+                                               if ((oper & Operator.BitwiseMask) != 0) {
+                                                       expr = EmptyCast.Create (expr, type);
+                                                       AddEnumResultCast (type);
+
+                                                       if (oper == Operator.BitwiseAnd && left.Type.IsEnum && right.Type.IsEnum) {
+                                                               expr = OptimizeAndOperation (expr);
+                                                       }
+                                               }
 
-                                       // TODO: Can this be ambiguous
-                                       if (expr != null)
+                                               left = ConvertEnumOperandToUnderlyingType (rc, left);
+                                               right = ConvertEnumOperandToUnderlyingType (rc, right);
                                                return expr;
+                                       }
+                               } else if ((oper == Operator.Addition || oper == Operator.Subtraction)) {
+                                       if (IsEnumOrNullableEnum (l) || IsEnumOrNullableEnum (r)) {
+                                               //
+                                               // Enumerations
+                                               //
+                                               expr = ResolveEnumOperators (rc, lenum, renum, l, r);
+
+                                               //
+                                               // We cannot break here there is also Enum + String possible match
+                                               // which is not ambiguous with predefined enum operators
+                                               //
+                                               if (expr != null) {
+                                                       left = ConvertEnumOperandToUnderlyingType (rc, left);
+                                                       right = ConvertEnumOperandToUnderlyingType (rc, right);
+
+                                                       return expr;
+                                               }
+                                       } else if (l.IsDelegate || r.IsDelegate) {
+                                               //
+                                               // Delegates
+                                               //
+                                               expr = ResolveOperatorDelegate (rc, l, r);
+
+                                               // TODO: Can this be ambiguous
+                                               if (expr != null)
+                                                       return expr;
+                                       }
                                }
 
                                // User operators
-                               expr = ResolveUserOperator (ec, left, right);
+                               expr = ResolveUserOperator (rc, left, right);
                                if (expr != null)
                                        return expr;
-
-                               // Predefined reference types equality
-                               if ((oper & Operator.EqualityMask) != 0) {
-                                       expr = ResolveOperatorEquality (ec, l, r);
-                                       if (expr != null)
-                                               return expr;
-                               }
                        }
+                       
+                       //
+                       // Equality operators are more complicated
+                       //
+                       if ((oper & Operator.EqualityMask) != 0) {
+                               return ResolveEquality (rc, l, r, primitives_only);
+                       }
+
+                       expr = ResolveOperatorPredefined (rc, rc.BuiltinTypes.OperatorsBinaryStandard, primitives_only);
+                       if (expr != null)
+                               return expr;
+
+                       if (primitives_only)
+                               return null;
+
+                       //
+                       // Lifted operators have lower priority
+                       //
+                       return ResolveOperatorPredefined (rc, rc.Module.OperatorsBinaryLifted, false);
+               }
 
-                       return ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryStandard, primitives_only, null);
+               static bool IsEnumOrNullableEnum (TypeSpec type)
+               {
+                       return type.IsEnum || (type.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (type).IsEnum);
                }
 
+
                // at least one of 'left' or 'right' is an enumeration constant (EnumConstant or SideEffectConstant or ...)
                // if 'left' is not an enumeration constant, create one from the type of 'right'
                Constant EnumLiftUp (ResolveContext ec, Constant left, Constant right, Location loc)
@@ -2765,8 +2942,9 @@ namespace Mono.CSharp
                public static PredefinedOperator[] CreateStandardOperatorsTable (BuiltinTypes types)
                {
                        TypeSpec bool_type = types.Bool;
-                       return new PredefinedOperator[] {
-                               new PredefinedOperator (types.Int, Operator.ArithmeticMask | Operator.BitwiseMask),
+
+                       return new [] {
+                               new PredefinedOperator (types.Int, Operator.ArithmeticMask | Operator.BitwiseMask | Operator.ShiftMask),
                                new PredefinedOperator (types.UInt, Operator.ArithmeticMask | Operator.BitwiseMask),
                                new PredefinedOperator (types.Long, Operator.ArithmeticMask | Operator.BitwiseMask),
                                new PredefinedOperator (types.ULong, Operator.ArithmeticMask | Operator.BitwiseMask),
@@ -2783,15 +2961,64 @@ namespace Mono.CSharp
                                new PredefinedOperator (types.Decimal, Operator.ComparisonMask, bool_type),
 
                                new PredefinedStringOperator (types.String, Operator.AdditionMask, types.String),
-                               new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String),
-                               new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String),
+                               // Remaining string operators are in lifted tables
 
                                new PredefinedOperator (bool_type, Operator.BitwiseMask | Operator.LogicalMask | Operator.EqualityMask, bool_type),
 
-                               new PredefinedShiftOperator (types.Int, types.Int, Operator.ShiftMask),
-                               new PredefinedShiftOperator (types.UInt, types.Int, Operator.ShiftMask),
-                               new PredefinedShiftOperator (types.Long, types.Int, Operator.ShiftMask),
-                               new PredefinedShiftOperator (types.ULong, types.Int, Operator.ShiftMask)
+                               new PredefinedOperator (types.UInt, types.Int, Operator.ShiftMask),
+                               new PredefinedOperator (types.Long, types.Int, Operator.ShiftMask),
+                               new PredefinedOperator (types.ULong, types.Int, Operator.ShiftMask)
+                       };
+
+               }
+               public static PredefinedOperator[] CreateStandardLiftedOperatorsTable (ModuleContainer module)
+               {
+                       var nullable = module.PredefinedTypes.Nullable.TypeSpec;
+                       if (nullable == null)
+                               return new PredefinedOperator [0];
+
+                       var types = module.Compiler.BuiltinTypes;
+                       var bool_type = types.Bool;
+
+                       var nullable_bool = nullable.MakeGenericType (module, new[] { bool_type });
+                       var nullable_int = nullable.MakeGenericType (module, new[] { types.Int });
+                       var nullable_uint = nullable.MakeGenericType (module, new[] { types.UInt });
+                       var nullable_long = nullable.MakeGenericType (module, new[] { types.Long });
+                       var nullable_ulong = nullable.MakeGenericType (module, new[] { types.ULong });
+                       var nullable_float = nullable.MakeGenericType (module, new[] { types.Float });
+                       var nullable_double = nullable.MakeGenericType (module, new[] { types.Double });
+                       var nullable_decimal = nullable.MakeGenericType (module, new[] { types.Decimal });
+
+                       return new[] {
+                               new PredefinedOperator (nullable_int, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask | Operator.ShiftMask),
+                               new PredefinedOperator (nullable_uint, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask),
+                               new PredefinedOperator (nullable_long, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask),
+                               new PredefinedOperator (nullable_ulong, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask),
+                               new PredefinedOperator (nullable_float, Operator.NullableMask | Operator.ArithmeticMask),
+                               new PredefinedOperator (nullable_double, Operator.NullableMask | Operator.ArithmeticMask),
+                               new PredefinedOperator (nullable_decimal, Operator.NullableMask | Operator.ArithmeticMask),
+
+                               new PredefinedOperator (nullable_int, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+                               new PredefinedOperator (nullable_uint, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+                               new PredefinedOperator (nullable_long, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+                               new PredefinedOperator (nullable_ulong, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+                               new PredefinedOperator (nullable_float, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+                               new PredefinedOperator (nullable_double, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+                               new PredefinedOperator (nullable_decimal, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+
+                               new PredefinedOperator (nullable_bool, Operator.NullableMask | Operator.BitwiseMask, nullable_bool),
+
+                               new PredefinedOperator (nullable_uint, nullable_int, Operator.NullableMask | Operator.ShiftMask),
+                               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),
+
                        };
                }
 
@@ -2799,113 +3026,168 @@ namespace Mono.CSharp
                {
                        TypeSpec bool_type = types.Bool;
 
-                       return new PredefinedOperator[] {
+                       return new[] {
                                new PredefinedEqualityOperator (types.String, bool_type),
                                new PredefinedEqualityOperator (types.Delegate, bool_type),
-                               new PredefinedOperator (bool_type, Operator.EqualityMask, bool_type)
+                               new PredefinedOperator (bool_type, Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (types.Int, Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (types.UInt, Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (types.Long, Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (types.ULong, Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (types.Float, Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (types.Double, Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (types.Decimal, Operator.EqualityMask, bool_type),
+                       };
+               }
+
+               public static PredefinedOperator[] CreateEqualityLiftedOperatorsTable (ModuleContainer module)
+               {
+                       var nullable = module.PredefinedTypes.Nullable.TypeSpec;
+
+                       if (nullable == null)
+                               return new PredefinedOperator [0];
+
+                       var types = module.Compiler.BuiltinTypes;
+                       var bool_type = types.Bool;
+                       var nullable_bool = nullable.MakeGenericType (module, new [] { bool_type });
+                       var nullable_int = nullable.MakeGenericType (module, new[] { types.Int });
+                       var nullable_uint = nullable.MakeGenericType (module, new[] { types.UInt });
+                       var nullable_long = nullable.MakeGenericType (module, new[] { types.Long });
+                       var nullable_ulong = nullable.MakeGenericType (module, new[] { types.ULong });
+                       var nullable_float = nullable.MakeGenericType (module, new[] { types.Float });
+                       var nullable_double = nullable.MakeGenericType (module, new[] { types.Double });
+                       var nullable_decimal = nullable.MakeGenericType (module, new[] { types.Decimal });
+
+                       return new [] {
+                               new PredefinedOperator (nullable_bool, Operator.NullableMask | Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (nullable_int, Operator.NullableMask | Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (nullable_uint, Operator.NullableMask | Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (nullable_long, Operator.NullableMask | Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (nullable_ulong, Operator.NullableMask | Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (nullable_float, Operator.NullableMask | Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (nullable_double, Operator.NullableMask | Operator.EqualityMask, bool_type),
+                               new PredefinedOperator (nullable_decimal, Operator.NullableMask | Operator.EqualityMask, bool_type)
                        };
                }
 
                //
-               // Rules used during binary numeric promotion
+               // 7.2.6.2 Binary numeric promotions
                //
-               static bool DoNumericPromotion (ResolveContext rc, ref Expression prim_expr, ref Expression second_expr, TypeSpec type)
+               bool DoBinaryOperatorPromotion (ResolveContext rc)
                {
-                       Expression temp;
+                       TypeSpec ltype = left.Type;
+                       if (ltype.IsNullableType) {
+                               ltype = Nullable.NullableInfo.GetUnderlyingType (ltype);
+                       }
 
-                       Constant c = prim_expr as Constant;
-                       if (c != null) {
-                               temp = c.ConvertImplicitly (type);
-                               if (temp != null) {
-                                       prim_expr = temp;
-                                       return true;
-                               }
+                       //
+                       // This is numeric promotion code only
+                       //
+                       if (ltype.BuiltinType == BuiltinTypeSpec.Type.Bool)
+                               return true;
+
+                       TypeSpec rtype = right.Type;
+                       if (rtype.IsNullableType) {
+                               rtype = Nullable.NullableInfo.GetUnderlyingType (rtype);
                        }
 
-                       if (type.BuiltinType == BuiltinTypeSpec.Type.UInt) {
-                               switch (prim_expr.Type.BuiltinType) {
-                               case BuiltinTypeSpec.Type.Int:
-                               case BuiltinTypeSpec.Type.Short:
-                               case BuiltinTypeSpec.Type.SByte:
-                               case BuiltinTypeSpec.Type.Long:
-                                       type = rc.BuiltinTypes.Long;
+                       var lb = ltype.BuiltinType;
+                       var rb = rtype.BuiltinType;
+                       TypeSpec type;
+                       Expression expr;
 
-                                       if (type != second_expr.Type) {
-                                               c = second_expr as Constant;
-                                               if (c != null)
-                                                       temp = c.ConvertImplicitly (type);
-                                               else
-                                                       temp = Convert.ImplicitNumericConversion (second_expr, type);
-                                               if (temp == null)
-                                                       return false;
-                                               second_expr = temp;
-                                       }
-                                       break;
+                       if (lb == BuiltinTypeSpec.Type.Decimal || rb == BuiltinTypeSpec.Type.Decimal) {
+                               type = rc.BuiltinTypes.Decimal;
+                       } else if (lb == BuiltinTypeSpec.Type.Double || rb == BuiltinTypeSpec.Type.Double) {
+                               type = rc.BuiltinTypes.Double;
+                       } else if (lb == BuiltinTypeSpec.Type.Float || rb == BuiltinTypeSpec.Type.Float) {
+                               type = rc.BuiltinTypes.Float;
+                       } else if (lb == BuiltinTypeSpec.Type.ULong || rb == BuiltinTypeSpec.Type.ULong) {
+                               type = rc.BuiltinTypes.ULong;
+
+                               if (IsSignedType (lb)) {
+                                       expr = ConvertSignedConstant (left, type);
+                                       if (expr == null)
+                                               return false;
+                                       left = expr;
+                               } else if (IsSignedType (rb)) {
+                                       expr = ConvertSignedConstant (right, type);
+                                       if (expr == null)
+                                               return false;
+                                       right = expr;
                                }
-                       } else if (type.BuiltinType == BuiltinTypeSpec.Type.ULong) {
-                               //
-                               // A compile-time error occurs if the other operand is of type sbyte, short, int, or long
-                               //
-                               switch (type.BuiltinType) {
-                               case BuiltinTypeSpec.Type.Int:
-                               case BuiltinTypeSpec.Type.Long:
-                               case BuiltinTypeSpec.Type.Short:
-                               case BuiltinTypeSpec.Type.SByte:
-                                       return false;
+
+                       } else if (lb == BuiltinTypeSpec.Type.Long || rb == BuiltinTypeSpec.Type.Long) {
+                               type = rc.BuiltinTypes.Long;
+                       } else if (lb == BuiltinTypeSpec.Type.UInt || rb == BuiltinTypeSpec.Type.UInt) {
+                               type = rc.BuiltinTypes.UInt;
+
+                               if (IsSignedType (lb)) {
+                                       expr = ConvertSignedConstant (left, type);
+                                       if (expr == null)
+                                               type = rc.BuiltinTypes.Long;
+                               } else if (IsSignedType (rb)) {
+                                       expr = ConvertSignedConstant (right, type);
+                                       if (expr == null)
+                                               type = rc.BuiltinTypes.Long;
                                }
+                       } else {
+                               type = rc.BuiltinTypes.Int;
                        }
 
-                       temp = Convert.ImplicitNumericConversion (prim_expr, type);
-                       if (temp == null)
-                               return false;
-
-                       prim_expr = temp;
-                       return true;
-               }
+                       if (ltype != type) {
+                               expr = PromoteExpression (rc, left, type);
+                               if (expr == null)
+                                       return false;
 
-               //
-               // 7.2.6.2 Binary numeric promotions
-               //
-               public bool DoBinaryOperatorPromotion (ResolveContext ec)
-               {
-                       TypeSpec ltype = left.Type;
-                       TypeSpec rtype = right.Type;
-                       Expression temp;
+                               left = expr;
+                       }
 
-                       foreach (TypeSpec t in ec.BuiltinTypes.BinaryPromotionsTypes) {
-                               if (t == ltype)
-                                       return t == rtype || DoNumericPromotion (ec, ref right, ref left, t);
+                       if (rtype != type) {
+                               expr = PromoteExpression (rc, right, type);
+                               if (expr == null)
+                                       return false;
 
-                               if (t == rtype)
-                                       return t == ltype || DoNumericPromotion (ec, ref left, ref right, t);
+                               right = expr;
                        }
 
-                       TypeSpec int32 = ec.BuiltinTypes.Int;
-                       if (ltype != int32) {
-                               Constant c = left as Constant;
-                               if (c != null)
-                                       temp = c.ConvertImplicitly (int32);
-                               else
-                                       temp = Convert.ImplicitNumericConversion (left, int32);
+                       return true;
+               }
 
-                               if (temp == null)
-                                       return false;
-                               left = temp;
+               static bool IsSignedType (BuiltinTypeSpec.Type type)
+               {
+                       switch (type) {
+                       case BuiltinTypeSpec.Type.Int:
+                       case BuiltinTypeSpec.Type.Short:
+                       case BuiltinTypeSpec.Type.SByte:
+                       case BuiltinTypeSpec.Type.Long:
+                               return true;
+                       default:
+                               return false;
                        }
+               }
 
-                       if (rtype != int32) {
-                               Constant c = right as Constant;
-                               if (c != null)
-                                       temp = c.ConvertImplicitly (int32);
-                               else
-                                       temp = Convert.ImplicitNumericConversion (right, int32);
+               static Expression ConvertSignedConstant (Expression expr, TypeSpec type)
+               {
+                       var c = expr as Constant;
+                       if (c == null)
+                               return null;
 
-                               if (temp == null)
-                                       return false;
-                               right = temp;
+                       return c.ConvertImplicitly (type);
+               }
+
+               static Expression PromoteExpression (ResolveContext rc, Expression expr, TypeSpec type)
+               {
+                       if (expr.Type.IsNullableType) {
+                               return Convert.ImplicitConversionStandard (rc, expr,
+                                       rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc, new[] { type }), expr.Location);
                        }
 
-                       return true;
+                       var c = expr as Constant;
+                       if (c != null)
+                               return c.ConvertImplicitly (type);
+
+                       return Convert.ImplicitNumericConversion (expr, type);
                }
 
                protected override Expression DoResolve (ResolveContext ec)
@@ -2946,7 +3228,6 @@ namespace Mono.CSharp
                        if (right == null)
                                return null;
 
-                       eclass = ExprClass.Value;
                        Constant rc = right as Constant;
 
                        // The conversion rules are ignored in enum context but why
@@ -3045,20 +3326,10 @@ namespace Mono.CSharp
                                return new DynamicExpressionStatement (this, args, loc).Resolve (ec);
                        }
 
-                       if (ec.Module.Compiler.Settings.Version >= LanguageVersion.ISO_2 &&
-                               ((left.Type.IsNullableType && (right is NullLiteral || right.Type.IsNullableType || TypeSpec.IsValueType (right.Type))) ||
-                               (TypeSpec.IsValueType (left.Type) && right is NullLiteral) ||
-                               (right.Type.IsNullableType && (left is NullLiteral || left.Type.IsNullableType || TypeSpec.IsValueType (left.Type))) ||
-                               (TypeSpec.IsValueType (right.Type) && left is NullLiteral))) {
-                               var lifted = new Nullable.LiftedBinaryOperator (oper, left, right);
-                               lifted.state = state;
-                               return lifted.Resolve (ec);
-                       }
-
                        return DoResolveCore (ec, left, right);
                }
 
-               protected Expression DoResolveCore (ResolveContext ec, Expression left_orig, Expression right_orig)
+               Expression DoResolveCore (ResolveContext ec, Expression left_orig, Expression right_orig)
                {
                        Expression expr = ResolveOperator (ec);
                        if (expr == null)
@@ -3075,6 +3346,13 @@ namespace Mono.CSharp
 
                public override SLE.Expression MakeExpression (BuilderContext ctx)
                {
+                       return MakeExpression (ctx, left, right);
+               }
+
+               public SLE.Expression MakeExpression (BuilderContext ctx, Expression left, Expression right)
+               {
+                       Console.WriteLine ("{0} x {1}", left.Type.GetSignatureForError (), right.Type.GetSignatureForError ());
+
                        var le = left.MakeExpression (ctx);
                        var re = right.MakeExpression (ctx);
                        bool is_checked = ctx.HasSet (BuilderContext.Options.CheckedScope);
@@ -3160,15 +3438,14 @@ namespace Mono.CSharp
                        if (method == null)
                                return new EmptyExpression (ec.BuiltinTypes.Decimal);
 
-                       MethodGroupExpr mg = MethodGroupExpr.CreatePredefined (method, ec.BuiltinTypes.Delegate, loc);
-                       Expression expr = new UserOperatorCall (mg.BestCandidate, args, CreateExpressionTree, loc);
+                       Expression expr = new UserOperatorCall (method, args, CreateExpressionTree, loc);
                        return new ClassCast (expr, l);
                }
 
                //
-               // Enumeration operators
+               // Resolves enumeration operators where only single predefined overload exists, handles lifted versions too
                //
-               Expression ResolveOperatorEnum (ResolveContext ec, bool lenum, bool renum, TypeSpec ltype, TypeSpec rtype)
+               Expression ResolveSingleEnumOperators (ResolveContext rc, bool lenum, bool renum, TypeSpec ltype, TypeSpec rtype)
                {
                        //
                        // bool operator == (E x, E y);
@@ -3182,264 +3459,388 @@ namespace Mono.CSharp
                        // E operator | (E x, E y);
                        // E operator ^ (E x, E y);
                        //
-                       // U operator - (E e, E f)
-                       // E operator - (E e, U x)
-                       // E operator - (U x, E e)      // LAMESPEC: Not covered by the specification
-                       //
-                       // E operator + (E e, U x)
-                       // E operator + (U x, E e)
-                       //
-                       Expression ltemp = left;
-                       Expression rtemp = right;
-                       TypeSpec underlying_type;
-                       TypeSpec underlying_type_result;
-                       TypeSpec res_type;
                        Expression expr;
-                       
-                       //
-                       // LAMESPEC: There is never ambiguous conversion between enum operators
-                       // the one which contains more enum parameters always wins even if there
-                       // is an implicit conversion involved
-                       //
-                       if ((oper & (Operator.ComparisonMask | Operator.BitwiseMask)) != 0) {
-                               if (renum) {
-                                       underlying_type = EnumSpec.GetUnderlyingType (rtype);
-                                       expr = Convert.ImplicitConversion (ec, left, rtype, loc);
-                                       if (expr == null)
-                                               return null;
-
-                                       left = expr;
-                                       ltype = expr.Type;
-                               } else if (lenum) {
-                                       underlying_type = EnumSpec.GetUnderlyingType (ltype);
-                                       expr = Convert.ImplicitConversion (ec, right, ltype, loc);
-                                       if (expr == null)
-                                               return null;
+                       if ((oper & Operator.ComparisonMask) != 0) {
+                               type = rc.BuiltinTypes.Bool;
+                       } else {
+                               if (lenum)
+                                       type = ltype;
+                               else if (renum)
+                                       type = rtype;
+                               else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum)
+                                       type = ltype;
+                               else
+                                       type = rtype;
+                       }
+
+                       if (ltype == rtype) {
+                               if (lenum || renum)
+                                       return this;
+
+                               var lifted = new Nullable.LiftedBinaryOperator (this);
+                               lifted.Left = left;
+                               lifted.Right = right;
+                               return lifted.Resolve (rc);
+                       }
 
+                       if (renum && !ltype.IsNullableType) {
+                               expr = Convert.ImplicitConversion (rc, left, rtype, loc);
+                               if (expr != null) {
+                                       left = expr;
+                                       return this;
+                               }
+                       } else if (lenum && !rtype.IsNullableType) {
+                               expr = Convert.ImplicitConversion (rc, right, ltype, loc);
+                               if (expr != null) {
                                        right = expr;
-                                       rtype = expr.Type;
-                               } else {
-                                       return null;
+                                       return this;
                                }
+                       }
 
-                               if ((oper & Operator.BitwiseMask) != 0) {
-                                       res_type = ltype;
-                                       underlying_type_result = underlying_type;
-                               } else {
-                                       res_type = null;
-                                       underlying_type_result = null;
-                               }
-                       } else if (oper == Operator.Subtraction) {
-                               if (renum) {
-                                       underlying_type = EnumSpec.GetUnderlyingType (rtype);
-                                       if (ltype != rtype) {
-                                               expr = Convert.ImplicitConversion (ec, left, rtype, left.Location);
-                                               if (expr == null) {
-                                                       expr = Convert.ImplicitConversion (ec, left, underlying_type, left.Location);
-                                                       if (expr == null)
-                                                               return null;
-
-                                                       res_type = rtype;
-                                               } else {
-                                                       res_type = underlying_type;
-                                               }
+                       //
+                       // Now try lifted version of predefined operator
+                       //
+                       var nullable_type = rc.Module.PredefinedTypes.Nullable.TypeSpec;
+                       if (nullable_type != null) {
+                               if (renum && !ltype.IsNullableType) {
+                                       var lifted_type = nullable_type.MakeGenericType (rc.Module, new[] { rtype });
 
+                                       expr = Convert.ImplicitConversion (rc, left, lifted_type, loc);
+                                       if (expr != null) {
                                                left = expr;
-                                       } else {
-                                               res_type = underlying_type;
+                                               right = Convert.ImplicitConversion (rc, right, lifted_type, loc);
                                        }
 
-                                       underlying_type_result = underlying_type;
-                               } else if (lenum) {
-                                       underlying_type = EnumSpec.GetUnderlyingType (ltype);
-                                       expr = Convert.ImplicitConversion (ec, right, ltype, right.Location);
-                                       if (expr == null || expr is EnumConstant) {
-                                               expr = Convert.ImplicitConversion (ec, right, underlying_type, right.Location);
-                                               if (expr == null)
-                                                       return null;
+                                       if ((oper & Operator.BitwiseMask) != 0)
+                                               type = lifted_type;
 
-                                               res_type = ltype;
-                                       } else {
-                                               res_type = underlying_type;
+                                       if (left.IsNull) {
+                                               if ((oper & Operator.BitwiseMask) != 0)
+                                                       return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+                                               return CreateLiftedValueTypeResult (rc, rtype);
                                        }
 
-                                       right = expr;
-                                       underlying_type_result = underlying_type;
-                               } else {
-                                       return null;
-                               }
-                       } else if (oper == Operator.Addition) {
-                               if (lenum) {
-                                       underlying_type = EnumSpec.GetUnderlyingType (ltype);
-                                       res_type = ltype;
+                                       if (expr != null) {
+                                               var lifted = new Nullable.LiftedBinaryOperator (this);
+                                               lifted.Left = expr;
+                                               lifted.Right = right;
+                                               return lifted.Resolve (rc);
+                                       }
+                               } else if (lenum && !rtype.IsNullableType) {
+                                       var lifted_type = nullable_type.MakeGenericType (rc.Module, new[] { ltype });
+
+                                       expr = Convert.ImplicitConversion (rc, right, lifted_type, loc);
+                                       if (expr != null) {
+                                               right = expr;
+                                               left = Convert.ImplicitConversion (rc, left, lifted_type, loc);
+                                       }
+
+                                       if ((oper & Operator.BitwiseMask) != 0)
+                                               type = lifted_type;
+
+                                       if (right.IsNull) {
+                                               if ((oper & Operator.BitwiseMask) != 0)
+                                                       return Nullable.LiftedNull.CreateFromExpression (rc, this);
 
-                                       if (rtype != underlying_type && (state & (State.RightNullLifted | State.LeftNullLifted)) == 0) {
-                                               expr = Convert.ImplicitConversion (ec, right, underlying_type, right.Location);
+                                               return CreateLiftedValueTypeResult (rc, ltype);
+                                       }
+
+                                       if (expr != null) {
+                                               var lifted = new Nullable.LiftedBinaryOperator (this);
+                                               lifted.Left = left;
+                                               lifted.Right = expr;
+                                               return lifted.Resolve (rc);
+                                       }
+                               } else if (rtype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (rtype).IsEnum) {
+                                       if (left.IsNull) {
+                                               if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion))
+                                                       left = Convert.ImplicitConversion (rc, left, rtype, left.Location);
+
+                                               if ((oper & Operator.RelationalMask) != 0)
+                                                       return CreateLiftedValueTypeResult (rc, rtype);
+
+                                               if ((oper & Operator.BitwiseMask) != 0)
+                                                       return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+                                               // Equality operators are valid between E? and null
+                                               expr = left;
+                                       } else {
+                                               expr = Convert.ImplicitConversion (rc, left, Nullable.NullableInfo.GetUnderlyingType (rtype), loc);
                                                if (expr == null)
                                                        return null;
+                                       }
 
-                                               right = expr;
+                                       if (expr != null) {
+                                               var lifted = new Nullable.LiftedBinaryOperator (this);
+                                               lifted.Left = expr;
+                                               lifted.Right = right;
+                                               return lifted.Resolve (rc);
                                        }
-                               } else {
-                                       underlying_type = EnumSpec.GetUnderlyingType (rtype);
-                                       res_type = rtype;
-                                       if (ltype != underlying_type) {
-                                               expr = Convert.ImplicitConversion (ec, left, underlying_type, left.Location);
+                               } else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum) {
+                                       if (right.IsNull) {
+                                               if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion))
+                                                       right = Convert.ImplicitConversion (rc, right, ltype, right.Location);
+
+                                               if ((oper & Operator.RelationalMask) != 0)
+                                                       return CreateLiftedValueTypeResult (rc, ltype);
+
+                                               if ((oper & Operator.BitwiseMask) != 0)
+                                                       return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+                                               // Equality operators are valid between E? and null
+                                               expr = right;
+                                       } else {
+                                               expr = Convert.ImplicitConversion (rc, right, Nullable.NullableInfo.GetUnderlyingType (ltype), loc);
                                                if (expr == null)
                                                        return null;
+                                       }
 
-                                               left = expr;
+                                       if (expr != null) {
+                                               var lifted = new Nullable.LiftedBinaryOperator (this);
+                                               lifted.Left = left;
+                                               lifted.Right = expr;
+                                               return lifted.Resolve (rc);
                                        }
                                }
-
-                               underlying_type_result = underlying_type;
-                       } else {
-                               return null;
                        }
 
-                       // Unwrap the constant correctly, so DoBinaryOperatorPromotion can do the magic
-                       // with constants and expressions
-                       if (left.Type != underlying_type) {
-                               if (left is Constant)
-                                       left = ((Constant) left).ConvertExplicitly (false, underlying_type);
+                       return null;
+               }
+
+               static Expression ConvertEnumOperandToUnderlyingType (ResolveContext rc, Expression expr)
+               {
+                       TypeSpec underlying_type;
+                       if (expr.Type.IsNullableType) {
+                               var nt = Nullable.NullableInfo.GetUnderlyingType (expr.Type);
+                               if (nt.IsEnum)
+                                       underlying_type = EnumSpec.GetUnderlyingType (nt);
                                else
-                                       left = EmptyCast.Create (left, underlying_type);
+                                       underlying_type = nt;
+                       } else if (expr.Type.IsEnum) {
+                               underlying_type = EnumSpec.GetUnderlyingType (expr.Type);
+                       } else {
+                               underlying_type = expr.Type;
                        }
 
-                       if (right.Type != underlying_type) {
-                               if (right is Constant)
-                                       right = ((Constant) right).ConvertExplicitly (false, underlying_type);
-                               else
-                                       right = EmptyCast.Create (right, underlying_type);
+                       switch (underlying_type.BuiltinType) {
+                       case BuiltinTypeSpec.Type.SByte:
+                       case BuiltinTypeSpec.Type.Byte:
+                       case BuiltinTypeSpec.Type.Short:
+                       case BuiltinTypeSpec.Type.UShort:
+                               underlying_type = rc.BuiltinTypes.Int;
+                               break;
                        }
 
+                       if (expr.Type.IsNullableType)
+                               underlying_type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { underlying_type });
+
+                       if (expr.Type == underlying_type)
+                               return expr;
+
+                       return EmptyCast.Create (expr, underlying_type);
+               }
+
+               Expression ResolveEnumOperators (ResolveContext rc, bool lenum, bool renum, TypeSpec ltype, TypeSpec rtype)
+               {
+                       //
+                       // U operator - (E e, E f)
+                       // E operator - (E e, U x)  // Internal decomposition operator
+                       // E operator - (U x, E e)      // Internal decomposition operator
                        //
-                       // C# specification uses explicit cast syntax which means binary promotion
-                       // should happen, however it seems that csc does not do that
+                       // E operator + (E e, U x)
+                       // E operator + (U x, E e)
                        //
-                       if (!DoBinaryOperatorPromotion (ec)) {
-                               left = ltemp;
-                               right = rtemp;
-                               return null;
+
+                       TypeSpec enum_type;
+
+                       if (lenum)
+                               enum_type = ltype;
+                       else if (renum)
+                               enum_type = rtype;
+                       else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum)
+                               enum_type = ltype;
+                       else
+                               enum_type = rtype;
+
+                       Expression expr;
+                       if (!enum_type.IsNullableType) {
+                               expr = ResolveOperatorPredefined (rc, rc.Module.GetPredefinedEnumAritmeticOperators (enum_type, false), false);
+                               if (expr != null) {
+                                       if (oper == Operator.Subtraction)
+                                               expr = ConvertEnumSubtractionResult (rc, expr);
+                                       else
+                                               expr = ConvertEnumAdditionalResult (expr, enum_type);
+
+                                       AddEnumResultCast (expr.Type);
+
+                                       return expr;
+                               }
+
+                               enum_type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { enum_type });
                        }
 
-                       if (underlying_type_result != null && left.Type != underlying_type_result) {
-                               enum_conversion = Convert.ExplicitNumericConversion (ec, new EmptyExpression (left.Type), underlying_type_result);
+                       expr = ResolveOperatorPredefined (rc, rc.Module.GetPredefinedEnumAritmeticOperators (enum_type, true), false);
+                       if (expr != null) {
+                               if (oper == Operator.Subtraction)
+                                       expr = ConvertEnumSubtractionResult (rc, expr);
+                               else
+                                       expr = ConvertEnumAdditionalResult (expr, enum_type);
+
+                               AddEnumResultCast (expr.Type);
                        }
 
-                       expr = ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryStandard, true, res_type);
-                       if (expr == null)
-                               return null;
+                       return expr;
+               }
 
-                       if (!IsCompound)
-                               return expr;
+               static Expression ConvertEnumAdditionalResult (Expression expr, TypeSpec enumType)
+               {
+                       return EmptyCast.Create (expr, enumType);
+               }
 
+               Expression ConvertEnumSubtractionResult (ResolveContext rc, Expression expr)
+               {
                        //
-                       // Section: 7.16.2
+                       // Enumeration subtraction has different result type based on
+                       // best overload
                        //
+                       TypeSpec result_type;
+                       if (left.Type == right.Type) {
+                               var c = right as EnumConstant;
+                               if (c != null && c.IsZeroInteger) {
+                                       //
+                                       // LAMESPEC: This is quite unexpected for expression E - 0 the return type is
+                                       // E which is not what expressions E - 1 or 0 - E return
+                                       //
+                                       result_type = left.Type;
+                               } else {
+                                       result_type = left.Type.IsNullableType ?
+                                               Nullable.NullableInfo.GetEnumUnderlyingType (rc.Module, left.Type) :
+                                               EnumSpec.GetUnderlyingType (left.Type);
+                               }
+                       } else if (IsEnumOrNullableEnum (left.Type)) {
+                               result_type = left.Type;
+                       } else {
+                               result_type = right.Type;
+                       }
 
-                       //
-                       // If the return type of the selected operator is implicitly convertible to the type of x
-                       //
-                       if (Convert.ImplicitConversionExists (ec, expr, ltype))
-                               return expr;
+                       return EmptyCast.Create (expr, result_type);
+               }
 
-                       //
-                       // Otherwise, if the selected operator is a predefined operator, if the return type of the
-                       // selected operator is explicitly convertible to the type of x, and if y is implicitly
-                       // convertible to the type of x or the operator is a shift operator, then the operation
-                       // is evaluated as x = (T)(x op y), where T is the type of x
-                       //
-                       expr = Convert.ExplicitConversion (ec, expr, ltype, loc);
-                       if (expr == null)
-                               return null;
+               void AddEnumResultCast (TypeSpec type)
+               {
+                       if (type.IsNullableType)
+                               type = Nullable.NullableInfo.GetUnderlyingType (type);
 
-                       if (Convert.ImplicitConversionExists (ec, ltemp, ltype))
-                               return expr;
+                       if (type.IsEnum)
+                               type = EnumSpec.GetUnderlyingType (type);
 
-                       return null;
+                       switch (type.BuiltinType) {
+                       case BuiltinTypeSpec.Type.SByte:
+                               enum_conversion = ConvCast.Mode.I4_I1;
+                               break;
+                       case BuiltinTypeSpec.Type.Byte:
+                               enum_conversion = ConvCast.Mode.I4_U1;
+                               break;
+                       case BuiltinTypeSpec.Type.Short:
+                               enum_conversion = ConvCast.Mode.I4_I2;
+                               break;
+                       case BuiltinTypeSpec.Type.UShort:
+                               enum_conversion = ConvCast.Mode.I4_U2;
+                               break;
+                       }
                }
 
                //
-               // 7.9.6 Reference type equality operators
+               // Equality operators rules
                //
-               Expression ResolveOperatorEquality (ResolveContext ec, TypeSpec l, TypeSpec r)
+               Expression ResolveEquality (ResolveContext ec, TypeSpec l, TypeSpec r, bool primitives_only)
                {
                        Expression result;
                        type = ec.BuiltinTypes.Bool;
+                       bool no_arg_conv = false;
 
-                       //
-                       // a, Both operands are reference-type values or the value null
-                       // b, One operand is a value of type T where T is a type-parameter and
-                       // the other operand is the value null. Furthermore T does not have the
-                       // value type constraint
-                       //
-                       // LAMESPEC: Very confusing details in the specification, basically any
-                       // reference like type-parameter is allowed
-                       //
-                       var tparam_l = l as TypeParameterSpec;
-                       var tparam_r = r as TypeParameterSpec;
-                       if (tparam_l != null) {
-                               if (right is NullLiteral && !tparam_l.HasSpecialStruct) {
-                                       left = new BoxedCast (left, ec.BuiltinTypes.Object);
-                                       return this;
-                               }
+                       if (!primitives_only) {
 
-                               if (!tparam_l.IsReferenceType)
-                                       return null;
+                               //
+                               // a, Both operands are reference-type values or the value null
+                               // b, One operand is a value of type T where T is a type-parameter and
+                               // the other operand is the value null. Furthermore T does not have the
+                               // value type constraint
+                               //
+                               // LAMESPEC: Very confusing details in the specification, basically any
+                               // reference like type-parameter is allowed
+                               //
+                               var tparam_l = l as TypeParameterSpec;
+                               var tparam_r = r as TypeParameterSpec;
+                               if (tparam_l != null) {
+                                       if (right is NullLiteral) {
+                                               if (tparam_l.GetEffectiveBase ().BuiltinType == BuiltinTypeSpec.Type.ValueType)
+                                                       return null;
 
-                               l = tparam_l.GetEffectiveBase ();
-                               left = new BoxedCast (left, l);
-                       } else if (left is NullLiteral && tparam_r == null) {
-                               if (!TypeSpec.IsReferenceType (r) || r.Kind == MemberKind.InternalCompilerType)
-                                       return null;
+                                               left = new BoxedCast (left, ec.BuiltinTypes.Object);
+                                               return this;
+                                       }
 
-                               return this;
-                       }
+                                       if (!tparam_l.IsReferenceType)
+                                               return null;
 
-                       if (tparam_r != null) {
-                               if (left is NullLiteral && !tparam_r.HasSpecialStruct) {
-                                       right = new BoxedCast (right, ec.BuiltinTypes.Object);
-                                       return this;
+                                       l = tparam_l.GetEffectiveBase ();
+                                       left = new BoxedCast (left, l);
+                               } else if (left is NullLiteral && tparam_r == null) {
+                                       if (TypeSpec.IsReferenceType (r))
+                                               return this;
+
+                                       if (r.Kind == MemberKind.InternalCompilerType)
+                                               return null;
                                }
 
-                               if (!tparam_r.IsReferenceType)
-                                       return null;
+                               if (tparam_r != null) {
+                                       if (left is NullLiteral) {
+                                               if (tparam_r.GetEffectiveBase ().BuiltinType == BuiltinTypeSpec.Type.ValueType)
+                                                       return null;
 
-                               r = tparam_r.GetEffectiveBase ();
-                               right = new BoxedCast (right, r);
-                       } else if (right is NullLiteral) {
-                               if (!TypeSpec.IsReferenceType (l) || l.Kind == MemberKind.InternalCompilerType)
-                                       return null;
+                                               right = new BoxedCast (right, ec.BuiltinTypes.Object);
+                                               return this;
+                                       }
 
-                               return this;
-                       }
+                                       if (!tparam_r.IsReferenceType)
+                                               return null;
 
-                       bool no_arg_conv = false;
+                                       r = tparam_r.GetEffectiveBase ();
+                                       right = new BoxedCast (right, r);
+                               } else if (right is NullLiteral) {
+                                       if (TypeSpec.IsReferenceType (l))
+                                               return this;
 
-                       //
-                       // LAMESPEC: method groups can be compared when they convert to other side delegate
-                       //
-                       if (l.IsDelegate) {
-                               if (right.eclass == ExprClass.MethodGroup) {
-                                       result = Convert.ImplicitConversion (ec, right, l, loc);
+                                       if (l.Kind == MemberKind.InternalCompilerType)
+                                               return null;
+                               }
+
+                               //
+                               // LAMESPEC: method groups can be compared when they convert to other side delegate
+                               //
+                               if (l.IsDelegate) {
+                                       if (right.eclass == ExprClass.MethodGroup) {
+                                               result = Convert.ImplicitConversion (ec, right, l, loc);
+                                               if (result == null)
+                                                       return null;
+
+                                               right = result;
+                                               r = l;
+                                       } else if (r.IsDelegate && l != r) {
+                                               return null;
+                                       }
+                               } else if (left.eclass == ExprClass.MethodGroup && r.IsDelegate) {
+                                       result = Convert.ImplicitConversionRequired (ec, left, r, loc);
                                        if (result == null)
                                                return null;
 
-                                       right = result;
-                                       r = l;
-                               } else if (r.IsDelegate && l != r) {
-                                       return null;
+                                       left = result;
+                                       l = r;
+                               } else {
+                                       no_arg_conv = l == r && !l.IsStruct;
                                }
-                       } else if (left.eclass == ExprClass.MethodGroup && r.IsDelegate) {
-                               result = Convert.ImplicitConversionRequired (ec, left, r, loc);
-                               if (result == null)
-                                       return null;
-
-                               left = result;
-                               l = r;
-                       } else {
-                               no_arg_conv = l == r && !l.IsStruct;
                        }
 
                        //
@@ -3457,9 +3858,28 @@ namespace Mono.CSharp
                        // not apply when both operands are of same reference type
                        //
                        if (r.BuiltinType != BuiltinTypeSpec.Type.Object && l.BuiltinType != BuiltinTypeSpec.Type.Object) {
-                               result = ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryEquality, no_arg_conv, null);
+                               result = ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryEquality, no_arg_conv);  
+                               if (result != null)
+                                       return result;
+
+                               //
+                               // Now try lifted version of predefined operators
+                               //
+                               result = ResolveOperatorPredefined (ec, ec.Module.OperatorsBinaryEqualityLifted, no_arg_conv);
                                if (result != null)
                                        return result;
+
+                               //
+                               // The == and != operators permit one operand to be a value of a nullable
+                               // type and the other to be the null literal, even if no predefined or user-defined
+                               // operator (in unlifted or lifted form) exists for the operation.
+                               //
+                               if ((l.IsNullableType && right.IsNull) || (r.IsNullableType && left.IsNull)) {
+                                       var lifted = new Nullable.LiftedBinaryOperator (this);
+                                       lifted.Left = left;
+                                       lifted.Right = right;
+                                       return lifted.Resolve (ec);
+                               }
                        }
 
                        //
@@ -3527,13 +3947,13 @@ namespace Mono.CSharp
                                return this;
                        }
 
-                       return ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryUnsafe, false, null);
+                       return ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryUnsafe, false);
                }
 
                //
                // Build-in operators method overloading
                //
-               protected virtual Expression ResolveOperatorPredefined (ResolveContext ec, PredefinedOperator [] operators, bool primitives_only, TypeSpec enum_type)
+               Expression ResolveOperatorPredefined (ResolveContext ec, PredefinedOperator [] operators, bool primitives_only)
                {
                        PredefinedOperator best_operator = null;
                        TypeSpec l = left.Type;
@@ -3574,41 +3994,68 @@ namespace Mono.CSharp
                        if (best_operator == null)
                                return null;
 
-                       Expression expr = best_operator.ConvertResult (ec, this);
+                       var expr = best_operator.ConvertResult (ec, this);
 
-                       //
-                       // Optimize &/&& constant expressions with 0 value
-                       //
-                       if (oper == Operator.BitwiseAnd || oper == Operator.LogicalAnd) {
-                               Constant rc = right as Constant;
-                               Constant lc = left as Constant;
-                               if (((lc != null && lc.IsDefaultValue) || (rc != null && rc.IsDefaultValue)) && !(this is Nullable.LiftedBinaryOperator)) {
-                                       //
-                                       // The result is a constant with side-effect
-                                       //
-                                       Constant side_effect = rc == null ?
-                                               new SideEffectConstant (lc, right, loc) :
-                                               new SideEffectConstant (rc, left, loc);
+                       if ((oper == Operator.BitwiseAnd || oper == Operator.LogicalAnd) && !best_operator.IsLifted) {
+                               expr = OptimizeAndOperation (expr);
+                       }
 
-                                       return ReducedExpression.Create (side_effect, expr);
-                               }
+                       return expr;
+               }
+
+               //
+               // Optimize &/&& constant expressions with 0 value
+               //
+               Expression OptimizeAndOperation (Expression expr)
+               {
+                       Constant rc = right as Constant;
+                       Constant lc = left as Constant;
+                       if ((lc != null && lc.IsDefaultValue) || (rc != null && rc.IsDefaultValue)) {
+                               //
+                               // The result is a constant with side-effect
+                               //
+                               Constant side_effect = rc == null ?
+                                       new SideEffectConstant (lc, right, loc) :
+                                       new SideEffectConstant (rc, left, loc);
+
+                               return ReducedExpression.Create (side_effect, expr);
                        }
 
-                       if (enum_type == null)
-                               return expr;
+                       return expr;
+               }
 
-                       //
-                       // HACK: required by enum_conversion
-                       //
-                       expr.Type = enum_type;
-                       return EmptyCast.Create (expr, enum_type);
+               //
+               // Value types can be compared with the null literal because of the lifting
+               // language rules. However the result is always true or false.
+               //
+               public Expression CreateLiftedValueTypeResult (ResolveContext rc, TypeSpec valueType)
+               {
+                       if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+                               type = rc.BuiltinTypes.Bool;
+                               return this;
+                       }
+
+                       // FIXME: Handle side effect constants
+                       Constant c = new BoolConstant (rc.BuiltinTypes, Oper == Operator.Inequality, loc);
+
+                       if ((Oper & Operator.EqualityMask) != 0) {
+                               rc.Report.Warning (472, 2, loc, "The result of comparing value type `{0}' with null is always `{1}'",
+                                       valueType.GetSignatureForError (), c.GetValueAsLiteral ());
+                       } else {
+                               rc.Report.Warning (464, 2, loc, "The result of comparing type `{0}' with null is always `{1}'",
+                                       valueType.GetSignatureForError (), c.GetValueAsLiteral ());
+                       }
+
+                       return c;
                }
 
                //
                // Performs user-operator overloading
                //
-               protected virtual Expression ResolveUserOperator (ResolveContext ec, Expression left, Expression right)
+               Expression ResolveUserOperator (ResolveContext rc, Expression left, Expression right)
                {
+                       Expression oper_expr;
+
                        var op = ConvertBinaryToUserOperator (oper);
                        var l = left.Type;
                        if (l.IsNullableType)
@@ -3630,7 +4077,7 @@ namespace Mono.CSharp
 
                        Arguments args = new Arguments (2);
                        Argument larg = new Argument (left);
-                       args.Add (larg);
+                       args.Add (larg);        
                        Argument rarg = new Argument (right);
                        args.Add (rarg);
 
@@ -3644,50 +4091,198 @@ namespace Mono.CSharp
                                left_operators = right_operators;
                        }
 
-                       var res = new OverloadResolver (left_operators, OverloadResolver.Restrictions.ProbingOnly | 
-                               OverloadResolver.Restrictions.NoBaseMembers | OverloadResolver.Restrictions.BaseMembersIncluded, loc);
+                       const OverloadResolver.Restrictions restr = OverloadResolver.Restrictions.ProbingOnly |
+                               OverloadResolver.Restrictions.NoBaseMembers | OverloadResolver.Restrictions.BaseMembersIncluded;
 
-                       var oper_method = res.ResolveOperator (ec, ref args);
-                       if (oper_method == null)
-                               return null;
+                       var res = new OverloadResolver (left_operators, restr, loc);
 
-                       var llifted = (state & State.LeftNullLifted) != 0;
-                       var rlifted = (state & State.RightNullLifted) != 0;
-                       if ((Oper & Operator.EqualityMask) != 0) {
-                               var parameters = oper_method.Parameters;
-                               // LAMESPEC: No idea why this is not allowed
-                               if ((left is Nullable.Unwrap || right is Nullable.Unwrap) && parameters.Types [0] != parameters.Types [1])
+                       var oper_method = res.ResolveOperator (rc, ref args);
+                       if (oper_method == null) {
+                               //
+                               // Logical && and || cannot be lifted
+                               //
+                               if ((oper & Operator.LogicalMask) != 0)
                                        return null;
 
-                               // Binary operation was lifted but we have found a user operator
-                               // which requires value-type argument, we downgrade ourself back to
-                               // binary operation
-                               // LAMESPEC: The user operator is not called (it cannot be we are passing null to struct)
-                               // but compilation succeeds
-                               if ((llifted && !parameters.Types[0].IsStruct) || (rlifted && !parameters.Types[1].IsStruct)) {
-                                       state &= ~(State.LeftNullLifted | State.RightNullLifted);
+                               //
+                               // Apply lifted user operators only for liftable types. Implicit conversion
+                               // to nullable types is not allowed
+                               //
+                               if (!IsLiftedOperatorApplicable ())
+                                       return null;
+
+                               // TODO: Cache the result in module container
+                               var lifted_methods = CreateLiftedOperators (rc, left_operators);
+                               if (lifted_methods == null)
+                                       return null;
+
+                               res = new OverloadResolver (lifted_methods, restr | OverloadResolver.Restrictions.ProbingOnly, loc);
+
+                               oper_method = res.ResolveOperator (rc, ref args);
+                               if (oper_method == null)
+                                       return null;
+
+                               MethodSpec best_original = null;
+                               foreach (MethodSpec ms in left_operators) {
+                                       if (ms.MemberDefinition == oper_method.MemberDefinition) {
+                                               best_original = ms;
+                                               break;
+                                       }
+                               }
+
+                               if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+                                       //
+                                       // Expression trees use lifted notation in this case
+                                       //
+                                       this.left = Convert.ImplicitConversion (rc, left, oper_method.Parameters.Types[0], left.Location);
+                                       this.right = Convert.ImplicitConversion (rc, right, oper_method.Parameters.Types[1], left.Location);
                                }
-                       }
 
-                       Expression oper_expr;
+                               var ptypes = best_original.Parameters.Types;
+
+                               if (left.IsNull || right.IsNull) {
+                                       //
+                                       // The lifted operator produces the value false if one or both operands are null for
+                                       // relational operators.
+                                       //
+                                       if ((oper & Operator.ComparisonMask) != 0) {
+                                               //
+                                               // CSC BUG: This should be different warning, csc reports CS0458 with bool? which is wrong
+                                               // because return type is actually bool
+                                               //
+                                               // For some reason CSC does not report this warning for equality operators
+                                               //
+                                               return CreateLiftedValueTypeResult (rc, left.IsNull ? ptypes [1] : ptypes [0]);
+                                       }
+
+                                       // The lifted operator produces a null value if one or both operands are null
+                                       //
+                                       if ((oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0) {
+                                               type = oper_method.ReturnType;
+                                               return Nullable.LiftedNull.CreateFromExpression (rc, this);
+                                       }
+                               }
+
+                               type = oper_method.ReturnType;
+                               var lifted = new Nullable.LiftedBinaryOperator (this);
+                               lifted.UserOperator = best_original;
+
+                               if (left.Type.IsNullableType && !ptypes[0].IsNullableType) {
+                                       lifted.UnwrapLeft = new Nullable.Unwrap (left);
+                               }
+
+                               if (right.Type.IsNullableType && !ptypes[1].IsNullableType) {
+                                       lifted.UnwrapRight = new Nullable.Unwrap (right);
+                               }
 
-                       // TODO: CreateExpressionTree is allocated every time
+                               lifted.Left = Convert.ImplicitConversion (rc, lifted.UnwrapLeft ?? left, ptypes[0], left.Location);
+                               lifted.Right = Convert.ImplicitConversion (rc, lifted.UnwrapRight ?? right, ptypes[1], right.Location);
+
+                               return lifted.Resolve (rc);
+                       }
+                       
                        if ((oper & Operator.LogicalMask) != 0) {
+                               // TODO: CreateExpressionTree is allocated every time           
                                oper_expr = new ConditionalLogicalOperator (oper_method, args, CreateExpressionTree,
-                                       oper == Operator.LogicalAnd, loc).Resolve (ec);
+                                       oper == Operator.LogicalAnd, loc).Resolve (rc);
                        } else {
                                oper_expr = new UserOperatorCall (oper_method, args, CreateExpressionTree, loc);
                        }
 
-                       if (!llifted)
-                               this.left = larg.Expr;
-
-                       if (!rlifted)
-                               this.right = rarg.Expr;
+                       this.left = larg.Expr;
+                       this.right = rarg.Expr;
 
                        return oper_expr;
                }
 
+               bool IsLiftedOperatorApplicable ()
+               {
+                       if (left.Type.IsNullableType) {
+                               if ((oper & Operator.EqualityMask) != 0)
+                                       return !right.IsNull;
+
+                               return true;
+                       }
+
+                       if (right.Type.IsNullableType) {
+                               if ((oper & Operator.EqualityMask) != 0)
+                                       return !left.IsNull;
+
+                               return true;
+                       }
+
+                       if (TypeSpec.IsValueType (left.Type))
+                               return right.IsNull;
+
+                       if (TypeSpec.IsValueType (right.Type))
+                               return left.IsNull;
+
+                       return false;
+               }
+
+               List<MemberSpec> CreateLiftedOperators (ResolveContext rc, IList<MemberSpec> operators)
+               {
+                       var nullable_type = rc.Module.PredefinedTypes.Nullable.TypeSpec;
+                       if (nullable_type == null)
+                               return null;
+
+                       //
+                       // Lifted operators permit predefined and user-defined operators that operate
+                       // on non-nullable value types to also be used with nullable forms of those types.
+                       // Lifted operators are constructed from predefined and user-defined operators
+                       // that meet certain requirements
+                       //
+                       List<MemberSpec> lifted = null;
+                       foreach (MethodSpec oper in operators) {
+                               TypeSpec rt;
+                               if ((Oper & Operator.ComparisonMask) != 0) {
+                                       //
+                                       // Result type must be of type bool for lifted comparison operators
+                                       //
+                                       rt = oper.ReturnType;
+                                       if (rt.BuiltinType != BuiltinTypeSpec.Type.Bool)
+                                               continue;
+                               } else {
+                                       if (!TypeSpec.IsNonNullableValueType (oper.ReturnType))
+                                               continue;
+
+                                       rt = null;
+                               }
+
+                               var ptypes = oper.Parameters.Types;
+                               if (!TypeSpec.IsNonNullableValueType (ptypes [0]) || !TypeSpec.IsNonNullableValueType (ptypes [1]))
+                                       continue;
+
+                               //
+                               // LAMESPEC: I am not sure why but for equality operators to be lifted
+                               // both types have to match
+                               //
+                               if ((Oper & Operator.EqualityMask) != 0 && ptypes [0] != ptypes [1])
+                                       continue;
+
+                               if (lifted == null)
+                                       lifted = new List<MemberSpec> ();
+
+                               //
+                               // The lifted form is constructed by adding a single ? modifier to each operand and
+                               // result type except for comparison operators where return type is bool
+                               //
+                               if (rt == null)
+                                       rt = nullable_type.MakeGenericType (rc.Module, new[] { oper.ReturnType });
+
+                               var parameters = ParametersCompiled.CreateFullyResolved (
+                                       nullable_type.MakeGenericType (rc.Module, new [] { ptypes[0] }),
+                                       nullable_type.MakeGenericType (rc.Module, new [] { ptypes[1] }));
+
+                               var lifted_op = new MethodSpec (oper.Kind, oper.DeclaringType, oper.MemberDefinition,
+                                       rt, parameters, oper.Modifiers);
+
+                               lifted.Add (lifted_op);
+                       }
+
+                       return lifted;
+               }
+
                //
                // Merge two sets of user operators into one, they are mostly distinguish
                // except when they share base type and it contains an operator
@@ -3887,11 +4482,6 @@ namespace Mono.CSharp
                }
                
                public override void Emit (EmitContext ec)
-               {
-                       EmitOperator (ec, left.Type);
-               }
-
-               protected virtual void EmitOperator (EmitContext ec, TypeSpec l)
                {
                        if (ec.HasSet (BuilderContext.Options.AsyncBody) && right.ContainsEmitWithAwait ()) {
                                left = left.EmitToField (ec);
@@ -3932,16 +4522,22 @@ namespace Mono.CSharp
                                }
                        }
 
+                       EmitOperator (ec, left, right);
+               }
+
+               public void EmitOperator (EmitContext ec, Expression left, Expression right)
+               {
                        left.Emit (ec);
                        right.Emit (ec);
-                       EmitOperatorOpcode (ec, oper, l);
+
+                       EmitOperatorOpcode (ec, oper, left.Type, right);
 
                        //
-                       // Nullable enum could require underlying type cast and we cannot simply wrap binary
-                       // expression because that would wrap lifted binary operation
+                       // Emit result enumerable conversion this way because it's quite complicated get it
+                       // to resolved tree because expression tree cannot see it.
                        //
-                       if (enum_conversion != null)
-                               enum_conversion.Emit (ec);
+                       if (enum_conversion != 0)
+                               ConvCast.Emit (ec, enum_conversion);
                }
 
                public override void EmitSideEffect (EmitContext ec)
@@ -4011,7 +4607,7 @@ namespace Mono.CSharp
                        return CreateExpressionTree (ec, null);
                }
 
-               Expression CreateExpressionTree (ResolveContext ec, Expression method)          
+               public Expression CreateExpressionTree (ResolveContext ec, Expression method)           
                {
                        string method_name;
                        bool lift_arg = false;
@@ -4460,7 +5056,7 @@ namespace Mono.CSharp
                                        if (rtype.BuiltinType == BuiltinTypeSpec.Type.Long || rtype.BuiltinType == BuiltinTypeSpec.Type.ULong)
                                                ec.Emit (OpCodes.Conv_I8);
 
-                                       Binary.EmitOperatorOpcode (ec, Binary.Operator.Multiply, rtype);
+                                       Binary.EmitOperatorOpcode (ec, Binary.Operator.Multiply, rtype, right);
                                }
 
                                if (left_const == null) {
@@ -4469,7 +5065,7 @@ namespace Mono.CSharp
                                        else if (rtype.BuiltinType == BuiltinTypeSpec.Type.ULong)
                                                ec.Emit (OpCodes.Conv_U);
 
-                                       Binary.EmitOperatorOpcode (ec, op, op_type);
+                                       Binary.EmitOperatorOpcode (ec, op, op_type, right);
                                }
                        }
                }
index 3c8cf89b2eb3bd02ad339c30b40b69b5823cc164..12894a0cc7506b1fe7a761833534f999d80e744f 100644 (file)
@@ -96,12 +96,16 @@ namespace Mono.CSharp
                        // TODO: Should be just Add
                        GetAssemblyDefinition (assembly);
 
-                       var all_types = assembly.GetTypes ();
-                       ImportTypes (all_types, targetNamespace, true);
-
-                       all_types = assembly.ManifestModule.__GetExportedTypes ();
-                       if (all_types.Length != 0)
-                               ImportForwardedTypes (all_types, targetNamespace);
+                       try {
+                               var all_types = assembly.GetTypes ();
+                               ImportTypes (all_types, targetNamespace, true);
+
+                               all_types = assembly.ManifestModule.__GetExportedTypes ();
+                               if (all_types.Length != 0)
+                                       ImportForwardedTypes (all_types, targetNamespace);
+                       } catch (Exception e) {
+                               throw new InternalErrorException (e, "Failed to import assembly `{0}'", assembly.FullName);
+                       }
                }
 
                public ImportedModuleDefinition ImportModule (Module module, RootNamespace targetNamespace)
index 74609d1947ee3bac08d5cf63e13e562eb34942d4..3c7ae4027b61c58327cd5681d22016b6082a005c 100644 (file)
@@ -58,7 +58,7 @@
   <ItemGroup>\r
     <Compile Include="..\build\common\Consts.cs">\r
     </Compile>\r
-    <Compile Include="..\class\corlib\Mono.Security.Cryptography\CryptoConvert.cs">\r
+    <Compile Include="..\class\Mono.Security\Mono.Security.Cryptography\CryptoConvert.cs">\r
       <Link>CryptoConvert.cs</Link>\r
     </Compile>\r
     <Compile Include="..\class\Mono.CompilerServices.SymbolWriter\MonoSymbolFile.cs">\r
index 017664e0b356e8bcdcd36f4b541a7a5a564757be..4eeb37d59fa723b135ab002a8072ca581a640446 100644 (file)
@@ -128,6 +128,9 @@ namespace Mono.CSharp
                PredefinedTypes predefined_types;
                PredefinedMembers predefined_members;
 
+               public Binary.PredefinedOperator[] OperatorsBinaryEqualityLifted;
+               public Binary.PredefinedOperator[] OperatorsBinaryLifted;
+
                static readonly string[] attribute_targets = new string[] { "assembly", "module" };
 
                public ModuleContainer (CompilerContext context)
@@ -529,11 +532,37 @@ namespace Mono.CSharp
                        return "<module>";
                }
 
+               public Binary.PredefinedOperator[] GetPredefinedEnumAritmeticOperators (TypeSpec enumType, bool nullable)
+               {
+                       TypeSpec underlying;
+                       Binary.Operator mask = 0;
+
+                       if (nullable) {
+                               underlying = Nullable.NullableInfo.GetEnumUnderlyingType (this, enumType);
+                               mask = Binary.Operator.NullableMask;
+                       } else {
+                               underlying = EnumSpec.GetUnderlyingType (enumType);
+                       }
+
+                       var operators = new[] {
+                               new Binary.PredefinedOperator (enumType, underlying,
+                                       mask | Binary.Operator.AdditionMask | Binary.Operator.SubtractionMask | Binary.Operator.DecomposedMask, enumType),
+                               new Binary.PredefinedOperator (underlying, enumType,
+                                       mask | Binary.Operator.AdditionMask | Binary.Operator.SubtractionMask | Binary.Operator.DecomposedMask, enumType),
+                               new Binary.PredefinedOperator (enumType, mask | Binary.Operator.SubtractionMask, underlying)
+                       };
+
+                       return operators;
+               }
+
                public void InitializePredefinedTypes ()
                {
                        predefined_attributes = new PredefinedAttributes (this);
                        predefined_types = new PredefinedTypes (this);
                        predefined_members = new PredefinedMembers (this);
+
+                       OperatorsBinaryEqualityLifted = Binary.CreateEqualityLiftedOperatorsTable (this);
+                       OperatorsBinaryLifted = Binary.CreateStandardLiftedOperatorsTable (this);
                }
 
                public override bool IsClsComplianceRequired ()
index badf5e1a7301b7aa9dded3c6b81d5b37d144a9fd..96afce4fd5e97dbae1cc006bc78343b9d10bdb4a 100644 (file)
@@ -13,6 +13,7 @@
 //
 
 using System;
+using SLE = System.Linq.Expressions;
 
 #if STATIC
 using IKVM.Reflection.Emit;
@@ -81,6 +82,12 @@ namespace Mono.CSharp.Nullable
                {
                        return ((InflatedTypeSpec) nullableType).TypeArguments[0];
                }
+
+               public static TypeSpec GetEnumUnderlyingType (ModuleContainer module, TypeSpec nullableEnum)
+               {
+                       return module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (module,
+                               new[] { EnumSpec.GetUnderlyingType (GetUnderlyingType (nullableEnum)) });
+               }
        }
 
        public class Unwrap : Expression, IMemoryLocation
@@ -88,9 +95,10 @@ namespace Mono.CSharp.Nullable
                Expression expr;
 
                LocalTemporary temp;
+               Expression temp_field;
                readonly bool useDefaultValue;
 
-               Unwrap (Expression expr, bool useDefaultValue)
+               public Unwrap (Expression expr, bool useDefaultValue = true)
                {
                        this.expr = expr;
                        this.loc = expr.Location;
@@ -105,6 +113,7 @@ namespace Mono.CSharp.Nullable
                        return expr.ContainsEmitWithAwait ();
                }
 
+               // TODO: REMOVE
                public static Expression Create (Expression expr)
                {
                        //
@@ -117,6 +126,18 @@ namespace Mono.CSharp.Nullable
                        return Create (expr, false);
                }
 
+               public static Expression CreateUnwrapped (Expression expr)
+               {
+                       //
+                       // Avoid unwraping and wraping of same type
+                       //
+                       Wrap wrap = expr as Wrap;
+                       if (wrap != null)
+                               return wrap.Child;
+
+                       return Create (expr, true);
+               }
+
                public static Unwrap Create (Expression expr, bool useDefaultValue)
                {
                        return new Unwrap (expr, useDefaultValue);
@@ -166,6 +187,14 @@ namespace Mono.CSharp.Nullable
                        call.EmitPredefined (ec, NullableInfo.GetHasValue (expr.Type), null);
                }
 
+               public override Expression EmitToField (EmitContext ec)
+               {
+                       if (temp_field == null)
+                               temp_field = this.expr.EmitToField (ec);
+                       
+                       return this;
+               }
+
                public override bool Equals (object obj)
                {
                        Unwrap uw = obj as Unwrap;
@@ -189,9 +218,9 @@ namespace Mono.CSharp.Nullable
                        }
                }
 
-               void Store (EmitContext ec)
+               public void Store (EmitContext ec)
                {
-                       if (temp != null)
+                       if (temp != null || temp_field != null)
                                return;
 
                        if (expr is VariableReference)
@@ -203,20 +232,35 @@ namespace Mono.CSharp.Nullable
 
                public void Load (EmitContext ec)
                {
-                       if (expr is VariableReference)
+                       if (temp_field != null)
+                               temp_field.Emit (ec);
+                       else if (expr is VariableReference)
                                expr.Emit (ec);
                        else
                                LocalVariable.Emit (ec);
                }
 
-               public override System.Linq.Expressions.Expression MakeExpression (BuilderContext ctx)
+               public override SLE.Expression MakeExpression (BuilderContext ctx)
                {
                        return expr.MakeExpression (ctx);
                }
 
                public void AddressOf (EmitContext ec, AddressOp mode)
                {
-                       IMemoryLocation ml = expr as VariableReference;
+                       IMemoryLocation ml;
+
+                       if (temp_field != null) {
+                               ml = temp_field as IMemoryLocation;
+                               if (ml == null) {
+                                       var lt = new LocalTemporary (temp_field.Type);
+                                       temp_field.Emit (ec);
+                                       lt.Store (ec);
+                                       ml = lt;
+                               }
+                       } else {
+                               ml = expr as VariableReference;
+                       }
+
                        if (ml != null)
                                ml.AddressOf (ec, mode);
                        else
@@ -228,7 +272,7 @@ namespace Mono.CSharp.Nullable
                //
                LocalTemporary LocalVariable {
                        get {
-                               if (temp == null)
+                               if (temp == null && temp_field == null)
                                        temp = new LocalTemporary (expr.Type);
                                return temp;
                        }
@@ -279,6 +323,12 @@ namespace Mono.CSharp.Nullable
                                return child_cast.CreateExpressionTree (ec);
                        }
 
+                       var user_cast = child as UserCast;
+                       if (user_cast != null) {
+                               child.Type = type;
+                               return user_cast.CreateExpressionTree (ec);
+                       }
+
                        return base.CreateExpressionTree (ec);
                }
 
@@ -317,10 +367,12 @@ namespace Mono.CSharp.Nullable
                        return new LiftedNull (nullable, loc);
                }
 
-               public static Constant CreateFromExpression (ResolveContext ec, Expression e)
+               public static Constant CreateFromExpression (ResolveContext rc, Expression e)
                {
-                       ec.Report.Warning (458, 2, e.Location, "The result of the expression is always `null' of type `{0}'",
-                               e.Type.GetSignatureForError ());
+                       if (!rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+                               rc.Report.Warning (458, 2, e.Location, "The result of the expression is always `null' of type `{0}'",
+                                       e.Type.GetSignatureForError ());
+                       }
 
                        return ReducedExpression.Create (Create (e.Type, e.Location), e);
                }
@@ -349,12 +401,12 @@ namespace Mono.CSharp.Nullable
        //
        // Generic lifting expression, supports all S/S? -> T/T? cases
        //
-       public class Lifted : Expression, IMemoryLocation
+       public class LiftedConversion : Expression, IMemoryLocation
        {
                Expression expr, null_value;
                Unwrap unwrap;
 
-               public Lifted (Expression expr, Unwrap unwrap, TypeSpec type)
+               public LiftedConversion (Expression expr, Unwrap unwrap, TypeSpec type)
                {
                        this.expr = expr;
                        this.unwrap = unwrap;
@@ -362,7 +414,7 @@ namespace Mono.CSharp.Nullable
                        this.type = type;
                }
 
-               public Lifted (Expression expr, Expression unwrap, TypeSpec type)
+               public LiftedConversion (Expression expr, Expression unwrap, TypeSpec type)
                        : this (expr, unwrap as Unwrap, type)
                {
                }
@@ -393,9 +445,11 @@ namespace Mono.CSharp.Nullable
 
                        // Wrap target for T?
                        if (type.IsNullableType) {
-                               expr = Wrap.Create (expr, type);
-                               if (expr == null)
-                                       return null;
+                               if (!expr.Type.IsNullableType) {
+                                       expr = Wrap.Create (expr, type);
+                                       if (expr == null)
+                                               return null;
+                               }
 
                                null_value = LiftedNull.Create (type, loc);
                        } else if (TypeSpec.IsValueType (type)) {
@@ -422,6 +476,7 @@ namespace Mono.CSharp.Nullable
                        ec.MarkLabel (is_null_label);
 
                        null_value.Emit (ec);
+
                        ec.MarkLabel (end_label);
                }
 
@@ -540,266 +595,90 @@ namespace Mono.CSharp.Nullable
                }
        }
 
-       public class LiftedBinaryOperator : Binary
+       //
+       // Lifted version of binary operators
+       //
+       class LiftedBinaryOperator : Expression
        {
-               Unwrap left_unwrap, right_unwrap;
-               Expression left_orig, right_orig;
-               Expression user_operator;
-               MethodSpec wrap_ctor;
-
-               public LiftedBinaryOperator (Binary.Operator op, Expression left, Expression right)
-                       : base (op, left, right)
+               public LiftedBinaryOperator (Binary b)
                {
+                       this.Binary = b;
+                       this.loc = b.Location;
                }
 
-               bool IsBitwiseBoolean {
-                       get {
-                               return (Oper == Operator.BitwiseAnd || Oper == Operator.BitwiseOr) &&
-                               ((left_unwrap != null && left_unwrap.Type.BuiltinType == BuiltinTypeSpec.Type.Bool) ||
-                                (right_unwrap != null && right_unwrap.Type.BuiltinType == BuiltinTypeSpec.Type.Bool));
-                       }
-               }
+               public Binary Binary { get; private set; }
 
-               bool IsLeftNullLifted {
-                       get {
-                               return (state & State.LeftNullLifted) != 0;
-                       }
-               }
+               public Expression Left { get; set; }
 
-               bool IsRightNullLifted {
-                       get {
-                               return (state & State.RightNullLifted) != 0;
-                       }
-               }
+               public Expression Right { get; set; }
 
-               public override Expression CreateExpressionTree (ResolveContext ec)
-               {
-                       if (user_operator != null)
-                               return user_operator.CreateExpressionTree (ec);
+               public Unwrap UnwrapLeft { get; set; }
 
-                       return base.CreateExpressionTree (ec);
-               }
+               public Unwrap UnwrapRight { get; set; }
 
-               //
-               // CSC 2 has this behavior, it allows structs to be compared
-               // with the null literal *outside* of a generics context and
-               // inlines that as true or false.
-               //
-               Constant CreateNullConstant (ResolveContext ec, Expression expr)
-               {
-                       // FIXME: Handle side effect constants
-                       Constant c = new BoolConstant (ec.BuiltinTypes, Oper == Operator.Inequality, loc);
+               public MethodSpec UserOperator { get; set; }
 
-                       if ((Oper & Operator.EqualityMask) != 0) {
-                               ec.Report.Warning (472, 2, loc, "The result of comparing value type `{0}' with null is always `{1}'",
-                                       expr.Type.GetSignatureForError (), c.GetValueAsLiteral ());
-                       } else {
-                               ec.Report.Warning (464, 2, loc, "The result of comparing type `{0}' with null is always `{1}'",
-                                       expr.Type.GetSignatureForError (), c.GetValueAsLiteral ());
+               bool IsBitwiseBoolean {
+                       get {
+                               return (Binary.Oper == Binary.Operator.BitwiseAnd || Binary.Oper == Binary.Operator.BitwiseOr) &&
+                               ((UnwrapLeft != null && UnwrapLeft.Type.BuiltinType == BuiltinTypeSpec.Type.Bool) ||
+                                (UnwrapRight != null && UnwrapRight.Type.BuiltinType == BuiltinTypeSpec.Type.Bool));
                        }
-
-                       return ReducedExpression.Create (c, this);
                }
 
-               protected override Expression DoResolve (ResolveContext ec)
+               public override bool ContainsEmitWithAwait ()
                {
-                       if ((Oper & Operator.LogicalMask) != 0) {
-                               Error_OperatorCannotBeApplied (ec, left, right);
-                               return null;
-                       }
-
-                       bool use_default_call = (Oper & (Operator.BitwiseMask | Operator.EqualityMask)) != 0;
-                       left_orig = left;
-                       if (left.Type.IsNullableType) {
-                               left = left_unwrap = Unwrap.Create (left, use_default_call);
-                               if (left == null)
-                                       return null;
-                       }
-
-                       right_orig = right;
-                       if (right.Type.IsNullableType) {
-                               right = right_unwrap = Unwrap.Create (right, use_default_call);
-                               if (right == null)
-                                       return null;
-                       }
-
-                       //
-                       // Some details are in 6.4.2, 7.2.7
-                       // Arguments can be lifted for equal operators when the return type is bool and both
-                       // arguments are of same type
-                       //      
-                       if (left_orig is NullLiteral) {
-                               left = right;
-                               state |= State.LeftNullLifted;
-                               type = ec.BuiltinTypes.Bool;
-                       }
-
-                       if (right_orig.IsNull) {
-                               if ((Oper & Operator.ShiftMask) != 0)
-                                       right = new EmptyExpression (ec.BuiltinTypes.Int);
-                               else
-                                       right = left;
-
-                               state |= State.RightNullLifted;
-                               type = ec.BuiltinTypes.Bool;
-                       }
-
-                       eclass = ExprClass.Value;
-                       return DoResolveCore (ec, left_orig, right_orig);
+                       return Left.ContainsEmitWithAwait () || Right.ContainsEmitWithAwait ();
                }
 
-               void EmitBitwiseBoolean (EmitContext ec)
+               public override Expression CreateExpressionTree (ResolveContext rc)
                {
-                       Label load_left = ec.DefineLabel ();
-                       Label load_right = ec.DefineLabel ();
-                       Label end_label = ec.DefineLabel ();
-
-                       // null & value, null | value
-                       if (left_unwrap == null) {
-                               left_unwrap = right_unwrap;
-                               right_unwrap = null;
-                               right = left;
-                       }
-
-                       left_unwrap.Emit (ec);
-                       ec.Emit (OpCodes.Brtrue, load_right);
-
-                       // value & null, value | null
-                       if (right_unwrap != null) {
-                               right_unwrap.Emit (ec);
-                               ec.Emit (OpCodes.Brtrue_S, load_left);
-                       }
-
-                       left_unwrap.EmitCheck (ec);
-                       ec.Emit (OpCodes.Brfalse_S, load_right);
-
-                       // load left
-                       ec.MarkLabel (load_left);
+                       if (UserOperator != null) {
+                               Arguments args = new Arguments (2);
+                               args.Add (new Argument (Binary.Left));
+                               args.Add (new Argument (Binary.Right));
 
-                       if (Oper == Operator.BitwiseAnd) {
-                               left_unwrap.Load (ec);
-                       } else {
-                               if (right_unwrap == null) {
-                                       right.Emit (ec);
-                                       if (right is EmptyConstantCast || right is EmptyCast)
-                                               ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
-                               } else {
-                                       right_unwrap.Load (ec);
-                                       right_unwrap = left_unwrap;
-                               }
-                       }
-                       ec.Emit (OpCodes.Br_S, end_label);
-
-                       // load right
-                       ec.MarkLabel (load_right);
-                       if (right_unwrap == null) {
-                               if (Oper == Operator.BitwiseAnd) {
-                                       right.Emit (ec);
-                                       if (right is EmptyConstantCast || right is EmptyCast)
-                                               ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
-                               } else {
-                                       left_unwrap.Load (ec);
-                               }
-                       } else {
-                               right_unwrap.Load (ec);
+                               var method = new UserOperatorCall (UserOperator, args, Binary.CreateExpressionTree, loc);
+                               return method.CreateExpressionTree (rc);
                        }
 
-                       ec.MarkLabel (end_label);
+                       return Binary.CreateExpressionTree (rc);
                }
 
-               //
-               // Emits optimized equality or inequality operator when possible
-               //
-               void EmitEquality (EmitContext ec)
+               protected override Expression DoResolve (ResolveContext rc)
                {
-                       //
-                       // Either left or right is null
-                       //
-                       if (left_unwrap != null && (IsRightNullLifted || right.IsNull)) {
-                               left_unwrap.EmitCheck (ec);
-                               if (Oper == Binary.Operator.Equality) {
-                                       ec.EmitInt (0);
-                                       ec.Emit (OpCodes.Ceq);
-                               }
-                               return;
-                       }
-
-                       if (right_unwrap != null && (IsLeftNullLifted || left.IsNull)) {
-                               right_unwrap.EmitCheck (ec);
-                               if (Oper == Binary.Operator.Equality) {
-                                       ec.EmitInt (0);
-                                       ec.Emit (OpCodes.Ceq);
-                               }
-                               return;
-                       }
-
-                       Label dissimilar_label = ec.DefineLabel ();
-                       Label end_label = ec.DefineLabel ();
+                       if (rc.IsRuntimeBinder) {
+                               if (UnwrapLeft == null && !Left.Type.IsNullableType)
+                                       Left = Wrap.Create (Left, rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { Left.Type }));
 
-                       if (user_operator != null) {
-                               user_operator.Emit (ec);
-                               ec.Emit (Oper == Operator.Equality ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, dissimilar_label);
+                               if (UnwrapRight == null && !Right.Type.IsNullableType)
+                                       Right = Wrap.Create (Right, rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { Right.Type }));
                        } else {
-                               if (ec.HasSet (BuilderContext.Options.AsyncBody) && right.ContainsEmitWithAwait ()) {
-                                       left = left.EmitToField (ec);
-                                       right = right.EmitToField (ec);
+                               if (UnwrapLeft == null && Left != null && Left.Type.IsNullableType) {
+                                       Left = Unwrap.CreateUnwrapped (Left);
+                                       UnwrapLeft = Left as Unwrap;
                                }
 
-                               left.Emit (ec);
-                               right.Emit (ec);
-
-                               ec.Emit (OpCodes.Bne_Un_S, dissimilar_label);
-                       }
-
-                       if (left_unwrap != null)
-                               left_unwrap.EmitCheck (ec);
-
-                       if (right_unwrap != null)
-                               right_unwrap.EmitCheck (ec);
-
-                       if (left_unwrap != null && right_unwrap != null) {
-                               if (Oper == Operator.Inequality)
-                                       ec.Emit (OpCodes.Xor);
-                               else
-                                       ec.Emit (OpCodes.Ceq);
-                       } else {
-                               if (Oper == Operator.Inequality) {
-                                       ec.EmitInt (0);
-                                       ec.Emit (OpCodes.Ceq);
+                               if (UnwrapRight == null && Right != null && Right.Type.IsNullableType) {
+                                       Right = Unwrap.CreateUnwrapped (Right);
+                                       UnwrapRight = Right as Unwrap;
                                }
                        }
 
-                       ec.Emit (OpCodes.Br_S, end_label);
-
-                       ec.MarkLabel (dissimilar_label);
-                       if (Oper == Operator.Inequality)
-                               ec.EmitInt (1);
-                       else
-                               ec.EmitInt (0);
+                       type = Binary.Type;
+                       eclass = Binary.eclass; 
 
-                       ec.MarkLabel (end_label);
+                       return this;
                }
-               
-               public override void EmitBranchable (EmitContext ec, Label target, bool onTrue)
-               {
-                       Emit (ec);
-                       ec.Emit (onTrue ? OpCodes.Brtrue : OpCodes.Brfalse, target);
-               }                       
 
                public override void Emit (EmitContext ec)
                {
-                       //
-                       // Optimize same expression operation
-                       //
-                       if (right_unwrap != null && right.Equals (left))
-                               right_unwrap = left_unwrap;
-
-                       if (user_operator == null && IsBitwiseBoolean) {
+                       if (IsBitwiseBoolean && UserOperator == null) {
                                EmitBitwiseBoolean (ec);
                                return;
                        }
 
-                       if ((Oper & Operator.EqualityMask) != 0) {
+                       if ((Binary.Oper & Binary.Operator.EqualityMask) != 0) {
                                EmitEquality (ec);
                                return;
                        }
@@ -807,28 +686,48 @@ namespace Mono.CSharp.Nullable
                        Label is_null_label = ec.DefineLabel ();
                        Label end_label = ec.DefineLabel ();
 
-                       if (left_unwrap != null) {
-                               left_unwrap.EmitCheck (ec);
-                               ec.Emit (OpCodes.Brfalse, is_null_label);
+                       if (ec.HasSet (BuilderContext.Options.AsyncBody) && Right.ContainsEmitWithAwait ()) {
+                               Left = Left.EmitToField (ec);
+                               Right = Right.EmitToField (ec);
+                       }
+
+                       if (UnwrapLeft != null) {
+                               UnwrapLeft.EmitCheck (ec);
                        }
 
                        //
                        // Don't emit HasValue check when left and right expressions are same
                        //
-                       if (right_unwrap != null && !left.Equals (right)) {
-                               right_unwrap.EmitCheck (ec);
-                               ec.Emit (OpCodes.Brfalse, is_null_label);
+                       if (UnwrapRight != null && !Binary.Left.Equals (Binary.Right)) {
+                               UnwrapRight.EmitCheck (ec);
+                               if (UnwrapLeft != null) {
+                                       ec.Emit (OpCodes.And);
+                               }
                        }
 
-                       EmitOperator (ec, left.Type);
+                       ec.Emit (OpCodes.Brfalse, is_null_label);
+
+                       if (UserOperator != null) {
+                               var args = new Arguments (2);
+                               args.Add (new Argument (Left));
+                               args.Add (new Argument (Right));
+
+                               var call = new CallEmitter ();
+                               call.EmitPredefined (ec, UserOperator, args);
+                       } else {
+                               Binary.EmitOperator (ec, Left, Right);
+                       }
 
-                       if (wrap_ctor != null)
-                               ec.Emit (OpCodes.Newobj, wrap_ctor);
+                       //
+                       // Wrap the result when the operator return type is nullable type
+                       //
+                       if (type.IsNullableType)
+                               ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
 
                        ec.Emit (OpCodes.Br_S, end_label);
                        ec.MarkLabel (is_null_label);
 
-                       if ((Oper & Operator.ComparisonMask) != 0) {
+                       if ((Binary.Oper & Binary.Operator.ComparisonMask) != 0) {
                                ec.EmitInt (0);
                        } else {
                                LiftedNull.Create (type, loc).Emit (ec);
@@ -837,170 +736,283 @@ namespace Mono.CSharp.Nullable
                        ec.MarkLabel (end_label);
                }
 
-               protected override void EmitOperator (EmitContext ec, TypeSpec l)
+               void EmitBitwiseBoolean (EmitContext ec)
                {
-                       if (user_operator != null) {
-                               user_operator.Emit (ec);
-                               return;
-                       }
+                       Label load_left = ec.DefineLabel ();
+                       Label load_right = ec.DefineLabel ();
+                       Label end_label = ec.DefineLabel ();
+                       Label is_null_label = ec.DefineLabel ();
 
-                       if (left.Type.IsNullableType) {
-                               l = NullableInfo.GetUnderlyingType (left.Type);
-                               left = EmptyCast.Create (left, l);
-                       }
+                       bool or = Binary.Oper == Binary.Operator.BitwiseOr;
 
-                       if (right.Type.IsNullableType) {
-                               right = EmptyCast.Create (right, NullableInfo.GetUnderlyingType (right.Type));
-                       }
+                       //
+                       // Both operands are bool? types
+                       //
+                       if (UnwrapLeft != null && UnwrapRight != null) {
+                               if (ec.HasSet (BuilderContext.Options.AsyncBody) && Binary.Right.ContainsEmitWithAwait ()) {
+                                       Left = Left.EmitToField (ec);
+                                       Right = Right.EmitToField (ec);
+                               }
 
-                       base.EmitOperator (ec, l);
-               }
+                               Left.Emit (ec);
+                               ec.Emit (OpCodes.Brtrue_S, load_right);
 
-               Expression LiftResult (ResolveContext ec, Expression res_expr)
-               {
-                       TypeSpec lifted_type;
+                               Right.Emit (ec);
+                               ec.Emit (OpCodes.Brtrue_S, load_left);
 
-                       //
-                       // Avoid double conversion
-                       //
-                       if (left_unwrap == null || IsLeftNullLifted || left_unwrap.Type != left.Type || (left_unwrap != null && IsRightNullLifted)) {
-                               lifted_type = new NullableType (left.Type, loc).ResolveAsType (ec);
-                               if (lifted_type == null)
-                                       return null;
+                               UnwrapLeft.EmitCheck (ec);
+                               ec.Emit (OpCodes.Brfalse_S, load_right);
 
-                               if (left is UserCast || left is EmptyCast || left is OpcodeCast)
-                                       left.Type = lifted_type;
+                               // load left
+                               ec.MarkLabel (load_left);
+                               if (or)
+                                       UnwrapRight.Load (ec);
                                else
-                                       left = EmptyCast.Create (left, lifted_type);
-                       }
+                                       UnwrapLeft.Load (ec);
 
-                       if (left != right && (right_unwrap == null || IsRightNullLifted || right_unwrap.Type != right.Type || (right_unwrap != null && IsLeftNullLifted))) {
-                               lifted_type = new NullableType (right.Type, loc).ResolveAsType (ec);
-                               if (lifted_type == null)
-                                       return null;
-
-                               var r = right;
-                               if (r is ReducedExpression)
-                                       r = ((ReducedExpression) r).OriginalExpression;
+                               ec.Emit (OpCodes.Br_S, end_label);
 
-                               if (r is UserCast || r is EmptyCast || r is OpcodeCast)
-                                       r.Type = lifted_type;
+                               // load right
+                               ec.MarkLabel (load_right);
+                               if (or)
+                                       UnwrapLeft.Load (ec);
                                else
-                                       right = EmptyCast.Create (right, lifted_type);
+                                       UnwrapRight.Load (ec);
+
+                               ec.MarkLabel (end_label);
+                               return;
                        }
 
-                       if ((Oper & Operator.ComparisonMask) == 0) {
-                               lifted_type = new NullableType (res_expr.Type, loc).ResolveAsType (ec);
-                               if (lifted_type == null)
-                                       return null;
+                       //
+                       // Faster version when one operand is bool
+                       //
+                       if (UnwrapLeft == null) {
+                               //
+                               // (bool, bool?)
+                               //
+                               // Optimizes remaining (false & bool?), (true | bool?) which are not easy to handle
+                               // in binary expression reduction
+                               //
+                               var c = Left as BoolConstant;
+                               if (c != null) {
+                                       // Keep evaluation order
+                                       UnwrapRight.Store (ec);
+
+                                       ec.EmitInt (or ? 1 : 0);
+                                       ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
+                               } else if (Left.IsNull) {
+                                       UnwrapRight.Emit (ec);
+                                       ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, is_null_label);
+
+                                       UnwrapRight.Load (ec);
+                                       ec.Emit (OpCodes.Br_S, end_label);
+
+                                       ec.MarkLabel (is_null_label);
+                                       LiftedNull.Create (type, loc).Emit (ec);
+                               } else {
+                                       Left.Emit (ec);
+                                       ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, load_right);
 
-                               wrap_ctor = NullableInfo.GetConstructor (lifted_type);
-                               type = res_expr.Type = lifted_type;
-                       }
+                                       ec.EmitInt (or ? 1 : 0);
+                                       ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
 
-                       if (IsLeftNullLifted) {
-                               left = LiftedNull.Create (right.Type, left.Location);
+                                       ec.Emit (OpCodes.Br_S, end_label);
 
+                                       ec.MarkLabel (load_right);
+                                       UnwrapRight.Original.Emit (ec);
+                               }
+                       } else {
                                //
-                               // Special case for bool?, the result depends on both null right side and left side value
+                               // (bool?, bool)
                                //
-                               if ((Oper == Operator.BitwiseAnd || Oper == Operator.BitwiseOr) && NullableInfo.GetUnderlyingType (type).BuiltinType == BuiltinTypeSpec.Type.Bool) {
-                                       return res_expr;
-                               }
-
-                               if ((Oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0)
-                                       return LiftedNull.CreateFromExpression (ec, res_expr);
+                               // Keep left-right evaluation order
+                               UnwrapLeft.Store (ec);
 
                                //
-                               // Value types and null comparison
+                               // Optimizes remaining (bool? & false), (bool? | true) which are not easy to handle
+                               // in binary expression reduction
                                //
-                               if (right_unwrap == null || (Oper & Operator.RelationalMask) != 0)
-                                       return CreateNullConstant (ec, right_orig);
+                               var c = Right as BoolConstant;
+                               if (c != null) {
+                                       ec.EmitInt (or ? 1 : 0);
+                                       ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
+                               } else if (Right.IsNull) {
+                                       UnwrapLeft.Emit (ec);
+                                       ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, is_null_label);
+
+                                       UnwrapLeft.Load (ec);
+                                       ec.Emit (OpCodes.Br_S, end_label);
+
+                                       ec.MarkLabel (is_null_label);
+                                       LiftedNull.Create (type, loc).Emit (ec);
+                               } else {
+                                       Right.Emit (ec);
+                                       ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, load_right);
+
+                                       ec.EmitInt (or ? 1 : 0);
+                                       ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
+
+                                       ec.Emit (OpCodes.Br_S, end_label);
+
+                                       ec.MarkLabel (load_right);
+
+                                       UnwrapLeft.Load (ec);
+                               }
                        }
 
-                       if (IsRightNullLifted) {
-                               right = LiftedNull.Create (left.Type, right.Location);
+                       ec.MarkLabel (end_label);
+               }
 
+               //
+               // Emits optimized equality or inequality operator when possible
+               //
+               void EmitEquality (EmitContext ec)
+               {
+                       //
+                       // Either left or right is null
+                       // 
+                       if (UnwrapLeft != null && Binary.Right.IsNull) { // TODO: Optimize for EmitBranchable
                                //
-                               // Special case for bool?, the result depends on both null right side and left side value
+                               // left.HasValue == false 
                                //
-                               if ((Oper == Operator.BitwiseAnd || Oper == Operator.BitwiseOr) && NullableInfo.GetUnderlyingType (type).BuiltinType == BuiltinTypeSpec.Type.Bool) {
-                                       return res_expr;
+                               UnwrapLeft.EmitCheck (ec);
+                               if (Binary.Oper == Binary.Operator.Equality) {
+                                       ec.EmitInt (0);
+                                       ec.Emit (OpCodes.Ceq);
                                }
+                               return;
+                       }
 
-                               if ((Oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0)
-                                       return LiftedNull.CreateFromExpression (ec, res_expr);
-
+                       if (UnwrapRight != null && Binary.Left.IsNull) {
                                //
-                               // Value types and null comparison
+                               // right.HasValue == false 
                                //
-                               if (left_unwrap == null || (Oper & Operator.RelationalMask) != 0)
-                                       return CreateNullConstant (ec, left_orig);
+                               UnwrapRight.EmitCheck (ec);
+                               if (Binary.Oper == Binary.Operator.Equality) {
+                                       ec.EmitInt (0);
+                                       ec.Emit (OpCodes.Ceq);
+                               }
+                               return;
                        }
 
-                       return res_expr;
-               }
+                       Label dissimilar_label = ec.DefineLabel ();
+                       Label end_label = ec.DefineLabel ();
 
-               protected override Expression ResolveOperatorPredefined (ResolveContext ec, Binary.PredefinedOperator [] operators, bool primitives_only, TypeSpec enum_type)
-               {
-                       Expression e = base.ResolveOperatorPredefined (ec, operators, primitives_only, enum_type);
+                       if (UserOperator != null) {
+                               var left = Left;
 
-                       if (e == this || enum_type != null)
-                               return LiftResult (ec, e);
+                               if (UnwrapLeft != null) {
+                                       UnwrapLeft.EmitCheck (ec);
+                               } else {
+                                       // Keep evaluation order same
+                                       if (!(Left is VariableReference)) {
+                                               Left.Emit (ec);
+                                               var lt = new LocalTemporary (Left.Type);
+                                               lt.Store (ec);
+                                               left = lt;
+                                       }
+                               }
 
-                       //
-                       // 7.9.9 Equality operators and null
-                       //
-                       // The == and != operators permit one operand to be a value of a nullable type and
-                       // the other to be the null literal, even if no predefined or user-defined operator
-                       // (in unlifted or lifted form) exists for the operation.
-                       //
-                       if (e == null && (Oper & Operator.EqualityMask) != 0) {
-                               if ((IsLeftNullLifted && right_unwrap != null) || (IsRightNullLifted && left_unwrap != null))
-                                       return LiftResult (ec, this);
-                       }
+                               if (UnwrapRight != null) {
+                                       UnwrapRight.EmitCheck (ec);
 
-                       return e;
-               }
+                                       if (UnwrapLeft != null) {
+                                               ec.Emit (OpCodes.Bne_Un, dissimilar_label);
 
-               protected override Expression ResolveUserOperator (ResolveContext ec, Expression left, Expression right)
-               {
-                       //
-                       // Try original types first for exact match without unwrapping
-                       //
-                       Expression expr = base.ResolveUserOperator (ec, left_orig, right_orig);
-                       if (expr != null)
-                               return expr;
+                                               Label compare_label = ec.DefineLabel ();
+                                               UnwrapLeft.EmitCheck (ec);
+                                               ec.Emit (OpCodes.Brtrue, compare_label);
 
-                       State orig_state = state;
+                                               if (Binary.Oper == Binary.Operator.Equality)
+                                                       ec.EmitInt (1);
+                                               else
+                                                       ec.EmitInt (0);
 
-                       //
-                       // One side is a nullable type, try to match underlying types
-                       //
-                       if (left_unwrap != null || right_unwrap != null || (state & (State.RightNullLifted | State.LeftNullLifted)) != 0) {
-                               expr = base.ResolveUserOperator (ec, left, right);
+                                               ec.Emit (OpCodes.Br, end_label);
+
+                                               ec.MarkLabel (compare_label);
+                                       } else {
+                                               ec.Emit (OpCodes.Brfalse, dissimilar_label);
+                                       }
+                               } else {
+                                       ec.Emit (OpCodes.Brfalse, dissimilar_label);
+                               }
+
+                               var args = new Arguments (2);
+                               args.Add (new Argument (left));
+                               args.Add (new Argument (Right));
+
+                               var call = new CallEmitter ();
+                               call.EmitPredefined (ec, UserOperator, args);
+                       } else {
+                               if (ec.HasSet (BuilderContext.Options.AsyncBody) && Binary.Right.ContainsEmitWithAwait ()) {
+                                       Left = Left.EmitToField (ec);
+                                       Right = Right.EmitToField (ec);
+                               }
+
+                               //
+                               // Emit underlying value comparison first.
+                               //
+                               // For this code: int? a = 1; bool b = a == 1;
+                               //
+                               // We emit something similar to this. Expressions with side effects have local
+                               // variable created by Unwrap expression
+                               //
+                               //      left.GetValueOrDefault ()
+                               //      right
+                               //      bne.un.s   dissimilar_label
+                               //  left.HasValue
+                               //      br.s       end_label
+                               // dissimilar_label:
+                               //      ldc.i4.0
+                               // end_label:
+                               //
+
+                               Left.Emit (ec);
+                               Right.Emit (ec);
+
+                               ec.Emit (OpCodes.Bne_Un_S, dissimilar_label);
+
+                               //
+                               // Check both left and right expressions for Unwrap call in which
+                               // case we need to run get_HasValue() check because the type is
+                               // nullable and could have null value
+                               //
+                               if (UnwrapLeft != null)
+                                       UnwrapLeft.EmitCheck (ec);
+
+                               if (UnwrapRight != null)
+                                       UnwrapRight.EmitCheck (ec);
+
+                               if (UnwrapLeft != null && UnwrapRight != null) {
+                                       if (Binary.Oper == Binary.Operator.Inequality)
+                                               ec.Emit (OpCodes.Xor);
+                                       else
+                                               ec.Emit (OpCodes.Ceq);
+                               } else {
+                                       if (Binary.Oper == Binary.Operator.Inequality) {
+                                               ec.EmitInt (0);
+                                               ec.Emit (OpCodes.Ceq);
+                                       }
+                               }
                        }
 
-                       if (expr == null)
-                               return null;
+                       ec.Emit (OpCodes.Br_S, end_label);
 
-                       //
-                       // Lift the result in the case it can be null and predefined or user operator
-                       // result type is of a value type
-                       //
-                       if (!TypeSpec.IsValueType (expr.Type))
-                               return null;
+                       ec.MarkLabel (dissimilar_label);
+                       if (Binary.Oper == Binary.Operator.Inequality)
+                               ec.EmitInt (1);
+                       else
+                               ec.EmitInt (0);
 
-                       if (state != orig_state)
-                               return expr;
+                       ec.MarkLabel (end_label);
+               }
 
-                       expr = LiftResult (ec, expr);
-                       if (expr is Constant)
-                               return expr;
+               public override SLE.Expression MakeExpression (BuilderContext ctx)
+               {
+                       Console.WriteLine (":{0} x {1}", Left.GetType (), Right.GetType ());
 
-                       type = expr.Type;
-                       user_operator = expr;
-                       return this;
+                       return Binary.MakeExpression (ctx, Left, Right);
                }
        }
 
index 327c58c60839155d452ed05d7e118e659f1c8372..06ffb0df7a442445586fee47023cb2e5f1af939d 100644 (file)
@@ -253,7 +253,7 @@ namespace Mono.CSharp
                                        return;
                                }
 
-                               base.ApplyAttributeBuilder (a, ctor, cdata, pa);
+                               base.ApplyToExtraTarget (a, ctor, cdata, pa);
                        }
 
                        public override ParametersCompiled ParameterInfo {
@@ -1171,7 +1171,7 @@ namespace Mono.CSharp
                                        return;
                                }
 
-                               base.ApplyAttributeBuilder (a, ctor, cdata, pa);
+                               base.ApplyToExtraTarget (a, ctor, cdata, pa);
                        }
 
                        public override AttributeTargets AttributeTargets {
index cb2306b3f493cbd75d37b24c6b8fb81f0ab6bdc7..4bd207aa00f0f72729c019c4458dfeec50794d6a 100644 (file)
@@ -57,6 +57,7 @@ namespace Mono.CSharp {
                        }
 
                        ec.StartFlowBranching (FlowBranching.BranchingType.Block, loc);
+                       ec.CurrentBranching.CurrentUsageVector.Goto ();
                        bool ok = Resolve (ec);
                        ec.KillFlowBranching ();
 
@@ -1197,10 +1198,7 @@ namespace Mono.CSharp {
                                return false;
                        }
 
-                       if (ec.Switch.DefaultLabel == null) {
-                               FlowBranchingBlock.Error_UnknownLabel (loc, "default", ec.Report);
-                               return false;
-                       }
+                       ec.Switch.RegisterGotoCase (null, null);
 
                        return true;
                }
@@ -1221,7 +1219,6 @@ namespace Mono.CSharp {
        /// </summary>
        public class GotoCase : Statement {
                Expression expr;
-               SwitchLabel sl;
                
                public GotoCase (Expression e, Location l)
                {
@@ -1234,6 +1231,8 @@ namespace Mono.CSharp {
                                return this.expr;
                        }
                }
+
+               public SwitchLabel Label { get; set; }
                
                public override bool Resolve (BlockContext ec)
                {
@@ -1244,13 +1243,8 @@ namespace Mono.CSharp {
 
                        ec.CurrentBranching.CurrentUsageVector.Goto ();
 
-                       expr = expr.Resolve (ec);
-                       if (expr == null)
-                               return false;
-
-                       Constant c = expr as Constant;
+                       Constant c = expr.ResolveLabelConstant (ec);
                        if (c == null) {
-                               ec.Report.Error (150, expr.Location, "A constant value is expected");
                                return false;
                        }
 
@@ -1272,13 +1266,13 @@ namespace Mono.CSharp {
 
                        }
 
-                       sl = ec.Switch.ResolveGotoCase (ec, res);
+                       ec.Switch.RegisterGotoCase (this, res);
                        return true;
                }
 
                protected override void DoEmit (EmitContext ec)
                {
-                       ec.Emit (OpCodes.Br, sl.GetILLabel (ec));
+                       ec.Emit (OpCodes.Br, Label.GetILLabel (ec));
                }
 
                protected override void CloneTo (CloneContext clonectx, Statement t)
@@ -2249,6 +2243,11 @@ namespace Mono.CSharp {
                                scope_initializers.Add (s);
                        }
                }
+
+               public void InsertStatement (int index, Statement s)
+               {
+                       statements.Insert (index, s);
+               }
                
                public void AddStatement (Statement s)
                {
@@ -2627,6 +2626,24 @@ namespace Mono.CSharp {
                                                                if (pb.StateMachine == storey)
                                                                        break;
 
+                                                               //
+                                                               // If we are state machine with no parent we can hook into we don't
+                                                               // add reference but capture this directly
+                                                               //
+                                                               ExplicitBlock parent_storey_block = pb;
+                                                               while (parent_storey_block.Parent != null) {
+                                                                       parent_storey_block = parent_storey_block.Parent.Explicit;
+                                                                       if (parent_storey_block.AnonymousMethodStorey != null) {
+                                                                               break;
+                                                                       }
+                                                               }
+
+                                                               if (parent_storey_block.AnonymousMethodStorey == null) {
+                                                                       pb.StateMachine.AddCapturedThisField (ec);
+                                                                       b.HasCapturedThis = true;
+                                                                       continue;
+                                                               }
+
                                                                pb.StateMachine.AddParentStoreyReference (ec, storey);
                                                        }
                                                        
@@ -3628,6 +3645,9 @@ namespace Mono.CSharp {
 
                public override bool Resolve (BlockContext bc)
                {
+                       if (ResolveAndReduce (bc))
+                               bc.Switch.RegisterLabel (bc, this);
+
                        bc.CurrentBranching.CurrentUsageVector.ResetBarrier ();
 
                        return base.Resolve (bc);
@@ -3637,29 +3657,25 @@ namespace Mono.CSharp {
                // Resolves the expression, reduces it to a literal if possible
                // and then converts it to the requested type.
                //
-               public bool ResolveAndReduce (ResolveContext ec, TypeSpec required_type, bool allow_nullable)
-               {       
-                       Expression e = label.Resolve (ec);
-
-                       if (e == null)
-                               return false;
+               bool ResolveAndReduce (ResolveContext rc)
+               {
+                       if (IsDefault)
+                               return true;
 
-                       Constant c = e as Constant;
-                       if (c == null){
-                               ec.Report.Error (150, loc, "A constant value is expected");
+                       var c = label.ResolveLabelConstant (rc);
+                       if (c == null)
                                return false;
-                       }
 
-                       if (allow_nullable && c is NullLiteral) {
+                       if (rc.Switch.IsNullable && c is NullLiteral) {
                                converted = c;
                                return true;
                        }
 
-                       converted = c.ImplicitConversionRequired (ec, required_type, loc);
+                       converted = c.ImplicitConversionRequired (rc, rc.Switch.SwitchType, loc);
                        return converted != null;
                }
 
-               public void Error_AlreadyOccurs (ResolveContext ec, TypeSpec switch_type, SwitchLabel collision_with)
+               public void Error_AlreadyOccurs (ResolveContext ec, SwitchLabel collision_with)
                {
                        string label;
                        if (converted == null)
@@ -3765,6 +3781,8 @@ namespace Mono.CSharp {
                Dictionary<string, SwitchLabel> string_labels;
                List<SwitchLabel> case_labels;
 
+               List<Tuple<GotoCase, Constant>> goto_cases;
+
                /// <summary>
                ///   The governing switch type
                /// </summary>
@@ -3884,88 +3902,40 @@ namespace Mono.CSharp {
                        };
                }
 
-               //
-               // Performs the basic sanity checks on the switch statement
-               // (looks for duplicate keys and non-constant expressions).
-               //
-               // It also returns a hashtable with the keys that we will later
-               // use to compute the switch tables
-               //
-               bool ResolveLabels (ResolveContext ec, Constant value)
+               public void RegisterLabel (ResolveContext rc, SwitchLabel sl)
                {
-                       bool error = false;
-                       if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.String) {
-                               string_labels = new Dictionary<string, SwitchLabel> ();
-                       } else {
-                               labels = new Dictionary<long, SwitchLabel> ();
-                       }
+                       case_labels.Add (sl);
 
-                       case_labels = new List<SwitchLabel> ();
-                       int default_label_index = -1;
-                       bool constant_label_found = false;
-
-                       for (int i = 0; i < block.Statements.Count; ++i) {
-                               var s = block.Statements[i];
-
-                               var sl = s as SwitchLabel;
-                               if (sl == null) {
-                                       continue;
-                               }
-
-                               case_labels.Add (sl);
-
-                               if (sl.IsDefault) {
-                                       if (case_default != null) {
-                                               sl.Error_AlreadyOccurs (ec, SwitchType, case_default);
-                                               error = true;
-                                       }
-
-                                       default_label_index = i;
+                       if (sl.IsDefault) {
+                               if (case_default != null) {
+                                       sl.Error_AlreadyOccurs (rc, case_default);
+                               } else {
                                        case_default = sl;
-                                       continue;
                                }
 
-                               if (!sl.ResolveAndReduce (ec, SwitchType, IsNullable)) {
-                                       error = true;
-                                       continue;
-                               }
+                               return;
+                       }
 
-                               try {
-                                       if (string_labels != null) {
-                                               string string_value = sl.Converted.GetValue () as string;
-                                               if (string_value == null)
-                                                       case_null = sl;
-                                               else
-                                                       string_labels.Add (string_value, sl);
+                       try {
+                               if (string_labels != null) {
+                                       string string_value = sl.Converted.GetValue () as string;
+                                       if (string_value == null)
+                                               case_null = sl;
+                                       else
+                                               string_labels.Add (string_value, sl);
+                               } else {
+                                       if (sl.Converted is NullLiteral) {
+                                               case_null = sl;
                                        } else {
-                                               if (sl.Converted is NullLiteral) {
-                                                       case_null = sl;
-                                               } else {
-                                                       labels.Add (sl.Converted.GetValueAsLong (), sl);
-                                               }
+                                               labels.Add (sl.Converted.GetValueAsLong (), sl);
                                        }
-                               } catch (ArgumentException) {
-                                       if (string_labels != null)
-                                               sl.Error_AlreadyOccurs (ec, SwitchType, string_labels[(string) sl.Converted.GetValue ()]);
-                                       else
-                                               sl.Error_AlreadyOccurs (ec, SwitchType, labels[sl.Converted.GetValueAsLong ()]);
-
-                                       error = true;
-                               }
-
-                               if (value != null) {
-                                       var constant_label = constant_label_found ? null : FindLabel (value);
-                                       if (constant_label == null || constant_label != sl)
-                                               block.Statements[i] = new EmptyStatement (s.loc);
-                                       else
-                                               constant_label_found = true;
                                }
+                       } catch (ArgumentException) {
+                               if (string_labels != null)
+                                       sl.Error_AlreadyOccurs (rc, string_labels[(string) sl.Converted.GetValue ()]);
+                               else
+                                       sl.Error_AlreadyOccurs (rc, labels[sl.Converted.GetValueAsLong ()]);
                        }
-
-                       if (value != null && constant_label_found && default_label_index >= 0)
-                               block.Statements[default_label_index] = new EmptyStatement (case_default.loc);
-
-                       return !error;
                }
                
                //
@@ -4158,24 +4128,29 @@ namespace Mono.CSharp {
                        if (block.Statements.Count == 0)
                                return true;
 
-                       var constant = new_expr as Constant;
+                       if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.String) {
+                               string_labels = new Dictionary<string, SwitchLabel> ();
+                       } else {
+                               labels = new Dictionary<long, SwitchLabel> ();
+                       }
 
-                       if (!ResolveLabels (ec, constant))
-                               return false;
+                       case_labels = new List<SwitchLabel> ();
+
+                       var constant = new_expr as Constant;
 
                        //
                        // Don't need extra variable for constant switch or switch with
                        // only default case
                        //
-                       if (constant == null && (case_labels.Count - (case_default != null ? 1 : 0)) != 0) {
+                       if (constant == null) {
                                //
                                // Store switch expression for comparison purposes
                                //
                                value = new_expr as VariableReference;
-                               if (value == null) {
-                                       // Create temporary variable inside switch scope
+                               if (value == null && !HasOnlyDefaultSection ()) {
                                        var current_block = ec.CurrentBlock;
                                        ec.CurrentBlock = Block;
+                                       // Create temporary variable inside switch scope
                                        value = TemporaryVariableReference.Create (SwitchType, ec.CurrentBlock, loc);
                                        value.Resolve (ec);
                                        ec.CurrentBlock = current_block;
@@ -4198,6 +4173,33 @@ namespace Mono.CSharp {
                        ec.EndFlowBranching ();
                        ec.Switch = old_switch;
 
+                       //
+                       // Check if all goto cases are valid. Needs to be done after switch
+                       // is resolved becuase goto can jump forward in the scope.
+                       //
+                       if (goto_cases != null) {
+                               foreach (var gc in goto_cases) {
+                                       if (gc.Item1 == null) {
+                                               if (DefaultLabel == null) {
+                                                       FlowBranchingBlock.Error_UnknownLabel (loc, "default", ec.Report);
+                                               }
+
+                                               continue;
+                                       }
+
+                                       var sl = FindLabel (gc.Item2);
+                                       if (sl == null) {
+                                               FlowBranchingBlock.Error_UnknownLabel (loc, "case " + gc.Item2.GetValueAsLiteral (), ec.Report);
+                                       } else {
+                                               gc.Item1.Label = sl;
+                                       }
+                               }
+                       }
+
+                       if (constant != null) {
+                               ResolveUnreachableSections (ec, constant);
+                       }
+
                        if (!ok)
                                return false;
 
@@ -4206,23 +4208,34 @@ namespace Mono.CSharp {
                        }
 
                        //
-                       // Needed to emit anonymous storey initialization before
+                       // Anonymous storey initialization has to happen before
                        // any generated switch dispatch
                        //
-                       block.AddScopeStatement (new DispatchStatement (this));
+                       block.InsertStatement (0, new DispatchStatement (this));
 
                        return true;
                }
 
-               public SwitchLabel ResolveGotoCase (ResolveContext rc, Constant value)
+               bool HasOnlyDefaultSection ()
                {
-                       var sl = FindLabel (value);
+                       for (int i = 0; i < block.Statements.Count; ++i) {
+                               var s = block.Statements[i] as SwitchLabel;
 
-                       if (sl == null) {
-                               FlowBranchingBlock.Error_UnknownLabel (loc, "case " + value.GetValueAsLiteral (), rc.Report);
+                               if (s == null || s.IsDefault)
+                                       continue;
+
+                               return false;
                        }
 
-                       return sl;
+                       return true;
+               }
+
+               public void RegisterGotoCase (GotoCase gotoCase, Constant value)
+               {
+                       if (goto_cases == null)
+                               goto_cases = new List<Tuple<GotoCase, Constant>> ();
+
+                       goto_cases.Add (Tuple.Create (gotoCase, value));
                }
 
                //
@@ -4283,6 +4296,38 @@ namespace Mono.CSharp {
                        string_dictionary = new SimpleAssign (switch_cache_field, initializer.Resolve (ec));
                }
 
+               void ResolveUnreachableSections (BlockContext bc, Constant value)
+               {
+                       var constant_label = FindLabel (value) ?? case_default;
+
+                       bool found = false;
+                       bool unreachable_reported = false;
+                       for (int i = 0; i < block.Statements.Count; ++i) {
+                               var s = block.Statements[i];
+
+                               if (s is SwitchLabel) {
+                                       if (unreachable_reported) {
+                                               found = unreachable_reported = false;
+                                       }
+
+                                       found |= s == constant_label;
+                                       continue;
+                               }
+
+                               if (found) {
+                                       unreachable_reported = true;
+                                       continue;
+                               }
+
+                               if (!unreachable_reported) {
+                                       unreachable_reported = true;
+                                       bc.Report.Warning (162, 2, s.loc, "Unreachable code detected");
+                               }
+
+                               block.Statements[i] = new EmptyStatement (s.loc);
+                       }
+               }
+
                void DoEmitStringSwitch (EmitContext ec)
                {
                        Label l_initialized = ec.DefineLabel ();
@@ -4393,12 +4438,6 @@ namespace Mono.CSharp {
                                return;
                        }
 
-                       //
-                       // Mark sequence point explicitly to switch
-                       //
-                       ec.Mark (block.StartLocation);
-                       block.IsCompilerGenerated = true;
-
                        if (string_dictionary != null) {
                                DoEmitStringSwitch (ec);
                        } else if (case_labels.Count < 4 || string_labels != null) {
@@ -4434,6 +4473,14 @@ namespace Mono.CSharp {
                                } else if (new_expr != value) {
                                        value.EmitAssign (ec, new_expr, false, false);
                                }
+
+
+                               //
+                               // Next statement is compiler generated we don't need extra
+                               // nop when we can use the statement for sequence point
+                               //
+                               ec.Mark (block.StartLocation);
+                               block.IsCompilerGenerated = true;
                        }
 
                        block.Emit (ec);
index 6eb7648ce537b162b61e8a9727d995a32d49d8d7..b77dfef531fb6c6e9fddc1914ffa2641302857dd 100644 (file)
@@ -835,15 +835,22 @@ namespace Mono.CSharp
                        }
 
                        if (best_match == null && reportErrors) {
-                               Location loc;
-                               if (found[0].MemberDefinition is MemberCore) {
-                                       loc = ((MemberCore) found[0].MemberDefinition).Location;
+                               var found_member = found[0];
+
+                               if (found_member.Kind == MemberKind.MissingType) {
+                                       // CSC: should be different error number
+                                       module.Compiler.Report.Error (518, "The predefined type `{0}.{1}' is defined in an assembly that is not referenced.", ns, name);
                                } else {
-                                       loc = Location.Null;
-                                       module.Compiler.Report.SymbolRelatedToPreviousError (found[0]);
-                               }
+                                       Location loc;
+                                       if (found_member.MemberDefinition is MemberCore) {
+                                               loc = ((MemberCore) found_member.MemberDefinition).Location;
+                                       } else {
+                                               loc = Location.Null;
+                                               module.Compiler.Report.SymbolRelatedToPreviousError (found_member);
+                                       }
 
-                               module.Compiler.Report.Error (520, loc, "The predefined type `{0}.{1}' is not declared correctly", ns, name);
+                                       module.Compiler.Report.Error (520, loc, "The predefined type `{0}.{1}' is not declared correctly", ns, name);
+                               }
                        }
 
                        return best_match;
index 2657956a2f540821f0d0b6332483790ef391a7ef..f9e623971a7eae404d3dd59a6bdee4ed2af5d711 100644 (file)
@@ -653,6 +653,20 @@ namespace Mono.CSharp
                        }
                }
 
+               public static bool IsNonNullableValueType (TypeSpec t)
+               {
+                       switch (t.Kind) {
+                       case MemberKind.TypeParameter:
+                               return ((TypeParameterSpec) t).IsValueType;
+                       case MemberKind.Struct:
+                               return !t.IsNullableType;
+                       case MemberKind.Enum:
+                               return true;
+                       default:
+                               return false;
+                       }
+               }
+
                public static bool IsValueType (TypeSpec t)
                {
                        switch (t.Kind) {
index 06f2fed3fdea5f221591e1894a5e9aefdd8c911f..f0b58ef8b9a0758ad265a412d9b0cb85b601ff7a 100644 (file)
@@ -36,6 +36,7 @@ class C
        public dynamic[,] t2;
        public Func<dynamic, int, dynamic[]> v;
        public I<dynamic>[] iface;
+       public Action<int[], object, dynamic> d2;
 }
 
 delegate dynamic Del (dynamic d);
@@ -135,6 +136,12 @@ class Test
                if (!da.TransformFlags.SequenceEqual (new bool[] { false, false, true }))
                        return 47;
 
+               da = t.GetMember ("d2")[0].GetCustomAttributes (ca, false)[0] as DynamicAttribute;
+               if (da == null)
+                       return 48;
+               if (!da.TransformFlags.SequenceEqual (new bool[] { false, false, false, false, true }))
+                       return 49;
+
                t = typeof (Del);
 
                if (t.GetMember ("Invoke")[0].GetCustomAttributes (ca, false).Length != 0)
index 5522a499f888e435e74308951483cd73b37c2020..30f4d3c5b4a53d02556a4f0205724850da3737d6 100644 (file)
@@ -45,9 +45,17 @@ public struct Baz
        }
 }
 
+struct S
+{
+       public static implicit operator bool?(S arg)
+       {
+               throw new ApplicationException ("should not be called");
+       }
+}
+
 class X
 {
-       public static void Main ()
+       public static int Main ()
        {
                int a = 3;
                int? b = a;
@@ -67,5 +75,12 @@ class X
                Baz? z2 = (Baz?) f2;
                Baz? z3 = (Baz?) f3;
                Baz z4 = (Baz) f2;
+
+               S? s = null;
+               bool? g = s;
+               if (g != null)
+                       return 1;
+
+               return 0;
        }
 }
index 63ca06b2b5484df6b984bec316713cbbe0980409..5668a7dca7afda43128c2fc6bc564adfd2b44edc 100644 (file)
@@ -21,6 +21,20 @@ public static class ApplicationContext
                if (res)
                        return 2;
                
+               int? re = 3 + (short?) 7;
+               if (re != 10)
+                       return 3;
+               
+               int a = 2;
+               int b = 2;
+               int? c = (byte?)a + b;
+               if (c != 4)
+                       return 4;
+               
+               c = a + (ushort?)b;
+               if (c != 4)
+                       return 5;
+               
                return 0;
        }
 }
diff --git a/mcs/tests/gtest-584.cs b/mcs/tests/gtest-584.cs
new file mode 100644 (file)
index 0000000..3a5b786
--- /dev/null
@@ -0,0 +1,73 @@
+using System;
+
+enum E : sbyte
+{
+       V = 1
+}
+
+struct S
+{
+       public static bool operator == (S s, S i)
+       {
+               throw new ApplicationException ();
+       }
+
+       public static bool operator != (S s, S i)
+       {
+               throw new ApplicationException ();
+       }
+
+       public static implicit operator int? (S s)
+       {
+               throw new ApplicationException ();
+       }
+
+       public static implicit operator E? (S s)
+       {
+               return null;
+       }
+}
+
+class C
+{
+       public static int Main ()
+       {
+               E? a = E.V;
+               E? a_n = null;
+               E? b = E.V;
+               E? b_n = null;
+
+               if (a != b)
+                       return 1;
+
+               if (a == a_n)
+                       return 2;
+
+               if (a_n != b_n)
+                       return 3;
+               
+               E e = (E) 4;
+               S s;
+               if (e == s)
+                       return 10;
+
+               if (s == e)
+                       return 11;
+
+               if (e > s)
+                       return 12;
+
+               if (s > e)
+                       return 13;
+
+               if ((s & e) != null)
+                       return 14;
+
+               if ((s & e) != null)
+                       return 15;
+
+               Console.WriteLine ("ok");
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-585.cs b/mcs/tests/gtest-585.cs
new file mode 100644 (file)
index 0000000..ff2a16c
--- /dev/null
@@ -0,0 +1,71 @@
+using System;
+
+struct S
+{
+       public static implicit operator int (S arg)
+       {
+               throw new ApplicationException ();
+       }
+}
+
+struct S2
+{
+       public static implicit operator int?(S2 arg)
+       {
+               return 10000;
+       }
+
+       public static implicit operator uint?(S2 arg)
+       {
+               throw new ApplicationException ();
+       }
+}
+
+public struct S3
+{
+       public static int counter;
+       
+       public static implicit operator string (S3 s3)
+       {
+               counter++;
+               return "";
+       }
+}
+
+class C
+{
+       public static int Main ()
+       {
+               S? s = null;
+               bool res = s > 1;
+               if (res)
+                       return 1;
+
+               S2 s2 = new S2 ();
+
+               var b = s2 >> 3;
+               if (b != 1250)
+                       return 2;
+
+               var b2 = s2 >> s2;
+               if (b2 != 0)
+                       return 3;
+
+               var b3 = s2 + 1;
+               if (b3 != 10001)
+                       return 4;
+
+               var s3 = new S3 ();
+               if ((s3 == null) != false)
+                       return 5;
+
+               if ((s3 != null) != true)
+                       return 6;
+               
+               if (S3.counter != 2)
+                       return 7;
+
+               Console.WriteLine ("ok");
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-586.cs b/mcs/tests/gtest-586.cs
new file mode 100644 (file)
index 0000000..6d01808
--- /dev/null
@@ -0,0 +1,98 @@
+using System;
+
+struct S
+{
+       public static bool operator == (S s, S i)
+       {
+               throw new ApplicationException ();
+       }
+
+       public static bool operator != (S s, S i)
+       {
+               throw new ApplicationException ();
+       }
+}
+
+struct S2
+{
+       public static int counter;
+
+       public static bool operator == (S2 s, S2 i)
+       {
+               counter++;
+               return true;
+       }
+
+       public static bool operator != (S2 s, S2 i)
+       {
+               throw new ApplicationException ();
+       }
+}
+
+
+struct S3
+{
+       public static int counter;
+
+       public static implicit operator int?(S3 arg)
+       {
+               counter++;
+               return null;
+       }
+}
+
+class C
+{
+       public static int Main ()
+       {
+               S? s = new S ();
+               S? s2 = null;
+               S? s4 = null;
+
+               if ((s == s2) != false)
+                       return 1;
+
+               if ((s2 == s) != false)
+                       return 2;
+
+               if ((s2 == s4) != true)
+                       return 3;
+
+               S x = new S ();
+
+               if ((s2 == x) != false)
+                       return 5;
+
+               if ((x == s2) != false)
+                       return 6;
+
+               S2? s2_1 = new S2 ();
+               S2? s2_3 = new S2 ();
+               S2 x2 = new S2 ();
+
+               if ((s2_1 == s2_3) != true)
+                       return 7;
+
+               if ((s2_1 == x2) != true)
+                       return 8;
+
+               if ((x2 == s2_1) != true)
+                       return 9;
+
+               if (S2.counter != 3)
+                       return 10;
+
+               S3 s3;
+
+               if ((s3 == null) != true)
+                       return 20;
+
+               if ((null == s3) != true)
+                       return 21;
+
+               if (S3.counter != 2)
+                       return 22;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-587.cs b/mcs/tests/gtest-587.cs
new file mode 100644 (file)
index 0000000..60484bd
--- /dev/null
@@ -0,0 +1,51 @@
+using System;
+
+struct S
+{
+       public static implicit operator string (S s)
+       {
+               return "1";
+       }
+
+       public static implicit operator short? (S s)
+       {
+               return 1;
+       }
+
+       public static implicit operator E (S s)
+       {
+               return 0;
+       }
+}
+
+public enum E
+{
+}
+
+class C
+{
+       public static int Main ()
+       {
+               E? e = 0;
+               const E e1 = (E)44;
+               var res = e == e1;
+               if (res != false)
+                       return 1;
+
+               res = e1 == e;
+               if (res != false)
+                       return 2;
+
+               E e2 = 0;
+               S s;
+               var res2 = e2 & s;
+               if (res2 != 0)
+                       return 3;
+
+               res2 = s & e2;
+               if (res2 != 0)
+                       return 4;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-588.cs b/mcs/tests/gtest-588.cs
new file mode 100644 (file)
index 0000000..efbc67e
--- /dev/null
@@ -0,0 +1,33 @@
+using System;
+
+struct S
+{
+       public static implicit operator short? (S s)
+       {
+               return 0;
+       }
+
+       public static implicit operator short (S s)
+       {
+               throw new ApplicationException ();
+       }
+}
+
+class Program
+{
+       public static int Main ()
+       {
+               S? s = null;
+               S? s2 = new S ();
+
+               long? i = s;
+               if (i != null)
+                       return 1;
+
+               double? ui = s2;
+               if (ui == null)
+                       return 2;
+
+               return 0;
+       }
+}
\ No newline at end of file
index 94a2f29f94c3facb31ef346cf4d9338dfffa16bb..d40bc9636d952ab34e08658c794aee43128d93b8 100644 (file)
@@ -22,6 +22,11 @@ struct Foo
        {
                throw new ApplicationException ();
        }
+       
+       public static Foo operator + (Foo d1, Foo d2)
+       {
+               throw new ApplicationException ();
+       }
 }
 
 class C
@@ -45,6 +50,10 @@ class C
                if (!e.Compile ().Invoke ())
                        return 4;
                
+               Expression<Func<Foo?>> e2 = () => f + null;
+               if (e2.Compile ().Invoke () != null)
+                       return 5;
+
                Console.WriteLine ("OK");
                return 0;
        }
diff --git a/mcs/tests/gtest-iter-29.cs b/mcs/tests/gtest-iter-29.cs
new file mode 100644 (file)
index 0000000..9276d02
--- /dev/null
@@ -0,0 +1,22 @@
+using System;
+using System.Linq;
+using System.Collections.Generic;
+
+public class Test
+{
+       public static int Main ()
+       {
+               var x = Test2 ();
+               if (x.Count () != 0)
+                       return 1;
+
+               Console.WriteLine ("ok");
+               return 0;
+       }
+
+       public static IEnumerable<int> Test2 ()
+       {
+               while (false)
+                       yield return 5;
+       }
+}
\ No newline at end of file
index c63250e13d554268818c7594ba9758ba8cb25ffc..526f238285fea10be61d84ad175f8618e6633a13 100644 (file)
@@ -14,10 +14,41 @@ class Test
        {
        }
 
+       [MethodImplAttribute((short)MethodImplOptions.Synchronized)]
+       public void test2 ()
+       {
+       }
+
+       [MethodImplAttribute((byte)32)]
+       public void test3 ()
+       {
+       }
+
+       [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
+       public void test4 ()
+       {
+       }
+
        public static int Main ()
        {
-               MethodImplAttributes iflags = typeof (Test).GetMethod ("test").GetMethodImplementationFlags ();
-               return ((iflags & MethodImplAttributes.Synchronized) != 0 ? 0 : 1);
+               MethodImplAttributes iflags;
+               iflags = typeof (Test).GetMethod ("test").GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.Synchronized) == 0)
+                       return 1;
+
+               iflags = typeof (Test).GetMethod ("test2").GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.Synchronized) == 0)
+                       return 2;
+
+               iflags = typeof (Test).GetMethod ("test3").GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.Synchronized) == 0)
+                       return 3;
+
+               iflags = typeof (Test).GetMethod ("test3").GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.Synchronized) == 0)
+                       return 4;
+
+               return 0;
        }
 }
                
index fe9b37174e837bc68eae74c2956985b7fbc5a76b..c49949b239ac575543d245d6b734788fd7c941be 100644 (file)
@@ -1,11 +1,42 @@
-class T {
-       public static int Main ()
+class Test
+{
+       static int test1 ()
        {
-               switch (1) {
-               case 1:
-                       return 0;
-               default:
-                       break;
+               var s = "Nice";
+               switch (s) {
+               case "HI":
+                       const string x = "Nice";
+                       return 1;
+               case x:
+                       return 2;
                }
+
+               return 3;
        }
-}
+
+       public const string xx = "Not";
+       static int test2 ()
+       {
+               var s = "Nice";
+               switch (s) {
+               case "HI":
+                       const string xx = "Nice";
+                       return 1;
+               case xx:
+                       return 2;
+               }
+
+               return 3;
+       }
+
+       static int Main ()
+       {
+               if (test1 () != 2)
+                       return 1;
+
+               if (test2 () != 2)
+                       return 2;
+
+               return 0;
+       }
+}
\ No newline at end of file
index e101c7b42df1cb4a680bd1be877406c9d920e813..b8f012ee9a2e598b4daf58cba07391494669f1fc 100644 (file)
@@ -93,6 +93,20 @@ class Test
                };
        }
 
+       static Func<T> Catch_2<T> (T t) where T : Exception
+       {
+               T l = t;
+               return () => {
+                       try {
+                               throw new NotSupportedException ();
+                       } catch (T e) {
+                               return l;
+                       } catch {
+                               throw new ApplicationException ("Should not be reached");
+                       }
+               };
+       }
+
        static Func<T> Finally<T> (T t)
        {
                T l = t;
@@ -199,6 +213,11 @@ class Test
                if (t5 () != 3)
                        return 5;
 
+               var ex = new NotSupportedException ();
+               var t5_2 = Catch_2 (ex);
+               if (t5_2 () != ex)
+                       return 52;
+
                var t6 = Finally (5);
                if (t6 () != 0)
                        return 6;
diff --git a/mcs/tests/test-anon-171.cs b/mcs/tests/test-anon-171.cs
new file mode 100644 (file)
index 0000000..ff084d4
--- /dev/null
@@ -0,0 +1,52 @@
+using System;
+
+namespace TestAnonSwitch
+{
+       public class MyClass
+       {
+               public event EventHandler<EventArgs> FirstEvent;
+               public event EventHandler<EventArgs> SecondEvent;
+
+               public void Trigger ()
+               {
+                       if (FirstEvent != null)
+                               FirstEvent (this, EventArgs.Empty);
+               }
+       }
+
+       public class Tester
+       {
+               MyClass myobj;
+
+               public void Test ()
+               {
+                       myobj = new MyClass ();
+                       var something = "key";
+
+                       switch (something) {
+                       case "key":
+                               myobj.FirstEvent += (sender, e) => {
+                                       Console.WriteLine ("FirstEvent: {0}", myobj);
+                               };
+                               break;
+                       case "somethingelse":
+                               bool? woot = null;
+                               myobj.SecondEvent += (sender, e) => {
+                                       Console.WriteLine ("woot {0}", woot);
+                               };
+                               break;
+                       }
+
+                       myobj.Trigger ();
+               }
+       }
+
+       class MainClass
+       {
+               public static void Main ()
+               {
+                       var tester = new Tester ();
+                       tester.Test ();
+               }
+       }
+}
diff --git a/mcs/tests/test-async-42.cs b/mcs/tests/test-async-42.cs
new file mode 100644 (file)
index 0000000..bb2dee6
--- /dev/null
@@ -0,0 +1,45 @@
+using System;
+using System.Threading.Tasks;
+
+class A
+{
+       public Task<int> OpenAsync ()
+       {
+               return Task.FromResult (0);
+       }
+}
+
+class C
+{
+       public static int Main ()
+       {
+               var c = new C ();
+               return c.Foo ().Result;
+       }
+
+       public A Connection
+       {
+               get
+               {
+                       return new A ();
+               }
+       }
+
+       async Task<int> Foo ()
+       {
+               {
+                       await Test (
+                               async () => {
+                                       await Connection.OpenAsync ();
+                               });
+               }
+
+               return 0;
+       }
+
+       T Test<T> (Func<T> func)
+       {
+               return func ();
+       }
+}
+
diff --git a/mcs/tests/test-async-47.cs b/mcs/tests/test-async-47.cs
new file mode 100644 (file)
index 0000000..4b6af22
--- /dev/null
@@ -0,0 +1,39 @@
+using System;
+
+class C
+{
+       public static void Main ()
+       {
+               new C ().Test ();
+       }
+
+       void Test ()
+       {
+               var v = new View ();
+               v.Click += async (o, e) => {
+                       var b = new Builder ();
+                       b.SetButton (() => {
+                               Console.WriteLine (this);
+                       });
+               };
+               v.Run ();
+       }
+}
+
+class View
+{
+       public event EventHandler Click;
+
+       public void Run ()
+       {
+               Click (null, null);
+       }
+}
+
+class Builder
+{
+       public void SetButton (Action h)
+       {
+               h ();
+       }
+}
diff --git a/mcs/tests/test-async-48.cs b/mcs/tests/test-async-48.cs
new file mode 100644 (file)
index 0000000..a0aefb1
--- /dev/null
@@ -0,0 +1,21 @@
+using System.Threading.Tasks;
+using System;
+
+public class App
+{
+       X _x = new X ();
+
+       public async Task Test ()
+       {
+               await Task.Run (new Func<Task> (async () => _x.ToString ()));
+       }
+}
+
+class X
+{
+       public static void Main ()
+       {
+               var app = new App ();
+               app.Test ().Wait ();
+       }
+}
index 5d0b5d1f2160c244ce54c149abc20b19282bf9bc..e524e16c29691075f28efacba9c305eb0e41f7ba 100644 (file)
       </sequencepoints>
       <locals />
       <scopes>
-        <entry index="0" start="0x22" end="0x3c" />
+        <entry index="0" start="0x1" end="0x3c" />
         <entry index="1" start="0x28" end="0x2d" />
       </scopes>
     </method>
       </sequencepoints>
       <locals />
       <scopes>
-        <entry index="0" start="0x28" end="0x38" />
+        <entry index="0" start="0x15" end="0x38" />
         <entry index="1" start="0x2e" end="0x33" />
       </scopes>
     </method>
       </sequencepoints>
       <locals />
       <scopes>
-        <entry index="0" start="0xb3" end="0xd2" />
+        <entry index="0" start="0x1" end="0xd2" />
         <entry index="1" start="0xb9" end="0xbe" />
       </scopes>
     </method>
       </sequencepoints>
       <locals />
       <scopes>
-        <entry index="0" start="0x2c" end="0x3b" />
+        <entry index="0" start="0x1" end="0x3b" />
       </scopes>
     </method>
     <method token="0x600000f">
index 31f23f6ed82f64e17c822aeb0c08d62207014a20..7ed9370e03d42cf8096ee9e63f7cf0e87e99cdff 100644 (file)
@@ -41,7 +41,7 @@
     </type>\r
     <type name="Test">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>1216</size>\r
+        <size>1292</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Void Assert[T](T, T, System.String)" attrs="145">\r
         <size>99</size>\r
       </method>\r
-      <method name="Void Assert[T](IList`1, IList`1, System.String)" attrs="145">\r
-        <size>257</size>\r
-      </method>\r
       <method name="Void AssertArgument(System.Runtime.CompilerServices.CallSiteBinder, Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo[], System.String)" attrs="145">\r
         <size>172</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Tester">\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
+    </type>\r
   </test>\r
   <test name="dtest-004.cs">\r
     <type name="G`1[T]">\r
       <method name="Int32 ConvertImplicitReturnTest()" attrs="129">\r
         <size>83</size>\r
       </method>\r
-      <method name="IEnumerable`1 ConvertImplicitReturnTest_2()" attrs="129">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void ConvertExplicitTest()" attrs="129">\r
         <size>503</size>\r
       </method>\r
       <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>154</size>\r
       </method>\r
       <method name="Void Reset()" attrs="486">\r
         <size>6</size>\r
       </method>\r
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
+        <size>14</size>\r
+      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Int32 &lt;&gt;m__3()" attrs="131">\r
         <size>81</size>\r
       </method>\r
-      <method name="Nullable`1 &lt;&gt;m__4()" attrs="131">\r
-        <size>81</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="System.Collections.Generic.IEnumerable`1[System.String] ConvertImplicitReturnTest_2()" attrs="129">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;ConvertImplicitReturnTest_2&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;ConvertExplicitCheckedTest&gt;c__AnonStorey3">\r
+      <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__4()" attrs="131">\r
+        <size>81</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-007.cs">\r
     <type name="D">\r
       </method>\r
     </type>\r
     <type name="DynamicAssignments">\r
-      <method name="Void Foo(IA`1)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>192</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void Foo(IA`1[System.Object])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="dtest-018.cs">\r
       </method>\r
     </type>\r
     <type name="C+&lt;Main&gt;c__DynamicSite1+Container0">\r
-      <method name="System.Object Invoke(System.Runtime.CompilerServices.CallSite, Nullable`1 ByRef, System.Object)" attrs="454">\r
-        <size>0</size>\r
-      </method>\r
       <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="C+&lt;Main&gt;c__DynamicSite1+Container0">\r
+      <method name="System.Object Invoke(System.Runtime.CompilerServices.CallSite, System.Nullable`1[System.Int32] ByRef, System.Object)" attrs="454">\r
+        <size>0</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-026.cs">\r
     <type name="C">\r
       <method name="Void M3[T,U](T, A`1[U])" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void M4[T,U](T, IEquatable`1)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>577</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void M4[T,U](T, System.IEquatable`1[U])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="dtest-031.cs">\r
   </test>\r
   <test name="dtest-040.cs">\r
     <type name="A">\r
-      <method name="S`2 Foo[U](U)" attrs="454">\r
-        <size>18</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="B">\r
-      <method name="S`2 Foo[T](T)" attrs="198">\r
-        <size>38</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="A">\r
+      <method name="S`2[U,System.Object] Foo[U](U)" attrs="454">\r
+        <size>18</size>\r
+      </method>\r
+    </type>\r
+    <type name="B">\r
+      <method name="S`2[T,System.Object] Foo[T](T)" attrs="198">\r
+        <size>38</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-041.cs">\r
     <type name="A`1[AA]">\r
   </test>\r
   <test name="dtest-044.cs">\r
     <type name="C">\r
-      <method name="Int32 Test[T,U](T, IComparable`1)" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 Test_2[T](IList`1, T)" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>868</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Int32 Test[T,U](T, System.IComparable`1[U])" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 Test_2[T](System.Collections.Generic.IList`1[T], T)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="dtest-045.cs">\r
       <method name="Void CLSCompliantMethod(System.Object[])" attrs="134">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void CLSCompliantMethod(IEnumerable`1)" attrs="134">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void CLSCompliantMethod(System.Collections.Generic.IEnumerable`1[System.Object])" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="dtest-collectioninit-01.cs">\r
   </test>\r
   <test name="dtest-iter-01.cs">\r
     <type name="Program">\r
-      <method name="IEnumerable`1 D1()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
-      <method name="IEnumerable`1 D2()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;dynamic&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>26</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;System.Func&lt;dynamic&gt;&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>26</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Program">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Object] D1()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Func`1[System.Object]] D2()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Program+&lt;D1&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;dynamic&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="Program+&lt;D2&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Func`1[System.Object]] System.Collections.Generic.IEnumerable&lt;System.Func&lt;dynamic&gt;&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="dtest-named-01.cs">\r
     <type name="Test">\r
   </test>\r
   <test name="gtest-032.cs">\r
     <type name="X">\r
-      <method name="Void Test(Bar`2)" attrs="145">\r
-        <size>25</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
+      <method name="Void Test(Bar`2[System.Int32,System.String])" attrs="145">\r
+        <size>25</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-033.cs">\r
     <type name="X">\r
-      <method name="Void Test(Bar`3)" attrs="145">\r
-        <size>36</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
+      <method name="Void Test(Bar`3[System.Int64,System.Int32,System.String])" attrs="145">\r
+        <size>36</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-034.cs">\r
       <method name="T get_Name()" attrs="2182">\r
         <size>15</size>\r
       </method>\r
-      <method name="IMonkey`1 GetTheMonkey[U](U)" attrs="134">\r
-        <size>16</size>\r
-      </method>\r
       <method name="Void .ctor(T)" attrs="6278">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Zoo`1[T]">\r
+      <method name="IMonkey`1[U] GetTheMonkey[U](U)" attrs="134">\r
+        <size>16</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-040.cs">\r
     <type name="Stack`1[T]">\r
-      <method name="INode`1 GetNode()" attrs="134">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Stack`1+Foo`1[T,T] GetFoo(T)" attrs="134">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Stack`1[T]">\r
+      <method name="INode`1[T] GetNode()" attrs="134">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-041.cs">\r
     <type name="Stack`1[T]">\r
       <method name="Void Print(T)" attrs="486">\r
         <size>18</size>\r
       </method>\r
-      <method name="IHello`1 Test[U]()" attrs="486">\r
-        <size>14</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="Hello`1[T]">\r
+      <method name="IHello`1[U] Test[U]()" attrs="486">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-058.cs">\r
     <type name="Foo">\r
   </test>\r
   <test name="gtest-062.cs">\r
     <type name="X">\r
-      <method name="IEnumerable`1 Test(Int32, Int64)" attrs="134">\r
-        <size>44</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>95</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>116</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test(Int32, Int64)" attrs="134">\r
+        <size>44</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;Test&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-063.cs">\r
     <type name="Test">\r
   </test>\r
   <test name="gtest-064.cs">\r
     <type name="Foo`1[T]">\r
-      <method name="IHello`1 IFoo&lt;T&gt;.GetHello()" attrs="481">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Foo`1+Hello[T] GetHello()" attrs="134">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Foo`1[T]">\r
+      <method name="IHello`1[T] IFoo&lt;T&gt;.GetHello()" attrs="481">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-065.cs">\r
     <type name="ComparablePair`2[T,U]">\r
-      <method name="Int32 CompareTo(ComparablePair`2)" attrs="486">\r
-        <size>76</size>\r
-      </method>\r
-      <method name="Boolean Equals(ComparablePair`2)" attrs="134">\r
-        <size>81</size>\r
-      </method>\r
       <method name="System.String ToString()" attrs="198">\r
         <size>72</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="ComparablePair`2[T,U]">\r
+      <method name="Int32 CompareTo(ComparablePair`2[T,U])" attrs="486">\r
+        <size>76</size>\r
+      </method>\r
+      <method name="Boolean Equals(ComparablePair`2[T,U])" attrs="134">\r
+        <size>81</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-066.cs">\r
     <type name="Foo`1[T]">\r
   </test>\r
   <test name="gtest-069.cs">\r
     <type name="Test`1[T]">\r
-      <method name="Int32 Foo(IFoo`1)" attrs="134">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Int32 Foo(IFoo)" attrs="134">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test`1[T]">\r
+      <method name="Int32 Foo(IFoo`1[T])" attrs="134">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-070.cs">\r
     <type name="Martin.Test`1[T]">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>15</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
-        <size>15</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="MyList`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-074.cs">\r
     <type name="Foo`1[T]">\r
       </method>\r
     </type>\r
     <type name="Test`1[T]">\r
-      <method name="Foo`1 GetFoo(T)" attrs="134">\r
-        <size>15</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="Test`1[T]">\r
+      <method name="Foo`1[T] GetFoo(T)" attrs="134">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-078.cs">\r
     <type name="S">\r
   </test>\r
   <test name="gtest-080.cs">\r
     <type name="Test">\r
-      <method name="Void Hello[T](IFoo`1)" attrs="134">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Void InsertAll[U](IFoo`1)" attrs="134">\r
-        <size>2</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="Test">\r
+      <method name="Void Hello[T](IFoo`1[T])" attrs="134">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="Void InsertAll[U](IFoo`1[U])" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-081.cs">\r
     <type name="ArrayList`1[T]">\r
   </test>\r
   <test name="gtest-084.cs">\r
     <type name="HasherBuilder.ByPrototype`1[S]">\r
-      <method name="IHasher`1 Examine()" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="ArrayList`1[U]">\r
-      <method name="IHasher`1 GetHasher()" attrs="134">\r
-        <size>14</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
-  </test>\r
-  <test name="gtest-085.cs">\r
-    <type name="ArrayList`1[T]">\r
-      <method name="Int32 InsertAll(IFoo`1)" attrs="454">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Int32 InsertAll[U](IFoo`1)" attrs="454">\r
+    <type name="HasherBuilder.ByPrototype`1[S]">\r
+      <method name="IHasher`1[S] Examine()" attrs="150">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 AddAll(IFoo`1)" attrs="454">\r
-        <size>16</size>\r
+    </type>\r
+    <type name="ArrayList`1[U]">\r
+      <method name="IHasher`1[U] GetHasher()" attrs="134">\r
+        <size>14</size>\r
       </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-085.cs">\r
+    <type name="ArrayList`1[T]">\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-  </test>\r
-  <test name="gtest-086.cs">\r
     <type name="ArrayList`1[T]">\r
-      <method name="Int32 InsertAll(IFoo`1)" attrs="454">\r
+      <method name="Int32 InsertAll(IFoo`1[T])" attrs="454">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 InsertAll[U](IFoo`1)" attrs="454">\r
+      <method name="Int32 InsertAll[U](IFoo`1[U])" attrs="454">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 AddAll(IFoo`1)" attrs="454">\r
+      <method name="Int32 AddAll(IFoo`1[T])" attrs="454">\r
         <size>16</size>\r
       </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-086.cs">\r
+    <type name="ArrayList`1[T]">\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="ArrayList`1[T]">\r
+      <method name="Int32 InsertAll(IFoo`1[T])" attrs="454">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 InsertAll[U](IFoo`1[U])" attrs="454">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 AddAll(IFoo`1[T])" attrs="454">\r
+        <size>16</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-087.cs">\r
     <type name="C5.HashedArrayList`1[T]">\r
   </test>\r
   <test name="gtest-095.cs">\r
     <type name="GuardedCollectionValue`1[T]">\r
-      <method name="IDirectedEnumerable`1 IDirectedEnumerable&lt;T&gt;.Backwards()" attrs="481">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="IDirectedCollectionValue`1 Backwards()" attrs="486">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="GuardedSequenced`1[T]">\r
-      <method name="IDirectedCollectionValue`1 Test()" attrs="134">\r
-        <size>20</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="GuardedCollectionValue`1[T]">\r
+      <method name="IDirectedEnumerable`1[T] IDirectedEnumerable&lt;T&gt;.Backwards()" attrs="481">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="IDirectedCollectionValue`1[T] Backwards()" attrs="486">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="GuardedSequenced`1[T]">\r
+      <method name="IDirectedCollectionValue`1[T] Test()" attrs="134">\r
+        <size>20</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-096.cs">\r
     <type name="Foo`1[T]">\r
       </method>\r
     </type>\r
     <type name="Hello">\r
-      <method name="Void World[U](U, IFoo`1)" attrs="134">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void World[V](IFoo`1)" attrs="134">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void Test(Foo)" attrs="134">\r
         <size>21</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Hello">\r
+      <method name="Void World[U](U, IFoo`1[U])" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void World[V](IFoo`1[V])" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-104.cs">\r
     <type name="MainClass">\r
       </method>\r
     </type>\r
     <type name="A.KeyValuePairComparer`2[K,V]">\r
-      <method name="Int32 Compare(KeyValuePair`2)" attrs="486">\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="A.KeyValuePairComparer`2[K,V]">\r
+      <method name="Int32 Compare(A.KeyValuePair`2[K,V])" attrs="486">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-106.cs">\r
     <type name="KeyValuePair`2[X,Y]">\r
       </method>\r
     </type>\r
     <type name="KeyValuePairComparer`2[K,V]">\r
-      <method name="Int32 Compare(KeyValuePair`2)" attrs="486">\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="KeyValuePairComparer`2[K,V]">\r
+      <method name="Int32 Compare(KeyValuePair`2[K,V])" attrs="486">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-107.cs">\r
     <type name="Mapper`2[T,V]">\r
   </test>\r
   <test name="gtest-108.cs">\r
     <type name="Test`1[T]">\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void .ctor(T)" attrs="6278">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="134">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-109.cs">\r
     <type name="X">\r
   </test>\r
   <test name="gtest-112.cs">\r
     <type name="IC">\r
-      <method name="Void Compare(Foo`1)" attrs="486">\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="List`1[T]">\r
-      <method name="Void Sort(IComparer`1, T)" attrs="454">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Sorting">\r
-      <method name="Void IntroSort[T](IComparer`1, T)" attrs="150">\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="IC">\r
+      <method name="Void Compare(Foo`1[System.Int32])" attrs="486">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
+    <type name="List`1[T]">\r
+      <method name="Void Sort(IComparer`1[T], T)" attrs="454">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
+    <type name="Sorting">\r
+      <method name="Void IntroSort[T](IComparer`1[T], T)" attrs="150">\r
+        <size>16</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-113.cs">\r
     <type name="Mapper`2[T,V]">\r
       <method name="LinkedList`1[T] op_Addition(LinkedList`1[T], LinkedList`1[T])" attrs="2198">\r
         <size>135</size>\r
       </method>\r
-      <method name="IMyList`1 Map[U](Mapper`2[T,U])" attrs="486">\r
-        <size>78</size>\r
-      </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>31</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="LinkedList`1[T]">\r
+      <method name="IMyList`1[U] Map[U](Mapper`2[T,U])" attrs="486">\r
+        <size>78</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-116.cs">\r
     <type name="Slow.Test">\r
       <method name="Int32 TestC()" attrs="150">\r
         <size>46</size>\r
       </method>\r
-      <method name="Boolean Check1(Nullable`1)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
       <method name="Boolean Check2[T](E)" attrs="145">\r
         <size>23</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Boolean Check1(System.Nullable`1[E])" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-118.cs">\r
       </method>\r
     </type>\r
     <type name="Sequenced`1[T]">\r
-      <method name="Boolean Equals(ISequenced`1)" attrs="486">\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="Sequenced`1[T]">\r
+      <method name="Boolean Equals(ISequenced`1[T])" attrs="486">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-121.cs">\r
     <type name="B`1[T]">\r
       </method>\r
     </type>\r
     <type name="M">\r
-      <method name="System.Collections.Generic.List`1[T] foo1[T](Filter`1)" attrs="145">\r
-        <size>46</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>46</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.List`1[T] foo1[T](Filter`1[T])" attrs="145">\r
+        <size>46</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-127.cs">\r
   <test name="gtest-130.cs">\r
     <type name="MyTest">\r
       <method name="Void Main(System.String[])" attrs="150">\r
-        <size>938</size>\r
+        <size>908</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   <test name="gtest-131.cs">\r
     <type name="MyTest">\r
       <method name="Void Main(System.String[])" attrs="150">\r
-        <size>1332</size>\r
+        <size>1300</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   </test>\r
   <test name="gtest-132.cs">\r
     <type name="MyTest">\r
-      <method name="Nullable`1 Sqrt(Nullable`1)" attrs="150">\r
-        <size>68</size>\r
-      </method>\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>64</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Nullable`1[System.Int32] Sqrt(System.Nullable`1[System.Int32])" attrs="150">\r
+        <size>68</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-133.cs">\r
   <test name="gtest-137.cs">\r
     <type name="X">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>158</size>\r
+        <size>240</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   <test name="gtest-138.cs">\r
     <type name="X">\r
       <method name="Void Main()" attrs="150">\r
-        <size>62</size>\r
+        <size>102</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
     </type>\r
   </test>\r
   <test name="gtest-139.cs">\r
+    <type name="Test">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>78</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
     <type name="MyStruct">\r
-      <method name="Int32 op_Inequality(Nullable`1, System.String)" attrs="2198">\r
+      <method name="Int32 op_Inequality(System.Nullable`1[MyStruct], System.String)" attrs="2198">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 op_Equality(Nullable`1, System.String)" attrs="2198">\r
+      <method name="Int32 op_Equality(System.Nullable`1[MyStruct], System.String)" attrs="2198">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 op_Inequality(System.String, Nullable`1)" attrs="2198">\r
+      <method name="Int32 op_Inequality(System.String, System.Nullable`1[MyStruct])" attrs="2198">\r
         <size>11</size>\r
       </method>\r
-      <method name="Int32 op_Equality(System.String, Nullable`1)" attrs="2198">\r
+      <method name="Int32 op_Equality(System.String, System.Nullable`1[MyStruct])" attrs="2198">\r
         <size>10</size>\r
       </method>\r
     </type>\r
-    <type name="Test">\r
-      <method name="Int32 Main()" attrs="150">\r
-        <size>78</size>\r
-      </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
-    </type>\r
   </test>\r
   <test name="gtest-140.cs">\r
     <type name="X">\r
       <method name="Void IsFalse(System.String, Boolean)" attrs="150">\r
         <size>19</size>\r
       </method>\r
-      <method name="Void IsNull[T](System.String, Nullable`1)" attrs="150">\r
-        <size>25</size>\r
-      </method>\r
-      <method name="Void IsNotNull[T](System.String, Nullable`1)" attrs="150">\r
-        <size>25</size>\r
-      </method>\r
-      <method name="Void IsTrue(System.String, Nullable`1)" attrs="150">\r
-        <size>37</size>\r
-      </method>\r
-      <method name="Void IsFalse(System.String, Nullable`1)" attrs="150">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Void .cctor()" attrs="6289">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="X">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>2253</size>\r
+        <size>2163</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Assert">\r
+      <method name="Void IsNull[T](System.String, System.Nullable`1[T])" attrs="150">\r
+        <size>25</size>\r
+      </method>\r
+      <method name="Void IsNotNull[T](System.String, System.Nullable`1[T])" attrs="150">\r
+        <size>25</size>\r
+      </method>\r
+      <method name="Void IsTrue(System.String, System.Nullable`1[System.Boolean])" attrs="150">\r
+        <size>37</size>\r
+      </method>\r
+      <method name="Void IsFalse(System.String, System.Nullable`1[System.Boolean])" attrs="150">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-143.cs">\r
     <type name="X">\r
       <method name="Int32 Index()" attrs="145">\r
         <size>34</size>\r
       </method>\r
-      <method name="Nullable`1 get_Item(Int32)" attrs="2177">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Void set_Item(Int32, Nullable`1)" attrs="2177">\r
-        <size>9</size>\r
-      </method>\r
       <method name="Int32 Test()" attrs="145">\r
-        <size>1157</size>\r
+        <size>1276</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>38</size>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Nullable`1[System.Int32] get_Item(Int32)" attrs="2177">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Void set_Item(Int32, System.Nullable`1[System.Int32])" attrs="2177">\r
+        <size>9</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-144.cs">\r
       <method name="IFoo IFoo.Hello()" attrs="481">\r
         <size>15</size>\r
       </method>\r
-      <method name="IFoo`1 Hello()" attrs="1478">\r
-        <size>0</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6276">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="HashBag`1[T]">\r
-      <method name="IFoo`1 Hello()" attrs="198">\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="EnumerableBase`1[T]">\r
+      <method name="IFoo`1[T] Hello()" attrs="1478">\r
+        <size>0</size>\r
+      </method>\r
+    </type>\r
+    <type name="HashBag`1[T]">\r
+      <method name="IFoo`1[T] Hello()" attrs="198">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-153.cs">\r
     <type name="MyClass`1[T]">\r
   </test>\r
   <test name="gtest-163.cs">\r
     <type name="Foo`1[T]">\r
-      <method name="IEnumerator`1 getEnumerator(Int32)" attrs="134">\r
-        <size>22</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="Foo`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] getEnumerator(Int32)" attrs="134">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-164.cs">\r
     <type name="Int2Int">\r
       </method>\r
     </type>\r
     <type name="FunEnumerable">\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void .ctor(Int32, Int2Int)" attrs="6278">\r
         <size>22</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="FunEnumerable">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] GetEnumerator()" attrs="134">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-165.cs">\r
     <type name="C">\r
       </method>\r
     </type>\r
     <type name="X`1[T]">\r
-      <method name="IEnumerator`1 Y(IEnumerable`1)" attrs="150">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] Y(System.Collections.Generic.IEnumerable`1[T])" attrs="150">\r
         <size>15</size>\r
       </method>\r
-      <method name="T Z(IList`1, Int32)" attrs="150">\r
+      <method name="T Z(System.Collections.Generic.IList`1[T], Int32)" 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-178.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>168</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-182.cs">\r
   </test>\r
   <test name="gtest-183.cs">\r
     <type name="test.Test`1[T]">\r
-      <method name="IEnumerable`1 Lookup(T)" attrs="134">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>91</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="test.Test`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Lookup(T)" attrs="134">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="test.Test`1+&lt;Lookup&gt;c__Iterator0[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-184.cs">\r
     <type name="X">\r
     </type>\r
   </test>\r
   <test name="gtest-191.cs">\r
-    <type name="Test1.Test">\r
-      <method name="IEnumerable`1 Replace[T]()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
-    </type>\r
     <type name="Test2.Test`1[S]">\r
-      <method name="IEnumerable`1 Replace[T]()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Test3.Test`1[S]">\r
-      <method name="IEnumerable`1 Replace[T](IEnumerable`1, IEnumerable`1)" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Test4.Test">\r
-      <method name="IEnumerable`1 Replace[T]()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Test5.Test">\r
-      <method name="IEnumerable`1 Replace[T](T)" attrs="150">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Test6.Test">\r
-      <method name="IEnumerable`1 Replace[T](T)" attrs="150">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Test7.Test">\r
-      <method name="IEnumerable`1 Replace[T](T[])" attrs="150">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>26</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>26</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="Test3.Test`1+&lt;Replace&gt;c__Iterator2`1[S,T]">\r
-      <method name="KeyValuePair`2 System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.get_Current()" attrs="2529">\r
-        <size>14</size>\r
-      </method>\r
       <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
         <size>19</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>26</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>26</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>77</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>89</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T[]&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>89</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test1.Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test2.Test`1[S]">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test3.Test`1[S]">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Collections.Generic.KeyValuePair`2[S,T]] Replace[T](System.Collections.Generic.IEnumerable`1[T], System.Collections.Generic.IEnumerable`1[S])" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test4.Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test5.Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T](T)" attrs="150">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test6.Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T](T)" attrs="150">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test7.Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T[]] Replace[T](T[])" attrs="150">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test1.Test+&lt;Replace&gt;c__Iterator0`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test2.Test`1+&lt;Replace&gt;c__Iterator1`1[S,T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test3.Test`1+&lt;Replace&gt;c__Iterator2`1[S,T]">\r
+      <method name="System.Collections.Generic.KeyValuePair`2[S,T] System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.get_Current()" attrs="2529">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[S,T]] System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test4.Test+&lt;Replace&gt;c__Iterator3`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test5.Test+&lt;Replace&gt;c__Iterator4`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test6.Test+&lt;Replace&gt;c__Iterator5`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test7.Test+&lt;Replace&gt;c__Iterator6`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T[]] System.Collections.Generic.IEnumerable&lt;T[]&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-192.cs">\r
     <type name="xX">\r
   </test>\r
   <test name="gtest-193.cs">\r
     <type name="OrderedMultiDictionary`2[T,U]">\r
-      <method name="IEnumerator`1 EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">\r
-        <size>29</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="RedBlackTree`1[S]">\r
-      <method name="IEnumerable`1 EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;S&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>26</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-  </test>\r
-  <test name="gtest-194.cs">\r
+    <type name="OrderedMultiDictionary`2[T,U]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">\r
+        <size>29</size>\r
+      </method>\r
+    </type>\r
     <type name="RedBlackTree`1[S]">\r
-      <method name="IEnumerable`1 EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">\r
+      <method name="System.Collections.Generic.IEnumerable`1[S] EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">\r
         <size>23</size>\r
       </method>\r
+    </type>\r
+    <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator1[S]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[S] System.Collections.Generic.IEnumerable&lt;S&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-194.cs">\r
+    <type name="RedBlackTree`1[S]">\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="OrderedMultiDictionary`2[T,U]">\r
-      <method name="IEnumerator`1 EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">\r
-        <size>29</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;S&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>26</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="RedBlackTree`1[S]">\r
+      <method name="System.Collections.Generic.IEnumerable`1[S] EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="OrderedMultiDictionary`2[T,U]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">\r
+        <size>29</size>\r
+      </method>\r
+    </type>\r
+    <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator0[S]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[S] System.Collections.Generic.IEnumerable&lt;S&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-195.cs">\r
     <type name="OrderedMultiDictionary`2[T,U]">\r
       <method name="Int64 Test()" attrs="134">\r
         <size>15</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void .ctor(Int64)" attrs="6278">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="HashSet`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int64] GetEnumerator()" attrs="134">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-202.cs">\r
     <type name="Generic`1[T]">\r
       <method name="Ret Foo()" attrs="454">\r
         <size>10</size>\r
       </method>\r
-      <method name="Ret`1 Foo[T]()" attrs="454">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
       <method name="Ret Foo()" attrs="198">\r
         <size>10</size>\r
       </method>\r
-      <method name="Ret`1 Foo[T]()" attrs="198">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="BaseClass">\r
+      <method name="Ret`1[T] Foo[T]()" attrs="454">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="DerivedClass">\r
+      <method name="Ret`1[T] Foo[T]()" attrs="198">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-217.cs">\r
     <type name="Fun`2[A1,R]">\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>99</size>\r
       </method>\r
-      <method name="IEnumerable`1 Map[Aa,Af,Rf,Rr](Fun`2[Af,Rf], IEnumerable`1)" attrs="150">\r
-        <size>37</size>\r
-      </method>\r
-      <method name="IEnumerable`1 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="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Rr&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>215</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>125</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="MyTest">\r
+      <method name="System.Collections.Generic.IEnumerable`1[Rr] Map[Aa,Af,Rf,Rr](Fun`2[Af,Rf], System.Collections.Generic.IEnumerable`1[Aa])" attrs="150">\r
+        <size>37</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] FromTo(Int32, Int32)" attrs="150">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+    <type name="MyTest+&lt;Map&gt;c__Iterator0`4[Aa,Af,Rf,Rr]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[Rr] System.Collections.Generic.IEnumerable&lt;Rr&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
+    <type name="MyTest+&lt;FromTo&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-218.cs">\r
     <type name="Foo">\r
   </test>\r
   <test name="gtest-225.cs">\r
     <type name="Set`1[Element]">\r
-      <method name="Locator locate(Element)" attrs="132">\r
-        <size>39</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>8</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Set`1[Element]">\r
+      <method name="Set`1+Locator[Element] locate(Element)" attrs="132">\r
+        <size>39</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-226.cs">\r
     <type name="Container`1[T]">\r
       <method name="IFoo GetFoo()" attrs="134">\r
         <size>15</size>\r
       </method>\r
-      <method name="IFoo`1 GetFooGeneric[T]()" attrs="134">\r
-        <size>10</size>\r
-      </method>\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
+      <method name="IFoo`1[T] GetFooGeneric[T]()" attrs="134">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-235.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>15</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="1478">\r
-        <size>0</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6276">\r
         <size>7</size>\r
       </method>\r
       <method name="Void raiseItemsAdded(T, Int32)" attrs="452">\r
         <size>2</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="1222">\r
-        <size>0</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6276">\r
         <size>7</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="CircularQueue`1[T]">\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="198">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void Enqueue(T)" attrs="454">\r
         <size>2</size>\r
       </method>\r
       <method name="Boolean searchoradd(T ByRef, Boolean, Boolean, Boolean)" attrs="129">\r
         <size>10</size>\r
       </method>\r
-      <method name="Void RemoveAll[U](IEnumerable`1)" attrs="454">\r
-        <size>8</size>\r
-      </method>\r
-      <method name="Void AddAll[U](IEnumerable`1)" attrs="454">\r
-        <size>65</size>\r
-      </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="198">\r
-        <size>15</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="EnumerableBase`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="1478">\r
+        <size>0</size>\r
+      </method>\r
+    </type>\r
+    <type name="CollectionValueBase`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="1222">\r
+        <size>0</size>\r
+      </method>\r
+    </type>\r
+    <type name="CircularQueue`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="198">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+    <type name="HashSet`1[T]">\r
+      <method name="Void RemoveAll[U](System.Collections.Generic.IEnumerable`1[U])" attrs="454">\r
+        <size>8</size>\r
+      </method>\r
+      <method name="Void AddAll[U](System.Collections.Generic.IEnumerable`1[U])" attrs="454">\r
+        <size>65</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="198">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-248.cs">\r
     <type name="Foo`1[T]">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>15</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" 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="ArrayBase`1[T]">\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="198">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6276">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="HashedArrayList`1[T]">\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="198">\r
-        <size>15</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="EnumerableBase`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="1478">\r
+        <size>0</size>\r
+      </method>\r
+    </type>\r
+    <type name="ArrayBase`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="198">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+    <type name="HashedArrayList`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="198">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-250.cs">\r
     <type name="Fun`2[R,S]">\r
       </method>\r
     </type>\r
     <type name="GuardedIndexedSorted`1[T]">\r
-      <method name="IIndexedSorted`1 Map[V](Fun`2[T,V])" attrs="486">\r
-        <size>21</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="GuardedIndexedSorted`1[T]">\r
+      <method name="IIndexedSorted`1[V] Map[V](Fun`2[T,V])" attrs="486">\r
+        <size>21</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-251.cs">\r
     <type name="SortedIndexedTester`1[T]">\r
-      <method name="Void Test(ISorted`1)" attrs="134">\r
-        <size>25</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="SortedIndexedTester`1[T]">\r
+      <method name="Void Test(ISorted`1[System.Int32])" attrs="134">\r
+        <size>25</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-252.cs">\r
     <type name="EqualityComparer`1[T]">\r
       </method>\r
     </type>\r
     <type name="Extensible`1[V]">\r
-      <method name="Void AddAll[W](IEnumerable`1)" attrs="486">\r
-        <size>2</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="Extensible`1[V]">\r
+      <method name="Void AddAll[W](System.Collections.Generic.IEnumerable`1[W])" attrs="486">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-254.cs">\r
     <type name="HashedLinkedList`1[T]">\r
   </test>\r
   <test name="gtest-256.cs">\r
     <type name="Test">\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>12</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.String] GetEnumerator()" attrs="134">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-257.cs">\r
     <type name="Tests">\r
       </method>\r
     </type>\r
     <type name="ConvertHelper">\r
-      <method name="IEnumerator`1 Test[S,T](S)" attrs="150">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="ConvertHelper">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] Test[S,T](S)" attrs="150">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-264.cs">\r
     <type name="BaseList`1[SubType]">\r
   </test>\r
   <test name="gtest-269.cs">\r
     <type name="IrishPub">\r
-      <method name="Int64 op_Implicit(Nullable`1)" attrs="2198">\r
-        <size>44</size>\r
-      </method>\r
-      <method name="Nullable`1 op_Implicit(Int64)" attrs="2198">\r
-        <size>21</size>\r
-      </method>\r
       <method name="Void .ctor(IrishBeer)" attrs="6278">\r
         <size>9</size>\r
       </method>\r
     </type>\r
     <type name="X">\r
-      <method name="Int32 Beer(Nullable`1)" attrs="145">\r
-        <size>72</size>\r
-      </method>\r
       <method name="Int64 PubToLong(IrishPub)" attrs="145">\r
         <size>20</size>\r
       </method>\r
-      <method name="Int32 Test(Nullable`1)" attrs="145">\r
-        <size>62</size>\r
-      </method>\r
-      <method name="Int32 TestWithNull(Nullable`1)" attrs="145">\r
-        <size>78</size>\r
-      </method>\r
-      <method name="Nullable`1 Foo(Boolean)" attrs="145">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Int32 Test(Boolean)" attrs="145">\r
         <size>72</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-  </test>\r
-  <test name="gtest-270.cs">\r
+    <type name="IrishPub">\r
+      <method name="Int64 op_Implicit(System.Nullable`1[IrishPub])" attrs="2198">\r
+        <size>44</size>\r
+      </method>\r
+      <method name="System.Nullable`1[IrishPub] op_Implicit(Int64)" attrs="2198">\r
+        <size>21</size>\r
+      </method>\r
+    </type>\r
     <type name="X">\r
-      <method name="Int32 Test(Nullable`1)" attrs="145">\r
+      <method name="Int32 Beer(System.Nullable`1[IrishPub])" attrs="145">\r
+        <size>72</size>\r
+      </method>\r
+      <method name="Int32 Test(System.Nullable`1[System.Int32])" attrs="145">\r
         <size>62</size>\r
       </method>\r
+      <method name="Int32 TestWithNull(System.Nullable`1[System.Int32])" attrs="145">\r
+        <size>78</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Int64] Foo(Boolean)" attrs="145">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-270.cs">\r
+    <type name="X">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>60</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Int32 Test(System.Nullable`1[System.Int32])" attrs="145">\r
+        <size>62</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-271.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>15</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
-        <size>15</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="Qux`2[X,V]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[V] GetEnumerator()" attrs="486">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-272.cs">\r
     <type name="Handler`1[T]">\r
       </method>\r
     </type>\r
     <type name="X">\r
-      <method name="Void Main()" attrs="150">\r
-        <size>448</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="S">\r
+      <method name="System.Nullable`1[System.Boolean] op_Implicit(S)" attrs="2198">\r
+        <size>12</size>\r
+      </method>\r
+    </type>\r
+    <type name="X">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>612</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-275.cs">\r
     <type name="Test">\r
       </method>\r
     </type>\r
     <type name="Tests+GenericClass`1[T]">\r
-      <method name="T Z(IList`1, Int32)" attrs="150">\r
-        <size>16</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="T Z(System.Collections.Generic.IList`1[T], Int32)" attrs="150">\r
+        <size>16</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-277.cs">\r
       <method name="Void Bar()" attrs="486">\r
         <size>12</size>\r
       </method>\r
-      <method name="IList`1 Bar[T]()" attrs="486">\r
-        <size>20</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="Foo">\r
+      <method name="System.Collections.Generic.IList`1[T] Bar[T]()" attrs="486">\r
+        <size>20</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-280.cs">\r
     <type name="Test">\r
   </test>\r
   <test name="gtest-281.cs">\r
     <type name="List">\r
-      <method name="Void AddRange[T](ICollection`1)" attrs="131">\r
-        <size>2</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="List">\r
+      <method name="Void AddRange[T](System.Collections.Generic.ICollection`1[T])" attrs="131">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-282.cs">\r
     <type name="Foo">\r
       </method>\r
     </type>\r
     <type name="CollectionTester">\r
-      <method name="Int32 Test[T](IList`1)" attrs="145">\r
-        <size>95</size>\r
-      </method>\r
       <method name="Int32 Test()" attrs="150">\r
         <size>628</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="CollectionTester">\r
+      <method name="Int32 Test[T](System.Collections.Generic.IList`1[T])" attrs="145">\r
+        <size>95</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-285.cs">\r
     <type name="A">\r
       <method name="Void Main()" attrs="150">\r
         <size>23</size>\r
       </method>\r
-      <method name="System.String Test2(Nullable`1)" 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.String Test2(System.Nullable`1[System.Decimal])" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-292.cs">\r
       <method name="Void Invalid(T)" attrs="134">\r
         <size>22</size>\r
       </method>\r
-      <method name="Void Other(IEnumerable`1)" attrs="134">\r
-        <size>2</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="Test`1[T]">\r
+      <method name="Void Other(System.Collections.Generic.IEnumerable`1[T])" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-294.cs">\r
     <type name="A">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>7</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>15</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="Test">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-303.cs">\r
     <type name="test.BaseClass">\r
   </test>\r
   <test name="gtest-310.cs">\r
     <type name="MonoBugs.IncompleteGenericInference">\r
-      <method name="Void DoSomethingGeneric[T1,T2](IEnumerable`1, IDictionary`2)" attrs="150">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>21</size>\r
       </method>\r
+      <method name="Void DoSomethingGeneric[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IDictionary`2[T1,T2])" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-312.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>15</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
-        <size>15</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="Temp`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[Temp`1+Foo[T]] GetEnumerator()" attrs="486">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-320.cs">\r
     <type name="Foo`1[K]">\r
   </test>\r
   <test name="gtest-330.cs">\r
     <type name="BaseCollection`1[T]">\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>25</size>\r
-      </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>25</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="BaseCollection`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>25</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-331.cs">\r
     <type name="Foo`1[T]">\r
       <method name="Void Main()" attrs="150">\r
         <size>14</size>\r
       </method>\r
-      <method name="Void Foo[T](IList`1)" attrs="145">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="FooList`1[T]">\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Int32 IndexOf(T)" attrs="486">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Void Foo[T](System.Collections.Generic.IList`1[T])" attrs="145">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="FooList`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-339.cs">\r
     <type name="Program">\r
       <method name="Void SerializeDictionary(IDictionary)" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void SerializeDictionary(IDictionary`2)" 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="SerializerLazyDictionary">\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="196">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Boolean System.Collections.Generic.IDictionary&lt;string,object&gt;.ContainsKey(System.String)" attrs="481">\r
         <size>7</size>\r
       </method>\r
-      <method name="ICollection`1 System.Collections.Generic.IDictionary&lt;string,object&gt;.get_Keys()" attrs="2529">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Boolean System.Collections.Generic.IDictionary&lt;string,object&gt;.Remove(System.String)" attrs="481">\r
         <size>7</size>\r
       </method>\r
       <method name="Boolean System.Collections.Generic.IDictionary&lt;string,object&gt;.TryGetValue(System.String, System.Object ByRef)" attrs="481">\r
         <size>7</size>\r
       </method>\r
-      <method name="ICollection`1 System.Collections.Generic.IDictionary&lt;string,object&gt;.get_Values()" attrs="2529">\r
-        <size>7</size>\r
-      </method>\r
       <method name="System.Object System.Collections.Generic.IDictionary&lt;string,object&gt;.get_Item(System.String)" attrs="2529">\r
         <size>7</size>\r
       </method>\r
       <method name="Void System.Collections.Generic.IDictionary&lt;string,object&gt;.set_Item(System.String, System.Object)" attrs="2529">\r
         <size>7</size>\r
       </method>\r
-      <method name="Void System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Add(KeyValuePair`2)" attrs="481">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Void System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Clear()" attrs="481">\r
         <size>7</size>\r
       </method>\r
-      <method name="Boolean System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Contains(KeyValuePair`2)" attrs="481">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Void System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.CopyTo(System.Collections.Generic.KeyValuePair`2[System.String,System.Object][], Int32)" attrs="481">\r
         <size>7</size>\r
       </method>\r
       <method name="Boolean System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.get_IsReadOnly()" attrs="2529">\r
         <size>7</size>\r
       </method>\r
-      <method name="Boolean System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Remove(KeyValuePair`2)" attrs="481">\r
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6276">\r
         <size>7</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.GetEnumerator()" attrs="481">\r
-        <size>15</size>\r
+    </type>\r
+    <type name="Program">\r
+      <method name="Void SerializeDictionary(System.Collections.Generic.IDictionary`2[System.String,System.Object])" attrs="145">\r
+        <size>2</size>\r
       </method>\r
-      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
-        <size>15</size>\r
+    </type>\r
+    <type name="SerializerLazyDictionary">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[System.String,System.Object]] GetEnumerator()" attrs="196">\r
+        <size>10</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="1476">\r
-        <size>0</size>\r
+    </type>\r
+    <type name="LazyDictionary">\r
+      <method name="System.Collections.Generic.ICollection`1[System.String] System.Collections.Generic.IDictionary&lt;string,object&gt;.get_Keys()" attrs="2529">\r
+        <size>7</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6276">\r
+      <method name="System.Collections.Generic.ICollection`1[System.Object] System.Collections.Generic.IDictionary&lt;string,object&gt;.get_Values()" attrs="2529">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Void System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Add(System.Collections.Generic.KeyValuePair`2[System.String,System.Object])" attrs="481">\r
         <size>7</size>\r
       </method>\r
+      <method name="Boolean System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Contains(System.Collections.Generic.KeyValuePair`2[System.String,System.Object])" attrs="481">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.Remove(System.Collections.Generic.KeyValuePair`2[System.String,System.Object])" attrs="481">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[System.String,System.Object]] System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.GetEnumerator()" attrs="481">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[System.String,System.Object]] GetEnumerator()" attrs="1476">\r
+        <size>0</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-340.cs">\r
       <method name="IEnumerable Enumerable(Int32)" attrs="134">\r
         <size>7</size>\r
       </method>\r
-      <method name="IEnumerable`1 Enumerable[T](System.String)" attrs="134">\r
-        <size>7</size>\r
-      </method>\r
       <method name="IEnumerable Enumerable(System.String)" attrs="134">\r
         <size>7</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Enumerable[T](System.String)" attrs="134">\r
+        <size>7</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-348.cs">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="S2">\r
-      <method name="Boolean op_Equality(S2, Nullable`1)" attrs="2198">\r
-        <size>7</size>\r
-      </method>\r
-      <method name="Boolean op_Inequality(S2, Nullable`1)" attrs="2198">\r
-        <size>7</size>\r
-      </method>\r
-    </type>\r
     <type name="S3">\r
       <method name="Decimal op_Inequality(S3, System.Object)" attrs="2198">\r
         <size>15</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="S2">\r
+      <method name="Boolean op_Equality(S2, System.Nullable`1[S2])" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean op_Inequality(S2, System.Nullable`1[S2])" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-359.cs">\r
     <type name="BaseGeneric`1[T]">\r
       </method>\r
     </type>\r
     <type name="BugReport.A">\r
-      <method name="Nullable`1 get_Counter()" attrs="2182">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Int32] get_Counter()" attrs="2182">\r
         <size>15</size>\r
       </method>\r
-      <method name="Void set_Counter(Nullable`1)" attrs="2182">\r
+      <method name="Void set_Counter(System.Nullable`1[System.Int32])" attrs="2182">\r
         <size>9</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
-      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-365.cs">\r
       <method name="IList Query()" attrs="486">\r
         <size>10</size>\r
       </method>\r
-      <method name="IList`1 Query[Extent](IList`1, IList`1)" attrs="486">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6276">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Db4objects.Db4o.Internal.ObjectContainerBase">\r
+      <method name="System.Collections.Generic.IList`1[Extent] Query[Extent](System.Collections.Generic.IList`1[Extent], System.Collections.Generic.IList`1[Extent])" attrs="486">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-370.cs">\r
     <type name="N2.X`1[T]">\r
     </type>\r
   </test>\r
   <test name="gtest-376.cs">\r
-    <type name="S`1[T]">\r
-      <method name="System.Object Box(Nullable`1)" attrs="145">\r
-        <size>43</size>\r
-      </method>\r
-    </type>\r
     <type name="C">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="S`1[T]">\r
+      <method name="System.Object Box(System.Nullable`1[T])" attrs="145">\r
+        <size>43</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-377.cs">\r
     <type name="D">\r
       <method name="Void Main()" attrs="150">\r
-        <size>92</size>\r
+        <size>68</size>\r
       </method>\r
       <method name="Void .cctor()" attrs="6289">\r
         <size>26</size>\r
   </test>\r
   <test name="gtest-378.cs">\r
     <type name="Test">\r
-      <method name="System.Object Foo(Nullable`1)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="System.Object FooG[T](Nullable`1)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>76</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Object Foo(System.Nullable`1[System.Int32])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="System.Object FooG[T](System.Nullable`1[T])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-379.cs">\r
       </method>\r
     </type>\r
     <type name="C">\r
-      <method name="Int32 Print(Nullable`1)" attrs="145">\r
-        <size>29</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>23</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Int32 Print(System.Nullable`1[S])" attrs="145">\r
+        <size>29</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-380.cs">\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>71</size>\r
       </method>\r
-      <method name="IEnumerable`1 setX()" attrs="145">\r
-        <size>23</size>\r
-      </method>\r
-      <method name="IEnumerable`1 test()" attrs="145">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>115</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>189</size>\r
       </method>\r
         <size>9</size>\r
       </method>\r
     </type>\r
+    <type name="TestGoto">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] setX()" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] test()" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="TestGoto+&lt;setX&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Boolean] System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="TestGoto+&lt;test&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Boolean] System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-382.cs">\r
     <type name="C">\r
     </type>\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>279</size>\r
+        <size>298</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   <test name="gtest-389.cs">\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>261</size>\r
+        <size>253</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   </test>\r
   <test name="gtest-392.cs">\r
     <type name="DieSubrangeType">\r
-      <method name="Nullable`1 get_UpperBound()" attrs="2182">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="Void set_UpperBound(Nullable`1)" attrs="2177">\r
-        <size>8</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>20</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="DieSubrangeType">\r
+      <method name="System.Nullable`1[System.Int32] get_UpperBound()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void set_UpperBound(System.Nullable`1[System.Int32])" attrs="2177">\r
+        <size>8</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-393.cs">\r
     <type name="B`1[T]">\r
   </test>\r
   <test name="gtest-397.cs">\r
     <type name="Foo">\r
-      <method name="Foo op_UnaryNegation(Nullable`1)" attrs="2198">\r
-        <size>55</size>\r
-      </method>\r
       <method name="Void .ctor(Int32)" attrs="6278">\r
         <size>9</size>\r
       </method>\r
     </type>\r
     <type name="Bar">\r
-      <method name="Nullable`1 op_UnaryNegation(Nullable`1)" attrs="2198">\r
-        <size>54</size>\r
-      </method>\r
       <method name="Void .ctor(Int32)" attrs="6278">\r
         <size>9</size>\r
       </method>\r
       <method name="Foo NegateFoo(Foo)" attrs="145">\r
         <size>20</size>\r
       </method>\r
-      <method name="Foo NegateFooNullable(Nullable`1)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Nullable`1 NegateBarNullable(Nullable`1)" attrs="145">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Nullable`1 NegateBar(Bar)" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>168</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Foo">\r
+      <method name="Foo op_UnaryNegation(System.Nullable`1[Foo])" attrs="2198">\r
+        <size>55</size>\r
+      </method>\r
+    </type>\r
+    <type name="Bar">\r
+      <method name="System.Nullable`1[Bar] op_UnaryNegation(System.Nullable`1[Bar])" attrs="2198">\r
+        <size>54</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test">\r
+      <method name="Foo NegateFooNullable(System.Nullable`1[Foo])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="System.Nullable`1[Bar] NegateBarNullable(System.Nullable`1[Bar])" attrs="145">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="System.Nullable`1[Bar] NegateBar(Bar)" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-398.cs">\r
     <type name="ToStr">\r
     </type>\r
     <type name="NullableColorTests">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>117</size>\r
+        <size>120</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Void Test_2()" attrs="129">\r
         <size>32</size>\r
       </method>\r
-      <method name="Nullable`1 Test_3[T](System.Func`3[T,T,T], T)" attrs="129">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void Test_4(Boolean, Boolean)" attrs="129">\r
         <size>40</size>\r
       </method>\r
       <method name="Void Test_13(System.Object)" attrs="129">\r
         <size>53</size>\r
       </method>\r
-      <method name="Nullable`1 Test_14()" attrs="129">\r
-        <size>68</size>\r
-      </method>\r
       <method name="System.Action`1[System.Int32] Test_15(System.Action`1[System.Int32])" attrs="129">\r
         <size>46</size>\r
       </method>\r
       <method name="Void Helper[T](T)" attrs="145">\r
         <size>2</size>\r
       </method>\r
+      <method name="System.Nullable`1[T] Test_3[T](System.Func`3[T,T,T], T)" attrs="129">\r
+        <size>22</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Int32] Test_14()" attrs="129">\r
+        <size>68</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-410.cs">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>31</size>\r
       </method>\r
-      <method name="Nullable`1 get_Id()" attrs="2177">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Boolean Test()" attrs="129">\r
         <size>59</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Nullable`1[System.Int32] get_Id()" attrs="2177">\r
+        <size>15</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-423.cs">\r
       <method name="Void Block(A[])" attrs="150">\r
         <size>7</size>\r
       </method>\r
-      <method name="Void Block(IEnumerable`1, A[])" attrs="150">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>37</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void Block(System.Collections.Generic.IEnumerable`1[B], A[])" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-425.cs">\r
   </test>\r
   <test name="gtest-426.cs">\r
     <type name="OverloadTest.MyClass`1[T]">\r
-      <method name="Boolean Method(MyInterface`1)" attrs="134">\r
-        <size>28</size>\r
-      </method>\r
       <method name="Boolean Method(System.Action`1[T])" attrs="134">\r
         <size>10</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="OverloadTest.MyClass`1[T]">\r
+      <method name="Boolean Method(OverloadTest.MyInterface`1[T])" attrs="134">\r
+        <size>28</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-427.cs">\r
     <type name="EventHandler">\r
       </method>\r
     </type>\r
     <type name="Klass">\r
-      <method name="Nullable`1 get_Value()" attrs="2182">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor(Nullable`1)" attrs="6278">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Klass">\r
+      <method name="System.Nullable`1[CInt] get_Value()" attrs="2182">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-429.cs">\r
     <type name="CInt">\r
       </method>\r
     </type>\r
     <type name="Driver">\r
-      <method name="Nullable`1 get_Prop()" attrs="2182">\r
-        <size>50</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>50</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Nullable`1[System.Int32] get_Prop()" attrs="2182">\r
+        <size>50</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-431.cs">\r
   <test name="gtest-435.cs">\r
     <type name="testcase.Program">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>293</size>\r
+        <size>371</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>10</size>\r
       </method>\r
-      <method name="Void Foo[U](IEnumerable`1)" attrs="486">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\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="Impl`1[T]">\r
+      <method name="Void Foo[U](System.Collections.Generic.IEnumerable`1[U])" attrs="486">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-449.cs">\r
     <type name="Program">\r
       <method name="Single op_Implicit(S)" attrs="2198">\r
         <size>12</size>\r
       </method>\r
-      <method name="Nullable`1 op_Implicit(S)" attrs="2198">\r
+      <method name="System.Nullable`1[System.Single] op_Implicit(S)" attrs="2198">\r
         <size>19</size>\r
       </method>\r
     </type>\r
   </test>\r
   <test name="gtest-468.cs">\r
     <type name="TS">\r
-      <method name="Nullable`1 get_v()" attrs="2182">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="Nullable`1 op_Implicit(TS)" attrs="2198">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="TS op_Implicit(Nullable`1)" attrs="2198">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>56</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Nullable`1[System.Int32] get_v()" attrs="2182">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Int32] op_Implicit(TS)" attrs="2198">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="TS op_Implicit(System.Nullable`1[System.Int32])" attrs="2198">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-469.cs">\r
   </test>\r
   <test name="gtest-476.cs">\r
     <type name="Test`1[T]">\r
-      <method name="B First()" attrs="134">\r
-        <size>18</size>\r
-      </method>\r
       <method name="IFoo Second()" attrs="134">\r
         <size>23</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test`1[T]">\r
+      <method name="Test`1+B[T] First()" attrs="134">\r
+        <size>18</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-477.cs">\r
     <type name="B`1[T]">\r
       </method>\r
     </type>\r
     <type name="M">\r
-      <method name="Void Test[T](I`1)" attrs="145">\r
-        <size>2</size>\r
-      </method>\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
+      <method name="Void Test[T](I`1[T])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-480.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>10</size>\r
       </method>\r
-      <method name="Void AddRange(IMyCollection`1)" attrs="134">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void AddRange(IEnumerable`1)" attrs="134">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Int32 get_Count()" attrs="2534">\r
         <size>10</size>\r
       </method>\r
       <method name="Boolean Remove(T)" attrs="486">\r
         <size>10</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
-        <size>10</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="MyCollection`1[T]">\r
+      <method name="Void AddRange(IMyCollection`1[T])" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void AddRange(System.Collections.Generic.IEnumerable`1[T])" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-487.cs">\r
     <type name="Limada.MonoTests.Generics.MultiDictionary`3[K,V,TDictionary]">\r
   </test>\r
   <test name="gtest-490.cs">\r
     <type name="Foo">\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Foo&gt;.GetEnumerator()" attrs="481">\r
-        <size>25</size>\r
-      </method>\r
       <method name="IEnumerator GetEnumerator()" attrs="486">\r
         <size>25</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>18</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[Foo] System.Collections.Generic.IEnumerable&lt;Foo&gt;.GetEnumerator()" attrs="481">\r
+        <size>25</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-491.cs">\r
       <method name="Int32 Test(Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="R Method[T,R](IEnumerable`1, System.Func`2[T,R])" attrs="145">\r
-        <size>24</size>\r
-      </method>\r
-      <method name="R Method2[T,R](IEnumerable`1, System.Func`2[System.Collections.Generic.List`1[T],R])" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>125</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="R Method[T,R](System.Collections.Generic.IEnumerable`1[T], System.Func`2[T,R])" attrs="145">\r
+        <size>24</size>\r
+      </method>\r
+      <method name="R Method2[T,R](System.Collections.Generic.IEnumerable`1[T], System.Func`2[System.Collections.Generic.List`1[T],R])" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-506.cs">\r
   </test>\r
   <test name="gtest-515.cs">\r
     <type name="A">\r
-      <method name="I`1 Foo[T]()" attrs="454">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="AA">\r
-      <method name="I`1 Foo[V]()" attrs="198">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="Void Dispose()" attrs="486">\r
         <size>2</size>\r
       </method>\r
-      <method name="I`1 Foo[R]()" attrs="198">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>13</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="A">\r
+      <method name="I`1[T] Foo[T]()" attrs="454">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="AA">\r
+      <method name="I`1[V] Foo[V]()" attrs="198">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+    <type name="B">\r
+      <method name="I`1[R] Foo[R]()" attrs="198">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-516.cs">\r
     <type name="B">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>7</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator()" attrs="481">\r
-        <size>24</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="System.Collections.Generic.IEnumerator`1[A] System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator()" attrs="481">\r
+        <size>24</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-521.cs">\r
     <type name="D">\r
       <method name="Boolean Equals(T)" attrs="486">\r
         <size>10</size>\r
       </method>\r
-      <method name="Boolean Equals(TestClass4`1)" attrs="486">\r
+      <method name="Int32 GetHashCode()" attrs="198">\r
         <size>10</size>\r
       </method>\r
-      <method name="Boolean Equals(TestClass4`1, TestClass4`1)" attrs="486">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Int32 GetHashCode(TestClass4`1)" attrs="486">\r
-        <size>22</size>\r
+      <method name="Boolean Equals(System.Object)" attrs="198">\r
+        <size>10</size>\r
       </method>\r
-      <method name="Int32 GetHashCode()" attrs="198">\r
+    </type>\r
+    <type name="Test.C">\r
+      <method name="Void Main()" attrs="150">\r
         <size>10</size>\r
       </method>\r
-      <method name="Boolean Equals(System.Object)" attrs="198">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test.TestClass4`1[T]">\r
+      <method name="Boolean Equals(Test.TestClass4`1[T])" attrs="486">\r
         <size>10</size>\r
       </method>\r
-      <method name="Boolean op_Equality(TestClass4`1, TestClass4`1)" attrs="2198">\r
+      <method name="Boolean Equals(Test.TestClass4`1[T], Test.TestClass4`1[T])" attrs="486">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="Int32 GetHashCode(Test.TestClass4`1[T])" attrs="486">\r
+        <size>22</size>\r
+      </method>\r
+      <method name="Boolean op_Equality(Test.TestClass4`1[T], Test.TestClass4`1[T])" attrs="2198">\r
         <size>17</size>\r
       </method>\r
-      <method name="Boolean op_Equality(T, TestClass4`1)" attrs="2198">\r
+      <method name="Boolean op_Equality(T, Test.TestClass4`1[T])" attrs="2198">\r
         <size>17</size>\r
       </method>\r
-      <method name="Boolean op_Equality(TestClass4`1, T)" attrs="2198">\r
+      <method name="Boolean op_Equality(Test.TestClass4`1[T], T)" attrs="2198">\r
         <size>17</size>\r
       </method>\r
-      <method name="Boolean op_Equality(System.Object, TestClass4`1)" attrs="2198">\r
+      <method name="Boolean op_Equality(System.Object, Test.TestClass4`1[T])" attrs="2198">\r
         <size>23</size>\r
       </method>\r
-      <method name="Boolean op_Equality(TestClass4`1, System.Object)" attrs="2198">\r
+      <method name="Boolean op_Equality(Test.TestClass4`1[T], System.Object)" attrs="2198">\r
         <size>23</size>\r
       </method>\r
-      <method name="Boolean op_Inequality(TestClass4`1, TestClass4`1)" attrs="2198">\r
+      <method name="Boolean op_Inequality(Test.TestClass4`1[T], Test.TestClass4`1[T])" attrs="2198">\r
         <size>19</size>\r
       </method>\r
-      <method name="Boolean op_Inequality(T, TestClass4`1)" attrs="2198">\r
+      <method name="Boolean op_Inequality(T, Test.TestClass4`1[T])" attrs="2198">\r
         <size>19</size>\r
       </method>\r
-      <method name="Boolean op_Inequality(TestClass4`1, T)" attrs="2198">\r
+      <method name="Boolean op_Inequality(Test.TestClass4`1[T], T)" attrs="2198">\r
         <size>19</size>\r
       </method>\r
-      <method name="Boolean op_Inequality(System.Object, TestClass4`1)" attrs="2198">\r
+      <method name="Boolean op_Inequality(System.Object, Test.TestClass4`1[T])" attrs="2198">\r
         <size>19</size>\r
       </method>\r
-      <method name="Boolean op_Inequality(TestClass4`1, System.Object)" attrs="2198">\r
+      <method name="Boolean op_Inequality(Test.TestClass4`1[T], System.Object)" attrs="2198">\r
         <size>19</size>\r
       </method>\r
     </type>\r
-    <type name="Test.C">\r
-      <method name="Void Main()" 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-524.cs">\r
     <type name="C">\r
   </test>\r
   <test name="gtest-534.cs">\r
     <type name="A">\r
-      <method name="Void Method(IG`1)" attrs="486">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>21</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void Method(IG`1[System.Double[][]])" attrs="486">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-535.cs">\r
       </method>\r
     </type>\r
     <type name="S">\r
-      <method name="System.String op_BitwiseOr(S, Nullable`1)" attrs="2198">\r
+      <method name="System.String op_BitwiseOr(S, System.Nullable`1[S])" attrs="2198">\r
         <size>14</size>\r
       </method>\r
-      <method name="Nullable`1 op_Addition(S, Nullable`1)" attrs="2198">\r
+      <method name="System.Nullable`1[System.Int32] op_Addition(S, System.Nullable`1[S])" attrs="2198">\r
         <size>16</size>\r
       </method>\r
     </type>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>7</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void .ctor(Int32)" attrs="6278">\r
         <size>2</size>\r
       </method>\r
     </type>\r
-    <type name="S2">\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
-        <size>23</size>\r
-      </method>\r
-    </type>\r
     <type name="Enumerator`1[T]">\r
       <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
         <size>7</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="S">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] GetEnumerator()" attrs="486">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="S2">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] GetEnumerator()" attrs="134">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-539.cs">\r
     <type name="S">\r
       <method name="C op_Explicit(S)" attrs="2198">\r
         <size>12</size>\r
       </method>\r
-      <method name="C op_Explicit(Nullable`1)" attrs="2198">\r
-        <size>47</size>\r
-      </method>\r
       <method name="Void .ctor(Int32)" attrs="6273">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="C op_Explicit(System.Nullable`1[S])" attrs="2198">\r
+        <size>47</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-540.cs">\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>964</size>\r
+        <size>762</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
         <size>10</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>128</size>\r
+        <size>353</size>\r
       </method>\r
     </type>\r
   </test>\r
         <size>20</size>\r
       </method>\r
     </type>\r
-    <type name="Foo.Magic`1[T]">\r
-      <method name="Void Upsample(IUpDown)" attrs="150">\r
-        <size>9</size>\r
-      </method>\r
-    </type>\r
     <type name="Foo.Instance">\r
       <method name="Int32 get_DestinationDimension()" attrs="2534">\r
         <size>10</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Foo.Magic`1[T]">\r
+      <method name="Void Upsample(Foo.Magic`1+IUpDown[T])" attrs="150">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-551.cs">\r
     <type name="Base`1[T]">\r
       <method name="Void Foo[T](T)" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void Test(Nullable`1)" attrs="150">\r
-        <size>20</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[U]">\r
+      <method name="Void Test(System.Nullable`1[S])" attrs="150">\r
+        <size>20</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-564.cs">\r
     <type name="B1`2[T1,T2]">\r
       </method>\r
     </type>\r
     <type name="C`1[T]">\r
-      <method name="C`1 op_Implicit(T)" attrs="2198">\r
+      <method name="C`1[T] op_Implicit(T)" attrs="2198">\r
         <size>18</size>\r
       </method>\r
     </type>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>7</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
-        <size>10</size>\r
-      </method>\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
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int16] GetEnumerator()" attrs="486">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-573.cs">\r
       </method>\r
     </type>\r
     <type name="CA`1[T]">\r
-      <method name="IB`1 IB&lt;T&gt;.Backwards()" attrs="481">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="IA`1 Backwards()" attrs="1478">\r
-        <size>0</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6276">\r
         <size>7</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="CA`1[T]">\r
+      <method name="IA`1[T] Backwards()" attrs="1478">\r
+        <size>0</size>\r
+      </method>\r
+      <method name="IB`1[T] IB&lt;T&gt;.Backwards()" attrs="481">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-574.cs">\r
     <type name="TestClass`1[T1]">\r
       <method name="Void Test()" attrs="129">\r
         <size>11</size>\r
       </method>\r
-      <method name="Void Foo[U](IEnumerable`1)" attrs="134">\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="DirectedCollectionBase`1[T3]">\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T3&gt;.GetEnumerator()" attrs="481">\r
-        <size>10</size>\r
-      </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>10</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="EnumerableBase`1[T6]">\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T6&gt;.GetEnumerator()" attrs="481">\r
-        <size>10</size>\r
-      </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>10</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="TestClass`1[T1]">\r
+      <method name="Void Foo[U](System.Collections.Generic.IEnumerable`1[U])" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
+    <type name="DirectedCollectionBase`1[T3]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T3] System.Collections.Generic.IEnumerable&lt;T3&gt;.GetEnumerator()" attrs="481">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="EnumerableBase`1[T6]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T6] System.Collections.Generic.IEnumerable&lt;T6&gt;.GetEnumerator()" attrs="481">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-575.cs">\r
     <type name="C`1[T1]">\r
   </test>\r
   <test name="gtest-576.cs">\r
     <type name="A">\r
-      <method name="Void IA.f[T1](IParam`1)" attrs="481">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>8</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void IA.f[T1](IParam`1[T1])" attrs="481">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-577.cs">\r
   </test>\r
   <test name="gtest-578.cs">\r
     <type name="X">\r
-      <method name="I`1 Test[T,TR](I`1, System.Func`2[I`1[T],TR])" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="U First[U](I`1)" attrs="150">\r
-        <size>18</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>44</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="I`1[TR] Test[T,TR](I`1[T], System.Func`2[I`1[T],TR])" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="U First[U](I`1[U])" attrs="150">\r
+        <size>18</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-579.cs">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="gtest-584.cs">\r
+    <type name="S">\r
+      <method name="Boolean op_Equality(S, S)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean op_Inequality(S, S)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>531</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="S">\r
+      <method name="System.Nullable`1[System.Int32] op_Implicit(S)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="System.Nullable`1[E] op_Implicit(S)" attrs="2198">\r
+        <size>18</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-585.cs">\r
+    <type name="S">\r
+      <method name="Int32 op_Implicit(S)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="S3">\r
+      <method name="System.String op_Implicit(S3)" attrs="2198">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>436</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="S2">\r
+      <method name="System.Nullable`1[System.Int32] op_Implicit(S2)" attrs="2198">\r
+        <size>19</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.UInt32] op_Implicit(S2)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-586.cs">\r
+    <type name="S">\r
+      <method name="Boolean op_Equality(S, S)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean op_Inequality(S, S)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="S2">\r
+      <method name="Boolean op_Equality(S2, S2)" attrs="2198">\r
+        <size>22</size>\r
+      </method>\r
+      <method name="Boolean op_Inequality(S2, S2)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>661</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="S3">\r
+      <method name="System.Nullable`1[System.Int32] op_Implicit(S3)" attrs="2198">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-587.cs">\r
+    <type name="S">\r
+      <method name="System.String op_Implicit(S)" attrs="2198">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="E op_Implicit(S)" attrs="2198">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>139</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="S">\r
+      <method name="System.Nullable`1[System.Int16] op_Implicit(S)" attrs="2198">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-588.cs">\r
+    <type name="S">\r
+      <method name="System.Nullable`1[System.Int16] op_Implicit(S)" attrs="2198">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Int16 op_Implicit(S)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Program">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>246</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
   </test>\r
   <test name="gtest-anontype-13.cs">\r
     <type name="Test">\r
-      <method name="IEnumerable`1 Select[T](System.Array, System.Func`2[System.Object,T])" attrs="150">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>182</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>211</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Select[T](System.Array, System.Func`2[System.Object,T])" attrs="150">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;Select&gt;c__Iterator0`1[T]">\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
+    </type>\r
   </test>\r
   <test name="gtest-autoproperty-01.cs">\r
     <type name="Test">\r
         <size>239</size>\r
       </method>\r
       <method name="Void ConvertTest_7()" attrs="129">\r
-        <size>123</size>\r
+        <size>108</size>\r
       </method>\r
       <method name="Void ConvertTest_8()" attrs="129">\r
         <size>119</size>\r
         <size>170</size>\r
       </method>\r
       <method name="Void EqualTest_11()" attrs="129">\r
-        <size>133</size>\r
+        <size>148</size>\r
       </method>\r
       <method name="Void EqualTest_12()" attrs="129">\r
         <size>128</size>\r
         <size>125</size>\r
       </method>\r
       <method name="Void EqualTest_14()" attrs="129">\r
-        <size>102</size>\r
+        <size>132</size>\r
       </method>\r
       <method name="Void EqualTest_15()" attrs="129">\r
         <size>160</size>\r
         <size>198</size>\r
       </method>\r
       <method name="Void ExclusiveOrTest_8()" attrs="129">\r
-        <size>164</size>\r
+        <size>179</size>\r
       </method>\r
       <method name="Void GreaterThanTest()" attrs="129">\r
         <size>100</size>\r
         <size>170</size>\r
       </method>\r
       <method name="Void NotEqualTest_11()" attrs="129">\r
-        <size>133</size>\r
+        <size>148</size>\r
       </method>\r
       <method name="Void OrTest()" attrs="129">\r
         <size>142</size>\r
     </type>\r
     <type name="Tester">\r
       <method name="Void LessThanTest_9()" attrs="129">\r
-        <size>199</size>\r
+        <size>184</size>\r
       </method>\r
     </type>\r
   </test>\r
   <test name="gtest-etree-03.cs">\r
     <type name="S`1[T]">\r
       <method name="Int32 Test()" attrs="150">\r
-        <size>164</size>\r
+        <size>139</size>\r
       </method>\r
     </type>\r
     <type name="C">\r
     </type>\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>394</size>\r
+        <size>495</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="Foo">\r
+      <method name="Foo op_Addition(Foo, Foo)" attrs="2198">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-etree-05.cs">\r
     <type name="C">\r
   </test>\r
   <test name="gtest-etree-10.cs">\r
     <type name="Foo`1[T]">\r
-      <method name="Boolean ContainsAll[U](IEnumerable`1)" attrs="134">\r
-        <size>200</size>\r
-      </method>\r
       <method name="Boolean Contains(T)" attrs="134">\r
         <size>10</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Foo`1[T]">\r
+      <method name="Boolean ContainsAll[U](System.Collections.Generic.IEnumerable`1[U])" attrs="134">\r
+        <size>200</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-etree-11.cs">\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>66</size>\r
       </method>\r
-      <method name="IEnumerable`1 Test[T](Int32)" attrs="145">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>148</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Program">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test[T](Int32)" attrs="145">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="Program+&lt;Test&gt;c__Iterator0`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-etree-14.cs">\r
     <type name="Person">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>67</size>\r
       </method>\r
-      <method name="IEnumerable`1 GetPersons[T](IEnumerable`1, Int32)" attrs="145">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Boolean Test[T](T, System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]])" attrs="145">\r
         <size>21</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>336</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Repro">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] GetPersons[T](System.Collections.Generic.IEnumerable`1[T], Int32)" attrs="145">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+    <type name="Repro+&lt;GetPersons&gt;c__Iterator0`1[T]">\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
+    </type>\r
   </test>\r
   <test name="gtest-etree-15.cs">\r
     <type name="Foo">\r
   </test>\r
   <test name="gtest-exmethod-07.cs">\r
     <type name="E">\r
-      <method name="Void ToReadOnly[T](IEnumerable`1)" attrs="147">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void To(IA)" attrs="147">\r
         <size>2</size>\r
       </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void Test(IEnumerable`1)" attrs="150">\r
-        <size>16</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="E">\r
+      <method name="Void ToReadOnly[T](System.Collections.Generic.IEnumerable`1[T])" attrs="147">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
+    <type name="C">\r
+      <method name="Void Test(System.Collections.Generic.IEnumerable`1[System.Boolean])" attrs="150">\r
+        <size>16</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-exmethod-08.cs">\r
     <type name="C">\r
   </test>\r
   <test name="gtest-exmethod-13.cs">\r
     <type name="Foo">\r
-      <method name="IEnumerable`1 Reverse[T](IEnumerable`1)" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>24</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Reverse[T](System.Collections.Generic.IEnumerable`1[T])" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-exmethod-14.cs">\r
       <method name="System.String Test_1(System.String)" attrs="150">\r
         <size>20</size>\r
       </method>\r
-      <method name="Int32 Test_2[T](IEnumerable`1)" attrs="150">\r
-        <size>11</size>\r
-      </method>\r
     </type>\r
     <type name="Test">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>0</size>\r
       </method>\r
     </type>\r
+    <type name="Rocks">\r
+      <method name="Int32 Test_2[T](System.Collections.Generic.IEnumerable`1[T])" attrs="150">\r
+        <size>11</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-exmethod-20.cs">\r
     <type name="Outer.Inner.Test">\r
       </method>\r
     </type>\r
     <type name="Outer.ExtensionMethods">\r
-      <method name="Void AddRange[T](I, IEnumerable`1)" attrs="150">\r
+      <method name="Void AddRange[T](I, System.Collections.Generic.IEnumerable`1[T])" attrs="150">\r
         <size>2</size>\r
       </method>\r
     </type>\r
     </type>\r
   </test>\r
   <test name="gtest-exmethod-27.cs">\r
-    <type name="Foo.Extensions">\r
-      <method name="System.String AsString(IList`1)" attrs="150">\r
-        <size>14</size>\r
-      </method>\r
-    </type>\r
     <type name="Bar.Program">\r
       <method name="Void Main()" attrs="150">\r
         <size>18</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Foo.Extensions">\r
+      <method name="System.String AsString(System.Collections.Generic.IList`1[System.Byte])" attrs="150">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-exmethod-28.cs">\r
     <type name="Foo">\r
       <method name="Int32 get_First()" attrs="2182">\r
         <size>10</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\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="Test">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] GetEnumerator()" attrs="486">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-exmethod-31.cs">\r
     <type name="N.S">\r
   </test>\r
   <test name="gtest-exmethod-41.cs">\r
     <type name="TT">\r
-      <method name="Void Method[T](IEnumerable`1, System.Func`2[T,System.Boolean])" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void Test[U](U)" attrs="150">\r
         <size>25</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="TT">\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
+    </type>\r
   </test>\r
   <test name="gtest-exmethod-42.cs">\r
     <type name="C">\r
         <size>0</size>\r
       </method>\r
     </type>\r
-    <type name="ExtensionTest.Two.Extensions">\r
-      <method name="Boolean Contains[T](IEnumerable`1, T)" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="Boolean All[T](IEnumerable`1, ExtensionTest.Two.AxFunc`2[T,System.Boolean])" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
-    </type>\r
     <type name="ExtensionTest.MyClass">\r
       <method name="Boolean IsCharacters(System.String, System.Char[])" attrs="150">\r
         <size>27</size>\r
         <size>2</size>\r
       </method>\r
     </type>\r
+    <type name="ExtensionTest.Two.Extensions">\r
+      <method name="Boolean Contains[T](System.Collections.Generic.IEnumerable`1[T], T)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Boolean All[T](System.Collections.Generic.IEnumerable`1[T], ExtensionTest.Two.AxFunc`2[T,System.Boolean])" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-fixedbuffer-01.cs">\r
     <type name="TestNew">\r
       <method name="T get_Item(Int32)" attrs="2182">\r
         <size>21</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>8</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C+ArrayReadOnlyList`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="134">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-02.cs">\r
     <type name="C">\r
-      <method name="IEnumerator`1 Test()" attrs="129">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="C+&lt;Test&gt;c__Iterator0">\r
-      <method name="KeyValuePair`2 System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.get_Current()" attrs="2529">\r
-        <size>14</size>\r
-      </method>\r
       <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
         <size>19</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[System.String,System.Object]] Test()" attrs="129">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.KeyValuePair`2[System.String,System.Object] System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;.get_Current()" attrs="2529">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-03.cs">\r
     <type name="Test">\r
-      <method name="IEnumerable`1 Annotations[T]()" attrs="134">\r
-        <size>30</size>\r
-      </method>\r
-      <method name="IEnumerable`1 Annotations(System.Type)" attrs="134">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>15</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>204</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>232</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Annotations[T]()" attrs="134">\r
+        <size>30</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Object] Annotations(System.Type)" attrs="134">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;Annotations&gt;c__Iterator0`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;Annotations&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-04.cs">\r
     <type name="TestClass">\r
       <method name="Void ToString(System.Object)" attrs="1478">\r
         <size>0</size>\r
       </method>\r
-      <method name="IEnumerable`1 TestEnumerator()" attrs="134">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void Test()" attrs="134">\r
         <size>9</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>38</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="TestClass">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Object] TestEnumerator()" attrs="134">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="TestClass+&lt;TestEnumerator&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-05.cs">\r
     <type name="Test">\r
       <method name="Void Main()" attrs="150">\r
         <size>32</size>\r
       </method>\r
-      <method name="IEnumerable`1 TestRoutine[T](IEnumerable`1, Foo`1[T])" attrs="150">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>197</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-  </test>\r
-  <test name="gtest-iter-06.cs">\r
-    <type name="Mono.Rocks.KeyValuePair">\r
-      <method name="Nullable`1 Just[TKey,TValue](TKey, TValue)" attrs="150">\r
-        <size>21</size>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] TestRoutine[T](System.Collections.Generic.IEnumerable`1[T], Foo`1[T])" attrs="150">\r
+        <size>37</size>\r
       </method>\r
     </type>\r
-    <type name="Mono.Rocks.Sequence">\r
-      <method name="IEnumerable`1 Unfoldr[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])" attrs="150">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="IEnumerable`1 CreateUnfoldrIterator[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])" attrs="145">\r
-        <size>44</size>\r
+    <type name="Test+&lt;TestRoutine&gt;c__Iterator0`1[T]">\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
     </type>\r
+  </test>\r
+  <test name="gtest-iter-06.cs">\r
     <type name="Mono.Rocks.Test">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>128</size>\r
       </method>\r
-      <method name="Nullable`1 &lt;Main&gt;m__0(Int32)" attrs="145">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;TResult&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>192</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Mono.Rocks.KeyValuePair">\r
+      <method name="System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TKey,TValue]] Just[TKey,TValue](TKey, TValue)" attrs="150">\r
+        <size>21</size>\r
+      </method>\r
+    </type>\r
+    <type name="Mono.Rocks.Sequence">\r
+      <method name="System.Collections.Generic.IEnumerable`1[TResult] Unfoldr[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])" attrs="150">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[TResult] CreateUnfoldrIterator[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])" attrs="145">\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
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-07.cs">\r
     <type name="Test">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>16</size>\r
       </method>\r
-      <method name="Void TestFunction(IEnumerable`1)" attrs="150">\r
-        <size>36</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="MySystem">\r
-      <method name="IEnumerable`1 get_Items()" attrs="2182">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>35</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>197</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Void TestFunction(System.Collections.Generic.IEnumerable`1[System.String])" attrs="150">\r
+        <size>36</size>\r
+      </method>\r
+    </type>\r
+    <type name="MySystem">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.String] get_Items()" attrs="2182">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="MySystem+&lt;&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-08.cs">\r
     <type name="App">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>91</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-iter-09.cs">\r
     <type name="Test">\r
-      <method name="IEnumerable`1 Create[T](T[,])" attrs="145">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>89</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>137</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Create[T](T[,])" attrs="145">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;Create&gt;c__Iterator0`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-10.cs">\r
     <type name="Test">\r
-      <method name="IEnumerable`1 FromTo(Int32, Int32)" attrs="145">\r
-        <size>44</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>185</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>110</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] FromTo(Int32, Int32)" attrs="145">\r
+        <size>44</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;FromTo&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-11.cs">\r
     <type name="Foo">\r
       <method name="Void Add(T)" attrs="134">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
-        <size>22</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>18</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Collection`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+        <size>22</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-12.cs">\r
     <type name="H">\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="IEnumerable`1 Merge[T](IEnumerator`1)" attrs="150">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>124</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="H">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Merge[T](System.Collections.Generic.IEnumerator`1[T])" attrs="150">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="H+&lt;Merge&gt;c__Iterator0`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-13.cs">\r
     <type name="C`1[T]">\r
       <method name="IEnumerator GetEnumerator()" attrs="134">\r
         <size>20</size>\r
       </method>\r
-      <method name="IEnumerable`1 Filter(System.Func`2[T,System.Boolean])" attrs="134">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>225</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C`1[T]">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Filter(System.Func`2[T,System.Boolean])" attrs="134">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+    <type name="C`1+&lt;Filter&gt;c__Iterator0[T]">\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
+    </type>\r
   </test>\r
   <test name="gtest-iter-14.cs">\r
     <type name="A">\r
       </method>\r
     </type>\r
     <type name="S">\r
-      <method name="IEnumerable`1 GetIt()" attrs="134">\r
-        <size>35</size>\r
-      </method>\r
       <method name="Int32 &lt;GetHashCode&gt;__BaseCallProxy0()" attrs="129">\r
         <size>24</size>\r
       </method>\r
       <method name="Void set_BaseM(Int32)" attrs="2244">\r
         <size>12</size>\r
       </method>\r
-      <method name="IEnumerable`1 GetIt()" attrs="129">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>145</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>82</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>93</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="S">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIt()" attrs="134">\r
+        <size>35</size>\r
+      </method>\r
+    </type>\r
+    <type name="X">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIt()" attrs="129">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="S+&lt;GetIt&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;GetIt&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-15.cs">\r
     <type name="C`1[TFirst]">\r
-      <method name="IEnumerable`1 GetEnumerable[V](IEnumerable`1)" attrs="131">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;V&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>189</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C`1[TFirst]">\r
+      <method name="System.Collections.Generic.IEnumerable`1[V] GetEnumerable[V](System.Collections.Generic.IEnumerable`1[C`1+VSlot`1[TFirst,V]])" attrs="131">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="C`1+&lt;GetEnumerable&gt;c__Iterator0`1[TFirst,V]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[V] System.Collections.Generic.IEnumerable&lt;V&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-16.cs">\r
     <type name="Test.Base">\r
-      <method name="IEnumerable`1 GetStuff(Int32)" attrs="454">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6276">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Test.Derived">\r
-      <method name="IEnumerable`1 GetStuff(Int32)" attrs="198">\r
-        <size>37</size>\r
-      </method>\r
-      <method name="IEnumerable`1 &lt;GetStuff&gt;__BaseCallProxy0(Int32)" attrs="129">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6276">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Test.SpecialDerived">\r
-      <method name="IEnumerable`1 GetStuff(Int32)" attrs="198">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>65</size>\r
       </method>\r
-      <method name="IEnumerable`1 &lt;GetStuff&gt;__BaseCallProxy0(Int32)" attrs="129">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>77</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>195</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>195</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test.Base">\r
+      <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="454">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test.Derived">\r
+      <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="198">\r
+        <size>37</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[Test.Base] &lt;GetStuff&gt;__BaseCallProxy0(Int32)" attrs="129">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test.SpecialDerived">\r
+      <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="198">\r
+        <size>37</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[Test.Base] &lt;GetStuff&gt;__BaseCallProxy0(Int32)" attrs="129">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test.Base+&lt;GetStuff&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test.Derived+&lt;GetStuff&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test.SpecialDerived+&lt;GetStuff&gt;c__Iterator2">\r
+      <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-17.cs">\r
     <type name="Test">\r
-      <method name="IEnumerable`1 TestMethod()" attrs="134">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>37</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] TestMethod()" attrs="134">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;TestMethod&gt;c__Iterator0">\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
+    </type>\r
   </test>\r
   <test name="gtest-iter-18.cs">\r
     <type name="c">\r
-      <method name="IEnumerable`1 func()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>57</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;char&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>78</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="c">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Char] func()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="c+&lt;func&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Char] System.Collections.Generic.IEnumerable&lt;char&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-19.cs">\r
     <type name="IEnumerableTransform">\r
-      <method name="IEnumerable`1 Transform[TOut](IEnumerable`1, IEnumerableTransform+EmitterFunc`1[TOut])" attrs="150">\r
-        <size>37</size>\r
-      </method>\r
       <method name="IEnumerableTransform+EmitterFunc`1[TOut] Emit[TOut](TOut)" attrs="150">\r
         <size>34</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;TOut&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>203</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="IEnumerableTransform">\r
+      <method name="System.Collections.Generic.IEnumerable`1[TOut] Transform[TOut](System.Collections.Generic.IEnumerable`1[System.Int32], IEnumerableTransform+EmitterFunc`1[TOut])" attrs="150">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+    <type name="IEnumerableTransform+&lt;Transform&gt;c__Iterator0`1[TOut]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[TOut] System.Collections.Generic.IEnumerable&lt;TOut&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-20.cs">\r
     <type name="X">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>77</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-iter-21.cs">\r
     <type name="C">\r
-      <method name="IEnumerable`1 Test()" attrs="129">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>72</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Void &lt;&gt;__Finally0()" attrs="129">\r
         <size>29</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="129">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test&gt;c__Iterator0">\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
+    </type>\r
   </test>\r
   <test name="gtest-iter-22.cs">\r
     <type name="D">\r
       </method>\r
     </type>\r
     <type name="C">\r
-      <method name="IEnumerable`1 Test()" attrs="129">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>78</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>74</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-  </test>\r
-  <test name="gtest-iter-23.cs">\r
     <type name="C">\r
-      <method name="IEnumerable`1 Test()" attrs="145">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="129">\r
         <size>23</size>\r
       </method>\r
-      <method name="IEnumerable`1 Test_2()" attrs="145">\r
-        <size>23</size>\r
+    </type>\r
+    <type name="C+&lt;Test&gt;c__Iterator0">\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
+    </type>\r
+  </test>\r
+  <test name="gtest-iter-23.cs">\r
+    <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>180</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>271</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>200</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test_2()" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test&gt;c__Iterator0">\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
+    </type>\r
+    <type name="C+&lt;Test_2&gt;c__Iterator1">\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
+    </type>\r
   </test>\r
   <test name="gtest-iter-24.cs">\r
     <type name="B">\r
       </method>\r
     </type>\r
     <type name="C">\r
-      <method name="IEnumerable`1 Test()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>71</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>170</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test&gt;c__Iterator0">\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
+    </type>\r
   </test>\r
   <test name="gtest-iter-25.cs">\r
     <type name="Test.Program">\r
       <method name="Void Main()" attrs="150">\r
         <size>61</size>\r
       </method>\r
-      <method name="IEnumerable`1 Test()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
     </type>\r
     <type name="Test.Program+&lt;Test&gt;c__Iterator0">\r
       <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()" attrs="2529">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>143</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test.Program">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Object] Test()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test.Program+&lt;Test&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-26.cs">\r
     <type name="Test.Program">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>51</size>\r
       </method>\r
-      <method name="IEnumerable`1 Test()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
     </type>\r
     <type name="Test.Program+&lt;Test&gt;c__Iterator0">\r
       <method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()" attrs="2529">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>72</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test.Program">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Object] Test()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test.Program+&lt;Test&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-27.cs">\r
     <type name="CompilerBug">\r
       <method name="Void Main()" attrs="150">\r
         <size>61</size>\r
       </method>\r
-      <method name="IEnumerable`1 Foo()" attrs="145">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>161</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="CompilerBug">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.String] Foo()" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="CompilerBug+&lt;Foo&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-iter-28.cs">\r
     <type name="A">\r
-      <method name="IEnumerable`1 Test(B)" attrs="134">\r
-        <size>37</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>18</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>178</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="A">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.String] Test(B)" attrs="134">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+    <type name="A+&lt;Test&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="gtest-iter-29.cs">\r
+    <type name="Test">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>44</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;Test2&gt;c__Iterator0">\r
+      <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()" attrs="2529">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
+        <size>19</size>\r
+      </method>\r
+      <method name="Boolean MoveNext()" attrs="486">\r
+        <size>21</size>\r
+      </method>\r
+      <method name="Void Dispose()" attrs="486">\r
+        <size>1</size>\r
+      </method>\r
+      <method name="Void Reset()" attrs="486">\r
+        <size>6</size>\r
+      </method>\r
+      <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test2()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;Test2&gt;c__Iterator0">\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
+    </type>\r
   </test>\r
   <test name="gtest-lambda-01.cs">\r
     <type name="IntFunc">\r
       </method>\r
     </type>\r
     <type name="C">\r
-      <method name="IEnumerable`1 Test[T](T)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="IEnumerable`1 Test[T](Func`1[T])" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="IEnumerable`1 Test2[T](Func`2[T,T])" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>114</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Test[T](T)" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Test[T](Func`1[T])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Test2[T](Func`2[T,T])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-10.cs">\r
     <type name="C">\r
-      <method name="Void Foo[TSource](IEnumerable`1)" attrs="150">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void Foo[TCollection,TSource](IEnumerable`1, System.Func`2[TSource,System.Collections.Generic.IEnumerable`1[TCollection]])" attrs="150">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void Foo[TCollection,TSource](IEnumerable`1, System.Func`3[TSource,TCollection[],System.Collections.Generic.IEnumerable`1[TCollection]])" attrs="150">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void Foo[TCollection,TSource](System.Func`2[TCollection[],System.Collections.Generic.IEnumerable`1[TSource]])" attrs="150">\r
         <size>2</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="C+&lt;Main&gt;c__AnonStorey0">\r
-      <method name="IEnumerable`1 &lt;&gt;m__0(Int32)" attrs="131">\r
-        <size>15</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="IEnumerable`1 &lt;&gt;m__1(Int32, System.Int32[])" attrs="131">\r
+    </type>\r
+    <type name="C">\r
+      <method name="Void Foo[TSource](System.Collections.Generic.IEnumerable`1[TSource])" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Foo[TCollection,TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Collections.Generic.IEnumerable`1[TCollection]])" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Foo[TCollection,TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`3[TSource,TCollection[],System.Collections.Generic.IEnumerable`1[TCollection]])" attrs="150">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
+    <type name="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="IEnumerable`1 &lt;&gt;m__2(System.Int32[])" attrs="131">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__1(Int32, System.Int32[])" attrs="131">\r
         <size>15</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(System.Int32[])" attrs="131">\r
+        <size>15</size>\r
       </method>\r
     </type>\r
   </test>\r
     </type>\r
   </test>\r
   <test name="gtest-lambda-15.cs">\r
-    <type name="Enumerable">\r
-      <method name="Int32 Sum[TSource](IEnumerable`1, System.Func`2[TSource,System.Int32])" attrs="150">\r
-        <size>40</size>\r
-      </method>\r
-      <method name="TR Sum[TA,TR](IEnumerable`1, System.Func`3[TR,TA,TR])" attrs="145">\r
-        <size>139</size>\r
-      </method>\r
-    </type>\r
     <type name="Repro">\r
       <method name="Int32 Main()" attrs="150">\r
         <size>128</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Enumerable">\r
+      <method name="Int32 Sum[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Int32])" attrs="150">\r
+        <size>40</size>\r
+      </method>\r
+      <method name="TR Sum[TA,TR](System.Collections.Generic.IEnumerable`1[TA], System.Func`3[TR,TA,TR])" attrs="145">\r
+        <size>139</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-16.cs">\r
     <type name="Repro">\r
-      <method name="Void AssertFoo[T](IList`1)" attrs="145">\r
-        <size>35</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Repro">\r
+      <method name="Void AssertFoo[T](System.Collections.Generic.IList`1[T])" attrs="145">\r
+        <size>35</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-17.cs">\r
     <type name="TestCase">\r
       <method name="Product &lt;Main&gt;m__1(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(IGrouping`2)" attrs="145">\r
-        <size>56</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="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
+        <size>56</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-lambda-23.cs">\r
     <type name="C">\r
       <method name="Void DoStuff[T](T, System.Action`1[T])" attrs="150">\r
         <size>12</size>\r
       </method>\r
-      <method name="Void DoStuff[T](Nullable`1, System.Action`1[T])" attrs="150">\r
-        <size>15</size>\r
-      </method>\r
     </type>\r
     <type name="MonoBugs.Program">\r
       <method name="Void Main()" attrs="150">\r
         <size>60</size>\r
       </method>\r
-      <method name="Void &lt;Main&gt;m__0(Foo`1)" attrs="145">\r
+    </type>\r
+    <type name="MonoBugs.Bar">\r
+      <method name="Void DoStuff[T](System.Nullable`1[T], System.Action`1[T])" attrs="150">\r
+        <size>15</size>\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
         <size>13</size>\r
       </method>\r
     </type>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>294</size>\r
       </method>\r
-      <method name="IEnumerable`1 &lt;Main&gt;m__0(IEnumerable)" 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="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;Main&gt;m__0(IEnumerable)" attrs="145">\r
         <size>7</size>\r
       </method>\r
     </type>\r
       <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Nullable`1 &lt;Main&gt;m__2(Nullable`1)" 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__1B(Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1C(Int32, IEnumerable`1)" 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>\r
       <method name="Int32 &lt;Main&gt;m__1E(Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__1F(Int32, IEnumerable`1)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Int32 &lt;Main&gt;m__20(Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
       <method name="Int32 &lt;Main&gt;m__23(Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
-      <method name="IGrouping`2 &lt;Main&gt;m__24(IGrouping`2)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__25(Int32)" attrs="145">\r
         <size>18</size>\r
       </method>\r
       <method name="Int32 &lt;Main&gt;m__2B(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__2D(IGrouping`2, Int32)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
       <method name="Int32 &lt;Main&gt;m__2E(&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__2F(&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;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__31(IGrouping`2, Int32)" attrs="145">\r
-        <size>16</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>\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>\r
-      <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__35(IGrouping`2, Int32)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
       <method name="Int32 &lt;Main&gt;m__36(&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__37(&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="IGrouping`2 &lt;Main&gt;m__38(IGrouping`2)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Int32 &lt;Main&gt;m__39(Int32)" attrs="145">\r
         <size>10</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="from.C+&lt;Main&gt;c__AnonStorey0">\r
-      <method name="IEnumerable`1 &lt;&gt;m__4(Int32)" attrs="131">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="IEnumerable`1 &lt;&gt;m__2C(IGrouping`2)" attrs="131">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="IEnumerable`1 &lt;&gt;m__30(IGrouping`2)" attrs="131">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="IEnumerable`1 &lt;&gt;m__34(IGrouping`2)" 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__3C(Int32)" attrs="131">\r
         <size>55</size>\r
       </method>\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
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1C(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="Int32 &lt;Main&gt;m__1F(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__24(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">\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__2D(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">\r
+        <size>16</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>\r
+      <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__35(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">\r
+        <size>16</size>\r
+      </method>\r
+      <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__38(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">\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__4(Int32)" attrs="131">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2C(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__30(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__34(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-02.cs">\r
     <type name="Test">\r
       </method>\r
     </type>\r
     <type name="SelectMany+&lt;Main&gt;c__AnonStorey0">\r
-      <method name="IEnumerable`1 &lt;&gt;m__0(Int32)" attrs="131">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__0(Int32)" attrs="131">\r
         <size>20</size>\r
       </method>\r
-      <method name="IEnumerable`1 &lt;&gt;m__3(Int32)" attrs="131">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__3(Int32)" attrs="131">\r
         <size>20</size>\r
       </method>\r
-      <method name="IEnumerable`1 &lt;&gt;m__5(&lt;&gt;__AnonType0`2[System.Int32,System.String])" attrs="131">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__5(&lt;&gt;__AnonType0`2[System.Int32,System.String])" attrs="131">\r
         <size>20</size>\r
       </method>\r
-      <method name="IEnumerable`1 &lt;&gt;m__9(Int32)" attrs="131">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__9(Int32)" attrs="131">\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-linq-08.cs">\r
       <method name="Int32 &lt;Main&gt;m__1(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(DataA, IEnumerable`1)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="IEnumerable`1 &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
-        <size>20</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>\r
       <method name="Int32 &lt;Main&gt;m__6(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(DataA, IEnumerable`1)" attrs="145">\r
-        <size>16</size>\r
-      </method>\r
-      <method name="IEnumerable`1 &lt;Main&gt;m__8(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
-        <size>20</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>\r
       <method name="Int32 &lt;Main&gt;m__B(DataB)" attrs="145">\r
         <size>15</size>\r
       </method>\r
-      <method name="DataA &lt;Main&gt;m__C(DataA, IEnumerable`1)" attrs="145">\r
-        <size>10</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="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
+        <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
+        <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
+        <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
+        <size>20</size>\r
+      </method>\r
+      <method name="DataA &lt;Main&gt;m__C(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-11.cs">\r
     <type name="IntoTest">\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="IEnumerable`1 &lt;XX&gt;m__1(&lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">\r
-        <size>117</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="IEnumerable`1 &lt;Main&gt;m__3(System.String)" attrs="145">\r
-        <size>44</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="IEnumerable`1 &lt;Main&gt;m__5(&lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">\r
-        <size>118</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
         <size>7</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
+        <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
+        <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
+        <size>118</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-13.cs">\r
     <type name="Program">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Extension">\r
-      <method name="IEnumerable`1 Cast[T](IFoo)" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
-    </type>\r
     <type name="MethodDefinition">\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Extension">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Cast[T](IFoo)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-14.cs">\r
     <type name="Person">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Extensions">\r
-      <method name="IMarker`1 Cast[T](IObjectContainer)" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
-      <method name="IMarker`1 Where[T](IMarker`1, System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]])" attrs="150">\r
-        <size>10</size>\r
-      </method>\r
-    </type>\r
     <type name="Program">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Extensions">\r
+      <method name="IMarker`1[T] Cast[T](IObjectContainer)" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+      <method name="IMarker`1[T] Where[T](IMarker`1[T], System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]])" attrs="150">\r
+        <size>10</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-15.cs">\r
     <type name="NameCollisionTest.Data">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="NameCollisionTest.Ex">\r
-      <method name="IEnumerable`1 Foo[T,TR](IEnumerable`1, System.Func`2[T,TR])" attrs="150">\r
-        <size>37</size>\r
-      </method>\r
-    </type>\r
     <type name="NameCollisionTest.C">\r
       <method name="Void Main()" attrs="150">\r
         <size>79</size>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;TR&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>93</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="NameCollisionTest.Ex">\r
+      <method name="System.Collections.Generic.IEnumerable`1[TR] Foo[T,TR](System.Collections.Generic.IEnumerable`1[T], System.Func`2[T,TR])" attrs="150">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+    <type name="NameCollisionTest.Ex+&lt;Foo&gt;c__Iterator0`2[T,TR]">\r
+      <method name="System.Collections.Generic.IEnumerator`1[TR] System.Collections.Generic.IEnumerable&lt;TR&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-16.cs">\r
     <type name="C">\r
       </method>\r
     </type>\r
     <type name="C+&lt;Test_1&gt;c__AnonStorey0">\r
-      <method name="IEnumerable`1 &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__2(Int32)" attrs="145">\r
         <size>16</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="C+&lt;Test_2&gt;c__AnonStorey1">\r
-      <method name="IEnumerable`1 &lt;&gt;m__4()" attrs="131">\r
-        <size>74</size>\r
-      </method>\r
       <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__5(Int32)" attrs="145">\r
         <size>16</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C+&lt;Test_1&gt;c__AnonStorey0">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0()" attrs="131">\r
+        <size>74</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__4()" attrs="131">\r
+        <size>74</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-17.cs">\r
     <type name="TestGroupBy">\r
       <method name="Boolean &lt;Main&gt;m__10(Int32)" attrs="145">\r
         <size>39</size>\r
       </method>\r
-      <method name="Int32 &lt;Main&gt;m__11(Int32, IEnumerable`1)" 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="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
   </test>\r
   <test name="gtest-linq-19.cs">\r
     <type name="Test">\r
       </method>\r
     </type>\r
     <type name="Program+&lt;Main&gt;c__AnonStorey0">\r
-      <method name="IEnumerable`1 &lt;&gt;m__0(Int32)" attrs="131">\r
-        <size>15</size>\r
-      </method>\r
       <method name="System.Action &lt;&gt;m__1(Int32, Int32)" attrs="131">\r
         <size>48</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Program+&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
+    </type>\r
   </test>\r
   <test name="gtest-linq-22.cs">\r
     <type name="Test.MainClass">\r
       <method name="Void &lt;Main&gt;m__0()" attrs="145">\r
         <size>162</size>\r
       </method>\r
-      <method name="IEnumerable`1 &lt;Main&gt;m__1(A)" attrs="145">\r
-        <size>15</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
         <size>21</size>\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
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-26.cs">\r
     <type name="Test.S`1[T]">\r
       </method>\r
     </type>\r
     <type name="C+&lt;Main&gt;c__AnonStorey0">\r
-      <method name="IEnumerable`1 &lt;&gt;m__1(System.String)" attrs="131">\r
-        <size>82</size>\r
-      </method>\r
       <method name="&lt;&gt;__AnonType0`2[System.String,System.Boolean] &lt;&gt;m__2(System.String)" attrs="145">\r
         <size>55</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C+&lt;Main&gt;c__AnonStorey0">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] &lt;&gt;m__1(System.String)" attrs="131">\r
+        <size>82</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-linq-28.cs">\r
     <type name="C">\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="IEnumerable`1 &lt;Main&gt;m__1(&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(Char)" attrs="145">\r
         <size>10</size>\r
       </method>\r
         <size>21</size>\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
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-named-01.cs">\r
     <type name="C">\r
   </test>\r
   <test name="gtest-optional-02.cs">\r
     <type name="C">\r
-      <method name="Boolean Test3(Nullable`1)" attrs="150">\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>160</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+      <method name="Boolean Test3(System.Nullable`1[System.Int32])" attrs="150">\r
         <size>29</size>\r
       </method>\r
-      <method name="Boolean Test2(Nullable`1)" attrs="150">\r
+      <method name="Boolean Test2(System.Nullable`1[System.Int32])" attrs="150">\r
         <size>19</size>\r
       </method>\r
-      <method name="Int32 Test(Nullable`1)" attrs="150">\r
+      <method name="Int32 Test(System.Nullable`1[System.Int32])" attrs="150">\r
         <size>35</size>\r
       </method>\r
-      <method name="Int64 Test4(Nullable`1)" attrs="150">\r
+      <method name="Int64 Test4(System.Nullable`1[System.Int64])" attrs="150">\r
         <size>16</size>\r
       </method>\r
-      <method name="Int32 Main()" attrs="150">\r
-        <size>160</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-03.cs">\r
       <method name="Void TestParams(Int32)" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="Void TestStruct(Nullable`1)" attrs="145">\r
-        <size>25</size>\r
-      </method>\r
-      <method name="Void TestStruct2(Nullable`1)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="System.String get_Item(Int32, System.String)" attrs="2182">\r
         <size>10</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void TestStruct(System.Nullable`1[System.Int32])" attrs="145">\r
+        <size>25</size>\r
+      </method>\r
+      <method name="Void TestStruct2(System.Nullable`1[S])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-optional-05.cs">\r
       <method name="Void I.Explicit()" attrs="481">\r
         <size>18</size>\r
       </method>\r
-      <method name="IEnumerable`1 Enumerator()" attrs="145">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void GenericMethod[T]()" attrs="134">\r
         <size>18</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>88</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="CallerMemberTest">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Enumerator()" attrs="145">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="CallerMemberTest+&lt;Enumerator&gt;c__Iterator0">\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
+    </type>\r
   </test>\r
   <test name="gtest-optional-23.cs">\r
     <type name="CallerLineNumberTest">\r
   </test>\r
   <test name="gtest-optional-27.cs">\r
     <type name="EnumWrapperCtor`1[T]">\r
-      <method name="Test getValue()" attrs="134">\r
-        <size>15</size>\r
-      </method>\r
       <method name="Void .ctor(Test)" attrs="6278">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="EnumWrapperCtor`1[T]">\r
+      <method name="EnumWrapperCtor`1+Test[T] getValue()" attrs="134">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-partial-01.cs">\r
     <type name="B`1[U]">\r
   </test>\r
   <test name="gtest-variance-11.cs">\r
     <type name="D">\r
-      <method name="Boolean Contra[T](IContravariant`1, IContravariant`1)" attrs="150">\r
-        <size>49</size>\r
-      </method>\r
-      <method name="Boolean Covariant[T](ICovariant`1, ICovariant`1)" attrs="150">\r
-        <size>49</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>58</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Boolean Contra[T](IContravariant`1[T], IContravariant`1[T])" attrs="150">\r
+        <size>49</size>\r
+      </method>\r
+      <method name="Boolean Covariant[T](ICovariant`1[T], ICovariant`1[T])" attrs="150">\r
+        <size>49</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-variance-12.cs">\r
   </test>\r
   <test name="gtest-variance-13.cs">\r
     <type name="A">\r
-      <method name="Void Foo[T](T, IList`1)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Void Test()" attrs="150">\r
         <size>18</size>\r
       </method>\r
       </method>\r
     </type>\r
     <type name="B">\r
-      <method name="Void Foo[T](T, I`1)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
-      <method name="Void Test[U](U, I`1)" 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="A">\r
+      <method name="Void Foo[T](T, System.Collections.Generic.IList`1[T])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+    </type>\r
+    <type name="B">\r
+      <method name="Void Foo[T](T, I`1[T])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void Test[U](U, I`1[U])" attrs="145">\r
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="gtest-variance-14.cs">\r
     <type name="A">\r
       </method>\r
     </type>\r
     <type name="C">\r
-      <method name="T Foo[T](T, I`1)" attrs="145">\r
-        <size>10</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>58</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="T Foo[T](T, I`1[T])" attrs="145">\r
+        <size>10</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="gtest-variance-17.cs">\r
   </test>\r
   <test name="gtest-variance-6.cs">\r
     <type name="Cov1`1[U]">\r
-      <method name="ICovariant`1 Invoke(IContravariant`1)" attrs="454">\r
-        <size>0</size>\r
-      </method>\r
-      <method name="IAsyncResult BeginInvoke(IContravariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
-      <method name="ICovariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+    </type>\r
+    <type name="Cov2`1[U]">\r
+      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
+    </type>\r
+    <type name="Cov3`1[U]">\r
       <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
     </type>\r
-    <type name="Cov2`1[U]">\r
-      <method name="ICovariant`1 Invoke(IContravariant`1)" attrs="454">\r
+    <type name="Cov4`1[U]">\r
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IAsyncResult BeginInvoke(IContravariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
-      <method name="ICovariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+    </type>\r
+    <type name="Cov5`1[U]">\r
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
       <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
     </type>\r
-    <type name="Cov3`1[U]">\r
-      <method name="ICovariant`1 Invoke(IContravariant`1)" attrs="454">\r
+    <type name="Contra5`1[U]">\r
+      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
-      <method name="IAsyncResult BeginInvoke(IContravariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+    </type>\r
+    <type name="Contra6`1[U]">\r
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="ICovariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
+    </type>\r
+    <type name="Contra7`1[U]">\r
       <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
     </type>\r
-    <type name="Cov4`1[U]">\r
-      <method name="ICovariant`1 Invoke()" attrs="454">\r
+    <type name="Contra8`1[U]">\r
+      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
         <size>0</size>\r
       </method>\r
-      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
-        <size>0</size>\r
+    </type>\r
+    <type name="Program">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>2</size>\r
       </method>\r
-      <method name="ICovariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
-        <size>0</size>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
       </method>\r
-      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+    </type>\r
+    <type name="Cov1`1[U]">\r
+      <method name="ICovariant`1[U] Invoke(IContravariant`1[U])" attrs="454">\r
         <size>0</size>\r
       </method>\r
-    </type>\r
-    <type name="Cov5`1[U]">\r
-      <method name="IContravariant`1 Invoke()" attrs="454">\r
+      <method name="IAsyncResult BeginInvoke(IContravariant`1[U], System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
+      <method name="ICovariant`1[U] EndInvoke(IAsyncResult)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+    </type>\r
+    <type name="Cov2`1[U]">\r
+      <method name="ICovariant`1[U] Invoke(IContravariant`1[ICovariant`1[U]])" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+      <method name="IAsyncResult BeginInvoke(IContravariant`1[ICovariant`1[U]], System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-    </type>\r
-    <type name="Contra5`1[U]">\r
-      <method name="IContravariant`1 Invoke(U, ICovariant`1)" attrs="454">\r
+      <method name="ICovariant`1[U] EndInvoke(IAsyncResult)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IAsyncResult BeginInvoke(U, ICovariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+    </type>\r
+    <type name="Cov3`1[U]">\r
+      <method name="ICovariant`1[IContravariant`1[IContravariant`1[U]]] Invoke(IContravariant`1[IContravariant`1[IContravariant`1[ICovariant`1[U]]]])" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+      <method name="IAsyncResult BeginInvoke(IContravariant`1[IContravariant`1[IContravariant`1[ICovariant`1[U]]]], System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+      <method name="ICovariant`1[IContravariant`1[IContravariant`1[U]]] EndInvoke(IAsyncResult)" attrs="454">\r
         <size>0</size>\r
       </method>\r
     </type>\r
-    <type name="Contra6`1[U]">\r
-      <method name="IContravariant`1 Invoke()" attrs="454">\r
+    <type name="Cov4`1[U]">\r
+      <method name="ICovariant`1[System.Int32] Invoke()" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
+      <method name="ICovariant`1[System.Int32] EndInvoke(IAsyncResult)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+    </type>\r
+    <type name="Cov5`1[U]">\r
+      <method name="IContravariant`1[System.Int32] Invoke()" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+      <method name="IContravariant`1[System.Int32] EndInvoke(IAsyncResult)" attrs="454">\r
         <size>0</size>\r
       </method>\r
     </type>\r
-    <type name="Contra7`1[U]">\r
-      <method name="IContravariant`1 Invoke(U, ICovariant`1)" attrs="454">\r
+    <type name="Contra5`1[U]">\r
+      <method name="IContravariant`1[U[]] Invoke(U, ICovariant`1[U])" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IAsyncResult BeginInvoke(U, ICovariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+      <method name="IAsyncResult BeginInvoke(U, ICovariant`1[U], System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+      <method name="IContravariant`1[U[]] EndInvoke(IAsyncResult)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+    </type>\r
+    <type name="Contra6`1[U]">\r
+      <method name="IContravariant`1[U[]] Invoke()" attrs="454">\r
         <size>0</size>\r
       </method>\r
-    </type>\r
-    <type name="Contra8`1[U]">\r
-      <method name="IContravariant`1 Invoke(U, ICovariant`1)" attrs="454">\r
+      <method name="IContravariant`1[U[]] EndInvoke(IAsyncResult)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IAsyncResult BeginInvoke(U, ICovariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+    </type>\r
+    <type name="Contra7`1[U]">\r
+      <method name="IContravariant`1[U] Invoke(U, ICovariant`1[U])" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+      <method name="IAsyncResult BeginInvoke(U, ICovariant`1[U], System.AsyncCallback, System.Object)" attrs="454">\r
         <size>0</size>\r
       </method>\r
-      <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+      <method name="IContravariant`1[U] EndInvoke(IAsyncResult)" attrs="454">\r
         <size>0</size>\r
       </method>\r
     </type>\r
-    <type name="Program">\r
-      <method name="Void Main()" attrs="150">\r
-        <size>2</size>\r
+    <type name="Contra8`1[U]">\r
+      <method name="IContravariant`1[ICovariant`1[U]] Invoke(U, ICovariant`1[U])" attrs="454">\r
+        <size>0</size>\r
       </method>\r
-      <method name="Void .ctor()" attrs="6278">\r
-        <size>7</size>\r
+      <method name="IAsyncResult BeginInvoke(U, ICovariant`1[U], System.AsyncCallback, System.Object)" attrs="454">\r
+        <size>0</size>\r
+      </method>\r
+      <method name="IContravariant`1[ICovariant`1[U]] EndInvoke(IAsyncResult)" attrs="454">\r
+        <size>0</size>\r
       </method>\r
     </type>\r
   </test>\r
   </test>\r
   <test name="gtest-variance-9.cs">\r
     <type name="Test">\r
-      <method name="Void Foo(IIn`1)" attrs="145">\r
-        <size>2</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>18</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void Foo(IIn`1[System.String])" attrs="145">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-1.cs">\r
         <size>2</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>51</size>\r
+        <size>178</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="Void test2()" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void test3()" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
+      <method name="Void test4()" attrs="134">\r
+        <size>2</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-182.cs">\r
     </type>\r
   </test>\r
   <test name="test-285.cs">\r
-    <type name="T">\r
-      <method name="Int32 Main()" attrs="150">\r
-        <size>11</size>\r
+    <type name="Test">\r
+      <method name="Int32 test1()" attrs="145">\r
+        <size>73</size>\r
+      </method>\r
+      <method name="Int32 test2()" attrs="145">\r
+        <size>73</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="145">\r
+        <size>46</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
   <test name="test-510.cs">\r
     <type name="Foo">\r
       <method name="Void test39(Int32 ByRef)" attrs="145">\r
-        <size>37</size>\r
+        <size>41</size>\r
       </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>29</size>\r
   <test name="test-618.cs">\r
     <type name="C">\r
       <method name="Void ZeroBasedReductions()" attrs="150">\r
-        <size>16</size>\r
+        <size>22</size>\r
       </method>\r
       <method name="Void ZeroBasedReductionsWithConversion()" attrs="150">\r
-        <size>16</size>\r
+        <size>18</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>41</size>\r
   <test name="test-640.cs">\r
     <type name="C">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>128</size>\r
+        <size>125</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
     </type>\r
     <type name="Program">\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>438</size>\r
+        <size>410</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       <method name="Int32 GetItem()" attrs="150">\r
         <size>59</size>\r
       </method>\r
-      <method name="IEnumerable`1 GetItems()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>76</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetItems()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;GetItems&gt;c__Iterator0">\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
+    </type>\r
   </test>\r
   <test name="test-anon-105.cs">\r
     <type name="Hello">\r
       </method>\r
     </type>\r
     <type name="Foo">\r
-      <method name="IEnumerable`1 Test(Foo)" attrs="134">\r
-        <size>42</size>\r
-      </method>\r
       <method name="Void Hello(Int32)" attrs="134">\r
         <size>20</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Foo&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>113</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Foo">\r
+      <method name="System.Collections.Generic.IEnumerable`1[Foo] Test(Foo)" attrs="134">\r
+        <size>42</size>\r
+      </method>\r
+    </type>\r
+    <type name="Foo+&lt;Test&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[Foo] System.Collections.Generic.IEnumerable&lt;Foo&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-106.cs">\r
     <type name="Foo`2[R,S]">\r
       </method>\r
     </type>\r
     <type name="X">\r
-      <method name="IEnumerable`1 Test(Int32)" attrs="150">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>62</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>181</size>\r
       </method>\r
         <size>23</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test(Int32)" attrs="150">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;Test&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-108.cs">\r
     <type name="Foo">\r
       <method name="Foo op_Implicit(Test)" attrs="2198">\r
         <size>38</size>\r
       </method>\r
-      <method name="IEnumerable`1 op_Addition(Test, Test)" attrs="2198">\r
-        <size>37</size>\r
-      </method>\r
-      <method name="IEnumerable`1 get_Foo()" attrs="2182">\r
-        <size>23</size>\r
-      </method>\r
-      <method name="Void set_Foo(IEnumerable`1)" attrs="2182">\r
-        <size>12</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>82</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;Test&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>113</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>72</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] get_Foo()" attrs="2182">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="Void set_Foo(System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="2182">\r
+        <size>12</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[Test] op_Addition(Test, Test)" attrs="2198">\r
+        <size>37</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;op_Addition&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[Test] System.Collections.Generic.IEnumerable&lt;Test&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;&gt;c__Iterator1">\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
+    </type>\r
   </test>\r
   <test name="test-anon-11.cs">\r
     <type name="D">\r
   </test>\r
   <test name="test-anon-110.cs">\r
     <type name="X">\r
-      <method name="IEnumerable`1 Test[T](T, T)" attrs="134">\r
-        <size>44</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>110</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>125</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="X">\r
+      <method name="System.Collections.Generic.IEnumerable`1[T] Test[T](T, T)" attrs="134">\r
+        <size>44</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;Test&gt;c__Iterator0`1[T]">\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
+    </type>\r
   </test>\r
   <test name="test-anon-111.cs">\r
     <type name="Foo">\r
       <method name="Void Closure(EmptyDelegate)" attrs="145">\r
         <size>2</size>\r
       </method>\r
-      <method name="System.Collections.Generic.List`1[T] Query[T](Nullable`1 ByRef)" attrs="145">\r
-        <size>61</size>\r
-      </method>\r
       <method name="T MakeSomething[T]()" attrs="145">\r
         <size>15</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="BaseObject">\r
+      <method name="System.Collections.Generic.List`1[T] Query[T](System.Nullable`1[System.Int32] ByRef)" attrs="145">\r
+        <size>61</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-122.cs">\r
     <type name="D1">\r
   </test>\r
   <test name="test-anon-123.cs">\r
     <type name="MemberAccessData">\r
-      <method name="Void set_MyTypeProperty(Nullable`1)" attrs="2182">\r
-        <size>9</size>\r
-      </method>\r
-      <method name="Nullable`1 get_MyTypeProperty()" attrs="2182">\r
-        <size>15</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="MemberAccessData">\r
+      <method name="Void set_MyTypeProperty(System.Nullable`1[System.Int32])" attrs="2182">\r
+        <size>9</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Int32] get_MyTypeProperty()" attrs="2182">\r
+        <size>15</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-124.cs">\r
     <type name="Disposable`1[T]">\r
         <size>42</size>\r
       </method>\r
       <method name="Int32 Main()" attrs="150">\r
-        <size>645</size>\r
+        <size>683</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="Test+&lt;Finally&gt;c__AnonStorey6`1[T]">\r
+    <type name="Test+&lt;ArrayMultiMutate&gt;c__AnonStoreyC`1[T]">\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test">\r
+      <method name="System.Func`1[T] Catch_2[T](T)" attrs="145">\r
+        <size>34</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;Catch_2&gt;c__AnonStorey6`1[T]">\r
       <method name="T &lt;&gt;m__6()" attrs="131">\r
-        <size>62</size>\r
+        <size>42</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Test+&lt;Using&gt;c__AnonStorey7`1[T]">\r
+    <type name="Test+&lt;Finally&gt;c__AnonStorey7`1[T]">\r
       <method name="T &lt;&gt;m__7()" attrs="131">\r
-        <size>15</size>\r
+        <size>62</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Test+&lt;Switch&gt;c__AnonStorey8`1[T]">\r
+    <type name="Test+&lt;Using&gt;c__AnonStorey8`1[T]">\r
       <method name="T &lt;&gt;m__8()" attrs="131">\r
-        <size>16</size>\r
+        <size>15</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Test+&lt;ForForeach&gt;c__AnonStorey9`1[T]">\r
-      <method name="System.Collections.Generic.List`1[T] &lt;&gt;m__9()" attrs="131">\r
-        <size>67</size>\r
+    <type name="Test+&lt;Switch&gt;c__AnonStorey9`1[T]">\r
+      <method name="T &lt;&gt;m__9()" attrs="131">\r
+        <size>16</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Test+&lt;ArrayMutate&gt;c__AnonStoreyA`1[T]">\r
-      <method name="Void &lt;&gt;m__A(Int32)" attrs="131">\r
-        <size>39</size>\r
+    <type name="Test+&lt;ForForeach&gt;c__AnonStoreyA`1[T]">\r
+      <method name="System.Collections.Generic.List`1[T] &lt;&gt;m__A()" attrs="131">\r
+        <size>67</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Test+&lt;ArrayMultiMutate&gt;c__AnonStoreyB`1[T]">\r
-      <method name="T[][] &lt;&gt;m__B()" attrs="131">\r
-        <size>58</size>\r
+    <type name="Test+&lt;ArrayMutate&gt;c__AnonStoreyB`1[T]">\r
+      <method name="Void &lt;&gt;m__B(Int32)" attrs="131">\r
+        <size>39</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
     <type name="Test+&lt;ArrayMultiMutate&gt;c__AnonStoreyC`1[T]">\r
-      <method name="Int32 &lt;&gt;m__C()" attrs="131">\r
+      <method name="T[][] &lt;&gt;m__C()" attrs="131">\r
+        <size>58</size>\r
+      </method>\r
+    </type>\r
+    <type name="Test+&lt;ArrayMultiMutate&gt;c__AnonStoreyD`1[T]">\r
+      <method name="Int32 &lt;&gt;m__D()" attrs="131">\r
         <size>35</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
     </type>\r
-    <type name="Test+&lt;NestedTypeMutate&gt;c__AnonStoreyD`1[T]">\r
-      <method name="T[] &lt;&gt;m__D()" attrs="131">\r
+    <type name="Test+&lt;NestedTypeMutate&gt;c__AnonStoreyE`1[T]">\r
+      <method name="T[] &lt;&gt;m__E()" attrs="131">\r
         <size>45</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
       </method>\r
     </type>\r
     <type name="Test">\r
-      <method name="Void Foo[T](IEqualityComparer`1)" attrs="145">\r
-        <size>28</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>16</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Void Foo[T](System.Collections.Generic.IEqualityComparer`1[T])" attrs="145">\r
+        <size>28</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-126.cs">\r
     <type name="MonoBugs.BrokenGenericCast">\r
       <method name="Boolean TryAction[T](Test+Creator`1[T], T ByRef)" attrs="145">\r
         <size>25</size>\r
       </method>\r
-      <method name="Boolean Func1[T](IList`1, Boolean, T ByRef)" attrs="145">\r
-        <size>40</size>\r
-      </method>\r
-      <method name="T Item[T](IList`1)" attrs="150">\r
-        <size>15</size>\r
-      </method>\r
-      <method name="T GetSingleItem[T](IList`1)" attrs="150">\r
-        <size>18</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>16</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Boolean Func1[T](System.Collections.Generic.IList`1[T], Boolean, T ByRef)" attrs="145">\r
+        <size>40</size>\r
+      </method>\r
+      <method name="T Item[T](System.Collections.Generic.IList`1[T])" attrs="150">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="T GetSingleItem[T](System.Collections.Generic.IList`1[T])" attrs="150">\r
+        <size>18</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-13.cs">\r
     <type name="D">\r
       <method name="Void Assert(System.Action`1[System.Int32])" attrs="150">\r
         <size>10</size>\r
       </method>\r
-      <method name="Void Foo[T](IList`1)" attrs="150">\r
-        <size>32</size>\r
-      </method>\r
       <method name="Void Main(System.String[])" attrs="150">\r
         <size>8</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
-  </test>\r
-  <test name="test-anon-133.cs">\r
-    <type name="IEnumerableRocks">\r
-      <method name="System.String Implode[TSource,TResult](IEnumerable`1, System.String, System.Func`2[TSource,TResult])" attrs="150">\r
-        <size>41</size>\r
-      </method>\r
-      <method name="System.String Implode[TSource](IEnumerable`1, System.String, System.Action`2[System.Text.StringBuilder,TSource])" attrs="150">\r
-        <size>146</size>\r
+    <type name="Program">\r
+      <method name="Void Foo[T](System.Collections.Generic.IList`1[T])" attrs="150">\r
+        <size>32</size>\r
       </method>\r
     </type>\r
+  </test>\r
+  <test name="test-anon-133.cs">\r
     <type name="Test">\r
       <method name="Void Main()" attrs="150">\r
         <size>68</size>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="IEnumerableRocks">\r
+      <method name="System.String Implode[TSource,TResult](System.Collections.Generic.IEnumerable`1[TSource], System.String, System.Func`2[TSource,TResult])" attrs="150">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.String Implode[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.String, System.Action`2[System.Text.StringBuilder,TSource])" attrs="150">\r
+        <size>146</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-134.cs">\r
     <type name="MyClass">\r
   </test>\r
   <test name="test-anon-138.cs">\r
     <type name="Foo`1[T]">\r
-      <method name="Boolean ContainsAll[U](IEnumerable`1)" attrs="134">\r
-        <size>48</size>\r
-      </method>\r
       <method name="Boolean Contains(T)" attrs="134">\r
         <size>10</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Foo`1[T]">\r
+      <method name="Boolean ContainsAll[U](System.Collections.Generic.IEnumerable`1[U])" attrs="134">\r
+        <size>48</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-139.cs">\r
     <type name="Test">\r
       <method name="Void Test_1[T](T)" attrs="134">\r
         <size>34</size>\r
       </method>\r
-      <method name="Void Test_2[T](Nullable`1)" attrs="134">\r
-        <size>34</size>\r
-      </method>\r
       <method name="T Test_3[T](System.Object)" attrs="134">\r
         <size>59</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Test">\r
+      <method name="Void Test_2[T](System.Nullable`1[T])" attrs="134">\r
+        <size>34</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-14.cs">\r
     <type name="X">\r
   </test>\r
   <test name="test-anon-141.cs">\r
     <type name="C">\r
-      <method name="Decimal Average[TSource](IEnumerable`1, System.Func`2[TSource,System.Decimal])" attrs="150">\r
-        <size>45</size>\r
-      </method>\r
-      <method name="TResult Average[TElement,TAggregate,TResult](IEnumerable`1, System.Func`3[TAggregate,TElement,TAggregate], System.Func`3[TAggregate,TElement,TResult])" attrs="145">\r
-        <size>7</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
       <method name="Decimal &lt;Average`1&gt;m__1[TSource](Decimal, Decimal)" attrs="145">\r
         <size>15</size>\r
       </method>\r
+      <method name="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="TResult Average[TElement,TAggregate,TResult](System.Collections.Generic.IEnumerable`1[TElement], System.Func`3[TAggregate,TElement,TAggregate], System.Func`3[TAggregate,TElement,TResult])" attrs="145">\r
+        <size>7</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-anon-142.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>33</size>\r
       </method>\r
-      <method name="Void Test[T](IList`1)" attrs="150">\r
-        <size>34</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>47</size>\r
       </method>\r
-      <method name="Int32 &lt;&gt;m__1(IList`1)" 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="TestCase">\r
+      <method name="Void Test[T](System.Collections.Generic.IList`1[System.Collections.Generic.IList`1[T]])" attrs="150">\r
+        <size>34</size>\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
+        <size>9</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-anon-162.cs">\r
     <type name="D">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-anon-171.cs">\r
+    <type name="TestAnonSwitch.MyClass">\r
+      <method name="Void add_FirstEvent(System.EventHandler`1[System.EventArgs])" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void remove_FirstEvent(System.EventHandler`1[System.EventArgs])" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void add_SecondEvent(System.EventHandler`1[System.EventArgs])" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void remove_SecondEvent(System.EventHandler`1[System.EventArgs])" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void Trigger()" attrs="134">\r
+        <size>30</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="TestAnonSwitch.Tester">\r
+      <method name="Void Test()" attrs="134">\r
+        <size>157</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="TestAnonSwitch.MainClass">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="TestAnonSwitch.Tester+&lt;Test&gt;c__AnonStorey0">\r
+      <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)" attrs="131">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="Void &lt;&gt;m__1(System.Object, System.EventArgs)" attrs="131">\r
+        <size>23</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="test-anon-18.cs">\r
     <type name="A">\r
       <method name="Void Invoke()" attrs="454">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>135</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-anon-51.cs">\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_7&gt;c__async6">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>385</size>\r
+        <size>426</size>\r
       </method>\r
       <method name="Int32 &lt;&gt;m__14()" attrs="145">\r
         <size>9</size>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_8&gt;c__async7">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>670</size>\r
+        <size>792</size>\r
       </method>\r
       <method name="Int32 &lt;&gt;m__15()" attrs="145">\r
         <size>9</size>\r
       <method name="Void MoveNext()" attrs="486">\r
         <size>273</size>\r
       </method>\r
-      <method name="Nullable`1 &lt;&gt;m__1F()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
     </type>\r
     <type name="Tester+&lt;AssignTest_3&gt;c__asyncB">\r
       <method name="Void MoveNext()" attrs="486">\r
     </type>\r
     <type name="Tester+&lt;BinaryTest_3&gt;c__asyncE">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>1082</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__28()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__29()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__2A()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__2B()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__2C()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__2D()" attrs="145">\r
-        <size>14</size>\r
+        <size>1137</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;BinaryTest_4&gt;c__asyncF">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>809</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__2E()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__2F()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__30()" attrs="145">\r
-        <size>20</size>\r
-      </method>\r
-      <method name="Nullable`1 &lt;&gt;m__31()" attrs="145">\r
-        <size>17</size>\r
+        <size>872</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;ArrayAccessTest_1&gt;c__async0">\r
       <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
-      <method name="Nullable`1 &lt;&gt;m__3D()" attrs="145">\r
-        <size>17</size>\r
-      </method>\r
       <method name="Byte &lt;&gt;m__3E()" attrs="145">\r
         <size>9</size>\r
       </method>\r
       <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
-      <method name="Nullable`1 &lt;&gt;m__59()" attrs="145">\r
-        <size>14</size>\r
-      </method>\r
     </type>\r
     <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2A">\r
       <method name="Void MoveNext()" attrs="486">\r
     </type>\r
     <type name="Tester+&lt;UnaryTest_2&gt;c__async3C">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>354</size>\r
+        <size>339</size>\r
       </method>\r
       <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
     </type>\r
     <type name="Tester+&lt;UnaryTest_3&gt;c__async3D">\r
       <method name="Void MoveNext()" attrs="486">\r
-        <size>369</size>\r
+        <size>372</size>\r
       </method>\r
       <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
         <size>13</size>\r
       </method>\r
     </type>\r
     <type name="Tester+&lt;UnaryTest_2&gt;c__async3C+&lt;UnaryTest_2&gt;c__AnonStorey47">\r
-      <method name="Nullable`1 &lt;&gt;m__7D()" attrs="131">\r
-        <size>14</size>\r
-      </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</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__1F()" attrs="145">\r
+        <size>17</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__28()" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__29()" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2A()" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2B()" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2C()" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2D()" attrs="145">\r
+        <size>14</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__2E()" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Byte] &lt;&gt;m__2F()" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__30()" attrs="145">\r
+        <size>20</size>\r
+      </method>\r
+      <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__31()" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;CoalescingTest_2&gt;c__async19">\r
+      <method name="System.Nullable`1[System.Int16] &lt;&gt;m__3D()" attrs="145">\r
+        <size>17</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;IsTest_2&gt;c__async29">\r
+      <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__59()" attrs="145">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
+    <type name="Tester+&lt;UnaryTest_2&gt;c__async3C+&lt;UnaryTest_2&gt;c__AnonStorey47">\r
+      <method name="System.Nullable`1[System.Int16] &lt;&gt;m__7D()" attrs="131">\r
+        <size>14</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-14.cs">\r
     <type name="C">\r
   </test>\r
   <test name="test-async-30.cs">\r
     <type name="C">\r
-      <method name="IEnumerable`1 Test(System.String)" attrs="129">\r
-        <size>30</size>\r
-      </method>\r
-      <method name="IEnumerable`1 Test2()" attrs="129">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Int32 Main()" attrs="150">\r
         <size>214</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>138</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>137</size>\r
       </method>\r
         <size>13</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.String] Test(System.String)" attrs="129">\r
+        <size>30</size>\r
+      </method>\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.String] Test2()" attrs="129">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test2&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable&lt;string&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-async-31.cs">\r
     <type name="C">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-async-42.cs">\r
+    <type name="A">\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] OpenAsync()" attrs="134">\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="A get_Connection()" attrs="2182">\r
+        <size>14</size>\r
+      </method>\r
+      <method name="Int32 Main()" attrs="150">\r
+        <size>26</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task`1[System.Int32] Foo()" attrs="129">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="T Test[T](System.Func`1[T])" attrs="129">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task &lt;Foo&gt;m__0()" attrs="129">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Foo&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>189</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Foo&gt;c__async3">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>169</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
   <test name="test-async-43.cs">\r
     <type name="A">\r
       <method name="System.Threading.Tasks.Task`1[System.Int32] GetValue(Int32)" attrs="134">\r
       </method>\r
     </type>\r
   </test>\r
+  <test name="test-async-47.cs">\r
+    <type name="C">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>12</size>\r
+      </method>\r
+      <method name="Void Test()" attrs="129">\r
+        <size>32</size>\r
+      </method>\r
+      <method name="Void &lt;Test&gt;m__0(System.Object, System.EventArgs)" attrs="129">\r
+        <size>35</size>\r
+      </method>\r
+      <method name="Void &lt;Test&gt;m__1()" attrs="129">\r
+        <size>8</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="View">\r
+      <method name="Void add_Click(System.EventHandler)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void remove_Click(System.EventHandler)" attrs="2182">\r
+        <size>42</size>\r
+      </method>\r
+      <method name="Void Run()" attrs="134">\r
+        <size>15</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="Builder">\r
+      <method name="Void SetButton(System.Action)" attrs="134">\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+&lt;Test&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>61</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+  </test>\r
+  <test name="test-async-48.cs">\r
+    <type name="App">\r
+      <method name="System.Threading.Tasks.Task Test()" attrs="134">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="System.Threading.Tasks.Task &lt;Test&gt;m__0()" attrs="129">\r
+        <size>41</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>18</size>\r
+      </method>\r
+    </type>\r
+    <type name="X">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>19</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="App+&lt;Test&gt;c__async0">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>173</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
+        <size>13</size>\r
+      </method>\r
+    </type>\r
+    <type name="App+&lt;Test&gt;c__async1">\r
+      <method name="Void MoveNext()" attrs="486">\r
+        <size>51</size>\r
+      </method>\r
+      <method name="Void SetStateMachine(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 Switch_1(Int32)" attrs="129">\r
         <size>61</size>\r
       </method>\r
-      <method name="Void Switch_2(Nullable`1)" attrs="129">\r
-        <size>57</size>\r
-      </method>\r
       <method name="Void Switch_3(System.String)" attrs="129">\r
         <size>211</size>\r
       </method>\r
       <method name="Void ForEach_4(System.Int32[,])" attrs="129">\r
         <size>78</size>\r
       </method>\r
+      <method name="Void Switch_2(System.Nullable`1[System.Int32])" attrs="129">\r
+        <size>57</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-debug-12.cs">\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
-      <method name="IEnumerable`1 Iter_1()" attrs="129">\r
-        <size>23</size>\r
-      </method>\r
       <method name="IEnumerable Iter_2()" attrs="129">\r
         <size>23</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>72</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>26</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Iter_1()" attrs="129">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Iter_1&gt;c__Iterator0">\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
+    </type>\r
+    <type name="C+&lt;Iter_2&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-debug-14.cs">\r
     <type name="C">\r
   </test>\r
   <test name="test-debug-21.cs">\r
     <type name="C">\r
-      <method name="IEnumerable`1 Test()" attrs="129">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>2</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Void &lt;&gt;__Finally0()" attrs="129">\r
         <size>13</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="129">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;Test&gt;c__Iterator0">\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
+    </type>\r
   </test>\r
   <test name="test-debug-22.cs">\r
     <type name="A">\r
       </method>\r
     </type>\r
     <type name="C">\r
-      <method name="IEnumerable`1 GetIter()" attrs="134">\r
-        <size>30</size>\r
-      </method>\r
       <method name="Int32 Foo()" attrs="198">\r
         <size>7</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>82</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="C">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIter()" attrs="134">\r
+        <size>30</size>\r
+      </method>\r
+    </type>\r
+    <type name="C+&lt;GetIter&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-debug-23.cs">\r
     <type name="Program">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>149</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-02.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>159</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>246</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="X+&lt;GetIt&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;GetMulti&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-iter-04.cs">\r
     <type name="X">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>130</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-05.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>191</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-06.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>198</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>159</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>154</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>159</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="S+&lt;Get&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
+    </type>\r
+    <type name="S+&lt;GetS&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;Get&gt;c__Iterator2">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
+    <type name="X+&lt;GetS&gt;c__Iterator3">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-iter-07.cs">\r
     <type name="Test">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>264</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-08.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>377</size>\r
       </method>\r
       <method name="Void &lt;&gt;__Finally0()" attrs="129">\r
         <size>23</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-09.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>168</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-11.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>190</size>\r
       </method>\r
       <method name="Void &lt;&gt;__Finally0()" attrs="129">\r
         <size>20</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-13.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>27</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-14.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>98</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-15.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>38</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-17.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>168</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-18.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>214</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-iter-19.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>40</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>242</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="X+&lt;GetIt&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>40</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-iter-22.cs">\r
     <type name="Test">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>117</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="X+&lt;GetIt2&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-iter-25.cs">\r
     <type name="D">\r
       <method name="Void RunOnThread(System.Action)" attrs="150">\r
         <size>8</size>\r
       </method>\r
-      <method name="IEnumerable`1 TagsError()" attrs="150">\r
-        <size>23</size>\r
-      </method>\r
       <method name="Void Main()" attrs="150">\r
         <size>68</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>60</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="UploadAction">\r
+      <method name="System.Collections.Generic.IEnumerable`1[System.Object] TagsError()" attrs="150">\r
+        <size>23</size>\r
+      </method>\r
+    </type>\r
+    <type name="UploadAction+&lt;TagsError&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-iter-26.cs">\r
     <type name="C">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>52</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>101</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>52</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-named-01.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>76</size>\r
       </method>\r
       <method name="Void .ctor()" attrs="6278">\r
         <size>7</size>\r
       </method>\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
     </type>\r
   </test>\r
   <test name="test-partial-13.cs">\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>32</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>32</size>\r
       </method>\r
       <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
         <size>14</size>\r
       </method>\r
-      <method name="IEnumerator`1 System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
-        <size>26</size>\r
-      </method>\r
       <method name="Boolean MoveNext()" attrs="486">\r
         <size>32</size>\r
       </method>\r
         <size>7</size>\r
       </method>\r
     </type>\r
+    <type name="Foo.X+&lt;Attempts2&gt;c__Iterator0">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="Foo.X+&lt;&gt;c__Iterator1">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
+    <type name="Foo.X+&lt;&gt;c__Iterator2">\r
+      <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">\r
+        <size>26</size>\r
+      </method>\r
+    </type>\r
   </test>\r
   <test name="test-partial-16.cs">\r
     <type name="A.C">\r
diff --git a/mcs/tools/ildasm/DataConverter.cs b/mcs/tools/ildasm/DataConverter.cs
deleted file mode 100644 (file)
index d0bf047..0000000
+++ /dev/null
@@ -1,1836 +0,0 @@
-//
-// Authors:
-//   Miguel de Icaza (miguel@novell.com)
-//
-// See the following url for documentation:
-//     http://www.mono-project.com/Mono_DataConvert
-//
-// Compilation Options:
-//     MONO_DATACONVERTER_PUBLIC:
-//         Makes the class public instead of the default internal.
-//
-//     MONO_DATACONVERTER_STATIC_METHODS:     
-//         Exposes the public static methods.
-//
-// TODO:
-//   Support for "DoubleWordsAreSwapped" for ARM devices
-//
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections;
-using System.Text;
-
-#pragma warning disable 3021
-
-namespace Mono {
-
-#if MONO_DATACONVERTER_PUBLIC
-       unsafe public abstract class DataConverter {
-#else
-       unsafe internal abstract class DataConverter {
-
-// Disables the warning: CLS compliance checking will not be performed on
-//  `XXXX' because it is not visible from outside this assembly
-#pragma warning disable  3019
-#endif
-               static DataConverter SwapConv = new SwapConverter ();
-               static DataConverter CopyConv = new CopyConverter ();
-
-               public static readonly bool IsLittleEndian = BitConverter.IsLittleEndian;
-                       
-               public abstract double GetDouble (byte [] data, int index);
-               public abstract float  GetFloat  (byte [] data, int index);
-               public abstract long   GetInt64  (byte [] data, int index);
-               public abstract int    GetInt32  (byte [] data, int index);
-
-               public abstract short  GetInt16  (byte [] data, int index);
-
-                [CLSCompliant (false)]
-               public abstract uint   GetUInt32 (byte [] data, int index);
-                [CLSCompliant (false)]
-               public abstract ushort GetUInt16 (byte [] data, int index);
-                [CLSCompliant (false)]
-               public abstract ulong  GetUInt64 (byte [] data, int index);
-               
-               public abstract void PutBytes (byte [] dest, int destIdx, double value);
-               public abstract void PutBytes (byte [] dest, int destIdx, float value);
-               public abstract void PutBytes (byte [] dest, int destIdx, int value);
-               public abstract void PutBytes (byte [] dest, int destIdx, long value);
-               public abstract void PutBytes (byte [] dest, int destIdx, short value);
-
-                [CLSCompliant (false)]
-               public abstract void PutBytes (byte [] dest, int destIdx, ushort value);
-                [CLSCompliant (false)]
-               public abstract void PutBytes (byte [] dest, int destIdx, uint value);
-                [CLSCompliant (false)]
-               public abstract void PutBytes (byte [] dest, int destIdx, ulong value);
-
-               public byte[] GetBytes (double value)
-               {
-                       byte [] ret = new byte [8];
-                       PutBytes (ret, 0, value);
-                       return ret;
-               }
-               
-               public byte[] GetBytes (float value)
-               {
-                       byte [] ret = new byte [4];
-                       PutBytes (ret, 0, value);
-                       return ret;
-               }
-               
-               public byte[] GetBytes (int value)
-               {
-                       byte [] ret = new byte [4];
-                       PutBytes (ret, 0, value);
-                       return ret;
-               }
-               
-               public byte[] GetBytes (long value)
-               {
-                       byte [] ret = new byte [8];
-                       PutBytes (ret, 0, value);
-                       return ret;
-               }
-               
-               public byte[] GetBytes (short value)
-               {
-                       byte [] ret = new byte [2];
-                       PutBytes (ret, 0, value);
-                       return ret;
-               }
-
-                [CLSCompliant (false)]
-               public byte[] GetBytes (ushort value)
-               {
-                       byte [] ret = new byte [2];
-                       PutBytes (ret, 0, value);
-                       return ret;
-               }
-               
-                [CLSCompliant (false)]
-               public byte[] GetBytes (uint value)
-               {
-                       byte [] ret = new byte [4];
-                       PutBytes (ret, 0, value);
-                       return ret;
-               }
-               
-                [CLSCompliant (false)]
-               public byte[] GetBytes (ulong value)
-               {
-                       byte [] ret = new byte [8];
-                       PutBytes (ret, 0, value);
-                       return ret;
-               }
-               
-               static public DataConverter LittleEndian {
-                       get {
-                               return BitConverter.IsLittleEndian ? CopyConv : SwapConv;
-                       }
-               }
-
-               static public DataConverter BigEndian {
-                       get {
-                               return BitConverter.IsLittleEndian ? SwapConv : CopyConv;
-                       }
-               }
-
-               static public DataConverter Native {
-                       get {
-                               return CopyConv;
-                       }
-               }
-
-               static int Align (int current, int align)
-               {
-                       return ((current + align - 1) / align) * align;
-               }
-                       
-               class PackContext {
-                       // Buffer
-                       public byte [] buffer;
-                       int next;
-
-                       public string description;
-                       public int i; // position in the description
-                       public DataConverter conv;
-                       public int repeat;
-                       
-                       //
-                       // if align == -1, auto align to the size of the byte array
-                       // if align == 0, do not do alignment
-                       // Any other values aligns to that particular size
-                       //
-                       public int align;
-
-                       public void Add (byte [] group)
-                       {
-                               //Console.WriteLine ("Adding {0} bytes to {1} (next={2}", group.Length,
-                               // buffer == null ? "null" : buffer.Length.ToString (), next);
-                               
-                               if (buffer == null){
-                                       buffer = group;
-                                       next = group.Length;
-                                       return;
-                               }
-                               if (align != 0){
-                                       if (align == -1)
-                                               next = Align (next, group.Length);
-                                       else
-                                               next = Align (next, align);
-                                       align = 0;
-                               }
-
-                               if (next + group.Length > buffer.Length){
-                                       byte [] nb = new byte [System.Math.Max (next, 16) * 2 + group.Length];
-                                       Array.Copy (buffer, nb, buffer.Length);
-                                       Array.Copy (group, 0, nb, next, group.Length);
-                                       next = next + group.Length;
-                                       buffer = nb;
-                               } else {
-                                       Array.Copy (group, 0, buffer, next, group.Length);
-                                       next += group.Length;
-                               }
-                       }
-
-                       public byte [] Get ()
-                       {
-                               if (buffer == null)
-                                       return new byte [0];
-                               
-                               if (buffer.Length != next){
-                                       byte [] b = new byte [next];
-                                       Array.Copy (buffer, b, next);
-                                       return b;
-                               }
-                               return buffer;
-                       }
-               }
-
-               //
-               // Format includes:
-               // Control:
-               //   ^    Switch to big endian encoding
-               //   _    Switch to little endian encoding
-               //   %    Switch to host (native) encoding
-               //   !    aligns the next data type to its natural boundary (for strings this is 4).
-               //
-               // Types:
-               //   s    Int16
-               //   S    UInt16
-               //   i    Int32
-               //   I    UInt32
-               //   l    Int64
-               //   L    UInt64
-               //   f    float
-               //   d    double
-               //   b    byte
-                //   c    1-byte signed character
-                //   C    1-byte unsigned character
-               //   z8   string encoded as UTF8 with 1-byte null terminator
-               //   z6   string encoded as UTF16 with 2-byte null terminator
-               //   z7   string encoded as UTF7 with 1-byte null terminator
-               //   zb   string encoded as BigEndianUnicode with 2-byte null terminator
-               //   z3   string encoded as UTF32 with 4-byte null terminator
-               //   z4   string encoded as UTF32 big endian with 4-byte null terminator
-               //   $8   string encoded as UTF8
-               //   $6   string encoded as UTF16
-               //   $7   string encoded as UTF7
-               //   $b   string encoded as BigEndianUnicode
-               //   $3   string encoded as UTF32
-               //   $4   string encoded as UTF-32 big endian encoding
-               //   x    null byte
-               //
-               // Repeats, these are prefixes:
-               //   N    a number between 1 and 9, indicates a repeat count (process N items
-               //        with the following datatype
-               //   [N]  For numbers larger than 9, use brackets, for example [20]
-               //   *    Repeat the next data type until the arguments are exhausted
-               //
-               static public byte [] Pack (string description, params object [] args)
-               {
-                       int argn = 0;
-                       PackContext b = new PackContext ();
-                       b.conv = CopyConv;
-                       b.description = description;
-
-                       for (b.i = 0; b.i < description.Length; ){
-                               object oarg;
-
-                               if (argn < args.Length)
-                                       oarg = args [argn];
-                               else {
-                                       if (b.repeat != 0)
-                                               break;
-                                       
-                                       oarg = null;
-                               }
-
-                               int save = b.i;
-                               
-                               if (PackOne (b, oarg)){
-                                       argn++;
-                                       if (b.repeat > 0){
-                                               if (--b.repeat > 0)
-                                                       b.i = save;
-                                               else
-                                                       b.i++;
-                                       } else
-                                               b.i++;
-                               } else
-                                       b.i++;
-                       }
-                       return b.Get ();
-               }
-
-               static public byte [] PackEnumerable (string description, IEnumerable args)
-               {
-                       PackContext b = new PackContext ();
-                       b.conv = CopyConv;
-                       b.description = description;
-                       
-                       IEnumerator enumerator = args.GetEnumerator ();
-                       bool ok = enumerator.MoveNext ();
-
-                       for (b.i = 0; b.i < description.Length; ){
-                               object oarg;
-
-                               if (ok)
-                                       oarg = enumerator.Current;
-                               else {
-                                       if (b.repeat != 0)
-                                               break;
-                                       oarg = null;
-                               }
-                                               
-                               int save = b.i;
-                               
-                               if (PackOne (b, oarg)){
-                                       ok = enumerator.MoveNext ();
-                                       if (b.repeat > 0){
-                                               if (--b.repeat > 0)
-                                                       b.i = save;
-                                               else
-                                                       b.i++;
-                                       } else
-                                               b.i++;
-                               } else
-                                       b.i++;
-                       }
-                       return b.Get ();
-               }
-                       
-               //
-               // Packs one datum `oarg' into the buffer `b', using the string format
-               // in `description' at position `i'
-               //
-               // Returns: true if we must pick the next object from the list
-               //
-               static bool PackOne (PackContext b, object oarg)
-               {
-                       int n;
-                       
-                       switch (b.description [b.i]){
-                       case '^':
-                               b.conv = BigEndian;
-                               return false;
-                       case '_':
-                               b.conv = LittleEndian;
-                               return false;
-                       case '%':
-                               b.conv = Native;
-                               return false;
-
-                       case '!':
-                               b.align = -1;
-                               return false;
-                               
-                       case 'x':
-                               b.Add (new byte [] { 0 });
-                               return false;
-                               
-                               // Type Conversions
-                       case 'i':
-                               b.Add (b.conv.GetBytes (Convert.ToInt32 (oarg)));
-                               break;
-                               
-                       case 'I':
-                               b.Add (b.conv.GetBytes (Convert.ToUInt32 (oarg)));
-                               break;
-                               
-                       case 's':
-                               b.Add (b.conv.GetBytes (Convert.ToInt16 (oarg)));
-                               break;
-                               
-                       case 'S':
-                               b.Add (b.conv.GetBytes (Convert.ToUInt16 (oarg)));
-                               break;
-                               
-                       case 'l':
-                               b.Add (b.conv.GetBytes (Convert.ToInt64 (oarg)));
-                               break;
-                               
-                       case 'L':
-                               b.Add (b.conv.GetBytes (Convert.ToUInt64 (oarg)));
-                               break;
-                               
-                       case 'f':
-                               b.Add (b.conv.GetBytes (Convert.ToSingle (oarg)));
-                               break;
-                               
-                       case 'd':
-                               b.Add (b.conv.GetBytes (Convert.ToDouble (oarg)));
-                               break;
-                               
-                       case 'b':
-                               b.Add (new byte [] { Convert.ToByte (oarg) });
-                               break;
-
-                       case 'c':
-                               b.Add (new byte [] { (byte) (Convert.ToSByte (oarg)) });
-                               break;
-
-                       case 'C':
-                               b.Add (new byte [] { Convert.ToByte (oarg) });
-                               break;
-
-                               // Repeat acount;
-                       case '1': case '2': case '3': case '4': case '5':
-                       case '6': case '7': case '8': case '9':
-                               b.repeat = ((short) b.description [b.i]) - ((short) '0');
-                               return false;
-
-                       case '*':
-                               b.repeat = Int32.MaxValue;
-                               return false;
-                               
-                       case '[':
-                               int count = -1, j;
-                               
-                               for (j = b.i+1; j < b.description.Length; j++){
-                                       if (b.description [j] == ']')
-                                               break;
-                                       n = ((short) b.description [j]) - ((short) '0');
-                                       if (n >= 0 && n <= 9){
-                                               if (count == -1)
-                                                       count = n;
-                                               else
-                                                       count = count * 10 + n;
-                                       }
-                               }
-                               if (count == -1)
-                                       throw new ArgumentException ("invalid size specification");
-                               b.i = j;
-                               b.repeat = count;
-                               return false;
-                               
-                       case '$': case 'z':
-                               bool add_null = b.description [b.i] == 'z';
-                               b.i++;
-                               if (b.i >= b.description.Length)
-                                       throw new ArgumentException ("$ description needs a type specified", "description");
-                               char d = b.description [b.i];
-                               Encoding e;
-                               
-                               switch (d){
-                               case '8':
-                                       e = Encoding.UTF8;
-                                       n = 1;
-                                       break;
-                               case '6':
-                                       e = Encoding.Unicode;
-                                       n = 2;
-                                       break;
-                               case '7':
-                                       e = Encoding.UTF7;
-                                       n = 1;
-                                       break;
-                               case 'b':
-                                       e = Encoding.BigEndianUnicode;
-                                       n = 2;
-                                       break;
-                               case '3':
-                                       e = Encoding.GetEncoding (12000);
-                                       n = 4;
-                                       break;
-                               case '4':
-                                       e = Encoding.GetEncoding (12001);
-                                       n = 4;
-                                       break;
-                                       
-                               default:
-                                       throw new ArgumentException ("Invalid format for $ specifier", "description");
-                               }
-                               if (b.align == -1)
-                                       b.align = 4;
-                               b.Add (e.GetBytes (Convert.ToString (oarg)));
-                               if (add_null)
-                                       b.Add (new byte [n]);
-                               break;
-                       default:
-                               throw new ArgumentException (String.Format ("invalid format specified `{0}'",
-                                                                           b.description [b.i]));
-                       }
-                       return true;
-               }
-
-               static bool Prepare (byte [] buffer, ref int idx, int size, ref bool align)
-               {
-                       if (align){
-                               idx = Align (idx, size);
-                               align = false;
-                       }
-                       if (idx + size > buffer.Length){
-                               idx = buffer.Length;
-                               return false;
-                       }
-                       return true;
-               }
-               
-               static public IList Unpack (string description, byte [] buffer, int startIndex)
-               {
-                       DataConverter conv = CopyConv;
-                       ArrayList result = new ArrayList ();
-                       int idx = startIndex;
-                       bool align = false;
-                       int repeat = 0, n;
-                       
-                       for (int i = 0; i < description.Length && idx < buffer.Length; ){
-                               int save = i;
-                               
-                               switch (description [i]){
-                               case '^':
-                                       conv = BigEndian;
-                                       break;
-                               case '_':
-                                       conv = LittleEndian;
-                                       break;
-                               case '%':
-                                       conv = Native;
-                                       break;
-                               case 'x':
-                                       idx++;
-                                       break;
-
-                               case '!':
-                                       align = true;
-                                       break;
-
-                                       // Type Conversions
-                               case 'i':
-                                       if (Prepare (buffer, ref idx, 4, ref align)){
-                                               result.Add (conv.GetInt32 (buffer, idx));
-                                               idx += 4;
-                                       } 
-                                       break;
-                               
-                               case 'I':
-                                       if (Prepare (buffer, ref idx, 4, ref align)){
-                                               result.Add (conv.GetUInt32 (buffer, idx));
-                                               idx += 4;
-                                       }
-                                       break;
-                               
-                               case 's':
-                                       if (Prepare (buffer, ref idx, 2, ref align)){
-                                               result.Add (conv.GetInt16 (buffer, idx));
-                                               idx += 2;
-                                       }
-                                       break;
-                               
-                               case 'S':
-                                       if (Prepare (buffer, ref idx, 2, ref align)){
-                                               result.Add (conv.GetUInt16 (buffer, idx));
-                                               idx += 2;
-                                       }
-                                       break;
-                               
-                               case 'l':
-                                       if (Prepare (buffer, ref idx, 8, ref align)){
-                                               result.Add (conv.GetInt64 (buffer, idx));
-                                               idx += 8;
-                                       }
-                                       break;
-                               
-                               case 'L':
-                                       if (Prepare (buffer, ref idx, 8, ref align)){
-                                               result.Add (conv.GetUInt64 (buffer, idx));
-                                               idx += 8;
-                                       }
-                                       break;
-                               
-                               case 'f':
-                                       if (Prepare (buffer, ref idx, 4, ref align)){
-                                               result.Add (conv.GetDouble (buffer, idx));
-                                               idx += 4;
-                                       }
-                                       break;
-                               
-                               case 'd':
-                                       if (Prepare (buffer, ref idx, 8, ref align)){
-                                               result.Add (conv.GetDouble (buffer, idx));
-                                               idx += 8;
-                                       }
-                                       break;
-                               
-                               case 'b':
-                                       if (Prepare (buffer, ref idx, 1, ref align)){
-                                               result.Add (buffer [idx]);
-                                               idx++;
-                                       }
-                                       break;
-
-                               case 'c': case 'C':
-                                       if (Prepare (buffer, ref idx, 1, ref align)){
-                                               char c;
-                                               
-                                               if (description [i] == 'c')
-                                                       c = ((char) ((sbyte)buffer [idx]));
-                                               else
-                                                       c = ((char) ((byte)buffer [idx]));
-                                               
-                                               result.Add (c);
-                                               idx++;
-                                       }
-                                       break;
-                                       
-                                       // Repeat acount;
-                               case '1': case '2': case '3': case '4': case '5':
-                               case '6': case '7': case '8': case '9':
-                                       repeat = ((short) description [i]) - ((short) '0');
-                                       save = i + 1;
-                                       break;
-
-                               case '*':
-                                       repeat = Int32.MaxValue;
-                                       break;
-                               
-                               case '[':
-                                       int count = -1, j;
-                               
-                                       for (j = i+1; j < description.Length; j++){
-                                               if (description [j] == ']')
-                                                       break;
-                                               n = ((short) description [j]) - ((short) '0');
-                                               if (n >= 0 && n <= 9){
-                                                       if (count == -1)
-                                                               count = n;
-                                                       else
-                                                               count = count * 10 + n;
-                                               }
-                                       }
-                                       if (count == -1)
-                                               throw new ArgumentException ("invalid size specification");
-                                       i = j;
-                                       repeat = count;
-                                       break;
-                               
-                               case '$': case 'z':
-                                       // bool with_null = description [i] == 'z';
-                                       i++;
-                                       if (i >= description.Length)
-                                               throw new ArgumentException ("$ description needs a type specified", "description");
-                                       char d = description [i];
-                                       Encoding e;
-                                       if (align){
-                                               idx = Align (idx, 4);
-                                               align = false;
-                                       }
-                                       if (idx >= buffer.Length)
-                                               break;
-                               
-                                       switch (d){
-                                       case '8':
-                                               e = Encoding.UTF8;
-                                               n = 1;
-                                               break;
-                                       case '6':
-                                               e = Encoding.Unicode;
-                                               n = 2;
-                                               break;
-                                       case '7':
-                                               e = Encoding.UTF7;
-                                               n = 1;
-                                               break;
-                                       case 'b':
-                                               e = Encoding.BigEndianUnicode;
-                                               n = 2;
-                                               break;
-                                       case '3':
-                                               e = Encoding.GetEncoding (12000);
-                                               n = 4;
-                                               break;
-                                       case '4':
-                                               e = Encoding.GetEncoding (12001);
-                                               n = 4;
-                                               break;
-                                       
-                                       default:
-                                               throw new ArgumentException ("Invalid format for $ specifier", "description");
-                                       }
-                                       int k = idx;
-                                       switch (n){
-                                       case 1:
-                                               for (; k < buffer.Length && buffer [k] != 0; k++)
-                                                       ;
-                                               result.Add (e.GetChars (buffer, idx, k-idx));
-                                               if (k == buffer.Length)
-                                                       idx = k;
-                                               else
-                                                       idx = k+1;
-                                               break;
-                                               
-                                       case 2:
-                                               for (; k < buffer.Length; k++){
-                                                       if (k+1 == buffer.Length){
-                                                               k++;
-                                                               break;
-                                                       }
-                                                       if (buffer [k] == 0 && buffer [k+1] == 0)
-                                                               break;
-                                               }
-                                               result.Add (e.GetChars (buffer, idx, k-idx));
-                                               if (k == buffer.Length)
-                                                       idx = k;
-                                               else
-                                                       idx = k+2;
-                                               break;
-                                               
-                                       case 4:
-                                               for (; k < buffer.Length; k++){
-                                                       if (k+3 >= buffer.Length){
-                                                               k = buffer.Length;
-                                                               break;
-                                                       }
-                                                       if (buffer[k]==0 && buffer[k+1] == 0 && buffer[k+2] == 0 && buffer[k+3]== 0)
-                                                               break;
-                                               }
-                                               result.Add (e.GetChars (buffer, idx, k-idx));
-                                               if (k == buffer.Length)
-                                                       idx = k;
-                                               else
-                                                       idx = k+4;
-                                               break;
-                                       }
-                                       break;
-                               default:
-                                       throw new ArgumentException (String.Format ("invalid format specified `{0}'",
-                                                                                   description [i]));
-                               }
-
-                               if (repeat > 0){
-                                       if (--repeat > 0)
-                                               i = save;
-                               } else
-                                       i++;
-                       }
-                       return result;
-               }
-
-               internal void Check (byte [] dest, int destIdx, int size)
-               {
-                       if (dest == null)
-                               throw new ArgumentNullException ("dest");
-                       if (destIdx < 0 || destIdx > dest.Length - size)
-                               throw new ArgumentException ("destIdx");
-               }
-               
-               class CopyConverter : DataConverter {
-                       public override double GetDouble (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 8)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-                               double ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 8; i++)
-                                       b [i] = data [index+i];
-
-                               return ret;
-                       }
-
-                       public override ulong GetUInt64 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 8)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               ulong ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 8; i++)
-                                       b [i] = data [index+i];
-
-                               return ret;
-                       }
-
-                       public override long GetInt64 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 8)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               long ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 8; i++)
-                                       b [i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override float GetFloat  (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 4)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               float ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 4; i++)
-                                       b [i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override int GetInt32  (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 4)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               int ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 4; i++)
-                                       b [i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override uint GetUInt32 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 4)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               uint ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 4; i++)
-                                       b [i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override short GetInt16 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 2)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               short ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 2; i++)
-                                       b [i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override ushort GetUInt16 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 2)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               ushort ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 2; i++)
-                                       b [i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, double value)
-                       {
-                               Check (dest, destIdx, 8);
-                               fixed (byte *target = &dest [destIdx]){
-                                       long *source = (long *) &value;
-
-                                       *((long *)target) = *source;
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, float value)
-                       {
-                               Check (dest, destIdx, 4);
-                               fixed (byte *target = &dest [destIdx]){
-                                       uint *source = (uint *) &value;
-
-                                       *((uint *)target) = *source;
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, int value)
-                       {
-                               Check (dest, destIdx, 4);
-                               fixed (byte *target = &dest [destIdx]){
-                                       uint *source = (uint *) &value;
-
-                                       *((uint *)target) = *source;
-                               }
-                       }
-
-                       public override void PutBytes (byte [] dest, int destIdx, uint value)
-                       {
-                               Check (dest, destIdx, 4);
-                               fixed (byte *target = &dest [destIdx]){
-                                       uint *source = (uint *) &value;
-
-                                       *((uint *)target) = *source;
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, long value)
-                       {
-                               Check (dest, destIdx, 8);
-                               fixed (byte *target = &dest [destIdx]){
-                                       long *source = (long *) &value;
-
-                                       *((long*)target) = *source;
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, ulong value)
-                       {
-                               Check (dest, destIdx, 8);
-                               fixed (byte *target = &dest [destIdx]){
-                                       ulong *source = (ulong *) &value;
-
-                                       *((ulong *) target) = *source;
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, short value)
-                       {
-                               Check (dest, destIdx, 2);
-                               fixed (byte *target = &dest [destIdx]){
-                                       ushort *source = (ushort *) &value;
-
-                                       *((ushort *)target) = *source;
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, ushort value)
-                       {
-                               Check (dest, destIdx, 2);
-                               fixed (byte *target = &dest [destIdx]){
-                                       ushort *source = (ushort *) &value;
-
-                                       *((ushort *)target) = *source;
-                               }
-                       }
-               }
-
-               class SwapConverter : DataConverter {
-                       public override double GetDouble (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 8)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               double ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 8; i++)
-                                       b [7-i] = data [index+i];
-
-                               return ret;
-                       }
-
-                       public override ulong GetUInt64 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 8)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               ulong ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 8; i++)
-                                       b [7-i] = data [index+i];
-
-                               return ret;
-                       }
-
-                       public override long GetInt64 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 8)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               long ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 8; i++)
-                                       b [7-i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override float GetFloat  (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 4)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               float ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 4; i++)
-                                       b [3-i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override int GetInt32  (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 4)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               int ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 4; i++)
-                                       b [3-i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override uint GetUInt32 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 4)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               uint ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 4; i++)
-                                       b [3-i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override short GetInt16 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 2)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               short ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 2; i++)
-                                       b [1-i] = data [index+i];
-
-                               return ret;
-                       }
-                       
-                       public override ushort GetUInt16 (byte [] data, int index)
-                       {
-                               if (data == null)
-                                       throw new ArgumentNullException ("data");
-                               if (data.Length - index < 2)
-                                       throw new ArgumentException ("index");
-                               if (index < 0)
-                                       throw new ArgumentException ("index");
-
-                               ushort ret;
-                               byte *b = (byte *)&ret;
-
-                               for (int i = 0; i < 2; i++)
-                                       b [1-i] = data [index+i];
-
-                               return ret;
-                       }
-
-                       public override void PutBytes (byte [] dest, int destIdx, double value)
-                       {
-                               Check (dest, destIdx, 8);
-
-                               fixed (byte *target = &dest [destIdx]){
-                                       byte *source = (byte *) &value;
-
-                                       for (int i = 0; i < 8; i++)
-                                               target [i] = source [7-i];
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, float value)
-                       {
-                               Check (dest, destIdx, 4);
-
-                               fixed (byte *target = &dest [destIdx]){
-                                       byte *source = (byte *) &value;
-
-                                       for (int i = 0; i < 4; i++)
-                                               target [i] = source [3-i];
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, int value)
-                       {
-                               Check (dest, destIdx, 4);
-
-                               fixed (byte *target = &dest [destIdx]){
-                                       byte *source = (byte *) &value;
-
-                                       for (int i = 0; i < 4; i++)
-                                               target [i] = source [3-i];
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, uint value)
-                       {
-                               Check (dest, destIdx, 4);
-
-                               fixed (byte *target = &dest [destIdx]){
-                                       byte *source = (byte *) &value;
-
-                                       for (int i = 0; i < 4; i++)
-                                               target [i] = source [3-i];
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, long value)
-                       {
-                               Check (dest, destIdx, 8);
-
-                               fixed (byte *target = &dest [destIdx]){
-                                       byte *source = (byte *) &value;
-
-                                       for (int i = 0; i < 8; i++)
-                                               target [i] = source [7-i];
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, ulong value)
-                       {
-                               Check (dest, destIdx, 8);
-
-                               fixed (byte *target = &dest [destIdx]){
-                                       byte *source = (byte *) &value;
-
-                                       for (int i = 0; i < 4; i++)
-                                               target [i] = source [7-i];
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, short value)
-                       {
-                               Check (dest, destIdx, 2);
-
-                               fixed (byte *target = &dest [destIdx]){
-                                       byte *source = (byte *) &value;
-
-                                       for (int i = 0; i < 2; i++)
-                                               target [i] = source [1-i];
-                               }
-                       }
-                       
-                       public override void PutBytes (byte [] dest, int destIdx, ushort value)
-                       {
-                               Check (dest, destIdx, 2);
-
-                               fixed (byte *target = &dest [destIdx]){
-                                       byte *source = (byte *) &value;
-
-                                       for (int i = 0; i < 2; i++)
-                                               target [i] = source [1-i];
-                               }
-                       }
-               }
-               
-#if MONO_DATACONVERTER_STATIC_METHODS
-               static unsafe void PutBytesLE (byte *dest, byte *src, int count)
-               {
-                       int i = 0;
-                       
-                       if (BitConverter.IsLittleEndian){
-                               for (; i < count; i++)
-                                       *dest++ = *src++;
-                       } else {
-                               dest += count;
-                               for (; i < count; i++)
-                                       *(--dest) = *src++;
-                       }
-               }
-
-               static unsafe void PutBytesBE (byte *dest, byte *src, int count)
-               {
-                       int i = 0;
-                       
-                       if (BitConverter.IsLittleEndian){
-                               dest += count;
-                               for (; i < count; i++)
-                                       *(--dest) = *src++;
-                       } else {
-                               for (; i < count; i++)
-                                       *dest++ = *src++;
-                       }
-               }
-
-               static unsafe void PutBytesNative (byte *dest, byte *src, int count)
-               {
-                       int i = 0;
-                       
-                       for (; i < count; i++)
-                               dest [i-count] = *src++;
-               }
-               
-               static public unsafe double DoubleFromLE (byte[] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 8)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       double ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesLE ((byte *) &ret, src, 8);
-                       }
-                       return ret;
-               }
-
-               static public unsafe float FloatFromLE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 4)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       float ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesLE ((byte *) &ret, src, 4);
-                       }
-                       return ret;
-               }
-
-               static public unsafe long Int64FromLE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 8)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       long ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesLE ((byte *) &ret, src, 8);
-                       }
-                       return ret;
-               }
-               
-               static public unsafe ulong UInt64FromLE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 8)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       ulong ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesLE ((byte *) &ret, src, 8);
-                       }
-                       return ret;
-               }
-
-               static public unsafe int Int32FromLE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 4)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       int ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesLE ((byte *) &ret, src, 4);
-                       }
-                       return ret;
-               }
-               
-               static public unsafe uint UInt32FromLE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 4)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       uint ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesLE ((byte *) &ret, src, 4);
-                       }
-                       return ret;
-               }
-
-               static public unsafe short Int16FromLE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 2)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-
-                       short ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesLE ((byte *) &ret, src, 2);
-                       }
-                       return ret;
-               }
-               
-               static public unsafe ushort UInt16FromLE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 2)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       ushort ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesLE ((byte *) &ret, src, 2);
-                       }
-                       return ret;
-               }
-
-               static public unsafe double DoubleFromBE (byte[] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 8)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       double ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesBE ((byte *) &ret, src, 8);
-                       }
-                       return ret;
-               }
-
-               static public unsafe float FloatFromBE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 4)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       float ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesBE ((byte *) &ret, src, 4);
-                       }
-                       return ret;
-               }
-
-               static public unsafe long Int64FromBE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 8)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       long ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesBE ((byte *) &ret, src, 8);
-                       }
-                       return ret;
-               }
-               
-               static public unsafe ulong UInt64FromBE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 8)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       ulong ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesBE ((byte *) &ret, src, 8);
-                       }
-                       return ret;
-               }
-
-               static public unsafe int Int32FromBE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 4)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       int ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesBE ((byte *) &ret, src, 4);
-                       }
-                       return ret;
-               }
-               
-               static public unsafe uint UInt32FromBE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 4)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       uint ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesBE ((byte *) &ret, src, 4);
-                       }
-                       return ret;
-               }
-
-               static public unsafe short Int16FromBE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 2)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-
-                       short ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesBE ((byte *) &ret, src, 2);
-                       }
-                       return ret;
-               }
-               
-               static public unsafe ushort UInt16FromBE (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 2)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       ushort ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesBE ((byte *) &ret, src, 2);
-                       }
-                       return ret;
-               }
-
-               static public unsafe double DoubleFromNative (byte[] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 8)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       double ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesNative ((byte *) &ret, src, 8);
-                       }
-                       return ret;
-               }
-
-               static public unsafe float FloatFromNative (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 4)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       float ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesNative ((byte *) &ret, src, 4);
-                       }
-                       return ret;
-               }
-
-               static public unsafe long Int64FromNative (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 8)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       long ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesNative ((byte *) &ret, src, 8);
-                       }
-                       return ret;
-               }
-               
-               static public unsafe ulong UInt64FromNative (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 8)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       ulong ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesNative ((byte *) &ret, src, 8);
-                       }
-                       return ret;
-               }
-
-               static public unsafe int Int32FromNative (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 4)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       int ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesNative ((byte *) &ret, src, 4);
-                       }
-                       return ret;
-               }
-               
-               static public unsafe uint UInt32FromNative (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 4)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       uint ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesNative ((byte *) &ret, src, 4);
-                       }
-                       return ret;
-               }
-
-               static public unsafe short Int16FromNative (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 2)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-
-                       short ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesNative ((byte *) &ret, src, 2);
-                       }
-                       return ret;
-               }
-               
-               static public unsafe ushort UInt16FromNative (byte [] data, int index)
-               {
-                       if (data == null)
-                               throw new ArgumentNullException ("data");
-                       if (data.Length - index < 2)
-                               throw new ArgumentException ("index");
-                       if (index < 0)
-                               throw new ArgumentException ("index");
-                       
-                       ushort ret;
-                       fixed (byte *src = &data[index]){
-                               PutBytesNative ((byte *) &ret, src, 2);
-                       }
-                       return ret;
-               }
-
-                unsafe static byte[] GetBytesPtr (byte *ptr, int count)
-                {
-                        byte [] ret = new byte [count];
-
-                        for (int i = 0; i < count; i++) {
-                                ret [i] = ptr [i];
-                        }
-
-                        return ret;
-                }
-
-                unsafe static byte[] GetBytesSwap (bool swap, byte *ptr, int count)
-                {
-                        byte [] ret = new byte [count];
-
-                       if (swap){
-                               int t = count-1;
-                               for (int i = 0; i < count; i++) {
-                                       ret [t-i] = ptr [i];
-                               }
-                       } else {
-                               for (int i = 0; i < count; i++) {
-                                       ret [i] = ptr [i];
-                               }
-                       }
-                        return ret;
-                }
-               
-                unsafe public static byte[] GetBytesNative (bool value)
-                {
-                        return GetBytesPtr ((byte *) &value, 1);
-                }
-
-                unsafe public static byte[] GetBytesNative (char value)
-                {
-                        return GetBytesPtr ((byte *) &value, 2);
-                }
-
-                unsafe public static byte[] GetBytesNative (short value)
-                {
-                        return GetBytesPtr ((byte *) &value, 2);
-                }
-
-                unsafe public static byte[] GetBytesNative (int value)
-                {
-                        return GetBytesPtr ((byte *) &value, 4);
-                }
-
-                unsafe public static byte[] GetBytesNative (long value)
-                {
-                        return GetBytesPtr ((byte *) &value, 8);
-                }
-
-                [CLSCompliant (false)]
-                unsafe public static byte[] GetBytesNative (ushort value)
-                {
-                        return GetBytesPtr ((byte *) &value, 2);
-                }
-
-                [CLSCompliant (false)]
-                unsafe public static byte[] GetBytesNative (uint value)
-                {
-                        return GetBytesPtr ((byte *) &value, 4);
-                }
-
-                [CLSCompliant (false)]
-                unsafe public static byte[] GetBytesNative (ulong value)
-                {
-                        return GetBytesPtr ((byte *) &value, 8);
-                }
-
-                unsafe public static byte[] GetBytesNative (float value)
-                {
-                        return GetBytesPtr ((byte *) &value, 4);
-                }
-
-                unsafe public static byte[] GetBytesNative (double value)
-                {
-                       return GetBytesPtr ((byte *) &value, 8);
-                }
-
-                unsafe public static byte[] GetBytesLE (bool value)
-                {
-                        return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 1);
-                }
-
-                unsafe public static byte[] GetBytesLE (char value)
-                {
-                        return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 2);
-                }
-
-                unsafe public static byte[] GetBytesLE (short value)
-                {
-                        return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 2);
-                }
-
-                unsafe public static byte[] GetBytesLE (int value)
-                {
-                        return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 4);
-                }
-
-                unsafe public static byte[] GetBytesLE (long value)
-                {
-                        return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 8);
-                }
-
-                [CLSCompliant (false)]
-                unsafe public static byte[] GetBytesLE (ushort value)
-                {
-                        return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 2);
-                }
-
-                [CLSCompliant (false)]
-                unsafe public static byte[] GetBytesLE (uint value)
-                {
-                        return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 4);
-                }
-
-                [CLSCompliant (false)]
-                unsafe public static byte[] GetBytesLE (ulong value)
-                {
-                        return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 8);
-                }
-
-                unsafe public static byte[] GetBytesLE (float value)
-                {
-                        return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 4);
-                }
-
-                unsafe public static byte[] GetBytesLE (double value)
-                {
-                       return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 8);
-                }
-               
-                unsafe public static byte[] GetBytesBE (bool value)
-                {
-                        return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 1);
-                }
-
-                unsafe public static byte[] GetBytesBE (char value)
-                {
-                        return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 2);
-                }
-
-                unsafe public static byte[] GetBytesBE (short value)
-                {
-                        return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 2);
-                }
-
-                unsafe public static byte[] GetBytesBE (int value)
-                {
-                        return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 4);
-                }
-
-                unsafe public static byte[] GetBytesBE (long value)
-                {
-                        return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 8);
-                }
-
-                [CLSCompliant (false)]
-                unsafe public static byte[] GetBytesBE (ushort value)
-                {
-                        return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 2);
-                }
-
-                [CLSCompliant (false)]
-                unsafe public static byte[] GetBytesBE (uint value)
-                {
-                        return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 4);
-                }
-
-                [CLSCompliant (false)]
-                unsafe public static byte[] GetBytesBE (ulong value)
-                {
-                        return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 8);
-                }
-
-                unsafe public static byte[] GetBytesBE (float value)
-                {
-                        return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 4);
-                }
-
-                unsafe public static byte[] GetBytesBE (double value)
-                {
-                       return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 8);
-                }
-#endif
-               
-       }
-}
diff --git a/mcs/tools/ildasm/Makefile b/mcs/tools/ildasm/Makefile
deleted file mode 100644 (file)
index 15b8dfb..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-thisdir = tools/ildasm
-SUBDIRS = 
-include ../../build/rules.make
-
-LOCAL_MCS_FLAGS = -r:Mono.Cecil.dll -D:MONO_DATACONVERTER_STATIC_METHODS -unsafe
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/ildasm.exe
-
-include ../../build/executable.make
diff --git a/mcs/tools/ildasm/ildasm.cs b/mcs/tools/ildasm/ildasm.cs
deleted file mode 100644 (file)
index b19eea4..0000000
+++ /dev/null
@@ -1,1029 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Collections.Generic;
-using System.Linq;
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-using Mono;
-
-public partial class ILDAsm
-{
-       public static int Main (String[] args) {
-               if (args.Length != 1) {
-                       Console.Error.WriteLine ("Usage: ildasm <assembly file>");
-                       return 1;
-               }
-
-               var inst = new ILDAsm ();
-               return inst.Run (args);
-       }
-
-       public AssemblyDefinition ad;
-       public ModuleDefinition main;
-       public TextWriter os;
-       public int indent;
-       public List<FieldDefinition> fields_with_rva = new List<FieldDefinition> ();
-
-       public void WriteLine () {
-               os.WriteLine ();
-       }
-
-       public void WriteLine (String s) {
-               for (int i = 0; i < indent; ++i)
-                       os.Write ("  ");
-               os.WriteLine (s);
-       }
-
-       public int Run (String[] args) {
-               ad = AssemblyDefinition.ReadAssembly (args [0]);
-
-               main = ad.MainModule;
-
-               os = Console.Out;
-
-               // Emit assembly references
-               EmitAssemblyReferences ();
-               EmitAssembly ();
-               EmitModule ();
-               foreach (var typedef in main.Types) {
-                       // FIXME:
-                       if (typedef.Name == "<Module>")
-                               EmitGlobals (typedef);
-                       else
-                               EmitType (typedef);
-               }
-               EmitData ();
-
-               return 0;
-       }
-
-       string EscapeName (string s) {
-               bool escape = false;
-
-               if (s.Contains ("/")) {
-                       string[] parts = s.Split ('/');
-                       var sb = new StringBuilder ();
-                       for (int i = 0; i < parts.Length; ++i) {
-                               if (i > 0)
-                                       sb.Append ("/");
-                               sb.Append (EscapeName (parts [i]));
-                       }
-                       return sb.ToString ();
-               }
-                       
-               foreach (char c in s) {
-                       if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c == '_') || (c == '.') || (c == '`')))
-                               escape = true;
-               }
-               if (!escape && keyword_table.ContainsKey (s))
-                       escape = true;
-               if (escape)
-                       return "'" + s + "'";
-               else
-                       return s;
-       }
-
-       string EscapeString (string s) {
-               return s.Replace ("\\", "\\\\").Replace ("\"", "\\\"");
-       }
-
-       void EmitScope (IMetadataScope s, StringBuilder sb) {
-               if (s is AssemblyNameReference) {
-                       AssemblyNameReference aname = (s as AssemblyNameReference);
-                       sb.Append ("[" + EscapeName (aname.Name) + "]");
-               } else if (s is ModuleDefinition) {
-                       if (s != main)
-                               throw new NotImplementedException ();
-               } else {
-                       throw new NotImplementedException (s.GetType ().ToString ());
-               }
-       }
-
-       string StringifyTypeRef (TypeReference t) {
-               switch (t.MetadataType) {
-               case MetadataType.Void:
-                       return "void";
-               case MetadataType.Boolean:
-                       return "bool";
-               case MetadataType.Char:
-                       return "char";
-               case MetadataType.SByte:
-                       return "int8";
-               case MetadataType.Byte:
-                       return "unsigned int8";
-               case MetadataType.Int16:
-                       return "int16";
-               case MetadataType.UInt16:
-                       return "unsigned int16";
-               case MetadataType.Int32:
-                       return "int32";
-               case MetadataType.UInt32:
-                       return "unsigned int32";
-               case MetadataType.Int64:
-                       return "int64";
-               case MetadataType.UInt64:
-                       return "unsigned int64";
-               case MetadataType.Single:
-                       return "float32";
-               case MetadataType.Double:
-                       return "float64";
-               case MetadataType.String:
-                       return "string";
-               case MetadataType.IntPtr:
-                       return "native int";
-               case MetadataType.UIntPtr:
-                       //return "unsigned native int";
-                       return "[mscorlib]System.UIntPtr";
-               case MetadataType.TypedByReference:
-                       return "typedref";
-               case MetadataType.Class:
-               case MetadataType.Object:
-               case MetadataType.ValueType: {
-                       var sb = new StringBuilder ();
-                       IMetadataScope s = t.Scope;
-                       if (t.MetadataType == MetadataType.ValueType)
-                               sb.Append ("valuetype ");
-                       else
-                               sb.Append ("class ");
-                       EmitScope (s, sb);
-                       sb.Append (EscapeName (t.FullName));
-                       return sb.ToString ();
-               }
-               case MetadataType.Array: {
-                       ArrayType at = (t as ArrayType);
-                       
-                       if (at.IsVector)
-                               return StringifyTypeRef (at.ElementType) + "[]";
-
-                       var suffix = new StringBuilder ();
-                       suffix.Append ("[");
-                       for (int i = 0; i < at.Dimensions.Count; i++) {
-                               if (i > 0)
-                                       suffix.Append (",");
-
-                               suffix.Append (at.Dimensions [i].ToString ());
-                       }
-                       suffix.Append ("]");
-
-                       return StringifyTypeRef (at.ElementType) + suffix;
-               }
-               case MetadataType.Pointer:
-                       return StringifyTypeRef ((t as TypeSpecification).ElementType) + "*";
-               case MetadataType.ByReference:
-                       return StringifyTypeRef ((t as TypeSpecification).ElementType) + "&";
-               case MetadataType.Pinned:
-                       return StringifyTypeRef ((t as TypeSpecification).ElementType) + " pinned";
-               case MetadataType.GenericInstance: {
-                       var sb = new StringBuilder ();
-                       var inst = (t as GenericInstanceType);
-                       sb.Append (StringifyTypeRef (inst.ElementType));
-                       sb.Append ("<");
-                       int aindex = 0;
-                       foreach (TypeReference arg in inst.GenericArguments) {
-                               if (aindex > 0)
-                                       sb.Append (", ");
-                               sb.Append (StringifyTypeRef (arg));
-                               aindex ++;
-                       }
-                       sb.Append (">");
-                       return sb.ToString ();
-               }
-               case MetadataType.Var:
-                       return "!" + (t as GenericParameter).Position;
-               case MetadataType.MVar:
-                       return "!!" + (t as GenericParameter).Position;
-               case MetadataType.Sentinel:
-                       return "..., " + StringifyTypeRef ((t as SentinelType).ElementType);
-               case MetadataType.RequiredModifier: {
-                       var mod = (t as RequiredModifierType);
-                       if (mod.ModifierType.MetadataType != MetadataType.Class)
-                               throw new NotImplementedException ();
-                       var sb = new StringBuilder ();
-                       sb.Append (StringifyTypeRef (mod.ElementType));
-                       sb.Append (" modreq (");
-                       EmitScope (mod.ModifierType.Scope, sb);
-                       sb.Append (EscapeName (mod.ModifierType.FullName));
-                       sb.Append (")");
-                       return sb.ToString ();
-               }
-               default:
-                       throw new NotImplementedException ("" + t.MetadataType + " " + t.ToString ());
-               }
-       }
-
-       // Same as StringifyTypeRef, but emit primitive types as [mscorlib]...
-       string StringifyTypeRefNoPrim (TypeReference t) {
-               switch (t.MetadataType) {
-               case MetadataType.Void:
-               case MetadataType.Boolean:
-               case MetadataType.Char:
-               case MetadataType.SByte:
-               case MetadataType.Byte:
-               case MetadataType.Int16:
-               case MetadataType.UInt16:
-               case MetadataType.Int32:
-               case MetadataType.UInt32:
-               case MetadataType.Int64:
-               case MetadataType.UInt64:
-               case MetadataType.Single:
-               case MetadataType.Double:
-               case MetadataType.String:
-               case MetadataType.IntPtr:
-               case MetadataType.UIntPtr:
-               case MetadataType.TypedByReference:
-                       return "[mscorlib]" + t.FullName;
-               default:
-                       return StringifyTypeRef (t);
-               }
-       }
-
-       string StringifyMethodRef (MethodReference method) {
-               var sb = new StringBuilder ();
-               if (method.CallingConvention == MethodCallingConvention.VarArg)
-                       sb.Append ("vararg ");
-               if (method.HasThis)
-                       sb.Append ("instance ");
-               sb.Append (StringifyTypeRef (method.ReturnType));
-               sb.Append (' ');
-               sb.Append (StringifyTypeRefNoPrim (method.DeclaringType));
-               sb.Append ("::");
-               sb.Append (EscapeName (method.Name));
-               if (method is GenericInstanceMethod) {
-                       sb.Append ("<");
-                       int idx = 0;
-                       foreach (var gpar in (method as GenericInstanceMethod).GenericArguments) {
-                               if (idx > 0)
-                                       sb.Append (", ");
-                               sb.Append (StringifyTypeRef (gpar));
-                               idx ++;
-                       }
-                       sb.Append (">");
-               }
-               sb.Append ('(');
-               int par_index = 0;
-               foreach (ParameterReference par in method.Parameters) {
-                       if (par_index > 0)
-                               sb.Append (", ");
-                       sb.Append (StringifyTypeRef (par.ParameterType));
-                       par_index ++;
-               }
-               sb.Append (")");
-               return sb.ToString ();
-       }
-
-       string StringifyFieldRef (FieldReference field) {
-               var sb = new StringBuilder ();
-               sb.Append (StringifyTypeRef (field.FieldType));
-               sb.Append (' ');
-               sb.Append (StringifyTypeRefNoPrim (field.DeclaringType));
-               sb.Append ("::");
-               sb.Append (EscapeName (field.Name));
-               return sb.ToString ();
-       }
-
-       void WriteBlob (byte[] blob) {
-               int idx = 0;
-               while (idx < blob.Length) {
-                       int len = idx + 16 < blob.Length ? 16 : blob.Length - idx;
-                       var sb = new StringBuilder ();
-                       var sb2 = new StringBuilder ();
-                       for (int i = idx; i < idx + len; ++i) {
-                               sb.Append (String.Format ("{0:X2} ", blob [i]));
-                               if (Char.IsLetterOrDigit ((char)blob [i]))
-                                       sb2.Append ((char)blob [i]);
-                               else
-                                       sb2.Append ('.');
-                       }
-                       for (int i = 0; i < 16 - len; ++i)
-                               sb.Append ("   ");
-                       if (len < 16 || idx + 16 == blob.Length)
-                               sb.Append (')');
-                       else
-                               sb.Append (' ');
-                       WriteLine (String.Format ("{0} // {1}", sb.ToString (), sb2.ToString ()));
-                       idx += 16;
-               }
-       }
-
-       string Map (Dictionary <uint, string> map, uint val) {
-               string s;
-
-               if (map.TryGetValue (val, out s))
-                       return s;
-               else
-                       throw new NotImplementedException ("Value '" + val + "' not supported.");
-       }
-
-       string MapFlags (Dictionary <uint, string> map, uint val) {
-               var sb = new StringBuilder ();
-               foreach (var flag in map.Keys)
-                       if ((val & flag) != 0)
-                               sb.Append (map [flag]);
-               return sb.ToString ();
-       }
-
-       void EmitAssemblyReferences () {
-               foreach (var aname in main.AssemblyReferences) {
-                       os.WriteLine (".assembly extern " + EscapeName (aname.Name));
-                       os.WriteLine ("{");
-                       indent ++;
-                       Version v = aname.Version;
-                       WriteLine (String.Format (".ver {0}:{1}:{2}:{3}", v.Major, v.Minor, v.Build, v.Revision));
-                       byte [] token = aname.PublicKeyToken;
-                       if (token.Length > 0) {
-                               StringBuilder sb = new StringBuilder ();
-                               StringBuilder sb2 = new StringBuilder ();
-                               for (int i = 0; i < token.Length; ++i) {
-                                       if (i > 0)
-                                               sb.Append (" ");
-                                       sb.Append (String.Format ("{0:X2}", token [i]));
-                                       if (Char.IsLetterOrDigit ((char)token [i]))
-                                               sb2.Append ((char)token [i]);
-                                       else
-                                               sb2.Append ('.');
-                               }
-                               WriteLine (String.Format (".publickeytoken = ({0}) // {1}", sb, sb2));
-                       }
-                       indent --;
-                       WriteLine ("}");
-               }
-       }
-
-       void EmitCattrs (ICustomAttributeProvider prov) {
-               foreach (var cattr in prov.CustomAttributes) {
-                       WriteLine (String.Format (".custom {0} = (", StringifyMethodRef (cattr.Constructor)));
-                       indent += 3;
-                       byte[] blob = cattr.GetBlob ();
-                       WriteBlob (blob);
-                       indent -= 3;
-               }
-       }
-
-       void EmitSecDeclarations (ISecurityDeclarationProvider prov) {
-               foreach (var sec in prov.SecurityDeclarations) {
-                       string act_str = null;
-                       if (!sec_action_to_string.TryGetValue (sec.Action, out act_str))
-                               throw new NotImplementedException (sec.Action.ToString ());
-                       WriteLine (".permissionset " + act_str + " = (");
-                       WriteBlob (sec.GetBlob ());
-               }
-       }
-
-       void EmitAssembly () {
-               AssemblyNameDefinition aname = ad.Name;
-
-               WriteLine (".assembly " + EscapeName (aname.Name));
-               WriteLine ("{");
-               indent ++;
-               EmitCattrs (ad);
-               EmitSecDeclarations (ad);
-               WriteLine (String.Format (".hash algorithm 0x{0:X8}", (int)aname.HashAlgorithm));
-               Version v = aname.Version;
-               WriteLine (String.Format (".ver {0}:{1}:{2}:{3}", v.Major, v.Minor, v.Build, v.Revision));
-               byte[] token = aname.PublicKey;
-               if (token != null && token.Length > 0) {
-                       StringBuilder sb = new StringBuilder ();
-                       StringBuilder sb2 = new StringBuilder ();
-                       for (int i = 0; i < token.Length; ++i) {
-                               if (i > 0)
-                                       sb.Append (" ");
-                               sb.Append (String.Format ("{0:X2}", token [i]));
-                               if (Char.IsLetterOrDigit ((char)token [i]))
-                                       sb2.Append ((char)token [i]);
-                               else
-                                       sb2.Append ('.');
-                       }
-                       WriteLine (String.Format (".publickey = ({0}) // {1}", sb, sb2));
-               }
-               indent --;
-               WriteLine ("}");
-       }
-
-       void EmitModule () {
-               WriteLine (".module " + EscapeName (main.Name) + " // GUID = " + "{" + main.Mvid.ToString ().ToUpper () + "}");
-               EmitCattrs (main);
-       }
-
-       string StringifyTypeAttrs (TypeAttributes attrs) {
-               var sb = new StringBuilder ();
-
-               sb.Append (Map (type_sem_map, (uint)(attrs & TypeAttributes.ClassSemanticMask)));
-               sb.Append (Map (type_access_map, (uint)(attrs & TypeAttributes.VisibilityMask)));
-               sb.Append (Map (type_layout_map, (uint)(attrs & TypeAttributes.LayoutMask)));
-               sb.Append (Map (type_string_format_map, (uint)(attrs & TypeAttributes.StringFormatMask)));
-               sb.Append (MapFlags (type_flag_map, (uint)(attrs)));
-
-               return sb.ToString ();
-       }
-
-       void EmitGenParams (IGenericParameterProvider prov, StringBuilder sb) {
-               sb.Append ("<");
-               int idx = 0;
-               foreach (var gpar in prov.GenericParameters) {
-                       if (idx > 0)
-                               sb.Append (", ");
-                       if (gpar.HasDefaultConstructorConstraint)
-                               sb.Append (".ctor ");
-                       if (gpar.HasNotNullableValueTypeConstraint)
-                               sb.Append ("valuetype ");
-                       if (gpar.HasReferenceTypeConstraint)
-                               sb.Append ("class ");
-                       if (gpar.HasConstraints) {
-                               int idx2 = 0;
-                               sb.Append ("(");
-                               foreach (var c in gpar.Constraints) {
-                                       if (idx2 > 0)
-                                               sb.Append (", ");
-                                       sb.Append (StringifyTypeRef (c));
-                                       idx2 ++;
-                               }
-                               sb.Append (")");
-                       }
-                       sb.Append (EscapeName (gpar.Name));
-                       idx ++;
-               }
-               sb.Append (">");
-       }
-
-       void EmitGenParamCattrs (IGenericParameterProvider prov) {
-               foreach (var gpar in prov.GenericParameters) {
-                       if (gpar.HasCustomAttributes) {
-                               WriteLine (".param type " + gpar.Name);
-                               EmitCattrs (gpar);
-                       }
-               }
-       }
-
-       void EmitGlobals (TypeDefinition td) {
-               foreach (var md in td.Methods)
-                       EmitMethod (md);
-       }
-
-       void EmitType (TypeDefinition td) {
-               WriteLine ("");
-
-               if (td.MetadataType != MetadataType.Class && td.MetadataType != MetadataType.ValueType)
-                       throw new NotImplementedException (td.MetadataType.ToString ());
-
-               // FIXME: Group types by namespaces
-               if (!td.IsNested && td.Namespace != null && td.Namespace != String.Empty) {
-                       WriteLine (".namespace " + EscapeName (td.Namespace));
-                       WriteLine ("{");
-                       indent ++;
-               }
-
-               var sb = new StringBuilder ();
-               sb.Append (".class ");
-               sb.Append (StringifyTypeAttrs (td.Attributes));
-               sb.Append (EscapeName (td.Name));
-               if (td.HasGenericParameters)
-                       EmitGenParams (td, sb);
-               WriteLine (sb.ToString ());
-               indent ++;
-               if (td.BaseType != null)
-                       WriteLine ("extends " + StringifyTypeRef (td.BaseType));
-               if (td.HasInterfaces) {
-                       int idx = 0;
-                       sb = new StringBuilder ();
-                       foreach (TypeReference t in td.Interfaces) {
-                               if (idx > 0)
-                                       sb.Append (", ");
-                               sb.Append (StringifyTypeRef (t));
-                               idx ++;
-                       }
-                       WriteLine (String.Format ("implements {0}", sb.ToString ()));
-               }
-               indent --;
-               WriteLine ("{");
-               indent ++;
-               if (td.PackingSize != -1)
-                       WriteLine (".pack " + td.PackingSize);
-               if (td.ClassSize != -1)
-                       WriteLine (".size " + td.ClassSize);
-               EmitCattrs (td);
-               EmitGenParamCattrs (td);
-               EmitSecDeclarations (td);
-               foreach (var fd in td.Fields)
-                       EmitField (fd);
-               foreach (var md in td.Methods)
-                       EmitMethod (md);
-               foreach (var p in td.Properties)
-                       EmitProperty (p);
-               foreach (var e in td.Events)
-                       EmitEvent (e);
-               foreach (var t in td.NestedTypes)
-                       EmitType (t);
-               indent --;
-               WriteLine ("}");
-
-               if (!td.IsNested && td.Namespace != null && td.Namespace != String.Empty) {
-                       WriteLine ("}");
-                       indent --;
-               }
-       }
-
-       string StringifyFieldAttributes (FieldAttributes attrs) {
-               var sb = new StringBuilder ();
-               sb.Append (Map (field_access_map, (uint)(attrs & FieldAttributes.FieldAccessMask)));
-               sb.Append (MapFlags (field_flag_map, (uint)(attrs)));
-               return sb.ToString ();
-       }
-
-       void EmitField (FieldDefinition fd) {
-               var sb = new StringBuilder ();
-               sb.Append (".field ");
-               if (fd.Offset != -1)
-                       sb.Append ("[" + fd.Offset + "] ");
-               sb.Append (StringifyFieldAttributes (fd.Attributes));
-               if (fd.HasMarshalInfo) {
-                       sb.Append (" ");
-                       sb.Append (StringifyMarshalInfo (fd.MarshalInfo));
-               }
-               sb.Append (" ");
-               sb.Append (StringifyTypeRef (fd.FieldType));
-               sb.Append (" ");
-               sb.Append (EscapeName (fd.Name));
-               if (fd.HasConstant)
-                       EmitConstant (fd.Constant, sb);
-               if (fd.RVA != 0) {
-                       sb.Append (String.Format (" at D_{0:x8}", fd.RVA));
-                       fields_with_rva.Add (fd);
-               }
-               WriteLine (sb.ToString ());
-               EmitCattrs (fd);
-       }
-
-       string StringifyMethodAttributes (MethodAttributes attrs) {
-               var sb = new StringBuilder ();
-               sb.Append (Map (method_access_map, (uint)(attrs & MethodAttributes.MemberAccessMask)));
-               sb.Append (MapFlags (method_flag_map, (uint)(attrs)));
-               return sb.ToString ();
-       }
-
-       string StringifyMethodImplAttributes (MethodImplAttributes attrs) {
-               var sb = new StringBuilder ();
-               sb.Append (Map (method_impl_map, (uint)(attrs & MethodImplAttributes.CodeTypeMask)));
-               sb.Append (Map (method_managed_map, (uint)(attrs & MethodImplAttributes.ManagedMask)));
-               sb.Append (MapFlags (method_impl_flag_map, (uint)(attrs)));
-
-               return sb.ToString ();
-       }
-
-       string StringifyTypeNameReflection (TypeReference t) {
-               if (t.MetadataType != MetadataType.Class)
-                       throw new NotImplementedException ();
-               IMetadataScope s = t.Scope;
-               if (!(s is ModuleDefinition))
-                       throw new NotImplementedException ();
-               return t.FullName.Replace ("/", "+");
-       }
-
-       string StringifyMarshalInfo (MarshalInfo mi) {
-               var sb = new StringBuilder ();
-
-               sb.Append ("marshal (");
-
-               string s = null;
-               switch (mi.NativeType) {
-               case NativeType.Array: {
-                       var ami = (mi as ArrayMarshalInfo);
-                       if (native_type_to_str.TryGetValue (ami.ElementType, out s)) {
-                               sb.Append (s);
-                       }
-                       sb.Append ("[");
-                       //Console.WriteLine ("// XXX: " + ami.Size + " " + ami.SizeParameterIndex + " " + ami.SizeParameterMultiplier);
-
-                       /*
-                        * Comments in metadata.c:
-                        * So if (param_num == 0) && (num_elem > 0), then
-                        * elem_mult == 0 -> the array size is num_elem
-                        * elem_mult == 1 -> the array size is @param_num + num_elem
-                        */
-                       if (ami.Size != -1 && ami.Size != 0)
-                               sb.Append (ami.Size.ToString ());
-                       if (ami.SizeParameterMultiplier != 0 && ami.SizeParameterIndex != -1)
-                               sb.Append ("+" + ami.SizeParameterIndex.ToString ());
-                       sb.Append ("]");
-                       break;
-               }
-               case NativeType.FixedArray: {
-                       var ami = (mi as FixedArrayMarshalInfo);
-                       /*
-                       if (native_type_to_str.TryGetValue (ami.ElementType, out s)) {
-                               sb.Append (s);
-                       }
-                       */
-                       sb.Append ("fixed array [" + ami.Size + "]");
-                       break;
-               }
-               case NativeType.FixedSysString: {
-                       var ami = (mi as FixedSysStringMarshalInfo);
-                       sb.Append ("fixed sysstring [" + ami.Size + "]");
-                       break;
-               }
-               case NativeType.SafeArray: {
-                       var sami = (mi as SafeArrayMarshalInfo);
-                       sb.Append ("safearray ");
-                       switch (sami.ElementType) {
-                       case VariantType.Variant:
-                               sb.Append ("variant");
-                               break;
-                       default:
-                               throw new NotImplementedException ();
-                       }
-                       break;
-               }
-               case NativeType.CustomMarshaler: {
-                       var cmi = (mi as CustomMarshalInfo);
-
-                       if (cmi.Guid != Guid.Empty || cmi.UnmanagedType != String.Empty)
-                               throw new NotImplementedException ();
-                       sb.Append ("custom (\"" + StringifyTypeNameReflection (cmi.ManagedType) + "\", \"" + EscapeString (cmi.Cookie) + "\")");
-                       break;
-               }
-               default:
-                       if (native_type_to_str.TryGetValue (mi.NativeType, out s))
-                               sb.Append (s);
-                       else
-                               throw new NotImplementedException (mi.NativeType.ToString ());
-                       break;
-               }
-               sb.Append (")");
-               return sb.ToString ();
-       }
-
-       string StringifySignature (MethodDefinition md) {
-               var sb = new StringBuilder ();
-               int pindex = 0;
-               foreach (var par in md.Parameters) {
-                       if (pindex > 0)
-                               sb.Append (", ");
-                       if (par.IsIn)
-                               sb.Append ("[in] ");
-                       if (par.IsOut)
-                               sb.Append ("[out] ");
-                       if (par.IsOptional)
-                               sb.Append ("[opt] ");
-                       sb.Append (StringifyTypeRef (par.ParameterType));
-                       if (par.HasMarshalInfo) {
-                               sb.Append (" ");
-                               sb.Append (StringifyMarshalInfo (par.MarshalInfo));
-                       }
-                       sb.Append (" ");
-                       sb.Append (EscapeName (par.Name));
-                       pindex ++;
-               }
-
-               return sb.ToString ();
-       }
-
-       string StringifyPInvokeAttrs (PInvokeAttributes attrs) {
-               var sb = new StringBuilder ();
-               sb.Append (Map (pinvoke_char_set_map, (uint)(attrs & PInvokeAttributes.CharSetMask)));
-               sb.Append (Map (pinvoke_cconv_map, (uint)(attrs & PInvokeAttributes.CallConvMask)));
-               sb.Append (MapFlags (pinvoke_flags_map, (uint)(attrs)));
-               return sb.ToString ();
-       }               
-
-       string StringifyCallingConvention (MethodCallingConvention cconv) {
-               switch (cconv) {
-               case MethodCallingConvention.Default:
-                       return "default";
-               case MethodCallingConvention.VarArg:
-                       return "vararg";
-               default:
-                       throw new NotImplementedException (cconv.ToString ());
-               }
-       }
-
-       void EmitMethod (MethodDefinition md) {
-               int idx;
-
-               WriteLine ();
-               var pinvoke_sb = new StringBuilder ();
-               if ((uint)(md.Attributes & MethodAttributes.PInvokeImpl) != 0) {
-                       var pinvoke = md.PInvokeInfo;
-                       pinvoke_sb.Append ("pinvokeimpl (\"" + pinvoke.Module.Name + "\" as \"" + pinvoke.EntryPoint + "\" " + StringifyPInvokeAttrs (pinvoke.Attributes) + " )");
-               }
-               WriteLine (String.Format (".method {0}{1}", StringifyMethodAttributes (md.Attributes), pinvoke_sb));
-
-               var sb = new StringBuilder ();
-               sb.Append ("       ");
-               if (!md.IsStatic)
-                       sb.Append ("instance ");                
-               // CallingConvention seems to be 32
-               sb.Append (StringifyCallingConvention ((MethodCallingConvention)((uint)md.CallingConvention & 0xf)));
-               sb.Append (" ");
-               sb.Append (StringifyTypeRef (md.ReturnType));
-               sb.Append (" ");
-               if (md.MethodReturnType.HasMarshalInfo) {
-                       sb.Append (StringifyMarshalInfo (md.MethodReturnType.MarshalInfo));
-                       sb.Append (" ");
-               }
-               sb.Append (EscapeName (md.Name));
-               if (md.HasGenericParameters)
-                       EmitGenParams (md, sb);
-               WriteLine (String.Format ("{0} ({1}) {2}", sb, StringifySignature (md), StringifyMethodImplAttributes (md.ImplAttributes)));
-               WriteLine ("{");
-               indent ++;
-               foreach (var ov in md.Overrides)
-                       WriteLine (".override method " + StringifyMethodRef (ov));
-               EmitCattrs (md);
-               EmitGenParamCattrs (md);
-               EmitSecDeclarations (md);
-               idx = 0;
-               foreach (var par in md.Parameters) {
-                       if (par.HasCustomAttributes) {
-                               WriteLine (".param [" + (idx + 1) + "]");
-                               EmitCattrs (par);
-                       }
-                       if (par.HasConstant) {
-                               sb = new StringBuilder ();
-                               EmitConstant (par.Constant, sb);
-                               WriteLine (".param [" + (idx + 1) + "]" + sb);
-                       }
-                       idx ++;
-               }
-               // FIXME: Print RVA, code size
-               if (md == main.EntryPoint)
-                       WriteLine (".entrypoint");
-               if (md.HasBody) {
-                       MethodBody body = md.Body;
-                       WriteLine (".maxstack " + body.MaxStackSize);
-                       if (body.InitLocals)
-                               WriteLine (".locals init (");
-                       else
-                               WriteLine (".locals (");
-                       indent ++;
-                       int vindex = 0;
-                       foreach (var v in body.Variables) {
-                               WriteLine (StringifyTypeRef (v.VariableType) + " " + (v.Name == "" ? "V_" + v.Index : v.Name) + (vindex + 1 < body.Variables.Count ? ", " : ""));
-                               vindex ++;
-                       }
-                       indent --;
-                       WriteLine (")");
-
-                       List<ExceptionHandler> handlers = body.ExceptionHandlers.ToList ();
-                       List<ExceptionHandler> reverse_handlers = body.ExceptionHandlers.Reverse ().ToList ();
-
-                       var trys = new Dictionary<ExceptionHandler, bool> ();
-                       if (handlers.Count > 0)
-                               trys [handlers [0]] = true;
-                       for (int i = 1; i < handlers.Count; ++i) {
-                               trys [handlers [i]] = true;
-                               for (int j = 0; j < i; ++j) {
-                                       if (handlers [i].TryStart == handlers [j].TryStart && handlers [i].TryEnd == handlers [j].TryEnd) {
-                                               trys [handlers [i]] = false;
-                                               break;
-                                       }
-                               }
-                       }
-
-                       idx = 0;
-                       var handler_to_idx = new Dictionary<ExceptionHandler, int> ();
-                       foreach (ExceptionHandler eh in body.ExceptionHandlers) {
-                               handler_to_idx [eh] = idx;
-                               idx ++;
-                       }
-
-                       foreach (var ins in body.Instructions) {
-                               foreach (var eh in handlers) {
-                                       if (eh.TryEnd == ins && trys [eh]) {
-                                               indent --;
-                                               WriteLine ("} // end try " + handler_to_idx [eh]);
-                                       }
-
-                                       if (eh.HandlerEnd == ins) {
-                                               indent --;
-                                               WriteLine ("} // end handler " + handler_to_idx [eh]);
-                                       }
-                               }                       
-
-                               foreach (var eh in reverse_handlers) {
-                                       if (eh.TryStart == ins && trys [eh]) {
-                                               WriteLine (".try { // " + handler_to_idx [eh]);
-                                               indent ++;
-                                       }
-                                       if (eh.HandlerStart == ins) {
-                                               string type_str = null;
-                                               switch (eh.HandlerType) {
-                                               case ExceptionHandlerType.Catch:
-                                                       type_str = "catch";
-                                                       break;
-                                               case ExceptionHandlerType.Finally:
-                                                       type_str = "finally";
-                                                       break;
-                                               default:
-                                                       throw new NotImplementedException (eh.HandlerType.ToString ());
-                                               }
-                                               if (eh.CatchType == null)
-                                                       WriteLine (type_str + " { // " + handler_to_idx [eh]);
-                                               else
-                                                       WriteLine (type_str + " " + StringifyTypeRef (eh.CatchType) + " { // " + handler_to_idx [eh]);
-                                               indent ++;
-                                       }
-                               }
-
-                               WriteLine (StringifyIns (ins));
-                       }
-               }
-               indent --;
-               WriteLine ("}");
-       }
-
-       // Based on Instruction:ToString ()
-       public string StringifyIns (Instruction ins) {
-               var sb = new StringBuilder ();
-
-               AppendLabel (sb, ins);
-               sb.Append (':');
-               sb.Append ("  ");
-               sb.Append (ins.OpCode.Name);
-
-               if (ins.Operand == null)
-                       return sb.ToString ();
-
-               sb.Append (' ');
-
-               object operand = ins.Operand;
-               switch (ins.OpCode.OperandType) {
-               case OperandType.ShortInlineBrTarget:
-               case OperandType.InlineBrTarget:
-                       AppendLabel (sb, (Instruction) operand);
-                       break;
-               case OperandType.InlineSwitch:
-                       var labels = (Instruction []) operand;
-                       sb.Append ("(");
-                       for (int i = 0; i < labels.Length; i++) {
-                               if (i > 0)
-                                       sb.Append (',');
-
-                               AppendLabel (sb, labels [i]);
-                       }
-                       sb.Append (")");
-                       break;
-                       case OperandType.InlineString:
-                               sb.Append ('\"');
-                               sb.Append (EscapeString ((string)operand));
-                               sb.Append ('\"');
-                               break;
-               default:
-                       if (operand is MethodReference) {
-                               if (ins.OpCode == OpCodes.Ldtoken)
-                                       sb.Append ("method ");
-                               sb.Append (StringifyMethodRef ((MethodReference)operand));
-                       } else if (operand is TypeReference)
-                               sb.Append (StringifyTypeRef ((TypeReference)operand));
-                       else if (operand is VariableDefinition)
-                               sb.Append (operand.ToString ());
-                       else if (operand is FieldReference) {
-                               if (ins.OpCode == OpCodes.Ldtoken)
-                                       sb.Append ("field ");
-                               sb.Append (StringifyFieldRef ((FieldReference)operand));
-                       } else if (operand is ParameterDefinition) {
-                               var pd = (operand as ParameterDefinition);
-                               sb.Append (pd.Index + (pd.Method.HasThis ? 1 : 0));
-                       }
-                       else {
-                               EmitConstantOperand (operand, sb);
-                       }
-                       break;
-                       }
-
-               return sb.ToString ();
-       }
-
-       static void AppendLabel (StringBuilder builder, Instruction instruction) {
-               builder.Append ("IL_");
-               builder.Append (instruction.Offset.ToString ("x4"));
-       }
-
-       void EmitProperty (PropertyDefinition p) {
-               // FIXME: attributes
-
-               var sb = new StringBuilder ();
-               sb.Append (".property ");
-               if (p.HasThis)
-                       sb.Append ("instance ");
-               sb.Append (StringifyTypeRef (p.PropertyType));
-               sb.Append (" ");
-               sb.Append (EscapeName (p.Name));
-               sb.Append ("(");
-               int idx = 0;
-               foreach (var par in p.Parameters) {
-                       if (idx > 0)
-                               sb.Append (", ");
-                       sb.Append (StringifyTypeRef (par.ParameterType));
-                       idx ++;
-               }
-               sb.Append (")");
-               WriteLine (sb.ToString ());
-               WriteLine ("{");
-               indent ++;
-               EmitCattrs (p);
-               if (p.SetMethod != null)
-                       WriteLine (".set " + StringifyMethodRef (p.SetMethod));
-               if (p.GetMethod != null)
-                       WriteLine (".get " + StringifyMethodRef (p.GetMethod));
-               if (p.HasOtherMethods)
-                       throw new NotImplementedException ();
-               indent --;
-               WriteLine ("}");
-       }
-
-       void EmitEvent (EventDefinition e) {
-               WriteLine (".event " + StringifyTypeRef (e.EventType) + " " + EscapeName (e.Name));
-               WriteLine ("{");
-               indent ++;
-               if (e.AddMethod != null)
-                       WriteLine (".addon " + StringifyMethodRef (e.AddMethod));
-               if (e.RemoveMethod != null)
-                       WriteLine (".removeon " + StringifyMethodRef (e.RemoveMethod));
-               foreach (var m in e.OtherMethods)
-                       WriteLine (".other " + StringifyMethodRef (m));
-               indent --;
-               WriteLine ("}");
-       }
-
-       void EmitData () {
-               foreach (var fd in fields_with_rva) {
-                       WriteLine (String.Format (".data D_{0:x8} = bytearray (", fd.RVA));
-                       WriteBlob (fd.InitialValue);
-               }
-       }
-
-       void EmitConstantOperand (object operand, StringBuilder sb) {
-               if (operand is double) {
-                       double d = (double)operand;
-                       // FIXME:
-                       //if (Double.IsNaN (d) || Double.IsInfinity (d)) {
-                       {
-                               byte[] b = DataConverter.GetBytesLE (d);
-                               sb.Append ("(");
-                               int index = 0;
-                               for (int i = 0; i < b.Length; ++i) {
-                                       if (index > 0)
-                                               sb.Append (" ");
-                                       sb.Append (String.Format ("{0:x2}", b [i]));
-                                       index ++;
-                               }
-                               sb.Append (")");
-                       }
-               } else if (operand is float) {
-                       float d = (float)operand;
-                       // FIXME:
-                       //if (Single.IsNaN (d) || Single.IsInfinity (d)) {
-                       {
-                               byte[] b = DataConverter.GetBytesLE (d);
-                               sb.Append ("(");
-                               int index = 0;
-                               for (int i = 0; i < b.Length; ++i) {
-                                       if (index > 0)
-                                               sb.Append (" ");
-                                       sb.Append (String.Format ("{0:x2}", b [i]));
-                                       index ++;
-                               }
-                               sb.Append (")");
-                       }
-               } else if (operand.GetType ().Assembly == typeof (int).Assembly)
-                       sb.Append (operand.ToString ());
-               else
-                       throw new NotImplementedException (operand.GetType ().ToString ());
-       }
-
-       void EmitConstant (object o, StringBuilder sb) {
-               if (o is byte)
-                       sb.Append (String.Format (" = int8(0x{0:x2})", (byte)o));
-               else if (o is sbyte)
-                       sb.Append (String.Format (" = int8(0x{0:x2})", (sbyte)o));
-               else if (o is short)
-                       sb.Append (String.Format (" = int16(0x{0:x4})", (short)o));
-               else if (o is ushort)
-                       sb.Append (String.Format (" = int16(0x{0:x4})", (ushort)o));
-               else if (o is int)
-                       sb.Append (String.Format (" = int32(0x{0:x8})", (int)o));
-               else if (o is uint)
-                       sb.Append (String.Format (" = int32(0x{0:x8})", (uint)o));
-               else if (o is long)
-                       sb.Append (String.Format (" = int64(0x{0:x8})", (long)o));
-               else if (o is ulong)
-                       sb.Append (String.Format (" = int64(0x{0:x8})", (ulong)o));
-               else if (o is string)
-                       sb.Append (String.Format (" = \"{0}\"", EscapeString ((string)o)));
-               else if (o is bool)
-                       sb.Append (String.Format (" = bool({0})", (bool)o ? "true" : " false"));
-               else if (o is char)
-                       sb.Append (String.Format (" = char(0x{0:x4})", (int)(char)o));
-               else if (o is double)
-                       // FIXME:
-                       sb.Append (String.Format (" = float64({0:f})", (double)o));
-               else if (o is float)
-                       // FIXME:
-                       sb.Append (String.Format (" = float32({0:f})", (float)o));
-               else if (o == null)
-                       sb.Append ("= nullref");
-               else
-                       throw new NotImplementedException ("" + o.GetType ().ToString () + " " + o.ToString ());
-       }
-}
diff --git a/mcs/tools/ildasm/ildasm.exe.sources b/mcs/tools/ildasm/ildasm.exe.sources
deleted file mode 100644 (file)
index 937aaea..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-ildasm.cs
-tables.cs
-DataConverter.cs
-
-
diff --git a/mcs/tools/ildasm/tables.cs b/mcs/tools/ildasm/tables.cs
deleted file mode 100644 (file)
index dd8d8c6..0000000
+++ /dev/null
@@ -1,606 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Collections.Generic;
-using System.Linq;
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-using Mono;
-
-/*
- * This partial class contains the tables used by the disassembler.
- */
-public partial class ILDAsm {
-
-       Dictionary<uint, string> type_access_map = new Dictionary <uint, string> () {
-               { (uint)TypeAttributes.NotPublic, "private " },
-               { (uint)TypeAttributes.Public, "public " },
-               { (uint)TypeAttributes.NestedPublic, "nested public " },
-               { (uint)TypeAttributes.NestedPrivate, "nested private " },
-               { (uint)TypeAttributes.NestedFamily, "nested family " },
-               { (uint)TypeAttributes.NestedAssembly, "nested assembly " },
-               { (uint)TypeAttributes.NestedFamANDAssem, "nested famandassem " },
-               { (uint)TypeAttributes.NestedFamORAssem, "nested famorassem " },
-       };
-       Dictionary<uint, string> type_layout_map = new Dictionary <uint, string> () {
-               { (uint)TypeAttributes.AutoLayout, "auto " },
-               { (uint)TypeAttributes.SequentialLayout, "sequential " },
-               { (uint)TypeAttributes.ExplicitLayout, "explicit " }
-       };
-       Dictionary<uint, string> type_string_format_map = new Dictionary <uint, string> () {
-               { (uint)TypeAttributes.AnsiClass, "ansi " },
-               { (uint)TypeAttributes.UnicodeClass, "unicode " },
-               //{ (uint)TypeAttributes.AutoClass, "unicode " },
-       };
-       Dictionary<uint, string> type_flag_map = new Dictionary <uint, string> () {
-               { (uint)TypeAttributes.Abstract, "abstract " },
-               { (uint)TypeAttributes.Sealed, "sealed " },
-               { (uint)TypeAttributes.SpecialName, "specialname " },
-               { (uint)TypeAttributes.Import, "import " },
-               { (uint)TypeAttributes.Serializable, "serializable " },
-               { (uint)TypeAttributes.BeforeFieldInit, "beforefieldinit " },
-               { (uint)TypeAttributes.RTSpecialName, "rtspecialname " },
-               //{ (uint)TypeAttributes.HasSecurity, "rtspecialname " },
-               //{ (uint)TypeAttributes.Forwarder, "rtspecialname " },
-       };
-
-       Dictionary<uint, string> type_sem_map = new Dictionary <uint, string> () {
-               { (uint)TypeAttributes.Class, "" },
-               { (uint)TypeAttributes.Interface, "interface " },
-       };
-
-
-       Dictionary<uint, string> field_access_map = new Dictionary <uint, string> () {
-               { (uint)FieldAttributes.Private, "private " },
-               { (uint)FieldAttributes.FamANDAssem, "famandassem " },
-               { (uint)FieldAttributes.Assembly, "assembly " },
-               { (uint)FieldAttributes.Family, "family " },
-               { (uint)FieldAttributes.FamORAssem, "famorassem " },
-               { (uint)FieldAttributes.Public, "public " },
-       };
-
-       Dictionary<uint, string> field_flag_map = new Dictionary <uint, string> () {
-               { (uint)FieldAttributes.Static, "static " },
-               { (uint)FieldAttributes.Literal, "literal " },
-               { (uint)FieldAttributes.InitOnly, "initonly " },
-               { (uint)FieldAttributes.SpecialName, "specialname " },
-               { (uint)FieldAttributes.RTSpecialName, "rtspecialname " },
-               { (uint)FieldAttributes.NotSerialized, "notserialized " },              
-       };
-
-
-       Dictionary<uint, string> method_access_map = new Dictionary <uint, string> () {
-               { (uint)MethodAttributes.CompilerControlled, "privatescope " },
-               { (uint)MethodAttributes.Private, "private " },
-               { (uint)MethodAttributes.Public, "public " },
-               { (uint)MethodAttributes.Family, "family " },
-               { (uint)MethodAttributes.FamORAssem, "famorassem " },
-               { (uint)MethodAttributes.Assembly, "assembly " }
-       };
-
-       Dictionary<uint, string> method_flag_map = new Dictionary <uint, string> () {
-               { (uint)MethodAttributes.Static, "static " },
-               { (uint)MethodAttributes.Final, "final " },
-               { (uint)MethodAttributes.Virtual, "virtual " },
-               { (uint)MethodAttributes.HideBySig, "hidebysig " },
-               { (uint)MethodAttributes.NewSlot, "newslot " },
-               { (uint)MethodAttributes.CheckAccessOnOverride, "strict " },
-               { (uint)MethodAttributes.Abstract, "abstract " },
-               { (uint)MethodAttributes.SpecialName, "specialname " },
-               { (uint)MethodAttributes.RTSpecialName, "rtspecialname " },
-       };
-
-
-       Dictionary<uint, string> method_impl_map = new Dictionary <uint, string> () {
-               { (uint)MethodImplAttributes.IL, "cil " },
-               { (uint)MethodImplAttributes.Runtime, "runtime " }
-       };
-       Dictionary<uint, string> method_managed_map = new Dictionary <uint, string> () {
-               { (uint)MethodImplAttributes.Managed, "managed " }
-       };
-       Dictionary<uint, string> method_impl_flag_map = new Dictionary <uint, string> () {
-               { (uint)MethodImplAttributes.PreserveSig, "preservesig " },
-               { (uint)MethodImplAttributes.InternalCall, "internalcall " },
-               { (uint)MethodImplAttributes.Synchronized, "synchronized " },
-               { (uint)MethodImplAttributes.NoInlining, "noinlining " },
-       };
-
-
-       Dictionary<NativeType, string> native_type_to_str = new Dictionary<NativeType, string> () {
-               { NativeType.Boolean, "bool" },
-               { NativeType.I1, "int8" },
-               { NativeType.U1, "unsigned int8" },
-               { NativeType.I2, "int16" },
-               { NativeType.U2, "unsigned int16" },
-               { NativeType.I4, "int32" },
-               { NativeType.U4, "unsigned int32" },
-               { NativeType.I8, "int64" },
-               { NativeType.U8, "unsigned int64" },
-               //{ NativeType.R4, "int32" },
-               //{ NativeType.R8, "unsigned int32" },
-               { NativeType.LPStr, "lpstr" },
-               { NativeType.Int, "int" },
-               //{ NativeType.Int, "int" },
-               { NativeType.Func, "method" },
-               //{ NativeType.Array, "int" },
-               //{ NativeType.Currency, "method" },
-               { NativeType.BStr, "bstr " },
-               { NativeType.LPWStr, "lpwstr" },
-               //{ NativeType.LPTStr, "lpwstr" },
-               //{ NativeType.FixedSysString, "lpwstr" },
-               { NativeType.IUnknown, "iunknown" },
-               { NativeType.IDispatch, "idispatch" },
-               { NativeType.Struct, "struct" },
-               { NativeType.IntF, "interface" },
-               //{ NativeType.SafeArray, "interface" },
-               //{ NativeType.FixedArray, "interface" },
-               //{ NativeType.ByValStr, "interface" },
-               //{ NativeType.ANSIBStr, "interface" },
-               //{ NativeType.TBStr, "interface" },
-               { NativeType.VariantBool, "variant bool" },
-               { NativeType.ASAny, "as any" },
-               { NativeType.LPStruct, "lpstruct" },
-               //{ NativeType.CustomMarshaler, "lpstruct" },
-               //{ NativeType.Error, "lpstruct" },
-       };
-
-
-       Dictionary<uint, string> pinvoke_char_set_map = new Dictionary <uint, string> () {
-               { (uint)PInvokeAttributes.CharSetNotSpec, "" },
-               { (uint)PInvokeAttributes.CharSetAnsi, "ansi " },
-               { (uint)PInvokeAttributes.CharSetUnicode, "unicode " },
-               { (uint)PInvokeAttributes.CharSetAuto, "autochar " },
-       };
-
-       Dictionary<uint, string> pinvoke_cconv_map = new Dictionary <uint, string> () {
-               { (uint)PInvokeAttributes.CallConvWinapi, "winapi " },
-               { (uint)PInvokeAttributes.CallConvCdecl, "cdecl " },
-               { (uint)PInvokeAttributes.CallConvStdCall, "stdcall " },
-               { (uint)PInvokeAttributes.CallConvThiscall, "thiscall " },
-               { (uint)PInvokeAttributes.CallConvFastcall, "fastcall " },
-       };
-
-       Dictionary<uint, string> pinvoke_flags_map = new Dictionary <uint, string> () {
-               { (uint)PInvokeAttributes.SupportsLastError, "lasterr " },
-       };
-
-
-       Dictionary<SecurityAction, string> sec_action_to_string = new Dictionary<SecurityAction, string> () {
-               //{ SecurityAction.Request, "reqmin" },
-               { SecurityAction.Demand, "demand" },
-               { SecurityAction.Assert, "assert" },
-               { SecurityAction.Deny, "deny" },
-               { SecurityAction.PermitOnly, "permitonly" },
-               { SecurityAction.LinkDemand, "linkcheck" },
-               { SecurityAction.InheritDemand, "inheritcheck" },
-               { SecurityAction.RequestMinimum, "reqmin" },
-               { SecurityAction.RequestOptional, "reqopt" },
-               { SecurityAction.RequestRefuse, "reqrefuse" },
-               //{ SecurityAction.PreJitGrant, "reqmin" },
-               //{ SecurityAction.PreJitDeny, "reqmin" },
-               //{ SecurityAction.NonCasDemand, "reqmin" },
-               //{ SecurityAction.NonCasLinkDemand, "reqmin" },
-               //{ SecurityAction.NonCasInheritance, "reqmin" },
-       };
-
-
-       Dictionary<string, bool> keyword_table = new Dictionary<string, bool> {
-               {"9", true},
-               {"abstract", true},
-               {"add", true},
-               {"add.ovf", true},
-               {"add.ovf.un", true},
-               {"algorithm", true},
-               {"alignment", true},
-               {"and", true},
-               {"ansi", true},
-               {"any", true},
-               {"arglist", true},
-               {"array", true},
-               {"as", true},
-               {"assembly", true},
-               {"assert", true},
-               {"at", true},
-               {"autochar", true},
-               {"auto", true},
-               {"beforefieldinit", true},
-               {"bestfit", true},
-               {"beq", true},
-               {"beq.s", true},
-               {"bge", true},
-               {"bge.s", true},
-               {"bge.un", true},
-               {"bge.un.s", true},
-               {"bgt", true},
-               {"bgt.s", true},
-               {"bgt.un", true},
-               {"bgt.un.s", true},
-               {"ble", true},
-               {"ble.s", true},
-               {"ble.un", true},
-               {"ble.un.s", true},
-               {"blob", true},
-               {"blob_object", true},
-               {"blt", true},
-               {"blt.s", true},
-               {"blt.un", true},
-               {"blt.un.s", true},
-               {"bne.un", true},
-               {"bne.un.s", true},
-               {"bool", true},
-               {"box", true},
-               {"break", true},
-               {"brfalse", true},
-               {"brfalse.s", true},
-               {"br", true},
-               {"brinst", true},
-               {"brinst.s", true},
-               {"brnull", true},
-               {"brnull.s", true},
-               {"br.s", true},
-               {"brtrue", true},
-               {"brtrue.s", true},
-               {"brzero", true},
-               {"brzero.s", true},
-               {"bstr", true},
-               {"bytearray", true},
-               {"byvalstr", true},
-               {"call", true},
-               {"callconv", true},
-               {"calli", true},
-               {"callmostderived", true},
-               {"callvirt", true},
-               {"carray", true},
-               {"castclass", true},
-               {"catch", true},
-               {"cdecl", true},
-               {"ceq", true},
-               {"cf", true},
-               {"cgt", true},
-               {"cgt.un", true},
-               {"char", true},
-               {"charmaperror", true},
-               {"cil", true},
-               {"ckfinite", true},
-               {"class", true},
-               {"clsid", true},
-               {"clt", true},
-               {"clt.un", true},
-               {"Compilercontrolled", true},
-               {"const", true},
-               {"conv.i1", true},
-               {"conv.i2", true},
-               {"conv.i4", true},
-               {"conv.i8", true},
-               {"conv.i", true},
-               {"conv.ovf.i1", true},
-               {"conv.ovf.i1.un", true},
-               {"conv.ovf.i2", true},
-               {"conv.ovf.i2.un", true},
-               {"conv.ovf.i4", true},
-               {"conv.ovf.i4.un", true},
-               {"conv.ovf.i8", true},
-               {"conv.ovf.i8.un", true},
-               {"conv.ovf.i", true},
-               {"conv.ovf.i.un", true},
-               {"conv.ovf.u1", true},
-               {"conv.ovf.u1.un", true},
-               {"conv.ovf.u2", true},
-               {"conv.ovf.u2.un", true},
-               {"conv.ovf.u4", true},
-               {"conv.ovf.u4.un", true},
-               {"conv.ovf.u8", true},
-               {"conv.ovf.u8.un", true},
-               {"conv.ovf.u", true},
-               {"conv.ovf.u.un", true},
-               {"conv.r4", true},
-               {"conv.r8", true},
-               {"conv.r.un", true},
-               {"conv.u1", true},
-               {"conv.u2", true},
-               {"conv.u4", true},
-               {"conv.u8", true},
-               {"conv.u", true},
-               {"cpblk", true},
-               {"cpobj", true},
-               {"currency", true},
-               {"custom", true},
-               {"date", true},
-               {"decimal", true},
-               {"default", true},
-               {"demand", true},
-               {"deny", true},
-               {"div", true},
-               {"div.un", true},
-               {"dup", true},
-               {"endfault", true},
-               {"endfilter", true},
-               {"endfinally", true},
-               {"endmac", true},
-               {"enum", true},
-               {"error", true},
-               {"explicit", true},
-               {"extends", true},
-               {"extern", true},
-               {"false", true},
-               {"famandassem", true},
-               {"family", true},
-               {"famorassem", true},
-               {"fastcall", true},
-               {"fault", true},
-               {"field", true},
-               {"filetime", true},
-               {"filter", true},
-               {"final", true},
-               {"finally", true},
-               {"fixed", true},
-               {"flags", true},
-               {"float32", true},
-               {"float64", true},
-               {"float", true},
-               {"forwardref", true},
-               {"fromunmanaged", true},
-               {"handler", true},
-               {"hidebysig", true},
-               {"hresult", true},
-               {"idispatch", true},
-               {"il", true},
-               {"illegal", true},
-               {"implements", true},
-               {"implicitcom", true},
-               {"implicitres", true},
-               {"import", true},
-               {"in", true},
-               {"inheritcheck", true},
-               {"initblk", true},
-               {"init", true},
-               {"initobj", true},
-               {"initonly", true},
-               {"instance", true},
-               {"int16", true},
-               {"int32", true},
-               {"int64", true},
-               {"int8", true},
-               {"interface", true},
-               {"internalcall", true},
-               {"int", true},
-               {"isinst", true},
-               {"iunknown", true},
-               {"jmp", true},
-               {"lasterr", true},
-               {"lcid", true},
-               {"ldarg.0", true},
-               {"ldarg.1", true},
-               {"ldarg.2", true},
-               {"ldarg.3", true},
-               {"ldarga", true},
-               {"ldarga.s", true},
-               {"ldarg", true},
-               {"ldarg.s", true},
-               {"ldc.i4.0", true},
-               {"ldc.i4.1", true},
-               {"ldc.i4.2", true},
-               {"ldc.i4.3", true},
-               {"ldc.i4.4", true},
-               {"ldc.i4.5", true},
-               {"ldc.i4.6", true},
-               {"ldc.i4.7", true},
-               {"ldc.i4.8", true},
-               {"ldc.i4", true},
-               {"ldc.i4.m1", true},
-               {"ldc.i4.M1", true},
-               {"ldc.i4.s", true},
-               {"ldc.i8", true},
-               {"ldc.r4", true},
-               {"ldc.r8", true},
-               {"ldelem", true},
-               {"ldelema", true},
-               {"ldelem.i1", true},
-               {"ldelem.i2", true},
-               {"ldelem.i4", true},
-               {"ldelem.i8", true},
-               {"ldelem.i", true},
-               {"ldelem.r4", true},
-               {"ldelem.r8", true},
-               {"ldelem.ref", true},
-               {"ldelem.u1", true},
-               {"ldelem.u2", true},
-               {"ldelem.u4", true},
-               {"ldelem.u8", true},
-               {"ldflda", true},
-               {"ldfld", true},
-               {"ldftn", true},
-               {"ldind.i1", true},
-               {"ldind.i2", true},
-               {"ldind.i4", true},
-               {"ldind.i8", true},
-               {"ldind.i", true},
-               {"ldind.r4", true},
-               {"ldind.r8", true},
-               {"ldind.ref", true},
-               {"ldind.u1", true},
-               {"ldind.u2", true},
-               {"ldind.u4", true},
-               {"ldind.u8", true},
-               {"ldlen", true},
-               {"ldloc.0", true},
-               {"ldloc.1", true},
-               {"ldloc.2", true},
-               {"ldloc.3", true},
-               {"ldloca", true},
-               {"ldloca.s", true},
-               {"ldloc", true},
-               {"ldloc.s", true},
-               {"ldnull", true},
-               {"ldobj", true},
-               {"ldsflda", true},
-               {"ldsfld", true},
-               {"ldstr", true},
-               {"ldtoken", true},
-               {"ldvirtftn", true},
-               {"leave", true},
-               {"leave.s", true},
-               {"legacy", true},
-               {"linkcheck", true},
-               {"literal", true},
-               {"localloc", true},
-               {"lpstr", true},
-               {"lpstruct", true},
-               {"lptstr", true},
-               {"lpvoid", true},
-               {"lpwstr", true},
-               {"managed", true},
-               {"marshal", true},
-               {"method", true},
-               {"mkrefany", true},
-               {"modopt", true},
-               {"modreq", true},
-               {"mul", true},
-               {"mul.ovf", true},
-               {"mul.ovf.un", true},
-               {"native", true},
-               {"neg", true},
-               {"nested", true},
-               {"newarr", true},
-               {"newobj", true},
-               {"newslot", true},
-               {"noappdomain", true},
-               {"noinlining", true},
-               {"nomachine", true},
-               {"nomangle", true},
-               {"nometadata", true},
-               {"noncasdemand", true},
-               {"noncasinheritance", true},
-               {"noncaslinkdemand", true},
-               {"nop", true},
-               {"noprocess", true},
-               {"not", true},
-               {"not_in_gc_heap", true},
-               {"notremotable", true},
-               {"notserialized", true},
-               {"null", true},
-               {"nullref", true},
-               {"object", true},
-               {"objectref", true},
-               {"off", true},
-               {"on", true},
-               {"opt", true},
-               {"optil", true},
-               {"or", true},
-               {"out", true},
-               {"permitonly", true},
-               {"pinned", true},
-               {"pinvokeimpl", true},
-               {"pop", true},
-               {"prefix1", true},
-               {"prefix2", true},
-               {"prefix3", true},
-               {"prefix4", true},
-               {"prefix5", true},
-               {"prefix6", true},
-               {"prefix7", true},
-               {"prefixref", true},
-               {"prejitdeny", true},
-               {"prejitgrant", true},
-               {"preservesig", true},
-               {"private", true},
-               {"privatescope", true},
-               {"property", true},
-               {"protected", true},
-               {"public", true},
-               {"readonly", true},
-               {"record", true},
-               {"refany", true},
-               {"refanytype", true},
-               {"refanyval", true},
-               {"rem", true},
-               {"rem.un", true},
-               {"reqmin", true},
-               {"reqopt", true},
-               {"reqrefuse", true},
-               {"reqsecobj", true},
-               {"request", true},
-               {"ret", true},
-               {"rethrow", true},
-               {"retval", true},
-               {"rtspecialname", true},
-               {"runtime", true},
-               {"safearray", true},
-               {"sealed", true},
-               {"sequential", true},
-               {"serializable", true},
-               {"shl", true},
-               {"shr", true},
-               {"shr.un", true},
-               {"sizeof", true},
-               {"special", true},
-               {"specialname", true},
-               {"starg", true},
-               {"starg.s", true},
-               {"static", true},
-               {"stdcall", true},
-               {"stelem", true},
-               {"stelem.i1", true},
-               {"stelem.i2", true},
-               {"stelem.i4", true},
-               {"stelem.i8", true},
-               {"stelem.i", true},
-               {"stelem.r4", true},
-               {"stelem.r8", true},
-               {"stelem.ref", true},
-               {"stfld", true},
-               {"stind.i1", true},
-               {"stind.i2", true},
-               {"stind.i4", true},
-               {"stind.i8", true},
-               {"stind.i", true},
-               {"stind.r4", true},
-               {"stind.r8", true},
-               {"stloc", true},
-               {"stobj", true},
-               {"storage", true},
-               {"stored_object", true},
-               {"streamed_object", true},
-               {"stream", true},
-               {"strict", true},
-               {"string", true},
-               {"struct", true},
-               {"stsfld", true},
-               {"sub", true},
-               {"sub.ovf", true},
-               {"sub.ovf.un", true},
-               {"switch", true},
-               {"synchronized", true},
-               {"syschar", true},
-               {"sysstring", true},
-               {"tbstr", true},
-               {"thiscall", true},
-               {"tls", true},
-               {"to", true},
-               {"true", true},
-               {"type", true},
-               {"typedref", true},
-               {"uint", true},
-               {"uint8", true},
-               {"uint16", true},
-               {"uint32", true},
-               {"uint64", true},
-               {"unbox", true},
-               {"unicode", true},
-               {"unmanagedexp", true},
-               {"unmanaged", true},
-               {"unsigned", true},
-               {"userdefined", true},
-               {"value", true},
-               {"valuetype", true},
-               {"vararg", true},
-               {"variant", true},
-               {"vector", true},
-               {"virtual", true},
-               {"void", true},
-               {"wchar", true},
-               {"winapi", true},
-               {"with", true},
-               {"xor", true},
-       };
-}
\ No newline at end of file
index 9929998565c9e1f63eafd7ff4d33c760156b5dde..5919870876ca773db4ebbb255220415b927870c5 100644 (file)
@@ -47,13 +47,11 @@ namespace Mono.Documentation {
                internal ExceptionSources (TypeReference exception)
                {
                        Exception = exception;
-                       SourcesList = new List<MemberReference> ();
-                       Sources = new ReadOnlyCollection<MemberReference> (SourcesList);
+                       Sources   = new HashSet<MemberReference> ();
                }
 
                public TypeReference Exception { get; private set; }
-               public ReadOnlyCollection<MemberReference> Sources { get; private set; }
-               internal List<MemberReference> SourcesList;
+               internal  HashSet<MemberReference>  Sources;
        }
 
 
@@ -93,13 +91,13 @@ namespace Mono.Documentation {
                                Dictionary<string, ExceptionSources> e;
                                if (!db.TryGetValue (memberDecl, out e)) {
                                        e = new Dictionary<string, ExceptionSources> ();
+                                       db.Add (memberDecl, e);
                                        var bodies = GetMethodBodies (member);
                                        foreach (var body in bodies) {
                                                if (body == null)
                                                        continue;
                                                FillExceptions (body, e);
                                        }
-                                       db.Add (memberDecl, e);
                                }
                                return e.Values;
                        }
@@ -145,6 +143,7 @@ namespace Mono.Documentation {
                                                                        body.Method.DeclaringType.Scope.Name == memberRef.DeclaringType.Scope.Name) ||
                                                                ((locations & ExceptionLocations.DependentAssemblies) != 0 && 
                                                                        body.Method.DeclaringType.Scope.Name != memberRef.DeclaringType.Scope.Name)) {
+
                                                        IEnumerable<ExceptionSources> memberExceptions = this [memberRef];
                                                        AddExceptions (body, instruction, 
                                                                        memberExceptions.Select (es => es.Exception),
@@ -181,7 +180,8 @@ namespace Mono.Documentation {
                                                s = new ExceptionSources (ex);
                                                exceptions.Add (eName, s);
                                        }
-                                       s.SourcesList.AddRange (sources);
+                                       foreach (var m in sources)
+                                               s.Sources.Add (m);
                                }
                        }
                }
index cccb63f5a472b7974b2bd9c95ee9480788395fa4..7559208868850cf98cc65ce296f8a8e9b3388214 100644 (file)
@@ -1813,6 +1813,7 @@ class MDocUpdater : MDocCommand
        
        private void UpdateExceptions (XmlNode docs, MemberReference member)
        {
+               string indent = new string (' ', 10);
                foreach (var source in new ExceptionLookup (exceptions.Value)[member]) {
                        string cref = slashdocFormatter.GetDeclaration (source.Exception);
                        var node = docs.SelectSingleNode ("exception[@cref='" + cref + "']");
@@ -1820,10 +1821,10 @@ class MDocUpdater : MDocCommand
                                continue;
                        XmlElement e = docs.OwnerDocument.CreateElement ("exception");
                        e.SetAttribute ("cref", cref);
-                       e.InnerXml = "To be added; from: <see cref=\"" + 
-                               string.Join ("\" />, <see cref=\"", 
+                       e.InnerXml = "To be added; from:\n" + indent + "<see cref=\"" +
+                               string.Join ("\" />,\n" + indent + "<see cref=\"",
                                                source.Sources.Select (m => slashdocFormatter.GetDeclaration (m))
-                                               .ToArray ()) +
+                                               .OrderBy (s => s)) +
                                "\" />";
                        docs.AppendChild (e);
                }
index 4bfe5962a28bf5c228e4ef9ba34e293fba84f2f1..b818401eca1644e5845841dffac17d22bb4bdeb6 100644 (file)
@@ -119,12 +119,10 @@ public class MDocToMSXDocConverter : MDocCommand {
                                XmlElement members = outputfiles [assemblyname];
                                if (members == null) continue; // assembly is strangely not listed in the index
                                
-                               //CreateMember(EcmaDoc.GetCref (type.DocumentElement), type.DocumentElement, members);
+                               CreateMember (GetCref (type.DocumentElement), type.DocumentElement, members);
                                        
                                foreach (XmlElement memberdoc in type.SelectNodes("Type/Members/Member")) {
-                                       //string name = EcmaDoc.GetCref (memberdoc);
-                                       // FIXME
-                                       string name = ns + "." + typename + "." + memberdoc.GetAttribute ("MemberName");
+                                       string name = GetCref (memberdoc);
                                        CreateMember(name, memberdoc, members);
                                }
                        }
@@ -133,6 +131,48 @@ public class MDocToMSXDocConverter : MDocCommand {
                        AddNamespaceSummary(nsSummaries, basepath, nsnode.GetAttribute("Name"));
                }
        }
+
+       static string GetCref (XmlElement member)
+       {
+               string typeName = XmlDocUtils.ToEscapedTypeName (member.SelectSingleNode("/Type/@FullName").InnerText);
+               if (member.Name == "Type")
+                       return "T:" + typeName;
+               string memberType = member.SelectSingleNode("MemberType").InnerText;
+               switch (memberType) {
+                       case "Constructor":
+                               return "C:" + typeName + MakeArgs(member);
+                       case "Event":
+                               return "E:" + typeName + "." + XmlDocUtils.ToEscapedMemberName (member.GetAttribute("MemberName"));
+                       case "Field":
+                               return "F:" + typeName + "." + XmlDocUtils.ToEscapedMemberName (member.GetAttribute("MemberName"));
+                       case "Method": {
+                               string name = "M:" + typeName + "." + XmlDocUtils.ToEscapedMemberName (member.GetAttribute("MemberName")) + MakeArgs(member);
+                               if (member.GetAttribute("MemberName") == "op_Implicit" || member.GetAttribute("MemberName") == "op_Explicit")
+                                       name += "~" + XmlDocUtils.ToTypeName (member.SelectSingleNode("ReturnValue/ReturnType").InnerText, member);
+                               return name;
+                       }
+                       case "Property":
+                               return "P:" + typeName + "." + XmlDocUtils.ToEscapedMemberName (member.GetAttribute("MemberName")) + MakeArgs(member);
+                       default:
+                               throw new NotSupportedException ("MemberType '" + memberType + "' is not supported.");
+               }
+       }
+
+       static string MakeArgs (XmlElement member)
+       {
+               XmlNodeList parameters = member.SelectNodes ("Parameters/Parameter");
+               if (parameters.Count == 0)
+                       return "";
+               StringBuilder args = new StringBuilder ();
+               args.Append ("(");
+               args.Append (XmlDocUtils.ToTypeName (parameters [0].Attributes ["Type"].Value, member));
+               for (int i = 1; i < parameters.Count; ++i) {
+                       args.Append (",");
+                       args.Append (XmlDocUtils.ToTypeName (parameters [i].Attributes ["Type"].Value, member));
+               }
+               args.Append (")");
+               return args.ToString ();
+       }
        
        private static void AddNamespaceSummary(XmlDocument nsSummaries, string basepath, string currentNs) {
                foreach (var filename in new [] {
index b8bc52ffecc13a666510df363517f5f4c78ef628..75d65a244b05105fd3f9fae787a0eca2b0d17166 100644 (file)
@@ -203,8 +203,7 @@ namespace Mono.Documentation
                                        continue;
                                var file = XmlDocUtils.GetCachedFileName (outDir, url);
                                using (var o = File.AppendText (file)) {
-                                       Node _;
-                                       string contents = docRoot.RenderUrl (url, generator, out _);
+                                       string contents = docRoot.RenderUrl (url, generator, hs);
                                        o.Write (contents);
                                }
                        }
index e98f0a129587ccbea20f09b8300fe70c0faf18a9..a44b91988ada1e1ecbf34fa48bb7da98d5bc61df 100644 (file)
   <xsl:template name="create-index">
     <xsl:if test="
         count(PageTitle/@id) &gt; 0 and 
-        count(Signature/@id) &gt; 0 and
+        (count(Signature/@id) &gt; 0 or count(Signature/div/@id) &gt; 0) and
         count(Remarks/@id) &gt; 0 and
         count(Members/@id) &gt; 0
         ">
             <xsl:attribute name="href">
               <xsl:text>#</xsl:text>
               <xsl:value-of select="Signature/@id" />
+              <xsl:value-of select="Signature/div/@id" />
             </xsl:attribute>
             <xsl:text>Signature</xsl:text>
           </a>
index d28bcd6515f16eaef76d3c1bf02f618b615ec34b..9700fe0543d474e38aa23d90e2e6a1bc6b2721f8 100644 (file)
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="MyEvent">
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="op_Explicit">
index 0fe3b00451ea840bb67279cc60849e67ecb72f20..0a415dc1226b34761e08e19f321a5cc3f2a74038 100644 (file)
@@ -29,7 +29,8 @@
         <param name="docs">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Field">
index e2acdfc9cde026aee6ed823179e6c3f7aae9f5a1..848096553647593acb8009c514615576bfa90ee5 100644 (file)
         <param name="i">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
-        <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+        <exception cref="T:System.ApplicationException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+        <exception cref="T:System.SystemException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="total">
index 0fa5fb91367ef927a5bffc9f9250dc161a4b9797..c9a3fade121af8b9259e671f439983f57ad69bbe 100644 (file)
@@ -80,7 +80,8 @@
         <param name="list">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+        <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Process">
         <param name="list">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Process&lt;T&gt;">
         <param name="list">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="UseHelper&lt;T,U,V&gt;">
index 881946f6580bca06f45642a9a6bc39a776e79182..6d67e84a38e88f5ac4db2239b66dadca19bf6cf4 100644 (file)
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="array1">
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Dynamic1">
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="DynamicE2">
index dd0db58d231252e9a7832f9df62ed6db673e56f0..c38f72491c80acf75ca1fd83b9578991cafb98e2 100644 (file)
@@ -42,7 +42,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+        <exception cref="T:System.NotImplementedException">To be added; from:
+          <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
       </Docs>
     </Member>
     <Member MemberName="ConvertAll&lt;TInput,TOutput&gt;">
@@ -68,7 +69,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+        <exception cref="T:System.InvalidOperationException">To be added; from:
+          <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Resize&lt;T&gt;">
@@ -91,7 +93,8 @@
         <param name="newSize">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+        <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
       </Docs>
     </Member>
   </Members>
index 8734f749a9b2eb05af19977d6c2e8ea868ed3c7b..c1d7858ae45136a728e44ae16e3b12c4740c64fa 100644 (file)
@@ -28,7 +28,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+        <exception cref="T:System.NotSupportedException">To be added; from:
+          <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
       </Docs>
     </Member>
   </Members>
index b082688677f9891ede22b3618dd8a51d14a0f8a4..96aee607a9951683ebd223f8b5efe2fde0c539cd 100644 (file)
@@ -131,7 +131,8 @@ and the second dimension indexed by 1, 2, and 3. </para>
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+        <exception cref="T:System.NotImplementedException">To be added; from:
+          <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
       </Docs>
     </Member>
     <Member MemberName="ConvertAll&lt;T,U&gt;">
@@ -168,7 +169,8 @@ and the second dimension indexed by 1, 2, and 3. </para>
         <remarks>
           <para>The <see cref="T:System.Converter&lt;T,U&gt;" /> is a delegate that converts an array element to the target type.  The elements of  <paramref name="array" /> are individually passed to this converter, and the converted elements are saved in the new array. The source array remains unchanged.</para>
         </remarks>
-        <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+        <exception cref="T:System.InvalidOperationException">To be added; from:
+          <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
         <exception cref="T:System.ArgumentNullException">
           <paramref name="array" /> is <see langword="null" /> or <paramref name="converter" /> is <see langword="null" />.</exception>
       </Docs>
@@ -196,7 +198,8 @@ and the second dimension indexed by 1, 2, and 3. </para>
         <param name="newSize">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+        <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
       </Docs>
     </Member>
   </Members>
index 5ce89496398ac49cd002401634d0c52c6f1909f1..f7a5f40c8f45795f4b9a60438039b3eebeba5e4d 100644 (file)
@@ -78,7 +78,8 @@
    property.</para>
           </block>
         </remarks>
-        <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+        <exception cref="T:System.NotSupportedException">To be added; from:
+          <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
         <exception cref="T:System.ArgumentException">foo</exception>
         <permission cref="T:System.SomePermission">bar</permission>
         <altmember cref="T:System.SomeMember">alt member</altmember>
index 9fe29c5aa686b03ca03e637295e817daada1421b..a4f8b4baf8d7d0df4d03d850460930f441952983 100644 (file)
       <Docs>
         <summary>To be added.</summary>
         <remarks>E:Mono.DocTest.Generic.GenericBase`1.ItemChanged</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="MyEvent">
       <Docs>
         <summary>To be added.</summary>
         <remarks>E:Mono.DocTest.Generic.GenericBase`1.MyEvent</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="op_Explicit">
index cc491e85254c7f8554c2a0a94e9d25e5ec23d999..82aa9a349194ae35692ad7a0efcec0e51ea8a6cb 100644 (file)
@@ -53,7 +53,8 @@ class Example {
         <remarks>
           <c>C:Mono.DocTest.DocAttribute(System.String)</c>
         </remarks>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Field">
index 42c429c98f8eb129ed800b2dff57f67c0a592047..d33393476a1efff36bdfce0bffe5c40add2a9d02 100644 (file)
         <summary>To be added.</summary>
         <remarks>
           <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" />.</remarks>
-        <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
-        <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+        <exception cref="T:System.ApplicationException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+        <exception cref="T:System.SystemException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="total">
index 37b8e40116b858a00bec455b4db5850827986c89..d949b562def12545dd909e8f47701484371b403b 100644 (file)
             <see cref="M:System.Collections.Generic.List{System.Int32}.Remove(`0)" />
           </para>
         </remarks>
-        <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+        <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Process">
         <summary>To be added.</summary>
         <remarks>
           <c>M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})</c>.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Process&lt;T&gt;">
         <summary>To be added.</summary>
         <remarks>
           <c>M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})</c>.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="UseHelper&lt;T,U,V&gt;">
index a3ae10a149eceb9be2ec6e694a20e6ed6eae54ea..31435197800f7f09515598fabf94131998dadd7d 100644 (file)
         <summary>To be added.</summary>
         <remarks>
           <c>E:Mono.DocTest.Widget.AnotherEvent</c>.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="array1">
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Dynamic1">
         <remarks>
           <c>E:Mono.DocTest.Widget.DynamicE1</c>
         </remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="DynamicE2">
index 2965a7f7da2ea1c9722dc82b5e48353be9932554..1f221eb27b275a8540a435acddf053668e1eff65 100644 (file)
@@ -49,7 +49,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+        <exception cref="T:System.NotImplementedException">To be added; from:
+          <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
       </Docs>
     </Member>
     <Member MemberName="ConvertAll&lt;TInput,TOutput&gt;">
@@ -78,7 +79,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+        <exception cref="T:System.InvalidOperationException">To be added; from:
+          <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Resize&lt;T&gt;">
         <param name="newSize">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+        <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
       </Docs>
     </Member>
   </Members>
index 0a1b9400db414588564e9f653fc3fe729d0a67ec..ceb5e1acfc73644967cf97a96f6c0961d418c144 100644 (file)
@@ -38,7 +38,8 @@
         <remarks>
           <c>M:System.Environment.GetFolderPath(System.Environment+SpecialFolder)</c>
         </remarks>
-        <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+        <exception cref="T:System.NotSupportedException">To be added; from:
+          <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
       </Docs>
     </Member>
   </Members>
index c8283811e0fd92ed9159051620776b49ea7bba84..393a51ae7b3e11d5c4b008a23755981f982e377b 100644 (file)
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="MyEvent">
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="op_Explicit">
index c00d0e991f32a5ec1c725ef76a04c4fdb9a15147..5516cf272ebf5d8368031f8519de9de62db4e741 100644 (file)
@@ -35,7 +35,8 @@
         <param name="docs">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Field">
index ae648fae699390fada86a85342186711cb2e5e47..410dece134385e1f29cf6b88fef4e0af23b076d9 100644 (file)
         <param name="i">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
-        <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+        <exception cref="T:System.ApplicationException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+        <exception cref="T:System.SystemException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="total">
index 458a2e255ea570236decdc1ed5a0ee26b4ca178f..96e73c3baf54b4dfdc7de15a2a75fda81aaf1371 100644 (file)
@@ -98,7 +98,8 @@
         <param name="list">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+        <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Process">
         <param name="list">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Process&lt;T&gt;">
         <param name="list">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="UseHelper&lt;T,U,V&gt;">
index 774d2396397f3999de0428c1bcd143e8b83a239a..0c1f1893057b0bdaa5cd9f7b111b95bf6b592b91 100644 (file)
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="array1">
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Dynamic1">
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="DynamicE2">
index 67fbe3ef045eb8259cae8d1dd594d8f4060ce7ba..779981099833dc7713412ac586cea044a6e554d4 100644 (file)
@@ -52,7 +52,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+        <exception cref="T:System.NotImplementedException">To be added; from:
+          <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
       </Docs>
     </Member>
     <Member MemberName="ConvertAll&lt;TInput,TOutput&gt;">
@@ -82,7 +83,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+        <exception cref="T:System.InvalidOperationException">To be added; from:
+          <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Resize&lt;T&gt;">
         <param name="newSize">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+        <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
       </Docs>
     </Member>
   </Members>
index 0576dfb26044af82a6ba47f3477b4eb1305862d9..df4c852ba766efb40577c6e4fa0a1f42b19fd034 100644 (file)
@@ -34,7 +34,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+        <exception cref="T:System.NotSupportedException">To be added; from:
+          <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
       </Docs>
     </Member>
   </Members>
index e4b74d3bac8fd0a18a061e5c3d044699958b69af..42c2af1365f43bb63f0dcdb1c58186ef85bd7e70 100644 (file)
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="MyEvent">
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="op_Explicit">
index 8fa875fe6ffa48bd0f78bbc2d41682fe8b95d7e9..fbc5798295f9105ddf938c216218949b6b219c58 100644 (file)
@@ -33,7 +33,8 @@
         <param name="docs">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Field">
index 5d27f0ade8c51687f46f7c7573bdd77dd7b5836b..6aa658cc09fc6cb96f3f8af7429ceab7b338bc68 100644 (file)
         <param name="i">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
-        <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+        <exception cref="T:System.ApplicationException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+        <exception cref="T:System.SystemException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="total">
index b30f8bdb0f126284ac8577741e65c926b654b033..a7afb6cf27a92882519bf0eacb271b108be4e90d 100644 (file)
@@ -93,7 +93,8 @@
         <param name="list">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+        <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Process">
         <param name="list">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Process&lt;T&gt;">
         <param name="list">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-        <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="UseHelper&lt;T,U,V&gt;">
index 82529c49ba35d914758ce0fda24e6194d0724c22..b2242b00993d41051ff72600d1dbd2a1856612ee 100644 (file)
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="array1">
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Dynamic1">
       <Docs>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-        <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+        <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+        <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
       </Docs>
     </Member>
     <Member MemberName="DynamicE2">
index 2965a7f7da2ea1c9722dc82b5e48353be9932554..1f221eb27b275a8540a435acddf053668e1eff65 100644 (file)
@@ -49,7 +49,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+        <exception cref="T:System.NotImplementedException">To be added; from:
+          <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
       </Docs>
     </Member>
     <Member MemberName="ConvertAll&lt;TInput,TOutput&gt;">
@@ -78,7 +79,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+        <exception cref="T:System.InvalidOperationException">To be added; from:
+          <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
       </Docs>
     </Member>
     <Member MemberName="Resize&lt;T&gt;">
         <param name="newSize">To be added.</param>
         <summary>To be added.</summary>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+        <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
       </Docs>
     </Member>
   </Members>
index 7bf1dc8fc10f9ae428990d1993772dcc90b8fbb1..5c1923816d25d423ac6282eb0c763e5cacf252e5 100644 (file)
@@ -32,7 +32,8 @@
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
-        <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+        <exception cref="T:System.NotSupportedException">To be added; from:
+          <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
       </Docs>
     </Member>
   </Members>
index 9da902d5dd3c4e465a8cdeb01a9e6439dea6313c..00b54d75199606ca4d2c4c7e248ae1a9584736f1 100644 (file)
     </div>
     <h1 class="PageTitle" id="T:Mono.DocTest.Generic.Extensions">Extensions  Class</h1>
     <p class="Summary" id="T:Mono.DocTest.Generic.Extensions:Summary">extension methods!</p>
-    <div id="T:Mono.DocTest.Generic.Extensions:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public static class  <b>Extensions</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.Extensions:Signature">public static class  <b>Extensions</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.Extensions:Docs">
       <h2 class="Section">Remarks</h2>
index 78e190fc140f193e61d8b623423d0101fc222209..1336f30720eaa1b918a4acf6ffe5b7b0e4aaf098 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Generic.Func`2:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Generic.Func`2:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">[Mono.DocTest.Doc("method")]<br />[return:Mono.DocTest.Doc("return", Field=false)]<br />public delegate <i title="return type, with attributes!">TRet</i> <b>Func&lt;[Mono.DocTest.Doc("arg!")] TArg, [Mono.DocTest.Doc("ret!")] TRet&gt;</b> ([Mono.DocTest.Doc("arg-actual")] <i title="argument type, with attributes!">TArg</i> a)<br /> where TArg : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Exception">Exception</a><br /> where TRet : </div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.Func`2:Signature">[Mono.DocTest.Doc("method")]<br />[return:Mono.DocTest.Doc("return", Field=false)]<br />public delegate <i title="return type, with attributes!">TRet</i> <b>Func&lt;[Mono.DocTest.Doc("arg!")] TArg, [Mono.DocTest.Doc("ret!")] TRet&gt;</b> ([Mono.DocTest.Doc("arg-actual")] <i title="argument type, with attributes!">TArg</i> a)<br /> where TArg : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Exception">Exception</a></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.Func`2:Docs">
       <h4 class="Subsection">Type Parameters</h4>
index ad1ce4e5fb5a8fb842f089050c62d862ecdc8bfa..640edea5d159a35c35fbc75f5ab7d095e0940cee 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>GenericBase&lt;U&gt;.FooEventArgs</b> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.EventArgs">EventArgs</a></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Signature">public class  <b>GenericBase&lt;U&gt;.FooEventArgs</b> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.EventArgs">EventArgs</a></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Docs">
       <h2 class="Section">Remarks</h2>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs">GenericBase</a>
+                      <a href="#C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs()">GenericBase</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs">GenericBase Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:member">
+        <h3 id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs()">GenericBase Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>GenericBase</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index 73d94d0ed4259dbb19119ff8dea86e00edef7f12..93df5378c0a9bcc08ccd5c5c6858e5f7d421ddc7 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection.Enumerator:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection.Enumerator:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">protected struct  <b>GenericBase&lt;U&gt;.NestedCollection.Enumerator</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection.Enumerator:Signature">protected struct  <b>GenericBase&lt;U&gt;.NestedCollection.Enumerator</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection.Enumerator:Docs">
       <h2 class="Section">Remarks</h2>
index ff94eab5013a35b930e8fad3b85137a0ebf12279..5eaccf4724866b1bdfca4d6aad441f0b7222dc75 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>GenericBase&lt;U&gt;.NestedCollection</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Signature">public class  <b>GenericBase&lt;U&gt;.NestedCollection</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Docs">
       <h2 class="Section">Remarks</h2>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Generic.GenericBase`1.NestedCollection">GenericBase</a>
+                      <a href="#C:Mono.DocTest.Generic.GenericBase`1.NestedCollection()">GenericBase</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection">GenericBase Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection:member">
+        <h3 id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection()">GenericBase Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>GenericBase</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index 59dd7e0721f462a4cce50fbd1f00c2f2a24947e2..51183f4e2bc0537219328afd00cba5aa792baa46 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Generic.GenericBase`1:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Generic.GenericBase`1:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>GenericBase&lt;U&gt;</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.GenericBase`1:Signature">public class  <b>GenericBase&lt;U&gt;</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.GenericBase`1:Docs">
       <h4 class="Subsection">Type Parameters</h4>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Generic.GenericBase`1">GenericBase</a>
+                      <a href="#C:Mono.DocTest.Generic.GenericBase`1()">GenericBase</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.Generic.GenericBase`1:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Generic.GenericBase`1">GenericBase Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Generic.GenericBase`1:member">
+        <h3 id="C:Mono.DocTest.Generic.GenericBase`1()">GenericBase Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Generic.GenericBase`1():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>GenericBase</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
                   <span class="NotEntered">Documentation for this section has not yet been entered.</span>
                 </td>
               </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentOutOfRangeException">ArgumentOutOfRangeException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.FormatException">FormatException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IndexOutOfRangeException">IndexOutOfRangeException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
               <tr valign="top">
                 <td>
                   <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.MulticastNotSupportedException">MulticastNotSupportedException</a>
                   <span class="NotEntered">Documentation for this section has not yet been entered.</span>
                 </td>
               </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentOutOfRangeException">ArgumentOutOfRangeException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.FormatException">FormatException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IndexOutOfRangeException">IndexOutOfRangeException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
               <tr valign="top">
                 <td>
                   <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.MulticastNotSupportedException">MulticastNotSupportedException</a>
index 44da611b8bd8656c70431c3b2bcbd0d2964c1602..2a71d47683c2acddc6ca52bec7948e34c5f4cdf9 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Generic.IFoo`1:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Generic.IFoo`1:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public interface  <b>IFoo&lt;T&gt;</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.IFoo`1:Signature">public interface  <b>IFoo&lt;T&gt;</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.IFoo`1:Docs">
       <h4 class="Subsection">Type Parameters</h4>
index d38aa369c1ddd36e0e5e79cd6ffc348ccc5fb415..4ce462af161b624e25f7febf041ee4b2fa644072 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>MyList&lt;T, U, V&gt;</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Signature">public class  <b>MyList&lt;T, U, V&gt;</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Docs">
       <h4 class="Subsection">Type Parameters</h4>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Generic.MyList`1.Helper`2">MyList</a>
+                      <a href="#C:Mono.DocTest.Generic.MyList`1.Helper`2()">MyList</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Generic.MyList`1.Helper`2">MyList Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Generic.MyList`1.Helper`2:member">
+        <h3 id="C:Mono.DocTest.Generic.MyList`1.Helper`2()">MyList Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Generic.MyList`1.Helper`2():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>MyList</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1.Helper`2:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1.Helper`2():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1.Helper`2:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1.Helper`2():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index da02046714c62454158a44cf200f8ed5dea9786a..312b3c4385e434565fab9bb76cfce6a01f95e1f8 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Generic.MyList`1:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Generic.MyList`1:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>MyList&lt;[Mono.DocTest.Doc("Type Parameter!")] T&gt;</b> : <a href="../Mono.DocTest.Generic/GenericBase`1.html">GenericBase&lt;T&gt;</a>,       <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;Int32[]&gt;</a></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.MyList`1:Signature">public class  <b>MyList&lt;[Mono.DocTest.Doc("Type Parameter!")] T&gt;</b> : <a href="../Mono.DocTest.Generic/GenericBase`1.html">GenericBase&lt;T&gt;</a>,        <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;Int32[]&gt;</a></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.MyList`1:Docs">
       <h4 class="Subsection">Type Parameters</h4>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Generic.MyList`1">MyList</a>
+                      <a href="#C:Mono.DocTest.Generic.MyList`1()">MyList</a>
                     </b>()</div>
                 </td>
                 <td>
                 </td>
                 <td colspan="2">
                   <b>
-                    <a href="#M:Mono.DocTest.Generic.MyList`1.GetEnumerator">GetEnumerator</a>
+                    <a href="#M:Mono.DocTest.Generic.MyList`1.GetEnumerator()">GetEnumerator</a>
                   </b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator&lt;Int32[]&gt;</a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
               </tr>
               <tr valign="top">
                 </td>
                 <td colspan="2">
                   <b>
-                    <a href="#M:Mono.DocTest.Generic.MyList`1.GetHelper``2">GetHelper&lt;U,V&gt;</a>
+                    <a href="#M:Mono.DocTest.Generic.MyList`1.GetHelper``2()">GetHelper&lt;U,V&gt;</a>
                   </b>()<nobr> : <a href="../Mono.DocTest.Generic/MyList`1+Helper`2.html">MyList&lt;T&gt;.Helper&lt;U, V&gt;</a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
               </tr>
               <tr valign="top">
                   </div>
                 </td>
                 <td>
-                  <a href="#M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator">
+                  <a href="#M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator()">
                     <b>IEnumerable.GetEnumerator</b>
                   </a>
                 </td>
     <div class="Members" id="T:Mono.DocTest.Generic.MyList`1:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Generic.MyList`1">MyList Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Generic.MyList`1:member">
+        <h3 id="C:Mono.DocTest.Generic.MyList`1()">MyList Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Generic.MyList`1():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>MyList</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator">GetEnumerator Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator()">GetEnumerator Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator&lt;Int32[]&gt;</a> <b>GetEnumerator</b> ()</div>
           <h4 class="Subsection">Returns</h4>
-          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator:Returns">
+          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator():Returns">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </blockquote>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator():Remarks">
             <tt>M:Mono.DocTest.MyList`1.GetEnumerator</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2">GetHelper&lt;U,V&gt; Generic Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2()">GetHelper&lt;U,V&gt; Generic Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public <a href="../Mono.DocTest.Generic/MyList`1+Helper`2.html">MyList&lt;T&gt;.Helper&lt;U, V&gt;</a> <b>GetHelper&lt;U, V&gt;</b> ()</div>
           <h4 class="Subsection">Type Parameters</h4>
-          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:Type Parameters">
+          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():Type Parameters">
             <dl>
               <dt>
                 <i>U</i>
             </dl>
           </blockquote>
           <h4 class="Subsection">Returns</h4>
-          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:Returns">
+          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():Returns">
             <tt>null</tt>.</blockquote>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():Remarks">
             <tt>M:Mono.DocTest.Generic.MyList`1.GetHelper``2</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator">System.Collections.IEnumerable.GetEnumerator Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator()">System.Collections.IEnumerable.GetEnumerator Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <div class="Signature">
             <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.IEnumerator">IEnumerator</a> <b>System.Collections.IEnumerable.GetEnumerator</b> ()</div>
           <h4 class="Subsection">Returns</h4>
-          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Returns">
+          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator():Returns">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </blockquote>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator():Remarks">
             <tt>M:Mono.DocTest.MyList`1.System#Collections#GetEnumerator</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index 4766687f9fb3d5b3df59e07429a30bb81627244f..75444ea1c4a7776b348c511e345dd09a9f00910b 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Generic.MyList`2:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Generic.MyList`2:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>MyList&lt;A, B&gt;</b> : <a href="../Mono.DocTest.Generic/GenericBase`1.html">GenericBase&lt;Dictionary&lt;A, B&gt;&gt;</a>,     <a href="../Mono.DocTest.Generic/IFoo`1.html">IFoo&lt;A&gt;</a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.ICollection`1">ICollection&lt;A&gt;</a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;A&gt;</a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator&lt;A&gt;</a><br /> where A : class, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IList`1">IList&lt;B&gt;</a>, new()<br /> where B : class, <i title="Ako generic param">A</i></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.MyList`2:Signature">public class  <b>MyList&lt;A, B&gt;</b> : <a href="../Mono.DocTest.Generic/GenericBase`1.html">GenericBase&lt;Dictionary&lt;A, B&gt;&gt;</a>,      <a href="../Mono.DocTest.Generic/IFoo`1.html">IFoo&lt;A&gt;</a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.ICollection`1">ICollection&lt;A&gt;</a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;A&gt;</a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator&lt;A&gt;</a><br /> where A : class, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IList`1">IList&lt;B&gt;</a>, new()<br /> where B : class, <i title="Ako generic param">A</i></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.MyList`2:Docs">
       <h4 class="Subsection">Type Parameters</h4>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Generic.MyList`2">MyList</a>
+                      <a href="#C:Mono.DocTest.Generic.MyList`2()">MyList</a>
                     </b>()</div>
                 </td>
                 <td>
                 </td>
                 <td colspan="2">
                   <b>
-                    <a href="#M:Mono.DocTest.Generic.MyList`2.Dispose">Dispose</a>
+                    <a href="#M:Mono.DocTest.Generic.MyList`2.Dispose()">Dispose</a>
                   </b>()<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
               </tr>
               <tr valign="top">
                 </td>
                 <td colspan="2">
                   <b>
-                    <a href="#M:Mono.DocTest.Generic.MyList`2.Foo">Foo</a>
+                    <a href="#M:Mono.DocTest.Generic.MyList`2.Foo()">Foo</a>
                   </b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.KeyValuePair`2">KeyValuePair&lt;IEnumerable&lt;A&gt;, IEnumerable&lt;B&gt;&gt;</a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
               </tr>
               <tr valign="top">
                 </td>
                 <td colspan="2">
                   <b>
-                    <a href="#M:Mono.DocTest.Generic.MyList`2.GetEnumerator">GetEnumerator</a>
+                    <a href="#M:Mono.DocTest.Generic.MyList`2.GetEnumerator()">GetEnumerator</a>
                   </b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.List`1.Enumerator">List&lt;A&gt;.Enumerator</a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
               </tr>
               <tr valign="top">
                 </td>
                 <td colspan="2">
                   <b>
-                    <a href="#M:Mono.DocTest.Generic.MyList`2.MoveNext">MoveNext</a>
+                    <a href="#M:Mono.DocTest.Generic.MyList`2.MoveNext()">MoveNext</a>
                   </b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
               </tr>
               <tr valign="top">
                 </td>
                 <td colspan="2">
                   <b>
-                    <a href="#M:Mono.DocTest.Generic.MyList`2.Reset">Reset</a>
+                    <a href="#M:Mono.DocTest.Generic.MyList`2.Reset()">Reset</a>
                   </b>()<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
               </tr>
             </table>
                   </div>
                 </td>
                 <td>
-                  <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear">
+                  <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear()">
                     <b>ICollection&lt;A&gt;.Clear</b>
                   </a>
                 </td>
                   </div>
                 </td>
                 <td>
-                  <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator">
+                  <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator()">
                     <b>IEnumerable&lt;A&gt;.GetEnumerator</b>
                   </a>
                 </td>
                   </div>
                 </td>
                 <td>
-                  <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator">
+                  <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator()">
                     <b>IEnumerable.GetEnumerator</b>
                   </a>
                 </td>
     <div class="Members" id="T:Mono.DocTest.Generic.MyList`2:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Generic.MyList`2">MyList Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Generic.MyList`2:member">
+        <h3 id="C:Mono.DocTest.Generic.MyList`2()">MyList Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Generic.MyList`2():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>MyList</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`2:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`2():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`2:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`2():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`2.Dispose">Dispose Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`2.Dispose:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`2.Dispose()">Dispose Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`2.Dispose():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Dispose</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Dispose:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Dispose():Remarks">
             <tt>M:Mono.DocTest.MyList`2.Dispose</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Dispose:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Dispose():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`2.Foo">Foo Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`2.Foo:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`2.Foo()">Foo Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`2.Foo():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.KeyValuePair`2">KeyValuePair&lt;IEnumerable&lt;A&gt;, IEnumerable&lt;B&gt;&gt;</a> <b>Foo</b> ()</div>
           <h4 class="Subsection">Returns</h4>
-          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo:Returns">
+          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo():Returns">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </blockquote>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo:Remarks">M:Mono.DocTest.Generic.MyList`2.Foo</div>
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo():Remarks">M:Mono.DocTest.Generic.MyList`2.Foo</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator">GetEnumerator Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator()">GetEnumerator Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.List`1.Enumerator">List&lt;A&gt;.Enumerator</a> <b>GetEnumerator</b> ()</div>
           <h4 class="Subsection">Returns</h4>
-          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator:Returns">A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.List`1.Enumerator">List&lt;`0&gt;.Enumerator</a>.</blockquote>
+          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator():Returns">A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.List`1.Enumerator">List&lt;`0&gt;.Enumerator</a>.</blockquote>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator():Remarks">
             <tt>M:Mono.DocTest.MyList`2.GetEnumerator</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`2.MoveNext">MoveNext Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`2.MoveNext:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`2.MoveNext()">MoveNext Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`2.MoveNext():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>MoveNext</b> ()</div>
           <h4 class="Subsection">Returns</h4>
-          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext:Returns">
+          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext():Returns">
             <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a>
           </blockquote>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext():Remarks">
             <tt>M:Mono.DocTest.MyList`2.MoveNext</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`2.Reset">Reset Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`2.Reset:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`2.Reset()">Reset Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`2.Reset():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Reset</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Reset:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Reset():Remarks">
             <tt>M:Mono.DocTest.MyList`2.Reset</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Reset:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Reset():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear">System.Collections.Generic.ICollection&lt;A&gt;.Clear Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear()">System.Collections.Generic.ICollection&lt;A&gt;.Clear Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <div class="Signature">
             <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>System.Collections.Generic.ICollection&lt;A&gt;.Clear</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear():Remarks">
             <tt>M:Mono.DocTest.MyList`2.System#Collections#Generic#ICollection{A}#Clear</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator">System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator()">System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <div class="Signature">
             <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator&lt;A&gt;</a> <b>System.Collections.Generic.IEnumerable&lt;A&gt;.GetEnumerator</b> ()</div>
           <h4 class="Subsection">Returns</h4>
-          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator:Returns">A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator&lt;`0&gt;</a>.</blockquote>
+          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator():Returns">A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator&lt;`0&gt;</a>.</blockquote>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator():Remarks">
             <tt>M:Mono.DocTest.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator">System.Collections.IEnumerable.GetEnumerator Method</h3>
-        <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:member">
+        <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator()">System.Collections.IEnumerable.GetEnumerator Method</h3>
+        <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <div class="Signature">
             <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.IEnumerator">IEnumerator</a> <b>System.Collections.IEnumerable.GetEnumerator</b> ()</div>
           <h4 class="Subsection">Returns</h4>
-          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Returns">
+          <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator():Returns">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </blockquote>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator():Remarks">
             <tt>M:Mono.DocTest.MyList`2.System#Collections#GetEnumerator</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator():Version Information">
             <b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index d438287e94fb442dd342ae34bd38c6913edecbfd..dae529e4670ffa4ae2804b63467aaeeef3e4b83f 100644 (file)
     </div>
     <h1 class="PageTitle" id="T:Mono.DocTest.Color">Color  Enum</h1>
     <p class="Summary" id="T:Mono.DocTest.Color:Summary">Possible colors</p>
-    <div id="T:Mono.DocTest.Color:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public enum <b>Color</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Color:Signature">public enum <b>Color</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Color:Docs">
       <h2 class="Section">Remarks</h2>
index b69c1eb4e42009755ee742618eeb8b047f75056d..a3bb5ddffefbc8459a34662e2089af1c8432d0c6 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.D:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.D:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Object">object</a> <b>D</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Func`3">Func&lt;string, object, object&gt;</a> value)</div>
+      <div class="Signature" id="T:Mono.DocTest.D:Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Object">object</a> <b>D</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Func`3">Func&lt;string, object, object&gt;</a> value)</div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.D:Docs">
       <h4 class="Subsection">Parameters</h4>
index 9c293849c14a072558b55cea07feec90ed233310..609837edbcc43382a772f4343508ecc42dfbe327 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.DocAttribute:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.DocAttribute:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">[System.AttributeUsage(System.AttributeTargets.All)]<br />public class  <b>DocAttribute</b> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Attribute">Attribute</a></div>
+      <div class="Signature" id="T:Mono.DocTest.DocAttribute:Signature">[System.AttributeUsage(System.AttributeTargets.All)]<br />public class  <b>DocAttribute</b> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Attribute">Attribute</a></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.DocAttribute:Docs">
       <h2 class="Section">Remarks</h2>
index 0cd98cc3cb45b86a85b460ffe1a9696e2839e985..bad6608916c2538ec7f354605cc452245a4a67d6 100644 (file)
     </div>
     <h1 class="PageTitle" id="T:Mono.DocTest.DocValueType">DocValueType  Struct</h1>
     <p class="Summary" id="T:Mono.DocTest.DocValueType:Summary">Process interface</p>
-    <div id="T:Mono.DocTest.DocValueType:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public struct  <b>DocValueType</b> : <a href="../Mono.DocTest/IProcess.html">IProcess</a></div>
+      <div class="Signature" id="T:Mono.DocTest.DocValueType:Signature">public struct  <b>DocValueType</b> : <a href="../Mono.DocTest/IProcess.html">IProcess</a></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.DocValueType:Docs">
       <h2 class="Section">Remarks</h2>
index 278dfe86f58d44058ce8b8eaa2446807abcbfa99..75443ba178afd3fc1e64b22d7ad7c47255fc6717 100644 (file)
     </div>
     <h1 class="PageTitle" id="T:Mono.DocTest.IProcess">IProcess  Interface</h1>
     <p class="Summary" id="T:Mono.DocTest.IProcess:Summary">Process interface</p>
-    <div id="T:Mono.DocTest.IProcess:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public interface  <b>IProcess</b></div>
+      <div class="Signature" id="T:Mono.DocTest.IProcess:Signature">public interface  <b>IProcess</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.IProcess:Docs">
       <h2 class="Section">Remarks</h2>
index fba5a9f6ccdde020535d4fe6ad2107344b3e5e3b..7e45227c71bd9a45d312962074b26544581d46a1 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.UseLists:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.UseLists:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>UseLists</b></div>
+      <div class="Signature" id="T:Mono.DocTest.UseLists:Signature">public class  <b>UseLists</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.UseLists:Docs">
       <h2 class="Section">Remarks</h2>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.UseLists">UseLists</a>
+                      <a href="#C:Mono.DocTest.UseLists()">UseLists</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.UseLists:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.UseLists">UseLists Constructor</h3>
-        <blockquote id="C:Mono.DocTest.UseLists:member">
+        <h3 id="C:Mono.DocTest.UseLists()">UseLists Constructor</h3>
+        <blockquote id="C:Mono.DocTest.UseLists():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>UseLists</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.UseLists:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.UseLists():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.UseLists:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.UseLists():Version Information">
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index 47cce1db7595173f0bed9efa7b5fc625b7f45016..ba4e2ac9660e16bafaf140546a6ba9927e83bccd 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Widget.Del:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Widget.Del:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Widget.Del</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> i)</div>
+      <div class="Signature" id="T:Mono.DocTest.Widget.Del:Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Widget.Del</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> i)</div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Widget.Del:Docs">
       <h4 class="Subsection">Parameters</h4>
index 1962c75179f61776055caa71c272cc0379a73be4..0d2bc273e90355c15da3b0acde973db38f7abb0c 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Widget.Direction:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Widget.Direction:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">[System.Flags]<br />protected enum <b>Widget.Direction</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Widget.Direction:Signature">[System.Flags]<br />protected enum <b>Widget.Direction</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Widget.Direction:Docs">
       <h2 class="Section">Remarks</h2>
index a98e7c74827fe3840f9f3b6141351a565d2b154c..05beb05f4c99eefdae9f1f1746560eeaa4ecb1be 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Widget.IMenuItem:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Widget.IMenuItem:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public interface  <b>Widget.IMenuItem</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Widget.IMenuItem:Signature">public interface  <b>Widget.IMenuItem</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Widget.IMenuItem:Docs">
       <h2 class="Section">Remarks</h2>
                 </td>
                 <td colspan="2">
                   <b>
-                    <a href="#M:Mono.DocTest.Widget.IMenuItem.A">A</a>
+                    <a href="#M:Mono.DocTest.Widget.IMenuItem.A()">A</a>
                   </b>()<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
               </tr>
             </table>
     <div class="Members" id="T:Mono.DocTest.Widget.IMenuItem:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="M:Mono.DocTest.Widget.IMenuItem.A">A Method</h3>
-        <blockquote id="M:Mono.DocTest.Widget.IMenuItem.A:member">
+        <h3 id="M:Mono.DocTest.Widget.IMenuItem.A()">A Method</h3>
+        <blockquote id="M:Mono.DocTest.Widget.IMenuItem.A():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>A</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Widget.IMenuItem.A:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Widget.IMenuItem.A():Remarks">
             <tt>M:Mono.DocTest.Widget.IMenuItem.A</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Widget.IMenuItem.A:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Widget.IMenuItem.A():Version Information">
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index 1e9918bd722a6507c7ccd0fbd4ec4a8faf3f1a49..8e2397f2c41c407e90a7ffb023182576ffda3df3 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>Widget.NestedClass.Double.Triple.Quadruple</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Signature">public class  <b>Widget.NestedClass.Double.Triple.Quadruple</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Docs">
       <h2 class="Section">Remarks</h2>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple">Widget.NestedClass.Double.Triple.Quadruple</a>
+                      <a href="#C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple()">Widget.NestedClass.Double.Triple.Quadruple</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple">Widget.NestedClass.Double.Triple.Quadruple Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:member">
+        <h3 id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple()">Widget.NestedClass.Double.Triple.Quadruple Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>Widget.NestedClass.Double.Triple.Quadruple</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple():Version Information">
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index b004c0872d581f67ce55688da36fac39f5fd605f..dd28c310b2a854272be8a1da24fa52cbc70432e0 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>Widget.NestedClass.Double.Triple</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Signature">public class  <b>Widget.NestedClass.Double.Triple</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Docs">
       <h2 class="Section">Remarks</h2>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Widget.NestedClass.Double.Triple">Widget.NestedClass.Double.Triple</a>
+                      <a href="#C:Mono.DocTest.Widget.NestedClass.Double.Triple()">Widget.NestedClass.Double.Triple</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Widget.NestedClass.Double.Triple">Widget.NestedClass.Double.Triple Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double.Triple:member">
+        <h3 id="C:Mono.DocTest.Widget.NestedClass.Double.Triple()">Widget.NestedClass.Double.Triple Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double.Triple():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>Widget.NestedClass.Double.Triple</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple():Version Information">
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index 5aad9ed459ee9f24e472d3fc68225857f6ce887d..2b6640cdde2c2ffb791a439ec3ad332e30ae6be1 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Widget.NestedClass.Double:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Widget.NestedClass.Double:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>Widget.NestedClass.Double</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass.Double:Signature">public class  <b>Widget.NestedClass.Double</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass.Double:Docs">
       <h2 class="Section">Remarks</h2>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Widget.NestedClass.Double">Widget.NestedClass.Double</a>
+                      <a href="#C:Mono.DocTest.Widget.NestedClass.Double()">Widget.NestedClass.Double</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.Widget.NestedClass.Double:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Widget.NestedClass.Double">Widget.NestedClass.Double Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double:member">
+        <h3 id="C:Mono.DocTest.Widget.NestedClass.Double()">Widget.NestedClass.Double Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>Widget.NestedClass.Double</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double():Version Information">
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index e6eea8d8dd9410dd41d575e633b43a931bdc6ead..4b2f9b768f594e02ab1bddb1dd2b0eb420f6fb5c 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Widget.NestedClass:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Widget.NestedClass:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>Widget.NestedClass</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass:Signature">public class  <b>Widget.NestedClass</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass:Docs">
       <h2 class="Section">Remarks</h2>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Widget.NestedClass">Widget.NestedClass</a>
+                      <a href="#C:Mono.DocTest.Widget.NestedClass()">Widget.NestedClass</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.Widget.NestedClass:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Widget.NestedClass">Widget.NestedClass Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Widget.NestedClass:member">
+        <h3 id="C:Mono.DocTest.Widget.NestedClass()">Widget.NestedClass Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Widget.NestedClass():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>Widget.NestedClass</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass():Version Information">
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index cb38b39455b8b0b9e44a342fc577a8c2ba5edf17..160b3ca1e72e6fbda580e92503c8b9a8d39fdd31 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Widget.NestedClass`1:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Widget.NestedClass`1:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>Widget.NestedClass&lt;T&gt;</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass`1:Signature">public class  <b>Widget.NestedClass&lt;T&gt;</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass`1:Docs">
       <h4 class="Subsection">Type Parameters</h4>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Widget.NestedClass`1">Widget.NestedClass</a>
+                      <a href="#C:Mono.DocTest.Widget.NestedClass`1()">Widget.NestedClass</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:Mono.DocTest.Widget.NestedClass`1:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Widget.NestedClass`1">Widget.NestedClass Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Widget.NestedClass`1:member">
+        <h3 id="C:Mono.DocTest.Widget.NestedClass`1()">Widget.NestedClass Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Widget.NestedClass`1():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>Widget.NestedClass</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass`1:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass`1():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass`1:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass`1():Version Information">
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index 75dce8428156d65a91d308ee6d2465cb61f2eacb..943c58d4227e67576b25a1284cf535024bab60a9 100644 (file)
     <p class="Summary" id="T:Mono.DocTest.Widget:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:Mono.DocTest.Widget:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>Widget</b> : <a href="../Mono.DocTest/IProcess.html">IProcess</a></div>
+      <div class="Signature" id="T:Mono.DocTest.Widget:Signature">public class  <b>Widget</b> : <a href="../Mono.DocTest/IProcess.html">IProcess</a></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Widget:Docs">
       <h4 class="Subsection">See Also</h4>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:Mono.DocTest.Widget">Widget</a>
+                      <a href="#C:Mono.DocTest.Widget()">Widget</a>
                     </b>()</div>
                 </td>
                 <td>
                 </td>
                 <td colspan="2">
                   <b>
-                    <a href="#M:Mono.DocTest.Widget.M0">M0</a>
+                    <a href="#M:Mono.DocTest.Widget.M0()">M0</a>
                   </b>()<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
               </tr>
               <tr valign="top">
     <div class="Members" id="T:Mono.DocTest.Widget:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:Mono.DocTest.Widget">Widget Constructor</h3>
-        <blockquote id="C:Mono.DocTest.Widget:member">
+        <h3 id="C:Mono.DocTest.Widget()">Widget Constructor</h3>
+        <blockquote id="C:Mono.DocTest.Widget():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>Widget</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget:Remarks">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget():Remarks">
             <p>
               <tt>C:Mono.DocTest.Widget</tt>.</p>
             <p>
             </p>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:Mono.DocTest.Widget:Version Information">
+          <div class="SectionBox" id="C:Mono.DocTest.Widget():Version Information">
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
                   <span class="NotEntered">Documentation for this section has not yet been entered.</span>
                 </td>
               </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentOutOfRangeException">ArgumentOutOfRangeException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.FormatException">FormatException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IndexOutOfRangeException">IndexOutOfRangeException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
               <tr valign="top">
                 <td>
                   <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.MulticastNotSupportedException">MulticastNotSupportedException</a>
                   <span class="NotEntered">Documentation for this section has not yet been entered.</span>
                 </td>
               </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentOutOfRangeException">ArgumentOutOfRangeException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.FormatException">FormatException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
+                  <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IndexOutOfRangeException">IndexOutOfRangeException</a>
+                </td>
+                <td>
+                  <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+                </td>
+              </tr>
               <tr valign="top">
                 <td>
                   <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.MulticastNotSupportedException">MulticastNotSupportedException</a>
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
-        <h3 id="M:Mono.DocTest.Widget.M0">M0 Method</h3>
-        <blockquote id="M:Mono.DocTest.Widget.M0:member">
+        <h3 id="M:Mono.DocTest.Widget.M0()">M0 Method</h3>
+        <blockquote id="M:Mono.DocTest.Widget.M0():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public static <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>M0</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Widget.M0:Remarks">
+          <div class="SectionBox" id="M:Mono.DocTest.Widget.M0():Remarks">
             <tt>M:Mono.DocTest.Widget.M0</tt>.</div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="M:Mono.DocTest.Widget.M0:Version Information">
+          <div class="SectionBox" id="M:Mono.DocTest.Widget.M0():Version Information">
             <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index 057984a71ba9db5a1fae04881d2f895c56762a23..e0711675d7f91dbf93f4e33713f0e9dcdf34fae7 100644 (file)
     </div>
     <h1 class="PageTitle" id="T:NoNamespace">NoNamespace  Class</h1>
     <p class="Summary" id="T:NoNamespace:Summary">Namespace Test: [<a href="Mono.DocTest/index.html">Mono.DocTest</a>]</p>
-    <div id="T:NoNamespace:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>NoNamespace</b></div>
+      <div class="Signature" id="T:NoNamespace:Signature">public class  <b>NoNamespace</b></div>
     </div>
     <div class="Remarks" id="T:NoNamespace:Docs">
       <h2 class="Section">Remarks</h2>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:NoNamespace">NoNamespace</a>
+                      <a href="#C:NoNamespace()">NoNamespace</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:NoNamespace:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:NoNamespace">NoNamespace Constructor</h3>
-        <blockquote id="C:NoNamespace:member">
+        <h3 id="C:NoNamespace()">NoNamespace Constructor</h3>
+        <blockquote id="C:NoNamespace():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>NoNamespace</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:NoNamespace:Remarks">
+          <div class="SectionBox" id="C:NoNamespace():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:NoNamespace:Version Information">
+          <div class="SectionBox" id="C:NoNamespace():Version Information">
             <b>Namespace: </b>
             <br />
             <b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
index d012d7772fbd880ccc21bb92113e2f48656bf008..4a0f413147cadcff48a9bc43be9649922894d62b 100644 (file)
     <p class="Summary" id="T:System.Action`1:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:System.Action`1:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Action&lt;T&gt;</b> (<i title="To be added.">T</i> obj)</div>
+      <div class="Signature" id="T:System.Action`1:Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Action&lt;T&gt;</b> (<i title="To be added.">T</i> obj)</div>
     </div>
     <div class="Remarks" id="T:System.Action`1:Docs">
       <h4 class="Subsection">Type Parameters</h4>
index fe4d7ed74badc38aa3c7a1c04d69708305a8ae8b..4e82fe559ac0b3e56b3dca77a835297989b6ed79 100644 (file)
     <p class="Summary" id="T:System.Array:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:System.Array:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public class  <b>Array</b></div>
+      <div class="Signature" id="T:System.Array:Signature">public class  <b>Array</b></div>
     </div>
     <div class="Remarks" id="T:System.Array:Docs">
       <h2 class="Section">Remarks</h2>
                 <td>
                   <div>
                     <b>
-                      <a href="#C:System.Array">Array</a>
+                      <a href="#C:System.Array()">Array</a>
                     </b>()</div>
                 </td>
                 <td>
     <div class="Members" id="T:System.Array:Members">
       <h2 class="Section" id="MemberDetails">Member Details</h2>
       <div class="SectionBox" id="_MemberDetails">
-        <h3 id="C:System.Array">Array Constructor</h3>
-        <blockquote id="C:System.Array:member">
+        <h3 id="C:System.Array()">Array Constructor</h3>
+        <blockquote id="C:System.Array():member">
           <p class="Summary">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </p>
           <h2>Syntax</h2>
           <div class="Signature">public  <b>Array</b> ()</div>
           <h2 class="Section">Remarks</h2>
-          <div class="SectionBox" id="C:System.Array:Remarks">
+          <div class="SectionBox" id="C:System.Array():Remarks">
             <span class="NotEntered">Documentation for this section has not yet been entered.</span>
           </div>
           <h2 class="Section">Requirements</h2>
-          <div class="SectionBox" id="C:System.Array:Version Information">
+          <div class="SectionBox" id="C:System.Array():Version Information">
             <b>Namespace: </b>System<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
           <hr size="1" />
         </blockquote>
index 308f3060ea458ce8058c224a1cb9a3e3100bd7fa..906eaab1e5a9f15fd4cceb274c70be7fb6877c3c 100644 (file)
     <p class="Summary" id="T:System.AsyncCallback:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:System.AsyncCallback:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>AsyncCallback</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IAsyncResult">IAsyncResult</a> ar)</div>
+      <div class="Signature" id="T:System.AsyncCallback:Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>AsyncCallback</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IAsyncResult">IAsyncResult</a> ar)</div>
     </div>
     <div class="Remarks" id="T:System.AsyncCallback:Docs">
       <h4 class="Subsection">Parameters</h4>
index a99c87ca88f0ffac2ab85a3a379ae92e5351bfb3..edb7aa381956f919bb62ae34b1e5616b50884b5f 100644 (file)
     <p class="Summary" id="T:System.Environment.SpecialFolder:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:System.Environment.SpecialFolder:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public enum <b>Environment.SpecialFolder</b></div>
+      <div class="Signature" id="T:System.Environment.SpecialFolder:Signature">public enum <b>Environment.SpecialFolder</b></div>
     </div>
     <div class="Remarks" id="T:System.Environment.SpecialFolder:Docs">
       <h2 class="Section">Remarks</h2>
index d279fea30f49c36e47da8fddec7ea977633eabfe..f63fc35b9f2d6821d2f5c8becaa6b924a9505199 100644 (file)
     <p class="Summary" id="T:System.Environment:Summary">
       <span class="NotEntered">Documentation for this section has not yet been entered.</span>
     </p>
-    <div id="T:System.Environment:Signature">
+    <div>
       <h2>Syntax</h2>
-      <div class="Signature">public static class  <b>Environment</b></div>
+      <div class="Signature" id="T:System.Environment:Signature">public static class  <b>Environment</b></div>
     </div>
     <div class="Remarks" id="T:System.Environment:Docs">
       <h2 class="Section">Remarks</h2>
index 140bbe40ca37f9a6e31c4b85b9b59cf6c92f2a9d..e431794cd27283d46824b4d130cc36de91e7a69b 100644 (file)
@@ -74,7 +74,8 @@ class Example {
             <remarks>
                 <c>C:Mono.DocTest.DocAttribute(System.String)</c>
             </remarks>
-            <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+            <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
         </member>
         <member name="F:Mono.DocTest.DocAttribute.Field">
             <summary>To be added.</summary>
@@ -111,8 +112,10 @@ class Example {
             <summary>To be added.</summary>
             <remarks>
                 <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" />.</remarks>
-            <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
-            <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+            <exception cref="T:System.ApplicationException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+            <exception cref="T:System.SystemException">To be added; from:
+          <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
         </member>
         <member name="F:Mono.DocTest.DocValueType.total">
             <summary>To be added.</summary>
@@ -157,15 +160,21 @@ class Example {
                     <see cref="M:System.Collections.Generic.List{System.Int32}.Remove(`0)" />
                 </para>
             </remarks>
-            <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+            <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
         </member>
         <member name="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})">
             <param name="list">A <see cref="T:Mono.DocTest.Generic.MyList{System.Predicate{System.Int32}}" />.</param>
             <summary>To be added.</summary>
             <remarks>
                 <c>M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})</c>.</remarks>
-            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-            <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+            <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+            <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
         </member>
         <member name="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})">
             <typeparam name="T">Something Else</typeparam>
@@ -173,8 +182,10 @@ class Example {
             <summary>To be added.</summary>
             <remarks>
                 <c>M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})</c>.</remarks>
-            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
-            <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+            <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+            <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
         </member>
         <member name="M:Mono.DocTest.UseLists.UseHelper``3(Mono.DocTest.Generic.MyList{``0}+Helper{``1,``2})">
             <typeparam name="T">
@@ -240,8 +251,73 @@ class Example {
             <summary>To be added.</summary>
             <remarks>
                 <c>E:Mono.DocTest.Widget.AnotherEvent</c>.</remarks>
-            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-            <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+            <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
         </member>
         <member name="F:Mono.DocTest.Widget.array1">
             <summary>To be added.</summary>
@@ -285,7 +361,8 @@ class Example {
             <summary>To be added.</summary>
             <returns>To be added.</returns>
             <remarks>To be added.</remarks>
-            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+            <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
         </member>
         <member name="M:Mono.DocTest.Widget.Dynamic1(System.Collections.Generic.Dictionary{System.Object,System.String})">
             <param name="value">To be added.</param>
@@ -310,8 +387,73 @@ class Example {
             <remarks>
                 <c>E:Mono.DocTest.Widget.DynamicE1</c>
             </remarks>
-            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-            <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+            <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
         </member>
         <member name="E:Mono.DocTest.Widget.DynamicE2">
             <summary>To be added.</summary>
@@ -691,14 +833,144 @@ class Example {
         <member name="E:Mono.DocTest.Generic.GenericBase`1.ItemChanged">
             <summary>To be added.</summary>
             <remarks>E:Mono.DocTest.Generic.GenericBase`1.ItemChanged</remarks>
-            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-            <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+            <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
         </member>
         <member name="E:Mono.DocTest.Generic.GenericBase`1.MyEvent">
             <summary>To be added.</summary>
             <remarks>E:Mono.DocTest.Generic.GenericBase`1.MyEvent</remarks>
-            <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
-            <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+            <exception cref="T:System.ArgumentException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.ArgumentNullException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.FormatException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+            <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+          <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+          <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+          <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+          <see cref="M:System.String.get_Chars(System.Int32)" />,
+          <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+          <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+          <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+          <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
         </member>
         <member name="M:Mono.DocTest.Generic.GenericBase`1.op_Explicit(`0Mono`0.`0DocTest`0.`0Generic`0.`0GenericBase`0{`0U`0})~`0U`0">
             <param name="list">Insert description here</param>
@@ -972,7 +1244,8 @@ class Example {
             <summary>To be added.</summary>
             <returns>To be added.</returns>
             <remarks>To be added.</remarks>
-            <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+            <exception cref="T:System.NotImplementedException">To be added; from:
+          <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
         </member>
         <member name="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})">
             <typeparam name="TInput">To be added.</typeparam>
@@ -982,7 +1255,8 @@ class Example {
             <summary>To be added.</summary>
             <returns>To be added.</returns>
             <remarks>To be added.</remarks>
-            <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+            <exception cref="T:System.InvalidOperationException">To be added; from:
+          <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
         </member>
         <member name="M:System.Array.Resize``1(``0[]@,System.Int32)">
             <typeparam name="T">To be added.</typeparam>
@@ -990,7 +1264,8 @@ class Example {
             <param name="newSize">To be added.</param>
             <summary>To be added.</summary>
             <remarks>To be added.</remarks>
-            <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+            <exception cref="T:System.Exception">To be added; from:
+          <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
         </member>
         <member name="T:System.AsyncCallback">
             <param name="ar">To be added.</param>
@@ -1012,7 +1287,8 @@ class Example {
             <remarks>
                 <c>M:System.Environment.GetFolderPath(System.Environment+SpecialFolder)</c>
             </remarks>
-            <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+            <exception cref="T:System.NotSupportedException">To be added; from:
+          <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
         </member>
         <member name="T:System.Environment+SpecialFolder">
             <summary>To be added.</summary>
index b2e5752b2de07e7862debf88b60eb04f5bc66338..fa8e7166019ae7e69fd01327cd4affa80addab4f 100644 (file)
@@ -37,6 +37,7 @@ class MakeBundle {
        static string style = "linux";
        static bool compress;
        static bool nomain;
+       static bool? use_dos2unix = null;
        
        static int Main (string [] args)
        {
@@ -667,11 +668,42 @@ void          mono_register_config_for_assembly (const char* assembly_name, cons
                        Console.WriteLine (cmdLine);
                        return system (cmdLine);
                }
-
+               
                // on Windows, we have to pipe the output of a
                // `cmd` interpolation to dos2unix, because the shell does not
                // strip the CRLFs generated by the native pkg-config distributed
                // with Mono.
+               //
+               // But if it's *not* on cygwin, just skip it.
+               
+               // check if dos2unix is applicable.
+               if (use_dos2unix == null) {
+                       use_dos2unix = false;
+                       try {
+                               var dos2unix = Process.Start ("dos2unix");
+                               dos2unix.StandardInput.WriteLine ("aaa");
+                               dos2unix.StandardInput.WriteLine ("\u0004");
+                               dos2unix.WaitForExit ();
+                               if (dos2unix.ExitCode == 0)
+                                       use_dos2unix = true;
+                       } catch {
+                               // ignore
+                       }
+               }
+               // and if there is no dos2unix, just run cmd /c.
+               if (use_dos2unix == false) {
+                       Console.WriteLine (cmdLine);
+                       ProcessStartInfo dos2unix = new ProcessStartInfo ();
+                       dos2unix.UseShellExecute = false;
+                       dos2unix.FileName = "cmd";
+                       dos2unix.Arguments = String.Format ("/c \"{0}\"", cmdLine);
+
+                       using (Process p = Process.Start (dos2unix)) {
+                               p.WaitForExit ();
+                               return p.ExitCode;
+                       }
+               }
+
                StringBuilder b = new StringBuilder ();
                int count = 0;
                for (int i = 0; i < cmdLine.Length; i++) {
index f65c5acfe0b31f2329f2ba68d7ac8386fc4c8646..6fec8df52c674c9d7cb091c23996f2c4d7939bd8 100644 (file)
                        <Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
                </ReadLinesFromFile>
 
-               <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
-                       <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
-               </RemoveDuplicates>
-
                <!-- CopyLocal files: In case all the projects build to common output
                     directory, then other projects might depend on some of these
                     CopyLocal files, so delete only the ones under *this* project
                        <Output TaskParameter="InPath" ItemName="FileWrites"/>
                </FindUnderPath>
 
+               <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
+                       <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
+               </RemoveDuplicates>
+
                <WriteLinesToFile
                        File="$(IntermediateOutputPath)$(CleanFile)"
                        Lines="@(CombinedFileWrites)"
index bc00640fb2bc92a9855bbd180ec9bf7bebca11da..d49e2102b7a6dfd2f1bfc72057ba86a7d469f3f4 100644 (file)
                        <Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
                </ReadLinesFromFile>
 
-               <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
-                       <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
-               </RemoveDuplicates>
-
                <!-- CopyLocal files: In case all the projects build to common output
                     directory, then other projects might depend on some of these
                     CopyLocal files, so delete only the ones under *this* project
                        <Output TaskParameter="InPath" ItemName="FileWrites"/>
                </FindUnderPath>
 
+               <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
+                       <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
+               </RemoveDuplicates>
+
                <WriteLinesToFile
                        File="$(IntermediateOutputPath)$(CleanFile)"
                        Lines="@(CombinedFileWrites)"
index 2bb956c8a8919414da43c48e1f11ee49f2486eff..862f75e2e21204acc68e574fb034572d6f14bd4e 100644 (file)
                        <Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName"/>
                </GetReferenceAssemblyPaths>
 
-               <CreateProperty Value="$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory)">
-                       <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
-               </CreateProperty>
+               
+               <!-- Remove duplicates. -->
+               <ItemGroup>
+                       <_TargetFrameworkDirectories Include="$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory)" KeepDuplicates="false" />
+               </ItemGroup>
+               <PropertyGroup>
+                       <TargetFrameworkDirectory>@(_TargetFrameworkDirectories)</TargetFrameworkDirectory>
+               </PropertyGroup>
                
                <ItemGroup Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'">
                        <DesignTimeFacadeDirectoryRoots Include="$(TargetFrameworkDirectory)" />
                        <Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
                </ReadLinesFromFile>
 
-               <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
-                       <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
-               </RemoveDuplicates>
-
                <!-- CopyLocal files: In case all the projects build to common output
                     directory, then other projects might depend on some of these
                     CopyLocal files, so delete only the ones under *this* project
                        <Output TaskParameter="InPath" ItemName="FileWrites"/>
                </FindUnderPath>
 
+               <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
+                       <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
+               </RemoveDuplicates>
+
                <WriteLinesToFile
                        File="$(IntermediateOutputPath)$(CleanFile)"
                        Lines="@(CombinedFileWrites)"
index 649592fa629cd9fcf9c1a4d38915d42f9fee7ade..d14e2cbbfd9ab5b7b1ed6335543ecf7ee1f0ce6d 100644 (file)
@@ -297,6 +297,7 @@ rm -rf %buildroot
 %_prefix/lib/mono/4.5/System.Json.Microsoft.dll
 %_prefix/lib/mono/4.5/System.Net.dll
 %_prefix/lib/mono/4.5/System.Net.Http.dll
+%_prefix/lib/mono/4.5/System.Net.Http.WebRequest.dll
 %_prefix/lib/mono/4.5/System.Numerics.dll
 %_prefix/lib/mono/4.5/System.Security.dll
 %_prefix/lib/mono/4.5/System.Threading.Tasks.Dataflow.dll
@@ -305,6 +306,8 @@ rm -rf %buildroot
 %_prefix/lib/mono/4.5/System.dll
 %_prefix/lib/mono/4.5/cscompmgd.dll
 %_prefix/lib/mono/4.5/mscorlib.dll*
+%_prefix/lib/mono/4.5/System.Windows.dll
+%_prefix/lib/mono/4.5/System.Xml.Serialization.dll
 %_prefix/lib/mono/4.5/Facades/*.dll
 %_prefix/lib/mono/4.5/Facades/*.dll.mdb
 %_prefix/lib/mono/compat-2.0/ICSharpCode.SharpZipLib.dll
@@ -337,6 +340,7 @@ rm -rf %buildroot
 %_prefix/lib/mono/gac/System.IO.Compression.FileSystem
 %_prefix/lib/mono/gac/System.Net
 %_prefix/lib/mono/gac/System.Net.Http
+%_prefix/lib/mono/gac/System.Net.Http.WebRequest
 %_prefix/lib/mono/gac/System.Numerics
 %_prefix/lib/mono/gac/System.Security
 %_prefix/lib/mono/gac/System.Threading.Tasks.Dataflow
@@ -344,6 +348,8 @@ rm -rf %buildroot
 %_prefix/lib/mono/gac/System.Xml.Linq
 %_prefix/lib/mono/gac/System.Json
 %_prefix/lib/mono/gac/System.Json.Microsoft
+%_prefix/lib/mono/gac/System.Windows
+%_prefix/lib/mono/gac/System.Xml.Serialization
 %_prefix/lib/mono/gac/cscompmgd
 %_prefix/lib/mono/mono-configuration-crypto
 
index db8eff27302779a276aa6d285de1d9929d29745a..a659d3763e80bdf39e8a7758d740738c36e937c1 100644 (file)
@@ -1294,13 +1294,13 @@ WSAIoctl (guint32 fd, gint32 command,
                        keepalivetime /= 1000;
                        if (keepalivetime == 0 || rem >= 500)
                                keepalivetime++;
-                       ret = setsockopt (fd, SOL_TCP, TCP_KEEPIDLE, &keepalivetime, sizeof (uint32_t));
+                       ret = setsockopt (fd, IPPROTO_TCP, TCP_KEEPIDLE, &keepalivetime, sizeof (uint32_t));
                        if (ret == 0) {
                                rem = keepaliveinterval % 1000;
                                keepaliveinterval /= 1000;
                                if (keepaliveinterval == 0 || rem >= 500)
                                        keepaliveinterval++;
-                               ret = setsockopt (fd, SOL_TCP, TCP_KEEPINTVL, &keepaliveinterval, sizeof (uint32_t));
+                               ret = setsockopt (fd, IPPROTO_TCP, TCP_KEEPINTVL, &keepaliveinterval, sizeof (uint32_t));
                        }
                        if (ret != 0) {
                                gint errnum = errno;
index 31725457da0c1ad43f6c0ad254a263af5acef6d4..69571dff8b5609e32deab60298efe5b44384d1eb 100644 (file)
@@ -61,6 +61,7 @@
 #include <mono/utils/mono-io-portability.h>
 #include <mono/utils/mono-error-internals.h>
 #include <mono/utils/atomic.h>
+#include <mono/utils/mono-memory-model.h>
 #ifdef HOST_WIN32
 #include <direct.h>
 #endif
@@ -93,8 +94,6 @@ CRITICAL_SECTION mono_strtod_mutex;
 static gunichar2 process_guid [36];
 static gboolean process_guid_set = FALSE;
 
-static gboolean shutting_down = FALSE;
-
 static gboolean no_exec = FALSE;
 
 static MonoAssembly *
@@ -348,8 +347,6 @@ mono_context_init (MonoDomain *domain)
 void
 mono_runtime_cleanup (MonoDomain *domain)
 {
-       shutting_down = TRUE;
-
        mono_attach_cleanup ();
 
        /* This ends up calling any pending pending (for at most 2 seconds) */
@@ -382,33 +379,6 @@ mono_runtime_quit ()
                quit_function (mono_get_root_domain (), NULL);
 }
 
-/** 
- * mono_runtime_set_shutting_down:
- *
- * Invoked by System.Environment.Exit to flag that the runtime
- * is shutting down.
- */
-void
-mono_runtime_set_shutting_down (void)
-{
-       shutting_down = TRUE;
-}
-
-/**
- * mono_runtime_is_shutting_down:
- *
- * Returns whether the runtime has been flagged for shutdown.
- *
- * This is consumed by the P:System.Environment.HasShutdownStarted
- * property.
- *
- */
-gboolean
-mono_runtime_is_shutting_down (void)
-{
-       return shutting_down;
-}
-
 /**
  * mono_domain_create_appdomain:
  * @friendly_name: The friendly name of the appdomain to create
@@ -2200,10 +2170,26 @@ zero_static_data (MonoVTable *vtable)
 }
 
 typedef struct unload_data {
+       gboolean done;
        MonoDomain *domain;
        char *failure_reason;
+       gint32 refcount;
 } unload_data;
 
+static void
+unload_data_unref (unload_data *data)
+{
+       gint32 count;
+       do {
+               count = mono_atomic_load_acquire (&data->refcount);
+               g_assert (count >= 1 && count <= 2);
+               if (count == 1) {
+                       g_free (data);
+                       return;
+               }
+       } while (InterlockedCompareExchange (&data->refcount, count, count - 1) != count);
+}
+
 static void
 deregister_reflection_info_roots_nspace_table (gpointer key, gpointer value, gpointer image)
 {
@@ -2277,7 +2263,8 @@ unload_thread_main (void *arg)
        int i;
 
        /* Have to attach to the runtime so shutdown can wait for this thread */
-       thread = mono_thread_attach (mono_get_root_domain ());
+       /* Force it to be attached to avoid racing during shutdown. */
+       thread = mono_thread_attach_full (mono_get_root_domain (), TRUE);
 
        /* 
         * FIXME: Abort our parent thread last, so we can return a failure 
@@ -2285,18 +2272,18 @@ unload_thread_main (void *arg)
         */
        if (!mono_threads_abort_appdomain_threads (domain, -1)) {
                data->failure_reason = g_strdup_printf ("Aborting of threads in domain %s timed out.", domain->friendly_name);
-               return 1;
+               goto failure;
        }
 
        if (!mono_thread_pool_remove_domain_jobs (domain, -1)) {
                data->failure_reason = g_strdup_printf ("Cleanup of threadpool jobs of domain %s timed out.", domain->friendly_name);
-               return 1;
+               goto failure;
        }
 
        /* Finalize all finalizable objects in the doomed appdomain */
        if (!mono_domain_finalize (domain, -1)) {
                data->failure_reason = g_strdup_printf ("Finalization of domain %s timed out.", domain->friendly_name);
-               return 1;
+               goto failure;
        }
 
        /* Clear references to our vtables in class->runtime_info.
@@ -2342,9 +2329,16 @@ unload_thread_main (void *arg)
 
        mono_gc_collect (mono_gc_max_generation ());
 
+       mono_atomic_store_release (&data->done, TRUE);
+       unload_data_unref (data);
        mono_thread_detach (thread);
-
        return 0;
+
+failure:
+       mono_atomic_store_release (&data->done, TRUE);
+       unload_data_unref (data);
+       mono_thread_detach (thread);
+       return 1;
 }
 
 /*
@@ -2387,10 +2381,9 @@ mono_domain_try_unload (MonoDomain *domain, MonoObject **exc)
 {
        HANDLE thread_handle;
        gsize tid;
-       guint32 res;
        MonoAppDomainState prev_state;
        MonoMethod *method;
-       unload_data thread_data;
+       unload_data *thread_data;
        MonoDomain *caller_domain = mono_domain_get ();
 
        /* printf ("UNLOAD STARTING FOR %s (%p) IN THREAD 0x%x.\n", domain->friendly_name, domain, GetCurrentThreadId ()); */
@@ -2430,8 +2423,11 @@ mono_domain_try_unload (MonoDomain *domain, MonoObject **exc)
        }
        mono_domain_set (caller_domain, FALSE);
 
-       thread_data.domain = domain;
-       thread_data.failure_reason = NULL;
+       thread_data = g_new0 (unload_data, 1);
+       thread_data->domain = domain;
+       thread_data->failure_reason = NULL;
+       thread_data->done = FALSE;
+       thread_data->refcount = 2; /*Must be 2: unload thread + initiator */
 
        /*The managed callback finished successfully, now we start tearing down the appdomain*/
        domain->state = MONO_APPDOMAIN_UNLOADING;
@@ -2447,7 +2443,7 @@ mono_domain_try_unload (MonoDomain *domain, MonoObject **exc)
 #if 0
        thread_handle = mono_create_thread (NULL, 0, unload_thread_main, &thread_data, 0, &tid);
 #else
-       thread_handle = mono_create_thread (NULL, 0, (LPTHREAD_START_ROUTINE)unload_thread_main, &thread_data, CREATE_SUSPENDED, &tid);
+       thread_handle = mono_create_thread (NULL, 0, (LPTHREAD_START_ROUTINE)unload_thread_main, thread_data, CREATE_SUSPENDED, &tid);
        if (thread_handle == NULL) {
                return;
        }
@@ -2455,25 +2451,28 @@ mono_domain_try_unload (MonoDomain *domain, MonoObject **exc)
 #endif
 
        /* Wait for the thread */       
-       while ((res = WaitForSingleObjectEx (thread_handle, INFINITE, TRUE) == WAIT_IO_COMPLETION)) {
+       while (!thread_data->done && WaitForSingleObjectEx (thread_handle, INFINITE, TRUE) == WAIT_IO_COMPLETION) {
                if (mono_thread_internal_has_appdomain_ref (mono_thread_internal_current (), domain) && (mono_thread_interruption_requested ())) {
                        /* The unload thread tries to abort us */
                        /* The icall wrapper will execute the abort */
                        CloseHandle (thread_handle);
+                       unload_data_unref (thread_data);
                        return;
                }
        }
        CloseHandle (thread_handle);
 
-       if (thread_data.failure_reason) {
+       if (thread_data->failure_reason) {
                /* Roll back the state change */
                domain->state = MONO_APPDOMAIN_CREATED;
 
-               g_warning ("%s", thread_data.failure_reason);
+               g_warning ("%s", thread_data->failure_reason);
 
-               *exc = (MonoObject *) mono_get_exception_cannot_unload_appdomain (thread_data.failure_reason);
+               *exc = (MonoObject *) mono_get_exception_cannot_unload_appdomain (thread_data->failure_reason);
 
-               g_free (thread_data.failure_reason);
-               thread_data.failure_reason = NULL;
+               g_free (thread_data->failure_reason);
+               thread_data->failure_reason = NULL;
        }
+
+       unload_data_unref (thread_data);
 }
index 834860117604b510ea5b0290be6ed634ce11bd3a..607dde5037b1c2a01d5007d50316c9cb17759310 100644 (file)
@@ -645,6 +645,7 @@ mono_set_rootdir (void)
                gchar buf[4096];
                guint buf_size = sizeof (buf);
  
+               name = NULL;
                if (_NSGetExecutablePath (buf, &buf_size) == 0)
                        name = g_strdup (buf);
  
@@ -852,6 +853,8 @@ static KeyRemapEntry key_remap_table[] = {
        { "System.ComponentModel.Composition", WINFX_KEY, ECMA_KEY },
        { "System.ComponentModel.DataAnnotations", "ddd0da4d3e678217", WINFX_KEY },
        { "System.Core", SILVERLIGHT_KEY, ECMA_KEY },
+       // FIXME: MS uses MSFINAL_KEY for .NET 4.5
+       { "System.Net", SILVERLIGHT_KEY, ECMA_KEY },
        { "System.Numerics", WINFX_KEY, ECMA_KEY },
        { "System.Runtime.Serialization", SILVERLIGHT_KEY, ECMA_KEY },
        { "System.ServiceModel", WINFX_KEY, ECMA_KEY },
@@ -1017,6 +1020,7 @@ mono_assembly_load_reference (MonoImage *image, int index)
                MonoTableInfo *t = &image->tables [MONO_TABLE_ASSEMBLYREF];
        
                image->references = g_new0 (MonoAssembly *, t->rows + 1);
+               image->nreferences = t->rows;
        }
        reference = image->references [index];
        mono_assemblies_unlock ();
index 0334d121736c198e0ab0e3931af3f4b44a10cb63..f79bc9ba09298fb5c45256604176caeb6b76eb79 100644 (file)
@@ -911,11 +911,10 @@ mono_gc_is_critical_method (MonoMethod *method)
  */
 
 MonoMethod*
-mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
+mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
 {
        int offset = -1;
        int atype;
-       MonoClass *klass = vtable->klass;
        MONO_THREAD_VAR_OFFSET (GC_thread_tls, offset);
 
        /*g_print ("thread tls: %d\n", offset);*/
@@ -927,6 +926,8 @@ mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
                return NULL;
        if (klass->rank)
                return NULL;
+       if (mono_class_is_open_constructed_type (&klass->byval_arg))
+               return NULL;
        if (klass->byval_arg.type == MONO_TYPE_STRING) {
                atype = ATYPE_STRING;
        } else if (!klass->has_references) {
@@ -996,7 +997,7 @@ mono_gc_is_critical_method (MonoMethod *method)
 }
 
 MonoMethod*
-mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
+mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
 {
        return NULL;
 }
index 2fd7709a37e098147453d2fcad0eda41203d3f1f..2fa919ace45a39e93e76fd53e254056a6adf30a5 100644 (file)
@@ -1097,13 +1097,6 @@ typedef struct {
        MonoClass *internals_visible_class;
        MonoClass *generic_ilist_class;
        MonoClass *generic_nullable_class;
-#ifndef DISABLE_COM
-       MonoClass *variant_class;
-       MonoClass *com_object_class;
-       MonoClass *com_interop_proxy_class;
-       MonoClass *iunknown_class;
-       MonoClass *idispatch_class;
-#endif
        MonoClass *safehandle_class;
        MonoClass *handleref_class;
        MonoClass *attribute_class;
@@ -1128,6 +1121,39 @@ mono_install_remoting_trampoline (MonoRemotingTrampoline func) MONO_INTERNAL;
 #define mono_object_is_transparent_proxy(object) (((MonoObject*)object)->vtable->klass == mono_defaults.transparent_proxy_class)
 #endif
 
+
+#define GENERATE_GET_CLASS_WITH_CACHE_DECL(shortname) \
+MonoClass* mono_class_get_##shortname##_class (void);
+
+#define GENERATE_GET_CLASS_WITH_CACHE(shortname,namespace,name) \
+MonoClass*     \
+mono_class_get_##shortname##_class (void)      \
+{      \
+       static MonoClass *tmp_class;    \
+       MonoClass *class = tmp_class;   \
+       if (!class) {   \
+               class = mono_class_from_name (mono_defaults.corlib, #namespace, #name); \
+               g_assert (class);       \
+               mono_memory_barrier (); \
+               tmp_class = class;      \
+       }       \
+       return class;   \
+}
+
+#define GENERATE_STATIC_GET_CLASS_WITH_CACHE(shortname,namespace,name) \
+static GENERATE_GET_CLASS_WITH_CACHE (shortname,namespace,name)
+
+
+#ifndef DISABLE_COM
+
+GENERATE_GET_CLASS_WITH_CACHE_DECL (interop_proxy)
+GENERATE_GET_CLASS_WITH_CACHE_DECL (idispatch)
+GENERATE_GET_CLASS_WITH_CACHE_DECL (iunknown)
+GENERATE_GET_CLASS_WITH_CACHE_DECL (com_object)
+GENERATE_GET_CLASS_WITH_CACHE_DECL (variant)
+
+#endif
+
 extern MonoDefaults mono_defaults MONO_INTERNAL;
 
 void
index 5479ca757f5b57933bd801171b7abfb8db300e30..514ea77e46640267760f3cb789cde644a5c9bb3d 100644 (file)
@@ -5311,7 +5311,7 @@ mono_class_setup_mono_type (MonoClass *class)
 
 #ifndef DISABLE_COM
 /*
- * COM initialization (using mono_init_com_types) is delayed until needed. 
+ * COM initialization is delayed until needed.
  * However when a [ComImport] attribute is present on a type it will trigger
  * the initialization. This is not a problem unless the BCL being executed 
  * lacks the types that COM depends on (e.g. Variant on Silverlight).
@@ -5332,7 +5332,6 @@ init_com_from_comimport (MonoClass *class)
        }
 
        /* FIXME : we should add an extra checks to ensure COM can be initialized properly before continuing */
-       mono_init_com_types ();
 }
 #endif /*DISABLE_COM*/
 
@@ -5365,7 +5364,7 @@ mono_class_setup_parent (MonoClass *class, MonoClass *parent)
                if (MONO_CLASS_IS_IMPORT (class)) {
                        init_com_from_comimport (class);
                        if (parent == mono_defaults.object_class)
-                               parent = mono_defaults.com_object_class;
+                               parent = mono_class_get_com_object_class ();
                }
 #endif
                if (!parent) {
@@ -5648,10 +5647,9 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
        if (!class->enumtype) {
                if (!mono_metadata_interfaces_from_typedef_full (
                            image, type_token, &interfaces, &icount, FALSE, context)){
-                       mono_class_set_failure_and_error (class, error, g_strdup ("Could not load interfaces"));
+                       mono_class_set_failure_from_loader_error (class, error, g_strdup ("Could not load interfaces"));
                        mono_loader_unlock ();
                        mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
-                       g_assert (!mono_loader_get_last_error ());
                        return NULL;
                }
 
index 3ff6c5ee45f1780dc824f22a799de5d4d27d5802..d9a625e56b806c92fa175084398d08bd551a9940 100644 (file)
@@ -32,6 +32,7 @@
 #include "mono/metadata/attrdefs.h"
 #include "mono/metadata/gc-internal.h"
 #include "mono/utils/mono-counters.h"
+#include "mono/utils/strenc.h"
 #include "mono/utils/atomic.h"
 #include <string.h>
 #include <errno.h>
@@ -84,6 +85,13 @@ static CRITICAL_SECTION cominterop_mutex;
 #define STDCALL
 #endif
 
+GENERATE_GET_CLASS_WITH_CACHE (interop_proxy, Mono.Interop, ComInteropProxy)
+GENERATE_GET_CLASS_WITH_CACHE (idispatch,     Mono.Interop, IDispatch)
+GENERATE_GET_CLASS_WITH_CACHE (iunknown,      Mono.Interop, IUnknown)
+
+GENERATE_GET_CLASS_WITH_CACHE (com_object, System, __ComObject)
+GENERATE_GET_CLASS_WITH_CACHE (variant,    System, Variant)
+
 /* Upon creation of a CCW, only allocate a weak handle and set the
  * reference count to 0. If the unmanaged client code decides to addref and
  * hold onto the CCW, I then allocate a strong handle. Once the reference count
@@ -263,7 +271,7 @@ cominterop_object_is_rcw (MonoObject *obj)
                return FALSE;
 
        klass = mono_object_class (real_proxy);
-       return (klass && klass == mono_defaults.com_interop_proxy_class);
+       return (klass && klass == mono_class_get_interop_proxy_class ());
 }
 
 static int
@@ -582,9 +590,6 @@ mono_cominterop_emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type,
                int real_proxy;
                guint32 pos_null = 0, pos_ccw = 0, pos_end = 0;
                MonoClass *klass = NULL; 
-               
-               /* COM types are initialized lazily */
-               mono_init_com_types ();
 
                klass = mono_class_from_mono_type (type);
 
@@ -618,7 +623,7 @@ mono_cominterop_emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type,
 
                mono_mb_emit_ldloc (mb, 0);
                mono_mb_emit_byte (mb, CEE_LDIND_I);
-               mono_mb_emit_ptr (mb, &mono_defaults.com_object_class->byval_arg);
+               mono_mb_emit_ptr (mb, &mono_class_get_com_object_class ()->byval_arg);
                mono_mb_emit_icall (mb, cominterop_type_from_handle);
                mono_mb_emit_managed_call (mb, com_interop_proxy_get_proxy, NULL);
                mono_mb_emit_managed_call (mb, get_transparent_proxy, NULL);
@@ -660,10 +665,6 @@ mono_cominterop_emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type,
        case MONO_MARSHAL_CONV_OBJECT_IDISPATCH:
        case MONO_MARSHAL_CONV_OBJECT_IUNKNOWN: {
                guint32 pos_null = 0, pos_rcw = 0, pos_end = 0;
-               /* COM types are initialized lazily */
-               mono_init_com_types ();
-
 
                mono_mb_emit_ldloc (mb, 1);
                mono_mb_emit_icon (mb, 0);
@@ -704,14 +705,14 @@ mono_cominterop_emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type,
                        static MonoProperty* iunknown = NULL;
                        
                        if (!iunknown)
-                               iunknown = mono_class_get_property_from_name (mono_defaults.com_object_class, "IUnknown");
+                               iunknown = mono_class_get_property_from_name (mono_class_get_com_object_class (), "IUnknown");
                        mono_mb_emit_managed_call (mb, iunknown->get, NULL);
                }
                else if (conv == MONO_MARSHAL_CONV_OBJECT_IDISPATCH) {
                        static MonoProperty* idispatch = NULL;
                        
                        if (!idispatch)
-                               idispatch = mono_class_get_property_from_name (mono_defaults.com_object_class, "IDispatch");
+                               idispatch = mono_class_get_property_from_name (mono_class_get_com_object_class (), "IDispatch");
                        mono_mb_emit_managed_call (mb, idispatch->get, NULL);
                }
                else {
@@ -731,9 +732,9 @@ mono_cominterop_emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type,
                if (conv == MONO_MARSHAL_CONV_OBJECT_INTERFACE)
                        mono_mb_emit_ptr (mb, mono_type_get_class (type));
                else if (conv == MONO_MARSHAL_CONV_OBJECT_IUNKNOWN)
-                       mono_mb_emit_ptr (mb, mono_defaults.iunknown_class);
+                       mono_mb_emit_ptr (mb, mono_class_get_iunknown_class ());
                else if (conv == MONO_MARSHAL_CONV_OBJECT_IDISPATCH)
-                       mono_mb_emit_ptr (mb, mono_defaults.idispatch_class);
+                       mono_mb_emit_ptr (mb, mono_class_get_idispatch_class ());
                else
                        g_assert_not_reached ();
                mono_mb_emit_icall (mb, cominterop_get_ccw);
@@ -871,8 +872,6 @@ mono_cominterop_get_native_wrapper (MonoMethod *method)
        if ((res = mono_marshal_find_in_cache (cache, method)))
                return res;
 
-       mono_init_com_types ();
-
        if (!method->klass->vtable)
                mono_class_setup_vtable (method->klass);
        
@@ -894,7 +893,7 @@ mono_cominterop_get_native_wrapper (MonoMethod *method)
                        static MonoMethod *ctor = NULL;
 
                        if (!ctor)
-                               ctor = mono_class_get_method_from_name (mono_defaults.com_object_class, ".ctor", 0);
+                               ctor = mono_class_get_method_from_name (mono_class_get_com_object_class (), ".ctor", 0);
                        mono_mb_emit_ldarg (mb, 0);
                        mono_mb_emit_managed_call (mb, ctor, NULL);
                        mono_mb_emit_byte (mb, CEE_RET);
@@ -1090,9 +1089,6 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum,
        if (!marshal_release)
                marshal_release = mono_class_get_method_from_name (mono_defaults.marshal_class, "Release", 1);
 
-       /* COM types are initialized lazily */
-       mono_init_com_types ();
-
        switch (action) {
        case MARSHAL_ACTION_CONV_IN: {
                guint32 pos_null = 0;
@@ -1393,6 +1389,9 @@ typedef struct
 #define MONO_S_OK 0x00000000L
 #define MONO_E_NOINTERFACE 0x80004002L
 #define MONO_E_NOTIMPL 0x80004001L
+#define MONO_E_INVALIDARG          0x80070057L
+#define MONO_E_DISP_E_UNKNOWNNAME  0x80020006L
+#define MONO_E_DISPID_UNKNOWN      (gint32)-1
 
 int
 ves_icall_System_Runtime_InteropServices_Marshal_AddRefInternal (gpointer pUnk)
@@ -1434,13 +1433,13 @@ cominterop_get_idispatch_for_object (MonoObject* object)
 
        if (cominterop_object_is_rcw (object)) {
                return cominterop_get_interface (((MonoComInteropProxy*)((MonoTransparentProxy*)object)->rp)->com_object, 
-                       mono_defaults.idispatch_class, TRUE);
+                       mono_class_get_idispatch_class (), TRUE);
        }
        else {
                MonoClass* klass = mono_object_class (object);
                if (!cominterop_can_support_dispatch (klass) )
                        cominterop_raise_hr_exception (MONO_E_NOINTERFACE);
-               return cominterop_get_ccw (object, mono_defaults.idispatch_class);
+               return cominterop_get_ccw (object, mono_class_get_idispatch_class ());
        }
 }
 
@@ -1451,8 +1450,6 @@ ves_icall_System_Runtime_InteropServices_Marshal_GetIUnknownForObjectInternal (M
        if (!object)
                return NULL;
 
-       mono_init_com_types ();
-
        if (cominterop_object_is_rcw (object)) {
                MonoClass *klass = NULL;
                MonoRealProxy* real_proxy = NULL;
@@ -1471,7 +1468,7 @@ ves_icall_System_Runtime_InteropServices_Marshal_GetIUnknownForObjectInternal (M
                }
 
                klass = mono_object_class (real_proxy);
-               if (klass != mono_defaults.com_interop_proxy_class) {
+               if (klass != mono_class_get_interop_proxy_class ()) {
                        g_assert_not_reached ();
                        return NULL;
                }
@@ -1484,7 +1481,7 @@ ves_icall_System_Runtime_InteropServices_Marshal_GetIUnknownForObjectInternal (M
                return ((MonoComInteropProxy*)real_proxy)->com_object->iunknown;
        }
        else {
-               return cominterop_get_ccw (object, mono_defaults.iunknown_class);
+               return cominterop_get_ccw (object, mono_class_get_iunknown_class ());
        }
 #else
        g_assert_not_reached ();
@@ -1513,8 +1510,6 @@ void*
 ves_icall_System_Runtime_InteropServices_Marshal_GetIDispatchForObjectInternal (MonoObject* object)
 {
 #ifndef DISABLE_COM
-       mono_init_com_types ();
-
        return cominterop_get_idispatch_for_object (object);
 #else
        g_assert_not_reached ();
@@ -1899,10 +1894,10 @@ cominterop_get_ccw (MonoObject* object, MonoClass* itf)
        }
 
        iface = itf;
-       if (iface == mono_defaults.iunknown_class) {
+       if (iface == mono_class_get_iunknown_class ()) {
                start_slot = 3;
        }
-       else if (iface == mono_defaults.idispatch_class) {
+       else if (iface == mono_class_get_idispatch_class ()) {
                start_slot = 7;
        }
        else {
@@ -2304,7 +2299,7 @@ cominterop_ccw_getfreethreadedmarshaler (MonoCCW* ccw, MonoObject* object, gpoin
        if (!ccw->free_marshaler) {
                int ret = 0;
                gpointer tunk;
-               tunk = cominterop_get_ccw (object, mono_defaults.iunknown_class);
+               tunk = cominterop_get_ccw (object, mono_class_get_iunknown_class ());
                ret = CoCreateFreeThreadedMarshaler (tunk, (LPUNKNOWN*)&ccw->free_marshaler);
        }
                
@@ -2340,19 +2335,19 @@ cominterop_ccw_queryinterface (MonoCCWInterface* ccwe, guint8* riid, gpointer* p
                mono_thread_attach (mono_get_root_domain ());
 
        /* handle IUnknown special */
-       if (cominterop_class_guid_equal (riid, mono_defaults.iunknown_class)) {
-               *ppv = cominterop_get_ccw (object, mono_defaults.iunknown_class);
+       if (cominterop_class_guid_equal (riid, mono_class_get_iunknown_class ())) {
+               *ppv = cominterop_get_ccw (object, mono_class_get_iunknown_class ());
                /* remember to addref on QI */
                cominterop_ccw_addref (*ppv);
                return MONO_S_OK;
        }
 
        /* handle IDispatch special */
-       if (cominterop_class_guid_equal (riid, mono_defaults.idispatch_class)) {
+       if (cominterop_class_guid_equal (riid, mono_class_get_idispatch_class ())) {
                if (!cominterop_can_support_dispatch (klass))
                        return MONO_E_NOINTERFACE;
                
-               *ppv = cominterop_get_ccw (object, mono_defaults.idispatch_class);
+               *ppv = cominterop_get_ccw (object, mono_class_get_idispatch_class ());
                /* remember to addref on QI */
                cominterop_ccw_addref (*ppv);
                return MONO_S_OK;
@@ -2398,7 +2393,12 @@ cominterop_ccw_queryinterface (MonoCCWInterface* ccwe, guint8* riid, gpointer* p
 static int STDCALL 
 cominterop_ccw_get_type_info_count (MonoCCWInterface* ccwe, guint32 *pctinfo)
 {
-       return MONO_E_NOTIMPL;
+       if(!pctinfo)
+               return MONO_E_INVALIDARG;
+
+       *pctinfo = 1;
+
+       return MONO_S_OK;
 }
 
 static int STDCALL 
@@ -2412,7 +2412,32 @@ cominterop_ccw_get_ids_of_names (MonoCCWInterface* ccwe, gpointer riid,
                                                                                         gunichar2** rgszNames, guint32 cNames,
                                                                                         guint32 lcid, gint32 *rgDispId)
 {
-       return MONO_E_NOTIMPL;
+       int i,ret = MONO_S_OK;
+       MonoMethod* method;
+       gchar* methodname;
+       MonoClass *klass = NULL;
+       MonoCCW* ccw = ccwe->ccw;
+       MonoObject* object = mono_gchandle_get_target (ccw->gc_handle);
+
+       g_assert (object);
+       klass = mono_object_class (object);
+
+       if (!mono_domain_get ())
+               mono_thread_attach (mono_get_root_domain ());
+
+       for (i=0; i < cNames; i++) {
+               methodname = mono_unicode_to_external (rgszNames[i]);
+
+               method = mono_class_get_method_from_name(klass, methodname, -1);
+               if (method)
+                       rgDispId[i] = (gint32)method->token;
+               else {
+                       rgDispId[i] = MONO_E_DISPID_UNKNOWN;
+                       ret = MONO_E_DISP_E_UNKNOWNNAME;
+               }
+       }
+
+       return ret;
 }
 
 static int STDCALL 
@@ -2641,8 +2666,6 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
 {
        MonoMethodBuilder *mb = m->mb;
 
-       mono_init_com_types ();
-       
        switch (action) {
 
        case MARSHAL_ACTION_CONV_IN: {
@@ -2719,7 +2742,7 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
                                get_native_variant_for_object = mono_class_get_method_from_name (mono_defaults.marshal_class, "GetNativeVariantForObject", 2);
                        g_assert (get_native_variant_for_object);
 
-                       elem_var =  mono_mb_add_local (mb, &mono_defaults.variant_class->byval_arg);
+                       elem_var =  mono_mb_add_local (mb, &mono_class_get_variant_class ()->byval_arg);
                        mono_mb_emit_ldloc_addr (mb, elem_var);
 
                        mono_mb_emit_managed_call (mb, get_native_variant_for_object, NULL);
@@ -2730,7 +2753,7 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT
                        mono_mb_emit_icall (mb, mono_marshal_safearray_set_value);
 
                        if (!variant_clear)
-                               variant_clear = mono_class_get_method_from_name (mono_defaults.variant_class, "Clear", 0);
+                               variant_clear = mono_class_get_method_from_name (mono_class_get_variant_class (), "Clear", 0);
 
                        mono_mb_emit_ldloc_addr (mb, elem_var);
                        mono_mb_emit_managed_call (mb, variant_clear, NULL);
index 7e2341292ef3454dd9bd042e15905e4263dcfcc1..f38a054125710fab5281f9e0facb68b7aa1e5e4f 100644 (file)
@@ -327,7 +327,7 @@ mono_method_desc_new (const char *name, gboolean include_namespace)
                return NULL;
        }
        /* allow two :: to separate the method name */
-       if (method_name [-1] == ':')
+       if (method_name != class_nspace && method_name [-1] == ':')
                method_name [-1] = 0;
        *method_name++ = 0;
        class_name = strrchr (class_nspace, '.');
index b9fad3052974c39851d4a0b365742be582a41ce5..f337d0770a958826b26f9bc8e89c253685d87a5d 100644 (file)
@@ -420,9 +420,6 @@ typedef void (*MonoFreeDomainFunc) (MonoDomain *domain);
 void
 mono_install_free_domain_hook (MonoFreeDomainFunc func) MONO_INTERNAL;
 
-void 
-mono_init_com_types (void) MONO_INTERNAL;
-
 void 
 mono_cleanup (void) MONO_INTERNAL;
 
index 56c0e02806d93900dda095156ecc4e0a9c509f1f..4f7bcfb8ea9edd8d8fcfa971be637659f086d933 100644 (file)
@@ -35,6 +35,7 @@
 #include <mono/metadata/mono-debug-debugger.h>
 #include <mono/metadata/mono-config.h>
 #include <mono/metadata/threads-types.h>
+#include <mono/metadata/runtime.h>
 #include <metadata/threads.h>
 #include <metadata/profiler-private.h>
 #include <mono/metadata/coree.h>
@@ -1301,6 +1302,7 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
        mono_classes_init ();
        mono_loader_init ();
        mono_reflection_init ();
+       mono_runtime_init_tls ();
 
        /* FIXME: When should we release this memory? */
        MONO_GC_REGISTER_ROOT_FIXED (appdomains_list);
@@ -1606,13 +1608,6 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
                mono_defaults.corlib, "System.Reflection", "CustomAttributeData");
 
        /* these are initialized lazily when COM features are used */
-#ifndef DISABLE_COM
-       mono_defaults.variant_class = NULL;
-       mono_defaults.com_object_class = NULL;
-       mono_defaults.com_interop_proxy_class = NULL;
-       mono_defaults.iunknown_class = NULL;
-       mono_defaults.idispatch_class = NULL;
-#endif
 
        mono_class_init (mono_defaults.array_class);
        mono_defaults.generic_nullable_class = mono_class_from_name (
@@ -1686,48 +1681,6 @@ mono_init_version (const char *domain_name, const char *version)
        return mono_init_internal (domain_name, NULL, version);
 }
 
-#ifndef DISABLE_COM
-/**
- * mono_init_com_types:
- *
- * Initializes all types needed for COM Interop in mono_defaults structure. 
- */
-void 
-mono_init_com_types (void)
-{
-       static gboolean initialized = FALSE;
-
-       if (initialized)
-               return;
-       
-       /* FIXME: do I need some threading protection here */
-
-       g_assert (mono_defaults.corlib);
-
-       mono_defaults.variant_class = mono_class_from_name (
-               mono_defaults.corlib, "System", "Variant");
-       g_assert (mono_defaults.variant_class != 0);
-
-       mono_defaults.com_object_class = mono_class_from_name (
-               mono_defaults.corlib, "System", "__ComObject");
-       g_assert (mono_defaults.com_object_class != 0);
-
-       mono_defaults.com_interop_proxy_class = mono_class_from_name (
-               mono_defaults.corlib, "Mono.Interop", "ComInteropProxy");
-       g_assert (mono_defaults.com_interop_proxy_class != 0);
-
-       mono_defaults.iunknown_class = mono_class_from_name (
-               mono_defaults.corlib, "Mono.Interop", "IUnknown");
-       g_assert (mono_defaults.iunknown_class != 0);
-
-       mono_defaults.idispatch_class = mono_class_from_name (
-               mono_defaults.corlib, "Mono.Interop", "IDispatch");
-       g_assert (mono_defaults.idispatch_class != 0);
-
-       initialized = TRUE;
-}
-#endif /*DISABLE_COM*/
-
 /**
  * mono_cleanup:
  *
@@ -1973,8 +1926,22 @@ mono_domain_free (MonoDomain *domain, gboolean force)
        /* This needs to be done before closing assemblies */
        mono_gc_clear_domain (domain);
 
+       /* 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)
+                       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))
+                       tmp->data = NULL;
+       }
+
        for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
                MonoAssembly *ass = tmp->data;
+               if (!ass)
+                       continue;
+               if (!ass->image || ass->image->dynamic)
+                       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))
                        tmp->data = NULL;
index f26abcf1c79305e80e73afad65b1c0662e4c3023..2ef9a933b32d4dd9ac68fe75a183c6f8ed3dcd35 100644 (file)
@@ -219,7 +219,7 @@ typedef struct {
        int alloc_type;
 } AllocatorWrapperInfo;
 
-MonoMethod* mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box) MONO_INTERNAL;
+MonoMethod* mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box) MONO_INTERNAL;
 MonoMethod* mono_gc_get_managed_array_allocator (MonoClass *klass) MONO_INTERNAL;
 MonoMethod *mono_gc_get_managed_allocator_by_type (int atype) MONO_INTERNAL;
 
index e3411fed0ddbf08d746a7d0dc1409c5d65008e6b..7a46d49301de2653b0b4aace9ad1914371faaf00 100644 (file)
@@ -1456,7 +1456,6 @@ reference_queue_clear_for_domain (MonoDomain *domain)
                RefQueueEntry **iter = &queue->queue;
                RefQueueEntry *entry;
                while ((entry = *iter)) {
-                       MonoObject *obj;
                        if (entry->domain == domain) {
 #ifdef HAVE_SGEN_GC
                                mono_gc_weak_link_remove (&entry->dis_link, TRUE);
index 34da6ab71dcc3d7f29a3c9246b9c3c20f564cebf..317f894fc4392f739403411b3d445e2c88946afd 100644 (file)
@@ -6525,10 +6525,8 @@ ves_icall_System_Environment_Exit (int result)
  * NaCl exits anyway.
  */
 #ifndef __native_client__
-       mono_runtime_shutdown ();
-
-       /* This will kill the tp threads which cannot be suspended */
-       mono_thread_pool_cleanup ();
+       if (!mono_runtime_try_shutdown ())
+               mono_thread_exit ();
 
        /* Suspend all managed threads since the runtime is going away */
        mono_thread_suspend_all_other_threads ();
index 5847544f469cf97e71c666717fee74bb506acde1..d161ba63a734070eba361a3cdb3e1f826f6b97aa 100644 (file)
@@ -1536,10 +1536,7 @@ mono_image_close_except_pools (MonoImage *image)
         * MonoImage might outlive its associated MonoAssembly.
         */
        if (image->references && !image->dynamic) {
-               MonoTableInfo *t = &image->tables [MONO_TABLE_ASSEMBLYREF];
-               int i;
-
-               for (i = 0; i < t->rows; i++) {
+               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]))
                                        image->references [i] = NULL;
@@ -1714,10 +1711,7 @@ mono_image_close_finish (MonoImage *image)
        image->reflection_info_unregister_classes = NULL;
 
        if (image->references && !image->dynamic) {
-               MonoTableInfo *t = &image->tables [MONO_TABLE_ASSEMBLYREF];
-               int i;
-
-               for (i = 0; i < t->rows; i++) {
+               for (i = 0; i < image->nreferences; i++) {
                        if (image->references [i] && image->references [i] != REFERENCE_MISSING)
                                mono_assembly_close_finish (image->references [i]);
                }
index 06197fe66256fffeae19447b77baf09ec62a6a06..a69402c3d867d3b56b853470dfc3921185e8ea31 100644 (file)
@@ -205,6 +205,13 @@ mono_signature_no_pinvoke (MonoMethod *method)
        return sig;
 }
 
+void
+mono_marshal_init_tls (void)
+{
+       mono_native_tls_alloc (&last_error_tls_id, NULL);
+       mono_native_tls_alloc (&load_type_info_tls_id, NULL);
+}
+
 void
 mono_marshal_init (void)
 {
@@ -214,8 +221,6 @@ mono_marshal_init (void)
                module_initialized = TRUE;
                InitializeCriticalSection (&marshal_mutex);
                marshal_mutex_initialized = TRUE;
-               mono_native_tls_alloc (&last_error_tls_id, NULL);
-               mono_native_tls_alloc (&load_type_info_tls_id, NULL);
 
                register_icall (ves_icall_System_Threading_Thread_ResetAbort, "ves_icall_System_Threading_Thread_ResetAbort", "void", TRUE);
                register_icall (mono_marshal_string_to_utf16, "mono_marshal_string_to_utf16", "ptr obj", FALSE);
@@ -1973,13 +1978,12 @@ emit_struct_conv_full (MonoMethodBuilder *mb, MonoClass *klass, gboolean to_obje
                        }
                        case MONO_TYPE_OBJECT: {
 #ifndef DISABLE_COM
-                               mono_init_com_types ();
                                if (to_object) {
                                        static MonoMethod *variant_clear = NULL;
                                        static MonoMethod *get_object_for_native_variant = NULL;
 
                                        if (!variant_clear)
-                                               variant_clear = mono_class_get_method_from_name (mono_defaults.variant_class, "Clear", 0);
+                                               variant_clear = mono_class_get_method_from_name (mono_class_get_variant_class (), "Clear", 0);
                                        if (!get_object_for_native_variant)
                                                get_object_for_native_variant = mono_class_get_method_from_name (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1);
                                        mono_mb_emit_ldloc (mb, 1);
@@ -3078,7 +3082,7 @@ mono_marshal_get_remoting_invoke (MonoMethod *method)
 
        /* this seems to be the best plase to put this, as all remoting invokes seem to get filtered through here */
 #ifndef DISABLE_COM
-       if (mono_class_is_com_object (method->klass) || method->klass == mono_defaults.com_object_class) {
+       if (mono_class_is_com_object (method->klass) || method->klass == mono_class_get_com_object_class ()) {
                MonoVTable *vtable = mono_class_vtable (mono_domain_get (), method->klass);
                g_assert (vtable); /*FIXME do proper error handling*/
 
@@ -7277,8 +7281,6 @@ emit_marshal_variant (EmitMarshalContext *m, int argnum, MonoType *t,
        static MonoMethod *get_object_for_native_variant = NULL;
        static MonoMethod *get_native_variant_for_object = NULL;
 
-       mono_init_com_types ();
-       
        if (!get_object_for_native_variant)
                get_object_for_native_variant = mono_class_get_method_from_name (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1);
        g_assert (get_object_for_native_variant);
@@ -7289,12 +7291,12 @@ emit_marshal_variant (EmitMarshalContext *m, int argnum, MonoType *t,
 
        switch (action) {
        case MARSHAL_ACTION_CONV_IN: {
-               conv_arg = mono_mb_add_local (mb, &mono_defaults.variant_class->byval_arg);
+               conv_arg = mono_mb_add_local (mb, &mono_class_get_variant_class ()->byval_arg);
                
                if (t->byref)
-                       *conv_arg_type = &mono_defaults.variant_class->this_arg;
+                       *conv_arg_type = &mono_class_get_variant_class ()->this_arg;
                else
-                       *conv_arg_type = &mono_defaults.variant_class->byval_arg;
+                       *conv_arg_type = &mono_class_get_variant_class ()->byval_arg;
 
                if (t->byref && !(t->attrs & PARAM_ATTRIBUTE_IN) && t->attrs & PARAM_ATTRIBUTE_OUT)
                        break;
@@ -7311,7 +7313,7 @@ emit_marshal_variant (EmitMarshalContext *m, int argnum, MonoType *t,
                static MonoMethod *variant_clear = NULL;
 
                if (!variant_clear)
-                       variant_clear = mono_class_get_method_from_name (mono_defaults.variant_class, "Clear", 0);
+                       variant_clear = mono_class_get_method_from_name (mono_class_get_variant_class (), "Clear", 0);
                g_assert (variant_clear);
 
 
@@ -7344,9 +7346,9 @@ emit_marshal_variant (EmitMarshalContext *m, int argnum, MonoType *t,
                conv_arg = mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
 
                if (t->byref)
-                       *conv_arg_type = &mono_defaults.variant_class->this_arg;
+                       *conv_arg_type = &mono_class_get_variant_class ()->this_arg;
                else
-                       *conv_arg_type = &mono_defaults.variant_class->byval_arg;
+                       *conv_arg_type = &mono_class_get_variant_class ()->byval_arg;
 
                if (t->byref && !(t->attrs & PARAM_ATTRIBUTE_IN) && t->attrs & PARAM_ATTRIBUTE_OUT)
                        break;
index 3a99ac60bd70a39c93de836470411ce8cab0925e..981a8a6dd4c5425a1d51f68cddbf1d28f45e1d28 100644 (file)
@@ -192,6 +192,9 @@ typedef void (*RuntimeInvokeDynamicFunction) (void *args, MonoObject **exc, void
 void
 mono_marshal_init (void) MONO_INTERNAL;
 
+void
+mono_marshal_init_tls (void) MONO_INTERNAL;
+
 void
 mono_marshal_cleanup (void) MONO_INTERNAL;
 
index d0029658c9d31ebe5571d5b483127d88a3ae7555..973f5fd35dc21684fa8c55d6cc1d6b6f36e6364e 100644 (file)
@@ -196,6 +196,7 @@ struct _MonoImage {
         * It is NULL terminated.
         */
        MonoAssembly **references;
+       int nreferences;
 
        MonoImage **modules;
        guint32 module_count;
index 40411911bcc6fed9a28fa5dfa6d1fbcd3ea4c85d..a8db2e2d8939bb0f7026b100270316850f1137fb 100644 (file)
@@ -2430,15 +2430,18 @@ collect_inflated_signature_images (MonoInflatedMethodSignature *sig, CollectData
 static void
 collect_method_images (MonoMethodInflated *method, CollectData *data)
 {
+       MonoMethod *m = method->declaring;
+
        add_image (method->declaring->klass->image, data);
        if (method->context.class_inst)
                collect_ginst_images (method->context.class_inst, data);
        if (method->context.method_inst)
                collect_ginst_images (method->context.method_inst, data);
        /*
-       if (((MonoMethod*)method)->signature)
-               collect_signature_images (mono_method_signature ((MonoMethod*)method), data);
-       */
+        * Dynamic assemblies have no references, so the images they depend on can be unloaded before them.
+        */
+       if (m->klass->image->dynamic)
+               collect_signature_images (mono_method_signature (m), data);
 }
 
 static void
index 9743232da1b45a4b9093d06621170279423fb85f..6eff0ecbda320d6a165b4be0582e800fa2fdc057 100644 (file)
@@ -652,6 +652,12 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma
        for (i = 0; i < jit->num_locals; i++)
                write_variable (&jit->locals [i], ptr, &ptr);
 
+       *ptr++ = jit->gsharedvt_info_var ? 1 : 0;
+       if (jit->gsharedvt_info_var) {
+               write_variable (jit->gsharedvt_info_var, ptr, &ptr);
+               write_variable (jit->gsharedvt_locals_var, ptr, &ptr);
+       }
+
        size = ptr - oldptr;
        g_assert (size < max_size);
        total_size = size + sizeof (MonoDebugMethodAddress);
@@ -827,6 +833,8 @@ mono_debug_free_method_jit_info (MonoDebugMethodJitInfo *jit)
        g_free (jit->this_var);
        g_free (jit->params);
        g_free (jit->locals);
+       g_free (jit->gsharedvt_info_var);
+       g_free (jit->gsharedvt_locals_var);
        g_free (jit);
 }
 
@@ -871,6 +879,13 @@ mono_debug_read_method (MonoDebugMethodAddress *address)
        for (i = 0; i < jit->num_locals; i++)
                read_variable (&jit->locals [i], ptr, &ptr);
 
+       if (*ptr++) {
+               jit->gsharedvt_info_var = g_new0 (MonoDebugVarInfo, 1);
+               jit->gsharedvt_locals_var = g_new0 (MonoDebugVarInfo, 1);
+               read_variable (jit->gsharedvt_info_var, ptr, &ptr);
+               read_variable (jit->gsharedvt_locals_var, ptr, &ptr);
+       }
+
        return jit;
 }
 
index 9494a79f6770197ccacea4561f71a68bcf05668b..daba9e2ee1cdf81f35105014fd1b097b0bd296e0 100644 (file)
@@ -88,6 +88,8 @@ struct _MonoDebugMethodJitInfo {
        MonoDebugVarInfo *params;
        uint32_t num_locals;
        MonoDebugVarInfo *locals;
+       MonoDebugVarInfo *gsharedvt_info_var;
+       MonoDebugVarInfo *gsharedvt_locals_var;
 };
 
 struct _MonoDebugMethodAddressList {
@@ -122,6 +124,12 @@ struct _MonoDebugSourceLocation {
 /* The variable is dead. */
 #define MONO_DEBUG_VAR_ADDRESS_MODE_DEAD               0x30000000
 
+/* Same as REGOFFSET, but do an indirection */
+#define MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR            0x40000000
+
+/* gsharedvt local */
+#define MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL            0x50000000
+
 struct _MonoDebugVarInfo {
        uint32_t index;
        uint32_t offset;
index 4076d65d183acca8e502cffb4db0a6f4a96cb439..13446ee0ecd627f90e82238d4401d33bcb8e0bdb 100644 (file)
@@ -218,7 +218,7 @@ mono_gc_is_critical_method (MonoMethod *method)
 }
 
 MonoMethod*
-mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
+mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
 {
        return NULL;
 }
index cb0c816cf062f3a429493b3450b27a3dfdd32e3d..dec04e059cf71c8980dcb2b8d77f57f0f4faa8e7 100644 (file)
@@ -2627,7 +2627,7 @@ mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mon
                type = ((MonoReflectionType *)rp->class_to_proxy)->type;
                klass = mono_class_from_mono_type (type);
 #ifndef DISABLE_COMf
-               if ((mono_class_is_com_object (klass) || (mono_defaults.com_object_class && klass == mono_defaults.com_object_class)) && !mono_vtable_is_remote (mono_class_vtable (mono_domain_get (), klass)))
+               if ((mono_class_is_com_object (klass) || (mono_class_get_com_object_class () && klass == mono_class_get_com_object_class ())) && !mono_vtable_is_remote (mono_class_vtable (mono_domain_get (), klass)))
                        remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_COMINTEROP);
                else
 #endif
@@ -2750,7 +2750,7 @@ mono_object_get_virtual_method (MonoObject *obj, MonoMethod *method)
                        res = mono_marshal_get_remoting_invoke_with_check (res);
                else {
 #ifndef DISABLE_COM
-                       if (klass == mono_defaults.com_object_class || mono_class_is_com_object (klass))
+                       if (klass == mono_class_get_com_object_class () || mono_class_is_com_object (klass))
                                res = mono_cominterop_get_invoke (res);
                        else
 #endif
index ed32066b8dc1e1f2e6493efa075786db69799c5d..7b14f436536eb13fb0b509a6c2645ccd816bcda8 100644 (file)
 #include <mono/metadata/runtime.h>
 #include <mono/metadata/monitor.h>
 #include <mono/metadata/threads-types.h>
+#include <mono/metadata/threadpool.h>
+#include <mono/metadata/marshal.h>
+#include <mono/utils/atomic.h>
+
+static gboolean shutting_down_inited = FALSE;
+static gboolean shutting_down = FALSE;
+
+/** 
+ * mono_runtime_set_shutting_down:
+ *
+ * Invoked by System.Environment.Exit to flag that the runtime
+ * is shutting down.
+ *
+ * Deprecated. This function can break the shutdown sequence.
+ */
+void
+mono_runtime_set_shutting_down (void)
+{
+       shutting_down = TRUE;
+}
+
+/**
+ * mono_runtime_is_shutting_down:
+ *
+ * Returns whether the runtime has been flagged for shutdown.
+ *
+ * This is consumed by the P:System.Environment.HasShutdownStarted
+ * property.
+ *
+ */
+gboolean
+mono_runtime_is_shutting_down (void)
+{
+       return shutting_down;
+}
 
 static void
 fire_process_exit_event (MonoDomain *domain, gpointer user_data)
@@ -45,22 +80,39 @@ mono_runtime_fire_process_exit_event (void)
 #endif
 }
 
-/*
-Initialize runtime shutdown.
-After this call completes the thread pool will stop accepting new jobs and
 
-*/
-void
-mono_runtime_shutdown (void)
+/*
+ * Try to initialize runtime shutdown.
+ * After this call completes the thread pool will stop accepting new jobs and no further threads will be created.
+ *
+ * @return true if shutdown was initiated by this call or false is other thread beat this one
+ */
+gboolean
+mono_runtime_try_shutdown (void)
 {
+       if (InterlockedCompareExchange (&shutting_down_inited, TRUE, FALSE))
+               return FALSE;
+
        mono_runtime_fire_process_exit_event ();
 
+       shutting_down = TRUE;
+
        mono_threads_set_shutting_down ();
 
        /* No new threads will be created after this point */
 
        mono_runtime_set_shutting_down ();
 
+       /* This will kill the tp threads which cannot be suspended */
+       mono_thread_pool_cleanup ();
+
+       /*TODO move the follow to here:
+       mono_thread_suspend_all_other_threads (); OR  mono_thread_wait_all_other_threads
+
+       mono_runtime_quit ();
+       */
+
+       return TRUE;
 }
 
 
@@ -71,3 +123,17 @@ mono_runtime_is_critical_method (MonoMethod *method)
                return TRUE;
        return FALSE;
 }
+
+/*
+Coordinate the creation of all remaining TLS slots in the runtime.
+No further TLS slots should be created after this function finishes.
+This restriction exists because AOT requires offsets to be constant
+across runs.
+*/
+void
+mono_runtime_init_tls (void)
+{
+       mono_marshal_init_tls ();
+       mono_thread_pool_init_tls ();
+       mono_thread_init_tls ();
+}
index 086b51a12cb85b99ad6118e34ebac3ff933d872c..83f17b7d33ec5ea767724f8f72af6d5ea1298960 100644 (file)
@@ -15,8 +15,9 @@
 MONO_BEGIN_DECLS
 
 gboolean mono_runtime_is_critical_method (MonoMethod *method) MONO_INTERNAL;
-void mono_runtime_shutdown (void) MONO_INTERNAL;
+gboolean mono_runtime_try_shutdown (void) MONO_INTERNAL;
 
+void mono_runtime_init_tls (void) MONO_INTERNAL;
 MONO_END_DECLS
 
 #endif /* _MONO_METADATA_RUNTIME_H_ */
index 55a472ffa44e561703d9a3ac271fdaccce8355c7..61222e2d57e96260d9961c3367e5ceed79c56765 100644 (file)
@@ -692,6 +692,7 @@ create_allocator (int atype)
        if (!registered) {
                mono_register_jit_icall (mono_gc_alloc_obj, "mono_gc_alloc_obj", mono_create_icall_signature ("object ptr int"), FALSE);
                mono_register_jit_icall (mono_gc_alloc_vector, "mono_gc_alloc_vector", mono_create_icall_signature ("object ptr int int"), FALSE);
+               mono_register_jit_icall (mono_gc_alloc_string, "mono_gc_alloc_string", mono_create_icall_signature ("object ptr int int32"), FALSE);
                registered = TRUE;
        }
 
@@ -704,14 +705,23 @@ create_allocator (int atype)
        } else if (atype == ATYPE_VECTOR) {
                num_params = 2;
                name = "AllocVector";
+       } else if (atype == ATYPE_STRING) {
+               num_params = 2;
+               name = "AllocString";
        } else {
                g_assert_not_reached ();
        }
 
        csig = mono_metadata_signature_alloc (mono_defaults.corlib, num_params);
-       csig->ret = &mono_defaults.object_class->byval_arg;
-       for (i = 0; i < num_params; ++i)
-               csig->params [i] = &mono_defaults.int_class->byval_arg;
+       if (atype == ATYPE_STRING) {
+               csig->ret = &mono_defaults.string_class->byval_arg;
+               csig->params [0] = &mono_defaults.int_class->byval_arg;
+               csig->params [1] = &mono_defaults.int32_class->byval_arg;
+       } else {
+               csig->ret = &mono_defaults.object_class->byval_arg;
+               for (i = 0; i < num_params; ++i)
+                       csig->params [i] = &mono_defaults.int_class->byval_arg;
+       }
 
        mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_ALLOC);
 
@@ -785,6 +795,16 @@ create_allocator (int atype)
                mono_mb_set_clauses (mb, 1, clause);
                mono_mb_patch_branch (mb, pos_leave);
                /* end catch */
+       } else if (atype == ATYPE_STRING) {
+               /* a string allocator method takes the args: (vtable, len) */
+               /* bytes = (sizeof (MonoString) + ((len + 1) * 2)); */
+               mono_mb_emit_ldarg (mb, 1);
+               mono_mb_emit_icon (mb, 1);
+               mono_mb_emit_byte (mb, MONO_CEE_SHL);
+               //WE manually fold the above + 2 here
+               mono_mb_emit_icon (mb, sizeof (MonoString) + 2);
+               mono_mb_emit_byte (mb, CEE_ADD);
+               mono_mb_emit_stloc (mb, size_var);
        } else {
                g_assert_not_reached ();
        }
@@ -849,6 +869,9 @@ create_allocator (int atype)
        } else if (atype == ATYPE_VECTOR) {
                mono_mb_emit_ldarg (mb, 1);
                mono_mb_emit_icall (mb, mono_gc_alloc_vector);
+       } else if (atype == ATYPE_STRING) {
+               mono_mb_emit_ldarg (mb, 1);
+               mono_mb_emit_icall (mb, mono_gc_alloc_string);
        } else {
                g_assert_not_reached ();
        }
@@ -883,6 +906,22 @@ create_allocator (int atype)
 #else
                mono_mb_emit_byte (mb, CEE_STIND_I4);
 #endif
+       } else  if (atype == ATYPE_STRING) {
+               /* 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_byte (mb, MONO_CEE_ADD);
+               mono_mb_emit_ldarg (mb, 1);
+               mono_mb_emit_byte (mb, MONO_CEE_STIND_I4);
+               /* s->chars [len] = 0; */
+               mono_mb_emit_ldloc (mb, p_var);
+               mono_mb_emit_ldloc (mb, size_var);
+               mono_mb_emit_icon (mb, 2);
+               mono_mb_emit_byte (mb, MONO_CEE_SUB);
+               mono_mb_emit_byte (mb, MONO_CEE_ADD);
+               mono_mb_emit_icon (mb, 0);
+               mono_mb_emit_byte (mb, MONO_CEE_STIND_I2);
        }
 
        /*
@@ -915,10 +954,9 @@ create_allocator (int atype)
  *     object allocate (MonoVTable *vtable)
  */
 MonoMethod*
-mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
+mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
 {
 #ifdef MANAGED_ALLOCATION
-       MonoClass *klass = vtable->klass;
 
 #ifdef HAVE_KW_THREAD
        int tlab_next_offset = -1;
@@ -934,16 +972,17 @@ mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
                return NULL;
        if (klass->instance_size > tlab_size)
                return NULL;
+
        if (klass->has_finalize || mono_class_is_marshalbyref (klass) || (mono_profiler_get_events () & MONO_PROFILE_ALLOCATIONS))
                return NULL;
        if (klass->rank)
                return NULL;
        if (klass->byval_arg.type == MONO_TYPE_STRING)
-               return NULL;
+               return mono_gc_get_managed_allocator_by_type (ATYPE_STRING);
        if (collect_before_allocs)
                return NULL;
-
-       if (ALIGN_TO (klass->instance_size, ALLOC_ALIGN) < MAX_SMALL_OBJ_SIZE)
+       /* Generic classes have dynamic field and can go above MAX_SMALL_OBJ_SIZE. */
+       if (ALIGN_TO (klass->instance_size, ALLOC_ALIGN) < MAX_SMALL_OBJ_SIZE && !mono_class_is_open_constructed_type (&klass->byval_arg))
                return mono_gc_get_managed_allocator_by_type (ATYPE_SMALL);
        else
                return mono_gc_get_managed_allocator_by_type (ATYPE_NORMAL);
index 88c5308bcdd71fdcf05b3dbcdee54e0e8638ad6e..d59f06dbd5f9cbb192e1646405c135cfbcf85fac 100644 (file)
@@ -4231,6 +4231,7 @@ mono_gc_pthread_detach (pthread_t thread)
 void
 mono_gc_pthread_exit (void *retval) 
 {
+       mono_thread_info_dettach ();
        pthread_exit (retval);
 }
 
index 311548db9bc1e038b35791e972604000c0197893..8628764ac3871419274b237351615df733e3c341 100644 (file)
@@ -987,6 +987,7 @@ typedef enum {
        ATYPE_NORMAL,
        ATYPE_VECTOR,
        ATYPE_SMALL,
+       ATYPE_STRING,
        ATYPE_NUM
 } SgenAllocatorType;
 
index 43a587ce19df78c4218c700381288101cfa5a7a0..69e0d5603c183c15a2e5556c075ddb43ea6994a9 100644 (file)
@@ -2297,6 +2297,9 @@ major_scan_card_table (gboolean mod_union, SgenGrayQueue *queue)
                                 */
                                if (!card_data)
                                        continue;
+#else
+                               g_assert_not_reached ();
+                               card_data = NULL;
 #endif
                        } else {
                                card_data = card_base = sgen_card_table_get_card_scan_address ((mword)block_start);
index 7d625644f5c6c946bceb07e832518654595a7259..d16b2b778a6438932f2a4060eb6ebb5ab23b4782 100644 (file)
@@ -70,6 +70,7 @@
 #include "metadata/sgen-protocol.h"
 #include "metadata/sgen-archdep.h"
 #include "metadata/sgen-bridge.h"
+#include "metadata/sgen-memory-governor.h"
 #include "metadata/mono-gc.h"
 #include "metadata/method-builder.h"
 #include "metadata/profiler-private.h"
@@ -151,6 +152,8 @@ static AllocRecord *alloc_records;
 static volatile int next_record;
 static volatile int alloc_count;
 
+void dump_alloc_records (void);
+void verify_alloc_records (void);
 
 static const char*
 get_reason_name (AllocRecord *rec)
index 60cb7a527e474b06bef5b358721ec83d7b8d5e8c..750ff2caccc4a0253dd40dfd24aba492575d749d 100644 (file)
@@ -2326,7 +2326,7 @@ ves_icall_System_Net_Sockets_Socket_WSAIoctl (SOCKET sock, gint32 code,
 
        *error = 0;
        
-       if (code == FIONBIO) {
+       if ((guint32)code == FIONBIO) {
                /* Invalid command. Must use Socket.Blocking */
                return -1;
        }
index 09c5c9a9b5b63534ea76d48af4264ab619eecfad..811c2852045508e0e56656b8287d9b27b2a79d71 100644 (file)
@@ -814,7 +814,13 @@ monitor_thread (gpointer unused)
 }
 
 void
-mono_thread_pool_init ()
+mono_thread_pool_init_tls (void)
+{
+       mono_wsq_init ();
+}
+
+void
+mono_thread_pool_init (void)
 {
        gint threads_per_cpu = 1;
        gint thread_count;
@@ -851,7 +857,6 @@ mono_thread_pool_init ()
 
        InitializeCriticalSection (&wsqs_lock);
        wsqs = g_ptr_array_sized_new (MAX (100 * cpu_count, thread_count));
-       mono_wsq_init ();
 
 #ifndef DISABLE_PERFCOUNTERS
        async_tp.pc_nitems = init_perf_counter ("Mono Threadpool", "Work Items Added");
@@ -1095,10 +1100,13 @@ static void
 threadpool_clear_queue (ThreadPool *tp, MonoDomain *domain)
 {
        MonoObject *obj;
-       MonoMList *other;
+       MonoMList *other = NULL;
+       MonoCQ *queue = tp->queue;
 
-       other = NULL;
-       while (mono_cq_dequeue (tp->queue, &obj)) {
+       if (!queue)
+               return;
+
+       while (mono_cq_dequeue (queue, &obj)) {
                if (obj == NULL)
                        continue;
                if (obj->vtable->domain != domain)
@@ -1106,6 +1114,9 @@ threadpool_clear_queue (ThreadPool *tp, MonoDomain *domain)
                threadpool_jobs_dec (obj);
        }
 
+       if (mono_runtime_is_shutting_down ())
+               return;
+
        while (other) {
                threadpool_append_job (tp, (MonoObject *) mono_mlist_get_data (other));
                other = mono_mlist_next (other);
index 8bcb834af7491430a1a92c126879d885834e3b86..811924b97cc46dd79d8fb9bb20ae14c4bcd3ee20 100644 (file)
@@ -7,6 +7,7 @@
 
 /* No managed code here */
 void mono_thread_pool_init (void) MONO_INTERNAL;
+void mono_thread_pool_init_tls (void) MONO_INTERNAL;
 
 void icall_append_job (MonoObject *ar) MONO_INTERNAL;
 void icall_append_io_job (MonoObject *target, MonoSocketAsyncResult *state) MONO_INTERNAL;
index dc1eb41879fea4319aa30e23898c3c18578f66e0..8ebc5391834d540665ca04f640816945ff855c0b 100644 (file)
@@ -184,7 +184,6 @@ void mono_thread_init_apartment_state (void) MONO_INTERNAL;
 void mono_thread_cleanup_apartment_state (void) MONO_INTERNAL;
 
 void mono_threads_set_shutting_down (void) MONO_INTERNAL;
-gboolean mono_threads_is_shutting_down (void) MONO_INTERNAL;
 
 gunichar2* mono_thread_get_name (MonoInternalThread *this_obj, guint32 *name_len) MONO_INTERNAL;
 
@@ -226,5 +225,8 @@ gpointer mono_get_special_static_data_for_thread (MonoInternalThread *thread, gu
 
 MonoException* mono_thread_resume_interruption (void) MONO_INTERNAL;
 void mono_threads_perform_thread_dump (void) MONO_INTERNAL;
+MonoThread *mono_thread_attach_full (MonoDomain *domain, gboolean force_attach) MONO_INTERNAL;
+
+void mono_thread_init_tls (void) MONO_INTERNAL;
 
 #endif /* _MONO_METADATA_THREADS_TYPES_H_ */
index 666f6b2cf91e8d16a6444ed1710839a39e351833..d089460dc9b2e923b6912902c940de8ba7fda376 100644 (file)
@@ -245,7 +245,7 @@ mono_thread_get_tls_offset (void)
  * If handle_store() returns FALSE the thread must not be started
  * because Mono is shutting down.
  */
-static gboolean handle_store(MonoThread *thread)
+static gboolean handle_store(MonoThread *thread, gboolean force_attach)
 {
        mono_threads_lock ();
 
@@ -254,7 +254,7 @@ static gboolean handle_store(MonoThread *thread)
        if (threads_starting_up)
                mono_g_hash_table_remove (threads_starting_up, thread);
 
-       if (shutting_down) {
+       if (shutting_down && !force_attach) {
                mono_threads_unlock ();
                return FALSE;
        }
@@ -794,7 +794,7 @@ mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, gb
        if (threadpool_thread)
                mono_thread_set_state (internal, ThreadState_Background);
 
-       if (handle_store (thread))
+       if (handle_store (thread, FALSE))
                ResumeThread (thread_handle);
 
        /* Check that the managed and unmanaged layout of MonoInternalThread matches */
@@ -831,8 +831,6 @@ __readfsdword (unsigned long long offset)
 void
 mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
 {
-       *staddr = NULL;
-       *stsize = 0;
 #if defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
        *staddr = (guint8*)pthread_get_stackaddr_np (pthread_self ());
        *stsize = pthread_get_stacksize_np (pthread_self ());
@@ -899,10 +897,16 @@ mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
 
        /* When running under emacs, sometimes staddr is not aligned to a page size */
        *staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
-}      
+}
 
 MonoThread *
 mono_thread_attach (MonoDomain *domain)
+{
+       return mono_thread_attach_full (domain, FALSE);
+}
+
+MonoThread *
+mono_thread_attach_full (MonoDomain *domain, gboolean force_attach)
 {
        MonoThreadInfo *info;
        MonoInternalThread *thread;
@@ -960,7 +964,7 @@ mono_thread_attach (MonoDomain *domain)
 
        current_thread = new_thread_with_internal (domain, thread);
 
-       if (!handle_store (current_thread)) {
+       if (!handle_store (current_thread, force_attach)) {
                /* Mono is shutting down, so just wait for the end */
                for (;;)
                        Sleep (10000);
@@ -1170,7 +1174,7 @@ static void mono_thread_start (MonoThread *thread)
         * launched, to avoid the main thread deadlocking while trying
         * to clean up a thread that will never be signalled.
         */
-       if (!handle_store (thread))
+       if (!handle_store (thread, FALSE))
                return;
 
        ResumeThread (internal->handle);
@@ -2570,6 +2574,13 @@ ves_icall_System_Threading_Volatile_Write_T (void *ptr, MonoObject *value)
        mono_gc_wbarrier_generic_nostore (ptr);
 }
 
+void
+mono_thread_init_tls (void)
+{
+       MONO_FAST_TLS_INIT (tls_current_object);
+       mono_native_tls_alloc (&current_object_key, NULL);
+}
+
 void mono_thread_init (MonoThreadStartCB start_cb,
                       MonoThreadAttachCB attach_cb)
 {
@@ -2583,8 +2594,6 @@ void mono_thread_init (MonoThreadStartCB start_cb,
        mono_init_static_data_info (&thread_static_info);
        mono_init_static_data_info (&context_static_info);
 
-       MONO_FAST_TLS_INIT (tls_current_object);
-       mono_native_tls_alloc (&current_object_key, NULL);
        THREAD_DEBUG (g_message ("%s: Allocated current_object_key %d", __func__, current_object_key));
 
        mono_thread_start_cb = start_cb;
@@ -2894,21 +2903,6 @@ mono_threads_set_shutting_down (void)
        }
 }
 
-/** 
- * mono_threads_is_shutting_down:
- *
- * Returns whether a thread has commenced shutdown of Mono.  Note that
- * if the function returns FALSE the caller must not assume that
- * shutdown is not in progress, because the situation might have
- * changed since the function returned.  For that reason this function
- * is of very limited utility.
- */
-gboolean
-mono_threads_is_shutting_down (void)
-{
-       return shutting_down;
-}
-
 void mono_thread_manage (void)
 {
        struct wait_data wait_data;
@@ -2949,10 +2943,12 @@ void mono_thread_manage (void)
                THREAD_DEBUG (g_message ("%s: I have %d threads after waiting.", __func__, wait->num));
        } while(wait->num>0);
 
-       mono_runtime_shutdown ();
-
-       THREAD_DEBUG (g_message ("%s: threadpool cleanup", __func__));
-       mono_thread_pool_cleanup ();
+       /* Mono is shutting down, so just wait for the end */
+       if (!mono_runtime_try_shutdown ()) {
+               /*FIXME mono_thread_suspend probably should call mono_thread_execute_interruption when self interrupting. */
+               mono_thread_suspend (mono_thread_internal_current ());
+               mono_thread_execute_interruption (mono_thread_internal_current ());
+       }
 
        /* 
         * Remove everything but the finalizer thread and self.
index 159b86799e8f7ee1ff4099b68cae183adc9d56f3..20dbb1ac93d46df68aa962ac5bb57db0b9ef85c9 100644 (file)
@@ -869,7 +869,7 @@ mono_type_is_valid_in_context (VerifyContext *ctx, MonoType *type)
        if (!is_valid_type_in_context (ctx, type)) {
                char *str = mono_type_full_name (type);
                ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Invalid generic type (%s%s) (argument out of range or %s is not generic) at 0x%04x",
-                       type->type == MONO_TYPE_VAR ? "!" : "!!",
+                       str [0] == '!' ? "" : type->type == MONO_TYPE_VAR ? "!" : "!!",
                        str,
                        type->type == MONO_TYPE_VAR ? "class" : "method",
                        ctx->ip_offset),
@@ -4952,7 +4952,9 @@ mono_method_verify (MonoMethod *method, int level)
                                ADD_VERIFY_ERROR (&ctx, g_strdup_printf ("Catch clause %d with invalid type", i));
                                break;
                        }
-               
+                       if (!mono_type_is_valid_in_context (&ctx, &clause->data.catch_class->byval_arg))
+                               break;
+
                        init_stack_with_value_at_exception_boundary (&ctx, ctx.code + clause->handler_offset, clause->data.catch_class);
                }
                else if (clause->flags == MONO_EXCEPTION_CLAUSE_FILTER) {
@@ -4961,6 +4963,9 @@ mono_method_verify (MonoMethod *method, int level)
                }
        }
 
+       if (!ctx.valid)
+               goto cleanup;
+
        original_bb = bb = mono_basic_block_split (method, &error);
        if (!mono_error_ok (&error)) {
                ADD_VERIFY_ERROR (&ctx, g_strdup_printf ("Invalid branch target: %s", mono_error_get_message (&error)));
index 5bf87e135579ae307cdac5a3fcd0e844e40c7be2..8a85f25bc9b19d25653135832d532e6448c10491 100644 (file)
 /inssel.c
 /inssel.h
 /mini.pc
-/cpu-pentium.h
-/cpu-g4.h
-/cpu-amd64.h
+/cpu-*.h
 /mono
 /monow
-/cpu-sparc.h
-/cpu-s390.h
-/cpu-x86.h
 /.hidden
 /semantic.cache
 /.project
index fe85ecf9878e908f46d82180df5dc79f76274503..53128de3c30e8165b1115186789c4b9aebcedbd9 100644 (file)
@@ -47,7 +47,7 @@ sgenstatic_libs = \
 
 CLASS=$(mcs_topdir)/class/lib/net_4_5
 
-RUNTIME_EXECUTABLE = $(if $(SGEN),$(top_builddir)/mono/mini/mono-sgen,$(top_builddir)/runtime/mono-wrapper)
+RUNTIME_EXECUTABLE = $(if $(BOEHM),$(top_builddir)/mono/mini/mono-boehm,$(top_builddir)/runtime/mono-wrapper)
 
 RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME_EXECUTABLE)
 RUNTIME_AOTCHECK = MONO_PATH=$(CLASS):. $(RUNTIME_EXECUTABLE)
@@ -75,16 +75,20 @@ genmdesc_CFLAGS = $(AM_CFLAGS)
 
 if NO_VERSION_SCRIPT
 monoldflags=$(export_ldflags)
-monobinldflags=$(export_ldflags)
+monobinldflags=$(export_ldflags) $(extra_runtime_ldflags)
 else
 monoldflags=-Wl,-version-script=$(srcdir)/ldscript $(export_ldflags)
-monobinldflags=-Wl,-version-script=$(srcdir)/ldscript.mono $(export_ldflags)
+monobinldflags=-Wl,-version-script=$(srcdir)/ldscript.mono $(export_ldflags) $(extra_runtime_ldflags)
 endif
 
 if HOST_WIN32
-libmono_2_0_la_LDFLAGS=-no-undefined -avoid-version -Wl,--kill-at $(monoldflags)
+libmonoldflags=-no-undefined -avoid-version -Wl,--kill-at $(monoldflags)
 else
-libmono_2_0_la_LDFLAGS=$(monoldflags) -version-info 1:0:0
+if PLATFORM_ANDROID
+libmonoldflags= -avoid-version $(monoldflags)
+else
+libmonoldflags=$(monoldflags) -version-info 1:0:0
+endif
 endif
 
 if JIT_SUPPORTED
@@ -96,9 +100,26 @@ sgen_static_libraries = libmini-static.la $(sgenstatic_libs)
 endif
 
 if SUPPORT_BOEHM
-boehm_libraries = libmono-2.0.la
+boehm_libraries = libmonoboehm-2.0.la
 boehm_static_libraries = libmini-static.la $(static_libs)
-boehm_binaries  = mono
+boehm_binaries  = mono-boehm
+endif
+
+#The mono uses sgen, while libmono remains boehm
+mono_bin_suffix = sgen
+libmono_suffix = boehm
+
+if DISABLE_EXECUTABLES
+else
+bin_SCRIPTS = mono
+noinst_SCRIPTS = mono
+
+mono: mono-$(mono_bin_suffix)
+       ln -sf $< $@
+
+install-exec-hook:
+       ln -sf $(DESTDIR)$(bindir)/mono-$(libmono_suffix) $(DESTDIR)$(bindir)/mono
+       (cd $(DESTDIR)$(libdir); for i in libmono$(libmono_suffix)*; do ln -sf $$i `echo $$i | sed s/$(libmono_suffix)//` ; done)
 endif
 
 if DISABLE_EXECUTABLES
@@ -110,7 +131,11 @@ bin_PROGRAMS = $(boehm_binaries) $(sgen_binaries)
 endif
 endif
 
+if DISABLE_EXECUTABLES
 noinst_PROGRAMS = genmdesc
+else
+noinst_PROGRAMS = genmdesc mono
+endif
 
 if DISABLE_EXECUTABLES
 shared_libraries = $(boehm_libraries) $(sgen_libraries)
@@ -155,27 +180,42 @@ endif
 
 endif
 
-mono_SOURCES = \
+mono_boehm_SOURCES = \
        main.c
 
 mono_CFLAGS = $(AM_CFLAGS)
 
+mono_boehm_CFLAGS = $(AM_CFLAGS)
+
 AM_CPPFLAGS = $(LIBGC_CPPFLAGS)
 
-mono_sgen_SOURCES = $(mono_SOURCES)
+mono_sgen_SOURCES = \
+       main-sgen.c
+
+mono_SOURCES = \
+       main-sgen.c
+
 mono_sgen_CFLAGS = $(AM_CFLAGS)
 
 # We build this after libmono was built so it contains the date when the final
 # link was done
 if SUPPORT_BOEHM
-buildver.h: libmini-static.la
-       @echo "const char *build_date = \"`date`\";" > buildver.h
-mono-main.$(OBJEXT): buildver.h
+if DISABLE_EXECUTABLES
+buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime.la
+else
+buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime-static.la
+endif
+       @echo "const char *build_date = \"`date`\";" > buildver-boehm.h
+mono_boehm-main.$(OBJEXT): buildver-boehm.h
 endif
 
-buildver-sgen.h: libmini-static.la
+if DISABLE_EXECUTABLES
+buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen.la
+else
+buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen-static.la
+endif
        @echo "const char *build_date = \"`date`\";" > buildver-sgen.h
-mono_sgen-main.$(OBJEXT): buildver-sgen.h
+mono_sgen-main-sgen.$(OBJEXT): buildver-sgen.h
 
 if DTRACE_G_REQUIRED
 LIBMONO_DTRACE_OBJECT = .libs/mono-dtrace.$(OBJEXT)
@@ -195,8 +235,8 @@ if STATIC_MONO
 MONO_LIB=$(boehm_static_libraries)
 MONO_SGEN_LIB=$(sgen_static_libraries)
 else 
-MONO_LIB=libmono-2.0.la
-MONO_SGEN_LIB=libmonosgen-2.0.la
+MONO_LIB=libmonoboehm-2.0.la
+MONO_LIBLIB=libmonosgen-2.0.la
 endif
 
 if LOADED_LLVM
@@ -205,7 +245,7 @@ else
 LLVMMONOF=$(LLVM_LIBS) $(LLVM_LDFLAGS)
 endif
 
-mono_LDADD = \
+mono_boehm_LDADD = \
        $(MONO_LIB)             \
        $(GLIB_LIBS)            \
        $(LLVMMONOF)            \
@@ -213,7 +253,7 @@ mono_LDADD = \
        -lm                     \
        $(MONO_DTRACE_OBJECT)
 
-mono_LDFLAGS = \
+mono_boehm_LDFLAGS = \
        $(static_flags) -export-dynamic $(monobinldflags) $(monobin_platform_ldflags)
 
 mono_sgen_LDADD = \
@@ -226,6 +266,14 @@ mono_sgen_LDADD = \
 
 mono_sgen_LDFLAGS = $(static_flags) -export-dynamic $(monobinldflags) $(monobin_platform_ldflags)
 
+# if SUPPORT_SGEN
+# 
+# mono_LDADD = $(mono_sgen_LDADD)
+# mono_LDFLAGS = $(mono_sgen_LDFLAGS)
+# 
+# endif
+
+
 if DTRACE_G_REQUIRED
 
 mono-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d mini.lo $(monodir)/mono/metadata/libmonoruntime-static.la
@@ -240,9 +288,9 @@ endif
 
 # Create monow.exe, linked for the 'windows' subsystem
 if HOST_WIN32
-monow_LDADD = $(mono_LDADD)
-monow_LDFLAGS = $(mono_LDFLAGS) -mwindows
-monow_SOURCES = $(mono_SOURCES)
+monow_LDADD = $(mono_boehm_LDADD)
+monow_LDFLAGS = $(mono_boehm_LDFLAGS) -mwindows
+monow_SOURCES = $(mono_boehm_SOURCES)
 endif
 
 genmdesc_SOURCES = \
@@ -507,17 +555,15 @@ endif
 libmini_la_SOURCES = $(common_sources) $(llvm_sources) $(arch_sources) $(os_sources)
 libmini_la_CFLAGS = $(mono_CFLAGS)
 
-libmono_2_0_la_SOURCES =
-libmono_2_0_la_CFLAGS = $(mono_CFLAGS)
-libmono_2_0_la_LIBADD = libmini.la $(libs) $(LIBMONO_DTRACE_OBJECT)
+libmonoboehm_2_0_la_SOURCES =
+libmonoboehm_2_0_la_CFLAGS = $(mono_boehm_CFLAGS)
+libmonoboehm_2_0_la_LIBADD = libmini.la $(libs) $(LIBMONO_DTRACE_OBJECT)
+libmonoboehm_2_0_la_LDFLAGS = $(libmonoldflags)
 
 libmonosgen_2_0_la_SOURCES =
 libmonosgen_2_0_la_CFLAGS = $(mono_sgen_CFLAGS)
 libmonosgen_2_0_la_LIBADD = libmini.la $(sgen_libs) $(LIBMONO_DTRACE_OBJECT)
-
-if PLATFORM_ANDROID
-libmonosgen_2_0_la_LDFLAGS = -avoid-version
-endif
+libmonosgen_2_0_la_LDFLAGS = $(libmonoldflags)
 
 if MOONLIGHT
 libmono_moon_la_SOURCES = $(libmini_la_SOURCES)
@@ -691,7 +737,7 @@ docu: mini.sgm
 check-local: rcheck
 
 clean-local:
-       rm -f mono a.out gmon.out *.o buildver.h buildver-sgen.h test.exe
+       rm -f mono a.out gmon.out *.o buildver-boehm.h buildver-sgen.h test.exe
 
 pkgconfigdir = $(libdir)/pkgconfig
 
index fe45c288ba6ea666e48fff0adc4b47b0c6036ff4..19de1d4ce7a6fe32ad9b4e05dcf9ce010ab130e6 100644 (file)
@@ -131,6 +131,7 @@ typedef struct MonoAotOptions {
        gboolean no_direct_calls;
        gboolean use_trampolines_page;
        gboolean no_instances;
+       gboolean gnu_asm;
        int nthreads;
        int ntrampolines;
        int nrgctx_trampolines;
@@ -200,6 +201,7 @@ typedef struct MonoAotCompile {
        char *static_linking_symbol;
        CRITICAL_SECTION mutex;
        gboolean use_bin_writer;
+       gboolean gas_line_numbers;
        MonoImageWriter *w;
        MonoDwarfWriter *dwarf;
        FILE *fp;
@@ -226,6 +228,7 @@ typedef struct MonoAotCompile {
        GHashTable *plt_entry_debug_sym_cache;
        gboolean thumb_mixed, need_no_dead_strip, need_pt_gnu_stack;
        GHashTable *ginst_hash;
+       GHashTable *dwarf_ln_filenames;
        gboolean global_symbols;
        gboolean direct_method_addresses;
 } MonoAotCompile;
@@ -526,6 +529,26 @@ encode_sleb128 (gint32 value, guint8 *buf, guint8 **endbuf)
        *endbuf = p;
 }
 
+static void
+emit_unset_mode (MonoAotCompile *acfg)
+{
+       img_writer_emit_unset_mode (acfg->w);
+}
+
+static G_GNUC_UNUSED void
+emit_set_thumb_mode (MonoAotCompile *acfg)
+{
+       emit_unset_mode (acfg);
+       fprintf (acfg->fp, ".code 16\n");
+}
+
+static G_GNUC_UNUSED void
+emit_set_arm_mode (MonoAotCompile *acfg)
+{
+       emit_unset_mode (acfg);
+       fprintf (acfg->fp, ".code 32\n");
+}
+
 /* ARCHITECTURE SPECIFIC CODE */
 
 #if defined(TARGET_X86) || defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_POWERPC)
@@ -607,6 +630,11 @@ arch_init (MonoAotCompile *acfg)
        acfg->llvm_label_prefix = "";
        acfg->user_symbol_prefix = "";
 
+#if defined(TARGET_AMD64) && defined(TARGET_MACH)
+       /* osx contains an old as which doesn't support avx opcodes */
+       g_string_append (acfg->llc_args, "-mattr=-avx");
+#endif
+
 #ifdef TARGET_ARM
        if (acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "darwin")) {
                g_string_append (acfg->llc_args, "-mattr=+v6");
@@ -629,6 +657,7 @@ arch_init (MonoAotCompile *acfg)
        acfg->user_symbol_prefix = "_";
        acfg->llvm_label_prefix = "_";
        acfg->need_no_dead_strip = TRUE;
+       acfg->aot_opts.gnu_asm = TRUE;
 #endif
 
 #if defined(__linux__) && !defined(TARGET_ARM)
@@ -653,7 +682,7 @@ arch_emit_direct_call (MonoAotCompile *acfg, const char *target, gboolean extern
 #if defined(TARGET_X86) || defined(TARGET_AMD64)
        /* Need to make sure this is exactly 5 bytes long */
        if (external && !acfg->use_bin_writer) {
-               img_writer_emit_unset_mode (acfg->w);
+               emit_unset_mode (acfg);
                fprintf (acfg->fp, "call %s\n", target);
        } else {
                emit_byte (acfg, '\xe8');
@@ -671,7 +700,7 @@ arch_emit_direct_call (MonoAotCompile *acfg, const char *target, gboolean extern
                img_writer_emit_reloc (acfg->w, R_ARM_CALL, target, -8);
                emit_bytes (acfg, buf, 4);
        } else {
-               img_writer_emit_unset_mode (acfg->w);
+               emit_unset_mode (acfg);
                fprintf (acfg->fp, "bl %s\n", target);
        }
        *call_size = 4;
@@ -679,7 +708,7 @@ arch_emit_direct_call (MonoAotCompile *acfg, const char *target, gboolean extern
        if (acfg->use_bin_writer) {
                g_assert_not_reached ();
        } else {
-               img_writer_emit_unset_mode (acfg->w);
+               emit_unset_mode (acfg);
                fprintf (acfg->fp, "bl %s\n", target);
                *call_size = 4;
        }
@@ -732,7 +761,7 @@ arch_emit_got_offset (MonoAotCompile *acfg, guint8 *code, int *code_size)
 {
 #if defined(TARGET_POWERPC64)
        g_assert (!acfg->use_bin_writer);
-       img_writer_emit_unset_mode (acfg->w);
+       emit_unset_mode (acfg);
        /* 
         * The ppc32 code doesn't seem to work on ppc64, the assembler complains about
         * unsupported relocations. So we store the got address into the .Lgot_addr
@@ -747,7 +776,7 @@ arch_emit_got_offset (MonoAotCompile *acfg, guint8 *code, int *code_size)
        *code_size = 16;
 #elif defined(TARGET_POWERPC)
        g_assert (!acfg->use_bin_writer);
-       img_writer_emit_unset_mode (acfg->w);
+       emit_unset_mode (acfg);
        fprintf (acfg->fp, ".L%d:\n", acfg->label_generator);
        fprintf (acfg->fp, "lis 0, (%s + 4 - .L%d)@h\n", acfg->got_symbol, acfg->label_generator);
        fprintf (acfg->fp, "ori 0, 0, (%s + 4 - .L%d)@l\n", acfg->got_symbol, acfg->label_generator);
@@ -883,7 +912,7 @@ arch_emit_plt_entry (MonoAotCompile *acfg, int index)
 
                /* The GOT address is guaranteed to be in r30 by OP_LOAD_GOTADDR */
                g_assert (!acfg->use_bin_writer);
-               img_writer_emit_unset_mode (acfg->w);
+               emit_unset_mode (acfg);
                fprintf (acfg->fp, "lis 11, %d@h\n", offset);
                fprintf (acfg->fp, "ori 11, 11, %d@l\n", offset);
                fprintf (acfg->fp, "add 11, 11, 30\n");
@@ -915,13 +944,23 @@ arch_emit_llvm_plt_entry (MonoAotCompile *acfg, int index)
        /* LLVM calls the PLT entries using bl, so these have to be thumb2 */
        /* The caller already transitioned to thumb */
        /* The code below should be 12 bytes long */
+       /* clang has trouble encoding these instructions, so emit the binary */
+#if 0
        fprintf (acfg->fp, "ldr ip, [pc, #8]\n");
        /* thumb can't encode ld pc, [pc, ip] */
        fprintf (acfg->fp, "add ip, pc, ip\n");
        fprintf (acfg->fp, "ldr ip, [ip, #0]\n");
        fprintf (acfg->fp, "bx ip\n");
+#endif
+       emit_set_thumb_mode (acfg);
+       fprintf (acfg->fp, ".4byte 0xc008f8df\n");
+       fprintf (acfg->fp, ".2byte 0x44fc\n");
+       fprintf (acfg->fp, ".4byte 0xc000f8dc\n");
+       fprintf (acfg->fp, ".2byte 0x4760\n");
        emit_symbol_diff (acfg, acfg->got_symbol, ".", ((acfg->plt_got_offset_base + index) * sizeof (gpointer)) + 4);
        emit_int32 (acfg, acfg->plt_got_info_offsets [index]);
+       emit_unset_mode (acfg);
+       emit_set_arm_mode (acfg);
 #else
        g_assert_not_reached ();
 #endif
@@ -1229,7 +1268,7 @@ arch_emit_specific_trampoline (MonoAotCompile *acfg, int offset, int *tramp_size
         * in the second got slot of every aot image. The caller already computed
         * the address of its got and placed it into r30.
         */
-       img_writer_emit_unset_mode (acfg->w);
+       emit_unset_mode (acfg);
        /* Load mscorlib got address */
        fprintf (acfg->fp, "%s 0, %d(30)\n", PPC_LD_OP, (int)sizeof (gpointer));
        /* Load generic trampoline address */
@@ -1461,7 +1500,7 @@ arch_emit_static_rgctx_trampoline (MonoAotCompile *acfg, int offset, int *tramp_
         * in the second got slot of every aot image. The caller already computed
         * the address of its got and placed it into r30.
         */
-       img_writer_emit_unset_mode (acfg->w);
+       emit_unset_mode (acfg);
        /* Load mscorlib got address */
        fprintf (acfg->fp, "%s 0, %d(30)\n", PPC_LD_OP, (int)sizeof (gpointer));
        /* Load rgctx */
@@ -1875,7 +1914,7 @@ arch_emit_autoreg (MonoAotCompile *acfg, char *symbol)
 {
 #if defined(TARGET_POWERPC) && defined(__mono_ilp32__)
        /* Based on code generated by gcc */
-       img_writer_emit_unset_mode (acfg->w);
+       emit_unset_mode (acfg);
 
        fprintf (acfg->fp,
 #if defined(_MSC_VER) || defined(MONO_CROSS_COMPILE) 
@@ -3191,11 +3230,9 @@ add_wrappers (MonoAotCompile *acfg)
        }
 
        if (strcmp (acfg->image->assembly->aname.name, "mscorlib") == 0) {
-#ifdef MONO_ARCH_HAVE_TLS_GET
                MonoMethodDesc *desc;
                MonoMethod *orig_method;
                int nallocators;
-#endif
 
                /* Runtime invoke wrappers */
 
@@ -3267,34 +3304,34 @@ add_wrappers (MonoAotCompile *acfg)
                /* stelemref */
                add_method (acfg, mono_marshal_get_stelemref ());
 
-#ifdef MONO_ARCH_HAVE_TLS_GET
-               /* Managed Allocators */
-               nallocators = mono_gc_get_managed_allocator_types ();
-               for (i = 0; i < nallocators; ++i) {
-                       m = mono_gc_get_managed_allocator_by_type (i);
-                       if (m)
-                               add_method (acfg, m);
-               }
+               if (MONO_ARCH_HAVE_TLS_GET) {
+                       /* Managed Allocators */
+                       nallocators = mono_gc_get_managed_allocator_types ();
+                       for (i = 0; i < nallocators; ++i) {
+                               m = mono_gc_get_managed_allocator_by_type (i);
+                               if (m)
+                                       add_method (acfg, m);
+                       }
 
-               /* Monitor Enter/Exit */
-               desc = mono_method_desc_new ("Monitor:Enter(object,bool&)", FALSE);
-               orig_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
-               /* This is a v4 method */
-               if (orig_method) {
+                       /* Monitor Enter/Exit */
+                       desc = mono_method_desc_new ("Monitor:Enter(object,bool&)", FALSE);
+                       orig_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
+                       /* This is a v4 method */
+                       if (orig_method) {
+                               method = mono_monitor_get_fast_path (orig_method);
+                               if (method)
+                                       add_method (acfg, method);
+                       }
+                       mono_method_desc_free (desc);
+
+                       desc = mono_method_desc_new ("Monitor:Exit(object)", FALSE);
+                       orig_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
+                       g_assert (orig_method);
+                       mono_method_desc_free (desc);
                        method = mono_monitor_get_fast_path (orig_method);
                        if (method)
-                       add_method (acfg, method);
+                               add_method (acfg, method);
                }
-               mono_method_desc_free (desc);
-
-               desc = mono_method_desc_new ("Monitor:Exit(object)", FALSE);
-               orig_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
-               g_assert (orig_method);
-               mono_method_desc_free (desc);
-               method = mono_monitor_get_fast_path (orig_method);
-               if (method)
-                       add_method (acfg, method);
-#endif
 
                /* Stelemref wrappers */
                {
@@ -3614,6 +3651,19 @@ has_type_vars (MonoClass *klass)
        return FALSE;
 }
 
+static gboolean
+is_vt_inst (MonoGenericInst *inst)
+{
+       int i;
+
+       for (i = 0; i < inst->type_argc; ++i) {
+               MonoType *t = inst->type_argv [i];
+               if (t->type == MONO_TYPE_VALUETYPE)
+                       return TRUE;
+       }
+       return FALSE;
+}
+
 static gboolean
 method_has_type_vars (MonoMethod *method)
 {
@@ -3684,6 +3734,7 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
        MonoMethod *method;
        MonoClassField *field;
        gpointer iter;
+       gboolean use_gsharedvt = FALSE;
 
        if (!acfg->ginst_hash)
                acfg->ginst_hash = g_hash_table_new (NULL, NULL);
@@ -3716,9 +3767,16 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
 
        g_hash_table_insert (acfg->ginst_hash, klass, klass);
 
+       /*
+        * Use gsharedvt for generic collections with vtype arguments to avoid code blowup.
+        * Enable this only for some classes since gsharedvt might not support all methods.
+        */
+       if ((acfg->opts & MONO_OPT_GSHAREDVT) && klass->image == mono_defaults.corlib && klass->generic_class && klass->generic_class->context.class_inst && is_vt_inst (klass->generic_class->context.class_inst) && (!strcmp (klass->name, "Dictionary`2") || !strcmp (klass->name, "List`1")))
+               use_gsharedvt = TRUE;
+
        iter = NULL;
        while ((method = mono_class_get_methods (klass, &iter))) {
-               if (mono_method_is_generic_sharable_full (method, FALSE, FALSE, FALSE))
+               if (mono_method_is_generic_sharable_full (method, FALSE, FALSE, use_gsharedvt))
                        /* Already added */
                        continue;
 
@@ -4148,6 +4206,10 @@ is_direct_callable (MonoAotCompile *acfg, MonoMethod *method, MonoJumpInfo *patc
                                direct_callable = FALSE;
                        }
 
+                       if (callee_cfg->method->wrapper_type == MONO_WRAPPER_ALLOC)
+                               /* sgen does some initialization when the allocator method is created */
+                               direct_callable = FALSE;
+
                        if (direct_callable)
                                return TRUE;
                }
@@ -4193,6 +4255,119 @@ get_pinvoke_import (MonoAotCompile *acfg, MonoMethod *method)
        return import;
 }
 
+static gint
+compare_lne (MonoDebugLineNumberEntry *a, MonoDebugLineNumberEntry *b)
+{
+       if (a->native_offset == b->native_offset)
+               return a->il_offset - b->il_offset;
+       else
+               return a->native_offset - b->native_offset;
+}
+
+/*
+ * compute_line_numbers:
+ *
+ * Returns a sparse array of size CODE_SIZE containing MonoDebugSourceLocation* entries for the native offsets which have a corresponding line number
+ * entry.
+ */
+static MonoDebugSourceLocation**
+compute_line_numbers (MonoMethod *method, int code_size, MonoDebugMethodJitInfo *debug_info)
+{
+       MonoDebugMethodInfo *minfo;
+       MonoDebugLineNumberEntry *ln_array;
+       MonoDebugSourceLocation *loc;
+       int i, prev_line, prev_il_offset;
+       int *native_to_il_offset = NULL;
+       MonoDebugSourceLocation **res;
+       gboolean first;
+
+       minfo = mono_debug_lookup_method (method);
+       if (!minfo)
+               return NULL;
+       // FIXME: This seems to happen when two methods have the same cfg->method_to_register
+       if (debug_info->code_size != code_size)
+               return NULL;
+
+       g_assert (code_size);
+
+       /* Compute the native->IL offset mapping */
+
+       ln_array = g_new0 (MonoDebugLineNumberEntry, debug_info->num_line_numbers);
+       memcpy (ln_array, debug_info->line_numbers, debug_info->num_line_numbers * sizeof (MonoDebugLineNumberEntry));
+
+       qsort (ln_array, debug_info->num_line_numbers, sizeof (MonoDebugLineNumberEntry), (gpointer)compare_lne);
+
+       native_to_il_offset = g_new0 (int, code_size + 1);
+
+       for (i = 0; i < debug_info->num_line_numbers; ++i) {
+               int j;
+               MonoDebugLineNumberEntry *lne = &ln_array [i];
+
+               if (i == 0) {
+                       for (j = 0; j < lne->native_offset; ++j)
+                               native_to_il_offset [j] = -1;
+               }
+
+               if (i < debug_info->num_line_numbers - 1) {
+                       MonoDebugLineNumberEntry *lne_next = &ln_array [i + 1];
+
+                       for (j = lne->native_offset; j < lne_next->native_offset; ++j)
+                               native_to_il_offset [j] = lne->il_offset;
+               } else {
+                       for (j = lne->native_offset; j < code_size; ++j)
+                               native_to_il_offset [j] = lne->il_offset;
+               }
+       }
+       g_free (ln_array);
+
+       /* Compute the native->line number mapping */
+       res = g_new0 (MonoDebugSourceLocation*, code_size);
+       prev_il_offset = -1;
+       prev_line = -1;
+       first = TRUE;
+       for (i = 0; i < code_size; ++i) {
+               int il_offset = native_to_il_offset [i];
+
+               if (il_offset == -1 || il_offset == prev_il_offset)
+                       continue;
+               prev_il_offset = il_offset;
+               loc = mono_debug_symfile_lookup_location (minfo, il_offset);
+               if (!(loc && loc->source_file))
+                       continue;
+               if (loc->row == prev_line) {
+                       mono_debug_symfile_free_location (loc);
+                       continue;
+               }
+               prev_line = loc->row;
+               //printf ("D: %s:%d il=%x native=%x\n", loc->source_file, loc->row, il_offset, i);
+               if (first)
+                       /* This will cover the prolog too */
+                       res [0] = loc;
+               else
+                       res [i] = loc;
+               first = FALSE;
+       }
+       return res;
+}
+
+static int
+get_file_index (MonoAotCompile *acfg, const char *source_file)
+{
+       int findex;
+
+       // FIXME: Free these
+       if (!acfg->dwarf_ln_filenames)
+               acfg->dwarf_ln_filenames = g_hash_table_new (g_str_hash, g_str_equal);
+       findex = GPOINTER_TO_INT (g_hash_table_lookup (acfg->dwarf_ln_filenames, source_file));
+       if (!findex) {
+               findex = g_hash_table_size (acfg->dwarf_ln_filenames) + 1;
+               g_hash_table_insert (acfg->dwarf_ln_filenames, g_strdup (source_file), GINT_TO_POINTER (findex));
+               emit_unset_mode (acfg);
+               fprintf (acfg->fp, ".file %d \"%s\"\n", findex, source_file);
+       }
+       return findex;
+}
+
 /*
  * emit_and_reloc_code:
  *
@@ -4202,12 +4377,13 @@ get_pinvoke_import (MonoAotCompile *acfg, MonoMethod *method)
  * since trampolines are needed to make PTL work.
  */
 static void
-emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, guint32 code_len, MonoJumpInfo *relocs, gboolean got_only)
+emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, guint32 code_len, MonoJumpInfo *relocs, gboolean got_only, MonoDebugMethodJitInfo *debug_info)
 {
        int i, pindex, start_index, method_index;
        GPtrArray *patches;
        MonoJumpInfo *patch_info;
        MonoMethodHeader *header;
+       MonoDebugSourceLocation **locs = NULL;
        gboolean skip, direct_call, external_call;
        guint32 got_slot;
        const char *direct_call_target;
@@ -4219,6 +4395,15 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
                method_index = get_method_index (acfg, method);
        }
 
+       if (acfg->gas_line_numbers && method && debug_info) {
+               locs = compute_line_numbers (method, code_len, debug_info);
+               if (!locs) {
+                       int findex = get_file_index (acfg, "<unknown>");
+                       emit_unset_mode (acfg);
+                       fprintf (acfg->fp, ".loc %d %d 0\n", findex, 1);
+               }
+       }
+
        /* Collect and sort relocations */
        patches = g_ptr_array_new ();
        for (patch_info = relocs; patch_info; patch_info = patch_info->next)
@@ -4234,6 +4419,16 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
                                break;
                }
 
+               if (locs && locs [i]) {
+                       MonoDebugSourceLocation *loc = locs [i];
+                       int findex;
+
+                       findex = get_file_index (acfg, loc->source_file);
+                       emit_unset_mode (acfg);
+                       fprintf (acfg->fp, ".loc %d %d 0\n", findex, loc->row);
+                       mono_debug_symfile_free_location (loc);
+               }
+
 #ifdef MONO_ARCH_AOT_SUPPORTED
                skip = FALSE;
                if (patch_info && (patch_info->ip.i == i) && (pindex < patches->len)) {
@@ -4351,13 +4546,22 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
 
                        /* Try to emit multiple bytes at once */
                        if (pindex < patches->len && patch_info->ip.i > i) {
-                               emit_bytes (acfg, code + i, patch_info->ip.i - i);
-                               i = patch_info->ip.i - 1;
+                               int limit;
+
+                               for (limit = i + 1; limit < patch_info->ip.i; ++limit) {
+                                       if (locs && locs [limit])
+                                               break;
+                               }
+
+                               emit_bytes (acfg, code + i, limit - i);
+                               i = limit - 1;
                        } else {
                                emit_bytes (acfg, code + i, 1);
                        }
                }
        }
+
+       g_free (locs);
 }
 
 /*
@@ -4478,7 +4682,7 @@ emit_method_code (MonoAotCompile *acfg, MonoCompile *cfg)
 
        acfg->cfgs [method_index]->got_offset = acfg->got_offset;
 
-       emit_and_reloc_code (acfg, method, code, cfg->code_len, cfg->patch_info, FALSE);
+       emit_and_reloc_code (acfg, method, code, cfg->code_len, cfg->patch_info, FALSE, mono_debug_find_method (cfg->jit_info->method, mono_domain_get ()));
 
        emit_line (acfg);
 
@@ -4619,7 +4823,7 @@ encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info, guint8 *buf, guint
                }
 
                encode_value (offset, p, &p);
-               g_assert (entry->info_type < 256);
+               g_assert ((int)entry->info_type < 256);
                g_assert (entry->data->type < 256);
                encode_value ((entry->in_mrgctx ? 1 : 0) | (entry->info_type << 1) | (entry->data->type << 9), p, &p);
                encode_patch (acfg, entry->data, p, &p);
@@ -4637,10 +4841,37 @@ encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info, guint8 *buf, guint
        case MONO_PATCH_INFO_SIGNATURE:
                encode_signature (acfg, (MonoMethodSignature*)patch_info->data.target, p, &p);
                break;
+       case MONO_PATCH_INFO_TLS_OFFSET:
+               encode_value (GPOINTER_TO_INT (patch_info->data.target), p, &p);
+               break;
        case MONO_PATCH_INFO_GSHAREDVT_CALL:
                encode_signature (acfg, (MonoMethodSignature*)patch_info->data.gsharedvt->sig, p, &p);
                encode_method_ref (acfg, patch_info->data.gsharedvt->method, p, &p);
                break;
+       case MONO_PATCH_INFO_GSHAREDVT_METHOD: {
+               MonoGSharedVtMethodInfo *info = patch_info->data.gsharedvt_method;
+               int i;
+
+               encode_method_ref (acfg, info->method, p, &p);
+               encode_value (info->entries->len, p, &p);
+               for (i = 0; i < info->entries->len; ++i) {
+                       MonoRuntimeGenericContextInfoTemplate *template = g_ptr_array_index (info->entries, i);
+
+                       encode_value (template->info_type, p, &p);
+                       switch (mini_rgctx_info_type_to_patch_info_type (template->info_type)) {
+                       case MONO_PATCH_INFO_CLASS:
+                               encode_klass_ref (acfg, mono_class_from_mono_type (template->data), p, &p);
+                               break;
+                       case MONO_PATCH_INFO_FIELD:
+                               encode_field_info (acfg, template->data, p, &p);
+                               break;
+                       default:
+                               g_assert_not_reached ();
+                               break;
+                       }
+               }
+               break;
+       }
        default:
                g_warning ("unable to handle jump info %d", patch_info->type);
                g_assert_not_reached ();
@@ -5234,11 +5465,12 @@ emit_plt (MonoAotCompile *acfg)
                                if (callee_cfg) {
                                        if (acfg->thumb_mixed && !callee_cfg->compile_llvm) {
                                                /* LLVM calls the PLT entries using bl, so emit a stub */
+                                               emit_set_thumb_mode (acfg);
                                                fprintf (acfg->fp, "\n.thumb_func\n");
                                                emit_label (acfg, plt_entry->llvm_symbol);
                                                fprintf (acfg->fp, "bx pc\n");
                                                fprintf (acfg->fp, "nop\n");
-                                               fprintf (acfg->fp, ".arm\n");
+                                               emit_set_arm_mode (acfg);
                                                fprintf (acfg->fp, "b %s\n", callee_cfg->asm_symbol);
                                        } else {
                                                fprintf (acfg->fp, "\n.set %s, %s\n", plt_entry->llvm_symbol, callee_cfg->asm_symbol);
@@ -5259,7 +5491,7 @@ emit_plt (MonoAotCompile *acfg)
 
                if (debug_sym) {
                        if (acfg->need_no_dead_strip) {
-                               img_writer_emit_unset_mode (acfg->w);
+                               emit_unset_mode (acfg);
                                fprintf (acfg->fp, "    .no_dead_strip %s\n", debug_sym);
                        }
                        emit_local_symbol (acfg, debug_sym, NULL, TRUE);
@@ -5380,7 +5612,7 @@ emit_trampoline_full (MonoAotCompile *acfg, int got_offset, MonoTrampInfo *info,
         * The code should access everything through the GOT, so we pass
         * TRUE here.
         */
-       emit_and_reloc_code (acfg, NULL, code, code_size, ji, TRUE);
+       emit_and_reloc_code (acfg, NULL, code, code_size, ji, TRUE, NULL);
 
        emit_symbol_size (acfg, start_symbol, ".");
 
@@ -6055,6 +6287,8 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
         * does not need to support them by creating a fake GOT etc.
         */
        cfg = mini_method_compile (method, acfg->opts, mono_get_root_domain (), FALSE, TRUE, 0);
+       mono_loader_clear_error ();
+
        if (cfg->exception_type == MONO_EXCEPTION_GENERIC_SHARING_FAILED) {
                if (acfg->aot_opts.print_skipped_methods)
                        printf ("Skip (gshared failure): %s (%s)\n", mono_method_full_name (method, TRUE), cfg->exception_message);
@@ -6075,6 +6309,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                mono_destroy_compile (cfg);
                return;
        }
+       cfg->method_index = index;
 
        /* Nullify patches which need no aot processing */
        for (patch_info = cfg->patch_info; patch_info; patch_info = patch_info->next) {
@@ -6445,6 +6680,13 @@ mono_aot_get_plt_symbol (MonoJumpInfoType type, gconstpointer data)
 #endif
 }
 
+int
+mono_aot_get_method_index (MonoMethod *method)
+{
+       g_assert (llvm_acfg);
+       return get_method_index (llvm_acfg, method);
+}
+
 MonoJumpInfo*
 mono_aot_patch_info_dup (MonoJumpInfo* ji)
 {
@@ -6548,10 +6790,15 @@ emit_llvm_file (MonoAotCompile *acfg)
        if (acfg->aot_opts.mtriple)
                g_string_append_printf (acfg->llc_args, " -mtriple=%s", acfg->aot_opts.mtriple);
 
+#if defined(TARGET_MACH) && defined(TARGET_ARM)
+       /* ios requires PIC code now */
+       g_string_append_printf (acfg->llc_args, " -relocation-model=pic");
+#else
        if (llvm_acfg->aot_opts.static_link)
                g_string_append_printf (acfg->llc_args, " -relocation-model=static");
        else
                g_string_append_printf (acfg->llc_args, " -relocation-model=pic");
+#endif
        unlink (acfg->tmpfname);
 
        command = g_strdup_printf ("%sllc %s -disable-gnu-eh-frame -enable-mono-eh-frame -o %s %s.opt.bc", acfg->aot_opts.llvm_path, acfg->llc_args->str, acfg->tmpfname, acfg->tmpfname);
@@ -6638,12 +6885,18 @@ emit_code (MonoAotCompile *acfg)
                        emit_alignment (acfg, AOT_FUNC_ALIGNMENT);
 #endif
 
-                       if (acfg->thumb_mixed && cfg->compile_llvm)
+                       if (acfg->thumb_mixed && cfg->compile_llvm) {
+                               emit_set_thumb_mode (acfg);
                                fprintf (acfg->fp, "\n.thumb_func\n");
+                       }
 
                        emit_label (acfg, symbol);
 
                        arch_emit_unbox_trampoline (acfg, cfg, cfg->orig_method, cfg->asm_symbol);
+
+                       if (acfg->thumb_mixed && cfg->compile_llvm) {
+                               emit_set_arm_mode (acfg);
+                       }
                }
 
                if (cfg->compile_llvm)
@@ -6687,7 +6940,7 @@ emit_code (MonoAotCompile *acfg)
                emit_alignment (acfg, 8);
                emit_label (acfg, symbol);
                emit_local_symbol (acfg, symbol, "method_addresses_end", TRUE);
-               img_writer_emit_unset_mode (acfg->w);
+               emit_unset_mode (acfg);
                if (acfg->need_no_dead_strip)
                        fprintf (acfg->fp, "    .no_dead_strip %s\n", symbol);
 
@@ -6772,7 +7025,7 @@ emit_code (MonoAotCompile *acfg)
 
                        emit_int32 (acfg, index);
                        if (acfg->direct_method_addresses) {
-                               img_writer_emit_unset_mode (acfg->w);
+                               emit_unset_mode (acfg);
                                if (acfg->thumb_mixed && cfg->compile_llvm)
                                        fprintf (acfg->fp, "\n\tblx %s\n", symbol);
                                else
@@ -7695,7 +7948,6 @@ emit_file_info (MonoAotCompile *acfg)
                memset (&t, 0, sizeof (MonoType));
                t.type = MONO_TYPE_R8;
                mono_type_size (&t, &align);
-
                emit_int32 (acfg, align);
 
                memset (&t, 0, sizeof (MonoType));
@@ -7829,6 +8081,14 @@ collect_methods (MonoAotCompile *acfg)
                method = mono_get_method (acfg->image, token, NULL);
                if (!method)
                        continue;
+               /*
+               if (strcmp (method->name, "gshared2"))
+                       continue;
+               */
+               /*
+               if (!strstr (method->klass->image->name, "mini"))
+                       continue;
+               */
                if (method->is_generic || method->klass->generic_container) {
                        MonoMethod *gshared;
 
@@ -8139,6 +8399,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
        int i, res;
        MonoAotCompile *acfg;
        char *outfile_name, *tmp_outfile_name, *p;
+       char llvm_stats_msg [256];
        TV_DECLARE (atv);
        TV_DECLARE (btv);
 
@@ -8247,8 +8508,11 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
 
        acfg->method_index = 1;
 
+       // FIXME:
+       /*
        if (acfg->aot_opts.full_aot)
                mono_set_partial_sharing_supported (TRUE);
+       */
 
        collect_methods (acfg);
 
@@ -8379,12 +8643,19 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
                }
        }
 
+       if (acfg->aot_opts.dwarf_debug && acfg->aot_opts.asm_only && acfg->aot_opts.gnu_asm) {
+               /*
+                * CLANG supports GAS .file/.loc directives, so emit line number information this way
+                */
+               acfg->gas_line_numbers = TRUE;
+       }
+
        if (!acfg->aot_opts.nodebug || acfg->aot_opts.dwarf_debug) {
                if (acfg->aot_opts.dwarf_debug && mono_debug_format == MONO_DEBUG_FORMAT_NONE) {
                        fprintf (stderr, "The dwarf AOT option requires the --debug option.\n");
                        return 1;
                }
-               acfg->dwarf = mono_dwarf_writer_create (acfg->w, NULL, 0, FALSE);
+               acfg->dwarf = mono_dwarf_writer_create (acfg->w, NULL, 0, FALSE, !acfg->gas_line_numbers);
        }
 
        img_writer_emit_start (acfg->w);
@@ -8460,9 +8731,14 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
        if (acfg->llvm)
                g_assert (acfg->got_offset <= acfg->final_got_size);
 
+       if (acfg->llvm)
+               sprintf (llvm_stats_msg, ", LLVM: %d (%d%%)", acfg->stats.llvm_count, acfg->stats.mcount ? (acfg->stats.llvm_count * 100) / acfg->stats.mcount : 100);
+       else
+               strcpy (llvm_stats_msg, "");
        printf ("Code: %d Info: %d Ex Info: %d Unwind Info: %d Class Info: %d PLT: %d GOT Info: %d GOT: %d Offsets: %d\n", acfg->stats.code_size, acfg->stats.info_size, acfg->stats.ex_info_size, acfg->stats.unwind_info_size, acfg->stats.class_info_size, acfg->plt_offset, acfg->stats.got_info_size, (int)(acfg->got_offset * sizeof (gpointer)), acfg->stats.offsets_size);
-       printf ("Compiled: %d/%d (%d%%), No GOT slots: %d (%d%%), Direct calls: %d (%d%%)\n", 
+       printf ("Compiled: %d/%d (%d%%)%s, No GOT slots: %d (%d%%), Direct calls: %d (%d%%)\n", 
                        acfg->stats.ccount, acfg->stats.mcount, acfg->stats.mcount ? (acfg->stats.ccount * 100) / acfg->stats.mcount : 100,
+                       llvm_stats_msg,
                        acfg->stats.methods_without_got_slots, acfg->stats.mcount ? (acfg->stats.methods_without_got_slots * 100) / acfg->stats.mcount : 100,
                        acfg->stats.direct_calls, acfg->stats.all_calls ? (acfg->stats.direct_calls * 100) / acfg->stats.all_calls : 100);
        if (acfg->stats.genericcount)
@@ -8473,8 +8749,6 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
                printf ("%d methods contain lmf pointers (%d%%)\n", acfg->stats.lmfcount, acfg->stats.mcount ? (acfg->stats.lmfcount * 100) / acfg->stats.mcount : 100);
        if (acfg->stats.ocount)
                printf ("%d methods have other problems (%d%%)\n", acfg->stats.ocount, acfg->stats.mcount ? (acfg->stats.ocount * 100) / acfg->stats.mcount : 100);
-       if (acfg->llvm)
-               printf ("Methods compiled with LLVM: %d (%d%%)\n", acfg->stats.llvm_count, acfg->stats.mcount ? (acfg->stats.llvm_count * 100) / acfg->stats.mcount : 100);
 
        TV_GETTIME (atv);
        res = img_writer_emit_writeout (acfg->w);
index f35ba21fa26acded0149492ec471da128b0504a7..6d93b6ce3037aae57a48c85a54ae9b72e4301d35 100644 (file)
@@ -1527,6 +1527,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
        int i, version;
        guint8 *blob;
        gboolean do_load_image = TRUE;
+       int align_double, align_int64;
 
        if (mono_compile_aot)
                return;
@@ -1617,9 +1618,28 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
                return;
        }
 
+#if defined (TARGET_ARM) && defined (TARGET_MACH)
+       {
+               MonoType t;
+               int align = 0;
+
+               memset (&t, 0, sizeof (MonoType));
+               t.type = MONO_TYPE_R8;
+               mono_type_size (&t, &align);
+               align_double = align;
+
+               memset (&t, 0, sizeof (MonoType));
+               t.type = MONO_TYPE_I8;
+               align_int64 = align;
+       }
+#else
+       align_double = __alignof__ (double);
+       align_int64 = __alignof__ (gint64);
+#endif
+
        /* Sanity check */
-       g_assert (info->double_align == __alignof__ (double));
-       g_assert (info->long_align == __alignof__ (gint64));
+       g_assert (info->double_align == align_double);
+       g_assert (info->long_align == align_int64);
 
        blob = info->blob;
 
@@ -2127,14 +2147,10 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
 
        /* Header */
        version = *p;
-       g_assert (version == 1 || version == 2);
+       g_assert (version == 3);
+       p ++;
+       func_encoding = *p;
        p ++;
-       if (version == 2) {
-               func_encoding = *p;
-               p ++;
-       } else {
-               func_encoding = DW_EH_PE_pcrel;
-       }
        p = ALIGN_PTR_TO (p, 4);
 
        fde_count = *(guint32*)p;
@@ -2145,31 +2161,20 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
        cie = p + ((fde_count + 1) * 8);
 
        /* Binary search in the table to find the entry for code */
-       if (func_encoding == DW_EH_PE_absptr) {
-               /*
-                * Table entries are encoded as DW_EH_PE_absptr, because the ios linker can move functions inside object files to make thumb work,
-                * so the offsets between two symbols in the text segment are not assembler constant.
-                */
-               g_assert (sizeof(gpointer) == 4);
-               offset = GPOINTER_TO_INT (code);
-       } else {
-               /* Table entries are encoded as DW_EH_PE_pcrel relative to mono_eh_frame */
-               offset = code - amodule->mono_eh_frame;
-       }
-
+       offset = code - amodule->code;
        left = 0;
        right = fde_count;
        while (TRUE) {
                pos = (left + right) / 2;
 
-               offset1 = table [(pos * 2)];
+               /* The table contains method index/fde offset pairs */
+               g_assert (table [(pos * 2)] != -1);
+               offset1 = amodule->code_offsets [table [(pos * 2)]];
                if (pos + 1 == fde_count) {
-                       if (func_encoding == DW_EH_PE_absptr)
-                               offset2 = GPOINTER_TO_INT (amodule->code_end);
-                       else
-                               offset2 = amodule->code_end - amodule->code;
+                       offset2 = amodule->code_end - amodule->code;
                } else {
-                       offset2 = table [(pos + 1) * 2];
+                       g_assert (table [(pos + 1) * 2] != -1);
+                       offset2 = amodule->code_offsets [table [(pos + 1) * 2]];
                }
 
                if (offset < offset1)
@@ -2180,14 +2185,12 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
                        break;
        }
 
-       if (func_encoding == DW_EH_PE_absptr) {
-               code_start = (gpointer)(gsize)table [(pos * 2)];
-               code_end = (gpointer)(gsize)table [(pos * 2) + 2];
-       } else {
-               code_start = amodule->mono_eh_frame + table [(pos * 2)];
-               /* This won't overflow because there is +1 entry in the table */
-               code_end = amodule->mono_eh_frame + table [(pos * 2) + 2];
-       }
+       code_start = amodule->code + amodule->code_offsets [table [(pos * 2)]];
+       if (pos + 1 == fde_count)
+               /* End of table */
+               code_end = amodule->code_end;
+       else
+               code_end = amodule->code + amodule->code_offsets [table [(pos + 1) * 2]];
        code_len = code_end - code_start;
 
        g_assert (code >= code_start && code < code_end);
@@ -2983,6 +2986,9 @@ decode_patch (MonoAotModule *aot_module, MonoMemPool *mp, MonoJumpInfo *ji, guin
        case MONO_PATCH_INFO_SIGNATURE:
                ji->data.target = decode_signature (aot_module, p, &p);
                break;
+       case MONO_PATCH_INFO_TLS_OFFSET:
+               ji->data.target = GINT_TO_POINTER (decode_value (p, &p));
+               break;
        case MONO_PATCH_INFO_GSHAREDVT_CALL: {
                MonoJumpInfoGSharedVtCall *info = g_new0 (MonoJumpInfoGSharedVtCall, 1);
                info->sig = decode_signature (aot_module, p, &p);
@@ -2993,6 +2999,41 @@ decode_patch (MonoAotModule *aot_module, MonoMemPool *mp, MonoJumpInfo *ji, guin
                ji->data.target = info;
                break;
        }
+       case MONO_PATCH_INFO_GSHAREDVT_METHOD: {
+               MonoGSharedVtMethodInfo *info = g_new0 (MonoGSharedVtMethodInfo, 1);
+               int i, nentries;
+               
+               info->method = decode_resolve_method_ref (aot_module, p, &p);
+               g_assert (info->method);
+               nentries = decode_value (p, &p);
+               info->entries = g_ptr_array_new ();
+               for (i = 0; i < nentries; ++i) {
+                       MonoRuntimeGenericContextInfoTemplate *template = g_new0 (MonoRuntimeGenericContextInfoTemplate, 1);
+
+                       template->info_type = decode_value (p, &p);
+                       switch (mini_rgctx_info_type_to_patch_info_type (template->info_type)) {
+                       case MONO_PATCH_INFO_CLASS: {
+                               MonoClass *klass = decode_klass_ref (aot_module, p, &p);
+                               if (!klass)
+                                       goto cleanup;
+                               template->data = &klass->byval_arg;
+                               break;
+                       }
+                       case MONO_PATCH_INFO_FIELD:
+                               template->data = decode_field_info (aot_module, p, &p);
+                               if (!template->data)
+                                       goto cleanup;
+                               break;
+                       default:
+                               g_assert_not_reached ();
+                               break;
+                       }
+
+                       g_ptr_array_add (info->entries, template);
+               }
+               ji->data.target = info;
+               break;
+       }
        default:
                g_warning ("unhandled type %d", ji->type);
                g_assert_not_reached ();
@@ -3443,6 +3484,7 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method)
        g_assert (klass->inited);
 
        /* Find method index */
+       method_index = 0xffffff;
        if (method->is_inflated && !method->wrapper_type && mono_method_is_generic_sharable_full (method, FALSE, FALSE, FALSE)) {
                /* 
                 * For generic methods, we store the fully shared instance in place of the
index e65e30a203f73d038a0ead499237957e72e07157..9598aa735cb3f18b51138b53a1e4b028c811b285 100644 (file)
@@ -23,11 +23,18 @@ using System.Reflection;
  * the IL code looks.
  */
 
-class Tests {
-
+#if MOBILE
+class ArrayTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
        public static int Main (string[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
        
        public static int test_10_create () {
                int[] a = new int [10];
@@ -101,30 +108,31 @@ class Tests {
                return 0;
        }
 
-       private Int32[] m_array = new int [10];
-       
-       void setBit (int bitIndex, bool value) {
-               int index = bitIndex/32;
-               int shift = bitIndex%32;
+       class BitClass {
+               private Int32[] m_array = new int [10];
 
-               Int32 theBit = 1 << shift;
-               if (value)
-                       m_array[index] |= theBit;
-               else
-                       m_array[index] &= ~theBit;
-       }
-       
-       bool getBit (int bitIndex) {
-               int index = bitIndex/32;
-               int shift = bitIndex%32;
+               public void setBit (int bitIndex, bool value) {
+                       int index = bitIndex/32;
+                       int shift = bitIndex%32;
 
-               Int32 theBit = m_array[index] & (1 << shift);
-               return (theBit == 0) ? false : true;
+                       Int32 theBit = 1 << shift;
+                       if (value)
+                               m_array[index] |= theBit;
+                       else
+                               m_array[index] &= ~theBit;
+               }
+       
+               public bool getBit (int bitIndex) {
+                       int index = bitIndex/32;
+                       int shift = bitIndex%32;
 
+                       Int32 theBit = m_array[index] & (1 << shift);
+                       return (theBit == 0) ? false : true;
+               }
        }
        
        public static int test_1_bit_index () {
-               Tests t = new Tests ();
+               var t = new BitClass ();
                t.setBit (0, true);
                t.setBit (3, true);
                if (t.getBit (1))
@@ -499,10 +507,13 @@ class Tests {
                return y;
        }
 
+       class RefClass {
+       }
+
        public static int test_0_stelem_ref_null_opt () {
-               object[] arr = new Tests [1];
+               object[] arr = new RefClass [1];
 
-               arr [0] = new Tests ();
+               arr [0] = new RefClass ();
                arr [0] = null;
 
                return arr [0] == null ? 0 : 1;
index d6bd503a954367d02848eb1a58c9430118550352..41cb62405cb82a0137e5573c04d5d677786123a4 100644 (file)
@@ -23,11 +23,18 @@ using System.Reflection;
  * the IL code looks.
  */
 
-class Tests {
-
+#if MOBILE
+class CallsTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
        public static int Main (string[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
 
        static void dummy () {
        }
index bf8c50cb4221eb5183e03fca31a97fe1152f2cf3..9a48e772f13697afed6f587cb98679ede03cd4da 100644 (file)
@@ -26,11 +26,18 @@ using System.Reflection;
 /* A comparison made to same variable. */
 #pragma warning disable 1718
 
-class Tests {
-
+#if MOBILE
+class FloatTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
        public static int Main (string[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
        
        public static int test_0_beq () {
                double a = 2.0;
index 45c67fe2c3a49188bf9b38ccfa2b12d9f8f65d86..11fa4e1b63c5689398c243139bac281091b077aa 100644 (file)
@@ -23,11 +23,18 @@ using System.Reflection;
  * the IL code looks.
  */
 
-class Tests {
-
+#if MOBILE
+class LongTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
        public static int Main (string[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
 
        public static int test_10_simple_cast () {
                long a = 10;
index 4482c913af6f88513c7e0465b2f6b954ce78e6da..854b21e5868870a4ca21709eff65612f6bdfdcde 100644 (file)
@@ -23,11 +23,18 @@ using System.Reflection;
  * the IL code looks.
  */
 
-class Tests {
-
+#if MOBILE
+class MathTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
        public static int Main (string[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
        
        public static int test_0_sin_precision () {
                double d1 = Math.Sin (1);
index b9cf91347b2cf11ec9c5cbc8f0071809989fec5d..477af333e9b4a8401a8b6ec5ab4e7646e6044ac3 100644 (file)
@@ -23,11 +23,18 @@ using System.Reflection;
  * the IL code looks.
  */
 
-class Tests {
-
+#if MOBILE
+class BasicTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
        public static int Main (string[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
        
        public static int test_0_return () {
                return 0;
index e798aa6a51596194181020b80be6ed42aed57c47..6fdf39699bed4bf229d2e15f24304fcf0b5b2432 100644 (file)
@@ -292,6 +292,7 @@ amd64_set_xmmreg_r4: dest:f src1:f len:14 clob:m
 amd64_set_xmmreg_r8: dest:f src1:f len:14 clob:m
 amd64_save_sp_to_lmf: len:16
 tls_get: dest:i len:16
+tls_get_reg: dest:i src1:i len:20
 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
index ff241b62ed3e58529aa78f5d9d9626b2ce85b31b..d7d70f7aa5e19fd99d0e8f842fb513ec2b1ff796 100644 (file)
@@ -300,6 +300,7 @@ 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_reg: dest:i src1: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
index f82bf6a9d5f8749cf84513c7d8312a7a4ffd8c25..a8078869ae685e280d3a985d5c13bfdc84b8da1c 100644 (file)
@@ -154,10 +154,17 @@ write_variable (MonoInst *inst, MonoDebugVarInfo *var)
                var->index = inst->dreg | MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER;
        else if (inst->flags & MONO_INST_IS_DEAD)
                var->index = MONO_DEBUG_VAR_ADDRESS_MODE_DEAD;
-       else {
+       else if (inst->opcode == OP_REGOFFSET) {
                /* the debug interface needs fixing to allow 0(%base) address */
                var->index = inst->inst_basereg | MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET;
                var->offset = inst->inst_offset;
+       } else if (inst->opcode == OP_GSHAREDVT_ARG_REGOFFSET) {
+               var->index = inst->inst_basereg | MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR;
+               var->offset = inst->inst_offset;
+       } else if (inst->opcode == OP_GSHAREDVT_LOCAL) {
+               var->index = inst->inst_imm | MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL;
+       } else {
+               g_assert_not_reached ();
        }
 }
 
@@ -307,6 +314,13 @@ mono_debug_close_method (MonoCompile *cfg)
        for (i = 0; i < jit->num_params; i++)
                write_variable (cfg->args [i + sig->hasthis], &jit->params [i]);
 
+       if (cfg->gsharedvt_info_var) {
+               jit->gsharedvt_info_var = g_new0 (MonoDebugVarInfo, 1);
+               jit->gsharedvt_locals_var = g_new0 (MonoDebugVarInfo, 1);
+               write_variable (cfg->gsharedvt_info_var, jit->gsharedvt_info_var);
+               write_variable (cfg->gsharedvt_locals_var, jit->gsharedvt_locals_var);
+       }
+
        jit->num_line_numbers = info->line_numbers->len;
        jit->line_numbers = g_new0 (MonoDebugLineNumberEntry, jit->num_line_numbers);
 
@@ -468,8 +482,10 @@ serialize_variable (MonoDebugVarInfo *var, guint8 *p, guint8 **endbuf)
        case MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER:
                break;
        case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET:
+       case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
                encode_value (var->offset, p, &p);
                break;
+       case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
        case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
                break;
        default:
@@ -508,6 +524,14 @@ mono_debug_serialize_debug_info (MonoCompile *cfg, guint8 **out_buf, guint32 *bu
        for (i = 0; i < jit->num_locals; i++)
                serialize_variable (&jit->locals [i], p, &p);
 
+       if (jit->gsharedvt_info_var) {
+               encode_value (1, p, &p);
+               serialize_variable (jit->gsharedvt_info_var, p, &p);
+               serialize_variable (jit->gsharedvt_locals_var, p, &p);
+       } else {
+               encode_value (0, p, &p);
+       }
+
        encode_value (jit->num_line_numbers, p, &p);
 
        prev_offset = 0;
@@ -540,8 +564,10 @@ deserialize_variable (MonoDebugVarInfo *var, guint8 *p, guint8 **endbuf)
        case MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER:
                break;
        case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET:
+       case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
                var->offset = decode_value (p, &p);
                break;
+       case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
        case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
                break;
        default:
@@ -585,6 +611,13 @@ deserialize_debug_info (MonoMethod *method, guint8 *code_start, guint8 *buf, gui
        for (i = 0; i < jit->num_locals; i++)
                deserialize_variable (&jit->locals [i], p, &p);
 
+       if (decode_value (p, &p)) {
+               jit->gsharedvt_info_var = g_new0 (MonoDebugVarInfo, 1);
+               jit->gsharedvt_locals_var = g_new0 (MonoDebugVarInfo, 1);
+               deserialize_variable (jit->gsharedvt_info_var, p, &p);
+               deserialize_variable (jit->gsharedvt_locals_var, p, &p);
+       }
+
        jit->num_line_numbers = decode_value (p, &p);
        jit->line_numbers = g_new0 (MonoDebugLineNumberEntry, jit->num_line_numbers);
 
@@ -654,6 +687,12 @@ print_var_info (MonoDebugVarInfo *info, int idx, const char *name, const char *t
        case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET:
                g_print ("%s %s (%d) in memory: base register %s + %d\n", type, name, idx, mono_arch_regname (info->index & (~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS)), info->offset);
                break;
+       case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
+               g_print ("%s %s (%d) in indir memory: base register %s + %d\n", type, name, idx, mono_arch_regname (info->index & (~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS)), info->offset);
+               break;
+       case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
+               g_print ("%s %s (%d) gsharedvt local.\n", type, name, idx);
+               break;
        case MONO_DEBUG_VAR_ADDRESS_MODE_TWO_REGISTERS:
        default:
                g_assert_not_reached ();
index 1d74a7d9b01164aef249d73795c2dad668022eab..42c415e0e1064e2243c5dce4fb2140f30c8c6ae7 100644 (file)
@@ -74,6 +74,7 @@ int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/runtime.h>
 #include <mono/metadata/threadpool.h>
+#include <mono/metadata/verify-internals.h>
 #include <mono/utils/mono-semaphore.h>
 #include <mono/utils/mono-error-internals.h>
 #include <mono/utils/mono-stack-unwinding.h>
@@ -282,7 +283,7 @@ typedef struct {
 #define HEADER_LENGTH 11
 
 #define MAJOR_VERSION 2
-#define MINOR_VERSION 23
+#define MINOR_VERSION 24
 
 typedef enum {
        CMD_SET_VM = 1,
@@ -464,6 +465,7 @@ typedef enum {
        CMD_METHOD_GET_BODY = 7,
        CMD_METHOD_RESOLVE_TOKEN = 8,
        CMD_METHOD_GET_CATTRS = 9,
+       CMD_METHOD_MAKE_GENERIC_METHOD = 10
 } CmdMethod;
 
 typedef enum {
@@ -3473,6 +3475,7 @@ process_event (EventKind event, gpointer arg, gint32 il_offset, MonoContext *ctx
        GSList *l;
        MonoDomain *domain = mono_domain_get ();
        MonoThread *thread = NULL;
+       MonoObject *keepalive_obj = NULL;
        gboolean send_success = FALSE;
        static int ecount;
        int nevents;
@@ -3575,6 +3578,11 @@ process_event (EventKind event, gpointer arg, gint32 il_offset, MonoContext *ctx
                case EVENT_KIND_EXCEPTION: {
                        EventInfo *ei = arg;
                        buffer_add_objid (&buf, ei->exc);
+                       /*
+                        * We are not yet suspending, so get_objref () will not keep this object alive. So we need to do it
+                        * later after the suspension. (#12494).
+                        */
+                       keepalive_obj = ei->exc;
                        break;
                }
                case EVENT_KIND_USER_BREAK:
@@ -3616,6 +3624,10 @@ process_event (EventKind event, gpointer arg, gint32 il_offset, MonoContext *ctx
                 */
                save_thread_context (ctx);
                suspend_vm ();
+
+               if (keepalive_obj)
+                       /* This will keep this object alive */
+                       get_objref (keepalive_obj);
        }
 
        send_success = send_packet (CMD_SET_EVENT, CMD_COMPOSITE, &buf);
@@ -4873,6 +4885,8 @@ stop_single_stepping (void)
 
        if (val == 0)
                mono_arch_stop_single_stepping ();
+       if (ss_req != NULL)
+               ss_invoke_addr = NULL;
 #else
        g_assert_not_reached ();
 #endif
@@ -5751,11 +5765,11 @@ decode_value (MonoType *t, MonoDomain *domain, guint8 *addr, guint8 *buf, guint8
 }
 
 static void
-add_var (Buffer *buf, MonoType *t, MonoDebugVarInfo *var, MonoContext *ctx, MonoDomain *domain, gboolean as_vtype)
+add_var (Buffer *buf, MonoDebugMethodJitInfo *jit, MonoType *t, MonoDebugVarInfo *var, MonoContext *ctx, MonoDomain *domain, gboolean as_vtype)
 {
        guint32 flags;
        int reg;
-       guint8 *addr;
+       guint8 *addr, *gaddr;
        mgreg_t reg_val;
 
        flags = var->index & MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
@@ -5778,6 +5792,59 @@ add_var (Buffer *buf, MonoType *t, MonoDebugVarInfo *var, MonoContext *ctx, Mono
        case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
                NOT_IMPLEMENTED;
                break;
+       case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
+               /* Same as regoffset, but with an indirection */
+               addr = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+               addr += (gint32)var->offset;
+
+               gaddr = *(gpointer*)addr;
+               g_assert (gaddr);
+               buffer_add_value_full (buf, t, gaddr, domain, as_vtype);
+               break;
+       case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL: {
+               MonoDebugVarInfo *info_var = jit->gsharedvt_info_var;
+               MonoDebugVarInfo *locals_var = jit->gsharedvt_locals_var;
+               MonoGSharedVtMethodRuntimeInfo *info;
+               guint8 *locals;
+               int idx;
+
+               idx = reg;
+
+               g_assert (info_var);
+               g_assert (locals_var);
+
+               flags = info_var->index & MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
+               reg = info_var->index & ~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
+               if (flags == MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET) {
+                       addr = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+                       addr += (gint32)info_var->offset;
+                       info = *(gpointer*)addr;
+               } else if (flags == MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER) {
+                       info = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+               } else {
+                       g_assert_not_reached ();
+               }
+               g_assert (info);
+
+               flags = locals_var->index & MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
+               reg = locals_var->index & ~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
+               if (flags == MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET) {
+                       addr = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+                       addr += (gint32)locals_var->offset;
+                       locals = *(gpointer*)addr;
+               } else if (flags == MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER) {
+                       locals = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+               } else {
+                       g_assert_not_reached ();
+               }
+               g_assert (locals);
+
+               addr = locals + GPOINTER_TO_INT (info->entries [idx]);
+
+               buffer_add_value_full (buf, t, addr, domain, as_vtype);
+               break;
+       }
+
        default:
                g_assert_not_reached ();
        }
@@ -5788,7 +5855,7 @@ set_var (MonoType *t, MonoDebugVarInfo *var, MonoContext *ctx, MonoDomain *domai
 {
        guint32 flags;
        int reg, size;
-       guint8 *addr;
+       guint8 *addr, *gaddr;
 
        flags = var->index & MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
        reg = var->index & ~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
@@ -5862,6 +5929,16 @@ set_var (MonoType *t, MonoDebugVarInfo *var, MonoContext *ctx, MonoDomain *domai
                // FIXME: Write barriers
                mono_gc_memmove (addr, val, size);
                break;
+       case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
+               /* Same as regoffset, but with an indirection */
+               addr = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+               addr += (gint32)var->offset;
+
+               gaddr = *(gpointer*)addr;
+               g_assert (gaddr);
+               // FIXME: Write barriers
+               mono_gc_memmove (gaddr, val, size);
+               break;
        case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
                NOT_IMPLEMENTED;
                break;
@@ -6470,7 +6547,8 @@ vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf)
                        while (suspend_count > 0)
                                resume_vm ();
 
-                       mono_runtime_shutdown ();
+                       if (!mono_runtime_try_shutdown ())
+                               break;
 
                        /* Suspend all managed threads since the runtime is going away */
                        DEBUG(1, fprintf (log_file, "Suspending all threads...\n"));
@@ -8084,6 +8162,40 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
                buffer_add_cattrs (buf, domain, method->klass->image, attr_klass, cinfo);
                break;
        }
+       case CMD_METHOD_MAKE_GENERIC_METHOD: {
+               MonoType **type_argv;
+               int i, type_argc;
+               MonoDomain *d;
+               MonoClass *klass;
+               MonoGenericInst *ginst;
+               MonoGenericContext tmp_context;
+               MonoMethod *inflated;
+
+               type_argc = decode_int (p, &p, end);
+               type_argv = g_new0 (MonoType*, type_argc);
+               for (i = 0; i < type_argc; ++i) {
+                       klass = decode_typeid (p, &p, end, &d, &err);
+                       if (err) {
+                               g_free (type_argv);
+                               return err;
+                       }
+                       if (domain != d) {
+                               g_free (type_argv);
+                               return ERR_INVALID_ARGUMENT;
+                       }
+                       type_argv [i] = &klass->byval_arg;
+               }
+               ginst = mono_metadata_get_generic_inst (type_argc, type_argv);
+               g_free (type_argv);
+               tmp_context.class_inst = method->klass->generic_class ? method->klass->generic_class->context.class_inst : NULL;
+               tmp_context.method_inst = ginst;
+
+               inflated = mono_class_inflate_generic_method (method, &tmp_context);
+               if (!mono_verifier_is_method_valid_generic_instantiation (inflated))
+                       return ERR_INVALID_ARGUMENT;
+               buffer_add_methodid (buf, domain, inflated);
+               break;
+       }
        default:
                return ERR_NOT_IMPLEMENTED;
        }
@@ -8253,8 +8365,7 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
        frame = tls->frames [frame_idx];
 
        if (!frame->has_ctx)
-               // FIXME:
-               return ERR_INVALID_FRAMEID;
+               return ERR_ABSENT_INFORMATION;
 
        if (!frame->jit) {
                frame->jit = mono_debug_find_method (frame->api_method, frame->domain);
@@ -8295,13 +8406,13 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
 
                                var = &jit->params [pos];
 
-                               add_var (buf, sig->params [pos], &jit->params [pos], &frame->ctx, frame->domain, FALSE);
+                               add_var (buf, jit, sig->params [pos], &jit->params [pos], &frame->ctx, frame->domain, FALSE);
                        } else {
                                g_assert (pos >= 0 && pos < jit->num_locals);
 
                                var = &jit->locals [pos];
                                
-                               add_var (buf, header->locals [pos], &jit->locals [pos], &frame->ctx, frame->domain, FALSE);
+                               add_var (buf, jit, header->locals [pos], &jit->locals [pos], &frame->ctx, frame->domain, FALSE);
                        }
                }
                mono_metadata_free_mh (header);
@@ -8313,14 +8424,14 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
                                MonoObject *p = NULL;
                                buffer_add_value (buf, &mono_defaults.object_class->byval_arg, &p, frame->domain);
                        } else {
-                               add_var (buf, &frame->actual_method->klass->this_arg, jit->this_var, &frame->ctx, frame->domain, TRUE);
+                               add_var (buf, jit, &frame->actual_method->klass->this_arg, jit->this_var, &frame->ctx, frame->domain, TRUE);
                        }
                } else {
                        if (!sig->hasthis) {
                                MonoObject *p = NULL;
                                buffer_add_value (buf, &frame->actual_method->klass->byval_arg, &p, frame->domain);
                        } else {
-                               add_var (buf, &frame->api_method->klass->byval_arg, jit->this_var, &frame->ctx, frame->domain, TRUE);
+                               add_var (buf, jit, &frame->api_method->klass->byval_arg, jit->this_var, &frame->ctx, frame->domain, TRUE);
                        }
                }
                break;
@@ -8839,7 +8950,7 @@ debugger_thread (void *arg)
                g_free (data);
                buffer_free (&buf);
 
-               if (command_set == CMD_SET_VM && command == CMD_VM_DISPOSE)
+               if (command_set == CMD_SET_VM && (command == CMD_VM_DISPOSE || command == CMD_VM_EXIT))
                        break;
        }
 
index b7574c1e7b45270159751278888efeb023a84e77..fc2cb65ff87f606b9b18c181925b397295c66a49 100644 (file)
@@ -1383,7 +1383,33 @@ mono_set_use_smp (int use_smp)
        }
 #endif
 }
-       
+
+static void
+switch_gc (char* argv[], const char* target_gc)
+{
+       GString *path;
+
+       if (!strcmp (mono_gc_get_gc_name (), target_gc)) {
+               return;
+       }
+
+       path = g_string_new (argv [0]);
+
+       /*Running mono without any argument*/
+       if (strstr (argv [0], "-sgen"))
+               g_string_truncate (path, path->len - 5);
+       else if (strstr (argv [0], "-boehm"))
+               g_string_truncate (path, path->len - 6);
+
+       g_string_append_c (path, '-');
+       g_string_append (path, target_gc);
+
+#ifdef HAVE_EXECVP
+       execvp (path->str, argv);
+#else
+       fprintf (stderr, "Error: --gc=<NAME> option not supported on this platform.\n");
+#endif
+}
 
 /**
  * mono_main:
@@ -1505,32 +1531,9 @@ mono_main (int argc, char* argv[])
                } else if (strncmp (argv [i], "-O=", 3) == 0) {
                        opt = parse_optimizations (argv [i] + 3);
                } else if (strcmp (argv [i], "--gc=sgen") == 0) {
-                       if (!strcmp (mono_gc_get_gc_name (), "boehm")) {
-                               GString *path = g_string_new (argv [0]);
-                               g_string_append (path, "-sgen");
-                               argv [0] = path->str;
-#ifdef HAVE_EXECVP
-                               execvp (path->str, argv);
-#else
-                               fprintf (stderr, "Error: --gc=<NAME> option not supported on this platform.\n");
-#endif
-                       }
+                       switch_gc (argv, "sgen");
                } else if (strcmp (argv [i], "--gc=boehm") == 0) {
-                       if (!strcmp (mono_gc_get_gc_name (), "sgen")) {
-                               char *copy = g_strdup (argv [0]);
-                               char *p = strstr (copy, "-sgen");
-                               if (p == NULL){
-                                       fprintf (stderr, "Error, this process is not named mono-sgen and the command line option --boehm was passed");
-                                       exit (1);
-                               }
-                               *p = 0;
-                               argv [0] = p;
-#ifdef HAVE_EXECVP
-                               execvp (p, argv);
-#else
-                               fprintf (stderr, "Error: --gc=<NAME> option not supported on this platform.\n");
-#endif
-                       }
+                       switch_gc (argv, "boehm");
                } else if (strcmp (argv [i], "--config") == 0) {
                        if (i +1 >= argc){
                                fprintf (stderr, "error: --config requires a filename argument\n");
index 2f216dda226e0456f03c6df7c38fda188a367ed3..ae72268f8d85d3870460532186f262c540e4e113 100644 (file)
@@ -73,7 +73,7 @@ emit_line_number_info (MonoDwarfWriter *w, MonoMethod *method,
  * debug information.
  */
 MonoDwarfWriter*
-mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_start_line, gboolean appending)
+mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_start_line, gboolean appending, gboolean emit_line_numbers)
 {
        MonoDwarfWriter *w = g_new0 (MonoDwarfWriter, 1);
        
@@ -105,6 +105,11 @@ mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_st
                w->collect_line_info = TRUE;
        }
 
+       if (!emit_line_numbers) {
+               w->emit_line = FALSE;
+               w->collect_line_info = FALSE;
+       }
+
        w->fp = img_writer_get_fp (w->w);
        w->temp_prefix = img_writer_get_temp_label_prefix (w->w);
 
@@ -1732,6 +1737,7 @@ emit_line_number_info (MonoDwarfWriter *w, MonoMethod *method,
                        //printf ("FIRST: %d %d %d\n", prev_line, loc->row, il_offset);
                        emit_sleb128 (w, (gint32)loc->row - (gint32)prev_line);
                        prev_line = loc->row;
+                       prev_native_offset = i;
                        first = FALSE;
                }
 
index a6b30ec25138f0e987c6dbb9c7105318271b4bbf..37927826dad9305977991164d50382756123a7ae 100644 (file)
@@ -20,7 +20,7 @@
 
 typedef struct _MonoDwarfWriter MonoDwarfWriter;
 
-MonoDwarfWriter* mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_start_line, gboolean appending) MONO_INTERNAL;
+MonoDwarfWriter* mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_start_line, gboolean appending, gboolean emit_line_numbers) MONO_INTERNAL;
 
 void mono_dwarf_writer_destroy (MonoDwarfWriter *w) MONO_INTERNAL;
 
index 9c69c9b9f40f36aeb293f0fdb74374d7df0d34a2..17a70af71b8e3324bbfe69eb4b15f3a1d7694cd0 100644 (file)
@@ -5,8 +5,12 @@ using System.Runtime.CompilerServices;
 using System.Threading;
 using System.Threading.Tasks;
 
-class Tests {
-
+#if MOBILE
+class GenericsTests
+#else
+class Tests
+#endif
+{
        struct TestStruct {
                public int i;
                public int j;
@@ -17,6 +21,7 @@ class Tests {
                }
        }
 
+#if !MOBILE
        class Enumerator <T> : MyIEnumerator <T> {
                T MyIEnumerator<T>.Current {
                        get {
@@ -34,11 +39,14 @@ class Tests {
                        return true;
                }
        }
+#endif
 
+#if !MOBILE
        static int Main (string[] args)
        {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
 
        public static int test_1_nullable_unbox ()
        {
@@ -183,7 +191,11 @@ class Tests {
        public static int test_0_constrained_vtype_box () {
                GenericClass<TestStruct> t = new GenericClass<TestStruct> ();
 
+#if MOBILE
+               return t.toString (new TestStruct ()) == "GenericsTests+TestStruct" ? 0 : 1;
+#else
                return t.toString (new TestStruct ()) == "Tests+TestStruct" ? 0 : 1;
+#endif
        }
 
        public static int test_0_constrained_vtype () {
@@ -389,6 +401,7 @@ class Tests {
                return 0;
        }
 
+#if !MOBILE
        public static int test_0_variance_reflection () {
                // covariance on IEnumerator
                if (!typeof (MyIEnumerator<object>).IsAssignableFrom (typeof (MyIEnumerator<string>)))
@@ -411,9 +424,10 @@ class Tests {
                        return 6;
                return 0;
        }
+#endif
 
        public static int test_0_ldvirtftn_generic_method () {
-               new Tests ().ldvirtftn<string> ();              
+               new GenericsTests ().ldvirtftn<string> ();
 
                return the_type == typeof (string) ? 0 : 1;
        }
@@ -544,8 +558,8 @@ class Tests {
 
        /* Test that treating arrays as generic collections works with full-aot */
        public static int test_0_fullaot_array_wrappers () {
-               Tests[] arr = new Tests [10];
-               enumerate<Tests> (arr);
+               GenericsTests[] arr = new GenericsTests [10];
+               enumerate<GenericsTests> (arr);
                return 0;
        }
 
@@ -678,9 +692,9 @@ class Tests {
        }
 
        public static int test_0_full_aot_nullable_unbox_from_gshared_code () {
-               if (!new Tests ().IsNull2<FooStruct> (null))
+               if (!new GenericsTests ().IsNull2<FooStruct> (null))
                        return 1;
-               if (new Tests ().IsNull2<FooStruct> (new FooStruct ()))
+               if (new GenericsTests ().IsNull2<FooStruct> (new FooStruct ()))
                        return 2;
                return 0;
        }
@@ -688,11 +702,11 @@ class Tests {
        public static int test_0_partial_sharing () {
                if (PartialShared1 (new List<string> (), 1) != typeof (string))
                        return 1;
-               if (PartialShared1 (new List<Tests> (), 1) != typeof (Tests))
+               if (PartialShared1 (new List<GenericsTests> (), 1) != typeof (GenericsTests))
                        return 2;
                if (PartialShared2 (new List<string> (), 1) != typeof (int))
                        return 3;
-               if (PartialShared2 (new List<Tests> (), 1) != typeof (int))
+               if (PartialShared2 (new List<GenericsTests> (), 1) != typeof (int))
                        return 4;
                return 0;
        }
@@ -1052,3 +1066,9 @@ class Tests {
        }
 #endif
 }
+
+#if !MOBILE
+class GenericsTests : Tests
+{
+}
+#endif
index 5889d6792b8e1266bce15f038f30be3766bd6b1a..300965b5b2fd8687664140b4df092e5ad2ae4565 100644 (file)
@@ -3,7 +3,7 @@ using System.Collections.Generic;
 using System.Runtime.CompilerServices;
 
 struct Foo {
-       public int i, j;
+       public int i, j, k, l, m, n;
 }
 
 struct GFoo<T> {
@@ -40,11 +40,17 @@ class GFoo3<T> {
 
 // FIXME: Add mixed ref/noref tests, i.e. Dictionary<string, int>
 
+#if MOBILE
+public class GSharedTests
+#else
 public class Tests
+#endif
 {
+#if !MOBILE
        public static int Main (String[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
 
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        static void gshared<T> (T [] array, int i, int j) {
@@ -173,6 +179,9 @@ public class Tests
        }
 
        public static int test_0_vt_unbox_any () {
+               int[] iarr = new int [16];
+               unbox_any<int> (iarr, new object [] { 12 });
+
                Foo[] arr = new Foo [2];
 
                object[] arr2 = new object [16];
@@ -405,7 +414,7 @@ public class Tests
                var v2 = return_t<GFoo2<int>> (v);
                if (v2.t != 55 || v2.t2 != 32)
                        return 6;
-               i = new Tests ().return_this_t<int> (42);
+               i = new GSharedTests ().return_this_t<int> (42);
                if (i != 42)
                        return 7;
                return 0;
@@ -650,6 +659,10 @@ public class Tests
                return 0;
        }
 
+       interface IFaceKVP {
+               T do_kvp<T> (T a);
+       }
+
        static KeyValuePair<T1, T2> make_kvp<T1, T2> (T1 t1, T2 t2) {
                return new KeyValuePair<T1, T2> (t1, t2);
        }
@@ -657,16 +670,18 @@ public class Tests
        static T2 use_kvp<T1, T2> (KeyValuePair<T1, T2> kvp) {
                return kvp.Value;
        }
-               
-       [MethodImplAttribute (MethodImplOptions.NoInlining)]
-       static T do_kvp<T> (T a) {
-               var t = make_kvp (a, a);
-               // argument is an instance of a vtype instantiated with gsharedvt type arguments
-               return use_kvp (t);
+
+       class ClassKVP : IFaceKVP {
+               public T do_kvp<T> (T a) {
+                       var t = make_kvp (a, a);
+                       // argument is an instance of a vtype instantiated with gsharedvt type arguments
+                       return use_kvp (t);
+               }
        }
 
        public static int test_0_gsharedvt_ginstvt_constructed_arg () {
-               if (do_kvp<long> (1) != 1)
+               IFaceKVP c = new ClassKVP ();
+               if (c.do_kvp<long> (1) != 1)
                        return 1;
                return 0;
        }
@@ -897,11 +912,17 @@ public class Tests
                return t.ToString ();
        }
 
+       enum AnEnum {
+               One
+       };
+
        public static int test_0_constrained_tostring () {
                if (to_string<int, int> (1, 1) != "1")
                        return 1;
-               if (to_string<string, int> ("A", 1) != "A")
+               if (to_string<AnEnum, int> (AnEnum.One, 1) != "One")
                        return 2;
+               if (to_string<string, int> ("A", 1) != "A")
+                       return 3;
                return 0;
        }
 
@@ -915,8 +936,27 @@ public class Tests
                        return 1;
                if (get_hash<double, int> (1.0, 1) != 1.0.GetHashCode ())
                        return 2;
+               if (get_hash<AnEnum, int> (AnEnum.One, 1) != AnEnum.One.GetHashCode ())
+                       return 3;
                if (get_hash<string, int> ("A", 1) != "A".GetHashCode ())
+                       return 4;
+               return 0;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       static bool equals<T, T2>(T t, T2 t2) {
+               return t.Equals (t);
+       }
+
+       public static int test_0_constrained_equals () {
+               if (equals<int, int> (1, 1) != true)
+                       return 1;
+               if (equals<double, int> (1.0, 1) != true)
+                       return 2;
+               if (equals<AnEnum, int> (AnEnum.One, 1) != true)
                        return 3;
+               if (equals<string, int> ("A", 1) != true)
+                       return 4;
                return 0;
        }
 
@@ -1119,4 +1159,61 @@ public class Tests
        TAbstractTableItem<object>.Test ();
           return 0;
        }
+
+       interface IFaceBox {
+               object box<T> (T t);
+       }
+
+       class ClassBox : IFaceBox {
+               public object box<T> (T t) {
+                       object o = t;
+                       return o;
+               }
+       }
+
+       public static int test_0_nullable_box () {
+               IFaceBox c = new ClassBox ();
+               int i = 5;
+               object o = c.box<int?> (i);
+               if ((int)o != i)
+                       return 1;
+               if (c.box<int?> (null) != null)
+                       return 2;
+               long l = Int64.MaxValue - 1;
+               o = c.box<long?> (l);
+               if ((long)o != l)
+                       return 3;
+               if (c.box<long?> (null) != null)
+                       return 4;
+               string s = "A";
+               if (c.box<string> (s) != (object)s)
+                       return 5;
+               return 0;
+       }
+
+       interface IFaceUnbox2 {
+               T unbox<T> (object o);
+       }
+
+       class ClassUnbox2 : IFaceUnbox2 {
+               public T unbox<T> (object o) {
+                       return (T)o;
+               }
+       }
+
+       public static int test_0_nullable_unbox () {    
+               IFaceUnbox2 c = new ClassUnbox2 ();
+               int? i = c.unbox<int?> (5);
+               if (i != 5)
+                       return 1;
+               int? j = c.unbox<int?> (null);
+               if (j != null)
+                       return 2;
+               return 0;
+       }
+}
+
+#if !MOBILE
+public class GSharedTests : Tests {
 }
+#endif
index 44f5df686264554a53f3753fd4be808b9fa87f14..b90c5a536a9cd0d2a38b8e590c81233b23ce8a8e 100644 (file)
@@ -263,6 +263,15 @@ alloc_dreg (MonoCompile *cfg, MonoStackType stack_type)
 
 #define NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL)
 
+#define NEW_TLS_OFFSETCONST(cfg,dest,key) do { \
+       if (cfg->compile_aot) { \
+               NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_TLS_OFFSET, GINT_TO_POINTER (key)); \
+       } else {                                                                                                                        \
+               int _offset = mini_get_tls_offset ((key));                                                      \
+               NEW_PCONST ((cfg), (dest), GINT_TO_POINTER (_offset)); \
+               } \
+       } while (0)
+
 #define NEW_DECLSECCONST(cfg,dest,image,entry) do { \
                if (cfg->compile_aot) { \
                        NEW_AOTCONST_TOKEN (cfg, dest, MONO_PATCH_INFO_DECLSEC, image, (entry).index, NULL, STACK_OBJ, NULL); \
@@ -311,6 +320,20 @@ alloc_dreg (MonoCompile *cfg, MonoStackType stack_type)
 #define DECOMPOSE_INTO_REGPAIR(stack_type) ((stack_type) == STACK_I8)
 #endif
 
+static inline void
+handle_gsharedvt_ldaddr (MonoCompile *cfg)
+{
+       /* The decomposition of ldaddr makes use of these two variables, so add uses for them */
+       MonoInst *use;
+
+       MONO_INST_NEW (cfg, use, OP_DUMMY_USE);
+       use->sreg1 = cfg->gsharedvt_info_var->dreg;
+       MONO_ADD_INS (cfg->cbb, use);
+       MONO_INST_NEW (cfg, use, OP_DUMMY_USE);
+       use->sreg1 = cfg->gsharedvt_locals_var->dreg;
+       MONO_ADD_INS (cfg->cbb, use);
+}
+
 #define NEW_VARLOADA(cfg,dest,var,vartype) do {        \
         MONO_INST_NEW ((cfg), (dest), OP_LDADDR); \
                (dest)->inst_p0 = (var); \
@@ -318,6 +341,7 @@ alloc_dreg (MonoCompile *cfg, MonoStackType stack_type)
                (dest)->type = STACK_MP;        \
                (dest)->klass = (var)->klass;   \
         (dest)->dreg = alloc_dreg ((cfg), STACK_MP); \
+                         if (G_UNLIKELY (cfg->gsharedvt) && mini_is_gsharedvt_variable_type ((cfg), (var)->inst_vtype)) { handle_gsharedvt_ldaddr ((cfg)); } \
                if (SIZEOF_REGISTER == 4 && DECOMPOSE_INTO_REGPAIR ((var)->type)) { MonoInst *var1 = get_vreg_to_inst (cfg, (var)->dreg + 1); MonoInst *var2 = get_vreg_to_inst (cfg, (var)->dreg + 2); g_assert (var1); g_assert (var2); var1->flags |= MONO_INST_INDIRECT; var2->flags |= MONO_INST_INDIRECT; } \
        } while (0)
 
@@ -428,6 +452,8 @@ alloc_dreg (MonoCompile *cfg, MonoStackType stack_type)
 
 #define EMIT_NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
 
+#define EMIT_NEW_TLS_OFFSETCONST(cfg,dest,key) do { NEW_TLS_OFFSETCONST ((cfg), (dest), (key)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
+
 #define EMIT_NEW_DOMAINCONST(cfg,dest) do { NEW_DOMAINCONST ((cfg), (dest)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
 
 #define EMIT_NEW_DECLSECCONST(cfg,dest,image,entry) do { NEW_DECLSECCONST ((cfg), (dest), (image), (entry)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
index 0b1f2e2662949ab62a45cb485ffedbbdadff0e1b..78db84f7fd30d03c011f17c5c2a892dd2a1c044b 100644 (file)
@@ -1154,22 +1154,42 @@ mono_get_native_calli_wrapper (MonoImage *image, MonoMethodSignature *sig, gpoin
        return mono_compile_method (m);
 }
 
-MonoObject*
-mono_object_tostring_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass)
+static MonoMethod*
+constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gpointer *this_arg)
 {
        MonoMethod *m;
        int vt_slot;
-       gpointer this_arg;
 
        /* Lookup the virtual method */
        mono_class_setup_vtable (klass);
        g_assert (klass->vtable);
        vt_slot = mono_method_get_vtable_slot (cmethod);
        m = klass->vtable [vt_slot];
-       if (klass->valuetype)
-               this_arg = mp;
+       if (klass->valuetype && (m->klass == mono_defaults.object_class || m->klass == mono_defaults.enum_class->parent || m->klass == mono_defaults.enum_class))
+               /*
+                * Calling a non-vtype method with a vtype receiver, has to box.
+                */
+               *this_arg = mono_value_box (mono_domain_get (), klass, mp);
+       else if (klass->valuetype)
+               /*
+                * Calling a vtype method with a vtype receiver
+                */
+               *this_arg = mp;
        else
-               this_arg = *(gpointer*)mp;
+               /*
+                * Calling a non-vtype method
+                */
+               *this_arg = *(gpointer*)mp;
+       return m;
+}
+
+MonoObject*
+mono_object_tostring_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass)
+{
+       MonoMethod *m;
+       gpointer this_arg;
+
+       m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
        return mono_runtime_invoke (m, this_arg, NULL, NULL);
 }
 
@@ -1177,23 +1197,39 @@ int
 mono_object_gethashcode_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass)
 {
        MonoMethod *m;
-       int vt_slot;
        gpointer this_arg;
        MonoObject *res;
        gpointer p;
 
-       /* Lookup the virtual method */
-       mono_class_setup_vtable (klass);
-       g_assert (klass->vtable);
-       vt_slot = mono_method_get_vtable_slot (cmethod);
-       m = klass->vtable [vt_slot];
-       if (klass->valuetype)
-               this_arg = mp;
-       else
-               this_arg = *(gpointer*)mp;
+       m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
        // FIXME: This boxes the result
        res = mono_runtime_invoke (m, this_arg, NULL, NULL);
        p = mono_object_unbox (res);
        return *(int*)p;
 }
 
+MonoBoolean
+mono_object_equals_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass, MonoObject *arg)
+{
+       MonoMethod *m;
+       gpointer this_arg;
+       MonoObject *res;
+       gpointer p;
+       void **args;
+
+       m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
+       // FIXME: This boxes the result
+       args = (void**)&arg;
+       res = mono_runtime_invoke (m, this_arg, args, NULL);
+       p = mono_object_unbox (res);
+       return *(MonoBoolean*)p;
+}
+
+void
+mono_gsharedvt_value_copy (gpointer dest, gpointer src, MonoClass *klass)
+{
+       if (klass->valuetype)
+               mono_value_copy (dest, src, klass);
+       else
+        mono_gc_wbarrier_generic_store (dest, *(MonoObject**)src);
+}
index 04e6d44f9c24839ff755b9f2c6ee2db46419b640..29dc8e516fcaafcb065b05695e8483ebf1822aaf 100644 (file)
@@ -179,5 +179,9 @@ MonoObject* mono_object_tostring_gsharedvt (gpointer mp, MonoMethod *cmethod, Mo
 
 int mono_object_gethashcode_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass) MONO_INTERNAL;
 
+MonoBoolean mono_object_equals_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass, MonoObject *arg) MONO_INTERNAL;
+
+void mono_gsharedvt_value_copy (gpointer dest, gpointer src, MonoClass *klass) MONO_INTERNAL;
+
 #endif /* __MONO_JIT_ICALLS_H__ */
 
diff --git a/mono/mini/main-sgen.c b/mono/mini/main-sgen.c
new file mode 100644 (file)
index 0000000..8c7190e
--- /dev/null
@@ -0,0 +1,5 @@
+
+#include "buildver-sgen.h"
+#define BUILDVER_INCLUDED
+
+#include "main.c"
index 808dda0c2fa3cc7811cb561cce25921abc1d1ed6..dc7c826443295b371c89f275608d4d0d46a88a89 100644 (file)
@@ -1,10 +1,8 @@
 #include <config.h>
 #include "mini.h"
 #ifndef HOST_WIN32
-#ifdef HAVE_SGEN_GC
-#include "buildver-sgen.h"
-#else
-#include "buildver.h"
+#ifndef BUILDVER_INCLUDED
+#include "buildver-boehm.h"
 #endif
 #endif
 
index 51b5e52937d2184c2c2cc76757257756d05190ad..83c7262caaea572b954101639876ecad5c0f3b8d 100644 (file)
@@ -1916,6 +1916,10 @@ handle_enum:
        case MONO_TYPE_GENERICINST:
                type = &type->data.generic_class->container_class->byval_arg;
                goto handle_enum;
+       case MONO_TYPE_VAR:
+       case MONO_TYPE_MVAR:
+               /* gsharedvt */
+               return calli? OP_VCALL_REG: virt? OP_VCALLVIRT: OP_VCALL;
        default:
                g_error ("unknown type 0x%02x in ret_type_to_call_opcode", type->type);
        }
@@ -2126,7 +2130,12 @@ handle_enum:
                case MONO_TYPE_GENERICINST:
                        simple_type = &simple_type->data.generic_class->container_class->byval_arg;
                        goto handle_enum;
-
+               case MONO_TYPE_VAR:
+               case MONO_TYPE_MVAR:
+                       /* gsharedvt */
+                       if (args [i]->type != STACK_VTYPE)
+                               return 1;
+                       continue;
                default:
                        g_error ("unknown type 0x%02x in check_call_signature",
                                 simple_type->type);
@@ -2263,6 +2272,66 @@ mini_method_check_context_used (MonoCompile *cfg, MonoMethod *method)
                return 0;
 }
 
+/*
+ * check_method_sharing:
+ *
+ *   Check whenever the vtable or an mrgctx needs to be passed when calling CMETHOD.
+ */
+static void
+check_method_sharing (MonoCompile *cfg, MonoMethod *cmethod, gboolean *out_pass_vtable, gboolean *out_pass_mrgctx)
+{
+       gboolean pass_vtable = FALSE;
+       gboolean pass_mrgctx = FALSE;
+
+       if (((cmethod->flags & METHOD_ATTRIBUTE_STATIC) || cmethod->klass->valuetype) &&
+               (cmethod->klass->generic_class || cmethod->klass->generic_container)) {
+               gboolean sharable = FALSE;
+
+               if (mono_method_is_generic_sharable (cmethod, TRUE)) {
+                       sharable = TRUE;
+               } else {
+                       gboolean sharing_enabled = mono_class_generic_sharing_enabled (cmethod->klass);
+                       MonoGenericContext *context = mini_class_get_context (cmethod->klass);
+                       gboolean context_sharable = mono_generic_context_is_sharable (context, TRUE);
+
+                       sharable = sharing_enabled && context_sharable;
+               }
+
+               /*
+                * Pass vtable iff target method might
+                * be shared, which means that sharing
+                * is enabled for its class and its
+                * context is sharable (and it's not a
+                * generic method).
+                */
+               if (sharable && !(mini_method_get_context (cmethod) && mini_method_get_context (cmethod)->method_inst))
+                       pass_vtable = TRUE;
+       }
+
+       if (mini_method_get_context (cmethod) &&
+               mini_method_get_context (cmethod)->method_inst) {
+               g_assert (!pass_vtable);
+
+               if (mono_method_is_generic_sharable (cmethod, TRUE)) {
+                       pass_mrgctx = TRUE;
+               } else {
+                       gboolean sharing_enabled = mono_class_generic_sharing_enabled (cmethod->klass);
+                       MonoGenericContext *context = mini_method_get_context (cmethod);
+                       gboolean context_sharable = mono_generic_context_is_sharable (context, TRUE);
+
+                       if (sharing_enabled && context_sharable)
+                               pass_mrgctx = TRUE;
+                       if (cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, mono_method_signature (cmethod)))
+                               pass_mrgctx = TRUE;
+               }
+       }
+
+       if (out_pass_vtable)
+               *out_pass_vtable = pass_vtable;
+       if (out_pass_mrgctx)
+               *out_pass_mrgctx = pass_mrgctx;
+}
+
 inline static MonoCallInst *
 mono_emit_call_args (MonoCompile *cfg, MonoMethodSignature *sig, 
                                         MonoInst **args, int calli, int virtual, int tail, int rgctx, int unbox_trampoline)
@@ -2404,13 +2473,16 @@ mono_emit_calli (MonoCompile *cfg, MonoMethodSignature *sig, MonoInst **args, Mo
        return (MonoInst*)call;
 }
 
+static MonoInst*
+emit_get_gsharedvt_info_klass (MonoCompile *cfg, MonoClass *klass, MonoRgctxInfoType rgctx_type);
+
 static MonoInst*
 emit_get_rgctx_method (MonoCompile *cfg, int context_used, MonoMethod *cmethod, MonoRgctxInfoType rgctx_type);
 static MonoInst*
 emit_get_rgctx_klass (MonoCompile *cfg, int context_used, MonoClass *klass, MonoRgctxInfoType rgctx_type);
 
 static MonoInst*
-mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSignature *sig,
+mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSignature *sig, gboolean tail,
                                                        MonoInst **args, MonoInst *this, MonoInst *imt_arg, MonoInst *rgctx_arg)
 {
 #ifndef DISABLE_REMOTING
@@ -2423,6 +2495,9 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
        int rgctx_reg = 0;
        gboolean need_unbox_trampoline;
 
+       if (!sig)
+               sig = mono_method_signature (method);
+
        if (rgctx_arg) {
                rgctx_reg = mono_alloc_preg (cfg);
                MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, rgctx_reg, rgctx_arg->dreg);
@@ -2457,7 +2532,7 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
 
        need_unbox_trampoline = method->klass == mono_defaults.object_class || (method->klass->flags & TYPE_ATTRIBUTE_INTERFACE);
 
-       call = mono_emit_call_args (cfg, sig, args, FALSE, virtual, FALSE, rgctx_arg ? TRUE : FALSE, need_unbox_trampoline);
+       call = mono_emit_call_args (cfg, sig, args, FALSE, virtual, tail, rgctx_arg ? TRUE : FALSE, need_unbox_trampoline);
 
 #ifndef DISABLE_REMOTING
        if (might_be_remote)
@@ -2467,14 +2542,15 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
                call->method = method;
        call->inst.flags |= MONO_INST_HAS_METHOD;
        call->inst.inst_left = this;
+       call->tail_call = tail;
 
        if (virtual) {
                int vtable_reg, slot_reg, this_reg;
+               int offset;
 
                this_reg = this->dreg;
 
-#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
-               if ((method->klass->parent == mono_defaults.multicastdelegate_class) && (!strcmp (method->name, "Invoke"))) {
+               if (ARCH_HAVE_DELEGATE_TRAMPOLINES && (method->klass->parent == mono_defaults.multicastdelegate_class) && !strcmp (method->name, "Invoke")) {
                        MonoInst *dummy_use;
 
                        MONO_EMIT_NULL_CHECK (cfg, this_reg);
@@ -2501,7 +2577,6 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
 
                        return (MonoInst*)call;
                }
-#endif
 
                if ((!cfg->compile_aot || enable_for_aot) && 
                        (!(method->flags & METHOD_ATTRIBUTE_VIRTUAL) || 
@@ -2547,17 +2622,17 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
                                        guint32 imt_slot = mono_method_get_imt_slot (method);
                                        emit_imt_argument (cfg, call, call->method, imt_arg);
                                        slot_reg = vtable_reg;
-                                       call->inst.inst_offset = ((gint32)imt_slot - MONO_IMT_SIZE) * SIZEOF_VOID_P;
+                                       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);
-                                       call->inst.inst_offset = mono_method_get_vtable_index (method) * SIZEOF_VOID_P;
+                                       offset = mono_method_get_vtable_index (method) * SIZEOF_VOID_P;
                                }
                        } else {
                                slot_reg = vtable_reg;
-                               call->inst.inst_offset = G_STRUCT_OFFSET (MonoVTable, vtable) +
+                               offset = G_STRUCT_OFFSET (MonoVTable, vtable) +
                                        ((mono_method_get_vtable_index (method)) * (SIZEOF_VOID_P));
 #ifdef MONO_ARCH_HAVE_IMT
                                if (imt_arg) {
@@ -2568,6 +2643,7 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
                        }
 
                        call->inst.sreg1 = slot_reg;
+                       call->inst.inst_offset = offset;
                        call->virtual = TRUE;
                }
        }
@@ -2583,7 +2659,7 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
 MonoInst*
 mono_emit_method_call (MonoCompile *cfg, MonoMethod *method, MonoInst **args, MonoInst *this)
 {
-       return mono_emit_method_call_full (cfg, method, mono_method_signature (method), args, this, NULL, NULL);
+       return mono_emit_method_call_full (cfg, method, mono_method_signature (method), FALSE, args, this, NULL, NULL);
 }
 
 MonoInst*
@@ -2878,6 +2954,7 @@ mini_emit_stobj (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClass *kla
        guint32 align = 0;
        MonoMethod *memcpy_method;
        MonoInst *size_ins = NULL;
+       MonoInst *memcpy_ins = NULL;
 
        g_assert (klass);
        /*
@@ -2888,7 +2965,8 @@ mini_emit_stobj (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClass *kla
        if (mini_is_gsharedvt_klass (cfg, klass)) {
                g_assert (!native);
                context_used = mini_class_check_context_used (cfg, klass);
-               size_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_VALUE_SIZE);
+               size_ins = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_VALUE_SIZE);
+               memcpy_ins = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_MEMCPY);
        }
 
        if (native)
@@ -2922,7 +3000,10 @@ mini_emit_stobj (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClass *kla
                                }
                        }
 
-                       mono_emit_jit_icall (cfg, mono_value_copy, iargs);
+                       if (size_ins)
+                               mono_emit_jit_icall (cfg, mono_gsharedvt_value_copy, iargs);
+                       else
+                               mono_emit_jit_icall (cfg, mono_value_copy, iargs);
                        return;
                }
        }
@@ -2939,7 +3020,10 @@ mini_emit_stobj (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClass *kla
                        EMIT_NEW_ICONST (cfg, iargs [2], n);
                
                memcpy_method = get_memcpy_method ();
-               mono_emit_method_call (cfg, memcpy_method, iargs, NULL);
+               if (memcpy_ins)
+                       mono_emit_calli (cfg, mono_method_signature (memcpy_method), iargs, memcpy_ins, NULL, NULL);
+               else
+                       mono_emit_method_call (cfg, memcpy_method, iargs, NULL);
        }
 }
 
@@ -2963,29 +3047,35 @@ mini_emit_initobj (MonoCompile *cfg, MonoInst *dest, const guchar *ip, MonoClass
        guint32 align;
        MonoMethod *memset_method;
        MonoInst *size_ins = NULL;
+       MonoInst *bzero_ins = NULL;
+       static MonoMethod *bzero_method;
 
        /* FIXME: Optimize this for the case when dest is an LDADDR */
 
        mono_class_init (klass);
        if (mini_is_gsharedvt_klass (cfg, klass)) {
                context_used = mini_class_check_context_used (cfg, klass);
-               size_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_VALUE_SIZE);
-               n = -1;
-       } else {
-               n = mono_class_value_size (klass, &align);
+               size_ins = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_VALUE_SIZE);
+               bzero_ins = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_BZERO);
+               if (!bzero_method)
+                       bzero_method = mono_class_get_method_from_name (mono_defaults.string_class, "bzero_aligned_1", 2);
+               g_assert (bzero_method);
+               iargs [0] = dest;
+               iargs [1] = size_ins;
+               mono_emit_calli (cfg, mono_method_signature (bzero_method), iargs, bzero_ins, NULL, NULL);
+               return;
        }
 
-       if (!size_ins && n <= sizeof (gpointer) * 5) {
+       n = mono_class_value_size (klass, &align);
+
+       if (n <= sizeof (gpointer) * 5) {
                mini_emit_memset (cfg, dest->dreg, 0, n, 0, align);
        }
        else {
                memset_method = get_memset_method ();
                iargs [0] = dest;
                EMIT_NEW_ICONST (cfg, iargs [1], 0);
-               if (size_ins)
-                       iargs [2] = size_ins;
-               else
-                       EMIT_NEW_ICONST (cfg, iargs [2], n);
+               EMIT_NEW_ICONST (cfg, iargs [2], n);
                mono_emit_method_call (cfg, memset_method, iargs, NULL);
        }
 }
@@ -3098,6 +3188,20 @@ emit_get_rgctx_gsharedvt_call (MonoCompile *cfg, int context_used,
        return emit_rgctx_fetch (cfg, rgctx, entry);
 }
 
+
+static MonoInst*
+emit_get_rgctx_gsharedvt_method (MonoCompile *cfg, int context_used,
+                                                                MonoMethod *cmethod, MonoGSharedVtMethodInfo *info)
+{
+       MonoJumpInfoRgctxEntry *entry;
+       MonoInst *rgctx;
+
+       entry = mono_patch_info_rgctx_entry_new (cfg->mempool, cfg->current_method, context_used & MONO_GENERIC_CONTEXT_USED_METHOD, MONO_PATCH_INFO_GSHAREDVT_METHOD, info, MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO);
+       rgctx = emit_get_rgctx (cfg, cfg->current_method, context_used);
+
+       return emit_rgctx_fetch (cfg, rgctx, entry);
+}
+
 /*
  * emit_get_rgctx_method:
  *
@@ -3139,6 +3243,58 @@ emit_get_rgctx_field (MonoCompile *cfg, int context_used,
        return emit_rgctx_fetch (cfg, rgctx, entry);
 }
 
+static int
+get_gsharedvt_info_slot (MonoCompile *cfg, gpointer data, MonoRgctxInfoType rgctx_type)
+{
+       MonoGSharedVtMethodInfo *info = cfg->gsharedvt_info;
+       MonoRuntimeGenericContextInfoTemplate *template;
+       int i, idx;
+
+       g_assert (info);
+
+       for (i = 0; i < info->entries->len; ++i) {
+               MonoRuntimeGenericContextInfoTemplate *otemplate = g_ptr_array_index (info->entries, i);
+
+               if (otemplate->info_type == rgctx_type && otemplate->data == data && rgctx_type != MONO_RGCTX_INFO_LOCAL_OFFSET)
+                       return i;
+       }
+
+       template = mono_mempool_alloc0 (cfg->mempool, sizeof (MonoRuntimeGenericContextInfoTemplate));
+       template->info_type = rgctx_type;
+       template->data = data;
+
+       idx = info->entries->len;
+
+       g_ptr_array_add (info->entries, template);
+
+       return idx;
+}
+
+/*
+ * emit_get_gsharedvt_info:
+ *
+ *   This is similar to emit_get_rgctx_.., but loads the data from the gsharedvt info var instead of calling an rgctx fetch trampoline.
+ */
+static MonoInst*
+emit_get_gsharedvt_info (MonoCompile *cfg, gpointer data, MonoRgctxInfoType rgctx_type)
+{
+       MonoInst *ins;
+       int idx, dreg;
+
+       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)));
+
+       return ins;
+}
+
+static MonoInst*
+emit_get_gsharedvt_info_klass (MonoCompile *cfg, MonoClass *klass, MonoRgctxInfoType rgctx_type)
+{
+       return emit_get_gsharedvt_info (cfg, &klass->byval_arg, rgctx_type);
+}
+
 /*
  * On return the caller must check @klass for load errors.
  */
@@ -3297,7 +3453,20 @@ handle_unbox_nullable (MonoCompile* cfg, MonoInst* val, MonoClass* klass, int co
 
                return mono_emit_calli (cfg, mono_method_signature (method), &val, addr, NULL, rgctx);
        } else {
-               return mono_emit_method_call (cfg, method, &val, NULL);
+               gboolean pass_vtable, pass_mrgctx;
+               MonoInst *rgctx_arg = NULL;
+
+               check_method_sharing (cfg, method, &pass_vtable, &pass_mrgctx);
+               g_assert (!pass_mrgctx);
+
+               if (pass_vtable) {
+                       MonoVTable *vtable = mono_class_vtable (cfg->domain, method->klass);
+
+                       g_assert (vtable);
+                       EMIT_NEW_VTABLECONST (cfg, rgctx_arg, vtable);
+               }
+
+               return mono_emit_method_call_full (cfg, method, NULL, FALSE, &val, NULL, NULL, rgctx_arg);
        }
 }
 
@@ -3350,6 +3519,89 @@ handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, int context_use
        return add;
 }
 
+static MonoInst*
+handle_unbox_gsharedvt (MonoCompile *cfg, int context_used, MonoClass *klass, MonoInst *obj, MonoBasicBlock **out_cbb)
+{
+       MonoInst *addr, *klass_inst, *is_ref, *args[16];
+       MonoBasicBlock *is_ref_bb, *is_nullable_bb, *end_bb;
+       MonoInst *ins;
+       int dreg, addr_reg;
+
+       klass_inst = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_KLASS);
+
+       /* obj */
+       args [0] = obj;
+
+       /* klass */
+       args [1] = klass_inst;
+
+       /* CASTCLASS */
+       obj = mono_emit_jit_icall (cfg, mono_object_castclass, args);
+
+       NEW_BBLOCK (cfg, is_ref_bb);
+       NEW_BBLOCK (cfg, is_nullable_bb);
+       NEW_BBLOCK (cfg, end_bb);
+       is_ref = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_CLASS_BOX_TYPE);
+       MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 1);
+       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_ref_bb);
+
+       MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 2);
+       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_nullable_bb);
+
+       /* This will contain either the address of the unboxed vtype, or an address of the temporary where the ref is stored */
+       addr_reg = alloc_dreg (cfg, STACK_MP);
+
+       /* Non-ref case */
+       /* UNBOX */
+       NEW_BIALU_IMM (cfg, addr, OP_ADD_IMM, addr_reg, obj->dreg, sizeof (MonoObject));
+       MONO_ADD_INS (cfg->cbb, addr);
+
+       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
+       /* Ref case */
+       MONO_START_BB (cfg, is_ref_bb);
+
+       /* Save the ref to a temporary */
+       dreg = alloc_ireg (cfg);
+       EMIT_NEW_VARLOADA_VREG (cfg, addr, dreg, &klass->byval_arg);
+       addr->dreg = addr_reg;
+       MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, addr->dreg, 0, obj->dreg);
+       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
+       /* Nullable case */
+       MONO_START_BB (cfg, is_nullable_bb);
+
+       {
+               MonoInst *addr = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX);
+               MonoInst *unbox_call;
+               MonoMethodSignature *unbox_sig;
+               MonoInst *var;
+
+               var = mono_compile_create_var (cfg, &klass->byval_arg, OP_LOCAL);
+
+               unbox_sig = mono_mempool_alloc0 (cfg->mempool, MONO_SIZEOF_METHOD_SIGNATURE + (1 * sizeof (MonoType *)));
+               unbox_sig->ret = &klass->byval_arg;
+               unbox_sig->param_count = 1;
+               unbox_sig->params [0] = &mono_defaults.object_class->byval_arg;
+               unbox_call = mono_emit_calli (cfg, unbox_sig, &obj, addr, NULL, NULL);
+
+               EMIT_NEW_VARLOADA_VREG (cfg, addr, unbox_call->dreg, &klass->byval_arg);
+               addr->dreg = addr_reg;
+       }
+
+       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
+       /* End */
+       MONO_START_BB (cfg, end_bb);
+
+       /* LDOBJ */
+       EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, addr_reg, 0);
+
+       *out_cbb = cfg->cbb;
+
+       return ins;
+}
+
 /*
  * Returns NULL and set the cfg exception on error.
  */
@@ -3364,13 +3616,7 @@ handle_alloc (MonoCompile *cfg, MonoClass *klass, gboolean for_box, int context_
                int rgctx_info;
                MonoInst *iargs [2];
 
-               /*
-                 FIXME: we cannot get managed_alloc here because we can't get
-                 the class's vtable (because it's not a closed class)
-
-                 MonoVTable *vtable = mono_class_vtable (cfg->domain, klass);
-                 MonoMethod *managed_alloc = mono_gc_get_managed_allocator (vtable, for_box);
-               */
+               MonoMethod *managed_alloc = mono_gc_get_managed_allocator (klass, for_box);
 
                if (cfg->opt & MONO_OPT_SHARED)
                        rgctx_info = MONO_RGCTX_INFO_KLASS;
@@ -3387,6 +3633,9 @@ handle_alloc (MonoCompile *cfg, MonoClass *klass, gboolean for_box, int context_
                        alloc_ftn = mono_object_new_specific;
                }
 
+               if (managed_alloc && !(cfg->opt & MONO_OPT_SHARED))
+                       return mono_emit_method_call (cfg, managed_alloc, iargs, NULL);
+
                return mono_emit_jit_icall (cfg, alloc_ftn, iargs);
        }
 
@@ -3412,7 +3661,7 @@ handle_alloc (MonoCompile *cfg, MonoClass *klass, gboolean for_box, int context_
                }
 
 #ifndef MONO_CROSS_COMPILE
-               managed_alloc = mono_gc_get_managed_allocator (vtable, for_box);
+               managed_alloc = mono_gc_get_managed_allocator (klass, for_box);
 #endif
 
                if (managed_alloc) {
@@ -3438,10 +3687,12 @@ handle_alloc (MonoCompile *cfg, MonoClass *klass, gboolean for_box, int context_
  * Returns NULL and set the cfg exception on error.
  */    
 static MonoInst*
-handle_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_used)
+handle_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_used, MonoBasicBlock **out_cbb)
 {
        MonoInst *alloc, *ins;
 
+       *out_cbb = cfg->cbb;
+
        if (mono_class_is_nullable (klass)) {
                MonoMethod* method = mono_class_get_method_from_name (klass, "Box", 1);
 
@@ -3454,24 +3705,40 @@ handle_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_used)
 
                        return mono_emit_calli (cfg, mono_method_signature (method), &val, addr, NULL, rgctx);
                } else {
-                       return mono_emit_method_call (cfg, method, &val, NULL);
+                       gboolean pass_vtable, pass_mrgctx;
+                       MonoInst *rgctx_arg = NULL;
+
+                       check_method_sharing (cfg, method, &pass_vtable, &pass_mrgctx);
+                       g_assert (!pass_mrgctx);
+
+                       if (pass_vtable) {
+                               MonoVTable *vtable = mono_class_vtable (cfg->domain, method->klass);
+
+                               g_assert (vtable);
+                               EMIT_NEW_VTABLECONST (cfg, rgctx_arg, vtable);
+                       }
+
+                       return mono_emit_method_call_full (cfg, method, NULL, FALSE, &val, NULL, NULL, rgctx_arg);
                }
        }
 
        if (mini_is_gsharedvt_klass (cfg, klass)) {
-               MonoBasicBlock *is_ref_bb, *end_bb;
+               MonoBasicBlock *is_ref_bb, *is_nullable_bb, *end_bb;
                MonoInst *res, *is_ref, *src_var, *addr;
                int addr_reg, dreg;
 
                dreg = alloc_ireg (cfg);
 
                NEW_BBLOCK (cfg, is_ref_bb);
+               NEW_BBLOCK (cfg, is_nullable_bb);
                NEW_BBLOCK (cfg, end_bb);
-               is_ref = emit_get_rgctx_klass (cfg, context_used, klass,
-                                                                          MONO_RGCTX_INFO_CLASS_IS_REF);
+               is_ref = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_CLASS_BOX_TYPE);
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 1);
                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_ref_bb);
 
+               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 2);
+               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_nullable_bb);
+
                /* Non-ref case */
                alloc = handle_alloc (cfg, klass, TRUE, context_used);
                if (!alloc)
@@ -3496,8 +3763,35 @@ handle_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_used)
                MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, addr->dreg, 0);
                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
 
+               /* Nullable case */
+               MONO_START_BB (cfg, is_nullable_bb);
+
+               {
+                       MonoInst *addr = emit_get_gsharedvt_info_klass (cfg, klass,
+                                                                                                       MONO_RGCTX_INFO_NULLABLE_CLASS_BOX);
+                       MonoInst *box_call;
+                       MonoMethodSignature *box_sig;
+
+                       /*
+                        * klass is Nullable<T>, need to call Nullable<T>.Box () using a gsharedvt signature, but we cannot
+                        * construct that method at JIT time, so have to do things by hand.
+                        */
+                       box_sig = mono_mempool_alloc0 (cfg->mempool, MONO_SIZEOF_METHOD_SIGNATURE + (1 * sizeof (MonoType *)));
+                       box_sig->ret = &mono_defaults.object_class->byval_arg;
+                       box_sig->param_count = 1;
+                       box_sig->params [0] = &klass->byval_arg;
+                       box_call = mono_emit_calli (cfg, box_sig, &val, addr, NULL, NULL);
+                       EMIT_NEW_UNALU (cfg, res, OP_MOVE, dreg, box_call->dreg);
+                       res->type = STACK_OBJ;
+                       res->klass = klass;
+               }
+
+               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
                MONO_START_BB (cfg, end_bb);
 
+               *out_cbb = cfg->cbb;
+
                return res;
        } else {
                alloc = handle_alloc (cfg, klass, TRUE, context_used);
@@ -3555,7 +3849,7 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context
        if (context_used) {
                MonoInst *args [3];
 
-               if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
+               if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || is_complex_isinst (klass)) {
                        MonoMethod *mono_castclass = mono_marshal_get_castclass_with_cache ();
                        MonoInst *cache_ins;
 
@@ -3574,20 +3868,6 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context
                }
 
                klass_inst = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
-
-               if (is_complex_isinst (klass)) {
-                       /* Complex case, handle by an icall */
-
-                       /* obj */
-                       args [0] = src;
-
-                       /* klass */
-                       args [1] = klass_inst;
-
-                       return mono_emit_jit_icall (cfg, mono_object_castclass, args);
-               } else {
-                       /* Simple case, handled by the code below */
-               }
        }
 
        NEW_BBLOCK (cfg, is_null_bb);
@@ -3649,7 +3929,7 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
        if (context_used) {
                MonoInst *args [3];
 
-               if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
+               if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || is_complex_isinst (klass)) {
                        MonoMethod *mono_isinst = mono_marshal_get_isinst_with_cache ();
                        MonoInst *cache_ins;
 
@@ -3668,20 +3948,6 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
                }
 
                klass_inst = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
-
-               if (is_complex_isinst (klass)) {
-                       /* Complex case, handle by an icall */
-
-                       /* obj */
-                       args [0] = src;
-
-                       /* klass */
-                       args [1] = klass_inst;
-
-                       return mono_emit_jit_icall (cfg, mono_object_isinst, args);
-               } else {
-                       /* Simple case, the code below can handle it */
-               }
        }
 
        NEW_BBLOCK (cfg, is_null_bb);
@@ -4316,7 +4582,7 @@ mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
                g_assert (cfg->generic_sharing_context);
                context_used = mini_class_check_context_used (cfg, klass);
                g_assert (context_used);
-               rgctx_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE);
+               rgctx_ins = emit_get_gsharedvt_info (cfg, &klass->byval_arg, MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE);
                MONO_EMIT_NEW_BIALU (cfg, OP_IMUL, mult_reg, index2_reg, rgctx_ins->dreg);
        } else {
                MONO_EMIT_NEW_BIALU_IMM (cfg, OP_MUL_IMM, mult_reg, index2_reg, size);
@@ -4769,7 +5035,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                } else
                        return NULL;
        } else if (cmethod->klass == mono_defaults.array_class) {
-               if (strcmp (cmethod->name + 1, "etGenericValueImpl") == 0)
+               if (!cfg->gsharedvt && strcmp (cmethod->name + 1, "etGenericValueImpl") == 0)
                        return emit_array_generic_access (cfg, fsig, args, *cmethod->name == 'S');
 
 #ifndef MONO_BIG_ARRAYS
@@ -5155,7 +5421,7 @@ mini_redirect_call (MonoCompile *cfg, MonoMethod *method,
 
                        g_assert (vtable); /*Should not fail since it System.String*/
 #ifndef MONO_CROSS_COMPILE
-                       managed_alloc = mono_gc_get_managed_allocator (vtable, FALSE);
+                       managed_alloc = mono_gc_get_managed_allocator (method->klass, FALSE);
 #endif
                        if (!managed_alloc)
                                return NULL;
@@ -6516,6 +6782,47 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                link_bblock (cfg, start_bblock, bblock);
        }
 
+       if (cfg->gsharedvt && cfg->method == method) {
+               MonoGSharedVtMethodInfo *info;
+               MonoInst *var, *locals_var;
+               int dreg;
+
+               info = mono_mempool_alloc0 (cfg->mempool, sizeof (MonoGSharedVtMethodInfo));
+               info->method = cfg->method;
+               // FIXME: Free this
+               info->entries = g_ptr_array_new ();
+               cfg->gsharedvt_info = info;
+
+               var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
+               /* prevent it from being register allocated */
+               //var->flags |= MONO_INST_INDIRECT;
+               cfg->gsharedvt_info_var = var;
+
+               ins = emit_get_rgctx_gsharedvt_method (cfg, mini_method_check_context_used (cfg, method), method, info);
+               MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, var->dreg, ins->dreg);
+
+               /* Allocate locals */
+               locals_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
+               /* prevent it from being register allocated */
+               //locals_var->flags |= MONO_INST_INDIRECT;
+               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_INST_NEW (cfg, ins, OP_LOCALLOC);
+               ins->dreg = locals_var->dreg;
+               ins->sreg1 = dreg;
+               MONO_ADD_INS (cfg->cbb, ins);
+               cfg->gsharedvt_locals_var_ins = ins;
+               
+               cfg->flags |= MONO_CFG_HAS_ALLOCA;
+               /*
+               if (init_locals)
+                       ins->flags |= MONO_INST_INIT;
+               */
+       }
+
        /* at this point we know, if security is TRUE, that some code needs to be generated */
        if (security && (cfg->method == method)) {
                MonoInst *args [2];
@@ -7111,6 +7418,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        MonoInst *vtable_arg = NULL;
                        gboolean check_this = FALSE;
                        gboolean supported_tail_call = FALSE;
+                       gboolean tail_call = FALSE;
                        gboolean need_seq_point = FALSE;
                        guint32 call_opcode = *ip;
                        gboolean emit_widen = TRUE;
@@ -7291,22 +7599,24 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        /*
                                         * Constrained calls need to behave differently at runtime dependending on whenever the receiver is instantiated as ref type or as a vtype.
                                         */
-                                       /* Special case Object:ToString () as its easy to implement */
-                                       if (cmethod->klass == mono_defaults.object_class && !strcmp (cmethod->name, "ToString")) {
-                                               MonoInst *args [3];
+                                       /* Special case Object methods as they are easy to implement */
+                                       if (cmethod->klass == mono_defaults.object_class) {
+                                               MonoInst *args [16];
 
                                                args [0] = sp [0];
                                                EMIT_NEW_METHODCONST (cfg, args [1], cmethod);
                                                args [2] = emit_get_rgctx_klass (cfg, mono_class_check_context_used (constrained_call), constrained_call, MONO_RGCTX_INFO_KLASS);
-                                               ins = mono_emit_jit_icall (cfg, mono_object_tostring_gsharedvt, args);
-                                               goto call_end;
-                                       } else if (cmethod->klass == mono_defaults.object_class && !strcmp (cmethod->name, "GetHashCode")) {
-                                               MonoInst *args [3];
 
-                                               args [0] = sp [0];
-                                               EMIT_NEW_METHODCONST (cfg, args [1], cmethod);
-                                               args [2] = emit_get_rgctx_klass (cfg, mono_class_check_context_used (constrained_call), constrained_call, MONO_RGCTX_INFO_KLASS);
-                                               ins = mono_emit_jit_icall (cfg, mono_object_gethashcode_gsharedvt, args);
+                                               if (!strcmp (cmethod->name, "ToString")) {
+                                                       ins = mono_emit_jit_icall (cfg, mono_object_tostring_gsharedvt, args);
+                                               } else if (!strcmp (cmethod->name, "Equals")) {
+                                                       args [3] = sp [1];
+                                                       ins = mono_emit_jit_icall (cfg, mono_object_equals_gsharedvt, args);
+                                               } else if (!strcmp (cmethod->name, "GetHashCode")) {
+                                                       ins = mono_emit_jit_icall (cfg, mono_object_gethashcode_gsharedvt, args);
+                                               } else {
+                                                       GSHAREDVT_FAILURE (*ip);
+                                               }
                                                goto call_end;
                                        } else if (constrained_call->valuetype && cmethod->klass->valuetype) {
                                                /* The 'Own method' case below */
@@ -7325,8 +7635,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                         */
                                        EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &constrained_call->byval_arg, sp [0]->dreg, 0);
                                        ins->klass = constrained_call;
-                                       sp [0] = handle_box (cfg, ins, constrained_call, mono_class_check_context_used (constrained_call));
-                                       bblock = cfg->cbb;
+                                       sp [0] = handle_box (cfg, ins, constrained_call, mono_class_check_context_used (constrained_call), &bblock);
                                        CHECK_CFG_EXCEPTION;
                                } else if (!constrained_call->valuetype) {
                                        int dreg = alloc_ireg_ref (cfg);
@@ -7360,8 +7669,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                        /* Enum implements some interfaces, so treat this as the first case */
                                                        EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &constrained_call->byval_arg, sp [0]->dreg, 0);
                                                        ins->klass = constrained_call;
-                                                       sp [0] = handle_box (cfg, ins, constrained_call, mono_class_check_context_used (constrained_call));
-                                                       bblock = cfg->cbb;
+                                                       sp [0] = handle_box (cfg, ins, constrained_call, mono_class_check_context_used (constrained_call), &bblock);
                                                        CHECK_CFG_EXCEPTION;
                                                }
                                        }
@@ -7397,48 +7705,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                CHECK_TYPELOAD (cmethod->klass);
                        }
 
-                       if (cmethod && ((cmethod->flags & METHOD_ATTRIBUTE_STATIC) || cmethod->klass->valuetype) &&
-                                       (cmethod->klass->generic_class || cmethod->klass->generic_container)) {
-                               gboolean sharable = FALSE;
-
-                               if (mono_method_is_generic_sharable (cmethod, TRUE)) {
-                                       sharable = TRUE;
-                               } else {
-                                       gboolean sharing_enabled = mono_class_generic_sharing_enabled (cmethod->klass);
-                                       MonoGenericContext *context = mini_class_get_context (cmethod->klass);
-                                       gboolean context_sharable = mono_generic_context_is_sharable (context, TRUE);
-
-                                       sharable = sharing_enabled && context_sharable;
-                               }
-
-                               /*
-                                * Pass vtable iff target method might
-                                * be shared, which means that sharing
-                                * is enabled for its class and its
-                                * context is sharable (and it's not a
-                                * generic method).
-                                */
-                               if (sharable && !(mini_method_get_context (cmethod) && mini_method_get_context (cmethod)->method_inst))
-                                       pass_vtable = TRUE;
-                       }
-
-                       if (cmethod && mini_method_get_context (cmethod) &&
-                                       mini_method_get_context (cmethod)->method_inst) {
-                               g_assert (!pass_vtable);
-
-                               if (mono_method_is_generic_sharable (cmethod, TRUE)) {
-                                       pass_mrgctx = TRUE;
-                               } else {
-                                       gboolean sharing_enabled = mono_class_generic_sharing_enabled (cmethod->klass);
-                                       MonoGenericContext *context = mini_method_get_context (cmethod);
-                                       gboolean context_sharable = mono_generic_context_is_sharable (context, TRUE);
-
-                                       if (sharing_enabled && context_sharable)
-                                               pass_mrgctx = TRUE;
-                                       if (cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, fsig))
-                                               pass_mrgctx = TRUE;
-                               }
-                       }
+                       if (cmethod)
+                               check_method_sharing (cfg, cmethod, &pass_vtable, &pass_mrgctx);
 
                        if (cfg->generic_sharing_context && cmethod) {
                                MonoGenericContext *cmethod_context = mono_method_get_context (cmethod);
@@ -7546,7 +7814,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                g_assert (cmethod->is_inflated);
                                        imt_arg = emit_get_rgctx_method (cfg, context_used,
                                                                                                         cmethod, MONO_RGCTX_INFO_METHOD);
-                                       ins = mono_emit_method_call_full (cfg, cmethod, fsig, sp, sp [0], imt_arg, NULL);
+                                       ins = mono_emit_method_call_full (cfg, cmethod, fsig, FALSE, sp, sp [0], imt_arg, NULL);
                                } else {
                                        this_temp = mono_compile_create_var (cfg, type_from_stack_type (sp [0]), OP_LOCAL);
                                        NEW_TEMPSTORE (cfg, store, this_temp->inst_c0, sp [0]);
@@ -7846,11 +8114,14 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        /* FIXME: Enabling TAILC breaks some inlining/stack trace/etc tests */
                        /* FIXME: runtime generic context pointer for jumps? */
                        /* FIXME: handle this for generic sharing eventually */
-                       if (cmethod && 
-                               ((((ins_flag & MONO_INST_TAILCALL) && (call_opcode == CEE_CALL))
-                                 ))//|| ((cfg->opt & MONO_OPT_TAILC) && *ip == CEE_CALL && ip [5] == CEE_RET))
-                               && !vtable_arg && !cfg->generic_sharing_context && is_supported_tail_call (cfg, method, cmethod, fsig))
+                       if (cmethod && (ins_flag & MONO_INST_TAILCALL) &&
+                               !vtable_arg && !cfg->generic_sharing_context && is_supported_tail_call (cfg, method, cmethod, fsig))
                                supported_tail_call = TRUE;
+                       if (supported_tail_call) {
+                               if (call_opcode != CEE_CALL)
+                                       supported_tail_call = FALSE;
+                       }
+
                        if (supported_tail_call) {
                                MonoCallInst *call;
 
@@ -7859,45 +8130,44 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                //printf ("HIT: %s -> %s\n", mono_method_full_name (cfg->method, TRUE), mono_method_full_name (cmethod, TRUE));
 
-#ifdef MONO_ARCH_USE_OP_TAIL_CALL
-                               /* Handle tail calls similarly to calls */
-                               call = mono_emit_call_args (cfg, mono_method_signature (cmethod), sp, FALSE, FALSE, TRUE, FALSE, FALSE);
-#else
-                               MONO_INST_NEW_CALL (cfg, call, OP_JMP);
-                               call->tail_call = TRUE;
-                               call->method = cmethod;
-                               call->signature = mono_method_signature (cmethod);
-
-                               /*
-                                * We implement tail calls by storing the actual arguments into the 
-                                * argument variables, then emitting a CEE_JMP.
-                                */
-                               for (i = 0; i < n; ++i) {
-                                       /* Prevent argument from being register allocated */
-                                       arg_array [i]->flags |= MONO_INST_VOLATILE;
-                                       EMIT_NEW_ARGSTORE (cfg, ins, i, sp [i]);
-                               }
-#endif
+                               if (ARCH_USE_OP_TAIL_CALL) {
+                                       /* Handle tail calls similarly to normal calls */
+                                       tail_call = TRUE;
+                               } else {
+                                       MONO_INST_NEW_CALL (cfg, call, OP_JMP);
+                                       call->tail_call = TRUE;
+                                       call->method = cmethod;
+                                       call->signature = mono_method_signature (cmethod);
 
-                               ins = (MonoInst*)call;
-                               ins->inst_p0 = cmethod;
-                               ins->inst_p1 = arg_array [0];
-                               MONO_ADD_INS (bblock, ins);
-                               link_bblock (cfg, bblock, end_bblock);                  
-                               start_new_bblock = 1;
+                                       /*
+                                        * We implement tail calls by storing the actual arguments into the 
+                                        * argument variables, then emitting a CEE_JMP.
+                                        */
+                                       for (i = 0; i < n; ++i) {
+                                               /* Prevent argument from being register allocated */
+                                               arg_array [i]->flags |= MONO_INST_VOLATILE;
+                                               EMIT_NEW_ARGSTORE (cfg, ins, i, sp [i]);
+                                       }
+                                       ins = (MonoInst*)call;
+                                       ins->inst_p0 = cmethod;
+                                       ins->inst_p1 = arg_array [0];
+                                       MONO_ADD_INS (bblock, ins);
+                                       link_bblock (cfg, bblock, end_bblock);                  
+                                       start_new_bblock = 1;
 
-                               // FIXME: Eliminate unreachable epilogs
+                                       // FIXME: Eliminate unreachable epilogs
 
-                               /*
-                                * OP_TAILCALL has no return value, so skip the CEE_RET if it is
-                                * only reachable from this call.
-                                */
-                               GET_BBLOCK (cfg, tblock, ip + 5);
-                               if (tblock == bblock || tblock->in_count == 0)
-                                       skip_ret = TRUE;
-                               push_res = FALSE;
+                                       /*
+                                        * OP_TAILCALL has no return value, so skip the CEE_RET if it is
+                                        * only reachable from this call.
+                                        */
+                                       GET_BBLOCK (cfg, tblock, ip + 5);
+                                       if (tblock == bblock || tblock->in_count == 0)
+                                               skip_ret = TRUE;
+                                       push_res = FALSE;
 
-                               goto call_end;
+                                       goto call_end;
+                               }
                        }
 
                        /* 
@@ -7913,9 +8183,25 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                        /* Common call */
                        INLINE_FAILURE ("call");
-                       ins = mono_emit_method_call_full (cfg, cmethod, fsig, sp, virtual ? sp [0] : NULL,
+                       ins = mono_emit_method_call_full (cfg, cmethod, fsig, tail_call, sp, virtual ? sp [0] : NULL,
                                                                                          imt_arg, vtable_arg);
 
+                       if (tail_call) {
+                               link_bblock (cfg, bblock, end_bblock);                  
+                               start_new_bblock = 1;
+
+                               // FIXME: Eliminate unreachable epilogs
+
+                               /*
+                                * OP_TAILCALL has no return value, so skip the CEE_RET if it is
+                                * only reachable from this call.
+                                */
+                               GET_BBLOCK (cfg, tblock, ip + 5);
+                               if (tblock == bblock || tblock->in_count == 0)
+                                       skip_ret = TRUE;
+                               push_res = FALSE;
+                       }
+
                        call_end:
 
                        /* End of call, INS should contain the result of the call, if any */
@@ -8840,7 +9126,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                /* we simply pass a null pointer */
                                EMIT_NEW_PCONST (cfg, *sp, NULL); 
                                /* now call the string ctor */
-                               alloc = mono_emit_method_call_full (cfg, cmethod, fsig, sp, NULL, NULL, NULL);
+                               alloc = mono_emit_method_call_full (cfg, cmethod, fsig, FALSE, sp, NULL, NULL, NULL);
                        } else {
                                MonoInst* callvirt_this_arg = NULL;
                                
@@ -8914,7 +9200,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                // FIXME-VT: Clean this up
                                                if (cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, fsig))
                                                        GSHAREDVT_FAILURE(*ip);
-                                               mono_emit_method_call_full (cfg, cmethod, fsig, sp, callvirt_this_arg, NULL, NULL);
+                                               mono_emit_method_call_full (cfg, cmethod, fsig, FALSE, sp, callvirt_this_arg, NULL, NULL);
                                        }
                                } else if (cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, fsig)) {
                                        MonoInst *addr;
@@ -8932,7 +9218,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        mono_emit_calli (cfg, fsig, sp, cmethod_addr, NULL, vtable_arg);
                                } else {
                                        INLINE_FAILURE ("ctor call");
-                                       ins = mono_emit_method_call_full (cfg, cmethod, fsig, sp,
+                                       ins = mono_emit_method_call_full (cfg, cmethod, fsig, FALSE, sp,
                                                                                                          callvirt_this_arg, NULL, vtable_arg);
                                }
                        }
@@ -9085,60 +9371,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        context_used = mini_class_check_context_used (cfg, klass);
 
                        if (mini_is_gsharedvt_klass (cfg, klass)) {
-                               MonoInst *obj, *addr, *klass_inst, *is_ref, *args[16];
-                               MonoBasicBlock *is_ref_bb, *end_bb;
-                               int dreg, addr_reg;
-
-                               /* Need to check for nullable types at runtime, but those are disabled in mini_is_gsharedvt_sharable_method*/
-                               if (mono_class_is_nullable (klass))
-                                       GSHAREDVT_FAILURE (*ip);
-
-                               obj = *sp;
-
-                               klass_inst = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
-
-                               /* obj */
-                               args [0] = obj;
-
-                               /* klass */
-                               args [1] = klass_inst;
-
-                               /* CASTCLASS */
-                               obj = mono_emit_jit_icall (cfg, mono_object_castclass, args);
-
-                               NEW_BBLOCK (cfg, is_ref_bb);
-                               NEW_BBLOCK (cfg, end_bb);
-                               is_ref = emit_get_rgctx_klass (cfg, context_used, klass,
-                                                                                          MONO_RGCTX_INFO_CLASS_IS_REF);
-                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 1);
-                               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_ref_bb);
-
-                               /* This will contain either the address of the unboxed vtype, or an address of the temporary where the ref is stored */
-                               addr_reg = alloc_dreg (cfg, STACK_MP);
-
-                               /* Non-ref case */
-                               /* UNBOX */
-                               NEW_BIALU_IMM (cfg, addr, OP_ADD_IMM, addr_reg, obj->dreg, sizeof (MonoObject));
-                               MONO_ADD_INS (cfg->cbb, addr);
-
-                               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
-
-                               /* Ref case */
-                               MONO_START_BB (cfg, is_ref_bb);
-
-                               /* Save the ref to a temporary */
-                               dreg = alloc_ireg (cfg);
-                               EMIT_NEW_VARLOADA_VREG (cfg, addr, dreg, &klass->byval_arg);
-                               addr->dreg = addr_reg;
-                               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, addr->dreg, 0, obj->dreg);
-                               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
-
-                               MONO_START_BB (cfg, end_bb);
-                               bblock = cfg->cbb;
-
-                               /* LDOBJ */
-                               EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, addr_reg, 0);
-                               *sp++ = ins;
+                               *sp = handle_unbox_gsharedvt (cfg, context_used, klass, *sp, &bblock);
+                               sp ++;
 
                                ip += 5;
                                inline_costs += 2;
@@ -9316,8 +9550,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                break;
                        }
 
-                       *sp++ = handle_box (cfg, val, klass, context_used);
-                       bblock = cfg->cbb;
+                       *sp++ = handle_box (cfg, val, klass, context_used, &bblock);
 
                        CHECK_CFG_EXCEPTION;
                        ip += 5;
@@ -9488,7 +9721,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                                context_used = mini_class_check_context_used (cfg, klass);
 
-                                               offset_ins = emit_get_rgctx_field (cfg, context_used, field, MONO_RGCTX_INFO_FIELD_OFFSET);
+                                               offset_ins = emit_get_gsharedvt_info (cfg, field, MONO_RGCTX_INFO_FIELD_OFFSET);
                                                dreg = alloc_ireg_mp (cfg);
                                                EMIT_NEW_BIALU (cfg, ins, OP_PADD, dreg, sp [0]->dreg, offset_ins->dreg);
                                                /* The decomposition will call mini_emit_stobj () which will emit a wbarrier if needed */
@@ -9577,7 +9810,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                if (mini_is_gsharedvt_klass (cfg, klass)) {
                                                        MonoInst *offset_ins;
 
-                                                       offset_ins = emit_get_rgctx_field (cfg, context_used, field, MONO_RGCTX_INFO_FIELD_OFFSET);
+                                                       offset_ins = emit_get_gsharedvt_info (cfg, field, MONO_RGCTX_INFO_FIELD_OFFSET);
                                                        EMIT_NEW_BIALU (cfg, ins, OP_PADD, dreg, sp [0]->dreg, offset_ins->dreg);
                                                } else {
                                                        EMIT_NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, dreg, sp [0]->dreg, foffset);
@@ -9594,7 +9827,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        if (mini_is_gsharedvt_klass (cfg, klass)) {
                                                MonoInst *offset_ins;
 
-                                               offset_ins = emit_get_rgctx_field (cfg, context_used, field, MONO_RGCTX_INFO_FIELD_OFFSET);
+                                               offset_ins = emit_get_gsharedvt_info (cfg, field, MONO_RGCTX_INFO_FIELD_OFFSET);
                                                dreg = alloc_ireg_mp (cfg);
                                                EMIT_NEW_BIALU (cfg, ins, OP_PADD, dreg, sp [0]->dreg, offset_ins->dreg);
                                                EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, load, field->type, dreg, 0);
@@ -10841,7 +11074,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                lmf_ins = mono_get_lmf_intrinsic (cfg);
 #endif
 
-#ifdef MONO_ARCH_HAVE_TLS_GET
                                if (MONO_ARCH_HAVE_TLS_GET && ad_ins && lmf_ins) {
                                        NEW_BBLOCK (cfg, next_bb);
 
@@ -10853,7 +11085,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, lmf_ins->dreg, 0);
                                        MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, next_bb);
                                }
-#endif
 
                                if (cfg->compile_aot) {
                                        /* AOT code is only used in the root domain */
@@ -12180,7 +12411,8 @@ mono_handle_global_vregs (MonoCompile *cfg)
 #endif
                        /* Arguments are implicitly global */
                        /* Putting R4 vars into registers doesn't work currently */
-                       if ((var->opcode != OP_ARG) && (var != cfg->ret) && !(var->flags & (MONO_INST_VOLATILE|MONO_INST_INDIRECT)) && (vreg_to_bb [var->dreg] != -1) && (var->klass->byval_arg.type != MONO_TYPE_R4) && !cfg->disable_vreg_to_lvreg) {
+                       /* The gsharedvt vars are implicitly referenced by ldaddr opcodes, but those opcodes are only generated later */
+                       if ((var->opcode != OP_ARG) && (var != cfg->ret) && !(var->flags & (MONO_INST_VOLATILE|MONO_INST_INDIRECT)) && (vreg_to_bb [var->dreg] != -1) && (var->klass->byval_arg.type != MONO_TYPE_R4) && !cfg->disable_vreg_to_lvreg && var != cfg->gsharedvt_info_var && var != cfg->gsharedvt_locals_var) {
                                /* 
                                 * Make that the variable's liveness interval doesn't contain a call, since
                                 * that would cause the lvreg to be spilled, making the whole optimization
@@ -12285,6 +12517,7 @@ mono_spill_global_vars (MonoCompile *cfg, gboolean *need_local_opts)
        guint32 stacktypes [128];
        MonoInst **live_range_start, **live_range_end;
        MonoBasicBlock **live_range_start_bb, **live_range_end_bb;
+       int *gsharedvt_vreg_to_idx = NULL;
 
        *need_local_opts = FALSE;
 
@@ -12343,6 +12576,29 @@ mono_spill_global_vars (MonoCompile *cfg, gboolean *need_local_opts)
                                ins->flags |= MONO_INST_GC_TRACK;
                }
        }
+
+       if (cfg->gsharedvt) {
+               gsharedvt_vreg_to_idx = g_new0 (int, cfg->next_vreg);
+
+               for (i = 0; i < cfg->num_varinfo; ++i) {
+                       MonoInst *ins = cfg->varinfo [i];
+                       int idx;
+
+                       if (mini_is_gsharedvt_variable_type (cfg, ins->inst_vtype)) {
+                               if (i >= cfg->locals_start) {
+                                       /* Local */
+                                       idx = get_gsharedvt_info_slot (cfg, ins->inst_vtype, MONO_RGCTX_INFO_LOCAL_OFFSET);
+                                       gsharedvt_vreg_to_idx [ins->dreg] = idx + 1;
+                                       ins->opcode = OP_GSHAREDVT_LOCAL;
+                                       ins->inst_imm = idx;
+                               } else {
+                                       /* Arg */
+                                       gsharedvt_vreg_to_idx [ins->dreg] = -1;
+                                       ins->opcode = OP_GSHAREDVT_ARG_REGOFFSET;
+                               }
+                       }
+               }
+       }
                
        /* FIXME: widening and truncation */
 
@@ -12419,6 +12675,63 @@ mono_spill_global_vars (MonoCompile *cfg, gboolean *need_local_opts)
                                                ins->inst_offset = vtaddr->inst_offset;
                                        } else
                                                NOT_IMPLEMENTED;
+                               } else if (cfg->gsharedvt && gsharedvt_vreg_to_idx [var->dreg] < 0) {
+                                       /* gsharedvt arg passed by ref */
+                                       g_assert (var->opcode == OP_GSHAREDVT_ARG_REGOFFSET);
+
+                                       ins->opcode = OP_LOAD_MEMBASE;
+                                       ins->inst_basereg = var->inst_basereg;
+                                       ins->inst_offset = var->inst_offset;
+                               } else if (cfg->gsharedvt && gsharedvt_vreg_to_idx [var->dreg]) {
+                                       MonoInst *load, *load2, *load3;
+                                       int idx = gsharedvt_vreg_to_idx [var->dreg] - 1;
+                                       int reg1, reg2, reg3;
+                                       MonoInst *info_var = cfg->gsharedvt_info_var;
+                                       MonoInst *locals_var = cfg->gsharedvt_locals_var;
+
+                                       /*
+                                        * gsharedvt local.
+                                        * Compute the address of the local as gsharedvt_locals_var + gsharedvt_info_var->locals_offsets [idx].
+                                        */
+
+                                       g_assert (var->opcode == OP_GSHAREDVT_LOCAL);
+
+                                       g_assert (info_var);
+                                       g_assert (locals_var);
+
+                                       /* Mark the instruction used to compute the locals var as used */
+                                       cfg->gsharedvt_locals_var_ins = NULL;
+
+                                       /* Load the offset */
+                                       if (info_var->opcode == OP_REGOFFSET) {
+                                               reg1 = alloc_ireg (cfg);
+                                               NEW_LOAD_MEMBASE (cfg, load, OP_LOAD_MEMBASE, reg1, info_var->inst_basereg, info_var->inst_offset);
+                                       } else if (info_var->opcode == OP_REGVAR) {
+                                               load = NULL;
+                                               reg1 = info_var->dreg;
+                                       } else {
+                                               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)));
+                                       /* Load the locals area address */
+                                       reg3 = alloc_ireg (cfg);
+                                       if (locals_var->opcode == OP_REGOFFSET) {
+                                               NEW_LOAD_MEMBASE (cfg, load3, OP_LOAD_MEMBASE, reg3, locals_var->inst_basereg, locals_var->inst_offset);
+                                       } else if (locals_var->opcode == OP_REGVAR) {
+                                               NEW_UNALU (cfg, load3, OP_MOVE, reg3, locals_var->dreg);
+                                       } else {
+                                               g_assert_not_reached ();
+                                       }
+                                       /* Compute the address */
+                                       ins->opcode = OP_PADD;
+                                       ins->sreg1 = reg3;
+                                       ins->sreg2 = reg2;
+
+                                       mono_bblock_insert_before_ins (bb, ins, load3);
+                                       mono_bblock_insert_before_ins (bb, load3, load2);
+                                       if (load)
+                                               mono_bblock_insert_before_ins (bb, load2, load);
                                } else {
                                        g_assert (var->opcode == OP_REGOFFSET);
 
@@ -12804,6 +13117,12 @@ mono_spill_global_vars (MonoCompile *cfg, gboolean *need_local_opts)
        }
 #endif
 
+       if (cfg->gsharedvt_locals_var_ins) {
+               /* Nullify if unused */
+               cfg->gsharedvt_locals_var_ins->opcode = OP_PCONST;
+               cfg->gsharedvt_locals_var_ins->inst_imm = 0;
+       }
+
        g_free (live_range_start);
        g_free (live_range_end);
        g_free (live_range_start_bb);
index 56a145d56bcbc03399d121eee26c569e7e39eab0..eb60841a81f5c9daf065e66511d20aa94dd7df17 100644 (file)
@@ -3007,7 +3007,8 @@ emit_call_body (MonoCompile *cfg, guint8 *code, guint32 patch_type, gconstpointe
                                jinfo = g_hash_table_lookup (cfg->abs_patches, data);
                        if (jinfo) {
                                if (jinfo->type == MONO_PATCH_INFO_JIT_ICALL_ADDR) {
-                                       if ((((guint64)data) >> 32) == 0)
+                                       MonoJitICallInfo *mi = mono_find_jit_icall_by_name (jinfo->data.name);
+                                       if (mi && (((guint64)mi->func) >> 32) == 0)
                                                near_call = TRUE;
                                        no_patch = TRUE;
                                } else {
@@ -4817,7 +4818,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        }
 
                        offset = code - cfg->native_code;
-                       mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, ins->inst_p0);
+                       mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, call->method);
                        if (cfg->compile_aot)
                                amd64_mov_reg_membase (code, AMD64_R11, AMD64_RIP, 0, 8);
                        else
@@ -5591,6 +5592,20 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        code = mono_amd64_emit_tls_get (code, ins->dreg, ins->inst_offset);
                        break;
                }
+               case OP_TLS_GET_REG:
+#ifdef TARGET_OSX
+                       // FIXME: tls_gs_offset can change too, do these when calculating the tls offset
+                       if (ins->dreg != ins->sreg1)
+                               amd64_mov_reg_reg (code, ins->dreg, ins->sreg1, sizeof (gpointer));
+                       amd64_shift_reg_imm (code, X86_SHL, ins->dreg, 3);
+                       if (tls_gs_offset)
+                               amd64_alu_reg_imm (code, X86_ADD, ins->dreg, tls_gs_offset);
+                       x86_prefix (code, X86_GS_PREFIX);
+                       amd64_mov_reg_membase (code, ins->dreg, ins->dreg, 0, sizeof (gpointer));
+#else
+                       g_assert_not_reached ();
+#endif
+                       break;
                case OP_MEMORY_BARRIER: {
                        switch (ins->backend.memory_barrier_kind) {
                        case StoreLoadBarrier:
index 6efc0c7b605226a82a3bde920aef57c73ed78598..fd84eab37980bca3d71852d67c18a20f1bdfbc50 100644 (file)
@@ -397,6 +397,10 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
 #define MONO_ARCH_HAVE_CREATE_LLVM_NATIVE_THUNK 1
 
+#ifdef TARGET_OSX
+#define MONO_ARCH_HAVE_TLS_GET_REG 1
+#endif
+
 gboolean
 mono_amd64_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
 
index 572351d0e352538942b1a5c55e135541f48cf863..00953df72456985a5c8b3ef412ff08cc964c291b 100644 (file)
 #include "mini.h"
 #include <string.h>
 
+#if !defined(__APPLE__) && !defined(PLATFORM_ANDROID)
+#include <sys/auxv.h>
+#endif
+
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/utils/mono-mmap.h>
@@ -86,21 +90,21 @@ static gint lmf_addr_tls_offset = -1;
 #define mono_mini_arch_unlock() LeaveCriticalSection (&mini_arch_mutex)
 static CRITICAL_SECTION mini_arch_mutex;
 
-static int v5_supported = 0;
-static int v6_supported = 0;
-static int v7_supported = 0;
-static int v7s_supported = 0;
-static int thumb_supported = 0;
-static int thumb2_supported = 0;
+static gboolean v5_supported = FALSE;
+static gboolean v6_supported = FALSE;
+static gboolean v7_supported = FALSE;
+static gboolean v7s_supported = FALSE;
+static gboolean thumb_supported = FALSE;
+static gboolean thumb2_supported = FALSE;
 /*
  * Whenever to use the ARM EABI
  */
-static int eabi_supported = 0;
+static gboolean eabi_supported = FALSE;
 
 /*
  * Whenever we are on arm/darwin aka the iphone.
  */
-static int darwin = 0;
+static gboolean darwin = FALSE;
 /* 
  * Whenever to use the iphone ABI extensions:
  * http://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/index.html
@@ -108,7 +112,7 @@ static int darwin = 0;
  * This is required for debugging/profiling tools to work, but it has some overhead so it should
  * only be turned on in debug builds.
  */
-static int iphone_abi = 0;
+static gboolean iphone_abi = FALSE;
 
 /*
  * The FPU we are generating code for. This is NOT runtime configurable right now,
@@ -702,7 +706,7 @@ mono_arch_cpu_init (void)
 #if defined(__ARM_EABI__)
        eabi_supported = TRUE;
 #endif
-#if defined(__APPLE__) && defined(MONO_CROSS_COMPILE)
+#if defined(__APPLE__)
                i8_align = 4;
 #else
                i8_align = __alignof__ (gint64);
@@ -826,21 +830,28 @@ guint32
 mono_arch_cpu_optimizations (guint32 *exclude_mask)
 {
        guint32 opts = 0;
+
+       /* Format: armv(5|6|7[s])[-thumb[2]] */
        const char *cpu_arch = getenv ("MONO_CPU_ARCH");
        if (cpu_arch != NULL) {
-               thumb_supported = strstr (cpu_arch, "thumb") != NULL;
                if (strncmp (cpu_arch, "armv", 4) == 0) {
                        v5_supported = cpu_arch [4] >= '5';
                        v6_supported = cpu_arch [4] >= '6';
                        v7_supported = cpu_arch [4] >= '7';
+                       v7s_supported = strncmp (cpu_arch, "armv7s", 6) == 0;
                }
+               thumb_supported = strstr (cpu_arch, "thumb") != NULL;
+               thumb2_supported = strstr (cpu_arch, "thumb2") != NULL;
        } else {
 #if __APPLE__
        thumb_supported = TRUE;
        v5_supported = TRUE;
        darwin = TRUE;
        iphone_abi = TRUE;
-#else
+#elif defined(PLATFORM_ANDROID)
+       /* Android is awesome and doesn't make most of /proc (including
+        * /proc/self/auxv) available to regular processes. So we use
+        * /proc/cpuinfo instead.... */
        char buf [512];
        char *line;
        FILE *file = fopen ("/proc/cpuinfo", "r");
@@ -848,15 +859,19 @@ mono_arch_cpu_optimizations (guint32 *exclude_mask)
                while ((line = fgets (buf, 512, file))) {
                        if (strncmp (line, "Processor", 9) == 0) {
                                char *ver = strstr (line, "(v");
-                               if (ver && (ver [2] == '5' || ver [2] == '6' || ver [2] == '7'))
-                                       v5_supported = TRUE;
-                               if (ver && (ver [2] == '6' || ver [2] == '7'))
-                                       v6_supported = TRUE;
-                               if (ver && (ver [2] == '7'))
-                                       v7_supported = TRUE;
+                               if (ver) {
+                                       if (ver [2] >= '5')
+                                               v5_supported = TRUE;
+                                       if (ver [2] >= '6')
+                                               v6_supported = TRUE;
+                                       if (ver [2] >= '7')
+                                               v7_supported = TRUE;
+                                       /* TODO: Find a way to detect v7s. */
+                               }
                                continue;
                        }
                        if (strncmp (line, "Features", 8) == 0) {
+                               /* TODO: Find a way to detect Thumb 2. */
                                char *th = strstr (line, "thumb");
                                if (th) {
                                        thumb_supported = TRUE;
@@ -866,9 +881,57 @@ mono_arch_cpu_optimizations (guint32 *exclude_mask)
                                continue;
                        }
                }
+
                fclose (file);
                /*printf ("features: v5: %d, thumb: %d\n", v5_supported, thumb_supported);*/
        }
+#else
+       /* This solution is neat because it uses the dynamic linker
+        * instead of the kernel. Thus, it works in QEMU chroots. */
+       unsigned long int hwcap;
+       unsigned long int platform;
+
+       if ((hwcap = getauxval(AT_HWCAP))) {
+               /* We use hardcoded values to avoid depending on a
+                * specific version of the hwcap.h header. */
+
+               /* HWCAP_ARM_THUMB */
+               if ((hwcap & 4) != 0)
+                       /* TODO: Find a way to detect Thumb 2. */
+                       thumb_supported = TRUE;
+       }
+
+       if ((platform = getauxval(AT_PLATFORM))) {
+               /* Actually a pointer to the platform string. */
+               const char *str = (const char *) platform;
+
+               /* Possible CPU name values (from kernel sources):
+                *
+                * - v4
+                * - v5
+                * - v5t
+                * - v6
+                * - v7
+                *
+                * Value is suffixed with the endianness ('b' or 'l').
+                * We only support little endian anyway.
+               */
+
+               if (str [1] >= '5')
+                       v5_supported = TRUE;
+
+               if (str [1] >= '6')
+                       v6_supported = TRUE;
+
+               if (str [1] >= '7')
+                       v7_supported = TRUE;
+
+               /* TODO: Find a way to detect v7s. */
+       }
+
+       /*printf ("hwcap = %i, platform = %s\n", (int) hwcap, (const char *) platform);
+       printf ("thumb = %i, thumb2 = %i, v5 = %i, v6 = %i, v7 = %i, v7s = %i\n",
+               thumb_supported, thumb2_supported, v5_supported, v6_supported, v7_supported, v7s_supported);*/
 #endif
        }
 
@@ -1068,7 +1131,11 @@ typedef enum {
        RegTypeBaseGen,
        RegTypeFP,
        RegTypeStructByVal,
-       RegTypeStructByAddr
+       RegTypeStructByAddr,
+       /* gsharedvt argument passed by addr in greg */
+       RegTypeGSharedVtInReg,
+       /* gsharedvt argument passed by addr on stack */
+       RegTypeGSharedVtOnStack,
 } ArgStorage;
 
 typedef struct {
@@ -1173,7 +1240,6 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
        cinfo->nargs = n;
        gr = ARMREG_R0;
 
-       /* FIXME: handle returning a struct */
        t = mini_type_get_underlying_type (gsctx, sig->ret);
        if (MONO_TYPE_ISSTRUCT (t)) {
                guint32 align;
@@ -1183,6 +1249,8 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
                } else {
                        cinfo->vtype_retaddr = TRUE;
                }
+       } else if (!(t->type == MONO_TYPE_GENERICINST && !mono_type_generic_inst_is_valuetype (t)) && mini_is_gsharedvt_type_gsctx (gsctx, t)) {
+               cinfo->vtype_retaddr = TRUE;
        }
 
        pstart = 0;
@@ -1217,6 +1285,8 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
 
        DEBUG(printf("params: %d\n", sig->param_count));
        for (i = pstart; i < sig->param_count; ++i) {
+               ArgInfo *ainfo = &cinfo->args [n];
+
                if ((sig->call_convention == MONO_CALL_VARARG) && (i == sig->sentinelpos)) {
                        /* Prevent implicit arguments and sig_cookie from
                           being passed in registers */
@@ -1227,7 +1297,7 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
                DEBUG(printf("param %d: ", i));
                if (sig->params [i]->byref) {
                         DEBUG(printf("byref\n"));
-                       add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+                       add_general (&gr, &stack_size, ainfo, TRUE);
                        n++;
                        continue;
                }
@@ -1237,20 +1307,20 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
                case MONO_TYPE_I1:
                case MONO_TYPE_U1:
                        cinfo->args [n].size = 1;
-                       add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+                       add_general (&gr, &stack_size, ainfo, TRUE);
                        n++;
                        break;
                case MONO_TYPE_CHAR:
                case MONO_TYPE_I2:
                case MONO_TYPE_U2:
                        cinfo->args [n].size = 2;
-                       add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+                       add_general (&gr, &stack_size, ainfo, TRUE);
                        n++;
                        break;
                case MONO_TYPE_I4:
                case MONO_TYPE_U4:
                        cinfo->args [n].size = 4;
-                       add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+                       add_general (&gr, &stack_size, ainfo, TRUE);
                        n++;
                        break;
                case MONO_TYPE_I:
@@ -1264,13 +1334,30 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
                case MONO_TYPE_ARRAY:
                case MONO_TYPE_R4:
                        cinfo->args [n].size = sizeof (gpointer);
-                       add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+                       add_general (&gr, &stack_size, ainfo, TRUE);
                        n++;
                        break;
                case MONO_TYPE_GENERICINST:
                        if (!mono_type_generic_inst_is_valuetype (simpletype)) {
                                cinfo->args [n].size = sizeof (gpointer);
-                               add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+                               add_general (&gr, &stack_size, ainfo, TRUE);
+                               n++;
+                               break;
+                       }
+                       if (mini_is_gsharedvt_type_gsctx (gsctx, simpletype)) {
+                               /* gsharedvt arguments are passed by ref */
+                               g_assert (mini_is_gsharedvt_type_gsctx (gsctx, simpletype));
+                               add_general (&gr, &stack_size, ainfo, TRUE);
+                               switch (ainfo->storage) {
+                               case RegTypeGeneral:
+                                       ainfo->storage = RegTypeGSharedVtInReg;
+                                       break;
+                               case RegTypeBase:
+                                       ainfo->storage = RegTypeGSharedVtOnStack;
+                                       break;
+                               default:
+                                       g_assert_not_reached ();
+                               }
                                n++;
                                break;
                        }
@@ -1298,27 +1385,27 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
                        align_size += (sizeof (gpointer) - 1);
                        align_size &= ~(sizeof (gpointer) - 1);
                        nwords = (align_size + sizeof (gpointer) -1 ) / sizeof (gpointer);
-                       cinfo->args [n].storage = RegTypeStructByVal;
-                       cinfo->args [n].struct_size = size;
+                       ainfo->storage = RegTypeStructByVal;
+                       ainfo->struct_size = size;
                        /* FIXME: align stack_size if needed */
                        if (eabi_supported) {
                                if (align >= 8 && (gr & 1))
                                        gr ++;
                        }
                        if (gr > ARMREG_R3) {
-                               cinfo->args [n].size = 0;
-                               cinfo->args [n].vtsize = nwords;
+                               ainfo->size = 0;
+                               ainfo->vtsize = nwords;
                        } else {
                                int rest = ARMREG_R3 - gr + 1;
                                int n_in_regs = rest >= nwords? nwords: rest;
 
-                               cinfo->args [n].size = n_in_regs;
-                               cinfo->args [n].vtsize = nwords - n_in_regs;
-                               cinfo->args [n].reg = gr;
+                               ainfo->size = n_in_regs;
+                               ainfo->vtsize = nwords - n_in_regs;
+                               ainfo->reg = gr;
                                gr += n_in_regs;
                                nwords -= n_in_regs;
                        }
-                       cinfo->args [n].offset = stack_size;
+                       ainfo->offset = stack_size;
                        /*g_print ("offset for arg %d at %d\n", n, stack_size);*/
                        stack_size += nwords * sizeof (gpointer);
                        n++;
@@ -1327,8 +1414,25 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
                case MONO_TYPE_U8:
                case MONO_TYPE_I8:
                case MONO_TYPE_R8:
-                       cinfo->args [n].size = 8;
-                       add_general (&gr, &stack_size, cinfo->args + n, FALSE);
+                       ainfo->size = 8;
+                       add_general (&gr, &stack_size, ainfo, FALSE);
+                       n++;
+                       break;
+               case MONO_TYPE_VAR:
+               case MONO_TYPE_MVAR:
+                       /* gsharedvt arguments are passed by ref */
+                       g_assert (mini_is_gsharedvt_type_gsctx (gsctx, simpletype));
+                       add_general (&gr, &stack_size, ainfo, TRUE);
+                       switch (ainfo->storage) {
+                       case RegTypeGeneral:
+                               ainfo->storage = RegTypeGSharedVtInReg;
+                               break;
+                       case RegTypeBase:
+                               ainfo->storage = RegTypeGSharedVtOnStack;
+                               break;
+                       default:
+                               g_assert_not_reached ();
+                       }
                        n++;
                        break;
                default:
@@ -1386,12 +1490,24 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
                                cinfo->ret.reg = ARMREG_R0;
                                break;
                        }
+                       // FIXME: Only for variable types
+                       if (mini_is_gsharedvt_type_gsctx (gsctx, simpletype)) {
+                               cinfo->ret.storage = RegTypeStructByAddr;
+                               g_assert (cinfo->vtype_retaddr);
+                               break;
+                       }
                        /* Fall through */
                case MONO_TYPE_VALUETYPE:
                case MONO_TYPE_TYPEDBYREF:
                        if (cinfo->ret.storage != RegTypeStructByVal)
                                cinfo->ret.storage = RegTypeStructByAddr;
                        break;
+               case MONO_TYPE_VAR:
+               case MONO_TYPE_MVAR:
+                       g_assert (mini_is_gsharedvt_type_gsctx (gsctx, simpletype));
+                       cinfo->ret.storage = RegTypeStructByAddr;
+                       g_assert (cinfo->vtype_retaddr);
+                       break;
                case MONO_TYPE_VOID:
                        break;
                default:
@@ -1659,7 +1775,7 @@ mono_arch_allocate_vars (MonoCompile *cfg)
 
                t = ins->inst_vtype;
                if (cfg->gsharedvt && mini_is_gsharedvt_variable_type (cfg, t))
-                       t = mini_get_gsharedvt_alloc_type_for_type (cfg, t);
+                       continue;
 
                /* inst->backend.is_pinvoke indicates native sized value types, this is used by the
                * pinvoke wrappers when they call functions returning structure */
@@ -2003,6 +2119,8 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
 #endif
                        break;
                case RegTypeStructByVal:
+               case RegTypeGSharedVtInReg:
+               case RegTypeGSharedVtOnStack:
                        MONO_INST_NEW (cfg, ins, OP_OUTARG_VT);
                        ins->opcode = OP_OUTARG_VT;
                        ins->sreg1 = in->dreg;
@@ -2108,6 +2226,17 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
        int struct_size = ainfo->struct_size;
        int i, soffset, dreg, tmpreg;
 
+       if (ainfo->storage == RegTypeGSharedVtInReg) {
+               /* Pass by addr */
+               mono_call_inst_add_outarg_reg (cfg, call, src->dreg, ainfo->reg, FALSE);
+               return;
+       }
+       if (ainfo->storage == RegTypeGSharedVtOnStack) {
+               /* Pass by addr on stack */
+               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, ARMREG_SP, ainfo->offset, src->dreg);
+               return;
+       }
+
        soffset = 0;
        for (i = 0; i < ainfo->size; ++i) {
                dreg = mono_alloc_ireg (cfg);
@@ -4127,13 +4256,13 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        break;
                case OP_IREM:
                        g_assert (v7s_supported);
-                       ARM_SDIV (code, ARMREG_IP, ins->sreg1, ins->sreg2);
-                       ARM_MLS (code, ins->dreg, ARMREG_IP, ins->sreg2, ins->sreg1);
+                       ARM_SDIV (code, ARMREG_LR, ins->sreg1, ins->sreg2);
+                       ARM_MLS (code, ins->dreg, ARMREG_LR, ins->sreg2, ins->sreg1);
                        break;
                case OP_IREM_UN:
                        g_assert (v7s_supported);
-                       ARM_UDIV (code, ARMREG_IP, ins->sreg1, ins->sreg2);
-                       ARM_MLS (code, ins->dreg, ARMREG_IP, ins->sreg2, ins->sreg1);
+                       ARM_UDIV (code, ARMREG_LR, ins->sreg1, ins->sreg2);
+                       ARM_MLS (code, ins->dreg, ARMREG_LR, ins->sreg2, ins->sreg1);
                        break;
                case OP_DIV_IMM:
                case OP_REM_IMM:
@@ -5118,25 +5247,27 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        pos = 0;
        prev_sp_offset = 0;
 
+       if (iphone_abi) {
+               /* 
+                * The iphone uses R7 as the frame pointer, and it points at the saved
+                * r7+lr:
+                *         <lr>
+                * r7 ->   <r7>
+                *         <rest of frame>
+                * We can't use r7 as a frame pointer since it points into the middle of
+                * the frame, so we keep using our own frame pointer.
+                * FIXME: Optimize this.
+                */
+               g_assert (darwin);
+               ARM_PUSH (code, (1 << ARMREG_R7) | (1 << ARMREG_LR));
+               ARM_MOV_REG_REG (code, ARMREG_R7, ARMREG_SP);
+               prev_sp_offset += 8; /* r7 and lr */
+               mono_emit_unwind_op_def_cfa_offset (cfg, code, prev_sp_offset);
+               mono_emit_unwind_op_offset (cfg, code, ARMREG_R7, (- prev_sp_offset) + 0);
+       }
+
        if (!method->save_lmf) {
                if (iphone_abi) {
-                       /* 
-                        * The iphone uses R7 as the frame pointer, and it points at the saved
-                        * r7+lr:
-                        *         <lr>
-                        * r7 ->   <r7>
-                        *         <rest of frame>
-                        * We can't use r7 as a frame pointer since it points into the middle of
-                        * the frame, so we keep using our own frame pointer.
-                        * FIXME: Optimize this.
-                        */
-                       g_assert (darwin);
-                       ARM_PUSH (code, (1 << ARMREG_R7) | (1 << ARMREG_LR));
-                       ARM_MOV_REG_REG (code, ARMREG_R7, ARMREG_SP);
-                       prev_sp_offset += 8; /* r7 and lr */
-                       mono_emit_unwind_op_def_cfa_offset (cfg, code, prev_sp_offset);
-                       mono_emit_unwind_op_offset (cfg, code, ARMREG_R7, (- prev_sp_offset) + 0);
-
                        /* No need to push LR again */
                        if (cfg->used_int_regs)
                                ARM_PUSH (code, cfg->used_int_regs);
@@ -5172,11 +5303,14 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                reg_offset = 0;
                for (i = 0; i < 16; ++i) {
                        if ((i > ARMREG_R3) && (i != ARMREG_SP) && (i != ARMREG_PC)) {
-                               mono_emit_unwind_op_offset (cfg, code, i, (- prev_sp_offset) + reg_offset);
+                               /* The original r7 is saved at the start */
+                               if (!(iphone_abi && i == ARMREG_R7))
+                                       mono_emit_unwind_op_offset (cfg, code, i, (- prev_sp_offset) + reg_offset);
                                reg_offset += 4;
                        }
                }
-               pos += sizeof (MonoLMF) - prev_sp_offset;
+               g_assert (reg_offset == 4 * 10);
+               pos += sizeof (MonoLMF) - (4 * 10);
                lmf_offset = pos;
        }
        alloc_size += pos;
@@ -5289,7 +5423,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                g_print ("Argument %d assigned to register %s\n", pos, mono_arch_regname (inst->dreg));
                } else {
                        /* the argument should be put on the stack: FIXME handle size != word  */
-                       if (ainfo->storage == RegTypeGeneral || ainfo->storage == RegTypeIRegPair) {
+                       if (ainfo->storage == RegTypeGeneral || ainfo->storage == RegTypeIRegPair || ainfo->storage == RegTypeGSharedVtInReg) {
                                switch (ainfo->size) {
                                case 1:
                                        if (arm_is_imm12 (inst->inst_offset))
@@ -5336,7 +5470,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                ARM_LDR_IMM (code, ARMREG_LR, ARMREG_SP, (prev_sp_offset + ainfo->offset));
                                ARM_STR_IMM (code, ARMREG_LR, inst->inst_basereg, inst->inst_offset + 4);
                                ARM_STR_IMM (code, ARMREG_R3, inst->inst_basereg, inst->inst_offset);
-                       } else if (ainfo->storage == RegTypeBase) {
+                       } else if (ainfo->storage == RegTypeBase || ainfo->storage == RegTypeGSharedVtOnStack) {
                                if (arm_is_imm12 (prev_sp_offset + ainfo->offset)) {
                                        ARM_LDR_IMM (code, ARMREG_LR, ARMREG_SP, (prev_sp_offset + ainfo->offset));
                                } else {
@@ -5587,10 +5721,19 @@ mono_arch_emit_epilog (MonoCompile *cfg)
                        sp_adj += 4;
                        reg ++;
                }
+               if (iphone_abi)
+                       /* Restored later */
+                       regmask &= ~(1 << ARMREG_PC);
                /* point sp at the registers to restore: 10 is 14 -4, because we skip r0-r3 */
                code = emit_big_add (code, ARMREG_SP, cfg->frame_reg, cfg->stack_usage - lmf_offset + sp_adj);
                /* restore iregs */
                ARM_POP (code, regmask); 
+               if (iphone_abi) {
+                       /* Restore saved r7, restore LR to PC */
+                       /* Skip lr from the lmf */
+                       ARM_ADD_REG_IMM (code, ARMREG_SP, ARMREG_SP, sizeof (gpointer), 0);
+                       ARM_POP (code, (1 << ARMREG_R7) | (1 << ARMREG_PC));
+               }
        } else {
                if ((i = mono_arm_is_rotated_imm8 (cfg->stack_usage, &rot_amount)) >= 0) {
                        ARM_ADD_REG_IMM (code, ARMREG_SP, cfg->frame_reg, i, rot_amount);
index 1fc345f58b5a2c87c8240dfde7016a2b6dfb794e..86859aaf37b1e3252ec964d53460d308610afd40 100644 (file)
  * reproduceable results for benchmarks */
 #define MONO_ARCH_CODE_ALIGNMENT 32
 
-
 /* Return value marshalling for calls between gsharedvt and normal code */
 typedef enum {
        GSHAREDVT_RET_NONE = 0,
-       GSHAREDVT_RET_IREGS = 1,
-       GSHAREDVT_RET_I1 = 5,
-       GSHAREDVT_RET_U1 = 6,
-       GSHAREDVT_RET_I2 = 7,
-       GSHAREDVT_RET_U2 = 8
+       GSHAREDVT_RET_IREG = 1,
+       GSHAREDVT_RET_IREGS = 2,
+       GSHAREDVT_RET_I1 = 3,
+       GSHAREDVT_RET_U1 = 4,
+       GSHAREDVT_RET_I2 = 5,
+       GSHAREDVT_RET_U2 = 6
 } GSharedVtRetMarshal;
 
 typedef struct {
@@ -141,7 +141,7 @@ void
 mono_arm_throw_exception_by_token (guint32 type_token, mgreg_t pc, mgreg_t sp, mgreg_t *int_regs, gdouble *fp_regs);
 
 gpointer
-mono_arm_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpointer *callee, gpointer *caller_regs, gpointer *callee_regs, gpointer mrgctx_reg) MONO_INTERNAL;
+mono_arm_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpointer *callee, gpointer mrgctx_reg) MONO_INTERNAL;
 
 typedef enum {
        MONO_ARM_FPU_NONE = 0,
index 4e4c783d622c681aa69580ac4086bb6ebada79c2..83057869f3adda11ee34298ea1d3793c30f066ce 100644 (file)
@@ -498,6 +498,7 @@ mono_print_ins_index (int i, MonoInst *ins)
                        printf (" R%d", ((MonoInst*)ins->inst_p0)->dreg);
                        break;
                case OP_REGOFFSET:
+               case OP_GSHAREDVT_ARG_REGOFFSET:
                        printf (" + 0x%lx", (long)ins->inst_offset);
                        break;
                default:
index 5ec06d20a748c8036e64b9900bbc623f3a47b723..9f566dd299a065c21152a65f8a192e4d7e01aec6 100644 (file)
@@ -246,32 +246,47 @@ void
 mono_gdb_render_native_backtraces (pid_t crashed_pid)
 {
        const char *argv [5];
-       char gdb_template [] = "/tmp/mono-gdb-commands.XXXXXX";
+       char template [] = "/tmp/mono-gdb-commands.XXXXXX";
+       FILE *commands;
+       gboolean using_lldb = FALSE;
 
        argv [0] = g_find_program_in_path ("gdb");
-       if (argv [0] == NULL) {
-               return;
+       if (!argv [0]) {
+               argv [0] = g_find_program_in_path ("lldb");
+               using_lldb = TRUE;
        }
 
-       if (mkstemp (gdb_template) != -1) {
-               FILE *gdb_commands = fopen (gdb_template, "w");
-
-               fprintf (gdb_commands, "attach %ld\n", (long) crashed_pid);
-               fprintf (gdb_commands, "info threads\n");
-               fprintf (gdb_commands, "thread apply all bt\n");
+       if (argv [0] == NULL)
+               return;
 
-               fflush (gdb_commands);
-               fclose (gdb_commands);
+       if (mkstemp (template) == -1)
+               return;
 
+       commands = fopen (template, "w");
+       if (using_lldb) {
+               fprintf (commands, "process attach --pid %ld\n", (long) crashed_pid);
+               fprintf (commands, "script lldb.debugger.HandleCommand (\"thread list\")\n");
+               fprintf (commands, "script lldb.debugger.HandleCommand (\"thread backtrace all\")\n");
+               fprintf (commands, "detach\n");
+               fprintf (commands, "quit\n");
+               argv [1] = "--source";
+               argv [2] = template;
+               argv [3] = 0;
+               
+       } else {
+               fprintf (commands, "attach %ld\n", (long) crashed_pid);
+               fprintf (commands, "info threads\n");
+               fprintf (commands, "thread apply all bt\n");
                argv [1] = "-batch";
                argv [2] = "-x";
-               argv [3] = gdb_template;
+               argv [3] = template;
                argv [4] = 0;
-
-               execv (argv [0], (char**)argv);
-
-               unlink (gdb_template);
        }
+       fflush (commands);
+       fclose (commands);
+
+       execv (argv [0], (char**)argv);
+       unlink (template);
 }
 
 gboolean
index 66be5bef73bc84b2077374ea8d74fd6d5901f14e..21b48d0420522c47ef2348102fb573ea2d86ca96 100644 (file)
@@ -356,7 +356,7 @@ mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
        gboolean err;
        gpointer ip = MONO_CONTEXT_GET_IP (ctx);
        MonoJitInfo *ji;
-       MonoDomain *target_domain;
+       MonoDomain *target_domain = domain;
 
        if (trace)
                *trace = NULL;
index 19482292b0b36d61ac002a4efee87fbdf32e7fb6..f025ec723c9cf67f09b4b362e21833f3df221ca3 100644 (file)
@@ -27,9 +27,6 @@
 static void
 mono_class_unregister_image_generic_subclasses (MonoImage *image, gpointer user_data);
 
-static MonoType*
-mini_get_gsharedvt_alloc_type_gsctx (MonoGenericSharingContext *gsctx, MonoType *t);
-
 static gboolean partial_supported;
 
 static inline gboolean
@@ -534,7 +531,12 @@ inflate_info (MonoRuntimeGenericContextInfoTemplate *oti, MonoGenericContext *co
        case MONO_RGCTX_INFO_CAST_CACHE:
        case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE:
        case MONO_RGCTX_INFO_VALUE_SIZE:
-       case MONO_RGCTX_INFO_CLASS_IS_REF: {
+       case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
+       case MONO_RGCTX_INFO_MEMCPY:
+       case MONO_RGCTX_INFO_BZERO:
+       case MONO_RGCTX_INFO_LOCAL_OFFSET:
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX: {
                gpointer result = mono_class_inflate_generic_type_with_mempool (temporary ? NULL : class->image,
                        data, context, &error);
                g_assert (mono_error_ok (&error)); /*FIXME proper error handling*/
@@ -569,6 +571,30 @@ inflate_info (MonoRuntimeGenericContextInfoTemplate *oti, MonoGenericContext *co
                g_assert (inflated_method->klass == inflated_class);
                return inflated_method;
        }
+       case MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO: {
+               MonoGSharedVtMethodInfo *info = data;
+               MonoGSharedVtMethodInfo *res;
+               int i;
+
+               // FIXME:
+               res = g_new0 (MonoGSharedVtMethodInfo, 1);
+               /*
+               res->nlocals = info->nlocals;
+               res->locals_types = g_new0 (MonoType*, info->nlocals);
+               for (i = 0; i < info->nlocals; ++i)
+                       res->locals_types [i] = mono_class_inflate_generic_type (info->locals_types [i], context);
+               */
+               res->entries = g_ptr_array_new ();
+               for (i = 0; i < info->entries->len; ++i) {
+                       MonoRuntimeGenericContextInfoTemplate *otemplate = g_ptr_array_index (info->entries, i);
+                       MonoRuntimeGenericContextInfoTemplate *template = g_new0 (MonoRuntimeGenericContextInfoTemplate, 1);
+
+                       memcpy (template, otemplate, sizeof (MonoRuntimeGenericContextInfoTemplate));
+                       template->data = inflate_info (template, context, class, FALSE);
+                       g_ptr_array_add (res->entries, template);
+               }
+               return res;
+       }
        case MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE:
        case MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT: {
                MonoJumpInfoGSharedVtCall *info = data;
@@ -923,11 +949,118 @@ class_type_info (MonoDomain *domain, MonoClass *class, MonoRgctxInfoType info_ty
                        return GUINT_TO_POINTER (sizeof (gpointer));
                else
                        return GUINT_TO_POINTER (mono_class_value_size (class, NULL));
-       case MONO_RGCTX_INFO_CLASS_IS_REF:
+       case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
                if (MONO_TYPE_IS_REFERENCE (&class->byval_arg))
                        return GUINT_TO_POINTER (1);
+               else if (mono_class_is_nullable (class))
+                       return GUINT_TO_POINTER (2);
                else
                        return GUINT_TO_POINTER (0);
+       case MONO_RGCTX_INFO_MEMCPY:
+       case MONO_RGCTX_INFO_BZERO: {
+               static MonoMethod *memcpy_method [17];
+               static MonoMethod *bzero_method [17];
+               MonoJitDomainInfo *domain_info;
+               int size;
+               guint32 align;
+
+               domain_info = domain_jit_info (domain);
+
+               if (MONO_TYPE_IS_REFERENCE (&class->byval_arg)) {
+                       size = sizeof (gpointer);
+                       align = sizeof (gpointer);
+               } else {
+                       size = mono_class_value_size (class, &align);
+               }
+
+               if (size != 1 && size != 2 && size != 4 && size != 8)
+                       size = 0;
+               if (align < size)
+                       size = 0;
+
+               if (info_type == MONO_RGCTX_INFO_MEMCPY) {
+                       if (!memcpy_method [size]) {
+                               MonoMethod *m;
+                               char name [32];
+
+                               if (size == 0)
+                                       sprintf (name, "memcpy");
+                               else
+                                       sprintf (name, "memcpy_aligned_%d", size);
+                               m = mono_class_get_method_from_name (mono_defaults.string_class, name, 3);
+                               g_assert (m);
+                               mono_memory_barrier ();
+                               memcpy_method [size] = m;
+                       }
+                       if (!domain_info->memcpy_addr [size]) {
+                               gpointer addr = mono_compile_method (memcpy_method [size]);
+                               mono_memory_barrier ();
+                               domain_info->memcpy_addr [size] = addr;
+                       }
+                       return domain_info->memcpy_addr [size];
+               } else {
+                       if (!bzero_method [size]) {
+                               MonoMethod *m;
+                               char name [32];
+
+                               if (size == 0)
+                                       sprintf (name, "bzero");
+                               else
+                                       sprintf (name, "bzero_aligned_%d", size);
+                               m = mono_class_get_method_from_name (mono_defaults.string_class, name, 2);
+                               g_assert (m);
+                               mono_memory_barrier ();
+                               bzero_method [size] = m;
+                       }
+                       if (!domain_info->bzero_addr [size]) {
+                               gpointer addr = mono_compile_method (bzero_method [size]);
+                               mono_memory_barrier ();
+                               domain_info->bzero_addr [size] = addr;
+                       }
+                       return domain_info->bzero_addr [size];
+               }
+       }
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX: {
+               MonoMethod *method;
+               gpointer addr;
+               MonoJitInfo *ji;
+               MonoGenericContext *ctx;
+
+               if (!mono_class_is_nullable (class))
+                       /* This can happen since all the entries in MonoGSharedVtMethodInfo are inflated, even those which are not used */
+                       return NULL;
+
+               if (info_type == MONO_RGCTX_INFO_NULLABLE_CLASS_BOX)
+                       method = mono_class_get_method_from_name (class, "Box", 1);
+               else
+                       method = mono_class_get_method_from_name (class, "Unbox", 1);
+
+               addr = mono_compile_method (method);
+               // The caller uses the gsharedvt call signature
+               ji = mini_jit_info_table_find (mono_domain_get (), mono_get_addr_from_ftnptr (addr), NULL);
+               g_assert (ji);
+               if (mini_jit_info_is_gsharedvt (ji))
+                       return mono_create_static_rgctx_trampoline (method, addr);
+               else {
+                       MonoGenericSharingContext gsctx;
+                       MonoMethodSignature *sig, *gsig;
+                       MonoMethod *gmethod;
+
+                       /* Need to add an out wrapper */
+
+                       /* FIXME: We have no access to the gsharedvt signature/gsctx used by the caller, so have to construct it ourselves */
+                       gmethod = mini_get_shared_method (method);
+                       sig = mono_method_signature (method);
+                       gsig = mono_method_signature (gmethod);
+                       ctx = mono_method_get_context (gmethod);
+                       mini_init_gsctx (ctx, &gsctx);
+
+                       addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, &gsctx, -1, FALSE);
+                       addr = mono_create_static_rgctx_trampoline (method, addr);
+                       return addr;
+               }
+       }
        default:
                g_assert_not_reached ();
        }
@@ -1095,7 +1228,11 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
        case MONO_RGCTX_INFO_CAST_CACHE:
        case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE:
        case MONO_RGCTX_INFO_VALUE_SIZE:
-       case MONO_RGCTX_INFO_CLASS_IS_REF: {
+       case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
+       case MONO_RGCTX_INFO_MEMCPY:
+       case MONO_RGCTX_INFO_BZERO:
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX: {
                MonoClass *arg_class = mono_class_from_mono_type (data);
 
                free_inflated_info (oti->info_type, data);
@@ -1119,7 +1256,7 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
                gpointer addr;
 
                addr = mono_compile_method (data);
-               return mini_add_method_trampoline (NULL, data, addr, mono_method_needs_static_rgctx_invoke (data, FALSE));
+               return mini_add_method_trampoline (NULL, data, addr, mono_method_needs_static_rgctx_invoke (data, FALSE), FALSE);
        }
 #ifndef DISABLE_REMOTING
        case MONO_RGCTX_INFO_REMOTING_INVOKE_WITH_CHECK:
@@ -1176,7 +1313,7 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
                gji = mono_jit_info_get_generic_jit_info (caller_ji);
                g_assert (gji);
 
-               addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, gji->generic_sharing_context, -1, TRUE);
+               addr = mini_get_gsharedvt_wrapper (FALSE, NULL, sig, gsig, gji->generic_sharing_context, -1, TRUE);
 
                return addr;
        }
@@ -1302,6 +1439,45 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
 
                return addr;
        }
+       case MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO: {
+               MonoGSharedVtMethodInfo *info = data;
+               MonoGSharedVtMethodRuntimeInfo *res;
+               MonoType *t;
+               int i, offset, align, size;
+
+               // FIXME:
+               res = g_malloc0 (sizeof (MonoGSharedVtMethodRuntimeInfo) + (info->entries->len * sizeof (gpointer)));
+
+               offset = 0;
+               for (i = 0; i < info->entries->len; ++i) {
+                       MonoRuntimeGenericContextInfoTemplate *template = g_ptr_array_index (info->entries, i);
+
+                       switch (template->info_type) {
+                       case MONO_RGCTX_INFO_LOCAL_OFFSET:
+                               t = template->data;
+
+                               size = mono_type_size (t, &align);
+
+                               if (align < sizeof (gpointer))
+                                       align = sizeof (gpointer);
+                               if (MONO_TYPE_ISSTRUCT (t) && align < 2 * sizeof (gpointer))
+                                       align = 2 * sizeof (gpointer);
+                       
+                               // FIXME: Do the same things as alloc_stack_slots
+                               offset += align - 1;
+                               offset &= ~(align - 1);
+                               res->entries [i] = GINT_TO_POINTER (offset);
+                               offset += size;
+                               break;
+                       default:
+                               res->entries [i] = instantiate_info (domain, template, context, class, NULL);
+                               break;
+                       }
+               }
+               res->locals_size = offset;
+
+               return res;
+       }
        default:
                g_assert_not_reached ();
        }
@@ -1351,6 +1527,7 @@ mono_rgctx_info_type_to_str (MonoRgctxInfoType type)
        case MONO_RGCTX_INFO_TYPE: return "TYPE";
        case MONO_RGCTX_INFO_REFLECTION_TYPE: return "REFLECTION_TYPE";
        case MONO_RGCTX_INFO_METHOD: return "METHOD";
+       case MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO: return "GSHAREDVT_INFO";
        case MONO_RGCTX_INFO_GENERIC_METHOD_CODE: return "GENERIC_METHOD_CODE";
        case MONO_RGCTX_INFO_CLASS_FIELD: return "CLASS_FIELD";
        case MONO_RGCTX_INFO_METHOD_RGCTX: return "METHOD_RGCTX";
@@ -1360,11 +1537,15 @@ mono_rgctx_info_type_to_str (MonoRgctxInfoType type)
        case MONO_RGCTX_INFO_CAST_CACHE: return "CAST_CACHE";
        case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE: return "ARRAY_ELEMENT_SIZE";
        case MONO_RGCTX_INFO_VALUE_SIZE: return "VALUE_SIZE";
-       case MONO_RGCTX_INFO_CLASS_IS_REF: return "CLASS_IS_REF";
+       case MONO_RGCTX_INFO_CLASS_BOX_TYPE: return "CLASS_BOX_TYPE";
        case MONO_RGCTX_INFO_FIELD_OFFSET: return "FIELD_OFFSET";
        case MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE: return "METHOD_GSHAREDVT_OUT_TRAMPOLINE";
        case MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT: return "METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT";
        case MONO_RGCTX_INFO_SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI: return "SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI";
+       case MONO_RGCTX_INFO_MEMCPY: return "MEMCPY";
+       case MONO_RGCTX_INFO_BZERO: return "BZERO";
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX: return "NULLABLE_CLASS_BOX";
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX: return "NULLABLE_CLASS_UNBOX";
        default:
                return "<UNKNOWN RGCTX INFO TYPE>";
        }
@@ -1440,9 +1621,14 @@ info_equal (gpointer data1, gpointer data2, MonoRgctxInfoType info_type)
        case MONO_RGCTX_INFO_CAST_CACHE:
        case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE:
        case MONO_RGCTX_INFO_VALUE_SIZE:
-       case MONO_RGCTX_INFO_CLASS_IS_REF:
+       case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
+       case MONO_RGCTX_INFO_MEMCPY:
+       case MONO_RGCTX_INFO_BZERO:
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX:
                return mono_class_from_mono_type (data1) == mono_class_from_mono_type (data2);
        case MONO_RGCTX_INFO_METHOD:
+       case MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO:
        case MONO_RGCTX_INFO_GENERIC_METHOD_CODE:
        case MONO_RGCTX_INFO_CLASS_FIELD:
        case MONO_RGCTX_INFO_FIELD_OFFSET:
@@ -1461,6 +1647,38 @@ info_equal (gpointer data1, gpointer data2, MonoRgctxInfoType info_type)
        return FALSE;
 }
 
+/*
+ * mini_rgctx_info_type_to_patch_info_type:
+ *
+ *   Return the type of the runtime object referred to by INFO_TYPE.
+ */
+MonoJumpInfoType
+mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type)
+{
+       switch (info_type) {
+       case MONO_RGCTX_INFO_STATIC_DATA:
+       case MONO_RGCTX_INFO_KLASS:
+       case MONO_RGCTX_INFO_VTABLE:
+       case MONO_RGCTX_INFO_TYPE:
+       case MONO_RGCTX_INFO_REFLECTION_TYPE:
+       case MONO_RGCTX_INFO_CAST_CACHE:
+       case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE:
+       case MONO_RGCTX_INFO_VALUE_SIZE:
+       case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
+       case MONO_RGCTX_INFO_MEMCPY:
+       case MONO_RGCTX_INFO_BZERO:
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+       case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX:
+       case MONO_RGCTX_INFO_LOCAL_OFFSET:
+               return MONO_PATCH_INFO_CLASS;
+       case MONO_RGCTX_INFO_FIELD_OFFSET:
+               return MONO_PATCH_INFO_FIELD;
+       default:
+               g_assert_not_reached ();
+               return -1;
+       }
+}
+
 static int
 lookup_or_register_info (MonoClass *class, int type_argc, gpointer data, MonoRgctxInfoType info_type,
        MonoGenericContext *generic_context)
@@ -2314,7 +2532,7 @@ mini_get_basic_type_from_generic (MonoGenericSharingContext *gsctx, MonoType *ty
                g_assert (gsctx);
        */
        if (!type->byref && (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR) && mini_is_gsharedvt_type_gsctx (gsctx, type))
-               return mini_get_gsharedvt_alloc_type_gsctx (gsctx, type);
+               return type;
        else
                return mono_type_get_basic_type_from_generic (type);
 }
@@ -2330,6 +2548,8 @@ mini_type_get_underlying_type (MonoGenericSharingContext *gsctx, MonoType *type)
 {
        if (type->byref)
                return &mono_defaults.int_class->byval_arg;
+       if (!type->byref && (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR) && mini_is_gsharedvt_type_gsctx (gsctx, type))
+               return type;
        return mini_get_basic_type_from_generic (gsctx, mono_type_get_underlying_type (type));
 }
 
@@ -2367,8 +2587,7 @@ mini_type_stack_size_full (MonoGenericSharingContext *gsctx, MonoType *t, guint3
                g_assert (gsctx);
        */
 
-       if (mini_is_gsharedvt_type_gsctx (gsctx, t))
-               t = mini_get_gsharedvt_alloc_type_gsctx (gsctx, t);
+       //g_assert (!mini_is_gsharedvt_type_gsctx (gsctx, t));
 
        if (pinvoke) {
                size = mono_type_native_stack_size (t, align);
@@ -2512,18 +2731,6 @@ mini_is_gsharedvt_variable_type (MonoCompile *cfg, MonoType *t)
        return FALSE;
 }
 
-static MonoType*
-mini_get_gsharedvt_alloc_type_gsctx (MonoGenericSharingContext *gsctx, MonoType *t)
-{
-       return NULL;
-}
-
-MonoType*
-mini_get_gsharedvt_alloc_type_for_type (MonoCompile *cfg, MonoType *t)
-{
-       return NULL;
-}
-
 gboolean
 mini_is_gsharedvt_sharable_method (MonoMethod *method)
 {
index 2b90cd692daac6ad903e56bbb23cbbb5ff4cc6e2..a03e94fbebf4abac5e6241ad7909b03e93ce3649 100644 (file)
@@ -36,7 +36,6 @@
 #include <llvm/ExecutionEngine/JITMemoryManager.h>
 #include <llvm/ExecutionEngine/JITEventListener.h>
 #include <llvm/Target/TargetOptions.h>
-#include <llvm/Target/TargetData.h>
 #include <llvm/Target/TargetRegisterInfo.h>
 #include <llvm/Analysis/Verifier.h>
 #include <llvm/Analysis/Passes.h>
@@ -48,6 +47,9 @@
 #include <llvm/CodeGen/MachineFunctionPass.h>
 #include <llvm/CodeGen/MachineFunction.h>
 #include <llvm/CodeGen/MachineFrameInfo.h>
+#include <llvm/IR/Function.h>
+#include <llvm/IR/IRBuilder.h>
+#include <llvm/IR/Module.h>
 //#include <llvm/LinkAllPasses.h>
 
 #include "llvm-c/Core.h"
@@ -126,13 +128,18 @@ public:
                return NULL;
        }
 
-       virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
-                                                                                unsigned SectionID) {
+       virtual uint8_t* allocateDataSection(uintptr_t, unsigned int, unsigned int, bool) {
                // FIXME:
                assert(0);
                return NULL;
        }
 
+       virtual bool applyPermissions(std::string*) {
+               // FIXME:
+               assert(0);
+               return false;
+       }
+
        virtual void* getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure) {
                void *res;
                char *err;
@@ -441,7 +448,7 @@ force_pass_linking (void)
       (void) llvm::createLCSSAPass();
       (void) llvm::createLICMPass();
       (void) llvm::createLazyValueInfoPass();
-      (void) llvm::createLoopDependenceAnalysisPass();
+      //(void) llvm::createLoopDependenceAnalysisPass();
          /*
       (void) llvm::createLoopExtractorPass();
          */
@@ -567,7 +574,7 @@ mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, Func
 
   fpm = new FunctionPassManager (unwrap (MP));
 
-  fpm->add(new TargetData(*EE->getTargetData()));
+  fpm->add(new DataLayout(*EE->getDataLayout()));
 
   PassRegistry &Registry = *PassRegistry::getPassRegistry();
   initializeCore(Registry);
@@ -580,7 +587,7 @@ mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, Func
   //initializeInstrumentation(Registry);
   initializeTarget(Registry);
 
-  llvm::cl::ParseEnvironmentOptions("mono", "MONO_LLVM", "", false);
+  llvm::cl::ParseEnvironmentOptions("mono", "MONO_LLVM", "");
 
   if (PassList.size() > 0) {
          /* Use the passes specified by the env variable */
@@ -595,14 +602,14 @@ mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, Func
          }
   } else {
          /* Use the same passes used by 'opt' by default, without the ipo passes */
-         const char *opts = "-simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -basiccg -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -domfrontier -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -iv-users -indvars -loop-deletion -loop-simplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -gvn -simplifycfg -preverify -domtree -verify";
+         const char *opts = "-simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -domfrontier -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -iv-users -indvars -loop-deletion -loop-simplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -gvn -simplifycfg -preverify -domtree -verify";
          char **args;
          int i;
 
          args = g_strsplit (opts, " ", 1000);
          for (i = 0; args [i]; i++)
                  ;
-         llvm::cl::ParseCommandLineOptions (i, args, "", false);
+         llvm::cl::ParseCommandLineOptions (i, args, "");
          g_strfreev (args);
 
          for (unsigned i = 0; i < PassList.size(); ++i) {
@@ -611,6 +618,7 @@ mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, Func
 
                  if (PassInf->getNormalCtor())
                          P = PassInf->getNormalCtor()();
+                 g_assert (P->getPassKind () == llvm::PT_Function || P->getPassKind () == llvm::PT_Loop);
                  fpm->add (P);
          }
 
index fd822480af158b26346703d6b756b6642d8b67a9..dc90df25ac65eab5b833c01c6905be6c87ffc00e 100644 (file)
@@ -330,10 +330,7 @@ type_to_llvm_type (EmitContext *ctx, MonoType *t)
        case MONO_TYPE_VAR:
        case MONO_TYPE_MVAR:
                /* Because of generic sharing */
-               if (mini_type_var_is_vt (ctx->cfg, t))
-                       return type_to_llvm_type (ctx, mini_get_gsharedvt_alloc_type_for_type (ctx->cfg, t));
-               else
-                       return IntPtrType ();
+               return IntPtrType ();
        case MONO_TYPE_GENERICINST:
                if (!mono_type_generic_inst_is_valuetype (t))
                        return IntPtrType ();
@@ -4232,6 +4229,9 @@ mono_llvm_emit_method (MonoCompile *cfg)
        
        module = ctx->module = ctx->lmodule->module;
 
+       if (cfg->gsharedvt)
+               LLVM_FAILURE (ctx, "gsharedvt");
+
 #if 1
        {
                static int count = 0;
@@ -4334,6 +4334,19 @@ mono_llvm_emit_method (MonoCompile *cfg)
        }
        g_free (names);
 
+       if (cfg->compile_aot) {
+               LLVMValueRef md_args [16];
+               LLVMValueRef md_node;
+               int method_index;
+
+               method_index = mono_aot_get_method_index (cfg->orig_method);
+               md_args [0] = LLVMMDString (method_name, strlen (method_name));
+               md_args [1] = LLVMConstInt (LLVMInt32Type (), method_index, FALSE);
+               md_node = LLVMMDNode (md_args, 2);
+               LLVMAddNamedMetadataOperand (module, "mono.function_indexes", md_node);
+               //LLVMSetMetadata (method, md_kind, LLVMMDNode (&md_arg, 1));
+       }
+
        max_block_num = 0;
        for (bb = cfg->bb_entry; bb; bb = bb->next_bb)
                max_block_num = MAX (max_block_num, bb->block_num);
@@ -5135,7 +5148,7 @@ mono_llvm_create_aot_module (const char *got_symbol)
                LLVMValueRef personality;
 
                personality = LLVMAddFunction (aot_module.module, "mono_aot_personality", LLVMFunctionType (LLVMVoidType (), NULL, 0, FALSE));
-               LLVMSetLinkage (personality, LLVMPrivateLinkage);
+               LLVMSetLinkage (personality, LLVMInternalLinkage);
                lbb = LLVMAppendBasicBlock (personality, "BB0");
                lbuilder = LLVMCreateBuilder ();
                LLVMPositionBuilderAtEnd (lbuilder, lbb);
index 394610bbc6facb512f0955cdd7029a008aeaad2d..a56f24bd6ecb2cabd8a5c8ecf5d1c3aff1a5c29a 100644 (file)
@@ -21,6 +21,9 @@ MINI_OP(OP_ICOMPARE_IMM,      "icompare_imm", NONE, IREG, NONE)
 MINI_OP(OP_LCOMPARE_IMM,       "lcompare_imm", NONE, LREG, NONE)
 MINI_OP(OP_LOCAL,      "local", NONE, NONE, NONE)
 MINI_OP(OP_ARG,                "arg", NONE, NONE, NONE)
+/* inst_imm contains the local index */
+MINI_OP(OP_GSHAREDVT_LOCAL, "gsharedvt_local", NONE, NONE, NONE)
+MINI_OP(OP_GSHAREDVT_ARG_REGOFFSET, "gsharedvt_arg_regoffset", NONE, NONE, NONE)
 /*
  * Represents passing a valuetype argument which has not been decomposed yet.
  * inst_p0 points to the call.
@@ -605,6 +608,7 @@ MINI_OP(OP_CARD_TABLE_WBARRIER, "card_table_wbarrier", NONE, IREG, IREG)
 
 /* arch-dep tls access */
 MINI_OP(OP_TLS_GET,            "tls_get", IREG, NONE, NONE)
+MINI_OP(OP_TLS_GET_REG,            "tls_get_reg", IREG, IREG, NONE)
 
 MINI_OP(OP_LOAD_GOTADDR, "load_gotaddr", IREG, NONE, NONE)
 MINI_OP(OP_DUMMY_USE, "dummy_use", NONE, IREG, NONE)
@@ -1226,3 +1230,4 @@ MINI_OP(OP_MIPS_COND_EXC_INC, "mips_cond_exc_inc", NONE, IREG, IREG)
 #ifdef ENABLE_LLVM
 MINI_OP(OP_LLVM_OUTARG_VT,     "llvm_outarg_vt", IREG, VREG, NONE)
 #endif
+
index e779862c46e361dd4b5788d7fd80191b4ff64ef0..13ea174f78debb8dae960233da586852e66e5b94 100644 (file)
@@ -3788,7 +3788,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        }
 
                        ppc_mr (code, ppc_sp, ppc_r11);
-                       mono_add_patch_info (cfg, (guint8*) code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, ins->inst_p0);
+                       mono_add_patch_info (cfg, (guint8*) code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, call->method);
                        if (cfg->compile_aot) {
                                /* arch_emit_got_access () patches this */
                                ppc_load32 (code, ppc_r0, 0);
index 6a5c42f67207ae2aee02de6719cb50c9057d7f49..0e48c3580655eb980208740d73432c596fa3eca6 100644 (file)
@@ -31,24 +31,6 @@ static guint32 trampoline_calls, jit_trampolines, unbox_trampolines, static_rgct
 #define mono_trampolines_unlock() LeaveCriticalSection (&trampolines_mutex)
 static CRITICAL_SECTION trampolines_mutex;
 
-static gpointer
-get_unbox_trampoline (MonoMethod *m, gpointer addr, gboolean need_rgctx_tramp)
-{
-       if (mono_aot_only) {
-               if (need_rgctx_tramp)
-                       /* 
-                        * The unbox trampolines call the method directly, so need to add
-                        * an rgctx tramp before them.
-                        */
-                       return mono_create_static_rgctx_trampoline (m, mono_aot_get_unbox_trampoline (m));
-               else
-                       return mono_aot_get_unbox_trampoline (m);
-       } else {
-               unbox_trampolines ++;
-               return mono_arch_get_unbox_trampoline (m, addr);
-       }
-}
-
 #ifdef MONO_ARCH_GSHARED_SUPPORTED
 
 typedef struct {
@@ -284,8 +266,9 @@ is_generic_method_definition (MonoMethod *m)
                return TRUE;
        return FALSE;
 }
-static gboolean
-ji_is_gsharedvt (MonoJitInfo *ji)
+
+gboolean
+mini_jit_info_is_gsharedvt (MonoJitInfo *ji)
 {
        if (ji && ji->has_generic_jit_info && (mono_jit_info_get_generic_sharing_context (ji)->var_is_vt ||
                                                                                   mono_jit_info_get_generic_sharing_context (ji)->mvar_is_vt))
@@ -297,12 +280,12 @@ ji_is_gsharedvt (MonoJitInfo *ji)
 /*
  * mini_add_method_trampoline:
  *
- *   Add static rgctx/gsharedvt_in trampoline to M/COMPILED_METHOD if needed. Return the trampoline address, or
+ *   Add static rgctx/gsharedvt_in/unbox trampolines to M/COMPILED_METHOD if needed. Return the trampoline address, or
  * COMPILED_METHOD if no trampoline is needed.
  * ORIG_METHOD is the method the caller originally called i.e. an iface method, or NULL.
  */
 gpointer
-mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp)
+mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp)
 {
        gpointer addr = compiled_method;
        gboolean callee_gsharedvt, callee_array_helper;
@@ -310,7 +293,7 @@ mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer com
                mini_jit_info_table_find (mono_domain_get (), mono_get_addr_from_ftnptr (compiled_method), NULL);
 
        // FIXME: This loads information from AOT
-       callee_gsharedvt = ji_is_gsharedvt (ji);
+       callee_gsharedvt = mini_jit_info_is_gsharedvt (ji);
 
        callee_array_helper = FALSE;
        if (m->wrapper_type == MONO_WRAPPER_MANAGED_TO_MANAGED) {
@@ -341,6 +324,19 @@ mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer com
 
        addr = compiled_method;
 
+       if (add_unbox_tramp) {
+               /* 
+                * The unbox trampolines call the method directly, so need to add
+                * an rgctx tramp before them.
+                */
+               if (mono_aot_only) {
+                       addr = mono_aot_get_unbox_trampoline (m);
+               } else {
+                       unbox_trampolines ++;
+                       addr = mono_arch_get_unbox_trampoline (m, addr);
+               }
+       }
+
        if (callee_gsharedvt && mini_is_gsharedvt_variable_signature (mono_method_signature (ji->method))) {
                MonoGenericSharingContext *gsctx;
                MonoMethodSignature *sig, *gsig;
@@ -353,7 +349,7 @@ mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer com
                sig = mono_method_signature (m);
                gsig = mono_method_signature (ji->method); 
 
-               addr = mini_get_gsharedvt_wrapper (TRUE, compiled_method, sig, gsig, gsctx, -1, FALSE);
+               addr = mini_get_gsharedvt_wrapper (TRUE, addr, sig, gsig, gsctx, -1, FALSE);
 
                //printf ("IN: %s\n", mono_method_full_name (m, TRUE));
        }
@@ -375,6 +371,7 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
 {
        gpointer addr, compiled_method;
        gboolean generic_shared = FALSE;
+       gboolean need_unbox_tramp = FALSE;
        MonoMethod *declaring = NULL;
        MonoMethod *generic_virtual = NULL, *variant_iface = NULL, *orig_method = NULL;
        int context_used;
@@ -573,7 +570,15 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
 
        mono_debugger_trampoline_compiled (code, m, addr);
 
-       addr = mini_add_method_trampoline (orig_method, m, compiled_method, need_rgctx_tramp);
+       if (generic_virtual || variant_iface) {
+               if (vt->klass->valuetype) /*FIXME is this required variant iface?*/
+                       need_unbox_tramp = TRUE;
+       } else if (orig_vtable_slot) {
+               if (m->klass->valuetype)
+                       need_unbox_tramp = TRUE;
+       }
+
+       addr = mini_add_method_trampoline (orig_method, m, compiled_method, need_rgctx_tramp, need_unbox_tramp);
 
        if (generic_virtual || variant_iface) {
                MonoMethod *target = generic_virtual ? generic_virtual : variant_iface;
@@ -581,9 +586,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
                vtable_slot = orig_vtable_slot;
                g_assert (vtable_slot);
 
-               if (vt->klass->valuetype) /*FIXME is this required variant iface?*/
-                       addr = get_unbox_trampoline (m, addr, need_rgctx_tramp);
-
                mono_method_add_generic_virtual_invocation (mono_domain_get (), 
                                                                                                        vt, vtable_slot,
                                                                                                        target, addr);
@@ -622,9 +624,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
        vtable_slot = orig_vtable_slot;
 
        if (vtable_slot) {
-               if (m->klass->valuetype)
-                       addr = get_unbox_trampoline (m, addr, need_rgctx_tramp);
-
                if (vtable_slot_to_patch && (mono_aot_is_got_entry (code, (guint8*)vtable_slot_to_patch) || mono_domain_owns_vtable_slot (mono_domain_get (), vtable_slot_to_patch))) {
                        g_assert (*vtable_slot_to_patch);
                        *vtable_slot_to_patch = mono_get_addr_from_ftnptr (addr);
@@ -999,7 +998,7 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *tramp_data, gui
 #ifndef DISABLE_REMOTING
                if (delegate->target && delegate->target->vtable->klass == mono_defaults.transparent_proxy_class) {
 #ifndef DISABLE_COM
-                       if (((MonoTransparentProxy *)delegate->target)->remote_class->proxy_class != mono_defaults.com_object_class && 
+                       if (((MonoTransparentProxy *)delegate->target)->remote_class->proxy_class != mono_class_get_com_object_class () &&
                           !mono_class_is_com_object (((MonoTransparentProxy *)delegate->target)->remote_class->proxy_class))
 #endif
                                method = mono_marshal_get_remoting_invoke (method);
@@ -1056,11 +1055,7 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *tramp_data, gui
                        delegate->method_ptr = *delegate->method_code;
                } else {
                        compiled_method = addr = mono_compile_method (method);
-                       if (need_unbox_tramp)
-                               // FIXME: GSHAREDVT
-                               addr = get_unbox_trampoline (method, addr, need_rgctx_tramp);
-                       else
-                               addr = mini_add_method_trampoline (NULL, method, compiled_method, need_rgctx_tramp);
+                       addr = mini_add_method_trampoline (NULL, method, compiled_method, need_rgctx_tramp, need_unbox_tramp);
                        delegate->method_ptr = addr;
                        if (enable_caching && delegate->method_code)
                                *delegate->method_code = delegate->method_ptr;
@@ -1088,7 +1083,7 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *tramp_data, gui
        /* 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));
+       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);
        mono_debugger_trampoline_compiled (NULL, m, delegate->invoke_impl);
 
index 4809ae935bd8d98854070c2abf7c463bea840056..141cc6b4f13a64bd48b305d8ce673c8bf62167df 100644 (file)
@@ -195,6 +195,8 @@ typedef enum {
        ArgValuetypeInReg,
        ArgOnFloatFpStack,
        ArgOnDoubleFpStack,
+       /* gsharedvt argument passed by addr */
+       ArgGSharedVt,
        ArgNone
 } ArgStorage;
 
@@ -244,6 +246,7 @@ add_general (guint32 *gr, guint32 *stack_size, ArgInfo *ainfo)
 
     if (*gr >= PARAM_REGS) {
                ainfo->storage = ArgOnStack;
+               ainfo->nslots = 1;
                (*stack_size) += sizeof (gpointer);
     }
     else {
@@ -405,6 +408,11 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
                                cinfo->ret.reg = X86_EAX;
                                break;
                        }
+                       if (mini_is_gsharedvt_type_gsctx (gsctx, ret_type)) {
+                               cinfo->ret.storage = ArgOnStack;
+                               cinfo->vtype_retaddr = TRUE;
+                               break;
+                       }
                        /* Fall through */
                case MONO_TYPE_VALUETYPE:
                case MONO_TYPE_TYPEDBYREF: {
@@ -417,6 +425,12 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
                        }
                        break;
                }
+               case MONO_TYPE_VAR:
+               case MONO_TYPE_MVAR:
+                       g_assert (mini_is_gsharedvt_type_gsctx (gsctx, ret_type));
+                       cinfo->ret.storage = ArgOnStack;
+                       cinfo->vtype_retaddr = TRUE;
+                       break;
                case MONO_TYPE_VOID:
                        cinfo->ret.storage = ArgNone;
                        break;
@@ -513,6 +527,13 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
                                add_general (&gr, &stack_size, ainfo);
                                break;
                        }
+                       if (mini_is_gsharedvt_type_gsctx (gsctx, ptype)) {
+                               /* gsharedvt arguments are passed by ref */
+                               add_general (&gr, &stack_size, ainfo);
+                               g_assert (ainfo->storage == ArgOnStack);
+                               ainfo->storage = ArgGSharedVt;
+                               break;
+                       }
                        /* Fall through */
                case MONO_TYPE_VALUETYPE:
                case MONO_TYPE_TYPEDBYREF:
@@ -528,6 +549,14 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
                case MONO_TYPE_R8:
                        add_float (&fr, &stack_size, ainfo, TRUE);
                        break;
+               case MONO_TYPE_VAR:
+               case MONO_TYPE_MVAR:
+                       /* gsharedvt arguments are passed by ref */
+                       g_assert (mini_is_gsharedvt_type_gsctx (gsctx, ptype));
+                       add_general (&gr, &stack_size, ainfo);
+                       g_assert (ainfo->storage == ArgOnStack);
+                       ainfo->storage = ArgGSharedVt;
+                       break;
                default:
                        g_error ("unexpected type 0x%x", ptype->type);
                        g_assert_not_reached ();
@@ -1442,6 +1471,9 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
                                linfo->args [i].pair_storage [j] = arg_storage_to_llvm_arg_storage (cfg, ainfo->pair_storage [j]);
                        */
                        break;
+               case ArgGSharedVt:
+                       linfo->args [i].storage = LLVMArgGSharedVt;
+                       break;
                default:
                        cfg->exception_message = g_strdup ("ainfo->storage");
                        cfg->disable_llvm = TRUE;
@@ -1551,7 +1583,13 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
 
                g_assert (in->dreg != -1);
 
-               if ((i >= sig->hasthis) && (MONO_TYPE_ISSTRUCT(t))) {
+               if (ainfo->storage == ArgGSharedVt) {
+                       arg->opcode = OP_OUTARG_VT;
+                       arg->sreg1 = in->dreg;
+                       arg->klass = in->klass;
+                       sp_offset += 4;
+                       MONO_ADD_INS (cfg->cbb, arg);
+               } else if ((i >= sig->hasthis) && (MONO_TYPE_ISSTRUCT(t))) {
                        guint32 align;
                        guint32 size;
 
@@ -1679,7 +1717,12 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
        MonoInst *arg;
        int size = ins->backend.size;
 
-       if (size <= 4) {
+       if (cfg->gsharedvt && mini_is_gsharedvt_klass (cfg, ins->klass)) {
+               /* Pass by addr */
+               MONO_INST_NEW (cfg, arg, OP_X86_PUSH);
+               arg->sreg1 = src->dreg;
+               MONO_ADD_INS (cfg->cbb, arg);
+       } else if (size <= 4) {
                MONO_INST_NEW (cfg, arg, OP_X86_PUSH_MEMBASE);
                arg->sreg1 = src->dreg;
 
@@ -3235,7 +3278,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        /* restore ESP/EBP */
                        x86_leave (code);
                        offset = code - cfg->native_code;
-                       mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_METHOD_JUMP, ins->inst_p0);
+                       mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_METHOD_JUMP, call->method);
                        x86_jump32 (code, 0);
 
                        ins->flags |= MONO_INST_GC_CALLSITE;
@@ -4158,6 +4201,21 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        code = mono_x86_emit_tls_get (code, ins->dreg, ins->inst_offset);
                        break;
                }
+               case OP_TLS_GET_REG: {
+#ifdef __APPLE__
+                       // FIXME: tls_gs_offset can change too, do these when calculating the tls offset
+                       if (ins->dreg != ins->sreg1)
+                               x86_mov_reg_reg (code, ins->dreg, ins->sreg1, sizeof (gpointer));
+                       x86_shift_reg_imm (code, X86_SHL, ins->dreg, 2);
+                       if (tls_gs_offset)
+                               x86_alu_reg_imm (code, X86_ADD, ins->dreg, tls_gs_offset);
+                       x86_prefix (code, X86_GS_PREFIX);
+                       x86_mov_reg_membase (code, ins->dreg, ins->dreg, 0, sizeof (gpointer));
+#else
+                       g_assert_not_reached ();
+#endif
+                       break;
+               }
                case OP_MEMORY_BARRIER: {
                        /* x86 only needs barrier for StoreLoad and FullBarrier */
                        switch (ins->backend.memory_barrier_kind) {
index d908476291f5fac9ac06ef7e4f9af2faf9387fcd..20d2eeb329a793e67a9fab9100b97b40cb6b5cf1 100644 (file)
@@ -263,6 +263,10 @@ typedef struct {
 #define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
 #define MONO_ARCH_GSHAREDVT_SUPPORTED 1
 
+#ifdef TARGET_OSX
+#define MONO_ARCH_HAVE_TLS_GET_REG 1
+#endif
+
 gboolean
 mono_x86_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
 
@@ -298,7 +302,8 @@ typedef enum {
        GSHAREDVT_RET_I1 = 5,
        GSHAREDVT_RET_U1 = 6,
        GSHAREDVT_RET_I2 = 7,
-       GSHAREDVT_RET_U2 = 8
+       GSHAREDVT_RET_U2 = 8,
+       GSHAREDVT_RET_IREG = 9
 } GSharedVtRetMarshal;
 
 typedef struct {
index b8458374f1ecefa97c215770a7a1224a521cdd19..34c5810b662bc25d96756f79f609f4026bb01075 100644 (file)
@@ -65,6 +65,7 @@
 #include <ctype.h>
 #include "trace.h"
 #include "version.h"
+#include "ir-emit.h"
 
 #include "jit-icalls.h"
 
@@ -594,14 +595,14 @@ mono_jump_info_token_new (MonoMemPool *mp, MonoImage *image, guint32 token)
  * mono_tramp_info_create:
  *
  *   Create a MonoTrampInfo structure from the arguments. This function assumes ownership
- * of NAME, JI, and UNWIND_OPS.
+ * of JI, and UNWIND_OPS.
  */
 MonoTrampInfo*
 mono_tramp_info_create (const char *name, guint8 *code, guint32 code_size, MonoJumpInfo *ji, GSList *unwind_ops)
 {
        MonoTrampInfo *info = g_new0 (MonoTrampInfo, 1);
 
-       info->name = (char*)name;
+       info->name = g_strdup ((char*)name);
        info->code = code;
        info->code_size = code_size;
        info->ji = ji;
@@ -1775,7 +1776,7 @@ mono_allocate_stack_slots2 (MonoCompile *cfg, gboolean backward, guint32 *stack_
 
                t = mono_type_get_underlying_type (inst->inst_vtype);
                if (cfg->gsharedvt && mini_is_gsharedvt_variable_type (cfg, t))
-                       t = mini_get_gsharedvt_alloc_type_for_type (cfg, t);
+                       continue;
 
                /* inst->backend.is_pinvoke indicates native sized value types, this is used by the
                * pinvoke wrappers when they call functions returning structures */
@@ -2071,7 +2072,7 @@ mono_allocate_stack_slots (MonoCompile *cfg, gboolean backward, guint32 *stack_s
 
                t = mono_type_get_underlying_type (inst->inst_vtype);
                if (cfg->gsharedvt && mini_is_gsharedvt_variable_type (cfg, t))
-                       t = mini_get_gsharedvt_alloc_type_for_type (cfg, t);
+                       continue;
 
                /* inst->backend.is_pinvoke indicates native sized value types, this is used by the
                * pinvoke wrappers when they call functions returning structures */
@@ -2847,47 +2848,91 @@ mini_thread_cleanup (MonoInternalThread *thread)
        }
 }
 
+int
+mini_get_tls_offset (MonoJitTlsKey key)
+{
+       int offset;
+
+       switch (key) {
+       case TLS_KEY_THREAD:
+               offset = mono_thread_get_tls_offset ();
+               break;
+       case TLS_KEY_JIT_TLS:
+               offset = mono_get_jit_tls_offset ();
+               break;
+       case TLS_KEY_DOMAIN:
+               offset = mono_domain_get_tls_offset ();
+               break;
+       case TLS_KEY_LMF:
+               offset = mono_get_lmf_tls_offset ();
+               break;
+       default:
+               g_assert_not_reached ();
+               offset = -1;
+               break;
+       }
+       return offset;
+}
+
 static MonoInst*
-mono_create_tls_get (MonoCompile *cfg, int offset)
+mono_create_tls_get_offset (MonoCompile *cfg, int offset)
 {
-#ifdef MONO_ARCH_HAVE_TLS_GET
-       if (MONO_ARCH_HAVE_TLS_GET) {
-               MonoInst* ins;
+       MonoInst* ins;
 
-               if (offset == -1)
-                       return NULL;
+       if (!MONO_ARCH_HAVE_TLS_GET)
+               return NULL;
+
+       if (offset == -1)
+               return NULL;
 
-               MONO_INST_NEW (cfg, ins, OP_TLS_GET);
+       MONO_INST_NEW (cfg, ins, OP_TLS_GET);
+       ins->dreg = mono_alloc_preg (cfg);
+       ins->inst_offset = offset;
+       return ins;
+}
+
+static MonoInst*
+mono_create_tls_get (MonoCompile *cfg, MonoJitTlsKey key)
+{
+       /*
+        * TLS offsets might be different at AOT time, so load them from a GOT slot and
+        * use a different opcode.
+        */
+       if (cfg->compile_aot && MONO_ARCH_HAVE_TLS_GET && ARCH_HAVE_TLS_GET_REG) {
+               MonoInst *ins, *c;
+
+               EMIT_NEW_TLS_OFFSETCONST (cfg, c, key);
+               MONO_INST_NEW (cfg, ins, OP_TLS_GET_REG);
                ins->dreg = mono_alloc_preg (cfg);
-               ins->inst_offset = offset;
+               ins->sreg1 = c->dreg;
                return ins;
        }
-#endif
-       return NULL;
+
+       return mono_create_tls_get_offset (cfg, mini_get_tls_offset (key));
 }
 
 MonoInst*
 mono_get_jit_tls_intrinsic (MonoCompile *cfg)
 {
-       return mono_create_tls_get (cfg, mono_get_jit_tls_offset ());
+       return mono_create_tls_get (cfg, TLS_KEY_JIT_TLS);
 }
 
 MonoInst*
 mono_get_domain_intrinsic (MonoCompile* cfg)
 {
-       return mono_create_tls_get (cfg, mono_domain_get_tls_offset ());
+       return mono_create_tls_get (cfg, TLS_KEY_DOMAIN);
 }
 
 MonoInst*
 mono_get_thread_intrinsic (MonoCompile* cfg)
 {
-       return mono_create_tls_get (cfg, mono_thread_get_tls_offset ());
+       return mono_create_tls_get (cfg, TLS_KEY_THREAD);
 }
 
 MonoInst*
 mono_get_lmf_intrinsic (MonoCompile* cfg)
 {
-       return mono_create_tls_get (cfg, mono_get_lmf_tls_offset ());
+       return mono_create_tls_get (cfg, TLS_KEY_LMF);
 }
 
 void
@@ -2964,6 +3009,29 @@ mono_patch_info_dup_mp (MonoMemPool *mp, MonoJumpInfo *patch_info)
                res->data.gsharedvt = mono_mempool_alloc (mp, sizeof (MonoJumpInfoGSharedVtCall));
                memcpy (res->data.gsharedvt, patch_info->data.gsharedvt, sizeof (MonoJumpInfoGSharedVtCall));
                break;
+       case MONO_PATCH_INFO_GSHAREDVT_METHOD: {
+               MonoGSharedVtMethodInfo *info;
+               MonoGSharedVtMethodInfo *oinfo;
+               int i;
+
+               oinfo = patch_info->data.gsharedvt_method;
+               info = mono_mempool_alloc (mp, sizeof (MonoGSharedVtMethodInfo));
+               res->data.gsharedvt_method = info;
+               memcpy (info, oinfo, sizeof (MonoGSharedVtMethodInfo));
+               info->entries = g_ptr_array_new ();
+               if (oinfo->entries) {
+                       for (i = 0; i < oinfo->entries->len; ++i) {
+                               MonoRuntimeGenericContextInfoTemplate *otemplate = g_ptr_array_index (oinfo->entries, i);
+                               MonoRuntimeGenericContextInfoTemplate *template = mono_mempool_alloc0 (mp, sizeof (MonoRuntimeGenericContextInfoTemplate));
+
+                               memcpy (template, otemplate, sizeof (MonoRuntimeGenericContextInfoTemplate));
+                               g_ptr_array_add (info->entries, template);
+                       }
+               }
+               //info->locals_types = mono_mempool_alloc0 (mp, info->nlocals * sizeof (MonoType*));
+               //memcpy (info->locals_types, oinfo->locals_types, info->nlocals * sizeof (MonoType*));
+               break;
+       }
        default:
                break;
        }
@@ -3004,6 +3072,7 @@ mono_patch_info_hash (gconstpointer data)
        case MONO_PATCH_INFO_METHOD_RGCTX:
        case MONO_PATCH_INFO_DELEGATE_TRAMPOLINE:
        case MONO_PATCH_INFO_SIGNATURE:
+       case MONO_PATCH_INFO_TLS_OFFSET:
                return (ji->type << 8) | (gssize)ji->data.target;
        case MONO_PATCH_INFO_GSHAREDVT_CALL:
                return (ji->type << 8) | (gssize)ji->data.gsharedvt->method;
@@ -3019,9 +3088,12 @@ mono_patch_info_hash (gconstpointer data)
        case MONO_PATCH_INFO_MONITOR_ENTER:
        case MONO_PATCH_INFO_MONITOR_EXIT:
        case MONO_PATCH_INFO_CASTCLASS_CACHE:
+       case MONO_PATCH_INFO_GOT_OFFSET:
                return (ji->type << 8);
        case MONO_PATCH_INFO_SWITCH:
                return (ji->type << 8) | ji->data.table->table_size;
+       case MONO_PATCH_INFO_GSHAREDVT_METHOD:
+               return (ji->type << 8) | (gssize)ji->data.gsharedvt_method->method;
        default:
                printf ("info type: %d\n", ji->type);
                mono_print_ji (ji); printf ("\n");
@@ -3073,6 +3145,8 @@ mono_patch_info_equal (gconstpointer ka, gconstpointer kb)
 
                return c1->sig == c2->sig && c1->method == c2->method;
        }
+       case MONO_PATCH_INFO_GSHAREDVT_METHOD:
+               return ji1->data.gsharedvt_method->method == ji2->data.gsharedvt_method->method;
        default:
                if (ji1->data.target != ji2->data.target)
                        return 0;
@@ -3358,12 +3432,31 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code,
                        slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, entry->data->data.sig, entry->info_type, mono_method_get_context (entry->method));
                        break;
                case MONO_PATCH_INFO_GSHAREDVT_CALL: {
-                       MonoJumpInfoGSharedVtCall *call_info = mono_domain_alloc0 (domain, sizeof (MonoJumpInfoGSharedVtCall));
+                       MonoJumpInfoGSharedVtCall *call_info = g_malloc0 (sizeof (MonoJumpInfoGSharedVtCall)); //mono_domain_alloc0 (domain, sizeof (MonoJumpInfoGSharedVtCall));
 
                        memcpy (call_info, entry->data->data.gsharedvt, sizeof (MonoJumpInfoGSharedVtCall));
                        slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, call_info, entry->info_type, mono_method_get_context (entry->method));
                        break;
                }
+               case MONO_PATCH_INFO_GSHAREDVT_METHOD: {
+                       MonoGSharedVtMethodInfo *info;
+                       MonoGSharedVtMethodInfo *oinfo = entry->data->data.gsharedvt_method;
+                       int i;
+
+                       /* Make a copy into the domain mempool */
+                       info = g_malloc0 (sizeof (MonoGSharedVtMethodInfo)); //mono_domain_alloc0 (domain, sizeof (MonoGSharedVtMethodInfo));
+                       info->method = oinfo->method;
+                       info->entries = g_ptr_array_new ();
+                       for (i = 0; i < oinfo->entries->len; ++i) {
+                               MonoRuntimeGenericContextInfoTemplate *otemplate = g_ptr_array_index (oinfo->entries, i);
+                               MonoRuntimeGenericContextInfoTemplate *template = g_malloc0 (sizeof (MonoRuntimeGenericContextInfoTemplate));
+
+                               memcpy (template, otemplate, sizeof (MonoRuntimeGenericContextInfoTemplate));
+                               g_ptr_array_add (info->entries, template);
+                       }
+                       slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, info, entry->info_type, mono_method_get_context (entry->method));
+                       break;
+               }
                default:
                        g_assert_not_reached ();
                        break;
@@ -3413,6 +3506,9 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code,
                target = (gpointer) (size_t) mono_jit_tls_id;
                break;
        }
+       case MONO_PATCH_INFO_TLS_OFFSET:
+               target = GINT_TO_POINTER (mini_get_tls_offset (GPOINTER_TO_INT (patch_info->data.target)));
+               break;
        default:
                g_assert_not_reached ();
        }
@@ -6187,7 +6283,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
                                }
                        }
 
-                       info->compiled_method = mini_add_method_trampoline (NULL, method, info->compiled_method, mono_method_needs_static_rgctx_invoke (method, FALSE));
+                       info->compiled_method = mini_add_method_trampoline (NULL, method, info->compiled_method, mono_method_needs_static_rgctx_invoke (method, FALSE), FALSE);
                }
 
                /*
@@ -6803,11 +6899,7 @@ mini_init (const char *filename, const char *runtime_version)
 #endif
 #endif
 
-#ifdef MONO_ARCH_HAVE_TLS_GET
        mono_runtime_set_has_tls_get (MONO_ARCH_HAVE_TLS_GET);
-#else
-       mono_runtime_set_has_tls_get (FALSE);
-#endif
 
        if (!global_codeman)
                global_codeman = mono_code_manager_new ();
@@ -7165,6 +7257,8 @@ mini_init (const char *filename, const char *runtime_version)
        register_icall (mono_resume_unwind, "mono_resume_unwind", "void", TRUE);
        register_icall (mono_object_tostring_gsharedvt, "mono_object_tostring_gsharedvt", "object ptr ptr ptr", TRUE);
        register_icall (mono_object_gethashcode_gsharedvt, "mono_object_gethashcode_gsharedvt", "int ptr ptr ptr", TRUE);
+       register_icall (mono_object_equals_gsharedvt, "mono_object_equals_gsharedvt", "int ptr ptr ptr object", TRUE);
+       register_icall (mono_gsharedvt_value_copy, "mono_gsharedvt_value_copy", "void ptr ptr ptr", TRUE);
 
        register_icall (mono_gc_wbarrier_value_copy_bitmap, "mono_gc_wbarrier_value_copy_bitmap", "void ptr ptr int int", FALSE);
 
index 4ab93f990605079659ea61909f92800a8bd29d33..3e028ada899eaf049b2dbda1de027dd6d3354e2a 100644 (file)
 #endif
 
 /* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 89
+#define MONO_AOT_FILE_VERSION 90
 
 //TODO: This is x86/amd64 specific.
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
@@ -310,6 +310,9 @@ typedef struct
        GHashTable *arch_seq_points;
        /* Maps a GSharedVtTrampInfo structure to a trampoline address */
        GHashTable *gsharedvt_arg_tramp_hash;
+       /* memcpy/bzero methods specialized for small constant sizes */
+       gpointer *memcpy_addr [17];
+       gpointer *bzero_addr [17];
 } MonoJitDomainInfo;
 
 typedef struct {
@@ -720,7 +723,8 @@ typedef enum {
        LLVMArgInFPReg,
        LLVMArgVtypeInReg,
        LLVMArgVtypeByVal,
-       LLVMArgVtypeRetAddr /* On on cinfo->ret */
+       LLVMArgVtypeRetAddr, /* On on cinfo->ret */
+       LLVMArgGSharedVt,
 } LLVMArgStorage;
 
 typedef struct {
@@ -1042,6 +1046,16 @@ typedef struct {
        gboolean orig_ex_ctx_set;
 } MonoJitTlsData;
 
+/* TLS entries used by JITted code */
+typedef enum {
+       /* mono_thread_internal_current () */
+       TLS_KEY_THREAD = 0,
+       TLS_KEY_JIT_TLS = 1,
+       /* mono_domain_get () */
+       TLS_KEY_DOMAIN = 2,
+       TLS_KEY_LMF = 3
+} MonoJitTlsKey;
+
 /*
  * This structure is an extension of MonoLMF and contains extra information.
  */
@@ -1075,7 +1089,20 @@ typedef enum {
        MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT,
        /* Same for calli, associated with a signature */
        MONO_RGCTX_INFO_SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI,
-       MONO_RGCTX_INFO_CLASS_IS_REF
+       /*
+        * 0 - vtype
+        * 1 - ref
+        * 2 - gsharedvt type
+        */
+       MONO_RGCTX_INFO_CLASS_BOX_TYPE,
+       /* Resolves to a MonoGSharedVtMethodRuntimeInfo */
+       MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO,
+       MONO_RGCTX_INFO_LOCAL_OFFSET,
+       MONO_RGCTX_INFO_MEMCPY,
+       MONO_RGCTX_INFO_BZERO,
+       /* The address of Nullable<T>.Box () */
+       MONO_RGCTX_INFO_NULLABLE_CLASS_BOX,
+       MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX,
 } MonoRgctxInfoType;
 
 typedef struct _MonoRuntimeGenericContextInfoTemplate {
@@ -1105,6 +1132,23 @@ typedef struct {
 
 #define MONO_GSHAREDVT_DEL_INVOKE_VT_OFFSET -2
 
+typedef struct {
+       MonoMethod *method;
+       /* Array of MonoRuntimeGenericContextInfoTemplate* entries */
+       GPtrArray *entries;
+} MonoGSharedVtMethodInfo;
+
+/* This is used by gsharedvt methods to allocate locals and compute local offsets */
+typedef struct {
+       int locals_size;
+       /*
+        * The results of resolving the entries in MOonGSharedVtMethodInfo->entries.
+        * We use this instead of rgctx slots since these can be loaded using a load instead
+        * of a call to an rgctx fetch trampoline.
+        */
+       gpointer entries [MONO_ZERO_LEN_ARRAY];
+} MonoGSharedVtMethodRuntimeInfo;
+
 typedef enum {
 #define PATCH_INFO(a,b) MONO_PATCH_INFO_ ## a,
 #include "patch-info.h"
@@ -1169,6 +1213,7 @@ struct MonoJumpInfo {
                MonoJumpInfoRgctxEntry *rgctx_entry;
                MonoJumpInfoImtTramp *imt_tramp;
                MonoJumpInfoGSharedVtCall *gsharedvt;
+               MonoGSharedVtMethodInfo *gsharedvt_method;
                MonoMethodSignature *sig;
        } data;
 };
@@ -1327,6 +1372,17 @@ typedef struct {
 
        gboolean gsharedvt;
 
+       MonoGSharedVtMethodInfo *gsharedvt_info;
+
+       /* Points to the gsharedvt locals area at runtime */
+       MonoInst *gsharedvt_locals_var;
+
+       /* The localloc instruction used to initialize gsharedvt_locals_var */
+       MonoInst *gsharedvt_locals_var_ins;
+
+       /* Points to a MonoGSharedVtMethodRuntimeInfo at runtime */
+       MonoInst *gsharedvt_info_var;
+
        /* For native-to-managed wrappers, the saved old domain */
        MonoInst *orig_domain_var;
 
@@ -1475,7 +1531,7 @@ typedef struct {
        GSList *headers_to_free;
 
        /* Used by AOT */
-       guint32 got_offset, ex_info_offset, method_info_offset;
+       guint32 got_offset, ex_info_offset, method_info_offset, method_index;
        /* Symbol used to refer to this method in generated assembly */
        char *asm_symbol;
        char *llvm_method_name;
@@ -1909,6 +1965,7 @@ MonoNativeTlsKey mono_get_jit_tls_key       (void) MONO_INTERNAL;
 gint32    mono_get_jit_tls_offset           (void) MONO_INTERNAL;
 gint32    mono_get_lmf_tls_offset           (void) MONO_INTERNAL;
 gint32    mono_get_lmf_addr_tls_offset      (void) MONO_INTERNAL;
+int       mini_get_tls_offset               (MonoJitTlsKey key) MONO_INTERNAL;
 MonoInst* mono_get_jit_tls_intrinsic        (MonoCompile *cfg) MONO_INTERNAL;
 MonoInst* mono_get_domain_intrinsic         (MonoCompile* cfg) MONO_INTERNAL;
 MonoInst* mono_get_thread_intrinsic         (MonoCompile* cfg) MONO_INTERNAL;
@@ -2015,6 +2072,7 @@ MonoMethod* mono_aot_get_array_helper_from_wrapper (MonoMethod *method) MONO_INT
 guint32  mono_aot_get_got_offset            (MonoJumpInfo *ji) MONO_LLVM_INTERNAL;
 char*    mono_aot_get_method_name           (MonoCompile *cfg) MONO_LLVM_INTERNAL;
 char*    mono_aot_get_plt_symbol            (MonoJumpInfoType type, gconstpointer data) MONO_LLVM_INTERNAL;
+int      mono_aot_get_method_index          (MonoMethod *method) MONO_LLVM_INTERNAL;
 MonoJumpInfo* mono_aot_patch_info_dup       (MonoJumpInfo* ji) MONO_LLVM_INTERNAL;
 void     mono_aot_set_make_unreadable       (gboolean unreadable) MONO_INTERNAL;
 gboolean mono_aot_is_pagefault              (void *ptr) MONO_INTERNAL;
@@ -2093,7 +2151,8 @@ gconstpointer     mono_get_trampoline_func (MonoTrampolineType tramp_type);
 gpointer          mini_get_vtable_trampoline (int slot_index) MONO_INTERNAL;
 char*             mono_get_generic_trampoline_name (MonoTrampolineType tramp_type) MONO_INTERNAL;
 char*             mono_get_rgctx_fetch_trampoline_name (int slot) MONO_INTERNAL;
-gpointer          mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp) MONO_INTERNAL;
+gpointer          mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp) MONO_INTERNAL;
+gboolean          mini_jit_info_is_gsharedvt (MonoJitInfo *ji) MONO_INTERNAL;
 
 gboolean          mono_running_on_valgrind (void) MONO_INTERNAL;
 void*             mono_global_codeman_reserve (int size) MONO_INTERNAL;
@@ -2452,6 +2511,9 @@ mono_method_lookup_rgctx (MonoVTable *class_vtable, MonoGenericInst *method_inst
 const char*
 mono_rgctx_info_type_to_str (MonoRgctxInfoType type) MONO_INTERNAL;
 
+MonoJumpInfoType
+mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type) MONO_INTERNAL;
+
 gboolean
 mono_method_needs_static_rgctx_invoke (MonoMethod *method, gboolean allow_type_vars) MONO_INTERNAL;
 
@@ -2535,7 +2597,6 @@ gboolean mini_is_gsharedvt_type (MonoCompile *cfg, MonoType *t) MONO_INTERNAL;
 gboolean mini_is_gsharedvt_signature (MonoCompile *cfg, MonoMethodSignature *sig) MONO_INTERNAL;
 gboolean mini_is_gsharedvt_type_gsctx (MonoGenericSharingContext *gsctx, MonoType *t) MONO_INTERNAL;
 gboolean mini_is_gsharedvt_variable_type (MonoCompile *cfg, MonoType *t) MONO_INTERNAL;
-MonoType* mini_get_gsharedvt_alloc_type_for_type (MonoCompile *cfg, MonoType *t); /* should be internal but it's used by llvm */
 gboolean mini_is_gsharedvt_sharable_method (MonoMethod *method) MONO_INTERNAL;
 gboolean mini_is_gsharedvt_variable_signature (MonoMethodSignature *sig) MONO_INTERNAL;
 gboolean mini_is_gsharedvt_sharable_inst (MonoGenericInst *inst) MONO_INTERNAL;
@@ -2673,4 +2734,26 @@ void SIG_HANDLER_SIGNATURE (mono_sigsegv_signal_handler) MONO_INTERNAL;
 void SIG_HANDLER_SIGNATURE (mono_sigint_signal_handler)  MONO_INTERNAL;
 gboolean SIG_HANDLER_SIGNATURE (mono_chain_signal) MONO_INTERNAL;
 
+#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
+#define ARCH_HAVE_DELEGATE_TRAMPOLINES 1
+#else
+#define ARCH_HAVE_DELEGATE_TRAMPOLINES 0
+#endif
+
+#ifdef MONO_ARCH_USE_OP_TAIL_CALL
+#define ARCH_USE_OP_TAIL_CALL 1
+#else
+#define ARCH_USE_OP_TAIL_CALL 0
+#endif
+
+#ifndef MONO_ARCH_HAVE_TLS_GET
+#define MONO_ARCH_HAVE_TLS_GET 0
+#endif
+
+#ifdef MONO_ARCH_HAVE_TLS_GET_REG
+#define ARCH_HAVE_TLS_GET_REG 1
+#else
+#define ARCH_HAVE_TLS_GET_REG 0
+#endif
+
 #endif /* __MONO_MINI_H__ */
index 2ef31a4f9f4a5878a78c1c29651df1df7b89324f..daf32f03df508d803641a94f7fdb5efa0cf96815 100644 (file)
@@ -46,6 +46,10 @@ PATCH_INFO(GC_CARD_TABLE_ADDR, "gc_card_table_addr")
 PATCH_INFO(CASTCLASS_CACHE, "castclass_cache")
 PATCH_INFO(SIGNATURE, "signature")
 PATCH_INFO(GSHAREDVT_CALL, "gsharedvt_call")
+PATCH_INFO(GSHAREDVT_METHOD, "gsharedvt_method")
 PATCH_INFO(JIT_TLS_ID, "jit_tls_id")
+PATCH_INFO(TLS_OFFSET, "tls_offset")
 PATCH_INFO(NONE, "none")
 
+
+
index 5f54c7d16627ac5f91dd0ccb9b9584cc7d69010e..071175a440ec54dddc8e7637d1bd9259e25b3b40 100644 (file)
@@ -744,7 +744,7 @@ mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
        mono_arch_flush_icache (buf, code - buf);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+               *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
 
        if (mono_jit_map_is_enabled ())
                mono_emit_jit_tramp (buf, code - buf, "nullified_class_init_trampoline");
@@ -915,8 +915,11 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
 
        g_assert (code - buf <= tramp_size);
 
-       if (info)
-               *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+       if (info) {
+               char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+               *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+               g_free (name);
+       }
 
        return buf;
 }
@@ -965,7 +968,7 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
@@ -1089,7 +1092,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("monitor_enter_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("monitor_enter_trampoline", buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
@@ -1207,7 +1210,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("monitor_exit_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("monitor_exit_trampoline", buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
index b12ead690229bf715a037bef124771c421dd2ec9..44ef52d89ea5b792707d0c5a7cd4c6970bda5638 100644 (file)
@@ -473,7 +473,7 @@ mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
        mono_arch_flush_icache (buf, code - buf);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+               *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
 
        return buf;
 }
@@ -765,8 +765,11 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
 
        g_assert (code - buf <= tramp_size);
 
-       if (info)
-               *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+       if (info) {
+               char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+               *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+               g_free (name);
+       }
 
        return buf;
 }
@@ -873,7 +876,7 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
@@ -1056,7 +1059,7 @@ mono_arch_get_gsharedvt_arg_trampoline (MonoDomain *domain, gpointer arg, gpoint
 #else
 
 gpointer
-mono_arm_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpointer *callee, gpointer *caller_regs, gpointer *callee_regs, gpointer mrgctx_reg)
+mono_arm_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpointer *callee, gpointer mrgctx_reg)
 {
        g_assert_not_reached ();
        return NULL;
index e90e0a3121bfe39db750792f3c8c235d5be678f0..c1ff0204d5009e12b3d023e50651aac1a4e9a94a 100644 (file)
@@ -153,7 +153,7 @@ mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
        mono_arch_flush_icache (buf, code - buf);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+               *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
 
        return buf;
 }
@@ -482,8 +482,11 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
 
        g_assert (code - buf <= tramp_size);
 
-       if (info)
-               *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+       if (info) {
+               char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+               *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+               g_free (name);
+       }
 
        return buf;
 }
@@ -539,7 +542,7 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
index 2972348d09ed7103f088f375cf8c8618d5d23fe3..7e719be329d451ea09b97c2415e7f3574e6688a0 100644 (file)
@@ -617,8 +617,11 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
 
        g_assert (code - buf <= tramp_size);
 
-       if (info)
-               *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+       if (info) {
+               char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+               *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+               g_free (name);
+       }
 
        return buf;
 #else
@@ -677,7 +680,7 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
@@ -696,7 +699,7 @@ mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+               *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
 
        return buf;
 }
index 91e760e41880a7af372befeb3c76d343e9b053a5..7c6d914ebe2fe52f3fea2f72189c37605e6b726f 100644 (file)
@@ -402,7 +402,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
        mono_arch_flush_icache (code, buf - code);
        
        if (info)
-               *info = mono_tramp_info_create (mono_get_generic_trampoline_name(tramp_type), 
+               *info = mono_tramp_info_create (mono_get_generic_trampoline_name(tramp_type),
                                                buf, buf - code, ji, unwind_ops);
 
        /* Sanity check */
@@ -563,8 +563,11 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
 
        g_assert (code - buf <= tramp_size);
 
-       if (info)
-               *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+       if (info) {
+               char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+               *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+               g_free (name);
+       }
 
        return(buf);
 #else
@@ -660,7 +663,7 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
 
        return(buf);
 }
index bc48ba5a69cd81dafd4c97d841dc68d3bff55d6f..592d0c603d1cab714ce3f56520092360435da702 100644 (file)
@@ -554,7 +554,7 @@ mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
        mono_arch_flush_icache (buf, code - buf);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+               *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
 
        if (mono_jit_map_is_enabled ())
                mono_emit_jit_tramp (buf, code - buf, "nullified_class_init_trampoline");
@@ -682,8 +682,11 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
 
        g_assert (code - buf <= tramp_size);
 
-       if (info)
-               *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+       if (info) {
+               char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+               *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+               g_free (name);
+       }
 
        return buf;
 }
@@ -782,7 +785,7 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a
        nacl_global_codeman_validate (&buf, tramp_size, &code);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
@@ -931,7 +934,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
        nacl_global_codeman_validate (&buf, tramp_size, &code);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("monitor_enter_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("monitor_enter_trampoline", buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
@@ -1046,7 +1049,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
        g_assert (code - buf <= tramp_size);
 
        if (info)
-               *info = mono_tramp_info_create (g_strdup_printf ("monitor_exit_trampoline"), buf, code - buf, ji, unwind_ops);
+               *info = mono_tramp_info_create ("monitor_exit_trampoline", buf, code - buf, ji, unwind_ops);
 
        return buf;
 }
index f32deb0cc045cb53f15f7cebcf75ff35c77f685f..9081b6f191a444435654128465cd312e5a6d9dbd 100644 (file)
@@ -105,9 +105,13 @@ struct jit_descriptor
 /* GDB puts a breakpoint in this function.  */
 void MONO_NOINLINE __jit_debug_register_code(void);
 
-/* Make sure to specify the version statically, because the
-   debugger may check the version before we can set it.  */
-struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
+#if !defined(MONO_LLVM_LOADED) && defined(ENABLE_LLVM)
+
+/* LLVM already defines these */
+
+extern struct jit_descriptor __jit_debug_descriptor;
+
+#else
 
 /* gcc seems to inline/eliminate calls to noinline functions, thus the asm () */
 void MONO_NOINLINE __jit_debug_register_code(void) {
@@ -116,6 +120,12 @@ void MONO_NOINLINE __jit_debug_register_code(void) {
 #endif
 }
 
+/* Make sure to specify the version statically, because the
+   debugger may check the version before we can set it.  */
+struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
+
+#endif
+
 static MonoImageWriter *xdebug_w;
 static MonoDwarfWriter *xdebug_writer;
 static FILE *xdebug_fp, *il_file;
@@ -157,7 +167,7 @@ mono_xdebug_init (char *options)
 
        img_writer_emit_start (w);
 
-       xdebug_writer = mono_dwarf_writer_create (w, il_file, 0, TRUE);
+       xdebug_writer = mono_dwarf_writer_create (w, il_file, 0, TRUE, TRUE);
 
        /* Emit something so the file has a text segment */
        img_writer_emit_section_change (w, ".text", 0);
@@ -180,7 +190,7 @@ xdebug_begin_emit (MonoImageWriter **out_w, MonoDwarfWriter **out_dw)
        if (!il_file)
                il_file = fopen ("xdb.il", "w");
 
-       dw = mono_dwarf_writer_create (w, il_file, il_file_line_index, FALSE);
+       dw = mono_dwarf_writer_create (w, il_file, il_file_line_index, FALSE, TRUE);
 
        mono_dwarf_writer_emit_base_info (dw, mono_unwind_get_cie_program ());
 
index d6f4c3178862a14cfcdde0ca410e5719866e3858..578ca030d71442ad86cda944964a4564b65f1fa5 100644 (file)
@@ -388,7 +388,8 @@ BASE_TEST_CS_SRC=           \
        bug-6148.cs     \
        assembly_append_ordering.cs     \
        bug-10127.cs    \
-       allow-synchronous-major.cs
+       allow-synchronous-major.cs      \
+       unload-appdomain-on-shutdown.cs
 
 TEST_CS_SRC_DIST=      \
        $(BASE_TEST_CS_SRC)     \
@@ -546,15 +547,11 @@ DISABLED_TESTS_WRENCH=    \
        $(PLATFORM_DISABLED_TESTS_WRENCH)       \
        main-returns-background-resetabort.exe \
        main-returns-background-abort-resetabort.exe    \
-       main-returns-background.exe     \
        thread6.exe     \
        assemblyresolve_event3.exe \
        delegate2.exe   \
-       finally_guard.exe       \
-       finalizer-abort.exe     \
-       finalizer-exit.exe      \
-       finalizer-thread.exe \
-       appdomain-async-invoke.exe
+       finally_guard.exe \
+       gc-altstack.exe
 
 AOT_DISABLED_TESTS=constraints-load.exe
 
index 5720bc1cd415731d1bbe826301f8cd0c2768b102..9b9bf2dc3df4f6d98f2759cf9e1b2f97dcd24fe9 100644 (file)
@@ -8,7 +8,7 @@ class P {
        ~P () {
                T.finalized = true;
                Thread.Sleep (1000);
-               //Console.WriteLine ("finalizer done");
+               // Console.WriteLine ("finalizer done");
                count++;
        }
 }
@@ -22,17 +22,10 @@ class T {
                p = null;
        }
 
-       static void callMakeP (int i) {
-               if (i <= 0)
-               {
-                       makeP ();
-                       return;
-               }
-               callMakeP (i - 1);
-       }
-
        static int Main () {
-               callMakeP (100);
+               var t = new Thread (makeP);
+               t.Start ();
+               t.Join ();
 
                GC.Collect ();
                while (!finalized) {
index dfdf0b2bc8d7f80bf97c2bcc5391160d33c3bfa7..e3b855ea6198eac86e091661cd38230298c1284c 100644 (file)
 \r
 .class public auto ansi beforefieldinit FieldWithMissingType\r
 {\r
-       .field  public [T]Missing BrokenField\r
+       .field  public [t]Missing BrokenField\r
     .field  public static int32 WorkingField\r
 }\r
diff --git a/mono/tests/unload-appdomain-on-shutdown.cs b/mono/tests/unload-appdomain-on-shutdown.cs
new file mode 100644 (file)
index 0000000..9cb13a8
--- /dev/null
@@ -0,0 +1,39 @@
+using System;
+using System.Reflection;
+using System.Threading;
+
+
+class Driver {
+       public static void Bla ()
+       {
+               //DoDomainUnload is invoked as part of the unload sequence, so let's pre jit it here to increase the likehood
+               //of hanging
+               var m = typeof (AppDomain).GetMethod ("DoDomainUnload", BindingFlags.Instance | BindingFlags.NonPublic);
+               if (m != null)
+                       m.MethodHandle.GetFunctionPointer (); 
+       }
+
+       static AppDomain ad;
+       static ManualResetEvent evt = new ManualResetEvent (false);
+       
+       static void UnloadIt ()
+       {
+               //AppDomain.Unload calls AppDomain::getDomainId () before calling into the runtime, so let's pre jit 
+               //it here to increase the likehood of hanging
+               var x = ad.Id;
+               evt.Set ();
+               AppDomain.Unload (ad);
+       }
+       static int Main ()
+       {
+               AppDomain.Unload (AppDomain.CreateDomain ("Warmup unload code"));
+               Console.WriteLine (".");
+               ad = AppDomain.CreateDomain ("NewDomain");
+               ad.DoCallBack (Bla);
+               var t = new Thread (UnloadIt);
+               t.IsBackground = true;
+               t.Start ();
+               evt.WaitOne ();
+               return 0;
+       }
+}
diff --git a/mono/tests/verifier/invalid_bad_catch_clause_type.il b/mono/tests/verifier/invalid_bad_catch_clause_type.il
new file mode 100755 (executable)
index 0000000..44d5c2d
--- /dev/null
@@ -0,0 +1,152 @@
+
+//  Microsoft (R) .NET Framework IL Disassembler.  Version 4.0.30319.17929
+//  Copyright (c) Microsoft Corporation.  All rights reserved.
+
+
+
+// Metadata version: v4.0.30319
+.assembly extern mscorlib
+{
+  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
+  .ver 4:0:0:0
+}
+.assembly 'test-901'
+{
+  .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
+                                                                                                             63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 )       // ceptionThrows.
+  .hash algorithm 0x00008004
+  .ver 0:0:0:0
+}
+.module 'test-901.exe'
+// MVID: {66ECA143-8B2A-47EB-A840-23ED00E2033E}
+.imagebase 0x00400000
+.file alignment 0x00000200
+.stackreserve 0x00100000
+.subsystem 0x0003       // WINDOWS_CUI
+.corflags 0x00000001    //  ILONLY
+// Image base: 0x00620000
+
+
+// =============== CLASS MEMBERS DECLARATION ===================
+
+.class public auto ansi beforefieldinit Application
+       extends [mscorlib]System.Object
+{
+  .class auto ansi sealed nested private beforefieldinit '<foo>c__async0`1'<.ctor ([mscorlib]System.Exception, [mscorlib]System.Runtime.Serialization.ISerializable, [mscorlib]System.Runtime.InteropServices._Exception) TException>
+         extends [mscorlib]System.ValueType
+         implements [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine
+  {
+    .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .field assembly valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder $builder
+    .field assembly int32 $PC
+    .method public hidebysig newslot virtual final 
+            instance void  MoveNext() cil managed
+    {
+      // Code size       94 (0x5e)
+      .maxstack  3
+      .locals init (class [mscorlib]System.Exception V_0)
+      IL_0000:  ldarg.0
+      IL_0001:  ldfld      int32 valuetype Application/'<foo>c__async0`1'<!TException>::$PC
+      IL_0006:  ldarg.0
+      IL_0007:  ldc.i4.m1
+      IL_0008:  stfld      int32 valuetype Application/'<foo>c__async0`1'<!TException>::$PC
+      IL_000d:  brtrue     IL_005d
+
+      .try
+      {
+        IL_0012:  call       !!0 [mscorlib]System.Activator::CreateInstance<!TException>()
+        IL_0017:  box        !TException
+        IL_001c:  throw
+
+      }  // end .try
+      catch !!0
+      {
+        IL_001d:  pop
+        IL_001e:  ldstr      "caught in correct block"
+        IL_0023:  call       void [mscorlib]System.Console::WriteLine(string)
+        IL_0028:  leave      IL_0052
+
+      }  // end handler
+      catch [mscorlib]System.Exception 
+      {
+        IL_002d:  stloc.0
+        IL_002e:  ldstr      "caught in generic block"
+        IL_0033:  call       void [mscorlib]System.Console::WriteLine(string)
+        IL_0038:  ldstr      "type: "
+        IL_003d:  ldloc.0
+        IL_003e:  callvirt   instance class [mscorlib]System.Type [mscorlib]System.Exception::GetType()
+        IL_0043:  call       string [mscorlib]System.String::Concat(object,
+                                                                    object)
+        IL_0048:  call       void [mscorlib]System.Console::WriteLine(string)
+        IL_004d:  leave      IL_0052
+
+      }  // end handler
+      IL_0052:  ldarg.0
+      IL_0053:  ldflda     valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!TException>::$builder
+      IL_0058:  call       instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult()
+      IL_005d:  ret
+    } // end of method '<foo>c__async0`1'::MoveNext
+
+    .method public hidebysig newslot virtual final 
+            instance void  SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) cil managed
+    {
+      .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) 
+      // Code size       13 (0xd)
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  ldflda     valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!TException>::$builder
+      IL_0006:  ldarg.1
+      IL_0007:  call       instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
+      IL_000c:  ret
+    } // end of method '<foo>c__async0`1'::SetStateMachine
+
+  } // end of class '<foo>c__async0`1'
+
+  .method public hidebysig specialname rtspecialname 
+          instance void  .ctor() cil managed
+  {
+    // Code size       7 (0x7)
+    .maxstack  8
+    IL_0000:  ldarg.0
+    IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
+    IL_0006:  ret
+  } // end of method Application::.ctor
+
+  .method private hidebysig static class [mscorlib]System.Threading.Tasks.Task 
+          foo<.ctor ([mscorlib]System.Exception) TException>() cil managed
+  {
+    .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 1C 41 70 70 6C 69 63 61 74 69 6F 6E 2B 3C   // ...Application+<
+                                                                                                                                       66 6F 6F 3E 63 5F 5F 61 73 79 6E 63 30 60 31 00   // foo>c__async0`1.
+                                                                                                                                       00 ) 
+    .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) 
+    // Code size       33 (0x21)
+    .maxstack  3
+    .locals init (valuetype Application/'<foo>c__async0`1'<!!TException> V_0)
+    IL_0000:  ldloca.s   V_0
+    IL_0002:  call       valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create()
+    IL_0007:  stfld      valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!!TException>::$builder
+    IL_000c:  ldloca.s   V_0
+    IL_000e:  ldflda     valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!!TException>::$builder
+    IL_0013:  dup
+    IL_0014:  ldloca.s   V_0
+    IL_0016:  call       instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Start<valuetype Application/'<foo>c__async0`1'<!!0>>(!!0&)
+    IL_001b:  call       instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task()
+    IL_0020:  ret
+  } // end of method Application::foo
+
+  .method private hidebysig static void  Main(string[] args) cil managed
+  {
+    .entrypoint
+    // Code size       11 (0xb)
+    .maxstack  8
+    IL_0000:  call       class [mscorlib]System.Threading.Tasks.Task Application::foo<class [mscorlib]System.InvalidOperationException>()
+    IL_0005:  callvirt   instance void [mscorlib]System.Threading.Tasks.Task::Wait()
+    IL_000a:  ret
+  } // end of method Application::Main
+
+} // end of class Application
+
+
+// =============================================================
+
+// *********** DISASSEMBLY COMPLETE ***********************
index e889a522c496690f3d89fc9dd8932775085deb4d..19040885da612aaf9908a3dedec6831aab1b491e 100644 (file)
@@ -3,8 +3,10 @@
  *
  * Authors:
  *   Geoff Norton (gnorton@novell.com)
+ *   Rodrigo Kumpera (kumpera@gmail.com)
  *
  * (C) 2010 Novell, Inc.
+ * (C) 2013 Xamarin, Inc.
  */
 
 #include <config.h>
 #include "utils/mono-sigcontext.h"
 #include "mach-support.h"
 
+/* Known offsets used for TLS storage*/
+
+/* All OSX versions up to 10.8 */
+#define TLS_VECTOR_OFFSET_CATS 0x60
+#define TLS_VECTOR_OFFSET_10_9 0xe0
+
+static int tls_vector_offset;
+
 void *
 mono_mach_arch_get_ip (thread_state_t state)
 {
@@ -85,11 +95,11 @@ void *
 mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key)
 {
        /* OSX stores TLS values in a hidden array inside the pthread_t structure
-        * They are keyed off a giant array offset 0x60 into the pointer.  This value
+        * They are keyed off a giant array from a known offset into the pointer.  This value
         * is baked into their pthread_getspecific implementation
         */
        intptr_t *p = (intptr_t *)thread;
-       intptr_t **tsd = (intptr_t **) ((char*)p + 0x60);
+       intptr_t **tsd = (intptr_t **) ((char*)p + tls_vector_offset);
 
        return (void *) &tsd [key];
 }
@@ -100,4 +110,29 @@ mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key)
        return *(void**)mono_mach_get_tls_address_from_thread (thread, key);
 }
 
+void
+mono_mach_init (pthread_key_t key)
+{
+       void *old_value = pthread_getspecific (key);
+       void *canary = (void*)0xDEADBEEFu;
+
+       pthread_key_create (&key, NULL);
+       g_assert (old_value != canary);
+
+       pthread_setspecific (key, canary);
+
+       /*First we probe for cats*/
+       tls_vector_offset = TLS_VECTOR_OFFSET_CATS;
+       if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+               goto ok;
+
+       tls_vector_offset = TLS_VECTOR_OFFSET_10_9;
+       if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+               goto ok;
+
+       g_error ("could not discover the mach TLS offset");
+ok:
+       pthread_setspecific (key, old_value);
+}
+
 #endif
index bd1c79de85581c155ef8eb32f4c87861cf0293e2..0aaf76c220c549dcbd9f64f1a629586b6da1806f 100644 (file)
 #include "utils/mono-sigcontext.h"
 #include "mach-support.h"
 
+/* Known offsets used for TLS storage*/
+
+/*Found on iOS 6 */
+#define TLS_VECTOR_OFFSET_0 0x48
+#define TLS_VECTOR_OFFSET_1 0xA8
+
+static int tls_vector_offset;
+
 void *
 mono_mach_arch_get_ip (thread_state_t state)
 {
@@ -86,14 +94,14 @@ mono_mach_arch_set_thread_state (thread_port_t thread, thread_state_t state, mac
 void *
 mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key)
 {
-       /* OSX stores TLS values in a hidden array inside the pthread_t structure
-        * They are keyed off a giant array offset 0x48 into the pointer.  This value
+       /* Mach stores TLS values in a hidden array inside the pthread_t structure
+        * They are keyed off a giant array from a known offset into the pointer. This value
         * is baked into their pthread_getspecific implementation
         */
        intptr_t *p = (intptr_t *) thread;
-       intptr_t **tsd = (intptr_t **) ((char*)p + 0x48 + (key << 2));
+       intptr_t **tsd = (intptr_t **) ((char*)p + tls_vector_offset);
 
-       return (void *)tsd;
+       return (void *) &tsd [key];
 }
 
 void *
@@ -102,4 +110,29 @@ mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key)
        return *(void**)mono_mach_get_tls_address_from_thread (thread, key);
 }
 
+void
+mono_mach_init (pthread_key_t key)
+{
+       void *old_value = pthread_getspecific (key);
+       void *canary = (void*)0xDEADBEEFu;
+
+       pthread_key_create (&key, NULL);
+       g_assert (old_value != canary);
+
+       pthread_setspecific (key, canary);
+
+       /*First we probe for cats*/
+       tls_vector_offset = TLS_VECTOR_OFFSET_0;
+       if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+               goto ok;
+
+       tls_vector_offset = TLS_VECTOR_OFFSET_1;
+       if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+               goto ok;
+
+       g_error ("could not discover the mach TLS offset");
+ok:
+       pthread_setspecific (key, old_value);
+}
+
 #endif
index fbba8dc882e8c6b4cfa5f61fd013ce65a05f4d16..9fece2272160425161aa10e057a593e3183ab9e8 100644 (file)
@@ -70,4 +70,10 @@ mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key)
 {
        g_assert_not_reached ();
 }
+
+void
+mono_mach_init (pthread_key_t key)
+{
+}
+
 #endif
index e65fe6bdeefe05a40f603c9d482fedbb2baa8b04..76d2b06beef149fdee73ddc7c1977bc6c2f40d42 100644 (file)
 #include "utils/mono-sigcontext.h"
 #include "mach-support.h"
 
+/* Known offsets used for TLS storage*/
+
+/* All OSX versions up to 10.8 */
+#define TLS_VECTOR_OFFSET_CATS 0x48
+#define TLS_VECTOR_OFFSET_10_9 0xb0
+
+static int tls_vector_offset;
+
 void *
 mono_mach_arch_get_ip (thread_state_t state)
 {
@@ -85,11 +93,11 @@ void *
 mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key)
 {
        /* OSX stores TLS values in a hidden array inside the pthread_t structure
-        * They are keyed off a giant array offset 0x48 into the pointer.  This value
+        * They are keyed off a giant array from a known offset into the pointer.  This value
         * is baked into their pthread_getspecific implementation
         */
        intptr_t *p = (intptr_t *) thread;
-       intptr_t **tsd = (intptr_t **) ((char*)p + 0x48);
+       intptr_t **tsd = (intptr_t **) ((char*)p + tls_vector_offset);
 
        return (void *) &tsd [key];     
 }
@@ -100,5 +108,29 @@ mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key)
        return *(void**)mono_mach_get_tls_address_from_thread (thread, key);
 }
 
+void
+mono_mach_init (pthread_key_t key)
+{
+       void *old_value = pthread_getspecific (key);
+       void *canary = (void*)0xDEADBEEFu;
+
+       pthread_key_create (&key, NULL);
+       g_assert (old_value != canary);
+
+       pthread_setspecific (key, canary);
+
+       /*First we probe for cats*/
+       tls_vector_offset = TLS_VECTOR_OFFSET_CATS;
+       if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+               goto ok;
+
+       tls_vector_offset = TLS_VECTOR_OFFSET_10_9;
+       if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+               goto ok;
+
+       g_error ("could not discover the mach TLS offset");
+ok:
+       pthread_setspecific (key, old_value);
+}
 
 #endif
index ffed22f53c994741b4cad802c8340ce62c39e6f8..55fd9850fc27e64d3ccbc43a4f96cb697cccbf40 100644 (file)
@@ -23,6 +23,7 @@ extern pthread_t pthread_from_mach_thread_np(mach_port_t);
 
 void *mono_mach_arch_get_ip (thread_state_t state) MONO_INTERNAL;
 void *mono_mach_arch_get_sp (thread_state_t state) MONO_INTERNAL;
+void mono_mach_init (pthread_key_t key) MONO_INTERNAL;
 
 int mono_mach_arch_get_mcontext_size (void) MONO_INTERNAL;
 void mono_mach_arch_thread_state_to_mcontext (thread_state_t state, void *context) MONO_INTERNAL;
index cc3d00cc50e27a764e002e3ae6a1bc6ce2564dec..52e8215d5775b0439945154b8bfc56466402eb66 100644 (file)
 
 #endif /* _MSC_VER */
 
-#if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && HAVE_VISIBILITY_HIDDEN
+#if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN
 #define MONO_INTERNAL __attribute__ ((visibility ("hidden")))
 #if MONO_LLVM_LOADED
 #define MONO_LLVM_INTERNAL 
index 087259fd15129cebee0d23876a50a24404706d2b..b2e245164f083f3c982837a2c81292e43334c73e 100644 (file)
@@ -491,7 +491,8 @@ shared_area_disabled (void)
        if (!use_shared_area) {
                if (g_getenv ("MONO_DISABLE_SHARED_AREA"))
                        use_shared_area = -1;
-               use_shared_area = 1;
+               else
+                       use_shared_area = 1;
        }
        return use_shared_area == -1;
 }
index da381f665f142e9be870be1aa2eea05c84e18476..39fbca64f93c7596b4259ce337d05b13beec0ecb 100644 (file)
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <assert.h>
 #include <sys/time.h>
+#include <mono/utils/mono-memory-model.h>
 
 #include "mono-mutex.h"
 
@@ -25,6 +26,7 @@
 #if defined(__APPLE__)
 #define _DARWIN_C_SOURCE
 #include <pthread_spis.h>
+#include <dlfcn.h>
 #endif
 
 #ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
@@ -131,10 +133,18 @@ mono_mutex_init_suspend_safe (mono_mutex_t *mutex)
 #if defined(__APPLE__)
        int res;
        pthread_mutexattr_t attr;
+       static gboolean inited;
+       static int (*setpolicy_np) (pthread_mutexattr_t *, int);
+
+       if (!inited) {
+               setpolicy_np = dlsym (RTLD_NEXT, "pthread_mutexattr_setpolicy_np");
+               mono_atomic_store_release (&inited, TRUE);
+       }
 
        pthread_mutexattr_init (&attr);
        pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE);
-       pthread_mutexattr_setpolicy_np (&attr, _PTHREAD_MUTEX_POLICY_FIRSTFIT);
+       if (setpolicy_np)
+               setpolicy_np (&attr, _PTHREAD_MUTEX_POLICY_FIRSTFIT);
        res = pthread_mutex_init (mutex, &attr);
        pthread_mutexattr_destroy (&attr);
 
index 250bdb9f4816dde3f40b140d8abd9d6afdc562de..8e0fe36136d153e481c9ca52ef9977200c2f0a9a 100644 (file)
@@ -421,6 +421,8 @@ get_pid_status_item (int pid, const char *item, MonoProcessError *error, int mul
                ret = t_info.virtual_size;
        else if (strcmp (item, "Threads") == 0)
                ret = th_count;
+       else
+               ret = 0;
 
        mach_port_deallocate (mach_task_self (), task);
        
index feff58fdbe4660b80209ddc688d677fde57f3b9f..bf7cdbc91140c2c12b567968b952755882c01b2a 100644 (file)
 
 #include <errno.h>
 
+#if defined(__MACH__)
+#include <mono/utils/mach-support.h>
+#endif
+
 #define THREADS_DEBUG(...)
 //#define THREADS_DEBUG(...) g_message(__VA_ARGS__)
 
@@ -281,6 +285,10 @@ mono_threads_init (MonoThreadInfoCallbacks *callbacks, size_t info_size)
        mono_thread_smr_init ();
        mono_threads_init_platform ();
 
+#if defined(__MACH__)
+       mono_mach_init (thread_info_key);
+#endif
+
        mono_threads_inited = TRUE;
 
        g_assert (sizeof (MonoNativeThreadId) <= sizeof (uintptr_t));
index f885d11b82195f45ff638b940222c82000e1882b..ce804ef6fb5761f85393591ba8562ca9df08df57 100644 (file)
@@ -7,6 +7,8 @@
  * Copyright (C) 2004-2006 Jonathan Pryor
  */
 
+#include <config.h>
+
 #define _XOPEN_SOURCE 600
 
 #ifdef PLATFORM_MACOSX
index da2750abe8a35758ca832e5cc760bbf06dac02ca..7fe7dac836324121782e1bb80d7878a7fce1b55b 100644 (file)
@@ -7,6 +7,8 @@
  * Copyright (C) 2004-2006 Jonathan Pryor
  */
 
+#include <config.h>
+
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif /* ndef _GNU_SOURCE */