Merge pull request #1860 from saper/tz-fix
authorMarcos Henrich <marcoshenrich@gmail.com>
Thu, 2 Jul 2015 14:06:16 +0000 (15:06 +0100)
committerMarcos Henrich <marcoshenrich@gmail.com>
Thu, 2 Jul 2015 14:06:16 +0000 (15:06 +0100)
[corlib] Assume UTC if no $TZ set. Fixes #30698.

370 files changed:
.gitignore
.gitmodules
Makefile.am
configure.ac
eglib/src/gmisc-unix.c
external/Lucene.Net [deleted submodule]
external/Lucene.Net.Light [new submodule]
external/referencesource
man/mono.1
mcs/Makefile
mcs/build/gensources.sh
mcs/build/profiles/monotouch_watch.make [new file with mode: 0644]
mcs/build/profiles/xammac_net_4_5.make [new file with mode: 0644]
mcs/class/Facades/Makefile
mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs
mcs/class/Makefile
mcs/class/Mono.CSharp/Makefile
mcs/class/Mono.CSharp/monotouch_watch_Mono.CSharp.dll.sources [new file with mode: 0644]
mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs
mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
mcs/class/Mono.Debugger.Soft/Test/dtest.cs
mcs/class/Mono.Dynamic.Interpreter/Makefile
mcs/class/Mono.Security/monotouch_watch_Mono.Security.dll.sources [new file with mode: 0644]
mcs/class/PEAPI/Metadata.cs
mcs/class/System.ComponentModel.Composition.4.5/Makefile
mcs/class/System.Core/Makefile
mcs/class/System.Core/ReferenceSources/SR.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedView.cs [new file with mode: 0644]
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs [deleted file]
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs [deleted file]
mcs/class/System.Core/Test/System.IO.MemoryMappedFiles/MemoryMappedFileTest.cs
mcs/class/System.Core/common_System.Core.dll.sources
mcs/class/System.Core/monotouch_watch_System.Core.dll.sources [new file with mode: 0644]
mcs/class/System.Core/xammac_net_4_5_System.Core.dll.sources [new file with mode: 0644]
mcs/class/System.Data.Linq/Makefile
mcs/class/System.Data.Services.Client/Makefile
mcs/class/System.Data.Services.Client/monotouch_watch_System.Data.Services.Client.dll.sources [new file with mode: 0644]
mcs/class/System.Data.Services.Client/xammac_net_4_5_System.Data.Services.Client.dll.sources [new file with mode: 0644]
mcs/class/System.Data/Makefile
mcs/class/System.Data/monotouch_watch_System.Data.dll.sources [new file with mode: 0644]
mcs/class/System.Data/xammac_net_4_5_System.Data.dll.sources [new file with mode: 0644]
mcs/class/System.IO.Compression/SharpCompress/Archive/AbstractWritableArchive.cs
mcs/class/System.IO.Compression/SharpCompress/Archive/Zip/ZipArchive.cs
mcs/class/System.IO.Compression/SharpCompress/Writer/Zip/ZipWriter.cs
mcs/class/System.IO.Compression/ZipArchive.cs
mcs/class/System.IdentityModel.Selectors/Makefile
mcs/class/System.IdentityModel/Makefile
mcs/class/System.IdentityModel/System.IdentityModel.Selectors/CustomUserNameSecurityTokenAuthenticator.cs
mcs/class/System.IdentityModel/System.IdentityModel.Selectors/UserNamePasswordValidator.cs
mcs/class/System.Interactive.Async/Makefile
mcs/class/System.Interactive.Providers/Makefile
mcs/class/System.Interactive/Makefile
mcs/class/System.Messaging/Makefile
mcs/class/System.Messaging/System.Messaging.Design/QueuePathEditor.cs
mcs/class/System.Messaging/System.Messaging/MessageQueue.cs
mcs/class/System.Messaging/System.Messaging/MessageQueueInstaller.cs
mcs/class/System.Net.Http/System.Net.Http.Headers/HeaderInfo.cs
mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs
mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
mcs/class/System.Net.Http/System.Net.Http/HttpContent.cs
mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
mcs/class/System.Net.Http/Test/System.Net.Http/MultipartContentTest.cs
mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.sources [new file with mode: 0644]
mcs/class/System.Reactive.Core/Makefile
mcs/class/System.Reactive.Debugger/Makefile
mcs/class/System.Reactive.Experimental/Makefile
mcs/class/System.Reactive.Interfaces/Makefile
mcs/class/System.Reactive.Linq/Makefile
mcs/class/System.Reactive.PlatformServices/Makefile
mcs/class/System.Runtime.Serialization/ReferenceSources/JsonFormatWriterGenerator_static.cs
mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization-net_4_5.csproj
mcs/class/System.Runtime.Serialization/monotouch_watch_System.Runtime.Serialization.dll.sources [new file with mode: 0644]
mcs/class/System.Runtime.Serialization/xammac_net_4_5_System.Runtime.Serialization.dll.sources [new file with mode: 0644]
mcs/class/System.ServiceModel.Web/Makefile
mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Web_test.dll.sources
mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs
mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs
mcs/class/System.ServiceModel.Web/monotouch_watch_System.ServiceModel.Web.dll.sources [new file with mode: 0644]
mcs/class/System.ServiceModel.Web/xammac_net_4_5_System.ServiceModel.Web.dll.sources [new file with mode: 0644]
mcs/class/System.ServiceModel/Dummy_2_1.cs
mcs/class/System.ServiceModel/Dummy_XM_4_5.cs [new file with mode: 0644]
mcs/class/System.ServiceModel/Makefile
mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReliableSessionBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlSerializerOperationBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel/OperationContext.cs
mcs/class/System.ServiceModel/System.ServiceModel/SilverlightClientConfigLoader.cs
mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/AsymmetricSecurityBindingElementTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/BinaryMessageEncodingBindingElementTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CustomBindingTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpTransportBindingElementTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/SecurityBindingElementTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/TcpTransportBindingElementTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataResolverTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceAuthorizationBehaviorTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceDebugBehaviorTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceEndpointTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/Bug652331Test.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/Bug652331_2Test.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChannelDispatcherTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchOperationTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/SecurityMessagePropertyTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/CallbackBehaviorAttributeTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ClientBaseTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ClientBase_InteractiveChannelInitializerTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ClientCredentialsSecurityTokenManagerTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/IntegratedConnectionTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/NetTcpBindingTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/OperationContextTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostTest.cs
mcs/class/System.ServiceModel/monotouch_watch_System.ServiceModel.dll.sources [new file with mode: 0644]
mcs/class/System.ServiceModel/xammac_net_4_5_System.ServiceModel.dll.sources [new file with mode: 0644]
mcs/class/System.Transactions/Makefile
mcs/class/System.Web.Routing/System.Web.Routing/RouteCollection.cs
mcs/class/System.Web.Services/Makefile
mcs/class/System.Web.Services/System.Web.Services.Description/ExtensionManager.cs
mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs
mcs/class/System.Web.Services/System.Web.Services.Protocols/Methods.cs
mcs/class/System.Web.Services/System.Web.Services.Protocols/ServerType.cs
mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapExtension.cs
mcs/class/System.Web.Services/monotouch_watch_System.Web.Services.dll.sources [new file with mode: 0644]
mcs/class/System.Web.Services/xammac_net_4_5_System.Web.Services.dll.sources [new file with mode: 0644]
mcs/class/System.Web/System.Web-net_4_5.csproj
mcs/class/System.Web/System.Web-plainweb-net_4_5.csproj
mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs
mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs
mcs/class/System.Web/System.Web.Util/HttpEncoder.cs
mcs/class/System.Web/System.Web/DynamicModuleManager.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web/HttpApplication.cs
mcs/class/System.Web/System.Web/HttpUtility.cs
mcs/class/System.Web/net_4_5_System.Web.dll.sources
mcs/class/System.XML/Makefile
mcs/class/System.XML/monotouch_watch_System.Xml.dll.sources [new file with mode: 0644]
mcs/class/System.Xaml/Assembly/AssemblyInfo.cs
mcs/class/System.Xaml/Makefile
mcs/class/System/Makefile
mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
mcs/class/System/Microsoft.VisualBasic/VBCodeCompiler.cs
mcs/class/System/System-bare-net_4_5.csproj
mcs/class/System/System-net_4_5.csproj
mcs/class/System/System-secxml-net_4_5.csproj
mcs/class/System/System.Diagnostics/Process.cs
mcs/class/System/System.Net.NetworkInformation/NetworkChange.cs
mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
mcs/class/System/System.Net.NetworkInformation/UnicastIPAddressInformation.cs
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Net/WebConnection.cs
mcs/class/System/System.dll.sources
mcs/class/System/Test/System.Diagnostics/ProcessTest.cs
mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
mcs/class/System/Test/System.Net/HttpWebResponseTest.cs
mcs/class/System/Test/System.Net/WebClientTest.cs
mcs/class/System/mobile_System.dll.sources
mcs/class/System/monotouch_watch_System.dll.sources [new file with mode: 0644]
mcs/class/WindowsBase/Assembly/AssemblyInfo.cs
mcs/class/WindowsBase/ZipSharp/NativeUnzip.cs
mcs/class/corlib/Makefile
mcs/class/corlib/System.Globalization/CultureInfo.cs
mcs/class/corlib/System.Runtime.CompilerServices/ConditionalWeakTable.cs
mcs/class/corlib/System.Threading/Timer.cs
mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs
mcs/class/corlib/Test/System.Security.Cryptography/HMACMD5Test.cs
mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
mcs/class/corlib/corlib-net_4_5.csproj
mcs/class/corlib/corlib.dll.sources
mcs/class/corlib/monotouch_watch_corlib.dll.sources [new file with mode: 0644]
mcs/class/monodoc/monodoc.dll.sources
mcs/class/test-helpers/NetworkHelpers.cs
mcs/errors/CS0101-9-2.cs [new file with mode: 0644]
mcs/errors/cs0101-9.cs [new file with mode: 0644]
mcs/ilasm/codegen/AssemblyNameStore.cs [deleted file]
mcs/ilasm/codegen/Class.cs [deleted file]
mcs/ilasm/codegen/ClassTable.cs [deleted file]
mcs/ilasm/codegen/ExternTypeRefInst.cs [deleted file]
mcs/ilasm/codegen/FieldTable.cs [deleted file]
mcs/ilasm/codegen/IClassRef.cs [deleted file]
mcs/ilasm/codegen/ITypeRef.cs [deleted file]
mcs/ilasm/codegen/Location.cs [deleted file]
mcs/ilasm/codegen/Method.cs [deleted file]
mcs/ilasm/codegen/MethodDef.cs
mcs/ilasm/codegen/MethodRef.cs
mcs/ilasm/codegen/MethodTable.cs [deleted file]
mcs/ilasm/codegen/PeapiTypeRef.cs
mcs/ilasm/ilasm.csproj [new file with mode: 0644]
mcs/ilasm/parser/ILParser.jay
mcs/ilasm/scanner/ILSyntaxError.cs [deleted file]
mcs/mcs/cs-tokenizer.cs
mcs/mcs/ecore.cs
mcs/mcs/expression.cs
mcs/mcs/generic.cs
mcs/mcs/ikvm.cs
mcs/mcs/namespace.cs
mcs/mcs/property.cs
mcs/tests/gtest-631.cs [new file with mode: 0644]
mcs/tests/gtest-632.cs [new file with mode: 0644]
mcs/tests/gtest-autoproperty-19.cs [new file with mode: 0644]
mcs/tests/test-926.cs [new file with mode: 0644]
mcs/tests/test-interpolation-06.cs [new file with mode: 0644]
mcs/tests/test-null-operator-10.cs [new file with mode: 0644]
mcs/tests/test-null-operator-11.cs [new file with mode: 0644]
mcs/tests/ver-il-net_4_5.xml
mcs/tools/linker/Mono.Linker.Steps/TypeMapStep.cs
mcs/tools/xbuild/data/Microsoft.VisualBasic.targets
mono/arch/s390x/s390x-codegen.h
mono/io-layer/processes.c
mono/metadata/Makefile.am
mono/metadata/appdomain.c
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/cominterop.c
mono/metadata/console-unix.c
mono/metadata/console-win32.c
mono/metadata/culture-info-tables.h
mono/metadata/domain-internals.h
mono/metadata/domain.c
mono/metadata/file-mmap-posix.c
mono/metadata/gc-internal.h
mono/metadata/gc.c
mono/metadata/icall-def.h
mono/metadata/icall.c
mono/metadata/loader.c
mono/metadata/marshal.c
mono/metadata/metadata.c
mono/metadata/mono-cq.c [deleted file]
mono/metadata/mono-cq.h [deleted file]
mono/metadata/mono-hash.c
mono/metadata/mono-wsq.c [deleted file]
mono/metadata/mono-wsq.h [deleted file]
mono/metadata/object-offsets.h
mono/metadata/object.c
mono/metadata/process.c
mono/metadata/reflection.c
mono/metadata/runtime.c
mono/metadata/sgen-client-mono.h
mono/metadata/sgen-mono.c
mono/metadata/sgen-new-bridge.c
mono/metadata/sgen-old-bridge.c
mono/metadata/sgen-tarjan-bridge.c
mono/metadata/sgen-toggleref.c
mono/metadata/socket-io.c
mono/metadata/threadpool-internals.h [deleted file]
mono/metadata/threadpool-ms-io-epoll.c
mono/metadata/threadpool-ms-io-kqueue.c
mono/metadata/threadpool-ms-io-poll.c
mono/metadata/threadpool-ms-io.c
mono/metadata/threadpool-ms-io.h
mono/metadata/threadpool-ms.c
mono/metadata/threadpool-ms.h
mono/metadata/threadpool.c [deleted file]
mono/metadata/threadpool.h [deleted file]
mono/metadata/threads-types.h
mono/metadata/threads.c
mono/metadata/tpool-epoll.c [deleted file]
mono/metadata/tpool-kqueue.c [deleted file]
mono/metadata/tpool-poll.c [deleted file]
mono/mini/Makefile.am.in
mono/mini/TestDriver.cs
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/aot-tests.cs
mono/mini/cpu-arm.md
mono/mini/debugger-agent.c
mono/mini/decompose.c
mono/mini/driver.c
mono/mini/dwarfwriter.c
mono/mini/exceptions-amd64.c
mono/mini/exceptions-x86.c
mono/mini/generics.cs
mono/mini/graph.c
mono/mini/helpers.c
mono/mini/ir-emit.h
mono/mini/jit-icalls.c
mono/mini/jit-icalls.h
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-exceptions.c
mono/mini/mini-generic-sharing.c
mono/mini/mini-llvm-cpp.cpp
mono/mini/mini-llvm-cpp.h
mono/mini/mini-llvm-loaded.c
mono/mini/mini-llvm.c
mono/mini/mini-ppc.c
mono/mini/mini-ppc.h
mono/mini/mini-runtime.c
mono/mini/mini-s390x.c
mono/mini/mini-trampolines.c
mono/mini/mini-x86.c
mono/mini/mini.c
mono/mini/mini.h
mono/mini/support-s390x.h
mono/mini/trace.c
mono/sgen/gc-internal-agnostic.h
mono/sgen/sgen-alloc.c
mono/sgen/sgen-cardtable.c
mono/sgen/sgen-cardtable.h
mono/sgen/sgen-client.h
mono/sgen/sgen-conf.h
mono/sgen/sgen-copy-object.h
mono/sgen/sgen-debug.c
mono/sgen/sgen-descriptor.c
mono/sgen/sgen-descriptor.h
mono/sgen/sgen-fin-weak-hash.c
mono/sgen/sgen-gc.c
mono/sgen/sgen-gc.h
mono/sgen/sgen-gray.c
mono/sgen/sgen-gray.h
mono/sgen/sgen-los.c
mono/sgen/sgen-marksweep-drain-gray-stack.h
mono/sgen/sgen-marksweep-scan-object-concurrent.h
mono/sgen/sgen-marksweep.c
mono/sgen/sgen-minor-copy-object.h
mono/sgen/sgen-minor-scan-object.h
mono/sgen/sgen-nursery-allocator.c
mono/sgen/sgen-pinning-stats.c
mono/sgen/sgen-pinning.c
mono/sgen/sgen-pinning.h
mono/sgen/sgen-scan-object.h
mono/sgen/sgen-simple-nursery.c
mono/sgen/sgen-split-nursery.c
mono/sgen/sgen-workers.c
mono/tests/Makefile.am
mono/tests/finalizer-exception.cs
mono/tests/load-missing.il
mono/unit-tests/Makefile.am
mono/utils/mach-support-arm.c
mono/utils/mono-compiler.h
mono/utils/mono-dl-darwin.c
mono/utils/mono-dl-posix.c
mono/utils/mono-dl-windows.c
mono/utils/mono-dl.h
mono/utils/mono-hwcap-s390x.h
mono/utils/mono-mutex.h
mono/utils/mono-proclib.c
mono/utils/mono-semaphore.c
mono/utils/mono-threads.c
mono/utils/mono-threads.h
msvc/scripts/order.xml
runtime/Makefile.am
tools/locale-builder/Driver.cs
winconfig.h

index e5b638b53e876f7e84a53986c778fa3d6f435fdf..65f1935f1ee1c0088bc93f5d0603994d70e61a98 100644 (file)
@@ -44,6 +44,8 @@ Ankh.NoLoad
 _ReSharper*/
 *.resharper
 [Tt]est[Rr]esult*
+*.orig
+*.rej
 
 # NuGet packages
 !.nuget/*
index 858838fc78f6b5a52e6602e3ee0fcf4723143f93..ee9a2ecdffda2721ce68ac538616e36d829f6b0a 100644 (file)
@@ -17,9 +17,6 @@
 [submodule "external/ikvm"]
        path = external/ikvm
        url = git://github.com/mono/ikvm-fork.git
-[submodule "external/Lucene.Net"]
-       path = external/Lucene.Net
-       url = git://github.com/mono/lucene.net.git
 [submodule "external/ikdasm"]
        path = external/ikdasm
        url = git://github.com/mono/ikdasm.git
@@ -30,3 +27,6 @@
 [submodule "external/reference-assemblies"]
        path = external/binary-reference-assemblies
        url = git://github.com/mono/reference-assemblies.git
+[submodule "external/Lucene.Net.Light"]
+       path = external/Lucene.Net.Light
+       url = git://github.com/mono/Lucene.Net.Light.git
index 68269d7e9175ba4c3ac2f06864f3c3b247b6f836..19f0cfbd7990508265351ab1424b1c6b397106a3 100644 (file)
@@ -10,19 +10,11 @@ SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scr
 ## 'tools' is not normally built
 DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
 else
-if ONLY_MONOTOUCH
-SUBDIRS = $(MONOTOUCH_SUBDIRS) runtime
-else
-if ONLY_XAMMAC
-SUBDIRS = $(libgc_dir) eglib/src mono runtime
-else
 SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
 # Keep in sync with SUBDIRS
 ## 'tools' is not normally built
 DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
 endif
-endif
-endif
 
 all: update_submodules
 
index f02e6526f9e7966753e57442c62e01c3364c3ebe..3b118aa006ea7eff2f441b57a8e059a26f030aaf 100644 (file)
@@ -291,7 +291,7 @@ case "$host" in
                host_win32=no
                platform_darwin=yes
                target_mach=yes
-               CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
+               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
                libmono_cflags="-D_THREAD_SAFE"
                need_link_unlink=yes
                AC_DEFINE(PTHREAD_POINTER_ID)
@@ -428,7 +428,7 @@ AC_PROG_LD_GNU
 
 AM_ICONV()
 
-AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h sys/sysctl.h libproc.h)
+AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h sys/sysctl.h libproc.h sys/prctl.h)
 AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h arpa/inet.h complex.h)
 AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h],
                   [], [], [#include <stddef.h>
@@ -1176,6 +1176,7 @@ if test x$host_win32 = xno; then
        AC_CHECK_FUNCS(dladdr)
        AC_CHECK_FUNCS(sysconf)
        AC_CHECK_FUNCS(getrlimit)
+       AC_CHECK_FUNCS(prctl)
 
        AC_CHECK_FUNCS(sched_setaffinity)
        AC_CHECK_FUNCS(sched_getcpu)
@@ -2097,6 +2098,7 @@ if test x$host_win32 = xno; then
        AC_CHECK_FUNCS(fstatat mknodat readlinkat)
        AC_CHECK_FUNCS(readv writev preadv pwritev)
        AC_CHECK_FUNCS(setpgid)
+       AC_CHECK_FUNCS(system)
        AC_CHECK_SIZEOF(size_t)
        AC_CHECK_TYPES([blksize_t], [AC_DEFINE(HAVE_BLKSIZE_T)], , 
                [#include <sys/types.h>
@@ -2474,7 +2476,7 @@ fi
  
 AC_MSG_CHECKING([if inter-process shared handles are requested])
 # Same as --enable-minimal=shared_handles
-AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
+AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=no)
 AC_MSG_RESULT($try_shared_handles)
 if test "x$try_shared_handles" != "xyes"; then
        AC_DEFINE(DISABLE_SHARED_HANDLES, 1, [Disable inter-process shared handles])
@@ -3239,7 +3241,7 @@ case "$host" in
        X11="libX11.so.6"
        ;;
     *-*-*freebsd*)
-       LIBC="libc.so"
+       LIBC="libc.so.7"
        INTL="libintl.so"
        SQLITE="libsqlite.so"
        SQLITE3="libsqlite3.so"
@@ -3491,8 +3493,8 @@ esac
 
 AC_ARG_WITH(profile4_5,[  --with-profile4_5=yes,no        If you want to install the 4.5 FX (defaults to yes)],                [], [with_profile4_5=yes])
 AC_ARG_WITH(monodroid, [  --with-monodroid=yes,no         If you want to build the MonoDroid assemblies (defaults to no)],     [], [with_monodroid=no])
-AC_ARG_WITH(monotouch, [  --with-monotouch=yes,no,only    If you want to build the MonoTouch assemblies (defaults to no)],     [], [with_monotouch=no])
-AC_ARG_WITH(xammac,    [  --with-xammac=yes,no,only       If you want to build the Xamarin.Mac assemblies (defaults to no)],   [], [with_xammac=no])
+AC_ARG_WITH(monotouch, [  --with-monotouch=yes,no         If you want to build the Xamarin.iOS assemblies (defaults to no)],   [], [with_monotouch=no])
+AC_ARG_WITH(xammac,    [  --with-xammac=yes,no            If you want to build the Xamarin.Mac assemblies (defaults to no)],   [], [with_xammac=no])
 
 OPROFILE=no
 AC_ARG_WITH(oprofile,[  --with-oprofile=no,<oprofile install dir>   Enable oprofile support (defaults to no)],[
@@ -3595,8 +3597,6 @@ AM_CONDITIONAL(INSTALL_4_5, [test "x$with_profile4_5" = xyes])
 AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
 AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
 AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
-AM_CONDITIONAL(ONLY_MONOTOUCH, [test "x$with_monotouch" = "xonly"])
-AM_CONDITIONAL(ONLY_XAMMAC, [test "x$with_xammac" = "xonly"])
 
 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
index 860b9304692d4b09210e456c7eea1d50037e6912..273024871c5f890e01410f8a12094cf256cd33d8 100644 (file)
@@ -93,24 +93,29 @@ get_pw_data (void)
                pthread_mutex_unlock (&pw_lock);
                return;
        }
+
+       home_dir = g_getenv ("HOME");
+       user_name = g_getenv ("USER");
+
 #ifdef HAVE_GETPWUID_R
-       if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) {
-               home_dir = g_strdup (pw.pw_dir);
-               user_name = g_strdup (pw.pw_name);
+       if (home_dir == NULL || user_name == NULL) {
+               if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) {
+                       if (home_dir == NULL)
+                               home_dir = g_strdup (pw.pw_dir);
+                       if (user_name == NULL)
+                               user_name = g_strdup (pw.pw_name);
+               }
        }
 #endif
+
+       if (user_name == NULL)
+               user_name = "somebody";
        if (home_dir == NULL)
-               home_dir = g_getenv ("HOME");
+               home_dir = "/";
 
-       if (user_name == NULL) {
-               user_name = g_getenv ("USER");
-               if (user_name == NULL)
-                       user_name = "somebody";
-       }
        pthread_mutex_unlock (&pw_lock);
 }
 
-/* Give preference to /etc/passwd than HOME */
 const gchar *
 g_get_home_dir (void)
 {
diff --git a/external/Lucene.Net b/external/Lucene.Net
deleted file mode 160000 (submodule)
index 88fb67b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 88fb67b07621dfed054d8d75fd50672fb26349df
diff --git a/external/Lucene.Net.Light b/external/Lucene.Net.Light
new file mode 160000 (submodule)
index 0000000..85978b7
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 85978b7eb94738f516824341213d5e94060f5284
index abe1cdfb1f941a03c477546534b33693a2ed1b40..9500c336932dcc9a5ef5a8589196691647dda69a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit abe1cdfb1f941a03c477546534b33693a2ed1b40
+Subproject commit 9500c336932dcc9a5ef5a8589196691647dda69a
index 2658da659ce42b4038d27ce664849240c6129816..2a9347fca0b0eae0a7ced1a04d401de6be72e47e 100644 (file)
@@ -1482,12 +1482,6 @@ include "clearlooks", "nice" and "win32".
 .Sp
 The default is "win32".  
 .TP
-\fBMONO_THREAPOOL\fR
-This environment variable can be used to choose the implementation of
-the ThreadPool used at runtime.  By default this uses the long term
-Mono threadpool implementation.   But a new "microsoft" value switches
-the threadpool implementation to Microsoft's CoreCLR/ReferenceSource implementation.
-.TP
 \fBMONO_TLS_SESSION_CACHE_TIMEOUT\fR
 The time, in seconds, that the SSL/TLS session cache will keep it's entry to
 avoid a new negotiation between the client and a server. Negotiation are very
index 4ff236774e5fc48ce71182e663ed95b3543ffbdf..8c40454ca32bceab99ce203422afc25ee18198e6 100644 (file)
@@ -8,12 +8,14 @@ basic_SUBDIRS := build jay mcs class
 build_SUBDIRS := build class mcs class/aot-compiler tools
 monodroid_SUBDIRS := build class
 monotouch_SUBDIRS := build class
+monotouch_watch_SUBDIRS := build class
 monotouch_runtime_SUBDIRS := build class
 xammac_SUBDIRS := build class
 mobile_SUBDIRS := build class
 mobile_static_SUBDIRS := build class
 binary_reference_assemblies_SUBDIRS := build class
 net_4_5_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
+xammac_net_4_5_SUBDIRS := build class
 xbuild_12_SUBDIRS := build class tools/xbuild
 xbuild_14_SUBDIRS := build class tools/xbuild
 
@@ -59,8 +61,10 @@ $(_boot_:%=profile-do--binary_reference_assemblies--%):           profile-do--bi
 $(_boot_:%=profile-do--net_4_5--%):           profile-do--net_4_5--%:           profile-do--build--%
 $(_boot_:%=profile-do--monodroid--%):         profile-do--monodroid--%:         profile-do--build--%
 $(_boot_:%=profile-do--monotouch--%):         profile-do--monotouch--%:         profile-do--build--%
+$(_boot_:%=profile-do--monotouch_watch--%):   profile-do--monotouch_watch--%:   profile-do--build--%
 $(_boot_:%=profile-do--monotouch_runtime--%):  profile-do--monotouch_runtime--%:  profile-do--build--%
 $(_boot_:%=profile-do--xammac--%):            profile-do--xammac--%:            profile-do--build--%
+$(_boot_:%=profile-do--xammac_net_4_5--%):    profile-do--xammac_net_4_5--%:           profile-do--build--%
 $(_boot_:%=profile-do--mobile--%):            profile-do--mobile--%:         profile-do--build--%
 $(_boot_:%=profile-do--mobile_static--%):     profile-do--mobile_static--%:     profile-do--build--%
 $(_boot_:%=profile-do--build--%):             profile-do--build--%:             profile-do--basic--%
index bc76b711d39879770af0f547f8186669c295c245..db7bf638bed6ba87b23dda367abd1e874c72f0a1 100644 (file)
@@ -34,7 +34,9 @@ rm -f $outfile.makefrag
 process_includes $incfile $outfile.inc
 
 if test x$extfile != x -a -f "$extfile"; then
-       cat $extfile >> $outfile.inc
+       process_includes $extfile $outfile.ext.inc
+       cat $outfile.ext.inc >> $outfile.inc
+       rm -f $outfile.ext.inc
 fi
 
 sort -u $outfile.inc > $outfile.inc_s
diff --git a/mcs/build/profiles/monotouch_watch.make b/mcs/build/profiles/monotouch_watch.make
new file mode 100644 (file)
index 0000000..eb28801
--- /dev/null
@@ -0,0 +1,4 @@
+include $(topdir)/build/profiles/monotouch.make
+
+PROFILE_MCS_FLAGS += \
+       -d:MONOTOUCH_WATCH
diff --git a/mcs/build/profiles/xammac_net_4_5.make b/mcs/build/profiles/xammac_net_4_5.make
new file mode 100644 (file)
index 0000000..4ea4eb1
--- /dev/null
@@ -0,0 +1,11 @@
+include $(topdir)/build/profiles/net_4_5.make
+PROFILE_MCS_FLAGS += -d:NO_SYSTEM_DRAWING_DEPENDENCY -d:NO_WINFORMS_DEPENDENCY -d:NO_SYSTEM_WEB_DEPENDENCY -d:XAMMAC_4_5
+XAMMAC_4_5=1
+NO_WINDOWS_BASE=1
+NO_SYSTEM_WEB_DEPENDENCY=1
+NO_SYSTEM_WEB_APPSERVICES_DEPENDENCY=1
+NO_WINFORMS_DEPENDENCY=1
+NO_SYSTEM_DRAWING_DEPENDENCY=1
+NO_SYSTEM_SERVICEMODEL_ACTIVATION_DEPENDENCY=1
+NO_SYSTEM_DESIGN_DEPENDENCY=1
+NO_SYSTEM_DIRECTORY_SERVICES_DEPENDENCY=1
index f4291c1f3de70d9c137b31d6fab9bbd2af58e412..f282abf814f383eb58b6ee16a61ca1274be3ea57 100644 (file)
@@ -18,6 +18,9 @@ net_4_5_SUBDIRS = $(monotouch_SUBDIRS) System.Reflection.Emit.ILGeneration Syste
 monodroid_SUBDIRS = $(net_4_5_SUBDIRS)
 
 xammac_SUBDIRS = $(net_4_5_SUBDIRS)
+xammac_net_4_5_SUBDIRS = $(net_4_5_SUBDIRS)
+
+monotouch_watch_SUBDIRS = $(monotouch_SUBDIRS)
 
 PROFILE_SUBDIRS = $(net_4_5_SUBDIRS)
 
index dc2f5dc8c617b4426c5e0b4da20326f6e167e889..61d5b5a04468de6b95b1eac09e189e718aee5d87 100644 (file)
@@ -26,6 +26,7 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TransportSecurityBindingElement))]
 #if !MOBILE
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DnsEndpointIdentity))]
+#if !XAMMAC_4_5
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageSecurityVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.BasicSecurityProfileVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecureConversationVersion))]
@@ -36,6 +37,7 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SupportingTokenParameters))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.UserNameSecurityTokenParameters))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.TrustVersion))]
+#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SpnEndpointIdentity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UpnEndpointIdentity))]
 #endif
index 07ec322f493b27dc0cfc7f8528fb9f5b77afd468..5c9688b78d7076d6d4e75eec32d3e743c55aaa43 100644 (file)
@@ -70,6 +70,8 @@ monodroid_dirs := \
 monotouch_dirs := \
        $(mobile_static_dirs)
 
+monotouch_watch_dirs := $(monotouch_dirs)
+
 monotouch_runtime_dirs := \
        corlib \
        System \
@@ -77,6 +79,50 @@ monotouch_runtime_dirs := \
        System.XML \
        Mono.CSharp
 
+xammac_4_5_dirs := \
+       corlib  \
+       System  \
+       Mono.Posix                      \
+       System.Core     \
+       System.XML      \
+       Mono.Security   \
+       System  \
+       I18N            \
+       System.ServiceModel.Internals   \
+       SMDiagnostics   \
+       System.Numerics \
+       Mono.Data.Tds   \
+       System.Transactions     \
+       System.EnterpriseServices       \
+       System.Data     \
+       System.Runtime.Serialization    \
+       System.Xml.Linq \
+       Mono.Data.Sqlite        \
+       System.Runtime.Serialization.Formatters.Soap \
+       System.ComponentModel.DataAnnotations \
+       System.IdentityModel            \
+       System.IdentityModel.Selectors  \
+       Mono.Messaging                  \
+       System.Configuration.Install    \
+       System.Messaging                \
+       System.Web.Services \
+       System.ServiceModel     \
+       System.ServiceModel.Web \
+       System.Json     \
+       System.Data.Services.Client \
+       System.IO.Compression \
+       System.IO.Compression.FileSystem \
+       System.ComponentModel.Composition.4.5 \
+       System.Net \
+       System.Windows \
+       System.Xml.Serialization \
+       Mono.CSharp     \
+       Microsoft.CSharp \
+       Mono.CompilerServices.SymbolWriter      \
+       System.Data.Linq                \
+       System.Net.Http \
+       $(pcl_facade_dirs)
+
 net_4_5_dirs := \
        corlib                          \
        System                          \
@@ -221,10 +267,12 @@ xbuild_4_0_dirs := \
 
 monodroid_SUBDIRS := $(monodroid_dirs)
 monotouch_SUBDIRS := $(monotouch_dirs)
+monotouch_watch_SUBDIRS := $(monotouch_watch_dirs)
 monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
 mobile_static_SUBDIRS := $(mobile_static_dirs)
 mobile_SUBDIRS := $(mobile_dynamic_dirs)
 xammac_SUBDIRS := $(xammac_dirs)
+xammac_net_4_5_SUBDIRS := $(xammac_4_5_dirs)
 binary_reference_assemblies_SUBDIRS := reference-assemblies
 net_4_5_SUBDIRS := $(net_4_5_dirs) $(xbuild_4_0_dirs)
 net_4_5_PARALLEL_SUBDIRS := $(net_4_5_parallel_dirs) aot-compiler
@@ -233,7 +281,7 @@ xbuild_14_SUBDIRS := $(xbuild_4_0_dirs)
 
 include ../build/rules.make
 
-SUBDIRS = $(mobile_static_dirs) $(mobile_dynamic_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_5_dirs) $(net_4_5_parallel_dirs)
+SUBDIRS = $(mobile_static_dirs) $(mobile_dynamic_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_5_dirs) $(net_4_5_parallel_dirs) $(xammac_net_4_5_SUBDIRS)
 
 DIST_ONLY_SUBDIRS = dlr aot-compiler reference-assemblies $(xbuild_4_0_dirs)
 
index 74f8e7ae15e41a184a90e0fd8a41891e38ab4336..74a1f0fe8f1d0d100662902af57852779e78c6e9 100644 (file)
@@ -7,7 +7,7 @@ LIBRARY = Mono.CSharp.dll
 LIB_REFS = System.Core System.Xml System
 LIB_MCS_FLAGS =
 
-MOBILE_STATIC := $(filter mobile_static monotouch, $(PROFILE))
+MOBILE_STATIC := $(filter mobile_static monotouch monotouch_watch, $(PROFILE))
 
 ifdef MOBILE_STATIC
 LIB_MCS_FLAGS += -d:IOS_REFLECTION
diff --git a/mcs/class/Mono.CSharp/monotouch_watch_Mono.CSharp.dll.sources b/mcs/class/Mono.CSharp/monotouch_watch_Mono.CSharp.dll.sources
new file mode 100644 (file)
index 0000000..6a71501
--- /dev/null
@@ -0,0 +1,2 @@
+#include mobile_static_Mono.CSharp.dll.sources
+monotouch.cs
index 277f25a7f6fade9f356f88b0795e82941db80e57..4d142314b9efb96d53d59d4ab4b061ccf22d780d 100644 (file)
@@ -205,7 +205,7 @@ namespace Mono.CompilerServices.SymbolWriter
                public static readonly LineNumberEntry Null = new LineNumberEntry (0, 0, 0, 0);
 
                public LineNumberEntry (int file, int row, int column, int offset)
-                       : this (file, row, offset, column, false)
+                       : this (file, row, column, offset, false)
                {
                }
 
index bde7bdeb3dafee0e39a050753dff01fdc5887be8..c5ae7c6ff2cf89e15ebc564530921fa6c3d0474b 100644 (file)
@@ -30,6 +30,8 @@ namespace Mono.Data.Sqlite
     private const string SQLITE_DLL = "SQLite.Interop.DLL";\r
 #endif // USE_INTEROP_DLL\r
 \r
+#elif MONOTOUCH\r
+       private const string SQLITE_DLL = "/usr/lib/libsqlite3.dylib";\r
 #else\r
     private const string SQLITE_DLL = "sqlite3";\r
 #endif\r
index dcc840d9886e84e0036186db99d1817271a348ea..5d7773d2477c4738b9099c7b7b8b320244449e31 100644 (file)
@@ -316,6 +316,7 @@ public class Tests : TestsBase, ITest2
                gc_suspend ();
                set_ip ();
                step_filters ();
+               local_reflect ();
                if (args.Length > 0 && args [0] == "domain-test")
                        /* This takes a lot of time, so execute it conditionally */
                        domains ();
@@ -329,6 +330,11 @@ public class Tests : TestsBase, ITest2
                return 3;
        }
 
+       public static void local_reflect () {
+               //Breakpoint line below, and reflect someField via ObjectMirror;
+               LocalReflectClass.RunMe ();
+       }
+
        public static void breakpoints () {
                /* Call these early so it is JITted by the time a breakpoint is placed on it */
                bp3 ();
@@ -1463,3 +1469,23 @@ public class LineNumbers
                #line 55 "FOO"
        }
 }
+
+class LocalReflectClass
+{
+       public static void RunMe ()
+       {
+               var reflectMe = new someClass ();
+               reflectMe.someMethod ();
+       }
+
+       class someClass : ContextBoundObject
+       {
+               public object someField;
+
+               public void someMethod ()
+               {
+               }
+       }
+}
+
+
index e51cdc061a0accf8d07308fa4bbf81ffa194a440..a115bc97a065bcfbecccb467e66c3a33aad540de 100644 (file)
@@ -383,6 +383,52 @@ public class DebuggerTests
                return req;
        }
 
+       [Test]
+       public void ClassLocalReflection () {
+               MethodMirror m = entry_point.DeclaringType.Assembly.GetType ("LocalReflectClass").GetMethod ("RunMe");
+
+               Assert.IsNotNull (m);
+               //Console.WriteLine ("X: " + name + " " + m.ILOffsets.Count + " " + m.Locations.Count);
+               var offset = -1;
+               int method_base_linum = m.Locations [0].LineNumber;
+               foreach (var location in m.Locations)
+                       if (location.LineNumber == method_base_linum + 2) {
+                               offset = location.ILOffset;
+                               break;
+                       }
+
+               var req = vm.SetBreakpoint (m, offset);
+
+               Event e = null;
+
+               while (true) {
+                       vm.Resume ();
+                       e = GetNextEvent ();
+                       if (e is BreakpointEvent)
+                               break;
+               }
+
+               req.Disable ();
+
+               Assert.IsInstanceOfType (typeof (BreakpointEvent), e);
+               Assert.AreEqual (m.Name, (e as BreakpointEvent).Method.Name);
+
+               e = single_step (e.Thread);
+
+               var frame = e.Thread.GetFrames ()[0];
+               Value variable = frame.GetValue (frame.Method.GetLocal ("reflectMe"));
+
+               ObjectMirror thisObj = (ObjectMirror)variable;
+               TypeMirror thisType = thisObj.Type;
+               FieldInfoMirror thisFi = null;
+               foreach (var fi in thisType.GetFields ())
+                       if (fi.Name == "someField")
+                               thisFi = fi;
+
+               var gotVal = thisObj.GetValue (thisFi);
+               // If we got this far, we're good.
+       }
+
        [Test]
        public void SingleStepping () {
                Event e = run_until ("single_stepping");
index a8cdba45d46beae535363ab32830f4b2e438f7da..fd1d15500a60f6f97888848074a9ef8ae51e1372 100644 (file)
@@ -10,7 +10,7 @@ LIB_MCS_FLAGS = \
        -d:MONO_INTERPRETER \
        -delaysign -keyfile:../mono.pub
 
-MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
+MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime monotouch_watch, $(PROFILE))
 
 ifdef MOBILE_STATIC
 mono_dynamic_interpreter_deps = $(the_libdir_base)plaincore/System.Core.dll
diff --git a/mcs/class/Mono.Security/monotouch_watch_Mono.Security.dll.sources b/mcs/class/Mono.Security/monotouch_watch_Mono.Security.dll.sources
new file mode 100644 (file)
index 0000000..007d940
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_Mono.Security.dll.sources
\ No newline at end of file
index c23512476609367cc651d8789d58134e6ca000b3..d983c8a2a2c754365ecb6c3d626726079f4c8104 100644 (file)
@@ -444,9 +444,59 @@ namespace PEAPI {
                        cVal = val;
                        tabIx = MDTable.CustomAttribute;
 
-                       var bac = val as ByteArrConst;
+                       byteVal = ConstantToByteArray (val);
+               }
+
+               static byte[] ConstantToByteArray (Constant c)
+               {
+                       var bac = c as ByteArrConst;
                        if (bac != null)
-                               byteVal = bac.val;
+                               return bac.val;
+
+                       var ms = new MemoryStream ();
+                       // Version info
+                       ms.WriteByte (1);
+                       ms.WriteByte (0);
+
+                       if (c == null) {
+                               ms.WriteByte (0);
+                               ms.WriteByte (0);
+                               return ms.ToArray ();
+                       }
+
+                       var sc = c as StringConst;
+                       if (sc != null) {
+                               string value = sc.val;
+                               if (value == null)
+                                       throw new NotImplementedException ();
+
+                               var buf = Encoding.UTF8.GetBytes (value);
+                               MetaData.CompressNum ((uint) buf.Length, ms);
+                               var byteVal = ms.ToArray ();
+                               System.Array.Resize (ref byteVal, (int) ms.Length + buf.Length + 2);
+                               System.Array.Copy (buf, 0, byteVal, ms.Length, buf.Length);
+                               return byteVal;
+                       }
+
+                       var ac = c as ArrayConstant;
+                       if (ac != null) {
+                               var bw = new BinaryWriter (ms);
+                               if (ac.ExplicitSize != null)
+                                       bw.Write (ac.ExplicitSize.Value);
+                               ac.Write (bw);
+                               bw.Write ((short)0);
+                               return ms.ToArray ();
+                       }
+
+                       var bc = c as DataConstant;
+                       if (bc != null) {
+                               var bw = new BinaryWriter (ms);
+                               bc.Write (bw);
+                               bw.Write ((short)0);
+                               return ms.ToArray ();
+                       }
+
+                       throw new NotImplementedException (c.GetType ().ToString ());
                }
 
                internal CustomAttribute(MetaDataElement paren, Method constrType,
@@ -2916,7 +2966,7 @@ namespace PEAPI {
        /// <summary>
        /// Boolean constant
        /// </summary>
-       public class BoolConst : Constant {
+       public class BoolConst : DataConstant {
                bool val;
 
                /// <summary>
@@ -3114,7 +3164,7 @@ namespace PEAPI {
 
        }
 
-       public class UIntConst : Constant {
+       public class UIntConst : DataConstant {
                ulong val;
 
                public UIntConst(byte val) 
@@ -3169,7 +3219,7 @@ namespace PEAPI {
        }
 
        public class StringConst : DataConstant {
-               string val;
+               internal string val;
 
                public StringConst(string val) 
                {
@@ -3270,6 +3320,8 @@ namespace PEAPI {
                        }
                }
 
+               public int? ExplicitSize { get; set; }
+
                internal sealed override void Write(BinaryWriter bw) 
                {
                        for (int i=0; i < dataVals.Length; i++) {
index b5f9682cc3f635beeed1873707e1c164298673f5..617cc35d89b3fd298a68c1092e63ded999f03d17 100644 (file)
@@ -13,7 +13,7 @@ CLEAN_FILES += $(STRING_MESSAGES)
 EXTRA_DISTFILES = \
        src/ComponentModel/Strings.resx
        
-VALID_PROFILE := $(filter net_4_5 monotouch monodroid xammac mobile mobile_static, $(PROFILE))
+VALID_PROFILE := $(filter net_4_5 monotouch monotouch_watch monodroid xammac xammac_net_4_5 mobile mobile_static, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.ComponentModel.Composition.dll
 NO_INSTALL = yes
index 12226e3d2e9fdf2aa7a41d366cf4a7f9586e4c24..a115311812cd160c83a987a8b57c666d9541b170 100644 (file)
@@ -14,7 +14,7 @@ LIB_MCS_FLAGS += -d:NET_3_5 -nowarn:1720
 endif
 
 MOBILE_DYNAMIC := $(filter monodroid xammac mobile, $(PROFILE))
-MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
+MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime monotouch_watch, $(PROFILE))
 
 ifdef MOBILE_DYNAMIC
 LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT
index 3c4d8e7ebcfcc3889a3320246c43c45121f4702a..c52050141f7f7d6a3b8e8200fdd77ff4d93adf22 100644 (file)
@@ -100,4 +100,8 @@ partial class SR
        public const string Cryptography_UnknownEllipticCurve = "Cryptography_UnknownEllipticCurve";
        public const string Cryptography_UnknownEllipticCurveAlgorithm = "Cryptography_UnknownEllipticCurveAlgorithm";
        public const string Cryptography_UnknownPaddingMode = "Cryptography_UnknownPaddingMode";
+
+       public const string InvalidOperation_ViewIsNull = "InvalidOperation_ViewIsNull";
+       public const string ObjectDisposed_ViewAccessorClosed = "ObjectDisposed_ViewAccessorClosed";
+       public const string NotSupported_MMViewStreamsFixedLength = "NotSupported_MMViewStreamsFixedLength";
 }
index 5bd03a9fe3b3b9e4ed5b3b679eaee3f1872b1692..5bba4d9209b21555441b2a1620e3efbd62864ca5 100644 (file)
@@ -298,7 +298,8 @@ namespace System.IO.MemoryMappedFiles
 
                public MemoryMappedViewStream CreateViewStream (long offset, long size, MemoryMappedFileAccess access)
                {
-                       return new MemoryMappedViewStream (handle, offset, size, access);
+                       var view = MemoryMappedView.Create (handle, offset, size, access);
+                       return new MemoryMappedViewStream (view);
                }
 
                public MemoryMappedViewAccessor CreateViewAccessor ()
@@ -313,7 +314,8 @@ namespace System.IO.MemoryMappedFiles
 
                public MemoryMappedViewAccessor CreateViewAccessor (long offset, long size, MemoryMappedFileAccess access)
                {
-                       return new MemoryMappedViewAccessor (handle, offset, size, access);
+                       var view = MemoryMappedView.Create (handle, offset, size, access);
+                       return new MemoryMappedViewAccessor (view);
                }
 
                MemoryMappedFile ()
@@ -358,6 +360,34 @@ namespace System.IO.MemoryMappedFiles
                                throw new NotImplementedException ();
                        }
                }
+
+               // This converts a MemoryMappedFileAccess to a FileAccess. MemoryMappedViewStream and
+               // MemoryMappedViewAccessor subclass UnmanagedMemoryStream and UnmanagedMemoryAccessor, which both use
+               // FileAccess to determine whether they are writable and/or readable.
+               internal static FileAccess GetFileAccess (MemoryMappedFileAccess access) {
+
+                       if (access == MemoryMappedFileAccess.Read) {
+                               return FileAccess.Read;
+                       }
+                       if (access == MemoryMappedFileAccess.Write) {
+                               return FileAccess.Write;
+                       }
+                       else if (access == MemoryMappedFileAccess.ReadWrite) {
+                               return FileAccess.ReadWrite;
+                       }
+                       else if (access == MemoryMappedFileAccess.CopyOnWrite) {
+                               return FileAccess.ReadWrite;
+                       }
+                       else if (access == MemoryMappedFileAccess.ReadExecute) {
+                               return FileAccess.Read;
+                       }
+                       else if (access == MemoryMappedFileAccess.ReadWriteExecute) {
+                               return FileAccess.ReadWrite;
+                       }
+
+                       // If we reached here, access was invalid.
+                       throw new ArgumentOutOfRangeException ("access");
+               }
        }
 }
 
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedView.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedView.cs
new file mode 100644 (file)
index 0000000..9362f00
--- /dev/null
@@ -0,0 +1,118 @@
+//
+// MemoryMappedView.cs
+//
+// Authors:
+//     Marcos Henrich (marcos.henrich@gmail.com)
+//
+// Copyright (C) 2015, Xamarin, Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Collections.Generic;
+using Microsoft.Win32.SafeHandles;
+
+namespace System.IO.MemoryMappedFiles
+{
+       internal class MemoryMappedView : IDisposable {
+               private SafeMemoryMappedViewHandle m_viewHandle;
+               private Int64 m_pointerOffset;
+               private Int64 m_size;
+               private MemoryMappedFileAccess m_access;
+
+               [System.Security.SecurityCritical]
+               private unsafe MemoryMappedView(SafeMemoryMappedViewHandle viewHandle, Int64 pointerOffset, 
+                                                                                       Int64 size, MemoryMappedFileAccess access) {
+
+                       m_viewHandle = viewHandle;
+                       m_pointerOffset = pointerOffset;
+                       m_size = size;
+                       m_access = access;
+               }
+
+               internal SafeMemoryMappedViewHandle ViewHandle {
+                       [System.Security.SecurityCritical]
+                       get {
+                               return m_viewHandle;
+                       }
+               }
+
+               internal Int64 PointerOffset {
+                       get {
+                               return m_pointerOffset;
+                       }
+               }
+
+               internal Int64 Size {
+                       get {
+                               return m_size;
+                       }
+               }
+
+               internal MemoryMappedFileAccess Access {
+                       get {
+                               return m_access;
+                       }
+               }
+
+               internal unsafe static MemoryMappedView Create (IntPtr handle, long offset, long size, MemoryMappedFileAccess access)
+               {
+                       IntPtr base_address;
+                       IntPtr mmap_handle;
+
+                       MemoryMapImpl.Map (handle, offset, ref size, access, out mmap_handle, out base_address);
+
+                       var safe_handle = new SafeMemoryMappedViewHandle (mmap_handle, base_address, size);
+
+                       // MemoryMapImpl.Map returns a base_address to the offset so MemoryMappedView is initiated
+                       // no offset.
+                       return new MemoryMappedView (safe_handle, 0, size, access);
+               }
+
+               public void Flush (IntPtr capacity)
+               {
+                       MemoryMapImpl.Flush (m_viewHandle.DangerousGetHandle ());
+               }
+               
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (m_viewHandle != null && !m_viewHandle.IsClosed) {
+                               m_viewHandle.Dispose ();
+                       }
+               }
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+               internal bool IsClosed {
+                       get {
+                               return (m_viewHandle == null || m_viewHandle.IsClosed);
+                       }
+               }
+       }
+}
+
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
deleted file mode 100644 (file)
index 8bb8fc3..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// MemoryMappedViewAccessor.cs
-//
-// Authors:
-//     Zoltan Varga (vargaz@gmail.com)
-//
-// Copyright (C) 2009, 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.IO;
-using System.Collections.Generic;
-using Microsoft.Win32.SafeHandles;
-
-namespace System.IO.MemoryMappedFiles
-{
-       public sealed class MemoryMappedViewAccessor : UnmanagedMemoryAccessor, IDisposable {
-               IntPtr mmap_handle;
-               SafeMemoryMappedViewHandle safe_handle;
-               long pointerOffset;
-
-               internal MemoryMappedViewAccessor (IntPtr handle, long offset, long size, MemoryMappedFileAccess access)
-               {
-                       pointerOffset = offset;
-                       Create (handle, offset, size, access);
-               }
-
-               public long PointerOffset
-               {
-                       get { return pointerOffset; }
-               }
-
-               static FileAccess ToFileAccess (MemoryMappedFileAccess access)
-               {
-                       switch (access){
-                       case MemoryMappedFileAccess.CopyOnWrite:
-                       case MemoryMappedFileAccess.ReadWrite:
-                       case MemoryMappedFileAccess.ReadWriteExecute:
-                               return FileAccess.ReadWrite;
-                               
-                       case MemoryMappedFileAccess.Write:
-                               return FileAccess.Write;
-                               
-                       case MemoryMappedFileAccess.ReadExecute:
-                       case MemoryMappedFileAccess.Read:
-                       default:
-                               return FileAccess.Read;
-                       }
-               }
-               
-               unsafe void Create (IntPtr handle, long offset, long size, MemoryMappedFileAccess access)
-               {
-                       IntPtr base_address;
-
-                       MemoryMapImpl.Map (handle, offset, ref size, access, out mmap_handle, out base_address);
-                       safe_handle = new SafeMemoryMappedViewHandle (mmap_handle, base_address, size);
-
-                       Initialize (safe_handle, 0, size, ToFileAccess (access));
-               }
-
-               public SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle {
-                       get {
-                               return safe_handle;
-                       }
-               }
-
-               protected override void Dispose (bool disposing)
-               {
-                       base.Dispose (disposing);
-               }
-
-               void IDisposable.Dispose () {
-                       Dispose (true);
-               }
-
-               public void Flush ()
-               {
-                       MemoryMapImpl.Flush (mmap_handle);
-               }
-       }
-}
-
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
deleted file mode 100644 (file)
index 6fbaca6..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// MemoryMappedViewStream.cs
-//
-// Authors:
-//     Zoltan Varga (vargaz@gmail.com)
-//
-// Copyright (C) 2009, 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.IO;
-using Microsoft.Win32.SafeHandles;
-
-namespace System.IO.MemoryMappedFiles
-{
-       public sealed class MemoryMappedViewStream : UnmanagedMemoryStream {
-               IntPtr mmap_handle;
-               object monitor;
-               long pointerOffset;
-
-               internal MemoryMappedViewStream (IntPtr handle, long offset, long size, MemoryMappedFileAccess access) {
-                       pointerOffset = offset;
-                       monitor = new Object ();
-                       CreateStream (handle, offset, size, access);
-               }
-
-               public long PointerOffset
-               {
-                       get { return pointerOffset; }
-               }
-
-               public SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle { 
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               unsafe void CreateStream (IntPtr handle, long offset, long size, MemoryMappedFileAccess access)
-               {
-                       IntPtr base_address;
-
-                       MemoryMapImpl.Map (handle, offset, ref size, access, out mmap_handle, out base_address);
-
-                       FileAccess faccess;
-                       switch (access) {
-                       case MemoryMappedFileAccess.ReadWrite:
-                               faccess = FileAccess.ReadWrite;
-                               break;
-                       case MemoryMappedFileAccess.Read:
-                               faccess = FileAccess.Read;
-                               break;
-                       case MemoryMappedFileAccess.Write:
-                               faccess = FileAccess.Write;
-                               break;
-                       default:
-                               throw new NotImplementedException ("access mode " + access + " not supported.");
-                       }
-                       Initialize ((byte*)base_address, size, size, faccess);
-               }
-                
-               protected override void Dispose (bool disposing)
-               {
-                       base.Dispose (disposing);
-                       lock (monitor) {
-                               if (mmap_handle != (IntPtr)(-1)) {
-                                       MemoryMapImpl.Unmap (mmap_handle);
-                                       mmap_handle = (IntPtr)(-1);
-                               }
-                       }
-               }
-
-               public override void Flush ()
-               {
-                       MemoryMapImpl.Flush (mmap_handle);
-               }
-       }
-}
-
index c07666a29c6d97de26b9037c2e5d60e95c43f584..3e7f235678609c688d853c781cea8b628d9195bb 100644 (file)
@@ -221,7 +221,8 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
                        var expected = "lo!";
 
                        using (var v = file.CreateViewAccessor (offset, expected.Length)) {
-                               Assert.AreEqual (offset, v.PointerOffset);
+                               // PointerOffset Mono implementation is always 0.
+                               // Assert.AreEqual (offset, v.PointerOffset);
 
                                var a = new byte [expected.Length];
                                var n = v.ReadArray (0, a, 0, expected.Length);
@@ -238,7 +239,8 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
                        var expected = "lo!";
 
                        using (var v = file.CreateViewStream (offset, expected.Length)) {
-                               Assert.AreEqual (offset, v.PointerOffset);
+                               // PointerOffset Mono implementation is always 0.
+                               // Assert.AreEqual (offset, v.PointerOffset);
 
                                var a = new byte [expected.Length];
                                var n = v.Read (a, 0, expected.Length);
@@ -395,6 +397,17 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
 #endif
                        stream.Write (new byte [pageSize], 0, pageSize);
                }
+
+               [Test] // #30741 #30825
+               public void CreateFromFileNullMapName ()
+               {
+                       int size = 100;
+                       string f = Path.Combine (tempDir, "null-map-name-file");
+                       File.WriteAllBytes (f, new byte [size]);
+
+                       FileStream file = File.OpenRead (f);
+                       MemoryMappedFile.CreateFromFile (file, null, size, MemoryMappedFileAccess.ReadExecute, null, 0, false);
+               }
        }
 }
 
index a90d09f09b80542aa643045b2c713b10943c121d..c3524281a3f3cf21bf5834eae295f1c51533e3d1 100644 (file)
@@ -3,8 +3,7 @@
 Assembly/AssemblyInfo.cs
 System/Util.cs
 System.IO.MemoryMappedFiles/MemoryMappedFile.cs
-System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
-System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
+System.IO.MemoryMappedFiles/MemoryMappedView.cs
 Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
 Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
 
@@ -34,6 +33,8 @@ ReferenceSources/Strings.cs
 
 ../../../external/referencesource/System.Core/System/IO/MemoryMappedFiles/Enums.cs
 ../../../external/referencesource/System.Core/System/IO/MemoryMappedFiles/MemoryMappedFileSecurity.cs
+../../../external/referencesource/System.Core/System/IO/MemoryMappedFiles/MemoryMappedViewAccessor.cs
+../../../external/referencesource/System.Core/System/IO/MemoryMappedFiles/MemoryMappedViewStream.cs
 
 ../../../external/referencesource/System.Core/System/Linq/Enumerable.cs
 ../../../external/referencesource/System.Core/System/Linq/IQueryable.cs
diff --git a/mcs/class/System.Core/monotouch_watch_System.Core.dll.sources b/mcs/class/System.Core/monotouch_watch_System.Core.dll.sources
new file mode 100644 (file)
index 0000000..7d32d44
--- /dev/null
@@ -0,0 +1,2 @@
+#include common_System.Core.dll.sources
+#include interpreter_System.Core.dll.sources
diff --git a/mcs/class/System.Core/xammac_net_4_5_System.Core.dll.sources b/mcs/class/System.Core/xammac_net_4_5_System.Core.dll.sources
new file mode 100644 (file)
index 0000000..89d524c
--- /dev/null
@@ -0,0 +1 @@
+#include net_4_5_System.Core.dll.sources
index ee325f1dc961c2c6b2f6aa289f4f4545c3d2ecb2..0218fbe0e81f2c8e6d2b47b79e8158d1b300f4ff 100644 (file)
@@ -13,7 +13,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 EXTRA_DISTFILES = src/DbLinq/Schema/Dbml/DbmlSchema.xsd
 
 # This is a .NET 3.5+ assembly
-VALID_PROFILE := $(filter net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter xammac_net_4_5 net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.Data.Linq.dll
 NO_INSTALL = yes
index 267835e819ed2d55202a1e7f9fa5bec20781297b..108d98cf1499262eecf3a67dcca510a3d5711b57 100644 (file)
@@ -13,9 +13,11 @@ LIB_MCS_FLAGS = \
        -resource:Client/System.Data.Services.Client.resources \
        -warn:2
 
+ifndef NO_WINDOWS_BASE
 ifneq (2.1, $(FRAMEWORK_VERSION))
 LIB_REFS += WindowsBase
 endif
+endif
 
 include ../../build/library.make
 
diff --git a/mcs/class/System.Data.Services.Client/monotouch_watch_System.Data.Services.Client.dll.sources b/mcs/class/System.Data.Services.Client/monotouch_watch_System.Data.Services.Client.dll.sources
new file mode 100644 (file)
index 0000000..37dc299
--- /dev/null
@@ -0,0 +1 @@
+#include net_4_5_System.Data.Services.Client.dll.sources
diff --git a/mcs/class/System.Data.Services.Client/xammac_net_4_5_System.Data.Services.Client.dll.sources b/mcs/class/System.Data.Services.Client/xammac_net_4_5_System.Data.Services.Client.dll.sources
new file mode 100644 (file)
index 0000000..37dc299
--- /dev/null
@@ -0,0 +1 @@
+#include net_4_5_System.Data.Services.Client.dll.sources
index 82f49a2804e2d4ce9d0e45094b19e8087c2b53b8..3ab96408521ffac2e391510a18199cdc1adc08eb 100644 (file)
@@ -12,7 +12,7 @@ LIB_MCS_FLAGS = \
        -d:MONO_PARTIAL_DATA_IMPORT \
        -unsafe
 
-MOBILE := $(filter monotouch monodroid xammac mobile mobile_static, $(PROFILE))
+MOBILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static, $(PROFILE))
 ifdef MOBILE
 LIB_REFS += Mono.Data.Tds System.Transactions
 LIB_MCS_FLAGS += -d:NO_CODEDOM -d:NO_OLEDB -d:NO_ODBC -d:NO_CONFIGURATION
diff --git a/mcs/class/System.Data/monotouch_watch_System.Data.dll.sources b/mcs/class/System.Data/monotouch_watch_System.Data.dll.sources
new file mode 100644 (file)
index 0000000..bbc860b
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Data.dll.sources
diff --git a/mcs/class/System.Data/xammac_net_4_5_System.Data.dll.sources b/mcs/class/System.Data/xammac_net_4_5_System.Data.dll.sources
new file mode 100644 (file)
index 0000000..597245c
--- /dev/null
@@ -0,0 +1 @@
+#include net_4_5_System.Data.dll.sources
index f0be3b0bc06132f34bd7b0794d5ca55acb467a1d..96af8c4131db2de4bf4b2d0d0b949f2ca6af6278 100644 (file)
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using System.Text;
 using SharpCompress.Common;
 
 namespace SharpCompress.Archive
@@ -105,11 +106,11 @@ namespace SharpCompress.Archive
             return false;
         }
 
-        public void SaveTo(Stream stream, CompressionInfo compressionType)
+        public void SaveTo(Stream stream, CompressionInfo compressionType, Encoding encoding = null)
         {
             //reset streams of new entries
             newEntries.Cast<IWritableArchiveEntry>().ForEach(x => x.Stream.Seek(0, SeekOrigin.Begin));
-            SaveTo(stream, compressionType, OldEntries, newEntries);
+            SaveTo(stream, compressionType, encoding ?? ArchiveEncoding.Default, OldEntries, newEntries);
         }
 
         protected TEntry CreateEntry(string key, Stream source, long size, DateTime? modified,
@@ -125,7 +126,7 @@ namespace SharpCompress.Archive
         protected abstract TEntry CreateEntryInternal(string key, Stream source, long size, DateTime? modified,
                                               bool closeStream);
 
-        protected abstract void SaveTo(Stream stream, CompressionInfo compressionType,
+        protected abstract void SaveTo(Stream stream, CompressionInfo compressionType, Encoding encoding,
                                        IEnumerable<TEntry> oldEntries, IEnumerable<TEntry> newEntries);
 
         public override void Dispose()
index 5c96e8e55543ff9600024a7fdacc1caac6ed210c..e2782dad9ec3ed05163b7cb99bc5af52f02a1f54 100644 (file)
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using System.Text;
 using SharpCompress.Common;
 using SharpCompress.Common.Zip;
 using SharpCompress.Common.Zip.Headers;
@@ -205,13 +206,13 @@ namespace SharpCompress.Archive.Zip
                     }
                 }
             }
-        }
+        }     
 
-        protected override void SaveTo(Stream stream, CompressionInfo compressionInfo,
+        protected override void SaveTo(Stream stream, CompressionInfo compressionInfo, Encoding encoding,
                                        IEnumerable<ZipArchiveEntry> oldEntries,
                                        IEnumerable<ZipArchiveEntry> newEntries)
         {
-            using (var writer = new ZipWriter(stream, compressionInfo, string.Empty))
+            using (var writer = new ZipWriter(stream, compressionInfo, string.Empty, encoding))
             {
                 foreach (var entry in oldEntries.Concat(newEntries)
                                                 .Where(x => !x.IsDirectory))
index 76a8853d0a05b03a39fdc4cec6eb4bb1e1a306ec..70a2eb7d8c4f103c144008895004176361d72d19 100644 (file)
@@ -30,16 +30,18 @@ namespace SharpCompress.Writer.Zip
 
         private readonly List<ZipCentralDirectoryEntry> entries = new List<ZipCentralDirectoryEntry>();
         private readonly string zipComment;
+        private readonly Encoding encoding;
         private long streamPosition;
 
 #if PPMd
         private readonly PpmdProperties ppmdProperties; // Caching properties to speed up PPMd.
 #endif
 
-        public ZipWriter(Stream destination, CompressionInfo compressionInfo, string zipComment)
+        public ZipWriter(Stream destination, CompressionInfo compressionInfo, string zipComment, Encoding encoding = null)
             : base(ArchiveType.Zip)
         {
             this.zipComment = zipComment ?? string.Empty;
+            this.encoding = encoding ?? ArchiveEncoding.Default;
 
             switch (compressionInfo.Type)
             {
@@ -137,11 +139,11 @@ namespace SharpCompress.Writer.Zip
 
         private int WriteHeader(string filename, DateTime? modificationTime)
         {
-            byte[] encodedFilename = Encoding.UTF8.GetBytes(filename);
+            byte[] encodedFilename = encoding.GetBytes(filename);
 
             OutputStream.Write(BitConverter.GetBytes(ZipHeaderFactory.ENTRY_HEADER_BYTES), 0, 4);
             OutputStream.Write(new byte[] {63, 0}, 0, 2); //version
-            HeaderFlags flags = HeaderFlags.UTF8;
+            HeaderFlags flags = encoding == Encoding.UTF8 ? HeaderFlags.UTF8 : (HeaderFlags)0;
             if (!OutputStream.CanSeek)
             {
                 flags |= HeaderFlags.UsePostDataDescriptor;
@@ -172,7 +174,7 @@ namespace SharpCompress.Writer.Zip
 
         private void WriteEndRecord(uint size)
         {
-            byte[] encodedComment = Encoding.UTF8.GetBytes(zipComment);
+            byte[] encodedComment = encoding.GetBytes(zipComment);
 
             OutputStream.Write(new byte[] {80, 75, 5, 6, 0, 0, 0, 0}, 0, 8);
             OutputStream.Write(BitConverter.GetBytes((ushort) entries.Count), 0, 2);
index feb5e1b705dec780327d9b62586094ac7bfc1faa..411aadc930f86c2c424f981fc12d0437a01862ca 100644 (file)
@@ -202,7 +202,7 @@ namespace System.IO.Compression
                private void Save()
                {
                        using (var newZip = new MemoryStream()) {
-                               zipFile.SaveTo(newZip, CompressionType.Deflate);
+                               zipFile.SaveTo(newZip, CompressionType.Deflate, entryNameEncoding ?? Encoding.UTF8);
 
                                stream.SetLength(0);
                                stream.Position = 0;
index de65914ecf0560553538efc9a7b28ea4fcbddb39..634954bea182148ea86ff031774ae433aa2a4801 100644 (file)
@@ -10,7 +10,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES =
 
-VALID_PROFILE := $(filter net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter net_4_5 xammac_net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.IdentityModel.Selectors.dll
 NO_INSTALL = yes
index 2bafd5b21867e430b814d112e42fb05ffecf7430..5ca9642627e6ee29a5fd0f3cc0723a5d220e168d 100644 (file)
@@ -2,16 +2,22 @@ thisdir = class/System.IdentityModel
 SUBDIRS = 
 include ../../build/rules.make
 
+ifndef NO_SYSTEM_WEB_APPSERVICES_DEPENDENCY
 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
 OTHER_LIB_MCS_FLAGS = -r:System.Web.ApplicationServices.dll
 endif
+endif
 
 LIBRARY = System.IdentityModel.dll
-LIB_REFS = System System.Xml System.Security System.Web System.Configuration Mono.Security System.Runtime.Serialization
+LIB_REFS = System System.Xml System.Security System.Configuration Mono.Security System.Runtime.Serialization
 LIB_MCS_FLAGS = \
                /d:NET_3_0      \
                $(OTHER_LIB_MCS_FLAGS)
 
+ifndef NO_SYSTEM_WEB_DEPENDENCY
+LIB_REFS += System.Web
+endif
+
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = \
@@ -20,7 +26,7 @@ EXTRA_DISTFILES = \
        Test/Resources/test.pfx \
        Test/Resources/test2.pfx
 
-VALID_PROFILE := $(filter net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter net_4_5 xammac_net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.IdentityModel.dll
 NO_INSTALL = yes
index 7a93f65dc15d3330c48dd3c6bcf2cd568cb1881d..f84843e362d776d74f38a71fd1d6f403febf8d42 100644 (file)
@@ -1,3 +1,4 @@
+#if !NO_SYSTEM_WEB_DEPENDENCY
 //
 // CustomUserNameSecurityTokenAuthenticator.cs
 //
@@ -133,3 +134,4 @@ namespace System.IdentityModel.Selectors
                }
        }
 }
+#endif
\ No newline at end of file
index 2111c1082bdd1532e5c6fc62aea8544015e1cf16..c8a426e801b158381bff4a257a35d31933c9e61d 100644 (file)
@@ -1,3 +1,4 @@
+#if !NO_SYSTEM_WEB_DEPENDENCY
 //
 // UserNamePasswordValidator.cs
 //
@@ -80,3 +81,4 @@ namespace System.IdentityModel.Selectors
                }
        }
 }
+#endif
\ No newline at end of file
index 8fa6632c72a584dd7d63db07471fa7004b1d2b3a..f7662a4ce000bbc49c563e178410f8abaf5795eb 100644 (file)
@@ -19,7 +19,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = more_build_args
 
-VALID_PROFILE := $(filter monotouch monodroid mobile mobile_static xammac net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter monotouch monotouch_watch monodroid mobile mobile_static xammac net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.System.Interactive.Async.dll
 NO_SIGN_ASSEMBLY = yes
index a6381f50d89b11863876b36f5a677b4e11688d30..eab4068fd9b267449a2a6ae400421af5ff16b862 100644 (file)
@@ -19,7 +19,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = more_build_args
 
-VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.System.Interactive.Providers.dll
 NO_SIGN_ASSEMBLY = yes
index b28f3b343df7f41324962736d2c0045c4ba085f5..70749cc0163156d3694ebe4659b8dab4564212df 100644 (file)
@@ -19,7 +19,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = more_build_args
 
-VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.System.Interactive.dll
 NO_SIGN_ASSEMBLY = yes
index 6a4b96a572d0d9bf561463296fdf028dd790d694..4cf4c29ab083040b47ed92087f5c42d22d0fdd2a 100644 (file)
@@ -3,15 +3,22 @@ SUBDIRS =
 include ../../build/rules.make
 
 LIBRARY = System.Messaging.dll
-LIB_REFS = System System.Configuration.Install System.Drawing System.Windows.Forms System.Xml Mono.Messaging
+LIB_REFS = System System.Xml Mono.Messaging System.Configuration.Install
+
+ifndef NO_SYSTEM_DRAWING_DEPENDENCY
+LIB_REFS += System.Drawing
+endif
+
 LIB_MCS_FLAGS = /resource:System.Messaging/MessageQueue.resx
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 \
                /r:nunit.mocks.dll
 
 EXTRA_DISTFILES = System.Messaging/MessageQueue.resx
 
-ifdef MESSAGING_NO_WINFORMS
+ifdef NO_WINFORMS_DEPENDENCY
 LIB_MCS_FLAGS += -d:NO_WINFORMS_DEPENDENCY
+else
+LIB_REFS += System.Windows.Forms
 endif
 
 include ../../build/library.make
index d50c600ada0e447577b1671fea9c1521f4739b6d..88d8608d58c9dd1c5e8ab7419ed97c1f12b3f301 100644 (file)
@@ -28,6 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_SYSTEM_DRAWING_DEPENDENCY
 using System.ComponentModel;
 using System.Drawing.Design;
 
@@ -53,3 +54,4 @@ namespace System.Messaging.Design
                }
        }
 }
+#endif
\ No newline at end of file
index 8b3481b9d3e53b1b0f43ac72eecbe1945284bc5b..7286d059121ee1a54da191284e02ffb302d02ca3 100644 (file)
@@ -32,7 +32,9 @@
 using System;
 using System.Collections;
 using System.ComponentModel;
+#if !NO_SYSTEM_DRAWING_DEPENDENCY
 using System.Drawing;
+#endif
 using System.Messaging.Design;
 using System.Threading;
 
@@ -258,7 +260,9 @@ namespace System.Messaging
                }
 
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+#if !NO_SYSTEM_DRAWING_DEPENDENCY
                [TypeConverter (typeof(SizeConverter))]
+#endif
                [MessagingDescription ("MQ_MaximumJournalSize")]
                public long MaximumJournalSize {
                        get {
@@ -270,7 +274,9 @@ namespace System.Messaging
                }
 
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+#if !NO_SYSTEM_DRAWING_DEPENDENCY
                [TypeConverter (typeof(SizeConverter))]
+#endif
                [MessagingDescription ("MQ_MaximumQueueSize")]
                public long MaximumQueueSize {
                        get {
index d3b9889a80d6f839569383563af4e4a2b4d8071f..4606e5ebd13f201f53cf20751b9105a245c8e04d 100644 (file)
@@ -31,7 +31,9 @@ using System;
 using System.Collections;
 using System.ComponentModel;
 using System.Configuration.Install;
+#if !NO_SYSTEM_DRAWING_DEPENDENCY
 using System.Drawing;
+#endif
 
 namespace System.Messaging 
 {
@@ -88,7 +90,9 @@ namespace System.Messaging
                        set {throw new NotImplementedException();}
                }
 
+#if !NO_SYSTEM_DRAWING_DEPENDENCY
                [TypeConverter (typeof(SizeConverter))]
+#endif
                public long MaximumJournalSize {
                        [MonoTODO]
                        get {throw new NotImplementedException();}
@@ -96,7 +100,9 @@ namespace System.Messaging
                        set {throw new NotImplementedException();}
                }
 
+#if !NO_SYSTEM_DRAWING_DEPENDENCY
                [TypeConverter (typeof(SizeConverter))]
+#endif
                public long MaximumQueueSize {
                        [MonoTODO]
                        get {throw new NotImplementedException();}
@@ -183,4 +189,4 @@ namespace System.Messaging
                        throw new NotImplementedException();
                }
        }
-}
+}
\ No newline at end of file
index ceddbfa125028204793ef5eb2a614c2e9a6d50ba..9ca277dbbcd3ed5f92ef9a04e09fa3b6b5cade31 100644 (file)
@@ -134,9 +134,11 @@ namespace System.Net.Http.Headers
                        this.HeaderKind = headerKind;
                }
 
-               public static HeaderInfo CreateSingle<T> (string name, TryParseDelegate<T> parser, HttpHeaderKind headerKind)
+               public static HeaderInfo CreateSingle<T> (string name, TryParseDelegate<T> parser, HttpHeaderKind headerKind, Func<object, string> toString = null)
                {
-                       return new HeaderTypeInfo<T, object> (name, parser, headerKind);
+                       return new HeaderTypeInfo<T, object> (name, parser, headerKind) {
+                               CustomToString = toString
+                       };
                }
 
                //
@@ -152,6 +154,10 @@ namespace System.Net.Http.Headers
                        return CreateCollection (headers, this);
                }
 
+               public Func<object, string> CustomToString {
+                       get; private set;
+               }
+
                public virtual string Separator {
                        get {
                                // Needed for AllowsMany only
index 8fdb011cd51fa6833db66e62c5f45ad0a32afd63..3a7d6ed0a40ab26e060c8bf3f48182fc2a171b9f 100644 (file)
@@ -48,7 +48,7 @@ namespace System.Net.Http.Headers
 
                        public readonly Func<object, string> CustomToString;
 
-                       public HeaderBucket (object parsed, Func<object, string> converter = null)
+                       public HeaderBucket (object parsed, Func<object, string> converter)
                        {
                                this.Parsed = parsed;
                                this.CustomToString = converter;
@@ -104,18 +104,18 @@ namespace System.Net.Http.Headers
                                HeaderInfo.CreateSingle<byte[]> ("Content-MD5", Parser.MD5.TryParse, HttpHeaderKind.Content),
                                HeaderInfo.CreateSingle<ContentRangeHeaderValue> ("Content-Range", ContentRangeHeaderValue.TryParse, HttpHeaderKind.Content),
                                HeaderInfo.CreateSingle<MediaTypeHeaderValue> ("Content-Type", MediaTypeHeaderValue.TryParse, HttpHeaderKind.Content),
-                               HeaderInfo.CreateSingle<DateTimeOffset> ("Date", Parser.DateTime.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
+                               HeaderInfo.CreateSingle<DateTimeOffset> ("Date", Parser.DateTime.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response, Parser.DateTime.ToString),
                                HeaderInfo.CreateSingle<EntityTagHeaderValue> ("ETag", EntityTagHeaderValue.TryParse, HttpHeaderKind.Response),
                                HeaderInfo.CreateMulti<NameValueWithParametersHeaderValue> ("Expect", NameValueWithParametersHeaderValue.TryParse, HttpHeaderKind.Request),
-                               HeaderInfo.CreateSingle<DateTimeOffset> ("Expires", Parser.DateTime.TryParse, HttpHeaderKind.Content),
+                               HeaderInfo.CreateSingle<DateTimeOffset> ("Expires", Parser.DateTime.TryParse, HttpHeaderKind.Content, Parser.DateTime.ToString),
                                HeaderInfo.CreateSingle<string> ("From", Parser.EmailAddress.TryParse, HttpHeaderKind.Request),
                                HeaderInfo.CreateSingle<string> ("Host", Parser.Host.TryParse, HttpHeaderKind.Request),
                                HeaderInfo.CreateMulti<EntityTagHeaderValue> ("If-Match", EntityTagHeaderValue.TryParse, HttpHeaderKind.Request),
-                               HeaderInfo.CreateSingle<DateTimeOffset> ("If-Modified-Since", Parser.DateTime.TryParse, HttpHeaderKind.Request),
+                               HeaderInfo.CreateSingle<DateTimeOffset> ("If-Modified-Since", Parser.DateTime.TryParse, HttpHeaderKind.Request, Parser.DateTime.ToString),
                                HeaderInfo.CreateMulti<EntityTagHeaderValue> ("If-None-Match", EntityTagHeaderValue.TryParse, HttpHeaderKind.Request),
                                HeaderInfo.CreateSingle<RangeConditionHeaderValue> ("If-Range", RangeConditionHeaderValue.TryParse, HttpHeaderKind.Request),
-                               HeaderInfo.CreateSingle<DateTimeOffset> ("If-Unmodified-Since", Parser.DateTime.TryParse, HttpHeaderKind.Request),
-                               HeaderInfo.CreateSingle<DateTimeOffset> ("Last-Modified", Parser.DateTime.TryParse, HttpHeaderKind.Content),
+                               HeaderInfo.CreateSingle<DateTimeOffset> ("If-Unmodified-Since", Parser.DateTime.TryParse, HttpHeaderKind.Request, Parser.DateTime.ToString),
+                               HeaderInfo.CreateSingle<DateTimeOffset> ("Last-Modified", Parser.DateTime.TryParse, HttpHeaderKind.Content, Parser.DateTime.ToString),
                                HeaderInfo.CreateSingle<Uri> ("Location", Parser.Uri.TryParse, HttpHeaderKind.Response),
                                HeaderInfo.CreateSingle<int> ("Max-Forwards", Parser.Int.TryParse, HttpHeaderKind.Request),
                                HeaderInfo.CreateMulti<NameValueHeaderValue> ("Pragma", NameValueHeaderValue.TryParsePragma, HttpHeaderKind.Request | HttpHeaderKind.Response),
@@ -198,18 +198,18 @@ namespace System.Net.Http.Headers
 
                                        if (headerInfo.AllowsMany) {
                                                if (bucket == null)
-                                                       bucket = new HeaderBucket (headerInfo.CreateCollection (this));
+                                                       bucket = new HeaderBucket (headerInfo.CreateCollection (this), headerInfo.CustomToString);
 
                                                headerInfo.AddToCollection (bucket.Parsed, parsed_value);
                                        } else {
                                                if (bucket != null)
                                                        throw new FormatException ();
 
-                                               bucket = new HeaderBucket (parsed_value);
+                                               bucket = new HeaderBucket (parsed_value, headerInfo.CustomToString);
                                        }
                                } else {
                                        if (bucket == null)
-                                               bucket = new HeaderBucket (null);
+                                               bucket = new HeaderBucket (null, null);
 
                                        bucket.Values.Add (value ?? string.Empty);
                                }
@@ -343,29 +343,36 @@ namespace System.Net.Http.Headers
                        return true;
                }
 
+               internal static string GetSingleHeaderString (string key, IEnumerable<string> values)
+               {
+                       string separator = ",";
+                       HeaderInfo headerInfo;
+                       if (known_headers.TryGetValue (key, out headerInfo) && headerInfo.AllowsMany)
+                               separator = headerInfo.Separator;
+
+                       var sb = new StringBuilder ();
+                       bool first = true;
+                       foreach (var v in values) {
+                               if (!first) {
+                                       sb.Append (separator);
+                                       if (separator != " ")
+                                               sb.Append (" ");
+                               }
+
+                               sb.Append (v);
+                               first = false;
+                       }
+
+                       return sb.ToString ();
+               }
+
                public override string ToString ()
                {
                        var sb = new StringBuilder ();
                        foreach (var entry in this) {
                                sb.Append (entry.Key);
                                sb.Append (": ");
-
-                               string separator = ",";
-                               HeaderInfo headerInfo;
-                               if (known_headers.TryGetValue (entry.Key, out headerInfo) && headerInfo.AllowsMany)
-                                       separator = headerInfo.Separator;
-
-                               bool first = true;
-                               foreach (var v in entry.Value) {
-                                       if (!first) {
-                                               sb.Append (separator);
-                                               sb.Append (" ");
-                                       }
-
-                                       sb.Append (v);
-                                       first = false;
-                               }
-
+                               sb.Append (GetSingleHeaderString (entry.Key, entry.Value));
                                sb.Append ("\r\n");
                        }
 
@@ -466,7 +473,7 @@ namespace System.Net.Http.Headers
 
                        if (!headers.TryGetValue (name, out value)) {
                                var hinfo = known_headers[name];
-                               value = new HeaderBucket (new HttpHeaderValueCollection<T> (this, hinfo));
+                               value = new HeaderBucket (new HttpHeaderValueCollection<T> (this, hinfo), hinfo.CustomToString);
                                headers.Add (name, value);
                        }
 
index 513a21eb5db772564a9c6c7b3245f2bb0a38c4a9..ccf9a808c25b9e005b32d1d846c0efa98ef9f8ca 100644 (file)
@@ -274,9 +274,7 @@ namespace System.Net.Http
                        // Add request headers
                        var headers = wr.Headers;
                        foreach (var header in request.Headers) {
-                               foreach (var value in header.Value) {
-                                       headers.AddValue (header.Key, value);
-                               }
+                               headers.AddValue (header.Key, HttpRequestHeaders.GetSingleHeaderString (header.Key, header.Value));
                        }
                        
                        return wr;
@@ -340,6 +338,8 @@ namespace System.Net.Http
                                                        wrequest.ContentLength = content.Headers.ContentLength.Value;
                                                }
 
+                                               wrequest.ResendContentFactory = content.CopyTo;
+
                                                var stream = await wrequest.GetRequestStreamAsync ().ConfigureAwait (false);
                                                await request.Content.CopyToAsync (stream).ConfigureAwait (false);
                                        } else if (HttpMethod.Post.Equals (request.Method) || HttpMethod.Put.Equals (request.Method) || HttpMethod.Delete.Equals (request.Method)) {
index 344d87164eb1621a6d55bc6d67d03c3def40488b..df97dc50bbc11d7168206a84565ffb8321f9095e 100644 (file)
@@ -81,6 +81,12 @@ namespace System.Net.Http
                        }
                }
 
+               // Only used by HttpWebRequest internals which is not async friendly
+               internal void CopyTo (Stream stream)
+               {
+                       CopyToAsync (stream).Wait ();
+               }
+
                public Task CopyToAsync (Stream stream)
                {
                        return CopyToAsync (stream, null);
index b58318819a2de3bbbb1e36e633a2a24e1d340561..a6c69de2bb99e96640a181ab26b8ddef1712a130 100644 (file)
@@ -572,6 +572,41 @@ namespace MonoTests.System.Net.Http
                        }
                }
 
+               [Test]
+               public void Send_Complete_CustomHeaders_SpecialSeparators ()
+               {
+                       bool? failed = null;
+
+                       var listener = CreateListener (l => {
+                               var request = l.Request;
+
+                               try {
+                                       Assert.AreEqual ("MLK Android Phone 1.1.9", request.UserAgent, "#1");
+                                       failed = false;
+                               } catch {
+                                       failed = true;
+                               }
+                       });
+
+                       try {
+                               var client = new HttpClient ();
+
+                               client.DefaultRequestHeaders.Add("User-Agent", "MLK Android Phone 1.1.9");
+
+                               var request = new HttpRequestMessage (HttpMethod.Get, LocalServer);
+
+                               var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result;
+
+                               Assert.AreEqual ("", response.Content.ReadAsStringAsync ().Result, "#100");
+                               Assert.AreEqual (HttpStatusCode.OK, response.StatusCode, "#101");
+                               Assert.AreEqual (false, failed, "#102");
+                       } finally {
+                               listener.Abort ();
+                               listener.Close ();
+                       }
+               }
+
+
                [Test]
                public void Send_Complete_Content ()
                {
index 177df39d5b695e4a803d3676610aaf9f79b11cf7..9a1333cbb5db8a5b54400d94f458a989e503193a 100644 (file)
@@ -133,6 +133,16 @@ namespace MonoTests.System.Net.Http
                        Assert.AreEqual (other, m.First (), "#4");
                }
 
+               [Test]
+               public void Add_ParseCustomToString ()
+               {
+                       var m = new MultipartContent ("a", "b");
+
+                       m.Headers.Add ("Expires", "Mon,   30 Nov 2020   19:55:22    GMT");
+
+                       Assert.AreEqual ("Mon, 30 Nov 2020 19:55:22 GMT", m.Headers.Skip (1).First().Value.First ());
+               }
+
                [Test]
                public void Add_Resursive ()
                {
diff --git a/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.sources
new file mode 100644 (file)
index 0000000..685ab03
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_System.Net.Http.dll.sources
\ No newline at end of file
index 2928707e8cadd8461ef05318b9535fc2b543640d..cf89862c5563dd4af79f78af2d6a1ecacec0f094 100644 (file)
@@ -34,7 +34,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = more_build_args $(RESX_RESOURCES:.resources=.resx) $(PREBUILT)
 
-VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.System.Reactive.Core.dll
 NO_SIGN_ASSEMBLY = yes
index 2d4bc4fcc72fdf9b0d244baba046cf7725676327..595774c6183b8beec5351f97153da5eb541d1558 100644 (file)
@@ -19,7 +19,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = more_build_args
 
-VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.System.Reactive.Debugger.dll
 NO_SIGN_ASSEMBLY = yes
index 2d66a6010b8e2cbe30dbd2aeec557405a0009b8c..a798e522401af5be32b7eb8044b34aa9b591f49e 100644 (file)
@@ -19,7 +19,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = more_build_args
 
-VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.System.Reactive.Experimental.dll
 NO_SIGN_ASSEMBLY = yes
index 5962757a17f4468184567e362352a683231befb6..c2dc76ce60d58ca4ebdc8dd90b97085bd32a4461 100644 (file)
@@ -19,7 +19,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = more_build_args
 
-VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.System.Reactive.Interfaces.dll
 NO_SIGN_ASSEMBLY = yes
index 480a20543f2dfa45cb22e628a02b035e57211c39..2cfaa902373ab9d61c858a6c86ca99c4fd7c4d29 100644 (file)
@@ -34,7 +34,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = more_build_args $(RESX_RESOURCES:.resources=.resx) $(PREBUILT)
 
-VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.System.Reactive.Linq.dll
 NO_SIGN_ASSEMBLY = yes
index 9192c21468a1e9a7453c7b56b965a259a4d4e325..5d92774a6b4a61bae9da796f7d540afb2ae9b396 100644 (file)
@@ -39,7 +39,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -r:Mono.Reactive.Tests.dll
 
 EXTRA_DISTFILES = more_build_args $(RESX_RESOURCES:.resources=.resx) $(PREBUILT)
 
-VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
+VALID_PROFILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static net_4_5, $(PROFILE))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.System.Reactive.PlatformServices.dll
 NO_SIGN_ASSEMBLY = yes
index 1e595b7940a23baace07d77963904aa6f2933eae..90f038bccd281dfc74c7595cd4f4e66e3c602fd8 100644 (file)
@@ -381,7 +381,8 @@ namespace System.Runtime.Serialization.Json
 
                internal bool IsDefaultValue (Type type, object value)
                {
-                       return GetDefaultValue (type).Equals (value);
+                       var def = GetDefaultValue (type);
+                       return def == null ? (object) value == null : def.Equals (value);
                }
 
                internal object GetDefaultValue(Type type)
index 4399a0cd2d4182c1743be087c811664f04ebc167..00e39ab6b65f92465496c8792df416735a1cbe6f 100644 (file)
@@ -363,7 +363,8 @@ namespace System.Runtime.Serialization
 
                internal bool IsDefaultValue (Type type, object value)
                {
-                       return GetDefaultValue (type).Equals (value);
+                       var def = GetDefaultValue (type);
+                       return def == null ? (object) value == null : def.Equals (value);
                }
 
                internal object GetDefaultValue(Type type)
index e6a69cb620a21d04ef62cbdb997f649ab3d66c9e..d1251b47c827b594efa14c743db03469cf3f2ee6 100644 (file)
     <Compile Include="..\..\..\external\referencesource\System.Runtime.Serialization\System\Xml\XmlWriteBase64AsyncArgs.cs" />\r
     <Compile Include="..\..\..\external\referencesource\System.Runtime.Serialization\TD.Designer.cs" />\r
     <Compile Include="..\..\build\common\Consts.cs" />\r
-    <Compile Include="..\..\build\common\Locale.cs" />\r
-    <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />\r
     <Compile Include="..\..\build\common\SR.cs" />\r
     <Compile Include="Assembly\AssemblyInfo.cs" />\r
     <Compile Include="ReferenceSources\BitFlagsGenerator.cs" />\r
diff --git a/mcs/class/System.Runtime.Serialization/monotouch_watch_System.Runtime.Serialization.dll.sources b/mcs/class/System.Runtime.Serialization/monotouch_watch_System.Runtime.Serialization.dll.sources
new file mode 100644 (file)
index 0000000..6caafd4
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Runtime.Serialization.dll.sources
diff --git a/mcs/class/System.Runtime.Serialization/xammac_net_4_5_System.Runtime.Serialization.dll.sources b/mcs/class/System.Runtime.Serialization/xammac_net_4_5_System.Runtime.Serialization.dll.sources
new file mode 100644 (file)
index 0000000..17c4f43
--- /dev/null
@@ -0,0 +1 @@
+#include net_4_5_System.Runtime.Serialization.dll.sources
index e8680e37f13cecd9bbe0ed7ab66bd0cd9a1d8396..a278ec14ae9eeba0df8df5f797fd09d7dbb30e91 100644 (file)
@@ -7,13 +7,20 @@ LIB_REFS = System System.Xml System.Runtime.Serialization System.ServiceModel Sy
 LIB_MCS_FLAGS =
 
 ifneq (2.1, $(FRAMEWORK_VERSION))
-LIB_REFS += System.Configuration System.Web.Extensions
+LIB_REFS += System.Configuration 
+
+ifndef NO_SYSTEM_WEB_DEPENDENCY
+LIB_REFS += System.Web.Extensions
+endif
+
 LIB_MCS_FLAGS += -d:NET_3_5 -d:NET_3_0
 endif
 
+ifndef NO_SYSTEM_SERVICEMODEL_ACTIVATION_DEPENDENCY
 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
 LIB_REFS += System.ServiceModel.Activation
 endif
+endif
 
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
index d6e40c6f4c8cf9ba9ac433bd482f12d1c3d4ff59..3049f2901e31c1f6a2f0ecb322ac6ad03aab9507 100644 (file)
@@ -146,7 +146,7 @@ namespace System.ServiceModel.Channels
                        return context.GetInnerProperty<T> ();
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                [MonoTODO]
                void IWsdlExportExtension.ExportContract (WsdlExporter exporter, WsdlContractConversionContext context)
                {
index 4787560a34176a39205efb8d963cf1c456ab62ac..d207385c97ee641f880e4d251c7e95e60a0ebb27 100644 (file)
@@ -84,7 +84,7 @@ namespace System.ServiceModel.Description
                        // clientRuntime.MessageInspectors.Add (something);
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                protected virtual void AddServerErrorHandlers (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
                {
                        endpointDispatcher.ChannelDispatcher.ErrorHandlers.Add (new WebHttpErrorHandler ());
@@ -103,7 +103,7 @@ namespace System.ServiceModel.Description
 
                public virtual void ApplyDispatchBehavior (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
                {
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
                        throw new NotImplementedException ();
 #else
                        endpointDispatcher.DispatchRuntime.OperationSelector = GetOperationSelector (endpoint);
@@ -146,7 +146,7 @@ namespace System.ServiceModel.Description
                        }
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                internal class DispatchPairFormatter : IDispatchMessageFormatter
                {
                        public DispatchPairFormatter (IDispatchMessageFormatter request, IDispatchMessageFormatter reply)
index e6db41560996538dd7d9295e2ca8f24150a9d730..319640fc23476960fd9b9139104a6f01088f26a3 100644 (file)
@@ -1,3 +1,4 @@
+../../test-helpers/NetworkHelpers.cs
 System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs
 System.Runtime.Serialization.Json/JsonReaderTest.cs
 System.Runtime.Serialization.Json/JsonWriterTest.cs
index f7fc5d893aaf859f0a8d8cfd67afcd1a8c9c7fed..fc8a065f5ae483a7794091ba8193f288ee982056 100644 (file)
@@ -52,7 +52,7 @@ namespace System.ServiceModel
 
                public WebHttpBinding (string configurationName)
                {
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                        BindingsSection bindingsSection = ConfigUtil.BindingsSection;
                        WebHttpBindingElement el = (WebHttpBindingElement) bindingsSection ["webHttpBinding"].ConfiguredBindings.FirstOrDefault (c => c.Name == configurationName);
                        if (el != null) {
@@ -88,7 +88,7 @@ namespace System.ServiceModel
                        get { return EnvelopeVersion.None; }
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                [DefaultValue (false)]
                public bool AllowCookies {
                        get { return t.AllowCookies; }
index bb7c1d9f5796533b220b356a212acec4bfb29eaf..bede256b8c947ef6598f1906468e823fff50d072 100644 (file)
@@ -1894,6 +1894,32 @@ namespace MonoTests.System.Runtime.Serialization.Json
 
                public class IntList : List<int>{}
                #endregion
+
+               [Test]
+               public void DefaultValueDeserialization ()
+               {
+                       // value type
+                       var person = new Person { name = "John" };
+                       using (var ms = new MemoryStream()) {
+                               var serializer = new DataContractJsonSerializer (typeof (Person), new DataContractJsonSerializerSettings {
+                                       SerializeReadOnlyTypes = true,
+                                       UseSimpleDictionaryFormat = true
+                                       });
+                               serializer.WriteObject (ms, person);
+                       }
+
+                       // reference type
+                       var person2 = new PersonWithContact {
+                               name = "Jane",
+                               contact = new Contact { url = "localhost", email = "jane@localhost" } };
+                       using (var ms = new MemoryStream ()) {
+                               var serializer = new DataContractJsonSerializer (typeof (PersonWithContact), new DataContractJsonSerializerSettings {
+                                       SerializeReadOnlyTypes = true,
+                                       UseSimpleDictionaryFormat = true
+                                       });
+                               serializer.WriteObject (ms, person2);
+                       }
+               }
        }
        
        public class CharTest
@@ -2685,4 +2711,33 @@ public class Bug13485Type
                }
        }       
 
-#endregion
\ No newline at end of file
+#endregion
+
+#region DefaultValueDeserialization
+    [DataContract]
+    public class Person
+    {
+        [DataMember(EmitDefaultValue = false)]
+        public string name { get; set; }
+    }
+
+    [DataContract]
+    public class PersonWithContact
+    {
+        [DataMember(EmitDefaultValue = false)]
+        public string name { get; set; }
+
+        [DataMember(EmitDefaultValue = false)]
+        public Contact contact { get; set; }
+    }
+
+    [DataContract]
+    public class Contact
+    {
+        [DataMember(EmitDefaultValue = false)]
+        public string url { get; set; }
+
+        [DataMember(EmitDefaultValue = false)]
+        public string email{ get; set; }
+    }
+#endregion
index 2c7509da96cd4aa4b0f5cb860c3a1da5389aeba4..8f0cd0e14e28e5f90462acd83306d44d44497bb8 100644 (file)
@@ -37,6 +37,8 @@ using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;\r
 using System.Net;\r
 \r
+using MonoTests.Helpers;\r
+\r
 namespace MonoTests.System.ServiceModel.Web\r
 {\r
        [TestFixture]\r
@@ -46,7 +48,7 @@ namespace MonoTests.System.ServiceModel.Web
                [Category("NotWorking")]\r
                public void ServiceDebugBehaviorTest () {\r
 \r
-                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/"));\r
+                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://" + NetworkHelpers.LocalEphemeralEndPoint().ToString()));\r
                        ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding");\r
 \r
                        Assert.AreEqual (true, host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageEnabled, "HttpHelpPageEnabled #1");\r
@@ -64,7 +66,7 @@ namespace MonoTests.System.ServiceModel.Web
                [Category ("NotWorking")]\r
                public void WebHttpBehaviorTest1 () {\r
 \r
-                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/"));\r
+                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://" + NetworkHelpers.LocalEphemeralEndPoint().ToString()));\r
                        ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding");\r
                        ServiceEndpoint basicHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new BasicHttpBinding (), "BasicHttpBinding");\r
 \r
@@ -84,7 +86,7 @@ namespace MonoTests.System.ServiceModel.Web
                [Category("NotWorking")]\r
                public void WebHttpBehaviorTest2 () {\r
 \r
-                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/"));\r
+                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://" + NetworkHelpers.LocalEphemeralEndPoint().ToString()));\r
                        ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding");\r
                        MyWebHttpBehavior behavior = new MyWebHttpBehavior ();\r
                        behavior.ApplyDispatchBehaviorBegin += delegate {\r
@@ -104,7 +106,7 @@ namespace MonoTests.System.ServiceModel.Web
                [Test]\r
                public void ServiceBaseUriTest () {\r
 \r
-                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/"));\r
+                       var host = new WebServiceHost (typeof (MyService), new Uri ("http://" + NetworkHelpers.LocalEphemeralEndPoint().ToString()));\r
                        Assert.AreEqual (0, host.Description.Endpoints.Count, "no endpoints yet");\r
                        host.Open ();\r
                        Assert.AreEqual (1, host.Description.Endpoints.Count, "default endpoint after open");\r
@@ -138,12 +140,13 @@ namespace MonoTests.System.ServiceModel.Web
                [Test]\r
                public void Connect ()\r
                {\r
+                       var url = "http://" + NetworkHelpers.LocalEphemeralEndPoint().ToString();\r
                        var host = new WebServiceHost (typeof (DemoService), new Uri\r
-                                                      ("http://localhost:30158/"));\r
+                                                      (url));\r
                        try {\r
                                host.Open ();\r
                                var wc = new WebClient();\r
-                               wc.DownloadString("http://localhost:30158/testData");\r
+                               wc.DownloadString(url + "/testData");\r
                                Console.WriteLine();\r
                        } finally {\r
                                host.Close();\r
diff --git a/mcs/class/System.ServiceModel.Web/monotouch_watch_System.ServiceModel.Web.dll.sources b/mcs/class/System.ServiceModel.Web/monotouch_watch_System.ServiceModel.Web.dll.sources
new file mode 100644 (file)
index 0000000..cbea0fa
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.ServiceModel.Web.dll.sources
diff --git a/mcs/class/System.ServiceModel.Web/xammac_net_4_5_System.ServiceModel.Web.dll.sources b/mcs/class/System.ServiceModel.Web/xammac_net_4_5_System.ServiceModel.Web.dll.sources
new file mode 100644 (file)
index 0000000..f45560f
--- /dev/null
@@ -0,0 +1,39 @@
+#include mobile_System.ServiceModel.Web.dll.sources
+System.ServiceModel.Web/IncomingWebRequestContext.cs
+System.ServiceModel.Web/OutgoingWebResponseContext.cs
+System.ServiceModel.Syndication/Atom10FeedFormatter.cs
+System.ServiceModel.Syndication/Atom10FeedFormatter_1.cs
+System.ServiceModel.Syndication/Atom10ItemFormatter.cs
+System.ServiceModel.Syndication/Atom10ItemFormatter_1.cs
+System.ServiceModel.Syndication/AtomPub10CategoriesDocumentFormatter.cs
+System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatter.cs
+System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatter_1.cs
+System.ServiceModel.Syndication/CategoriesDocument.cs
+System.ServiceModel.Syndication/CategoriesDocumentFormatter.cs
+System.ServiceModel.Syndication/ISyndicationElement.cs
+System.ServiceModel.Syndication/InlineCategoriesDocument.cs
+System.ServiceModel.Syndication/ReferencedCategoriesDocument.cs
+System.ServiceModel.Syndication/ResourceCollectionInfo.cs
+System.ServiceModel.Syndication/Rss20FeedFormatter.cs
+System.ServiceModel.Syndication/Rss20FeedFormatter_1.cs
+System.ServiceModel.Syndication/Rss20ItemFormatter.cs
+System.ServiceModel.Syndication/Rss20ItemFormatter_1.cs
+System.ServiceModel.Syndication/ServiceDocument.cs
+System.ServiceModel.Syndication/ServiceDocumentFormatter.cs
+System.ServiceModel.Syndication/SyndicationCategory.cs
+System.ServiceModel.Syndication/SyndicationContent.cs
+System.ServiceModel.Syndication/SyndicationElementExtension.cs
+System.ServiceModel.Syndication/SyndicationElementExtensionCollection.cs
+System.ServiceModel.Syndication/SyndicationExtensions.cs
+System.ServiceModel.Syndication/SyndicationFeed.cs
+System.ServiceModel.Syndication/SyndicationFeedFormatter.cs
+System.ServiceModel.Syndication/SyndicationItem.cs
+System.ServiceModel.Syndication/SyndicationItemFormatter.cs
+System.ServiceModel.Syndication/SyndicationLink.cs
+System.ServiceModel.Syndication/SyndicationPerson.cs
+System.ServiceModel.Syndication/SyndicationVersions.cs
+System.ServiceModel.Syndication/TextSyndicationContent.cs
+System.ServiceModel.Syndication/TextSyndicationContentKind.cs
+System.ServiceModel.Syndication/UrlSyndicationContent.cs
+System.ServiceModel.Syndication/Workspace.cs
+System.ServiceModel.Syndication/XmlSyndicationContent.cs
\ No newline at end of file
index e125104773c10a514592758678b4cb34ad2f0643..dc094beb4501f1571d2d86b19f543579cc67fd44 100644 (file)
@@ -1,3 +1,4 @@
+#if !XAMMAC_4_5
 using System.Collections.Generic;
 using System.Reflection;
 using System.Runtime.Serialization;
@@ -187,3 +188,4 @@ namespace Mono.Xml.XPath
        class Dummy {}
 }
 #endif
+#endif
\ No newline at end of file
diff --git a/mcs/class/System.ServiceModel/Dummy_XM_4_5.cs b/mcs/class/System.ServiceModel/Dummy_XM_4_5.cs
new file mode 100644 (file)
index 0000000..eaaad97
--- /dev/null
@@ -0,0 +1,69 @@
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.Serialization;
+using System.Runtime.CompilerServices;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Dispatcher;
+using System.Text;
+using System.Xml;
+
+namespace System.ServiceModel
+{
+       public class InstanceContext
+       {
+               public InstanceContext (object dummy) {}
+       }
+}
+
+namespace System.ServiceModel.PeerResolvers
+{
+       class Dummy {}
+}
+
+namespace System.ServiceModel.Configuration
+{
+       class Dummy {}
+}
+namespace System.ServiceModel.Channels.Http
+{
+}
+namespace System.ServiceModel.Channels.NetTcp
+{
+}
+
+namespace System.ServiceModel.Dispatcher
+{
+       public sealed class EndpointDispatcher
+       {
+               internal EndpointDispatcher ()
+               {
+               }
+       }
+}
+
+namespace System.ServiceModel.Channels
+{
+       public static class UrlUtility {
+               public static string UrlEncode (string s, Encoding e)
+               {
+                       return System.Runtime.UrlUtility.UrlEncode (s, e);
+               }
+
+               public static string UrlDecode (string s, Encoding e)
+               {
+                       return System.Runtime.UrlUtility.UrlDecode (s, e);
+               }
+       }
+}
+
+namespace System.ServiceModel.Description
+{
+       public interface IPolicyExportExtension {}
+       public interface IPolicyImportExtension {}
+       public interface IWsdlExportExtension {}
+       public interface IWsdlImportExtension {}
+}
+namespace System.ServiceModel.Channels
+{
+       public interface ITransportTokenAssertionProvider {}
+}
\ No newline at end of file
index 5436992c25f9cc9a8c15725f6aea2ba4eaf88fe1..03dbd5fd9e59d7fd8b5b225e7ed63040f22fc059 100644 (file)
@@ -15,22 +15,36 @@ LIB_MCS_FLAGS = \
                /d:TRACE \
                $(RESOURCE_FILES:%=/resource:%)
 
+ifdef XAMMAC_4_5
+LIB_REFS += System.ServiceModel.Internals
+endif
+
 ifneq (2.1, $(FRAMEWORK_VERSION))
-LIB_REFS += System.Configuration System.Data System.Security System.IdentityModel System.IdentityModel.Selectors System.Transactions System.Messaging System.Web System.Web.Services Mono.Security
+LIB_REFS += System.Configuration System.Data System.Security System.IdentityModel System.IdentityModel.Selectors System.Transactions System.Messaging System.Web.Services Mono.Security
 LIB_MCS_FLAGS += /d:NET_3_0
+
+ifndef NO_SYSTEM_WEB_DEPENDENCY
+LIB_REFS += System.Web
 endif
 
 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
-LIB_REFS += System.Web.ApplicationServices
+
+ifndef NO_SYSTEM_SERVICEMODEL_ACTIVATION_DEPENDENCY
 activation = $(the_libdir_base)System.ServiceModel.Activation.dll
 servicemodel_deps = $(activation)
 
-LIB_REFS += System.Web.ApplicationServices
-
 ifneq (plainservice/,$(intermediate))
 LIB_MCS_FLAGS += -define:HAS_ACTIVATION -r:System.ServiceModel.Activation.dll
+endif 
+endif # NO_SYSTEM_SERVICEMODEL_ACTIVATION_DEPENDENCY
+
+ifndef NO_SYSTEM_WEB_APPSERVICES_DEPENDENCY
+LIB_REFS += System.Web.ApplicationServices
 endif
-endif
+
+endif # (4, $(FRAMEWORK_VERSION_MAJOR))
+
+endif # (2.1, $(FRAMEWORK_VERSION))
 
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
index 64f235d2ab7feeca7197d5e63959b94c7738d4ac..32ab72a9cb95ff67528d99e30d3e5f63914f4492 100644 (file)
@@ -131,7 +131,7 @@ namespace System.ServiceModel.Channels
                        return new BinaryMessageEncoderFactory (this);
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                [MonoTODO]
                void IWsdlExportExtension.ExportContract (WsdlExporter exporter,
                        WsdlContractConversionContext context)
index d77e34153d77ea616844482256f0632fa82cecf9..23c8081ebebe84c480ffac4f03540850c6ae5a3f 100644 (file)
@@ -137,7 +137,7 @@ namespace System.ServiceModel.Channels
 
                        OperationContext ctx = OperationContext.Current;
                        // FIXME: support more fault code depending on the exception type.
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                        // FIXME: set correct fault reason.
                        if (ctx != null && ctx.EndpointDispatcher.ChannelDispatcher.IncludeExceptionDetailInFaults) {
                                ExceptionDetail detail = new ExceptionDetail (error);
index eff17df9bcad017b48ec3d6039994aa8d2da1ba6..6b70a26e3b8ec5eb229631210f77928330faaaf1 100644 (file)
@@ -185,7 +185,7 @@ namespace System.ServiceModel.Channels
                        return typeof (TChannel) == typeof (IRequestChannel);
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                public override bool CanBuildChannelListener<TChannel> (
                        BindingContext context)
                {
@@ -201,7 +201,7 @@ namespace System.ServiceModel.Channels
                        return new HttpChannelFactory<TChannel> (this, context);
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                internal static object ListenerBuildLock = new object ();
 
                public override IChannelListener<TChannel> BuildChannelListener<TChannel> (
@@ -242,7 +242,7 @@ namespace System.ServiceModel.Channels
                        set { throw new NotImplementedException (); }
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                void IPolicyExportExtension.ExportPolicy (
                        MetadataExporter exporter,
                        PolicyConversionContext context)
index f12978747418340d305b8c242e3300769e7e183e..d95dd5f35ef09e0c2122eef6b84f20450ed617d3 100644 (file)
@@ -68,7 +68,7 @@ namespace System.ServiceModel.Channels
                        return base.BuildChannelFactory <TChannel> (context);
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                [MonoTODO]
                public override IChannelListener<TChannel>
                        BuildChannelListener<TChannel> (
@@ -83,7 +83,7 @@ namespace System.ServiceModel.Channels
                        return new HttpsTransportBindingElement (this);
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                public XmlElement GetTransportTokenAssertion ()
                {
                        var doc = new XmlDocument ();
index 4e9808daaef3e524ede9f1a5926069301b172347..49a8478f6f98af7b61a9254940ec6df38bb958b3 100644 (file)
@@ -59,7 +59,7 @@ namespace System.ServiceModel.Channels
                        return ctx.GetInnerProperty<T> ();
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                [MonoTODO]
                protected virtual void OnImportPolicy (XmlElement assertion,
                        MessageVersion messageVersion,
index 440aa83288c3d69579d8df1b0ce2963f83b1afc1..422e6e92c1f74619a899c1979d834bcd91a09733 100644 (file)
@@ -99,7 +99,7 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
                
-#if !MOBILE
+#if !MOBILE && !XAMMAC_4_5
                void IPolicyExportExtension.ExportPolicy (MetadataExporter exporter, PolicyConversionContext context)
                {
                        throw new NotImplementedException ();
index 25de2b9205ed80f0c1ef031dee7f73aa71957ac3..45aee53ccec76f0df00f47a05e9b9d1e2de306c5 100644 (file)
@@ -30,7 +30,7 @@ using System.Collections.ObjectModel;
 using System.ServiceModel.Description;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Security;
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
 using System.ServiceModel.Channels.Security;
 using System.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
@@ -44,7 +44,7 @@ namespace System.ServiceModel.Channels
        {
                internal SecurityBindingElement ()
                {
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                        DefaultAlgorithmSuite = SecurityAlgorithmSuite.Default;
                        MessageSecurityVersion = MessageSecurityVersion.Default;
                        KeyEntropyMode = SecurityKeyEntropyMode.CombinedEntropy;
@@ -60,7 +60,7 @@ namespace System.ServiceModel.Channels
 
                internal SecurityBindingElement (SecurityBindingElement other)
                {
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                        alg_suite = other.alg_suite;
                        key_entropy_mode = other.key_entropy_mode;
                        security_header_layout = other.security_header_layout;
@@ -79,7 +79,7 @@ namespace System.ServiceModel.Channels
                        LocalClientSettings = other.LocalClientSettings.Clone ();
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                SecurityAlgorithmSuite alg_suite;
                SecurityKeyEntropyMode key_entropy_mode;
                SecurityHeaderLayout security_header_layout;
@@ -93,7 +93,7 @@ namespace System.ServiceModel.Channels
 
                public LocalClientSecuritySettings LocalClientSettings { get; private set; }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                public SecurityAlgorithmSuite DefaultAlgorithmSuite {
                        get { return alg_suite; }
                        set { alg_suite = value; }
@@ -138,7 +138,7 @@ namespace System.ServiceModel.Channels
                [MonoTODO ("Implement for TransportSecurityBindingElement")]
                public override bool CanBuildChannelFactory<TChannel> (BindingContext context)
                {
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
                        // not sure this should be like this, but there isn't Symmetric/Asymmetric elements in 2.1 anyways.
                        return context.CanBuildInnerChannelFactory<TChannel> ();
 #else
@@ -183,7 +183,7 @@ namespace System.ServiceModel.Channels
                protected abstract IChannelFactory<TChannel>
                        BuildChannelFactoryCore<TChannel> (BindingContext context);
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                [MonoTODO ("Implement for TransportSecurityBindingElement")]
                public override bool CanBuildChannelListener<TChannel> (BindingContext context)
                {
@@ -270,7 +270,7 @@ namespace System.ServiceModel.Channels
 #endif
 
                #region Factory methods
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                public static SymmetricSecurityBindingElement 
                        CreateAnonymousForCertificateBindingElement ()
                {
@@ -559,14 +559,14 @@ namespace System.ServiceModel.Channels
                        CreateUserNameOverTransportBindingElement ()
                {
                        var be = new TransportSecurityBindingElement ();
-#if !NET_2_1 // FIXME: there should be whatever else to do for 2.1 instead.
+#if !NET_2_1 && !XAMMAC_4_5 // FIXME: there should be whatever else to do for 2.1 instead.
                        be.EndpointSupportingTokenParameters.SignedEncrypted.Add (new UserNameSecurityTokenParameters ());
 #endif
                        return be;
                }
                #endregion
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                // It seems almost internal, hardcoded like this (I tried
                // custom parameters that sets IssuedTokenSecurityTokenParameters
                // like below ones, but that didn't trigger this method).
index 91caa49cc3743cadbf5bf1efd6ca1db13ccd04c6..2330e8134c39c15a71d720b170f436b6c700f5de 100644 (file)
@@ -143,7 +143,7 @@ namespace System.ServiceModel.Channels
                        return new TextMessageEncoderFactory (this);
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                [MonoTODO]
                protected override void OnImportPolicy (XmlElement assertion,
                        MessageVersion messageVersion,
index 9f0a92ffc93deb0483ea7e3ec005e1d4b6be3878..4f1a5fde8f20298e778c7af08a98c5138b246aee 100644 (file)
@@ -92,7 +92,7 @@ namespace System.ServiceModel.Channels
                        return context.GetInnerProperty<T> ();
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                internal static XmlElement CreateTransportBinding (XmlElement transportToken)
                {
                        var doc = new XmlDocument ();
index a366b168045725ba6f00809dba1e679e27b015b2..e29e6f0c554491303a5028ff7c5c8c982a848b0d 100644 (file)
@@ -65,7 +65,7 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                [MonoTODO]
                protected override IChannelListener<TChannel>
                        BuildChannelListenerCore<TChannel> (
index 623743d0c7cc39e62e8a32ccab0d4e723ace2414..43918f6f6014793d55cd50d551f52cddcef9a53a 100644 (file)
@@ -35,7 +35,9 @@ using System.ServiceModel.Channels;
 using System.ServiceModel.Configuration;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+#if !XAMMAC_4_5
 using System.Web.Configuration;
+#endif
 
 using SysConfig = System.Configuration.Configuration;
 
@@ -43,6 +45,7 @@ namespace System.ServiceModel.Configuration
 {
        internal static class ConfigUtil
        {
+#if !XAMMAC_4_5
                static object GetSection (string name)
                {
                        if (ServiceHostingEnvironment.InAspNet)
@@ -242,6 +245,7 @@ namespace System.ServiceModel.Configuration
                {
                        return new EndpointAddress (el.Address, el.Identity != null ? el.Identity.CreateInstance () : null, el.Headers.Headers);
                }
+#endif
 
                public static EndpointIdentity CreateInstance (this IdentityElement el)
                {
@@ -299,6 +303,7 @@ namespace System.ServiceModel.Configuration
                        return CreateCertificateFrom (el.StoreLocation, el.StoreName, el.X509FindType, el.FindValue);
                }
 
+#if !XAMMAC_4_5
                public static BindingCollectionElement FindCollectionElement (Binding binding, SysConfig config)
                {
                        var section = (BindingsSection) config.GetSection ("system.serviceModel/bindings");
@@ -309,6 +314,7 @@ namespace System.ServiceModel.Configuration
                        
                        return null;
                }
+#endif
        }
 
        enum NamedConfigCategory
index 04dc37caba4d3d757f5417a02bb782f8b89387be..951adecf874c7587c6d708d87230de898df4361c 100644 (file)
@@ -40,7 +40,7 @@ using System.ServiceModel.Security.Tokens;
 namespace System.ServiceModel.Description
 {
        public class ClientCredentials
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
                : IEndpointBehavior
 #else
                : SecurityCredentialsManager, IEndpointBehavior
@@ -128,7 +128,7 @@ namespace System.ServiceModel.Description
                        return new ClientCredentials (this);
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                public override SecurityTokenManager CreateSecurityTokenManager ()
                {
                        return new ClientCredentialsSecurityTokenManager (this);
index 6ff636543262829f4dcc662e507f22d3ea97ee42..dc25161d460e7f1d1af46ac6637f046f1f76f09b 100644 (file)
@@ -112,7 +112,7 @@ namespace System.ServiceModel.Description
                {
                }
                
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                //IWsdlExportExtension
 
                void IWsdlExportExtension.ExportContract (WsdlExporter exporter,
index 70e427a26c26d9d775cf5eca7ae20509ca1c1dcc..5e3924b26ee1b5e69e5e1a3bed6252213ec4feb3 100644 (file)
@@ -100,7 +100,7 @@ namespace System.ServiceModel.Description
                        set { type = value; }
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                internal XsdDataContractImporter DataContractImporter { get; set; }
                internal XmlSerializerMessageContractImporterInternal XmlSerializationImporter { get; set; }
                internal System.CodeDom.CodeTypeReference CodeTypeReference { get; set; }
index 4c41c6b50ca42bfb09cbbb6868396a736c278905..1895c10e75968bf968d91bae86ea149212f5b744 100644 (file)
@@ -104,7 +104,7 @@ namespace System.ServiceModel.Description
                {
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                void IWsdlExportExtension.ExportContract (
                        WsdlExporter exporter,
                        WsdlContractConversionContext context)
index 190bc0ea247c10658c4a78664a4ff415909d3835..db050b9067f727c474ed694a46e39a81ba62d7cf 100644 (file)
@@ -36,7 +36,7 @@ namespace System.ServiceModel.Diagnostics
        {
                public MessageLoggingSettings ()
                {
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                        var e = ConfigUtil.DiagnosticSection.MessageLogging;
                        LogEntireMessage = e.LogEntireMessage;
                        LogKnownPii = e.LogKnownPii;
index f226260839e20812c03f73f56b295b389315a1fc..e9fb67f98e9e2c13265ba3fd6e333911b8fc016c 100644 (file)
@@ -214,7 +214,7 @@ namespace System.ServiceModel.Dispatcher
 
                void ThrowIfOpened ()
                {
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                        // FIXME: get callback client runtime status when ChannelDispatcher is not available.
                        var state = Parent.ChannelDispatcher != null ? Parent.ChannelDispatcher.State : CommunicationState.Created; // Parent.CallbackClientRuntime.ChannelFactory.State;
                        switch (state) {
index f2a48bf51788ee7492a833d26c299f6c7cb08d58..f6660e1c19c3826ffc1892a3898ffe97152e434d 100644 (file)
@@ -31,8 +31,10 @@ using System.Collections.ObjectModel;
 using System.Reflection;
 #if !NET_2_1
 using System.IdentityModel.Policy;
+#if !XAMMAC_4_5
 using System.Web.Security;
 #endif
+#endif
 using System.Text;
 using System.Threading;
 using System.ServiceModel;
@@ -43,7 +45,7 @@ namespace System.ServiceModel.Dispatcher
 {
        public sealed class DispatchRuntime
        {
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
                internal DispatchRuntime (EndpointDispatcher dispatcher, ClientRuntime callbackClientRuntime)
                {
                        UnhandledDispatchOperation = new DispatchOperation (
index c671f1e79752197c83bd6c8151ca27909bd8e7f8..ef9715fb4b4fb00e0cc5ffb30c1fac359060ec25 100644 (file)
@@ -50,7 +50,7 @@ namespace System.ServiceModel
                {
                }
                
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                public BasicHttpBinding (string configurationName)
                        : this ()
                {
@@ -110,7 +110,7 @@ namespace System.ServiceModel
                        SecurityBindingElement element;
                        switch (Security.Mode) {
                        case BasicHttpSecurityMode.Message:
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
                                throw new NotImplementedException ();
 #else
                                if (Security.Message.ClientCredentialType != BasicHttpMessageCredentialType.Certificate)
@@ -121,7 +121,7 @@ namespace System.ServiceModel
 #endif
 
                        case BasicHttpSecurityMode.TransportWithMessageCredential:
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
                                throw new NotImplementedException ();
 #else
                                if (Security.Message.ClientCredentialType != BasicHttpMessageCredentialType.Certificate)
@@ -135,7 +135,7 @@ namespace System.ServiceModel
                                return null;
                        }
                        
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                        element.SetKeyDerivation (false);
                        element.SecurityHeaderLayout = SecurityHeaderLayout.Lax;
 #endif
@@ -150,7 +150,7 @@ namespace System.ServiceModel
                                ReaderQuotas.CopyTo (tm.ReaderQuotas);
                                return tm;
                        } else {
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
                                throw new NotImplementedException ();
 #else
                                return new MtomMessageEncodingBindingElement (
index 1c65906f6bee524b0b364816f86f1b5dac6efb71..e6a96dac52a1aa8de552250e70c59d34746a3f66 100644 (file)
@@ -50,7 +50,7 @@ namespace System.ServiceModel
                {
                }
                
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                public BasicHttpsBinding (string configurationName)
                        : this ()
                {
@@ -101,7 +101,8 @@ namespace System.ServiceModel
                        SecurityBindingElement element;
                        switch (Security.Mode) {
                        case BasicHttpsSecurityMode.TransportWithMessageCredential:
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
+
                                throw new NotImplementedException ();
 #else
                                if (Security.Message.ClientCredentialType != BasicHttpMessageCredentialType.Certificate)
@@ -115,7 +116,7 @@ namespace System.ServiceModel
                                return null;
                        }
                        
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                        element.SetKeyDerivation (false);
                        element.SecurityHeaderLayout = SecurityHeaderLayout.Lax;
 #endif
@@ -130,7 +131,7 @@ namespace System.ServiceModel
                                ReaderQuotas.CopyTo (tm.ReaderQuotas);
                                return tm;
                        } else {
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
                                throw new NotImplementedException ();
 #else
                                return new MtomMessageEncodingBindingElement (
index 6835651516ed869087b30804db791e77cef69531..e5ef83357f35ebc8401a4bed40e6d6fb43a5a2e6 100644 (file)
@@ -90,7 +90,7 @@ namespace System.ServiceModel
                        if (endpointConfig == null)
                                return;
 
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
                        try {
                                // It should automatically use XmlXapResolver
                                var cfg = new SilverlightClientConfigLoader ().Load (XmlReader.Create ("ServiceReferences.ClientConfig"));
@@ -160,7 +160,7 @@ namespace System.ServiceModel
 #endif
                }
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                private void ApplyBehavior (string behaviorConfig)
                {
                        BehaviorsSection behaviorsSection = ConfigUtil.BehaviorsSection;
index 0d37c4cf22c9b8aa5437a241c3c5907728636f05..097e8cbfa4e1097b207794fafa5e9921ee43479c 100644 (file)
@@ -45,7 +45,7 @@ namespace System.ServiceModel
                }
 
                Message incoming_message;
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                EndpointDispatcher dispatcher;
 #endif
                IContextChannel channel;
@@ -83,7 +83,7 @@ namespace System.ServiceModel
                }
 
 
-#if !NET_2_1
+#if !NET_2_1 && !XAMMAC_4_5
                public EndpointDispatcher EndpointDispatcher {
                        get { return dispatcher; }
                        set { dispatcher = value; }
index 16f0325837a01bf0172d917d2a247f6d8eb24f67..75d412d50c25720ad3b65b08644607ae5d15cc75 100644 (file)
@@ -25,7 +25,8 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if NET_2_1
+#if NET_2_1 || XAMMAC_4_5
+
 using System;
 using System.Collections.Generic;
 using System.ServiceModel.Channels;
index c71ac9b0aa5ce2f0f9b592aacb065ed7ba025c12..deb325709e5eb9cb1235044bf952f85994b148c6 100644 (file)
@@ -1,4 +1,5 @@
 NUnitMoonHelper.cs
+../../test-helpers/NetworkHelpers.cs
 FeatureBased/Features.Client/AsyncCallTesterProxy.cs
 FeatureBased/Features.Client/AsyncPatternServer.cs
 FeatureBased/Features.Client/DataContractTesterProxy.cs
@@ -210,3 +211,5 @@ MetadataTests/MetadataSamples.cs
 MetadataTests/TestContext.cs
 MetadataTests/TestLabel.cs
 MetadataTests/ExportTests.cs
+../../test-helpers/NetworkHelpers.cs
+
index e9f9cee52c2827291ab87ad445e6e7c851d52b42..370a5bbd0dc7e928956a78c9b8349354c81a9a36 100644 (file)
@@ -43,6 +43,8 @@ using System.Threading;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Channels
 {
        [TestFixture]
@@ -131,7 +133,7 @@ namespace MonoTests.System.ServiceModel.Channels
                        CustomBinding binding = new CustomBinding (sbe,
                                new HttpTransportBindingElement ());
                        IChannelListener<IReplyChannel> l =
-                               binding.BuildChannelListener<IReplyChannel> (new Uri ("http://localhost:37564"), new BindingParameterCollection ());
+                               binding.BuildChannelListener<IReplyChannel> (new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()), new BindingParameterCollection ());
                        try {
                                l.Open ();
                        } finally {
@@ -171,11 +173,11 @@ namespace MonoTests.System.ServiceModel.Channels
                        b_res.ReceiveTimeout = b_res.SendTimeout = TimeSpan.FromSeconds (10);
 
                        EndpointAddress remaddr = new EndpointAddress (
-                               new Uri ("http://localhost:37564"),
+                               new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()),
                                new X509CertificateEndpointIdentity (cert2));
                        CalcProxy proxy = null;
                        ServiceHost host = new ServiceHost (typeof (CalcService));
-                       host.AddServiceEndpoint (typeof (ICalc), b_res, "http://localhost:37564");
+                       host.AddServiceEndpoint (typeof (ICalc), b_res, "http://localhost:" + NetworkHelpers.FindFreePort ());
 
                        ServiceCredentials cred = new ServiceCredentials ();
                        cred.ServiceCertificate.Certificate = cert;
@@ -240,7 +242,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                new HttpTransportBindingElement ();
                        CustomBinding binding = new CustomBinding (sbe, hbe);
                        host.AddServiceEndpoint (typeof (IFoo),
-                               binding, new Uri ("http://localhost:37564"));
+                               binding, new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                        ServiceCredentials cred = new ServiceCredentials ();
                        cred.ServiceCertificate.Certificate =
                                new X509Certificate2 ("Test/Resources/test.pfx", "mono");
index 9c51d150f40c75d072b1de3726e1516e63ec49c9..f1511d5245a6891d51c4d7305f4001e9d390198d 100644 (file)
@@ -36,6 +36,8 @@ using System.Text;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 using Element = System.ServiceModel.Channels.BinaryMessageEncodingBindingElement;
 
 namespace MonoTests.System.ServiceModel.Channels
@@ -191,14 +193,15 @@ namespace MonoTests.System.ServiceModel.Channels
                        var bindingsvc = new CustomBinding (new BindingElement [] {
                                new BinaryMessageEncodingBindingElement (),
                                new TcpTransportBindingElement () });
-                       host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost:37564/");
+                       int port = NetworkHelpers.FindFreePort ();
+                       host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost:" + port + "/");
                        host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().IncludeExceptionDetailInFaults = true;
                        host.Open (TimeSpan.FromSeconds (5));
                        try {
                                for (int i = 0; i < 2; i++) {
                                        var bindingcli = new NetTcpBinding ();
                                        bindingcli.Security.Mode = SecurityMode.None;
-                                       var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost:37564/")).CreateChannel ();
+                                       var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost:" + port + "/")).CreateChannel ();
                                        Assert.AreEqual ("test for echo", cli.Echo ("TEST FOR ECHO"), "#1");
                                        var sid = cli.SessionId;
                                        Assert.AreEqual (3000, cli.Add (1000, 2000), "#2");
@@ -207,7 +210,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                }
                        } finally {
                                host.Close (TimeSpan.FromSeconds (5));
-                               var t = new TcpListener (37564);
+                               var t = new TcpListener (port);
                                t.Start ();
                                t.Stop ();
                        }
@@ -220,7 +223,8 @@ namespace MonoTests.System.ServiceModel.Channels
                        var bindingsvc = new CustomBinding (new BindingElement [] {
                                new BinaryMessageEncodingBindingElement (),
                                new HttpTransportBindingElement () });
-                       host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "http://localhost:37564/");
+                       int port = NetworkHelpers.FindFreePort ();
+                       host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "http://localhost:" + port + "/");
                        host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().IncludeExceptionDetailInFaults = true;
                        host.Open (TimeSpan.FromSeconds (5));
                        try {
@@ -228,7 +232,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                        var bindingcli = new CustomBinding (new BindingElement [] {
                                                new BinaryMessageEncodingBindingElement (),
                                                new HttpTransportBindingElement () });
-                                       var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("http://localhost:37564/")).CreateChannel ();
+                                       var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("http://localhost:" + port + "/")).CreateChannel ();
                                        Assert.AreEqual ("test for echo", cli.Echo ("TEST FOR ECHO"), "#1");
                                        var sid = cli.SessionId;
                                        Assert.AreEqual (3000, cli.Add (1000, 2000), "#2");
@@ -237,7 +241,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                }
                        } finally {
                                host.Close (TimeSpan.FromSeconds (5));
-                               var t = new TcpListener (37564);
+                               var t = new TcpListener (port);
                                t.Start ();
                                t.Stop ();
                        }
index ab1f8dd87501c479098ec7f41432263a6bf81a4c..756a71fad445d5858f1a077e677084221e1eba33 100644 (file)
@@ -40,6 +40,8 @@ using System.Text;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Channels
 {
        [TestFixture]
@@ -211,7 +213,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                new HandlerTransportBindingElement (sender));
 
                        EndpointAddress address = new EndpointAddress (
-                               new Uri ("http://localhost:37564"),
+                               new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()),
                                new X509CertificateEndpointIdentity (new X509Certificate2 ("Test/Resources/test.pfx", "mono")));
 
                        ChannelFactory<IRequestChannel> cf =
@@ -259,7 +261,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                new HandlerTransportBindingElement (sender));
 
                        EndpointAddress address = new EndpointAddress (
-                               new Uri ("http://localhost:37564"),
+                               new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()),
                                new X509CertificateEndpointIdentity (new X509Certificate2 ("Test/Resources/test.pfx", "mono")));
 
                        ChannelProtectionRequirements reqs =
@@ -322,7 +324,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                new HttpTransportBindingElement ());
                        BindingContext ctx = new BindingContext (
                                cb, new BindingParameterCollection (),
-                               new Uri ("http://localhost:37564"), String.Empty, ListenUriMode.Unique);
+                               new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()), String.Empty, ListenUriMode.Unique);
                        new TextMessageEncodingBindingElement ().BuildChannelListener<IReplyChannel> (ctx);
                }
 
@@ -336,7 +338,7 @@ namespace MonoTests.System.ServiceModel.Channels
                        ServiceHost host = new ServiceHost (typeof (FooService));
                        host.AddServiceEndpoint (typeof (IFooService),
                                new CustomBinding (new MyBindingElement (false), new HttpTransportBindingElement ()),
-                               "http://localhost:37564");
+                               "http://localhost:" + NetworkHelpers.FindFreePort ());
                        host.Open ();
                }
 
@@ -349,7 +351,7 @@ namespace MonoTests.System.ServiceModel.Channels
                        ServiceHost host = new ServiceHost (typeof (FooService));
                        host.AddServiceEndpoint (typeof (IFooService),
                                new CustomBinding (new MyBindingElement (true), new HttpTransportBindingElement ()),
-                               "http://localhost:37564");
+                               "http://localhost:" + NetworkHelpers.FindFreePort ());
                        host.Open ();
                        host.Close ();
                }
@@ -363,7 +365,7 @@ namespace MonoTests.System.ServiceModel.Channels
                        ServiceHost host = new ServiceHost (typeof (FooService));
                        host.AddServiceEndpoint (typeof (IFooService),
                                new CustomBinding (new MyBindingElement (true), new HttpTransportBindingElement ()),
-                               "http://localhost:37564", new Uri ("foobar", UriKind.Relative));
+                               "http://localhost:" + NetworkHelpers.FindFreePort (), new Uri ("foobar", UriKind.Relative));
                }
 
                [Test]
@@ -372,10 +374,10 @@ namespace MonoTests.System.ServiceModel.Channels
                {
                        // MyBindingElement overrides GetProperty<T>() to call GetInnerProperty<T>() (default implementation).
                        // HttpTransportBindingElement should return Soap11.
-                       ServiceHost host = new ServiceHost (typeof (FooService), new Uri ("http://localhost:37564"));
+                       ServiceHost host = new ServiceHost (typeof (FooService), new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                        host.AddServiceEndpoint (typeof (IFooService),
                                new CustomBinding (new MyBindingElement (true), new HttpTransportBindingElement ()),
-                               "http://localhost:37564", new Uri ("foobar", UriKind.Relative));
+                               "http://localhost:" + NetworkHelpers.FindFreePort (), new Uri ("foobar", UriKind.Relative));
                        host.Open ();
                        host.Close ();
                }
index 705d4ed2af1562a41fd76fbc077b41b928f217dc..40401dec37e39fefcc42b7f943618e5299eb037f 100644 (file)
@@ -38,6 +38,8 @@ using System.Threading;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 #if NET_4_0
 using System.Security.Authentication.ExtendedProtection;
 #endif
@@ -203,7 +205,7 @@ namespace MonoTests.System.ServiceModel.Channels
                        var cf = new HttpTransportBindingElement ().BuildChannelFactory<IRequestChannel> (ctx);
                        Assert.IsTrue (cf is ChannelFactoryBase<IRequestChannel>, "#1");
                        cf.Open ();
-                       cf.CreateChannel (new EndpointAddress ("http://localhost:8080"), null);
+                       cf.CreateChannel (new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()), null);
                }
 
                [Test]
@@ -228,7 +230,7 @@ namespace MonoTests.System.ServiceModel.Channels
                public void EndpointAddressAndViaMustMatchOnAddressingNone ()
                {
                        try {
-                               var ch = ChannelFactory<IFoo>.CreateChannel (new BasicHttpBinding (), new EndpointAddress ("http://localhost:37564/"), new Uri ("http://localhost:8080/HogeService"));
+                               var ch = ChannelFactory<IFoo>.CreateChannel (new BasicHttpBinding (), new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort () + "/"), new Uri ("http://localhost:" + NetworkHelpers.FindFreePort () + "/HogeService"));
                                ((ICommunicationObject) ch).Close ();
                        } catch (TargetInvocationException) {
                                // we throw this exception so far. Since it is
@@ -338,7 +340,7 @@ namespace MonoTests.System.ServiceModel.Channels
                        BindingContext lbc = new BindingContext (
                                new CustomBinding (),
                                new BindingParameterCollection (),
-                               new Uri ("http://localhost:37564"),
+                               new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()),
                                String.Empty, ListenUriMode.Explicit);
                        listener = lel.BuildChannelListener<IReplyChannel> (lbc);
 
@@ -370,7 +372,7 @@ namespace MonoTests.System.ServiceModel.Channels
                        factory.Open ();
 
                        IRequestChannel request = factory.CreateChannel (
-                               new EndpointAddress ("http://localhost:37564"));
+                               new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()));
 
                        request.Open ();
 
index 9a476515e8e28030331daceae8c34ad3dc935766..2d4e9bfda2210cf019a5c24521bf76dd69b932c6 100644 (file)
@@ -41,6 +41,8 @@ using System.ServiceModel.Security.Tokens;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Channels
 {
        [TestFixture]
@@ -428,7 +430,7 @@ namespace MonoTests.System.ServiceModel.Channels
                        ClientCredentials cred = new ClientCredentials ();
                        cred.ClientCertificate.Certificate =
                                new X509Certificate2 ("Test/Resources/test.pfx", "mono");
-                       IChannelFactory<IReplyChannel> ch = b.BuildChannelFactory<IReplyChannel> (new Uri ("http://localhost:37564"), cred);
+                       IChannelFactory<IReplyChannel> ch = b.BuildChannelFactory<IReplyChannel> (new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()), cred);
                        try {
                                ch.Open ();
                        } finally {
@@ -456,7 +458,7 @@ namespace MonoTests.System.ServiceModel.Channels
                        ServiceCredentials cred = new ServiceCredentials ();
                        cred.ServiceCertificate.Certificate =
                                new X509Certificate2 ("Test/Resources/test.pfx", "mono");
-                       IChannelListener<IReplyChannel> ch = b.BuildChannelListener<IReplyChannel> (new Uri ("http://localhost:37564"), cred);
+                       IChannelListener<IReplyChannel> ch = b.BuildChannelListener<IReplyChannel> (new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()), cred);
                        try {
                                ch.Open ();
                        } finally {
@@ -478,7 +480,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                new UserNameSecurityTokenParameters ());
                        Binding b = new CustomBinding (be, new HttpTransportBindingElement ());
                        X509Certificate2 cert = new X509Certificate2 ("Test/Resources/test.pfx", "mono");
-                       EndpointAddress ea = new EndpointAddress (new Uri ("http://localhost:37564"), new X509CertificateEndpointIdentity (cert));
+                       EndpointAddress ea = new EndpointAddress (new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()), new X509CertificateEndpointIdentity (cert));
                        CalcProxy client = new CalcProxy (b, ea);
                        client.ClientCredentials.UserName.UserName = "rupert";
                        client.Sum (1, 2);
index c68cb851126517a6ef40cf846a3a5d394339fe94..d90197b253470f7cb69792bf2acbcca6e2c45c10 100644 (file)
@@ -37,6 +37,8 @@ using System.Threading;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Channels
 {
        [TestFixture]
@@ -173,8 +175,9 @@ namespace MonoTests.System.ServiceModel.Channels
                                new TcpTransportBindingElement () });
                        bindingS.ReceiveTimeout = TimeSpan.FromSeconds (5);
                        bindingS.OpenTimeout = TimeSpan.FromSeconds (20);
+                       int port = NetworkHelpers.FindFreePort ();
                        host.AddServiceEndpoint (typeof (IFoo),
-                               bindingS, new Uri ("net.tcp://localhost:37564"));
+                               bindingS, new Uri ("net.tcp://localhost:" + port));
                        host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().IncludeExceptionDetailInFaults = true;
                        host.Open ();
 
@@ -182,7 +185,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                for (int i = 0; i < 2; i++) {
                                        var bindingC = new NetTcpBinding ();
                                        bindingC.Security.Mode = SecurityMode.None;
-                                       IFooChannel proxy = new ChannelFactory<IFooChannel> (bindingC, new EndpointAddress ("net.tcp://localhost:37564/")).CreateChannel ();
+                                       IFooChannel proxy = new ChannelFactory<IFooChannel> (bindingC, new EndpointAddress ("net.tcp://localhost:" + port + "/")).CreateChannel ();
                                        proxy.Open ();
                                        try {
                                                Assert.AreEqual ("TEST FOR ECHO", proxy.Echo ("TEST FOR ECHO"), "#1");
@@ -212,8 +215,9 @@ namespace MonoTests.System.ServiceModel.Channels
                        bindingS.Security.Mode = SecurityMode.None;
                        bindingS.ReceiveTimeout = TimeSpan.FromSeconds (5);
                        bindingS.OpenTimeout = TimeSpan.FromSeconds (20);
+                       int port = NetworkHelpers.FindFreePort ();
                        host.AddServiceEndpoint (typeof (IFoo),
-                               bindingS, new Uri ("net.tcp://localhost:37564"));
+                               bindingS, new Uri ("net.tcp://localhost:" + port));
                        host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().IncludeExceptionDetailInFaults = true;
                        host.Open ();
 
@@ -222,7 +226,7 @@ namespace MonoTests.System.ServiceModel.Channels
                                        var bindingC = new NetTcpBinding ();
                                        bindingS.TransferMode = TransferMode.Streamed;
                                        bindingC.Security.Mode = SecurityMode.None;
-                                       IFooChannel proxy = new ChannelFactory<IFooChannel> (bindingC, new EndpointAddress ("net.tcp://localhost:37564/")).CreateChannel ();
+                                       IFooChannel proxy = new ChannelFactory<IFooChannel> (bindingC, new EndpointAddress ("net.tcp://localhost:" + port + "/")).CreateChannel ();
                                        proxy.Open ();
                                        try {
                                                Assert.AreEqual ("TEST FOR ECHO", proxy.Echo ("TEST FOR ECHO"), "#1");
index 71e580f69033e7224cc11aa659af04baedf56c8f..c822063805c18472d653710b6fa139a881541a7a 100644 (file)
@@ -38,17 +38,19 @@ using System.ServiceModel;
 
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Description
 {
        [TestFixture]
        public class MetadataResolverTest
        {
-               string url = "http://localhost:37564/echo/mex";
+               string url;
                //string url = "http://192.168.0.1:8080/echo/mex";
 
                static HttpListener listener;
                IAsyncResult current_request;
-               int remaining;
+               int remaining, port;
 
                static readonly string mex = File.ReadAllText ("Test/System.ServiceModel.Description/dump.xml");
 
@@ -58,7 +60,9 @@ namespace MonoTests.System.ServiceModel.Description
                        if (listener != null)
                                listener.Stop ();
                        listener = new HttpListener ();
-                       listener.Prefixes.Add ("http://*:37564/echo/");
+                       port = NetworkHelpers.FindFreePort ();
+                       url = "http://localhost:" + port + "/echo/mex";
+                       listener.Prefixes.Add ("http://*:" + port + "/echo/");
                        listener.Start ();
                        current_request = listener.BeginGetContext (OnReceivedRequest, null);
                        remaining = 1;
index a7cfc7807f767c2f4aba0a60339b4749782bc3d3..861a0be9ac14485e9238153e295faea32594c979 100644 (file)
@@ -34,6 +34,8 @@ using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Description
 {
        [TestFixture]
@@ -73,7 +75,7 @@ namespace MonoTests.System.ServiceModel.Description
                        b.ImpersonateCallerForAllOperations = true;
                        b.PrincipalPermissionMode = PrincipalPermissionMode.None;
 
-                       host.AddServiceEndpoint (typeof (TestService), new BasicHttpBinding (), new Uri ("http://localhost:37564"));
+                       host.AddServiceEndpoint (typeof (TestService), new BasicHttpBinding (), new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()));
 
                        host.Open ();
                }
@@ -86,7 +88,7 @@ namespace MonoTests.System.ServiceModel.Description
                        b.ImpersonateCallerForAllOperations = false;
                        b.PrincipalPermissionMode = PrincipalPermissionMode.None;
 
-                       host.AddServiceEndpoint (typeof (TestService2), new BasicHttpBinding (), new Uri ("http://localhost:37564"));
+                       host.AddServiceEndpoint (typeof (TestService2), new BasicHttpBinding (), new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()));
 
                        host.Open ();
                        var ed = ((ChannelDispatcher) host.ChannelDispatchers [0]).Endpoints [0];
index 46d129ff6010f6c131b1e9d88bf6baee7ebffc09..1785f29015bcde579625c1725aeaff5640167b39 100644 (file)
@@ -36,6 +36,8 @@ using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
 using System.ServiceModel.Channels;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Description
 {
        [TestFixture]
@@ -66,7 +68,7 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void InitializeRuntime1 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:37564"))) {
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:" + NetworkHelpers.FindFreePort ()))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "e1");
 
                                Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1");
@@ -103,7 +105,7 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void InitializeRuntime2 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:37564"))) {
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:" + NetworkHelpers.FindFreePort ()))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
                                host.Description.Behaviors.Remove<ServiceDebugBehavior> ();
 
@@ -122,7 +124,7 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void InitializeRuntime3 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:37564"))) {
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:" + NetworkHelpers.FindFreePort ()))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
                                host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageEnabled = false;
 
@@ -140,9 +142,10 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void InitializeRuntime4 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:37564"))) {
+                       int port = NetworkHelpers.FindFreePort ();
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:" + port))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
-                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = new Uri ("http://localhost:37564/help");
+                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = new Uri ("http://localhost:" + port + "/help");
 
                                Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1");
 
@@ -168,7 +171,7 @@ namespace MonoTests.System.ServiceModel.Description
                                Assert.AreEqual (0, ed.FilterPriority, "FilterPriority");
 
                                EndpointAddress ea = ed.EndpointAddress;
-                               Assert.AreEqual (new Uri ("http://localhost:37564/help"), ea.Uri, "Uri");
+                               Assert.AreEqual (new Uri ("http://localhost:" + port + "/help"), ea.Uri, "Uri");
 
                                DispatchRuntime dr = ed.DispatchRuntime;
                                Assert.AreEqual (1, dr.Operations.Count, "Operations.Count");
@@ -186,9 +189,10 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void ServiceMetadataExtension1 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:37564"))) {
+                       int port = NetworkHelpers.FindFreePort ();
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:" + port))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
-                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = new Uri ("http://localhost:37564/help");
+                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = new Uri ("http://localhost:" + port + "/help");
                                try {
                                host.Open ();
 
@@ -202,9 +206,10 @@ namespace MonoTests.System.ServiceModel.Description
 
                [Test]
                public void ServiceMetadataExtension2 () {
-                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:37564"))) {
+                       int port = NetworkHelpers.FindFreePort ();
+                       using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:" + port))) {
                                host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
-                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = CreateUri ("http://localhost:37564/help");
+                               host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = CreateUri ("http://localhost:" + port + "/help");
 
                                ServiceMetadataExtension extension = new ServiceMetadataExtension ();
                                host.Extensions.Add (extension);
index 4ec9e8827c7733907fc1f5f48fe93ece3917062e..7921e30d7fec4797ee4026020e9e4aa0b8458eda 100644 (file)
@@ -35,6 +35,8 @@ using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
 using System.ServiceModel.Channels;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Description
 {
        [TestFixture]
@@ -58,7 +60,7 @@ namespace MonoTests.System.ServiceModel.Description
                [Test]
                public void ListenUri ()
                {
-                       Uri uri = new Uri ("http://localhost:37564");
+                       Uri uri = new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        var se = new ServiceEndpoint (contract1, null, new EndpointAddress (uri));
                        Assert.AreEqual (uri, se.ListenUri, "#1");
                }
index ed5fb8b65c9cc31c43284bd985a0b33a7d369678..70d9c79c624ff3f6f16f89b274a894da425884f0 100644 (file)
@@ -35,6 +35,8 @@ using NUnit.Framework;
 
 using WebServiceMoonlightTest.ServiceReference1;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Dispatcher
 {
        [TestFixture]
@@ -44,7 +46,8 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                public void Bug652331_2 () // test in one of the comment
                {
                        // Init service
-                       ServiceHost serviceHost = new ServiceHost (typeof (Service1), new Uri ("http://localhost:37564/Service1"));
+                       int port = NetworkHelpers.FindFreePort ();
+                       ServiceHost serviceHost = new ServiceHost (typeof (Service1), new Uri ("http://localhost:" + port + "/Service1"));
                        serviceHost.AddServiceEndpoint (typeof (IService1), new BasicHttpBinding (), string.Empty);
 
                        // Enable metadata exchange (WSDL publishing)
@@ -58,7 +61,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                        try {
                                // client
                                var binding = new BasicHttpBinding ();
-                               var remoteAddress = new EndpointAddress ("http://localhost:37564/Service1");
+                               var remoteAddress = new EndpointAddress ("http://localhost:" + port + "/Service1");
                                var client = new Service1Client (binding, remoteAddress);
 
                                var wait = new ManualResetEvent (false);
index 3655b4177772f3b5674299727282ca2ff66681f9..59328f08103764aba73e0fc2c0e86ee518916d13 100644 (file)
@@ -37,6 +37,8 @@ using NUnit.Framework;
 
 using WebServiceMoonlightTest.ServiceReference2;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Dispatcher
 {
        [TestFixture]
@@ -47,7 +49,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                public void Bug652331_3 ()
                {
                        // Init service
-                       ServiceHost serviceHost = new ServiceHost(typeof(Service1), new Uri("http://localhost:37564/Service1"));
+                       ServiceHost serviceHost = new ServiceHost(typeof(Service1), new Uri("http://localhost:" + NetworkHelpers.FindFreePort () + "/Service1"));
                        serviceHost.AddServiceEndpoint(typeof(IService1), new BasicHttpBinding(), string.Empty);
 
                        // Enable metadata exchange (WSDL publishing)
@@ -68,7 +70,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                void RunClient ()
                {
                        var binding = new BasicHttpBinding ();
-                       var remoteAddress = new EndpointAddress ("http://localhost:37564/Service1");
+                       var remoteAddress = new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort () + "/Service1");
 
                        var normalClient      = new Service1Client (binding, remoteAddress);
                        var collectionClient  = new Service1Client (binding, remoteAddress);
index 3718357513859af9bbf7e39c3a4febdb3401d2b4..11fe45e9a5924502e03728680ac611e3a25e4840 100644 (file)
@@ -10,6 +10,8 @@ using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Dispatcher
 {
        [TestFixture]
@@ -42,7 +44,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                        var st = cd.ServiceThrottle;
                        Assert.IsNull (st, "#0");
 
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        ServiceHost h = new ServiceHost (typeof (TestContract), uri);
                        h.AddServiceEndpoint (typeof (TestContract).FullName, new BasicHttpBinding (), "address");
                        h.ChannelDispatchers.Add (cd);
@@ -69,7 +71,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                [Test]                  
                public void Collection_Add_Remove () {
                        Console.WriteLine ("STart test Collection_Add_Remove");
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        ServiceHost h = new ServiceHost (typeof (TestContract), uri);
                        h.AddServiceEndpoint (typeof (TestContract).FullName, new BasicHttpBinding (), "address");
                        MyChannelDispatcher d = new MyChannelDispatcher (new MyChannelListener (uri));
@@ -87,7 +89,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                [Test]
                public void EndpointDispatcherAddTest ()
                {
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        MyChannelDispatcher d = new MyChannelDispatcher (new MyChannelListener (uri));
                        d.Endpoints.Add (new EndpointDispatcher (new EndpointAddress (uri), "", ""));
                }
@@ -95,7 +97,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                [Test]
                [ExpectedException (typeof (InvalidOperationException))] 
                public void EndpointDispatcherAddTest2 () {
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        MyChannelDispatcher d = new MyChannelDispatcher (new MyChannelListener (uri));
                        d.Endpoints.Add (new EndpointDispatcher (new EndpointAddress (uri), "", ""));
                        d.Open (); // the dispatcher must be attached.
@@ -105,7 +107,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                [ExpectedException (typeof (InvalidOperationException))]
                public void EndpointDispatcherAddTest3 ()
                {
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        ServiceHost h = new ServiceHost (typeof (TestContract), uri);
                        MyChannelDispatcher d = new MyChannelDispatcher (new MyChannelListener (uri));
                        d.Endpoints.Add (new EndpointDispatcher (new EndpointAddress (uri), "", ""));
@@ -117,7 +119,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                [ExpectedException (typeof (InvalidOperationException))] // i.e. it is thrown synchronously in current thread.
                public void EndpointDispatcherAddTest4 ()
                {
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        ServiceHost h = new ServiceHost (typeof (TestContract), uri);
                        var listener = new MyChannelListener (uri);
                        MyChannelDispatcher d = new MyChannelDispatcher (listener);
@@ -149,7 +151,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                [ExpectedException (typeof (InvalidOperationException))] // i.e. it is thrown synchronously in current thread.
                public void EndpointDispatcherAddTest5 ()
                {
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        ServiceHost h = new ServiceHost (typeof (TestContract), uri);
                        var binding = new BasicHttpBinding ();
                        var listener = new MyChannelListener (uri);
@@ -171,7 +173,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                [Test]
                public void EndpointDispatcherAddTest6 ()
                {
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        ServiceHost h = new ServiceHost (typeof (TestContract), uri);
                        var binding = new BasicHttpBinding ();
                        var listener = new MyChannelListener<IReplyChannel> (uri);
@@ -202,7 +204,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                [ExpectedException (typeof (InvalidOperationException))]
                public void EndpointDispatcherAddTest7 ()
                {
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        ServiceHost h = new ServiceHost (typeof (TestContract), uri);
                        var binding = new BasicHttpBinding ();
                        var listener = new MyChannelListener<IReplyChannel> (uri);
@@ -237,7 +239,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                // but it makes little sense especially for checking duplicate listen URIs. Duplicate listen URIs should be rejected anyways.
                public void EndpointDispatcherAddTest8 ()
                {
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        ServiceHost h = new ServiceHost (typeof (TestContract), uri);
                        var listener = new MyChannelListener<IReplyChannel> (uri);
                        MyChannelDispatcher d = new MyChannelDispatcher (listener);
@@ -282,7 +284,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
 //             [Test]
                public void EndpointDispatcherAddTest9 () // test singleton service
                {
-                       var uri = CreateAvailableUri ("http://localhost:37564");
+                       var uri = CreateAvailableUri ("http://localhost:" + NetworkHelpers.FindFreePort ());
                        ServiceHost h = new ServiceHost (new TestContract (), uri);
                        h.Description.Behaviors.Find<ServiceBehaviorAttribute> ().InstanceContextMode = InstanceContextMode.Single;
                        var listener = new MyChannelListener<IReplyChannel> (uri);
index e8881b27d8a3d1771c1372d0de6d3de5abce9f95..641a95852ee198c0bfd2d652495f9de556f8c91a 100644 (file)
@@ -37,6 +37,8 @@ using System.ServiceModel.Security;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Dispatcher
 {
        [TestFixture]
@@ -88,11 +90,12 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                public void FaultContractInfos ()
                {
                        var host = new ServiceHost (typeof (TestFaultContract));
+                       int port = NetworkHelpers.FindFreePort ();
                        host.Description.Behaviors.Find<ServiceDebugBehavior> ().IncludeExceptionDetailInFaults = false;
-                       host.AddServiceEndpoint (typeof (ITestFaultContract), new BasicHttpBinding (), new Uri ("http://localhost:37564"));
+                       host.AddServiceEndpoint (typeof (ITestFaultContract), new BasicHttpBinding (), new Uri ("http://localhost:" + port));
                        host.Open ();
                        try {
-                               var cf = new ChannelFactory<ITestFaultContract> (new BasicHttpBinding (), new EndpointAddress ("http://localhost:37564"));
+                               var cf = new ChannelFactory<ITestFaultContract> (new BasicHttpBinding (), new EndpointAddress ("http://localhost:" + port));
                                var cli = cf.CreateChannel ();
                                try {
                                        cli.Run ("default");
@@ -178,4 +181,4 @@ namespace MonoTests.System.ServiceModel.Dispatcher
                        { }
                }
        }
-}
\ No newline at end of file
+}
index b29b970197aab4b16e67ed89b2ba9d8150c83a18..424e6519ee3640f62ef1c516fb8bff58515e7a3a 100644 (file)
@@ -42,6 +42,8 @@ using NUnit.Framework;
 
 using MonoTests.System.ServiceModel.Channels;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Security
 {
        [TestFixture]
@@ -190,7 +192,7 @@ namespace MonoTests.System.ServiceModel.Security
                                        sintercept,
                                        transport);
                                b_res.ReceiveTimeout = b_res.SendTimeout = TimeSpan.FromSeconds (5);
-                               host.AddServiceEndpoint (typeof (ICalc), b_res, "http://localhost:37564");
+                               host.AddServiceEndpoint (typeof (ICalc), b_res, "http://localhost:" + NetworkHelpers.FindFreePort ());
 
                                ServiceCredentials cred = new ServiceCredentials ();
                                cred.ServiceCertificate.Certificate = cert;
@@ -223,7 +225,7 @@ namespace MonoTests.System.ServiceModel.Security
 
                        b_req.ReceiveTimeout = b_req.SendTimeout = TimeSpan.FromSeconds (5);
                        EndpointAddress remaddr = new EndpointAddress (
-                               new Uri ("http://localhost:37564"),
+                               new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()),
                                new X509CertificateEndpointIdentity (cert));
                        CalcProxy proxy = new CalcProxy (b_req, remaddr);
                        proxy.ClientCredentials.ClientCertificate.Certificate = cert2;
index 3685bd6bb837edfb1b5bb98fcc0ac70aa29e8509..aa8d9417e250b17e665d49e72690c3688c93ee98 100644 (file)
@@ -39,6 +39,8 @@ using System.Transactions;
 using System.Threading;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel
 {
        [TestFixture]
@@ -80,7 +82,7 @@ namespace MonoTests.System.ServiceModel
                        IEndpointBehavior eb = new CallbackBehaviorAttribute () { ConcurrencyMode = ConcurrencyMode.Multiple, ValidateMustUnderstand = false };
                        var cd = ContractDescription.GetContract (typeof (IFoo));
                        var se = new ServiceEndpoint (cd);
-                       var ed = new EndpointDispatcher (new EndpointAddress ("http://localhost:37564"), "IFoo", "urn:foo");
+                       var ed = new EndpointDispatcher (new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()), "IFoo", "urn:foo");
                        eb.ApplyDispatchBehavior (se, ed);
                }
 
@@ -92,7 +94,7 @@ namespace MonoTests.System.ServiceModel
                        IEndpointBehavior eb = new CallbackBehaviorAttribute () { ConcurrencyMode = ConcurrencyMode.Multiple, ValidateMustUnderstand = false };
                        var cd = ContractDescription.GetContract (typeof (IFoo));
                        var se = new ServiceEndpoint (cd);
-                       var ed = new EndpointDispatcher (new EndpointAddress ("http://localhost:37564"), "IFoo", "urn:foo");
+                       var ed = new EndpointDispatcher (new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()), "IFoo", "urn:foo");
                        var cr = ed.DispatchRuntime.CallbackClientRuntime;
                        eb.ApplyClientBehavior (se, cr);
                }
@@ -104,7 +106,7 @@ namespace MonoTests.System.ServiceModel
                        IEndpointBehavior eb = new CallbackBehaviorAttribute () { ConcurrencyMode = ConcurrencyMode.Multiple, ValidateMustUnderstand = false };
                        var cd = ContractDescription.GetContract (typeof (IDuplexFoo));
                        var se = new ServiceEndpoint (cd);
-                       var ed = new EndpointDispatcher (new EndpointAddress ("http://localhost:37564"), "IDuplexFoo", "urn:foo");
+                       var ed = new EndpointDispatcher (new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()), "IDuplexFoo", "urn:foo");
                        var cr = ed.DispatchRuntime.CallbackClientRuntime;
                        eb.ApplyClientBehavior (se, cr);
                        Assert.IsFalse (cr.ValidateMustUnderstand, "#2.1");
index 70efef2761cbe03739ced20a4c172d9f86f0ee5c..30e4c4036d8fc33542d8d403d8be93484af6c1dd 100644 (file)
@@ -38,6 +38,8 @@ using System.Xml.Serialization;
 using MonoTests.System.ServiceModel.Channels;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel
 {
        [TestFixture]
@@ -63,14 +65,14 @@ namespace MonoTests.System.ServiceModel
                        //ChannelFactory<TestService> f =
                                new ChannelFactory<TestService> (
                                        new BasicHttpBinding (),
-                                       new EndpointAddress ("http://localhost:37564"));
+                                       new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                }
 
                [Test]
                public void EndpointAddressAfterCreateChannel ()
                {
                        var f = new ChannelFactory<ITestService> (new BasicHttpBinding ());
-                       f.CreateChannel (new EndpointAddress ("http://localhost:37564"), null);
+                       f.CreateChannel (new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()), null);
                        Assert.IsNull (f.Endpoint.Address, "#1");
                }
 
@@ -163,7 +165,7 @@ namespace MonoTests.System.ServiceModel
                        MyChannelFactory<ITestService> f =
                                new MyChannelFactory<ITestService> (
                                        new BasicHttpBinding (),
-                                       new EndpointAddress ("http://localhost:37564"));
+                                       new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                        Assert.AreEqual (CommunicationState.Created,
                                f.State, "#1");
                        f.OpenAnyways ();
@@ -179,7 +181,7 @@ namespace MonoTests.System.ServiceModel
                        ChannelFactory<ITestService> f =
                                new ChannelFactory<ITestService> (
                                        new BasicHttpBinding (),
-                                       new EndpointAddress ("http://localhost:37564"));
+                                       new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                        f.CreateChannel ();
                }
 
index ee445d6620f590d5cb3fcb5aa1d01a6fbee8680f..4fb3ce3a5d9b8f6d8dfd3986db1f9661d18a6018 100644 (file)
@@ -36,6 +36,8 @@ using System.ServiceModel.Description;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel
 {
        [TestFixture]
@@ -217,22 +219,23 @@ namespace MonoTests.System.ServiceModel
                [Ignore ("With Orcas it does not work fine")]
                public void UseCase1Test ()
                {
+                       int port = NetworkHelpers.FindFreePort ();
                        // almost equivalent to samples/clientbase/samplesvc.cs
                        using (host = new ServiceHost (typeof (UseCase1))) {
                                Binding binding = new BasicHttpBinding ();
                                binding.ReceiveTimeout = TimeSpan.FromSeconds (15);
-                               host.AddServiceEndpoint (typeof (IUseCase1).FullName, binding, new Uri ("http://localhost:37564"));
+                               host.AddServiceEndpoint (typeof (IUseCase1).FullName, binding, new Uri ("http://localhost:" + port));
 
                                host.Open ();
                                // almost equivalent to samples/clientbase/samplecli.cs
                                using (UseCase1Proxy proxy = new UseCase1Proxy (
                                        new BasicHttpBinding (),
-                                       new EndpointAddress ("http://localhost:37564"))) {
+                                       new EndpointAddress ("http://localhost:" + port))) {
                                        proxy.Open ();
                                        Assert.AreEqual ("TEST FOR ECHOTEST FOR ECHO", proxy.Echo ("TEST FOR ECHO"));
                                }
                        }
-                       EnsurePortNonBlocking (37564);
+                       EnsurePortNonBlocking (port);
                }
 
                void EnsurePortNonBlocking (int port)
@@ -357,8 +360,9 @@ namespace MonoTests.System.ServiceModel
                        ServiceHost host = new ServiceHost (typeof (UseCase2));
                        Binding binding = new BasicHttpBinding ();
                        binding.ReceiveTimeout = TimeSpan.FromSeconds (15);
+                       int port = NetworkHelpers.FindFreePort ();
                        host.AddServiceEndpoint (typeof (IUseCase2).FullName,
-                       binding, new Uri ("http://localhost:37564"));
+                       binding, new Uri ("http://localhost:" + port));
 
                        try {
                                host.Open ();
@@ -368,7 +372,7 @@ namespace MonoTests.System.ServiceModel
                                b.ReceiveTimeout = TimeSpan.FromSeconds (15);
                                UseCase2Proxy proxy = new UseCase2Proxy (
                                        b,
-                                       new EndpointAddress ("http://localhost:37564/"));
+                                       new EndpointAddress ("http://localhost:" + port + "/"));
                                proxy.Open ();
                                Message req = Message.CreateMessage (MessageVersion.Soap11, "http://tempuri.org/IUseCase2/Echo");
                                Message res = proxy.Echo (req);
@@ -378,7 +382,7 @@ namespace MonoTests.System.ServiceModel
                        } finally {
                                if (host.State == CommunicationState.Opened)
                                        host.Close ();
-                               EnsurePortNonBlocking (37564);
+                               EnsurePortNonBlocking (port);
                        }
                }
 
@@ -426,9 +430,10 @@ namespace MonoTests.System.ServiceModel
                        Binding bs = new BasicHttpBinding ();
                        bs.SendTimeout = TimeSpan.FromSeconds (5);
                        bs.ReceiveTimeout = TimeSpan.FromSeconds (5);
+                       int port = NetworkHelpers.FindFreePort ();
                        // magic name that does not require fully qualified name ...
                        host.AddServiceEndpoint ("IMetadataExchange",
-                               bs, new Uri ("http://localhost:37564"));
+                               bs, new Uri ("http://localhost:" + port));
                        try {
                                host.Open ();
                                // almost equivalent to samples/clientbase/samplecli3.cs
@@ -437,7 +442,7 @@ namespace MonoTests.System.ServiceModel
                                bc.ReceiveTimeout = TimeSpan.FromSeconds (5);
                                MetadataExchangeProxy proxy = new MetadataExchangeProxy (
                                        bc,
-                                       new EndpointAddress ("http://localhost:37564/"));
+                                       new EndpointAddress ("http://localhost:" + port + "/"));
                                proxy.Open ();
 
                                Message req = Message.CreateMessage (MessageVersion.Soap11, "http://schemas.xmlsoap.org/ws/2004/09/transfer/Get");
@@ -448,7 +453,7 @@ namespace MonoTests.System.ServiceModel
                        } finally {
                                if (host.State == CommunicationState.Opened)
                                        host.Close ();
-                               EnsurePortNonBlocking (37564);
+                               EnsurePortNonBlocking (port);
                        }
                }
 
index c886a971395332ceeb025856c22629250d6ec82b..d5908a5db451419445d9536a2e3820eafb575748 100644 (file)
@@ -37,6 +37,8 @@ using System.ServiceModel.Dispatcher;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel
 {
        [TestFixture]
@@ -48,7 +50,7 @@ namespace MonoTests.System.ServiceModel
                [ExpectedException (typeof (InvalidOperationException))]
                public void NotAllowedInitializationUI ()
                {
-                       var f = new FooProxy (new BasicHttpBinding (), new EndpointAddress ("http://localhost:37564"));
+                       var f = new FooProxy (new BasicHttpBinding (), new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                        f.Endpoint.Contract.Behaviors.Add (new MyContractBehavior ());
                        f.InnerChannel.AllowInitializationUI = false;
                        f.DisplayInitializationUI ();
@@ -58,7 +60,7 @@ namespace MonoTests.System.ServiceModel
                [ExpectedException (typeof (InvalidOperationException))]
                public void OpenBeforeDisplayInitializationUI ()
                {
-                       var f = new FooProxy (new BasicHttpBinding (), new EndpointAddress ("http://localhost:37564"));
+                       var f = new FooProxy (new BasicHttpBinding (), new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                        f.Endpoint.Contract.Behaviors.Add (new MyContractBehavior ());
                        f.Open ();
                }
index a1f28e3e1539d1247629cfa96686c16bbcb2307a..cf758cfe3ab8af315e5fd7853034f9825b723feb 100644 (file)
@@ -42,6 +42,8 @@ using MonoTests.System.ServiceModel.Channels;
 
 using ReqType = System.ServiceModel.Security.Tokens.ServiceModelSecurityTokenRequirement;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel
 {
        [TestFixture]
@@ -621,7 +623,7 @@ Assert.IsFalse (new MyManager (new MyClientCredentials ()).IsIssued (r), "premis
                        be.EndpointSupportingTokenParameters.Endorsing.Add (
                                new MyEndorsingTokenParameters ());
                        Binding b = new CustomBinding (be, new HttpTransportBindingElement ());
-                       EndpointAddress ea = new EndpointAddress (new Uri ("http://localhost:37564"), new X509CertificateEndpointIdentity (cert));
+                       EndpointAddress ea = new EndpointAddress (new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()), new X509CertificateEndpointIdentity (cert));
                        CalcProxy client = new CalcProxy (b, ea);
                        client.Endpoint.Behaviors.RemoveAll<ClientCredentials> ();
                        client.Endpoint.Behaviors.Add (new MyClientCredentials ());
index 1fc0a1ee8d1e3f03dd8d49b47c6ab0c3234c3920..962643c81d6240d9ba322bbee2233c79672ff668 100644 (file)
@@ -39,6 +39,7 @@ using System.Threading;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
 
 namespace MonoTests.System.ServiceModel
 {
@@ -55,17 +56,18 @@ namespace MonoTests.System.ServiceModel
                {
                        // Service
                        ServiceHost host = new ServiceHost (typeof (Foo));
+                       int port = NetworkHelpers.FindFreePort ();
                        try {
                                Binding binding = new BasicHttpBinding ();
                                binding.SendTimeout = binding.ReceiveTimeout = TimeSpan.FromSeconds (5);
                                ServiceEndpoint se = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.IFoo",
-                                       binding, new Uri ("http://localhost:37564"));
+                                       binding, new Uri ("http://localhost:" + port));
                                host.Open ();
 
                                // Client
                                ChannelFactory<IFoo> cf = new ChannelFactory<IFoo> (
                                        new BasicHttpBinding (),
-                                       new EndpointAddress ("http://localhost:37564/"));
+                                       new EndpointAddress ("http://localhost:" + port + "/"));
                                IFoo foo  = cf.CreateChannel ();
                                Assert.AreEqual ("Test for EchoTest for Echo", foo.Echo ("Test for Echo"));
                        } finally {
@@ -80,17 +82,18 @@ namespace MonoTests.System.ServiceModel
                {
                        // Service
                        ServiceHost host = new ServiceHost (typeof (Foo2));
+                       int port = NetworkHelpers.FindFreePort ();
                        try {
                                Binding binding = new BasicHttpBinding ();
                                binding.SendTimeout = binding.ReceiveTimeout = TimeSpan.FromSeconds (5);
                                host.AddServiceEndpoint ("MonoTests.System.ServiceModel.IFoo2",
-                               binding, new Uri ("http://localhost:37564"));
+                               binding, new Uri ("http://localhost:" + port));
                                host.Open ();
 
                                // Client
                                Foo2Proxy proxy = new Foo2Proxy (
                                        new BasicHttpBinding (),
-                                       new EndpointAddress ("http://localhost:37564/"));
+                                       new EndpointAddress ("http://localhost:" + port + "/"));
                                proxy.Open ();
                                try {
                                        Assert.AreEqual ("TEST FOR ECHOTEST FOR ECHO",
@@ -111,17 +114,18 @@ namespace MonoTests.System.ServiceModel
                {
                        // Service
                        ServiceHost host = new ServiceHost (typeof (MetadataExchange));
+                       int port = NetworkHelpers.FindFreePort ();
                        try {
                                Binding binding = new BasicHttpBinding ();
                                binding.ReceiveTimeout = TimeSpan.FromSeconds (5);
                                host.AddServiceEndpoint ("IMetadataExchange",
-                               binding, new Uri ("http://localhost:37564"));
+                               binding, new Uri ("http://localhost:" + port));
                                host.Open ();
                                // Client
 
                                MetadataExchangeProxy proxy = new MetadataExchangeProxy (
                                        new BasicHttpBinding (),
-                                       new EndpointAddress ("http://localhost:37564/"));
+                                       new EndpointAddress ("http://localhost:" + port + "/"));
                                proxy.Open ();
 
                                try {
index 72837c7af45453576c231c9a63c50426ac7494f8..633b776aeac48c10c96f3b29d32d12e21dcad79e 100644 (file)
@@ -35,6 +35,8 @@ using System.ServiceModel.Security;
 using System.Threading;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel
 {
        [TestFixture]
@@ -167,17 +169,18 @@ namespace MonoTests.System.ServiceModel
                {
                        var host = new ServiceHost (typeof (Foo));
                        var bindingsvc = new CustomBinding (new BinaryMessageEncodingBindingElement (), new TcpTransportBindingElement ());
-                       host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost:37564/");
+                       int port = NetworkHelpers.FindFreePort ();
+                       host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost:" + port + "/");
                        host.Open (TimeSpan.FromSeconds (5));
                        try {
                                var bindingcli = new NetTcpBinding () { TransactionFlow = false };
                                bindingcli.Security.Mode = SecurityMode.None;
-                               var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost:37564/")).CreateChannel ();
+                               var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost:" + port + "/")).CreateChannel ();
                                Assert.AreEqual (5, cli.Add (1, 4));
                                Assert.AreEqual ("monkey science", cli.Join ("monkey", "science"));
                        } finally {
                                host.Close (TimeSpan.FromSeconds (5));
-                               var t = new TcpListener (37564);
+                               var t = new TcpListener (port);
                                t.Start ();
                                t.Stop ();
                        }
@@ -190,18 +193,19 @@ namespace MonoTests.System.ServiceModel
                {
                        var host = new ServiceHost (typeof (Foo));
                        var bindingsvc = new CustomBinding (new BinaryMessageEncodingBindingElement (), new TcpTransportBindingElement () { TransferMode = TransferMode.Streamed });
-                       host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost:37564/");
+                       int port = NetworkHelpers.FindFreePort ();
+                       host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost:" + port + "/");
                        host.Open (TimeSpan.FromSeconds (5));
                        try {
                                var bindingcli = new NetTcpBinding () { TransactionFlow = false };
                                bindingcli.TransferMode = TransferMode.Streamed;
                                bindingcli.Security.Mode = SecurityMode.None;
-                               var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost:37564/")).CreateChannel ();
+                               var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost:" + port + "/")).CreateChannel ();
                                Assert.AreEqual (5, cli.Add (1, 4));
                                Assert.AreEqual ("monkey science", cli.Join ("monkey", "science"));
                        } finally {
                                host.Close (TimeSpan.FromSeconds (5));
-                               var t = new TcpListener (37564);
+                               var t = new TcpListener (port);
                                t.Start ();
                                t.Stop ();
                        }
index dafa6346c52a2d8d731d3ba18db2cd7252fa9126..3378c7b82b735cc17a8cd9083c810970f00b23f1 100644 (file)
@@ -35,6 +35,8 @@ using System.ServiceModel;
 using System.Xml;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel
 {
        [TestFixture]
@@ -50,7 +52,7 @@ namespace MonoTests.System.ServiceModel
                [Test]
                public void UserContextProperties ()
                {
-                       var ch = ChannelFactory<IFooChannel>.CreateChannel (new BasicHttpBinding (), new EndpointAddress ("http://localhost:37564"));
+                       var ch = ChannelFactory<IFooChannel>.CreateChannel (new BasicHttpBinding (), new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                        var o = new OperationContext (ch);
 
                        // FIXME: this is strange. It should return non-null value.
@@ -91,7 +93,7 @@ namespace MonoTests.System.ServiceModel
                        Assert.IsNull (OperationContext.Current, "Current-1");
 
                        try {
-                               var ch = ChannelFactory<IFooChannel>.CreateChannel (new BasicHttpBinding (), new EndpointAddress ("http://localhost:37564"));
+                               var ch = ChannelFactory<IFooChannel>.CreateChannel (new BasicHttpBinding (), new EndpointAddress ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                                OperationContext.Current = new OperationContext (ch);
                                Assert.IsNotNull (OperationContext.Current, "Current-2");
                        }
index d73d516cbbb1c341b565695eb7c3f7ae35ffad34..55441b8d24e9de01ce050e83ccf69e0dd05e4e29 100644 (file)
@@ -36,6 +36,8 @@ using System.ServiceModel.Dispatcher;
 using SMMessage = System.ServiceModel.Channels.Message;
 using System.ServiceModel.Channels;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel
 {
        [TestFixture]
@@ -159,7 +161,8 @@ namespace MonoTests.System.ServiceModel
 
                [Test]
                public void ChannelDispatchers_NoDebug () {
-                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158"));
+                       var ep = "http://" + NetworkHelpers.LocalEphemeralEndPoint().ToString();
+                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri (ep));
                        h.AddServiceEndpoint (typeof (AllActions).FullName, new BasicHttpBinding (), "address");
 
                        ServiceDebugBehavior b = h.Description.Behaviors.Find<ServiceDebugBehavior> ();
@@ -173,7 +176,7 @@ namespace MonoTests.System.ServiceModel
                        Assert.IsTrue (channelDispatcher.Endpoints.Count == 1, "#2");
                        EndpointAddressMessageFilter filter = channelDispatcher.Endpoints [0].AddressFilter as EndpointAddressMessageFilter;
                        Assert.IsNotNull (filter, "#3");
-                       Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:30158/address")), "#4");
+                       Assert.IsTrue (filter.Address.Equals (new EndpointAddress (ep + "/address")), "#4");
                        Assert.IsFalse (filter.IncludeHostNameInComparison, "#5");
                        Assert.IsTrue (channelDispatcher.Endpoints [0].ContractFilter is MatchAllMessageFilter, "#6");
                        } finally {
@@ -183,11 +186,12 @@ namespace MonoTests.System.ServiceModel
 
                [Test]
                public void ChannelDispatchers_WithDebug () {
-                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158"));
+                       var ep = "http://" + NetworkHelpers.LocalEphemeralEndPoint().ToString();
+                       ServiceHost h = new ServiceHost (typeof (AllActions), new Uri (ep));
                        h.AddServiceEndpoint (typeof (AllActions).FullName, new BasicHttpBinding (), "address");
                        ServiceMetadataBehavior b = new ServiceMetadataBehavior ();
                        b.HttpGetEnabled = true;
-                       b.HttpGetUrl = new Uri( "http://localhost:30158" );
+                       b.HttpGetUrl = new Uri( ep );
                        h.Description.Behaviors.Add (b);
                        h.Open ();
 
@@ -197,7 +201,7 @@ namespace MonoTests.System.ServiceModel
                        Assert.IsTrue (channelDispatcher.Endpoints.Count == 1, "#3");
                        EndpointAddressMessageFilter filter = channelDispatcher.Endpoints [0].AddressFilter as EndpointAddressMessageFilter;
                        Assert.IsNotNull (filter, "#4");
-                       Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:30158")), "#5");
+                       Assert.IsTrue (filter.Address.Equals (new EndpointAddress (ep)), "#5");
                        Assert.IsFalse (filter.IncludeHostNameInComparison, "#6");
                        Assert.IsTrue (channelDispatcher.Endpoints [0].ContractFilter is MatchAllMessageFilter, "#7");
                        h.Close ();
@@ -207,7 +211,8 @@ namespace MonoTests.System.ServiceModel
                public void SpecificActionTest ()
                {
                        //EndpointDispatcher d = new EndpointDispatcher(
-                       ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:30158"));
+                       var ep = NetworkHelpers.LocalEphemeralEndPoint().ToString();
+                       ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://" + ep));
                        h.AddServiceEndpoint (typeof (Action1Interface), new BasicHttpBinding (), "address");
                                                
                        h.Open ();
@@ -222,7 +227,8 @@ namespace MonoTests.System.ServiceModel
                [Test]
                public void InitializeRuntimeBehaviors1 () {
                        HostState st = new HostState ();
-                       ServiceHost h = new ServiceHost (typeof (SpecificAction2), new Uri ("http://localhost:30158"));
+                       var ep = NetworkHelpers.LocalEphemeralEndPoint().ToString();
+                       ServiceHost h = new ServiceHost (typeof (SpecificAction2), new Uri ("http://" + ep));
                        h.AddServiceEndpoint (typeof (SpecificAction2), new BasicHttpBinding (), "temp");                       
 
                        h.Description.Behaviors.Add (new MyServiceBehavior (st, h));
@@ -241,7 +247,8 @@ namespace MonoTests.System.ServiceModel
                [Test]
                public void InitializeRuntimeBehaviors2 () {
                        HostState st = new HostState ();
-                       ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:30158"));
+                       var ep = NetworkHelpers.LocalEphemeralEndPoint().ToString();
+                       ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://" + ep));
                        h.AddServiceEndpoint (typeof (Action1Interface), new BasicHttpBinding (), "temp");
                        h.AddServiceEndpoint (typeof (Action2Interface), new BasicHttpBinding (), "temp2");
 
@@ -266,9 +273,9 @@ namespace MonoTests.System.ServiceModel
                {
                        var host = new Poker ();
                        Assert.AreEqual (0, host.BaseAddresses.Count, "#1");
-                       host.DoAddBaseAddress (new Uri ("http://localhost:37564"));
+                       host.DoAddBaseAddress (new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                        Assert.AreEqual (1, host.BaseAddresses.Count, "#1");
-                       host.DoAddBaseAddress (new Uri ("net.tcp://localhost:893"));
+                       host.DoAddBaseAddress (new Uri ("net.tcp://localhost:" + NetworkHelpers.FindFreePort ()));
                        Assert.AreEqual (2, host.BaseAddresses.Count, "#1");
                }
 
@@ -278,39 +285,42 @@ namespace MonoTests.System.ServiceModel
                {
                        var host = new Poker ();
                        Assert.AreEqual (0, host.BaseAddresses.Count, "#1");
-                       host.DoAddBaseAddress (new Uri ("http://localhost:37564"));
+                       host.DoAddBaseAddress (new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                        // http base address is already added.
-                       host.DoAddBaseAddress (new Uri ("http://localhost:893"));
+                       host.DoAddBaseAddress (new Uri ("http://localhost:" + NetworkHelpers.FindFreePort ()));
                }
 
                [Test]
                public void AddServiceEndpointUri ()
                {
+                       int port = NetworkHelpers.FindFreePort ();
                        var host = new ServiceHost (typeof (AllActions),
-                               new Uri ("http://localhost:37564"));
+                               new Uri ("http://localhost:" + port));
                        var se = host.AddServiceEndpoint (typeof (AllActions),
                                new BasicHttpBinding (), "foobar");
-                       Assert.AreEqual ("http://localhost:37564/foobar", se.Address.Uri.AbsoluteUri, "#1");
-                       Assert.AreEqual ("http://localhost:37564/foobar", se.ListenUri.AbsoluteUri, "#2");
+                       Assert.AreEqual ("http://localhost:" + port + "/foobar", se.Address.Uri.AbsoluteUri, "#1");
+                       Assert.AreEqual ("http://localhost:" + port + "/foobar", se.ListenUri.AbsoluteUri, "#2");
                }
 
                [Test]
                public void AddServiceEndpointUri2 ()
                {
+                       int port = NetworkHelpers.FindFreePort ();
                        var host = new ServiceHost (typeof (AllActions),
-                               new Uri ("http://localhost:37564"));
+                               new Uri ("http://localhost:" + port));
                        var se = host.AddServiceEndpoint (typeof (AllActions),
                                new BasicHttpBinding (), String.Empty);
-                       Assert.AreEqual ("http://localhost:37564/", se.Address.Uri.AbsoluteUri, "#1");
-                       Assert.AreEqual ("http://localhost:37564/", se.ListenUri.AbsoluteUri, "#2");
+                       Assert.AreEqual ("http://localhost:" + port + "/", se.Address.Uri.AbsoluteUri, "#1");
+                       Assert.AreEqual ("http://localhost:" + port + "/", se.ListenUri.AbsoluteUri, "#2");
                }
 
                [Test]
                [ExpectedException (typeof (InvalidOperationException))]
                public void AddServiceEndpointOnlyMex ()
                {
+            var ep = NetworkHelpers.LocalEphemeralEndPoint().ToString();
                        var host = new ServiceHost (typeof (AllActions),
-                               new Uri ("http://localhost:37564"));
+                               new Uri ("http://" + ep));
                        host.Description.Behaviors.Add (new ServiceMetadataBehavior ());
                        host.AddServiceEndpoint ("IMetadataExchange",
                                new BasicHttpBinding (), "/wsdl");
@@ -339,7 +349,7 @@ namespace MonoTests.System.ServiceModel
 
                void RunDestinationUnreachableTest (string label, Binding binding)
                {
-                       string address = "http://localhost:37564/";
+                       string address = "http://" + NetworkHelpers.LocalEphemeralEndPoint().ToString();
                        var host = OpenHost (address, binding);
                        
                        try {
index 57e03d8e7b4fa9e487ea5c0c18e84c479ded4e0d..a120402ff7cc6bbcdcaadc235ad311843ca49752 100644 (file)
@@ -34,6 +34,8 @@ using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel
 {
        [TestFixture]
@@ -172,10 +174,11 @@ namespace MonoTests.System.ServiceModel
                [Test]
                public void AddServiceEndpoint2_4 ()
                {
-                       ServiceHost host = new ServiceHost (typeof (HogeFuga), new Uri ("http://localhost:37564"));
+                       var ep = "http://" + NetworkHelpers.LocalEphemeralEndPoint().ToString();
+                       ServiceHost host = new ServiceHost (typeof (HogeFuga), new Uri (ep));
                        var binding = new BasicHttpBinding ();
-                       host.AddServiceEndpoint (typeof (IHoge), binding, new Uri ("http://localhost:37564"));
-                       host.AddServiceEndpoint (typeof (IFuga), binding, new Uri ("http://localhost:37564"));
+                       host.AddServiceEndpoint (typeof (IHoge), binding, new Uri (ep));
+                       host.AddServiceEndpoint (typeof (IFuga), binding, new Uri (ep));
 
                        // Use the same binding, results in one ChannelDispatcher (actually two, for metadata/debug behavior).
                        host.Open ();
@@ -296,13 +299,14 @@ namespace MonoTests.System.ServiceModel
                [Test]
                public void InstanceWithNonSingletonMode ()
                {
+                       var ep = NetworkHelpers.LocalEphemeralEndPoint().ToString();
                        ServiceHost host = new ServiceHost (
                                new NonSingletonService ());
                        Assert.IsNotNull (host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().GetWellKnownSingleton (), "premise1");
                        host.AddServiceEndpoint (
                                typeof (NonSingletonService),
                                new BasicHttpBinding (),
-                               new Uri ("http://localhost:37564/s1"));
+                               new Uri ("http://" + ep + "/s1"));
 
                        // in case Open() didn't fail, we need to close the host.
                        // And even if Close() caused the expected exception,
@@ -323,13 +327,14 @@ namespace MonoTests.System.ServiceModel
                [Test]
                public void InstanceWithSingletonMode ()
                {
+            var ep = NetworkHelpers.LocalEphemeralEndPoint().ToString();
                        SingletonService instance = new SingletonService ();
                        ServiceHost host = new ServiceHost (instance);
                        Assert.IsNotNull (host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().GetWellKnownSingleton (), "#1");
                        host.AddServiceEndpoint (
                                typeof (SingletonService),
                                new BasicHttpBinding (),
-                               new Uri ("http://localhost:37564/s2"));
+                               new Uri ("http://" + ep + "/s2"));
 
                        // in case Open() didn't fail, we need to close the host.
                        // And even if Close() caused the expected exception,
diff --git a/mcs/class/System.ServiceModel/monotouch_watch_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/monotouch_watch_System.ServiceModel.dll.sources
new file mode 100644 (file)
index 0000000..22ece5c
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.ServiceModel.dll.sources
diff --git a/mcs/class/System.ServiceModel/xammac_net_4_5_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/xammac_net_4_5_System.ServiceModel.dll.sources
new file mode 100644 (file)
index 0000000..1e3d293
--- /dev/null
@@ -0,0 +1,64 @@
+#include mobile_System.ServiceModel.dll.sources
+System.ServiceModel.Channels/IChannelListener.cs
+System.ServiceModel.Channels/IReplyChannel.cs
+System.ServiceModel.Channels/IReplySessionChannel.cs
+System.ServiceModel.Configuration/CertificateElement.cs
+System.ServiceModel.Configuration/CertificateReferenceElement.cs
+System.ServiceModel.Configuration/ConfigUtil.cs
+System.ServiceModel.Configuration/DnsElement.cs
+System.ServiceModel.Configuration/IdentityElement.cs
+System.ServiceModel.Configuration/RsaElement.cs
+System.ServiceModel.Configuration/ServicePrincipalNameElement.cs
+System.ServiceModel.Configuration/UserPrincipalNameElement.cs
+System.ServiceModel.Configuration/X509ClientCertificateCredentialsElement.cs
+System.ServiceModel.Configuration/X509DefaultServiceCertificateElement.cs
+System.ServiceModel.Configuration/X509ScopedServiceCertificateElement.cs
+System.ServiceModel.Description/MetadataLocation.cs
+System.ServiceModel.Description/MetadataReference.cs
+System.ServiceModel.Description/MetadataSection.cs
+System.ServiceModel.Description/MetadataSectionSerializerBase.cs
+System.ServiceModel.Description/MetadataSet.cs
+System.ServiceModel.Dispatcher/ActionMessageFilter.cs
+System.ServiceModel.Dispatcher/ActionMessageFilterTable.cs
+System.ServiceModel.Dispatcher/ICallContextInitializer.cs
+System.ServiceModel.Dispatcher/IMessageFilterTable.cs
+System.ServiceModel.Dispatcher/IOperationInvoker.cs
+System.ServiceModel.Dispatcher/MatchAllMessageFilter.cs
+System.ServiceModel.Dispatcher/MatchNoneMessageFilter.cs
+System.ServiceModel.Dispatcher/MessageFilter.cs
+System.ServiceModel.Dispatcher/MessageFilterTable.cs
+System.ServiceModel.Dispatcher/MultipleMessageFilterMatchesException.cs
+System.ServiceModel.Dispatcher/SeekableXPathNavigator.cs
+System.ServiceModel.Dispatcher/XPathMessageFilter.cs
+System.ServiceModel.Security.Tokens/SecurityContextSecurityToken.cs
+System.ServiceModel.Security.Tokens/SslnegoCookieResolver.cs
+System.ServiceModel.Security/ChannelProtectionRequirements.cs
+System.ServiceModel.Security/IdentityVerifier.cs
+System.ServiceModel.Security/IssuedTokenClientCredential.cs
+System.ServiceModel.Security/KeyEntropyMode.cs
+System.ServiceModel.Security/MessagePartSpecification.cs
+System.ServiceModel.Security/PeerCredential.cs
+System.ServiceModel.Security/ScopedMessagePartSpecification.cs
+System.ServiceModel.Security/SecurityAlgorithmSuite.cs
+System.ServiceModel.Security/SecurityContextKeyIdentifierClause.cs
+System.ServiceModel.Security/SecurityMessageProperty.cs
+System.ServiceModel.Security/SecurityStateEncoder.cs
+System.ServiceModel.Security/SecurityTokenAttachmentMode.cs
+System.ServiceModel.Security/SecurityTokenSpecification.cs
+System.ServiceModel.Security/SupportingTokenSpecification.cs
+System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs
+System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs
+System.ServiceModel.Security/X509PeerCertificateAuthentication.cs
+System.ServiceModel.Security/X509ServiceCertificateAuthentication.cs
+System.ServiceModel/DnsEndpointIdentity.cs
+System.ServiceModel/EndpointAddressAugust2004.cs
+System.ServiceModel/EndpointIdentity.cs
+System.ServiceModel/IDuplexClientChannel.cs
+System.ServiceModel/OperationBehaviorAttribute.cs
+System.ServiceModel/RsaEndpointIdentity.cs
+System.ServiceModel/ServiceSecurityContext.cs
+System.ServiceModel/SpnEndpointIdentity.cs
+System.ServiceModel/UpnEndpointIdentity.cs
+System.ServiceModel/X509CertificateEndpointIdentity.cs
+System.ServiceModel.Dispatcher/IErrorHandler.cs
+Dummy_XM_4_5.cs
index 46df964af01cd3254dfe5b5069855cc1475c401b..ba910861e3b2b7f580e54e997f2747643128690c 100644 (file)
@@ -2,7 +2,7 @@ thisdir = class/System.Transactions
 SUBDIRS = 
 include ../../build/rules.make
 
-MOBILE_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static, $(PROFILE))
+MOBILE_PROFILE := $(filter monotouch monotouch_runtime monotouch_watch monodroid xammac mobile mobile_static, $(PROFILE))
 
 LIBRARY = System.Transactions.dll
 ifdef MOBILE_PROFILE
index b3e4a1c16dcf32f25e1e66d93c70ecb37699e7d9..d53c063441e031e840b38712192ef849e2c4bbae 100644 (file)
@@ -92,6 +92,8 @@ namespace System.Web.Routing
                        }
                }
 
+               public bool LowercaseUrls { get; set; }
+               public bool AppendTrailingSlash { get; set; }
                public bool RouteExistingFiles { get; set; }
 
                public void Add (string name, RouteBase item)
index 2ba370c04ab51bc78b7aa505fcefbfb158a0aebe..a77c3683895f1c00aabe392949e3b9272edbfe07 100644 (file)
@@ -3,7 +3,7 @@ SUBDIRS =
 include ../../build/rules.make
 
 LIBRARY = System.Web.Services.dll
-MOBILE := $(filter monotouch monodroid xammac mobile mobile_static, $(PROFILE))
+MOBILE := $(filter monotouch monotouch_watch monodroid xammac mobile mobile_static, $(PROFILE))
 ifdef MOBILE
 LIB_REFS = System System.Xml
 LIB_MCS_FLAGS = \
@@ -15,18 +15,28 @@ LIB_MCS_FLAGS = \
        -resource:System.Web.Services.Description/wsdl-1.1-soap.xsd,wsdl-1.1-soap.xsd \
        -resource:System.Web.Services.Description/web-reference.xsd,web-reference.xsd
 else
-LIB_REFS = System System.EnterpriseServices System.Xml System.Web System.DirectoryServices System.Data System.Design
+LIB_REFS = System System.EnterpriseServices System.Xml System.Data
 LIB_MCS_FLAGS = -nowarn:168,169,219,414,612,649 -d:MONO_BROKEN_CONFIGURATION_DLL
 
+ifndef NO_SYSTEM_WEB_DEPENDENCY
+LIB_REFS += System.Web
 plainweb_dir = $(the_libdir_base)plainweb
 plainweb = $(plainweb_dir)/System.Web.dll
 system_web_services_deps = $(plainweb)
+LOCAL_MCS_FLAGS += -lib:$(plainweb_dir)
+endif
 
+ifndef NO_SYSTEM_DESIGN_DEPENDENCY
+LIB_REFS += System.Design
 plaindesign_dir = $(the_libdir_base)plaindesign
 plaindesign = $(plaindesign_dir)/System.Design.dll
 system_design_deps = $(plaindesign)
+LOCAL_MCS_FLAGS += -lib:$(plaindesign_dir)
+endif
 
-LOCAL_MCS_FLAGS = -lib:$(plaindesign_dir) -lib:$(plainweb_dir)
+ifndef NO_SYSTEM_DIRECTORY_SERVICES_DEPENDENCY
+LIB_REFS += System.DirectoryServices
+endif
 
 LIB_REFS += System.Configuration
 LIB_MCS_FLAGS += \
index bcc9fbee75703ef394a3536d8fb93c65b5f220f8..4bfcff325bbb4fabdcb8c7cf92415d61e469ea4e 100644 (file)
@@ -71,7 +71,7 @@ namespace System.Web.Services.Description
                        RegisterExtensionType (typeof (Soap12HeaderBinding));
                        RegisterExtensionType (typeof (Soap12OperationBinding));
 
-#if !MOBILE
+#if !MOBILE && !XAMMAC_4_5
                        /*
                         * Currently, the mobile profile has not support for
                         * System.Configuration, so there are no external modules
@@ -164,7 +164,7 @@ namespace System.Web.Services.Description
                /*
                 * The mobile profile lacks support for configuration
                 */
-#if MOBILE
+#if MOBILE || XAMMAC_4_5
                public static ArrayList BuildExtensionImporters ()
                {
                        return new ArrayList (0);
index be3201d18c6b6b356fd3829b51de76f8c255f358..dd29adbeb18084daa20fc2c189d25d0e1334992b 100644 (file)
@@ -142,7 +142,7 @@ namespace System.Web.Services.Description {
                                schemas.Add (serviceDescription.Types.Schemas);
                }
 
-#if !MOBILE
+#if !MOBILE && !XAMMAC_4_5
                public ServiceDescriptionImportWarnings Import (CodeNamespace codeNamespace, CodeCompileUnit codeCompileUnit)
                {
                        foreach (ProtocolImporter importer in GetSupportedImporters ()) {
@@ -163,9 +163,6 @@ namespace System.Web.Services.Description {
                        list.Add (new HttpPostProtocolImporter ());
                        return list;
                }
-#endif
-               
-#if !MOBILE
 
                [MonoTODO] // where to use Verbose and Extensions in options?
                public static StringCollection GenerateWebReferences (
index 1774d436ed0e0b477131d06c9b2870f38ead522e..2585d05360537e00514bc4969b0836d105d15b7f 100644 (file)
@@ -487,7 +487,7 @@ namespace System.Web.Services.Protocols {
                        xmlImporter.IncludeTypes (Type);
                        soapImporter.IncludeTypes (Type);
 
-#if MOBILE
+#if MOBILE || XAMMAC_4_5
                        SoapExtensions = new SoapExtensionRuntimeConfig [2][];
 #else
                        SoapExtensions = SoapExtension.GetTypeExtensions (Type);
index 61ce80625f0dcefdee5bbc07c1e17415bdb10b06..57852949efb085625329dad4873e31c7837eb062 100644 (file)
@@ -207,7 +207,7 @@ namespace System.Web.Services.Protocols
                                                soap12Protocol.Initialize ();
                                        }
                                        return soap12Protocol;
-#if !MOBILE
+#if !MOBILE && !XAMMAC_4_5
                                case "HttpGet":
                                        if (httpGetProtocol == null){
                                                httpGetProtocol = new HttpGetTypeStubInfo (this);
index 2846572ec610ca0cc269b376981a95a0af5f2f53..ae1bd44980989b34cdfd0609a81669df88b005cb 100644 (file)
@@ -100,7 +100,7 @@ namespace System.Web.Services.Protocols {
                        return pos;
                }
 
-#if !MOBILE
+#if !MOBILE && !XAMMAC_4_5
                static void InitializeGlobalExtensions ()
                {
                        globalExtensions = new ArrayList[2];
diff --git a/mcs/class/System.Web.Services/monotouch_watch_System.Web.Services.dll.sources b/mcs/class/System.Web.Services/monotouch_watch_System.Web.Services.dll.sources
new file mode 100644 (file)
index 0000000..9e39dcc
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Web.Services.dll.sources
diff --git a/mcs/class/System.Web.Services/xammac_net_4_5_System.Web.Services.dll.sources b/mcs/class/System.Web.Services/xammac_net_4_5_System.Web.Services.dll.sources
new file mode 100644 (file)
index 0000000..2e521cf
--- /dev/null
@@ -0,0 +1,3 @@
+#include mobile_System.Web.Services.dll.sources
+System.Web.Services.Description/ServiceDescription.cs
+System.Web.Services.Description/ServiceDescriptionImportWarnings.cs 
index f1b350172c181bfbc5de5bdfac758063ebbd84f5..67956ca1ebddea04ac32fbbf78d0615b834230df 100644 (file)
     <Compile Include="System.Web\CapabilitiesLoader.cs" />\r
     <Compile Include="System.Web\DefaultExceptionPageTemplate.cs" />\r
     <Compile Include="System.Web\DefaultHttpHandler.cs" />\r
+    <Compile Include="System.Web\DynamicModuleManager.cs" />\r
     <Compile Include="System.Web\EndEventHandler.cs" />\r
     <Compile Include="System.Web\EventHandlerTaskAsyncHelper.cs" />\r
     <Compile Include="System.Web\ExceptionPageTemplate.cs" />\r
index fe5bb23c9924ee97d2adc1f1800f43553300d645..925358a6fb72a9893dd309a6b89af2885379b355 100644 (file)
     <Compile Include="System.Web\CapabilitiesLoader.cs" />\r
     <Compile Include="System.Web\DefaultExceptionPageTemplate.cs" />\r
     <Compile Include="System.Web\DefaultHttpHandler.cs" />\r
+    <Compile Include="System.Web\DynamicModuleManager.cs" />\r
     <Compile Include="System.Web\EndEventHandler.cs" />\r
     <Compile Include="System.Web\EventHandlerTaskAsyncHelper.cs" />\r
     <Compile Include="System.Web\ExceptionPageTemplate.cs" />\r
index 62eb0716440d75bdb62c0933c298994a2c61068f..a328b5e18fcbb139a2a26bbaaa0726f0bef4c426 100644 (file)
@@ -63,6 +63,7 @@ namespace System.Web.Configuration
                static ConfigurationProperty encoderTypeProp;
                static ConfigurationProperty relaxedUrlToFileSystemMappingProp;
                static ConfigurationProperty targetFrameworkProp;
+               static ConfigurationProperty allowDynamicModuleRegistrationProp;
                static ConfigurationPropertyCollection properties;
 
                static HttpRuntimeSection ()
@@ -141,6 +142,8 @@ namespace System.Web.Configuration
                                                                                PropertyHelper.VersionConverter,
                                                                                PropertyHelper.DefaultValidator,
                                                                                ConfigurationPropertyOptions.None);
+                       allowDynamicModuleRegistrationProp = new ConfigurationProperty ("allowDynamicModuleRegistration", typeof(bool), true,
+                                                                               ConfigurationPropertyOptions.None);
                        
                        properties = new ConfigurationPropertyCollection();
                        properties.Add (apartmentThreadingProp);
@@ -169,6 +172,7 @@ namespace System.Web.Configuration
                        properties.Add (encoderTypeProp);
                        properties.Add (relaxedUrlToFileSystemMappingProp);
                        properties.Add (targetFrameworkProp);
+                       properties.Add (allowDynamicModuleRegistrationProp);
                }
 
                public HttpRuntimeSection()
@@ -349,6 +353,11 @@ namespace System.Web.Configuration
                protected internal override ConfigurationPropertyCollection Properties {
                        get { return properties; }
                }
+               [ConfigurationProperty ("allowDynamicModuleRegistration", DefaultValue = "True")]
+               public bool AllowDynamicModuleRegistration {
+                       get { return (bool) base [allowDynamicModuleRegistrationProp]; }
+                       set { base [allowDynamicModuleRegistrationProp] = value; }
+               }
        }
 }
 
index ebf540bfb924df4dc2192c8277913ed9698f8fe0..4b8a52f036de2deb44f292da94fd47541e04a425 100644 (file)
@@ -104,6 +104,13 @@ namespace System.Web.Hosting {
                        get { return vpath_provider; }
                }
 
+               public static bool InClientBuildManager {
+                       get {
+                               // Mono doesn't have a ClientBuildManager, so we can't be in it. Simple as that.
+                               return false;
+                       }
+               }
+
                public static void DecrementBusyCount ()
                {
                        Interlocked.Decrement (ref busy_count);
index 2a2800483afb18d95988e12e0bf52c75dd0b0380..26291567138f05c41345e27818c65e44ab9acd3e 100644 (file)
@@ -35,7 +35,7 @@ using System.Collections.Generic;
 using System.Configuration;
 using System.IO;
 using System.Text;
-#if NET_4_0 && !MOBILE
+#if !NO_SYSTEM_WEB_DEPENDENCY && NET_4_0 && !MOBILE
 using System.Web.Configuration;
 #endif
 
@@ -163,7 +163,7 @@ namespace System.Web.Util
 
                static HttpEncoder GetCustomEncoderFromConfig ()
                {
-#if MOBILE
+#if MOBILE || NO_SYSTEM_WEB_DEPENDENCY
                        return defaultEncoder.Value;
 #else
                        var cfg = HttpRuntime.Section;
diff --git a/mcs/class/System.Web/System.Web/DynamicModuleManager.cs b/mcs/class/System.Web/System.Web/DynamicModuleManager.cs
new file mode 100644 (file)
index 0000000..99e0a36
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// DynamicModuleManager.cs: Manager for dynamic Http Modules.
+//
+// Author:
+//   Matthias Bogad (bogad@cs.tum.edu)
+//
+// (C) 2015
+//
+
+using System;
+using System.Collections.Generic;
+
+namespace System.Web {
+       sealed class DynamicModuleManager {
+               const string moduleNameFormat = "__Module__{0}_{1}";
+       
+               readonly List<DynamicModuleInfo> entries = new List<DynamicModuleInfo> ();
+               bool entriesAreReadOnly = false;
+               readonly object mutex = new object ();
+               
+               public void Add (Type moduleType) 
+               {
+                       if (moduleType == null)
+                               throw new ArgumentException ("moduleType");
+                       
+                       if (!typeof (IHttpModule).IsAssignableFrom (moduleType))
+                               throw new ArgumentException ("Given object does not implement IHttpModule.", "moduleType");
+                       
+                       lock (mutex) {
+                               if (entriesAreReadOnly)
+                                       throw new InvalidOperationException ("A module was to be added to the dynamic module list, but the list was already initialized. The dynamic module list can only be initialized once.");
+
+                               entries.Add (new DynamicModuleInfo (moduleType,
+                                                       string.Format (moduleNameFormat, moduleType.AssemblyQualifiedName, Guid.NewGuid ())));
+                       }
+               }
+               
+               public ICollection<DynamicModuleInfo> LockAndGetModules ()
+               {
+                       lock (mutex) {
+                               entriesAreReadOnly = true;
+                               return entries;
+                       }
+               }
+       }
+
+       struct DynamicModuleInfo {
+               public readonly string Name;
+               public readonly Type Type;
+
+               public DynamicModuleInfo (Type type, string name)
+               {
+                       Name = name;
+                       Type = type;
+               }
+       }
+}
index 68c098dcc261c264a2237318072781429e24192b..34c2d105769aa4f5623694fd0d1d903d48c81039 100644 (file)
@@ -4,7 +4,8 @@
 // Author:
 //     Miguel de Icaza (miguel@novell.com)
 //     Gonzalo Paniagua (gonzalo@ximian.com)
-//    
+//     Matthias Bogad (bogad@cs.tum.edu)
+//
 //
 // Copyright (C) 2005-2009 Novell, Inc (http://www.novell.com)
 //
 //    Events Disposed
 //
 
+using System;
 using System.IO;
 using System.Collections;
+using System.Collections.Generic;
 using System.ComponentModel;
 using System.Configuration;
 using System.Diagnostics;
@@ -162,6 +165,8 @@ namespace System.Web
                bool removeConfigurationFromCache;
                bool fullInitComplete = false;
                
+               static DynamicModuleManager dynamicModuleManeger = new DynamicModuleManager ();
+
                //
                // These are used to detect the case where the EndXXX method is invoked
                // from within the BeginXXXX delegate, so we detect whether we kick the
@@ -209,6 +214,13 @@ namespace System.Web
                                        if (context == null)
                                                context = HttpContext.Current;
                                        HttpModuleCollection coll = modules.LoadModules (this);
+
+                                       HttpModuleCollection dynMods = CreateDynamicModules ();
+
+                                       for (int i = 0; i < dynMods.Count; i++) {
+                                               coll.AddModule (dynMods.GetKey (i), dynMods.Get (i));
+                                       }
+
                                        Interlocked.CompareExchange (ref modcoll, coll, null);
                                        HttpContext.Current = saved;
 
@@ -404,7 +416,7 @@ namespace System.Web
                
                public void AddOnAcquireRequestStateAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        AcquireRequestState += new EventHandler (invoker.Invoke);
                }
 
@@ -417,7 +429,7 @@ namespace System.Web
                
                public void AddOnAuthenticateRequestAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        AuthenticateRequest += new EventHandler (invoker.Invoke);
                }
 
@@ -430,7 +442,7 @@ namespace System.Web
                
                public void AddOnAuthorizeRequestAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        AuthorizeRequest += new EventHandler (invoker.Invoke);
                }
 
@@ -452,7 +464,7 @@ namespace System.Web
                
                public void AddOnBeginRequestAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        BeginRequest += new EventHandler (invoker.Invoke);
                }
 
@@ -474,7 +486,7 @@ namespace System.Web
                
                public void AddOnEndRequestAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        EndRequest += new EventHandler (invoker.Invoke);
                }
 
@@ -487,7 +499,7 @@ namespace System.Web
                
                public void AddOnPostRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        PostRequestHandlerExecute += new EventHandler (invoker.Invoke);
                }
 
@@ -500,7 +512,7 @@ namespace System.Web
                
                public void AddOnPreRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        PreRequestHandlerExecute += new EventHandler (invoker.Invoke);
                }
 
@@ -513,7 +525,7 @@ namespace System.Web
                
                public void AddOnReleaseRequestStateAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        ReleaseRequestState += new EventHandler (invoker.Invoke);
                }
 
@@ -526,7 +538,7 @@ namespace System.Web
                
                public void AddOnResolveRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        ResolveRequestCache += new EventHandler (invoker.Invoke);
                }
 
@@ -539,7 +551,7 @@ namespace System.Web
                
                public void AddOnUpdateRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this);
                        UpdateRequestCache += new EventHandler (invoker.Invoke);
                }
 
@@ -557,7 +569,7 @@ namespace System.Web
                        
                public void AddOnPostAuthenticateRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        PostAuthenticateRequest += new EventHandler (invoker.Invoke);
                }
 
@@ -575,7 +587,7 @@ namespace System.Web
                
                public void AddOnPostAuthorizeRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        PostAuthorizeRequest += new EventHandler (invoker.Invoke);
                }
                
@@ -593,7 +605,7 @@ namespace System.Web
                
                public void AddOnPostResolveRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        PostResolveRequestCache += new EventHandler (invoker.Invoke);
                }
 
@@ -611,7 +623,7 @@ namespace System.Web
                
                public void AddOnPostMapRequestHandlerAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        PostMapRequestHandler += new EventHandler (invoker.Invoke);
                }
 
@@ -629,7 +641,7 @@ namespace System.Web
                
                public void AddOnPostAcquireRequestStateAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        PostAcquireRequestState += new EventHandler (invoker.Invoke);
                }
 
@@ -647,7 +659,7 @@ namespace System.Web
                
                public void AddOnPostReleaseRequestStateAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        PostReleaseRequestState += new EventHandler (invoker.Invoke);
                }
 
@@ -665,7 +677,7 @@ namespace System.Web
                
                public void AddOnPostUpdateRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        PostUpdateRequestCache += new EventHandler (invoker.Invoke);
                }
 
@@ -674,61 +686,61 @@ namespace System.Web
                //
                public void AddOnAcquireRequestStateAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        AcquireRequestState += new EventHandler (invoker.Invoke);
                }
 
                public void AddOnAuthenticateRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        AuthenticateRequest += new EventHandler (invoker.Invoke);
                }
 
                public void AddOnAuthorizeRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        AuthorizeRequest += new EventHandler (invoker.Invoke);
                }
 
                public void AddOnBeginRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        BeginRequest += new EventHandler (invoker.Invoke);
                }
 
                public void AddOnEndRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        EndRequest += new EventHandler (invoker.Invoke);
                }
                
                public void AddOnPostRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        PostRequestHandlerExecute += new EventHandler (invoker.Invoke);
                }
 
                public void AddOnPreRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        PreRequestHandlerExecute += new EventHandler (invoker.Invoke);
                }
 
                public void AddOnReleaseRequestStateAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        ReleaseRequestState += new EventHandler (invoker.Invoke);
                }
 
                public void AddOnResolveRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        ResolveRequestCache += new EventHandler (invoker.Invoke);
                }
 
                public void AddOnUpdateRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh, object data)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
+                       AsyncInvoker invoker = new AsyncInvoker (bh, eh, this, data);
                        UpdateRequestCache += new EventHandler (invoker.Invoke);
                }
 
@@ -749,7 +761,7 @@ namespace System.Web
                
                public void AddOnLogRequestAsync (BeginEventHandler beginHandler, EndEventHandler endHandler, object state)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (beginHandler, endHandler, state);
+                       AsyncInvoker invoker = new AsyncInvoker (beginHandler, endHandler, this, state);
                        LogRequest += new EventHandler (invoker.Invoke);
                }
 
@@ -767,7 +779,7 @@ namespace System.Web
 
                public void AddOnMapRequestHandlerAsync (BeginEventHandler beginHandler, EndEventHandler endHandler, object state)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (beginHandler, endHandler, state);
+                       AsyncInvoker invoker = new AsyncInvoker (beginHandler, endHandler, this, state);
                        MapRequestHandler += new EventHandler (invoker.Invoke);
                }
 
@@ -785,7 +797,7 @@ namespace System.Web
 
                public void AddOnPostLogRequestAsync (BeginEventHandler beginHandler, EndEventHandler endHandler, object state)
                {
-                       AsyncInvoker invoker = new AsyncInvoker (beginHandler, endHandler, state);
+                       AsyncInvoker invoker = new AsyncInvoker (beginHandler, endHandler, this, state);
                        PostLogRequest += new EventHandler (invoker.Invoke);
                }
                
@@ -871,7 +883,7 @@ namespace System.Web
                //
                // If we catch an error, queue this error
                //
-               void ProcessError (Exception e)
+               internal void ProcessError (Exception e)
                {
                        bool first = context.Error == null;
                        context.AddError (e);
@@ -1643,7 +1655,39 @@ namespace System.Web
                                return true;
                        }
                }
-               
+
+               public static void RegisterModule (Type moduleType) 
+               {
+                       HttpRuntimeSection config = (HttpRuntimeSection)WebConfigurationManager.GetSection ("system.web/httpRuntime");
+
+                       if (!config.AllowDynamicModuleRegistration)
+                               throw new InvalidOperationException ("The Application has requested to register a dynamic Module, but dynamic module registration is disabled in web.config.");
+
+                       dynamicModuleManeger.Add (moduleType);
+               }
+
+
+               HttpModuleCollection CreateDynamicModules () 
+               {
+                       HttpModuleCollection modules = new HttpModuleCollection ();
+
+                       foreach (var module in dynamicModuleManeger.LockAndGetModules ()) {
+                               IHttpModule httpModule = CreateModuleInstance (module.Type);
+                               httpModule.Init (this);
+                               modules.AddModule (module.Name, httpModule);
+                       }
+                       return modules;
+               }
+
+               IHttpModule CreateModuleInstance (Type type)
+               {
+                       return (IHttpModule) Activator.CreateInstance (type,
+                                       BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.CreateInstance,
+                                       null,
+                                       null,
+                                       null);
+               }
+
 #region internals
                internal void ClearError ()
                {
@@ -1891,24 +1935,40 @@ namespace System.Web
                public BeginEventHandler begin;
                public EndEventHandler end;
                public object data;
+               HttpApplication app;
+               AsyncCallback callback;
                
-               public AsyncInvoker (BeginEventHandler bh, EndEventHandler eh, object d)
+               public AsyncInvoker (BeginEventHandler bh, EndEventHandler eh, HttpApplication a, object d)
                {
                        begin = bh;
                        end = eh;
                        data = d;
+                       app = a;
+                       callback = new AsyncCallback (doAsyncCallback);
                }
 
-               public AsyncInvoker (BeginEventHandler bh, EndEventHandler eh)
-               {
-                       begin = bh;
-                       end = eh;
-               }
+               public AsyncInvoker (BeginEventHandler bh, EndEventHandler eh, HttpApplication app) : this(bh, eh, app, null) { }
                
                public void Invoke (object sender, EventArgs e)
                {
-                       throw new Exception ("This is just a dummy");
+                       IAsyncResult res;
+                       res = begin (app, e, callback, data);
+               }
+
+               void doAsyncCallback (IAsyncResult res)
+               {
+                       ThreadPool.QueueUserWorkItem ((object ores) => {
+                               IAsyncResult tres = (IAsyncResult) ores;
+                               try {
+                                       end (tres);
+                               } catch (Exception ee) {
+                                       // I tried using ProcessError(), but we only come here frome an Invokation in PipelineDone().
+                                       // Using ProcessError, I still get a blank screen, this way, we at least log the error to console...
+                                       Console.Error.WriteLine (ee.ToString ());
+                               }
+                       }, res);
                }
        }
 #endregion
 }
+
index 786956ee9da6646d5a3ca849134b09b1a66b9dac..83fe4eb3b7193aab797cf0ca252095ead23716c2 100644 (file)
@@ -511,7 +511,7 @@ namespace System.Web {
                        if (value == null)
                                return null;
 
-#if !MOBILE
+#if !(MOBILE || NO_SYSTEM_WEB_DEPENDENCY)
                        IHtmlString htmlString = value as IHtmlString;
                        if (htmlString != null)
                                return htmlString.ToHtmlString ();
index 8703eb00471f39775bcb5413a53b6d75c187bdd1..b074ec8f0a8cb9c7b928f59b9cddbeeb7c8a5044 100644 (file)
@@ -10,3 +10,4 @@ System.Web/UnvalidatedRequestValuesWrapper.cs
 System.Web/TaskAsyncResult.cs
 System.Web/TaskEventHandler.cs
 System.Web.Security/MembershipPasswordAttribute.cs
+System.Web/DynamicModuleManager.cs
index 1d5298bcd3a26184b2a31c125da98c9c6b790a33..4e1d65c8e8d6808b9fe1832838f05f6c0d4acedc 100644 (file)
@@ -17,7 +17,7 @@ RESOURCE_STRINGS = \
        ../../../external/referencesource/System.Xml/System.Xml.txt \
        ../../../external/referencesource/System.Data.SqlXml/System.Xml.Utils.txt
 
-PROFILE_ANY_MOBILE := $(filter monotouch monotouch_runtime monodroid xammac mobile mobile_static, $(PROFILE))
+PROFILE_ANY_MOBILE := $(filter monotouch monotouch_runtime monotouch_watch monodroid xammac mobile mobile_static, $(PROFILE))
 
 LIB_REFS = System
 LIB_MCS_FLAGS = -r:$(corlib)  -nowarn:219,414,649,1717 -unsafe -d:ASYNC
diff --git a/mcs/class/System.XML/monotouch_watch_System.Xml.dll.sources b/mcs/class/System.XML/monotouch_watch_System.Xml.dll.sources
new file mode 100644 (file)
index 0000000..b663093
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Xml.dll.sources
index 10367320015607cdb8452069ec55294616e27512..54cd8471352f2f1c9ea6a643504f3dabec99775c 100644 (file)
@@ -64,3 +64,7 @@ using System.Runtime.InteropServices;
 #endif
 
 [assembly: ComVisible (false)]
+
+#if !MOBILE
+[assembly: TypeForwardedTo (typeof (System.Windows.Markup.ValueSerializerAttribute))]
+#endif
index 884452d6ed9f9d119d43d71dc9e945486c107e4a..4b87a21275bbb351acb4ee92e3008c6b5e4456a3 100644 (file)
@@ -15,7 +15,7 @@ TEST_EXTRA_DISTFILES = \
        Test/XmlFiles/*.xml \
        Test/XmlFiles/*.xaml
 
-VALID_PROFILE := $(filter 4 monodroid monotouch mobile mobile_static, $(FRAMEWORK_VERSION_MAJOR))
+VALID_PROFILE := $(filter 4 monodroid monotouch monotouch_watch mobile mobile_static, $(FRAMEWORK_VERSION_MAJOR))
 ifndef VALID_PROFILE
 LIBRARY_NAME = dummy-System.Xaml.dll
 NO_INSTALL = yes
index 9e072e80c17f0d0ff93b99151a5156a3c3aa7e67..8136bb048ae3b822acbfbd780cfbbdac9fe724cd 100644 (file)
@@ -25,7 +25,7 @@ TEST_MCS_FLAGS = -r:System.Drawing.dll -r:Mono.Security.dll -r:System.Data -r:Sy
 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX
 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
 TEST_MCS_FLAGS += -r:System.Configuration
-PROFILE_ANY_MOBILE := $(filter monotouch monotouch_runtime monodroid xammac mobile mobile_static, $(PROFILE))
+PROFILE_ANY_MOBILE := $(filter monotouch monotouch_runtime monotouch_watch monodroid xammac mobile mobile_static, $(PROFILE))
 
 RESOURCE_STRINGS = ../../../external/referencesource/System/System.txt
 
@@ -35,6 +35,9 @@ endif
 ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
 LIB_MCS_FLAGS += -d:SECURITY_DEP
 endif
+ifeq (monotouch_watch, $(PROFILE))
+LIB_MCS_FLAGS += -d:SECURITY_DEP
+endif
 ifeq (monodroid, $(PROFILE))
 LIB_MCS_FLAGS += -d:SECURITY_DEP
 endif
index 48662a02e2e22f76cc19c1525cc18476ea81d20f..5c389a0ea7bbf77b007cd2f1ee498a5ac5f02958 100644 (file)
@@ -50,6 +50,7 @@ namespace Mono.CSharp
        {
                static string windowsMcsPath;
                static string windowsMonoPath;
+               static string unixMcsCommand;
 
                Mutex mcsOutMutex;
                StringCollection mcsOutput;
@@ -85,6 +86,13 @@ namespace Mono.CSharp
                                
                                if (!File.Exists (windowsMcsPath))
                                        throw new FileNotFoundException ("Windows mcs path not found: " + windowsMcsPath);
+                       } else {
+                               var mscorlibPath = new Uri (typeof (object).Assembly.CodeBase).LocalPath;
+                               var unixMcsPath = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "mcs"));
+                               if (File.Exists (unixMcsPath))
+                                       unixMcsCommand = unixMcsPath;
+                               else
+                                       unixMcsCommand = "mcs";
                        }
                }
 
@@ -173,7 +181,7 @@ namespace Mono.CSharp
                                mcs.StartInfo.Arguments = "\"" + windowsMcsPath + "\" " +
                                        BuildArgs (options, fileNames, ProviderOptions);
                        } else {
-                               mcs.StartInfo.FileName="mcs";
+                               mcs.StartInfo.FileName=unixMcsCommand;
                                mcs.StartInfo.Arguments=BuildArgs(options, fileNames, ProviderOptions);
                        }
 
index 0b278a99fef10d8285349ad83953352bec52742a..bdb08db595adb849f3cea1b849b7b8a12fb9917a 100644 (file)
@@ -50,6 +50,7 @@ namespace Microsoft.VisualBasic
        {
                static string windowsMonoPath;
                static string windowsvbncPath;
+               static string unixVbncCommand;
 
                static VBCodeCompiler ()
                {
@@ -69,6 +70,13 @@ namespace Microsoft.VisualBasic
                                                "bin\\mono.exe");
                                windowsvbncPath =
                                        Path.Combine (p, "2.0\\vbnc.exe");
+                       } else {
+                               var mscorlibPath = new Uri (typeof (object).Assembly.CodeBase).LocalPath;
+                               var unixMcsPath = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "vbnc"));
+                               if (File.Exists (unixMcsPath))
+                                       unixVbncCommand = unixMcsPath;
+                               else
+                                       unixVbncCommand = "vbnc";
                        }
                }
 
index 5d82088e5309b94a3b8b47475bdf458950a47608..58f07d40c8aa50707a5e4dea7b001a45459b57d7 100644 (file)
     <Compile Include="ReferenceSources\AssertWrapper.cs" />\r
     <Compile Include="ReferenceSources\BinaryCompatibility.cs" />\r
     <Compile Include="ReferenceSources\ConfigurationManagerInternalFactory.cs" />\r
+    <Compile Include="ReferenceSources\HttpSysSettings.cs" />\r
     <Compile Include="ReferenceSources\Logging.cs" />\r
     <Compile Include="ReferenceSources\NativeMethods.cs" />\r
     <Compile Include="ReferenceSources\SettingsSectionInternal.cs" />\r
index 10451c474152c1db2e91542b434eb0fb8bcea71f..731ae63b8793f031d1da059761fc3238c3632e9d 100644 (file)
     <Compile Include="ReferenceSources\AssertWrapper.cs" />\r
     <Compile Include="ReferenceSources\BinaryCompatibility.cs" />\r
     <Compile Include="ReferenceSources\ConfigurationManagerInternalFactory.cs" />\r
+    <Compile Include="ReferenceSources\HttpSysSettings.cs" />\r
     <Compile Include="ReferenceSources\Logging.cs" />\r
     <Compile Include="ReferenceSources\NativeMethods.cs" />\r
     <Compile Include="ReferenceSources\SettingsSectionInternal.cs" />\r
index d4c8d3e15237ea4b7d2103ad5b1f738b59c7e77c..c17518029fbb9eca45498ab8daa61e06206f8562 100644 (file)
     <Compile Include="ReferenceSources\AssertWrapper.cs" />\r
     <Compile Include="ReferenceSources\BinaryCompatibility.cs" />\r
     <Compile Include="ReferenceSources\ConfigurationManagerInternalFactory.cs" />\r
+    <Compile Include="ReferenceSources\HttpSysSettings.cs" />\r
     <Compile Include="ReferenceSources\Logging.cs" />\r
     <Compile Include="ReferenceSources\NativeMethods.cs" />\r
     <Compile Include="ReferenceSources\SettingsSectionInternal.cs" />\r
index 73a01bf9ff6ed4195a9938a57bd2cbfce0bf8182..0cf6cff891d36bad75c076a0c141069a3e96a721 100644 (file)
@@ -616,7 +616,8 @@ namespace System.Diagnostics {
                }
 
                private StreamReader error_stream=null;
-               
+               bool error_stream_exposed;
+
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden), Browsable (false)]
                [MonitoringDescription ("The standard error stream of this process.")]
                public StreamReader StandardError {
@@ -629,11 +630,13 @@ namespace System.Diagnostics {
 
                                async_mode |= AsyncModes.SyncError;
 
+                               error_stream_exposed = true;
                                return(error_stream);
                        }
                }
 
                private StreamWriter input_stream=null;
+               bool input_stream_exposed;
                
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden), Browsable (false)]
                [MonitoringDescription ("The standard input stream of this process.")]
@@ -642,11 +645,13 @@ namespace System.Diagnostics {
                                if (input_stream == null)
                                        throw new InvalidOperationException("Standard input has not been redirected");
 
+                               input_stream_exposed = true;
                                return(input_stream);
                        }
                }
 
                private StreamReader output_stream=null;
+               bool output_stream_exposed;
                
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden), Browsable (false)]
                [MonitoringDescription ("The standard output stream of this process.")]
@@ -660,6 +665,7 @@ namespace System.Diagnostics {
 
                                async_mode |= AsyncModes.SyncOutput;
 
+                               output_stream_exposed = true;
                                return(output_stream);
                        }
                }
@@ -1604,17 +1610,18 @@ namespace System.Diagnostics {
                                                        async_error.Close ();
 
                                                if (input_stream != null) {
-                                                       input_stream.Close();
+                                                       if (!input_stream_exposed)
+                                                               input_stream.Close ();
                                                        input_stream = null;
                                                }
-
                                                if (output_stream != null) {
-                                                       output_stream.Close();
+                                                       if (!output_stream_exposed)
+                                                               output_stream.Close ();
                                                        output_stream = null;
                                                }
-
                                                if (error_stream != null) {
-                                                       error_stream.Close();
+                                                       if (!error_stream_exposed)
+                                                               error_stream.Close ();
                                                        error_stream = null;
                                                }
                                        }
index ae17c5e03432e4defd25246eba8c8296a88c0281..3b06a4e79da6baccdc69864570818889f784868a 100644 (file)
@@ -404,13 +404,15 @@ namespace System.Net.NetworkInformation {
                void OnAvailabilityChanged (object unused)
                {
                        NetworkAvailabilityChangedEventHandler d = AvailabilityChanged;
-                       d (null, new NetworkAvailabilityEventArgs (GetAvailability ()));
+                       if (d != null)
+                               d (null, new NetworkAvailabilityEventArgs (GetAvailability ()));
                }
 
                void OnAddressChanged (object unused)
                {
                        NetworkAddressChangedEventHandler d = AddressChanged;
-                       d (null, EventArgs.Empty);
+                       if (d != null)
+                               d (null, EventArgs.Empty);
                }
 
                void OnEventDue (object unused)
index f25525711d6450919e8323f98ea7a43af080c187..62748e573f693e4a8344a822c9eec687f543b2fe 100644 (file)
@@ -70,6 +70,11 @@ namespace System.Net.NetworkInformation {
                        }
                }
 
+               public static IPAddress GetNetMask (IPAddress address)
+               {
+                       return nif.GetNetMask (address);
+               }
+
                public abstract IPInterfaceProperties GetIPProperties ();
                public abstract IPv4InterfaceStatistics GetIPv4Statistics ();
                public abstract PhysicalAddress GetPhysicalAddress ();
@@ -101,12 +106,12 @@ namespace System.Net.NetworkInformation {
 
                class MacOsNetworkInterfaceAPI : UnixNetworkInterfaceAPI
                {
+                       const int AF_INET  = 2;
+                       const int AF_INET6 = 30;
+                       const int AF_LINK  = 18;
+
                        public override NetworkInterface [] GetAllNetworkInterfaces ()
                        {
-                               const int AF_INET  = 2;
-                               const int AF_INET6 = 30;
-                               const int AF_LINK  = 18;
-
                                var interfaces = new Dictionary <string, MacOsNetworkInterface> ();
                                IntPtr ifap;
                                if (getifaddrs (out ifap) != 0)
@@ -210,6 +215,37 @@ namespace System.Net.NetworkInformation {
                        {
                                return if_nametoindex ("lo0");
                        }
+
+                       public override IPAddress GetNetMask (IPAddress address)
+                       {
+                               IntPtr ifap;
+                               if (getifaddrs (out ifap) != 0)
+                                       throw new SystemException ("getifaddrs() failed");
+
+                               try {
+                                       IntPtr next = ifap;
+                                       while (next != IntPtr.Zero) {
+                                               MacOsStructs.ifaddrs addr = (MacOsStructs.ifaddrs) Marshal.PtrToStructure (next, typeof (MacOsStructs.ifaddrs));
+
+                                               if (addr.ifa_addr != IntPtr.Zero) {
+                                                       // optain IPAddress
+                                                       MacOsStructs.sockaddr sockaddr = (MacOsStructs.sockaddr) Marshal.PtrToStructure (addr.ifa_addr, typeof (MacOsStructs.sockaddr));
+
+                                                       if (sockaddr.sa_family == AF_INET) {
+                                                               MacOsStructs.sockaddr_in sockaddrin = (MacOsStructs.sockaddr_in) Marshal.PtrToStructure (addr.ifa_addr, typeof (MacOsStructs.sockaddr_in));
+                                                               var saddress = new IPAddress (sockaddrin.sin_addr);
+                                                               if (address.Equals (saddress))
+                                                                       return new IPAddress(((sockaddr_in)Marshal.PtrToStructure(addr.ifa_netmask, typeof(sockaddr_in))).sin_addr);
+                                                       }
+                                               }
+                                               next = addr.ifa_next;
+                                       }
+                               } finally {
+                                       freeifaddrs (ifap);
+                               }
+
+                               return null;
+                       }
                }
 
                class LinuxNetworkInterfaceAPI : UnixNetworkInterfaceAPI
@@ -367,6 +403,11 @@ namespace System.Net.NetworkInformation {
                        {
                                return if_nametoindex ("lo");
                        }
+
+                       public override IPAddress GetNetMask (IPAddress address)
+                       {
+                               throw new NotImplementedException ();
+                       }
                }
 
                class Win32NetworkInterfaceAPI : NetworkInterfaceFactory
@@ -410,10 +451,16 @@ namespace System.Net.NetworkInformation {
                        {
                                throw new NotImplementedException ();
                        }
+
+                       public override IPAddress GetNetMask (IPAddress address)
+                       {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public abstract NetworkInterface [] GetAllNetworkInterfaces ();
                public abstract int GetLoopbackInterfaceIndex ();
+               public abstract IPAddress GetNetMask (IPAddress address);
 
                public static NetworkInterfaceFactory Create ()
                {
index 571bbad7f178b98cb55746f1b72634adc1510d47..e8c254a2a378e1ce0d9b33a1637cda3ff8d2764a 100644 (file)
 //
 using System;
 using System.Runtime.InteropServices;
+using System.Net.Sockets;
 
 namespace System.Net.NetworkInformation {
-       public abstract class UnicastIPAddressInformation : IPAddressInformation {
-               protected UnicastIPAddressInformation ()
-               {
-               }
-               
-               public abstract long AddressPreferredLifetime { get; }
-               public abstract long AddressValidLifetime { get; }
-               public abstract long DhcpLeaseLifetime { get; }
-               public abstract DuplicateAddressDetectionState DuplicateAddressDetectionState { get; }
-               public abstract IPAddress IPv4Mask { get; }
-               public abstract PrefixOrigin PrefixOrigin { get; }
-               public abstract SuffixOrigin SuffixOrigin { get; }
-       }
-
        class Win32UnicastIPAddressInformation : UnicastIPAddressInformation 
        {
                int if_index;
@@ -122,6 +109,7 @@ namespace System.Net.NetworkInformation {
        class LinuxUnicastIPAddressInformation : UnicastIPAddressInformation
        {
                IPAddress address;
+               IPAddress ipv4Mask;
 
                public LinuxUnicastIPAddressInformation (IPAddress address)
                {
@@ -163,7 +151,16 @@ namespace System.Net.NetworkInformation {
                }
 
                public override IPAddress IPv4Mask {
-                       get { throw new NotImplementedException (); }
+                       get {
+                               // The IPv6 equivilant (for .net compatibility)
+                               if (Address.AddressFamily != AddressFamily.InterNetwork)
+                                       return IPAddress.Any;
+
+                               if (ipv4Mask == null)
+                                       ipv4Mask = NetworkInterface.GetNetMask (address);
+
+                               return ipv4Mask;
+                       }
                }
 
                public override PrefixOrigin PrefixOrigin {
index 7ccbcc2f34e104f80fadfedc6a3dbe262d13e073..b9cc121d03c7f6dc1455782f6dbf692a96539330 100644 (file)
@@ -110,6 +110,9 @@ namespace System.Net
                AuthorizationState auth_state, proxy_auth_state;
                string host;
 
+               [NonSerialized]
+               internal Action<Stream> ResendContentFactory;
+
                // Constructors
                static HttpWebRequest ()
                {
@@ -226,9 +229,15 @@ namespace System.Net
                
                internal bool InternalAllowBuffering {
                        get {
-                               return (allowBuffering && (method != "HEAD" && method != "GET" &&
-                                                       method != "MKCOL" && method != "CONNECT" &&
-                                                       method != "TRACE"));
+                               return allowBuffering && MethodWithBuffer;
+                       }
+               }
+
+               bool MethodWithBuffer {
+                       get {
+                               return method != "HEAD" && method != "GET" &&
+                               method != "MKCOL" && method != "CONNECT" &&
+                               method != "TRACE";
                        }
                }
                
@@ -1101,7 +1110,7 @@ namespace System.Net
                        if (e != null)
                                throw e;
 
-                       if (AllowWriteStreamBuffering)
+                       if (AllowWriteStreamBuffering || method == "GET")
                                contentLength = -1;
 
                        uriString = webResponse.Headers ["Location"];
@@ -1306,8 +1315,7 @@ namespace System.Net
                                                bodyBuffer = null;
                                                writeStream.Close ();
                                        }
-                               } else if (method != "HEAD" && method != "GET" && method != "MKCOL" && method != "CONNECT" &&
-                                         method != "TRACE") {
+                               } else if (MethodWithBuffer) {
                                        if (getResponseCalled && !writeStream.RequestWritten)
                                                return writeStream.WriteRequestAsync (result);
                                }
@@ -1606,12 +1614,28 @@ namespace System.Net
                                        (ProxyQuery && !proxy_auth_state.IsCompleted && code == HttpStatusCode.ProxyAuthenticationRequired)) {
                                        if (!usedPreAuth && CheckAuthorization (webResponse, code)) {
                                                // Keep the written body, so it can be rewritten in the retry
-                                               if (InternalAllowBuffering) {
-                                                       if (writeStream.WriteBufferLength > 0) {
-                                                               bodyBuffer = writeStream.WriteBuffer;
-                                                               bodyBufferLength = writeStream.WriteBufferLength;
+                                               if (MethodWithBuffer) {
+                                                       if (AllowWriteStreamBuffering) {
+                                                               if (writeStream.WriteBufferLength > 0) {
+                                                                       bodyBuffer = writeStream.WriteBuffer;
+                                                                       bodyBufferLength = writeStream.WriteBufferLength;
+                                                               }
+
+                                                               return true;
+                                                       }
+
+                                                       //
+                                                       // Buffering is not allowed but we have alternative way to get same content (we
+                                                       // need to resent it due to NTLM Authentication).
+                                                       //
+                                                       if (ResendContentFactory != null) {
+                                                               using (var ms = new MemoryStream ()) {
+                                                                       ResendContentFactory (ms);
+                                                                       bodyBuffer = ms.ToArray ();
+                                                                       bodyBufferLength = bodyBuffer.Length;
+                                                               }
+                                                               return true;
                                                        }
-                                                       return true;
                                                } else if (method != "PUT" && method != "POST") {
                                                        bodyBuffer = null;
                                                        return true;
index 52a88f7e2df45aff89a7cd1a20255e52c1a44ca8..fcee594ebcf50331e59976fa1645c32d1ca9c602 100644 (file)
@@ -1067,6 +1067,8 @@ namespace System.Net
 
                        Stream s = null;
                        lock (this) {
+                               if (status == WebExceptionStatus.RequestCanceled)
+                                       return true;
                                if (Data.request != request)
                                        throw new ObjectDisposedException (typeof (NetworkStream).FullName);
                                if (nstream == null)
index 046d0a475446c9ce9dab0ddcbefde09b9e3727a8..92d03b6397e4c7aea64ca7102f5f0fdf05bb4139 100644 (file)
@@ -1008,6 +1008,8 @@ ReferenceSources/Win32Exception.cs
 ../../../external/referencesource/System/net/System/Net/WebPermission.cs
 ../../../external/referencesource/System/net/System/Net/WriteStreamClosedEventArgs.cs
 
+../../../external/referencesource/System/net/System/Net/NetworkInformation/UnicastIPAddressInformation.cs
+
 ../../../external/referencesource/System/sys/system/runtime/versioning/FrameworkName.cs
 
 ../../../external/referencesource/System/sys/system/threading/Barrier.cs
index f7d6843d2b5dbecd5f4cfba9c6ea3b54f98fd88a..b8fde520c9270b1ccff1d0adcaed5a39865f92e3 100644 (file)
@@ -909,5 +909,55 @@ namespace MonoTests.System.Diagnostics
                public void HasExitedCurrent () {
                        Assert.IsFalse (Process.GetCurrentProcess ().HasExited);
                }
+
+               [Test]
+               [NUnit.Framework.Category ("MobileNotWorking")]
+               public void DisposeWithDisposedStreams ()
+               {
+                       var psi = GetCrossPlatformStartInfo ();
+                       psi.RedirectStandardInput = true;
+                       psi.RedirectStandardOutput = true;
+                       psi.UseShellExecute = false;
+
+                       var p = Process.Start (psi);
+                       p.StandardInput.BaseStream.Dispose ();
+                       p.StandardOutput.BaseStream.Dispose ();
+                       p.Dispose ();
+               }
+
+               [Test]
+               public void Modules () {
+                       var modules = Process.GetCurrentProcess ().Modules;
+                       foreach (var a in AppDomain.CurrentDomain.GetAssemblies ()) {
+                               var found = false;
+                               var name = a.GetName ();
+
+                               StringBuilder sb = new StringBuilder ();
+                               sb.AppendFormat ("Could not found: {0} {1}\n", name.Name, name.Version);
+                               sb.AppendLine ("Looked in assemblies:");
+
+                               foreach (var o in modules) {
+                                       var m = (ProcessModule) o;
+
+                                       sb.AppendFormat ("   {0} {1}.{2}.{3}\n", m.FileName.ToString (),
+                                                       m.FileVersionInfo.FileMajorPart,
+                                                       m.FileVersionInfo.FileMinorPart,
+                                                       m.FileVersionInfo.FileBuildPart);
+
+                                       if (!m.FileName.StartsWith ("[In Memory] " + name.Name))
+                                               continue;
+
+                                       var fv = m.FileVersionInfo;
+                                       if (fv.FileBuildPart != name.Version.Build ||
+                                               fv.FileMinorPart != name.Version.Minor ||
+                                               fv.FileMajorPart != name.Version.Major)
+                                               continue;
+
+                                       found = true;
+                               }
+
+                               Assert.IsTrue (found, sb.ToString ());
+                       }
+               }
        }
 }
index 326ff298024580ff7205d0cafe3cd61ce9165310..a0a649376af9d09aab8c24be09f7f422d69c1a08 100644 (file)
@@ -29,6 +29,8 @@ using Mono.Security.Authenticode;
 using Mono.Security.Protocol.Tls;
 #endif
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.Net
 {
        [TestFixture]
@@ -93,7 +95,7 @@ namespace MonoTests.System.Net
                [Test] // bug #471782
                public void CloseRequestStreamAfterReadingResponse ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9152);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -241,7 +243,7 @@ namespace MonoTests.System.Net
                        methods.Add ("whatever", "whatever");
                        methods.Add ("PUT", "PUT");
 
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9153);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        foreach (DictionaryEntry de in methods) {
@@ -271,7 +273,7 @@ namespace MonoTests.System.Net
                [Test]
                public void BeginGetRequestStream_Body_NotAllowed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9154);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -310,7 +312,7 @@ namespace MonoTests.System.Net
                [Test] // bug #465613
                public void BeginGetRequestStream_NoBuffering ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 11001);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -366,7 +368,7 @@ namespace MonoTests.System.Net
                [Category ("NotWorking")] // #5842
                public void BeginGetResponse ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8001);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -463,7 +465,7 @@ namespace MonoTests.System.Net
                [Test] // bug #511851
                public void BeginGetRequestStream_Request_Aborted ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8002);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -490,7 +492,7 @@ namespace MonoTests.System.Net
                [Test] // bug #511851
                public void BeginGetResponse_Request_Aborted ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9155);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -517,7 +519,7 @@ namespace MonoTests.System.Net
                [Test]
                public void EndGetRequestStream_AsyncResult_Null ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9156);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -545,7 +547,7 @@ namespace MonoTests.System.Net
                [Category ("NotWorking")] // do not get consistent result on MS
                public void EndGetRequestStream_Request_Aborted ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8003);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -575,7 +577,7 @@ namespace MonoTests.System.Net
                [Category ("NotWorking")]
                public void EndGetResponse_AsyncResult_Invalid ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9157);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -601,7 +603,7 @@ namespace MonoTests.System.Net
                [Test]
                public void EndGetResponse_AsyncResult_Null ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9158);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -634,7 +636,7 @@ namespace MonoTests.System.Net
                [Test] // bug #429200
                public void GetRequestStream ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 10000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -658,7 +660,7 @@ namespace MonoTests.System.Net
                [Test] // bug #511851
                public void GetRequestStream_Request_Aborted ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 10001);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -686,7 +688,7 @@ namespace MonoTests.System.Net
                [Category ("NotWorking")] // #5842
                public void GetRequestStream_Close_NotAllBytesWritten ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 10002);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -754,7 +756,7 @@ namespace MonoTests.System.Net
                [Category ("NotWorking")] // #5842
                public void GetRequestStream_Write_Overflow ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8010);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        // buffered, non-chunked
@@ -965,7 +967,7 @@ namespace MonoTests.System.Net
                [Test] // bug #511851
                public void GetResponse_Request_Aborted ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 10100);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
@@ -1320,7 +1322,7 @@ namespace MonoTests.System.Net
                [Test] // bug #513087
                public void NonStandardVerb ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8123);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/moved/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (VerbEchoHandler))) {
@@ -1355,7 +1357,7 @@ namespace MonoTests.System.Net
                [Category ("NotWorking")] // Assert #2 fails
                public void NotModifiedSince ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9123);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (NotModifiedSinceHandler))) {
@@ -2301,7 +2303,7 @@ namespace MonoTests.System.Net
 
                void DoRequest (Action<HttpWebRequest, EventWaitHandle> request)
                {
-                       int port = 30158;
+                       int port = NetworkHelpers.FindFreePort ();
 
                        ManualResetEvent completed = new ManualResetEvent (false);
                        Uri address = new Uri (string.Format ("http://localhost:{0}", port));
@@ -2315,7 +2317,7 @@ namespace MonoTests.System.Net
 
                void DoRequest (Action<HttpWebRequest, EventWaitHandle> request, Action<HttpListenerContext> processor)
                {
-                       int port = 30158;
+                       int port = NetworkHelpers.FindFreePort ();
 
                        ManualResetEvent [] completed = new ManualResetEvent [2];
                        completed [0] = new ManualResetEvent (false);
@@ -2697,7 +2699,7 @@ namespace MonoTests.System.Net
                [Test]
                public void CookieContainerTest ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 11002);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString ();
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (CookieRequestHandler))) {
@@ -2785,7 +2787,7 @@ namespace MonoTests.System.Net
                [Test]
                public void BeginRead ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9124);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -2814,7 +2816,7 @@ namespace MonoTests.System.Net
                [Test]
                public void BeginWrite_Request_Aborted ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9125);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -2843,7 +2845,7 @@ namespace MonoTests.System.Net
                [Test]
                public void CanRead ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9126);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -2867,7 +2869,7 @@ namespace MonoTests.System.Net
                [Test]
                public void CanSeek ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9127);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -2891,7 +2893,7 @@ namespace MonoTests.System.Net
                [Test] // bug #324182
                public void CanTimeout ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9128);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -2915,7 +2917,7 @@ namespace MonoTests.System.Net
                [Test]
                public void CanWrite ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9129);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -2939,7 +2941,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Read ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9130);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -2968,7 +2970,7 @@ namespace MonoTests.System.Net
                [Test]
                public void ReadByte ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9140);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -2996,7 +2998,7 @@ namespace MonoTests.System.Net
                [Test]
                public void ReadTimeout ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9141);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3020,7 +3022,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Seek ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9142);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3048,7 +3050,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Write_Buffer_Null ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9143);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3076,7 +3078,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Write_Count_Negative ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9144);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3106,7 +3108,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Write_Count_Overflow ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9145);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3136,7 +3138,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Write_Offset_Negative ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9146);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3166,7 +3168,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Write_Offset_Overflow ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9147);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3196,7 +3198,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Write_Request_Aborted ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9148);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3226,7 +3228,7 @@ namespace MonoTests.System.Net
                [Category ("NotWorking")]
                public void Write_Stream_Closed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9149);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3255,7 +3257,7 @@ namespace MonoTests.System.Net
                [Test]
                public void WriteByte_Request_Aborted ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9150);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
@@ -3284,7 +3286,7 @@ namespace MonoTests.System.Net
                [Test]
                public void WriteTimeout ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9151);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebRequestTest.EchoRequestHandler))) {
index c62c888f24bd17afd2c5c70124789fb17bd7f812..b76bd8b9a540c78d07220da3c91f55ec72c3bd2c 100644 (file)
@@ -14,6 +14,8 @@ using System.Net;
 using System.Net.Sockets;
 using System.Text;
 
+using MonoTests.Helpers;
+
 using NUnit.Framework;
 
 namespace MonoTests.System.Net
@@ -24,7 +26,7 @@ namespace MonoTests.System.Net
                [Test]
                public void CharacterSet_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -54,7 +56,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Close_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -75,7 +77,7 @@ namespace MonoTests.System.Net
                [Test]
                public void ContentEncoding_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -105,7 +107,7 @@ namespace MonoTests.System.Net
                [Test]
                public void ContentLength_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -127,7 +129,7 @@ namespace MonoTests.System.Net
                [Test]
                public void ContentType_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -157,7 +159,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Cookies_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -197,7 +199,7 @@ namespace MonoTests.System.Net
                [Test]
                public void GetResponseHeader_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -227,7 +229,7 @@ namespace MonoTests.System.Net
                [Test]
                public void GetResponseStream_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -257,7 +259,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Headers_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -286,7 +288,7 @@ namespace MonoTests.System.Net
                [Test]
                public void LastModified_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -316,7 +318,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Method_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -346,7 +348,7 @@ namespace MonoTests.System.Net
                [Test]
                public void ProtocolVersion_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -376,7 +378,7 @@ namespace MonoTests.System.Net
                [Test]
                public void ResponseUri_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -406,7 +408,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Server_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -436,7 +438,7 @@ namespace MonoTests.System.Net
                [Test]
                public void StatusCode_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -458,7 +460,7 @@ namespace MonoTests.System.Net
                [Test]
                public void StatusDescription_Disposed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (FullResponseHandler))) {
@@ -511,7 +513,7 @@ namespace MonoTests.System.Net
                [Test]
                public void BeginRead_Buffer_Null ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -562,7 +564,7 @@ namespace MonoTests.System.Net
                [Test]
                public void BeginWrite ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -597,7 +599,7 @@ namespace MonoTests.System.Net
                [Category ("NotWorking")]
                public void CanRead ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -626,7 +628,7 @@ namespace MonoTests.System.Net
                [Test]
                public void CanSeek ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -655,7 +657,7 @@ namespace MonoTests.System.Net
                [Test] // bug #324182
                public void CanTimeout ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -684,7 +686,7 @@ namespace MonoTests.System.Net
                [Test]
                public void CanWrite ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -713,7 +715,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Read ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -752,7 +754,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Read_Buffer_Null ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -803,7 +805,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Read_Count_Negative ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -855,7 +857,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Read_Count_Overflow ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -907,7 +909,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Read_Offset_Negative ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -959,7 +961,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Read_Offset_Overflow ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -1012,7 +1014,7 @@ namespace MonoTests.System.Net
                [Category ("NotWorking")]
                public void Read_Stream_Closed ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -1077,7 +1079,7 @@ namespace MonoTests.System.Net
                [Test]
                public void ReadTimeout ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -1106,7 +1108,7 @@ namespace MonoTests.System.Net
                [Test]
                public void Write ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
@@ -1140,7 +1142,7 @@ namespace MonoTests.System.Net
                [Test]
                public void WriteTimeout ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
                        string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (HttpWebResponseTest.FullResponseHandler))) {
index f3105b0ca162ce4d9beb3dd23b4811f92dcc8dae..133d293271e74d8da5d4c3f1ed28e8030bd78f8c 100644 (file)
@@ -16,6 +16,8 @@ using System.Text;
 using System.Threading;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.Net
 {
        [TestFixture]
@@ -1417,8 +1419,8 @@ namespace MonoTests.System.Net
                [Test]
                public void UploadValues1 ()
                {
-                       IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
-                       string url = "http://" + IPAddress.Loopback.ToString () + ":8000/test/";
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
+                       string url = "http://" + ep.ToString () + "/test/";
 
                        using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
                                responder.Start ();
@@ -1783,7 +1785,7 @@ namespace MonoTests.System.Net
                [Test]
                public void UploadStringAsyncCancelEvent ()
                {
-                       UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
+                       UploadAsyncCancelEventTest (9301, (webClient, uri, cancelEvent) =>
                        {
 
                                webClient.UploadStringCompleted += (sender, args) =>
@@ -1799,7 +1801,7 @@ namespace MonoTests.System.Net
                [Test]
                public void UploadDataAsyncCancelEvent ()
                {
-                       UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
+                       UploadAsyncCancelEventTest (9302, (webClient, uri, cancelEvent) =>
                        {
                                webClient.UploadDataCompleted += (sender, args) =>
                                {
@@ -1814,7 +1816,7 @@ namespace MonoTests.System.Net
                [Test]
                public void UploadValuesAsyncCancelEvent ()
                {
-                       UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
+                       UploadAsyncCancelEventTest (9303, (webClient, uri, cancelEvent) =>
                        {
                                webClient.UploadValuesCompleted += (sender, args) =>
                                {
@@ -1829,7 +1831,7 @@ namespace MonoTests.System.Net
                [Test]
                public void UploadFileAsyncCancelEvent ()
                {
-                       UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
+                       UploadAsyncCancelEventTest (9304,(webClient, uri, cancelEvent) =>
                        {
                                string tempFile = Path.Combine (_tempFolder, "upload.tmp");
                                File.Create (tempFile).Close ();
@@ -1868,10 +1870,10 @@ namespace MonoTests.System.Net
 #endif
 
 #if NET_4_0
-               public void UploadAsyncCancelEventTest (Action<WebClient, Uri, EventWaitHandle> uploadAction)
+               public void UploadAsyncCancelEventTest (int port, Action<WebClient, Uri, EventWaitHandle> uploadAction)
                {
-                       var ep = new IPEndPoint (IPAddress.Loopback, 8000);
-                       string url = "http://" + IPAddress.Loopback + ":8000/test/";
+                       var ep = NetworkHelpers.LocalEphemeralEndPoint ();
+                       string url = "http://" + ep.ToString() + "/test/";
 
                        using (var responder = new SocketResponder (ep, EchoRequestHandler))
                        {
index c4e3e4a1ad424e6daf365c25f68b717b0b17af3a..072decc6f82e1af486a258469c9aef874474e22d 100644 (file)
@@ -725,6 +725,7 @@ ReferenceSources/Win32Exception.cs
 ../../../external/referencesource/System/net/System/Net/WebPermission.cs
 ../../../external/referencesource/System/net/System/Net/WriteStreamClosedEventArgs.cs
 
+../../../external/referencesource/System/net/System/Net/NetworkInformation/UnicastIPAddressInformation.cs
 ../../../external/referencesource/System/sys/system/threading/Barrier.cs
 
 ../../../external/referencesource/System/security/system/security/permissions/typedescriptorpermission.cs
diff --git a/mcs/class/System/monotouch_watch_System.dll.sources b/mcs/class/System/monotouch_watch_System.dll.sources
new file mode 100644 (file)
index 0000000..7c0bd59
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_System.dll.sources
index 35f3685cc0aa52c0fb7d8fd87f81ef70b0550ffd..02780da33bf225a57be55861d62188518273f79b 100644 (file)
@@ -38,9 +38,6 @@ using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using System.Windows.Markup;
 
-// General Information about the WindowsBase assembly
-// v3.0 Assembly
-
 [assembly: AssemblyCompany (Consts.MonoCompany)]
 [assembly: AssemblyProduct (Consts.MonoProduct)]
 [assembly: AssemblyCopyright (Consts.MonoCopyright)]
@@ -78,3 +75,8 @@ using System.Windows.Markup;
 [assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Input")]
 [assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows")]
 [assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Diagnostics")]
+
+#if !MOBILE
+[assembly: TypeForwardedTo (typeof (ValueSerializerAttribute))]
+#endif
+
index 47e277bdbfb05bbd356e31e95698256b54e15ca6..3b3c3dc5d87dcf92a442a238a6dd325c1de151fe 100644 (file)
@@ -68,8 +68,7 @@ namespace zipsharp
                public static long CurrentFileLength (UnzipHandle handle)
                {
                        UnzipFileInfo info;
-                       StringBuilder sbName = new StringBuilder (128);
-                       int result = unzGetCurrentFileInfo (handle, out info, sbName, new IntPtr (sbName.Capacity), IntPtr.Zero, IntPtr.Zero, null,  IntPtr.Zero);
+                       int result = unzGetCurrentFileInfo (handle, out info, null, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, null,  IntPtr.Zero);
                        
                        if (result != 0)
                                return -1;
@@ -80,8 +79,13 @@ namespace zipsharp
                static string GetCurrentFileName (UnzipHandle handle)
                {
                        UnzipFileInfo info;
-                       StringBuilder sbName = new StringBuilder (128);
-                       int result = unzGetCurrentFileInfo (handle, out info, sbName, new IntPtr (sbName.Capacity), IntPtr.Zero, new IntPtr (0), null,  IntPtr.Zero);
+                       int result = unzGetCurrentFileInfo (handle, out info, null, IntPtr.Zero, IntPtr.Zero, new IntPtr (0), null,  IntPtr.Zero);
+
+                       if (result != 0)
+                               return null;
+                       
+                       StringBuilder sbName = new StringBuilder ((int)info.SizeFilename+1); // +1 to account for extra \0 at the end
+                       result = unzGetCurrentFileInfo (handle, out info, sbName, new IntPtr (sbName.Capacity), IntPtr.Zero, new IntPtr (0), null,  IntPtr.Zero);
                        
                        if (result != 0)
                                return null;
index 40586b76082002f02d8b54952681a89c926b30ae..ddd9cb43a3158f25dcfc7bd46ceb3aac9bffff53 100644 (file)
@@ -37,7 +37,7 @@ RESOURCE_FILES = \
 
 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT
 
-MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
+MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime monotouch_watch, $(PROFILE))
 
 ifndef MOBILE_STATIC
 REFERENCE_SOURCES_FLAGS += -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY
index b806082b188853ad5e30e10dfbde8b3e9a9c01e3..c3fb0d2ccb73e953e46c11ecd0b86c286e13131c 100644 (file)
@@ -411,10 +411,7 @@ namespace System.Globalization
                public override bool Equals (object value)
                {
                        CultureInfo b = value as CultureInfo;
-                       
-                       if (b != null)
-                               return b.cultureID == cultureID;
-                       return false;
+                       return b != null && b.cultureID == cultureID && b.m_name == m_name;
                }
 
                public static CultureInfo[] GetCultures(CultureTypes types)
index 4f52d1a49e29c505b0e8b93cd70fe7ac9e2fd74b..3507b2d46371500d8667a0920af9069da2ae9340 100644 (file)
@@ -231,7 +231,9 @@ namespace System.Runtime.CompilerServices
                                {
                                        for (int i = 0; i < data.Length; ++i)
                                        {
-                                               list.Add ((TKey) data [i].key);
+                                               TKey key = (TKey) data [i].key;
+                                               if (key != null)
+                                                       list.Add (key);
                                        }
                                }
                                return list;
index 780cb9a140db65a2fb62789214ea5229874e8aaf..9efb484e3d85b6ec614f57c271d15f35eb8e96ff 100644 (file)
@@ -347,7 +347,7 @@ namespace System.Threading
                                                        list.RemoveAt (i);
                                                        count--;
                                                        i--;
-                                                       ThreadPool.QueueWorkItem (TimerCB, timer);
+                                                       ThreadPool.UnsafeQueueUserWorkItem (TimerCB, timer);
                                                        long period = timer.period_ms;
                                                        long due_time = timer.due_time_ms;
                                                        bool no_more = (period == -1 || ((period == 0 || period == Timeout.Infinite) && due_time != Timeout.Infinite));
index 48a8e76b63d2e9f318fa91ed934f417b125a3c75..760e5da656e25344459190d2954fe282dd088be4 100644 (file)
@@ -625,6 +625,16 @@ namespace MonoTests.System.Globalization
                        new CultureInfo ("en-HK");
                }
 
+               [Test]
+               public void ChineseSimplifiedDontEqual ()
+               {
+                       CultureInfo zh1 = new CultureInfo ("zh-Hans");
+                       CultureInfo zh2 = new CultureInfo ("zh-CHS");
+
+                       Assert.IsFalse (zh1.Equals (zh2), "#1");
+                       Assert.IsFalse (zh2.Equals (zh1), "#2");
+               }
+
 #if NET_4_5
                CountdownEvent barrier = new CountdownEvent (3);
                AutoResetEvent[] evt = new AutoResetEvent [] { new AutoResetEvent (false), new AutoResetEvent (false), new AutoResetEvent (false)};
index 538dfdb5d31d8b0b4cc8d660df57e9d97a9fddb2..e831c36a13dabfb5ee5e636c3d73ff9453707fe8 100644 (file)
@@ -209,7 +209,13 @@ namespace MonoTests.System.Security.Cryptography {
                        byte[] digest = { 0x6f, 0x63, 0x0f, 0xad, 0x67, 0xcd, 0xa0, 0xee, 0x1f, 0xb1, 0xf5, 0x62, 0xdb, 0x3a, 0xa5, 0x3e };
                        Check ("RFC2202-TC7", key, data, digest);
                }
-       }
 
+               [Test]
+               public void Create_Incorrect ()
+               {
+                       var x = HMACMD5.Create ();
+                       Assert.AreEqual ("SHA1", x.HashName, "https://connect.microsoft.com/VisualStudio/feedback/details/838731/all-hmac-create-methods-return-an-instance-of-hmacmd5");
+               }
+       }
 }
 
index d3ce52f88e831094a37d9307ead9bbe2f0f56625..957e55a36c7ab346f53bc326e5005f026e278895 100644 (file)
@@ -345,12 +345,12 @@ namespace MonoTests.System.Threading.Tasks
                        CountdownEvent cde = new CountdownEvent (2);
                        var mre = new ManualResetEvent (false);
                        var tasks = new[] {
-                               Task.Factory.StartNew (delegate { Assert.IsTrue (mre.WaitOne (1500), "#0"); }),
+                               Task.Factory.StartNew (delegate { Assert.IsTrue (mre.WaitOne (10000), "#0"); }),
                                Task.Factory.StartNew (delegate { try { throw new ApplicationException (); } finally { cde.Signal (); } }),
                                Task.Factory.StartNew (delegate { try { throw new ApplicationException (); } finally { cde.Signal (); } })
                        };
 
-                       Assert.IsTrue (cde.Wait (1000), "#1");
+                       Assert.IsTrue (cde.Wait (5000), "#1");
                        Assert.IsFalse (Task.WaitAll (tasks, 1000), "#2");
 
                        mre.Set ();
index ad5d95213b513210f387c63513c24b8ca086c627..9d56645004ffa85fdcd9dc4ee0e3292b3d63d17a 100644 (file)
@@ -25,7 +25,7 @@
     <DebugType>full</DebugType>\r
     <NoWarn>612,618,1699</NoWarn>\r
     <Optimize>false</Optimize>\r
-    <DefineConstants>DEBUG;TRACE;INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;NET_4_0;NET_4_5;MONO;DISABLE_CAS_USE;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP</DefineConstants>\r
+    <DefineConstants>DEBUG;TRACE;INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;NET_4_0;NET_4_5;MONO;DISABLE_CAS_USE;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
@@ -33,7 +33,7 @@
     <DebugType>pdbonly</DebugType>\r
     <NoWarn>612,618,1699</NoWarn>\r
     <Optimize>true</Optimize>\r
-    <DefineConstants>INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;NET_4_0;NET_4_5;MONO;DISABLE_CAS_USE;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP</DefineConstants>\r
+    <DefineConstants>INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;NET_4_0;NET_4_5;MONO;DISABLE_CAS_USE;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
     <Compile Include="..\..\..\external\referencesource\mscorlib\system\io\stringwriter.cs" />\r
     <Compile Include="..\..\..\external\referencesource\mscorlib\system\io\textreader.cs" />\r
     <Compile Include="..\..\..\external\referencesource\mscorlib\system\io\textwriter.cs" />\r
+    <Compile Include="..\..\..\external\referencesource\mscorlib\system\io\unmanagedmemoryaccessor.cs" />\r
     <Compile Include="..\..\..\external\referencesource\mscorlib\system\io\unmanagedmemorystream.cs" />\r
     <Compile Include="..\..\..\external\referencesource\mscorlib\system\io\unmanagedmemorystreamwrapper.cs" />\r
     <Compile Include="..\..\..\external\referencesource\mscorlib\system\iobservable.cs" />\r
     <Compile Include="System.IO\SeekOrigin.cs" />\r
     <Compile Include="System.IO\UnexceptionalStreamReader.cs" />\r
     <Compile Include="System.IO\UnexceptionalStreamWriter.cs" />\r
-    <Compile Include="System.IO\UnmanagedMemoryAccessor.cs" />\r
     <Compile Include="System.Reflection.Emit\AssemblyBuilder.cs" />\r
     <Compile Include="System.Reflection.Emit\AssemblyBuilderAccess.cs" />\r
     <Compile Include="System.Reflection.Emit\ConstructorBuilder.cs" />\r
index 1b02a58884552a064a351aa33d386fc1fc65b195..b0295405208cda32fc1757e486f504d52de5ec62 100644 (file)
@@ -874,7 +874,6 @@ System.Threading/Overlapped.cs
 System.Threading/ReaderWriterLock.cs
 System.Threading/RegisteredWaitHandle.cs
 System.Threading/Thread.cs
-System.Threading/ThreadPool.cs
 System.Threading/Timer.cs
 System.Threading/TimerCallback.cs
 System.Threading/Volatile.cs
diff --git a/mcs/class/corlib/monotouch_watch_corlib.dll.sources b/mcs/class/corlib/monotouch_watch_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 1dee0470816b6e9667888db2c1382d4935c1d6d4..a4e89d0ed579665bebd6161dd9980f31cc5de9d6 100644 (file)
@@ -46,428 +46,428 @@ Monodoc.Ecma/EcmaUrlTokenizer.cs
 Monodoc.Ecma/EcmaDesc.cs
 Mono.Documentation/ManifestResourceResolver.cs
 Mono.Documentation/XmlDocUtils.cs
-../../../external/Lucene.Net/src/core/Analysis/Analyzer.cs
-../../../external/Lucene.Net/src/core/Analysis/ASCIIFoldingFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/BaseCharFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/CachingTokenFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/CharArraySet.cs
-../../../external/Lucene.Net/src/core/Analysis/CharFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/CharReader.cs
-../../../external/Lucene.Net/src/core/Analysis/CharStream.cs
-../../../external/Lucene.Net/src/core/Analysis/CharTokenizer.cs
-../../../external/Lucene.Net/src/core/Analysis/ISOLatin1AccentFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/KeywordAnalyzer.cs
-../../../external/Lucene.Net/src/core/Analysis/KeywordTokenizer.cs
-../../../external/Lucene.Net/src/core/Analysis/LengthFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/LetterTokenizer.cs
-../../../external/Lucene.Net/src/core/Analysis/LowerCaseFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/LowerCaseTokenizer.cs
-../../../external/Lucene.Net/src/core/Analysis/MappingCharFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/NormalizeCharMap.cs
-../../../external/Lucene.Net/src/core/Analysis/NumericTokenStream.cs
-../../../external/Lucene.Net/src/core/Analysis/PerFieldAnalyzerWrapper.cs
-../../../external/Lucene.Net/src/core/Analysis/PorterStemFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/PorterStemmer.cs
-../../../external/Lucene.Net/src/core/Analysis/SimpleAnalyzer.cs
-../../../external/Lucene.Net/src/core/Analysis/Standard/StandardAnalyzer.cs
-../../../external/Lucene.Net/src/core/Analysis/Standard/StandardFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/Standard/StandardTokenizer.cs
-../../../external/Lucene.Net/src/core/Analysis/Standard/StandardTokenizerImpl.cs
-../../../external/Lucene.Net/src/core/Analysis/StopAnalyzer.cs
-../../../external/Lucene.Net/src/core/Analysis/StopFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/TeeSinkTokenFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/Token.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/FlagsAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/IFlagsAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/IOffsetAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/IPayloadAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/IPositionIncrementAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/ITermAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/ITypeAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/OffsetAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/PayloadAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/PositionIncrementAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/TermAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenattributes/TypeAttribute.cs
-../../../external/Lucene.Net/src/core/Analysis/TokenFilter.cs
-../../../external/Lucene.Net/src/core/Analysis/Tokenizer.cs
-../../../external/Lucene.Net/src/core/Analysis/TokenStream.cs
-../../../external/Lucene.Net/src/core/Analysis/WhitespaceAnalyzer.cs
-../../../external/Lucene.Net/src/core/Analysis/WhitespaceTokenizer.cs
-../../../external/Lucene.Net/src/core/Analysis/WordlistLoader.cs
-../../../external/Lucene.Net/src/core/Document/AbstractField.cs
-../../../external/Lucene.Net/src/core/Document/CompressionTools.cs
-../../../external/Lucene.Net/src/core/Document/DateField.cs
-../../../external/Lucene.Net/src/core/Document/DateTools.cs
-../../../external/Lucene.Net/src/core/Document/Document.cs
-../../../external/Lucene.Net/src/core/Document/Field.cs
-../../../external/Lucene.Net/src/core/Document/Fieldable.cs
-../../../external/Lucene.Net/src/core/Document/FieldSelector.cs
-../../../external/Lucene.Net/src/core/Document/FieldSelectorResult.cs
-../../../external/Lucene.Net/src/core/Document/LoadFirstFieldSelector.cs
-../../../external/Lucene.Net/src/core/Document/MapFieldSelector.cs
-../../../external/Lucene.Net/src/core/Document/NumberTools.cs
-../../../external/Lucene.Net/src/core/Document/NumericField.cs
-../../../external/Lucene.Net/src/core/Document/SetBasedFieldSelector.cs
-../../../external/Lucene.Net/src/core/Index/AbstractAllTermDocs.cs
-../../../external/Lucene.Net/src/core/Index/AllTermDocs.cs
-../../../external/Lucene.Net/src/core/Index/BufferedDeletes.cs
-../../../external/Lucene.Net/src/core/Index/ByteBlockPool.cs
-../../../external/Lucene.Net/src/core/Index/ByteSliceReader.cs
-../../../external/Lucene.Net/src/core/Index/ByteSliceWriter.cs
-../../../external/Lucene.Net/src/core/Index/CharBlockPool.cs
-../../../external/Lucene.Net/src/core/Index/CheckIndex.cs
-../../../external/Lucene.Net/src/core/Index/CompoundFileReader.cs
-../../../external/Lucene.Net/src/core/Index/CompoundFileWriter.cs
-../../../external/Lucene.Net/src/core/Index/ConcurrentMergeScheduler.cs
-../../../external/Lucene.Net/src/core/Index/CorruptIndexException.cs
-../../../external/Lucene.Net/src/core/Index/DefaultSkipListReader.cs
-../../../external/Lucene.Net/src/core/Index/DefaultSkipListWriter.cs
-../../../external/Lucene.Net/src/core/Index/DirectoryReader.cs
-../../../external/Lucene.Net/src/core/Index/DocConsumer.cs
-../../../external/Lucene.Net/src/core/Index/DocConsumerPerThread.cs
-../../../external/Lucene.Net/src/core/Index/DocFieldConsumer.cs
-../../../external/Lucene.Net/src/core/Index/DocFieldConsumerPerField.cs
-../../../external/Lucene.Net/src/core/Index/DocFieldConsumerPerThread.cs
-../../../external/Lucene.Net/src/core/Index/DocFieldConsumers.cs
-../../../external/Lucene.Net/src/core/Index/DocFieldConsumersPerField.cs
-../../../external/Lucene.Net/src/core/Index/DocFieldConsumersPerThread.cs
-../../../external/Lucene.Net/src/core/Index/DocFieldProcessor.cs
-../../../external/Lucene.Net/src/core/Index/DocFieldProcessorPerField.cs
-../../../external/Lucene.Net/src/core/Index/DocFieldProcessorPerThread.cs
-../../../external/Lucene.Net/src/core/Index/DocInverter.cs
-../../../external/Lucene.Net/src/core/Index/DocInverterPerField.cs
-../../../external/Lucene.Net/src/core/Index/DocInverterPerThread.cs
-../../../external/Lucene.Net/src/core/Index/DocumentsWriter.cs
-../../../external/Lucene.Net/src/core/Index/DocumentsWriterThreadState.cs
-../../../external/Lucene.Net/src/core/Index/FieldInfo.cs
-../../../external/Lucene.Net/src/core/Index/FieldInfos.cs
-../../../external/Lucene.Net/src/core/Index/FieldInvertState.cs
-../../../external/Lucene.Net/src/core/Index/FieldReaderException.cs
-../../../external/Lucene.Net/src/core/Index/FieldSortedTermVectorMapper.cs
-../../../external/Lucene.Net/src/core/Index/FieldsReader.cs
-../../../external/Lucene.Net/src/core/Index/FieldsWriter.cs
-../../../external/Lucene.Net/src/core/Index/FilterIndexReader.cs
-../../../external/Lucene.Net/src/core/Index/FormatPostingsDocsConsumer.cs
-../../../external/Lucene.Net/src/core/Index/FormatPostingsDocsWriter.cs
-../../../external/Lucene.Net/src/core/Index/FormatPostingsFieldsConsumer.cs
-../../../external/Lucene.Net/src/core/Index/FormatPostingsFieldsWriter.cs
-../../../external/Lucene.Net/src/core/Index/FormatPostingsPositionsConsumer.cs
-../../../external/Lucene.Net/src/core/Index/FormatPostingsPositionsWriter.cs
-../../../external/Lucene.Net/src/core/Index/FormatPostingsTermsConsumer.cs
-../../../external/Lucene.Net/src/core/Index/FormatPostingsTermsWriter.cs
-../../../external/Lucene.Net/src/core/Index/FreqProxFieldMergeState.cs
-../../../external/Lucene.Net/src/core/Index/FreqProxTermsWriter.cs
-../../../external/Lucene.Net/src/core/Index/FreqProxTermsWriterPerField.cs
-../../../external/Lucene.Net/src/core/Index/FreqProxTermsWriterPerThread.cs
-../../../external/Lucene.Net/src/core/Index/IndexCommit.cs
-../../../external/Lucene.Net/src/core/Index/IndexDeletionPolicy.cs
-../../../external/Lucene.Net/src/core/Index/IndexFileDeleter.cs
-../../../external/Lucene.Net/src/core/Index/IndexFileNameFilter.cs
-../../../external/Lucene.Net/src/core/Index/IndexFileNames.cs
-../../../external/Lucene.Net/src/core/Index/IndexReader.cs
-../../../external/Lucene.Net/src/core/Index/IndexWriter.cs
-../../../external/Lucene.Net/src/core/Index/IntBlockPool.cs
-../../../external/Lucene.Net/src/core/Index/InvertedDocConsumer.cs
-../../../external/Lucene.Net/src/core/Index/InvertedDocConsumerPerField.cs
-../../../external/Lucene.Net/src/core/Index/InvertedDocConsumerPerThread.cs
-../../../external/Lucene.Net/src/core/Index/InvertedDocEndConsumer.cs
-../../../external/Lucene.Net/src/core/Index/InvertedDocEndConsumerPerField.cs
-../../../external/Lucene.Net/src/core/Index/InvertedDocEndConsumerPerThread.cs
-../../../external/Lucene.Net/src/core/Index/KeepOnlyLastCommitDeletionPolicy.cs
-../../../external/Lucene.Net/src/core/Index/LogByteSizeMergePolicy.cs
-../../../external/Lucene.Net/src/core/Index/LogDocMergePolicy.cs
-../../../external/Lucene.Net/src/core/Index/LogMergePolicy.cs
-../../../external/Lucene.Net/src/core/Index/MergeDocIDRemapper.cs
-../../../external/Lucene.Net/src/core/Index/MergePolicy.cs
-../../../external/Lucene.Net/src/core/Index/MergeScheduler.cs
-../../../external/Lucene.Net/src/core/Index/MultiLevelSkipListReader.cs
-../../../external/Lucene.Net/src/core/Index/MultiLevelSkipListWriter.cs
-../../../external/Lucene.Net/src/core/Index/MultipleTermPositions.cs
-../../../external/Lucene.Net/src/core/Index/MultiReader.cs
-../../../external/Lucene.Net/src/core/Index/NormsWriter.cs
-../../../external/Lucene.Net/src/core/Index/NormsWriterPerField.cs
-../../../external/Lucene.Net/src/core/Index/NormsWriterPerThread.cs
-../../../external/Lucene.Net/src/core/Index/ParallelReader.cs
-../../../external/Lucene.Net/src/core/Index/Payload.cs
-../../../external/Lucene.Net/src/core/Index/PositionBasedTermVectorMapper.cs
-../../../external/Lucene.Net/src/core/Index/RawPostingList.cs
-../../../external/Lucene.Net/src/core/Index/ReadOnlyDirectoryReader.cs
-../../../external/Lucene.Net/src/core/Index/ReadOnlySegmentReader.cs
-../../../external/Lucene.Net/src/core/Index/ReusableStringReader.cs
-../../../external/Lucene.Net/src/core/Index/SegmentInfo.cs
-../../../external/Lucene.Net/src/core/Index/SegmentInfos.cs
-../../../external/Lucene.Net/src/core/Index/SegmentMergeInfo.cs
-../../../external/Lucene.Net/src/core/Index/SegmentMergeQueue.cs
-../../../external/Lucene.Net/src/core/Index/SegmentMerger.cs
-../../../external/Lucene.Net/src/core/Index/SegmentReader.cs
-../../../external/Lucene.Net/src/core/Index/SegmentTermDocs.cs
-../../../external/Lucene.Net/src/core/Index/SegmentTermEnum.cs
-../../../external/Lucene.Net/src/core/Index/SegmentTermPositions.cs
-../../../external/Lucene.Net/src/core/Index/SegmentTermPositionVector.cs
-../../../external/Lucene.Net/src/core/Index/SegmentTermVector.cs
-../../../external/Lucene.Net/src/core/Index/SegmentWriteState.cs
-../../../external/Lucene.Net/src/core/Index/SerialMergeScheduler.cs
-../../../external/Lucene.Net/src/core/Index/SnapshotDeletionPolicy.cs
-../../../external/Lucene.Net/src/core/Index/SortedTermVectorMapper.cs
-../../../external/Lucene.Net/src/core/Index/StaleReaderException.cs
-../../../external/Lucene.Net/src/core/Index/StoredFieldsWriter.cs
-../../../external/Lucene.Net/src/core/Index/StoredFieldsWriterPerThread.cs
-../../../external/Lucene.Net/src/core/Index/Term.cs
-../../../external/Lucene.Net/src/core/Index/TermBuffer.cs
-../../../external/Lucene.Net/src/core/Index/TermDocs.cs
-../../../external/Lucene.Net/src/core/Index/TermEnum.cs
-../../../external/Lucene.Net/src/core/Index/TermFreqVector.cs
-../../../external/Lucene.Net/src/core/Index/TermInfo.cs
-../../../external/Lucene.Net/src/core/Index/TermInfosReader.cs
-../../../external/Lucene.Net/src/core/Index/TermInfosWriter.cs
-../../../external/Lucene.Net/src/core/Index/TermPositions.cs
-../../../external/Lucene.Net/src/core/Index/TermPositionVector.cs
-../../../external/Lucene.Net/src/core/Index/TermsHash.cs
-../../../external/Lucene.Net/src/core/Index/TermsHashConsumer.cs
-../../../external/Lucene.Net/src/core/Index/TermsHashConsumerPerField.cs
-../../../external/Lucene.Net/src/core/Index/TermsHashConsumerPerThread.cs
-../../../external/Lucene.Net/src/core/Index/TermsHashPerField.cs
-../../../external/Lucene.Net/src/core/Index/TermsHashPerThread.cs
-../../../external/Lucene.Net/src/core/Index/TermVectorEntry.cs
-../../../external/Lucene.Net/src/core/Index/TermVectorEntryFreqSortedComparator.cs
-../../../external/Lucene.Net/src/core/Index/TermVectorMapper.cs
-../../../external/Lucene.Net/src/core/Index/TermVectorOffsetInfo.cs
-../../../external/Lucene.Net/src/core/Index/TermVectorsReader.cs
-../../../external/Lucene.Net/src/core/Index/TermVectorsTermsWriter.cs
-../../../external/Lucene.Net/src/core/Index/TermVectorsTermsWriterPerField.cs
-../../../external/Lucene.Net/src/core/Index/TermVectorsTermsWriterPerThread.cs
-../../../external/Lucene.Net/src/core/Index/TermVectorsWriter.cs
-../../../external/Lucene.Net/src/core/LucenePackage.cs
-../../../external/Lucene.Net/src/core/LZOCompressor.cs
-../../../external/Lucene.Net/src/core/Messages/INLSException.cs
-../../../external/Lucene.Net/src/core/Messages/Message.cs
-../../../external/Lucene.Net/src/core/Messages/MessageImpl.cs
-../../../external/Lucene.Net/src/core/Messages/NLS.cs
-../../../external/Lucene.Net/src/core/QueryParser/CharStream.cs
-../../../external/Lucene.Net/src/core/QueryParser/FastCharStream.cs
-../../../external/Lucene.Net/src/core/QueryParser/MultiFieldQueryParser.cs
-../../../external/Lucene.Net/src/core/QueryParser/ParseException.cs
-../../../external/Lucene.Net/src/core/QueryParser/QueryParser.cs
-../../../external/Lucene.Net/src/core/QueryParser/QueryParserConstants.cs
-../../../external/Lucene.Net/src/core/QueryParser/QueryParserTokenManager.cs
-../../../external/Lucene.Net/src/core/QueryParser/Token.cs
-../../../external/Lucene.Net/src/core/QueryParser/TokenMgrError.cs
-../../../external/Lucene.Net/src/core/Search/BooleanClause.cs
-../../../external/Lucene.Net/src/core/Search/BooleanQuery.cs
-../../../external/Lucene.Net/src/core/Search/BooleanScorer.cs
-../../../external/Lucene.Net/src/core/Search/BooleanScorer2.cs
-../../../external/Lucene.Net/src/core/Search/CachingSpanFilter.cs
-../../../external/Lucene.Net/src/core/Search/CachingWrapperFilter.cs
-../../../external/Lucene.Net/src/core/Search/Collector.cs
-../../../external/Lucene.Net/src/core/Search/ComplexExplanation.cs
-../../../external/Lucene.Net/src/core/Search/ConjunctionScorer.cs
-../../../external/Lucene.Net/src/core/Search/ConstantScoreQuery.cs
-../../../external/Lucene.Net/src/core/Search/DefaultSimilarity.cs
-../../../external/Lucene.Net/src/core/Search/DisjunctionMaxQuery.cs
-../../../external/Lucene.Net/src/core/Search/DisjunctionMaxScorer.cs
-../../../external/Lucene.Net/src/core/Search/DisjunctionSumScorer.cs
-../../../external/Lucene.Net/src/core/Search/DocIdSet.cs
-../../../external/Lucene.Net/src/core/Search/DocIdSetIterator.cs
-../../../external/Lucene.Net/src/core/Search/ExactPhraseScorer.cs
-../../../external/Lucene.Net/src/core/Search/Explanation.cs
-../../../external/Lucene.Net/src/core/Search/FieldCache.cs
-../../../external/Lucene.Net/src/core/Search/FieldCacheImpl.cs
-../../../external/Lucene.Net/src/core/Search/FieldCacheRangeFilter.cs
-../../../external/Lucene.Net/src/core/Search/FieldCacheTermsFilter.cs
-../../../external/Lucene.Net/src/core/Search/FieldComparator.cs
-../../../external/Lucene.Net/src/core/Search/FieldComparatorSource.cs
-../../../external/Lucene.Net/src/core/Search/FieldDoc.cs
-../../../external/Lucene.Net/src/core/Search/FieldDocSortedHitQueue.cs
-../../../external/Lucene.Net/src/core/Search/FieldValueHitQueue.cs
-../../../external/Lucene.Net/src/core/Search/Filter.cs
-../../../external/Lucene.Net/src/core/Search/FilteredDocIdSet.cs
-../../../external/Lucene.Net/src/core/Search/FilteredDocIdSetIterator.cs
-../../../external/Lucene.Net/src/core/Search/FilteredQuery.cs
-../../../external/Lucene.Net/src/core/Search/FilteredTermEnum.cs
-../../../external/Lucene.Net/src/core/Search/FilterManager.cs
-../../../external/Lucene.Net/src/core/Search/Function/ByteFieldSource.cs
-../../../external/Lucene.Net/src/core/Search/Function/CustomScoreProvider.cs
-../../../external/Lucene.Net/src/core/Search/Function/CustomScoreQuery.cs
-../../../external/Lucene.Net/src/core/Search/Function/DocValues.cs
-../../../external/Lucene.Net/src/core/Search/Function/FieldCacheSource.cs
-../../../external/Lucene.Net/src/core/Search/Function/FieldScoreQuery.cs
-../../../external/Lucene.Net/src/core/Search/Function/FloatFieldSource.cs
-../../../external/Lucene.Net/src/core/Search/Function/IntFieldSource.cs
-../../../external/Lucene.Net/src/core/Search/Function/OrdFieldSource.cs
-../../../external/Lucene.Net/src/core/Search/Function/ReverseOrdFieldSource.cs
-../../../external/Lucene.Net/src/core/Search/Function/ShortFieldSource.cs
-../../../external/Lucene.Net/src/core/Search/Function/ValueSource.cs
-../../../external/Lucene.Net/src/core/Search/Function/ValueSourceQuery.cs
-../../../external/Lucene.Net/src/core/Search/FuzzyQuery.cs
-../../../external/Lucene.Net/src/core/Search/FuzzyTermEnum.cs
-../../../external/Lucene.Net/src/core/Search/HitQueue.cs
-../../../external/Lucene.Net/src/core/Search/IndexSearcher.cs
-../../../external/Lucene.Net/src/core/Search/MatchAllDocsQuery.cs
-../../../external/Lucene.Net/src/core/Search/MultiPhraseQuery.cs
-../../../external/Lucene.Net/src/core/Search/MultiSearcher.cs
-../../../external/Lucene.Net/src/core/Search/MultiTermQuery.cs
-../../../external/Lucene.Net/src/core/Search/MultiTermQueryWrapperFilter.cs
-../../../external/Lucene.Net/src/core/Search/NumericRangeFilter.cs
-../../../external/Lucene.Net/src/core/Search/NumericRangeQuery.cs
-../../../external/Lucene.Net/src/core/Search/ParallelMultiSearcher.cs
-../../../external/Lucene.Net/src/core/Search/Payloads/AveragePayloadFunction.cs
-../../../external/Lucene.Net/src/core/Search/Payloads/MaxPayloadFunction.cs
-../../../external/Lucene.Net/src/core/Search/Payloads/MinPayloadFunction.cs
-../../../external/Lucene.Net/src/core/Search/Payloads/PayloadFunction.cs
-../../../external/Lucene.Net/src/core/Search/Payloads/PayloadNearQuery.cs
-../../../external/Lucene.Net/src/core/Search/Payloads/PayloadSpanUtil.cs
-../../../external/Lucene.Net/src/core/Search/Payloads/PayloadTermQuery.cs
-../../../external/Lucene.Net/src/core/Search/PhrasePositions.cs
-../../../external/Lucene.Net/src/core/Search/PhraseQuery.cs
-../../../external/Lucene.Net/src/core/Search/PhraseQueue.cs
-../../../external/Lucene.Net/src/core/Search/PhraseScorer.cs
-../../../external/Lucene.Net/src/core/Search/PositiveScoresOnlyCollector.cs
-../../../external/Lucene.Net/src/core/Search/PrefixFilter.cs
-../../../external/Lucene.Net/src/core/Search/PrefixQuery.cs
-../../../external/Lucene.Net/src/core/Search/PrefixTermEnum.cs
-../../../external/Lucene.Net/src/core/Search/Query.cs
-../../../external/Lucene.Net/src/core/Search/QueryTermVector.cs
-../../../external/Lucene.Net/src/core/Search/QueryWrapperFilter.cs
-../../../external/Lucene.Net/src/core/Search/ReqExclScorer.cs
-../../../external/Lucene.Net/src/core/Search/ReqOptSumScorer.cs
-../../../external/Lucene.Net/src/core/Search/ScoreCachingWrappingScorer.cs
-../../../external/Lucene.Net/src/core/Search/ScoreDoc.cs
-../../../external/Lucene.Net/src/core/Search/Scorer.cs
-../../../external/Lucene.Net/src/core/Search/Searchable.cs
-../../../external/Lucene.Net/src/core/Search/Searcher.cs
-../../../external/Lucene.Net/src/core/Search/Similarity.cs
-../../../external/Lucene.Net/src/core/Search/SimilarityDelegator.cs
-../../../external/Lucene.Net/src/core/Search/SingleTermEnum.cs
-../../../external/Lucene.Net/src/core/Search/SloppyPhraseScorer.cs
-../../../external/Lucene.Net/src/core/Search/Sort.cs
-../../../external/Lucene.Net/src/core/Search/SortField.cs
-../../../external/Lucene.Net/src/core/Search/SpanFilter.cs
-../../../external/Lucene.Net/src/core/Search/SpanFilterResult.cs
-../../../external/Lucene.Net/src/core/Search/SpanQueryFilter.cs
-../../../external/Lucene.Net/src/core/Search/Spans/FieldMaskingSpanQuery.cs
-../../../external/Lucene.Net/src/core/Search/Spans/NearSpansOrdered.cs
-../../../external/Lucene.Net/src/core/Search/Spans/NearSpansUnordered.cs
-../../../external/Lucene.Net/src/core/Search/Spans/SpanFirstQuery.cs
-../../../external/Lucene.Net/src/core/Search/Spans/SpanNearQuery.cs
-../../../external/Lucene.Net/src/core/Search/Spans/SpanNotQuery.cs
-../../../external/Lucene.Net/src/core/Search/Spans/SpanOrQuery.cs
-../../../external/Lucene.Net/src/core/Search/Spans/SpanQuery.cs
-../../../external/Lucene.Net/src/core/Search/Spans/Spans.cs
-../../../external/Lucene.Net/src/core/Search/Spans/SpanScorer.cs
-../../../external/Lucene.Net/src/core/Search/Spans/SpanTermQuery.cs
-../../../external/Lucene.Net/src/core/Search/Spans/SpanWeight.cs
-../../../external/Lucene.Net/src/core/Search/Spans/TermSpans.cs
-../../../external/Lucene.Net/src/core/Search/TermQuery.cs
-../../../external/Lucene.Net/src/core/Search/TermRangeFilter.cs
-../../../external/Lucene.Net/src/core/Search/TermRangeQuery.cs
-../../../external/Lucene.Net/src/core/Search/TermRangeTermEnum.cs
-../../../external/Lucene.Net/src/core/Search/TermScorer.cs
-../../../external/Lucene.Net/src/core/Search/TimeLimitingCollector.cs
-../../../external/Lucene.Net/src/core/Search/TopDocs.cs
-../../../external/Lucene.Net/src/core/Search/TopDocsCollector.cs
-../../../external/Lucene.Net/src/core/Search/TopFieldCollector.cs
-../../../external/Lucene.Net/src/core/Search/TopFieldDocs.cs
-../../../external/Lucene.Net/src/core/Search/TopScoreDocCollector.cs
-../../../external/Lucene.Net/src/core/Search/Weight.cs
-../../../external/Lucene.Net/src/core/Search/WildcardQuery.cs
-../../../external/Lucene.Net/src/core/Search/WildcardTermEnum.cs
-../../../external/Lucene.Net/src/core/Store/AlreadyClosedException.cs
-../../../external/Lucene.Net/src/core/Store/BufferedIndexInput.cs
-../../../external/Lucene.Net/src/core/Store/BufferedIndexOutput.cs
-../../../external/Lucene.Net/src/core/Store/CheckSumIndexInput.cs
-../../../external/Lucene.Net/src/core/Store/CheckSumIndexOutput.cs
-../../../external/Lucene.Net/src/core/Store/Directory.cs
-../../../external/Lucene.Net/src/core/Store/FileSwitchDirectory.cs
-../../../external/Lucene.Net/src/core/Store/FSDirectory.cs
-../../../external/Lucene.Net/src/core/Store/FSLockFactory.cs
-../../../external/Lucene.Net/src/core/Store/IndexInput.cs
-../../../external/Lucene.Net/src/core/Store/IndexOutput.cs
-../../../external/Lucene.Net/src/core/Store/Lock.cs
-../../../external/Lucene.Net/src/core/Store/LockFactory.cs
-../../../external/Lucene.Net/src/core/Store/LockObtainFailedException.cs
-../../../external/Lucene.Net/src/core/Store/LockReleaseFailedException.cs
-../../../external/Lucene.Net/src/core/Store/LockStressTest.cs
-../../../external/Lucene.Net/src/core/Store/LockVerifyServer.cs
-../../../external/Lucene.Net/src/core/Store/MMapDirectory.cs
-../../../external/Lucene.Net/src/core/Store/NativeFSLockFactory.cs
-../../../external/Lucene.Net/src/core/Store/NIOFSDirectory.cs
-../../../external/Lucene.Net/src/core/Store/NoLockFactory.cs
-../../../external/Lucene.Net/src/core/Store/NoSuchDirectoryException.cs
-../../../external/Lucene.Net/src/core/Store/RAMDirectory.cs
-../../../external/Lucene.Net/src/core/Store/RAMFile.cs
-../../../external/Lucene.Net/src/core/Store/RAMInputStream.cs
-../../../external/Lucene.Net/src/core/Store/RAMOutputStream.cs
-../../../external/Lucene.Net/src/core/Store/SimpleFSDirectory.cs
-../../../external/Lucene.Net/src/core/Store/SimpleFSLockFactory.cs
-../../../external/Lucene.Net/src/core/Store/SingleInstanceLockFactory.cs
-../../../external/Lucene.Net/src/core/Store/VerifyingLockFactory.cs
-../../../external/Lucene.Net/src/core/Support/AppSettings.cs
-../../../external/Lucene.Net/src/core/Support/AttributeImplItem.cs
-../../../external/Lucene.Net/src/core/Support/BitSetSupport.cs
-../../../external/Lucene.Net/src/core/Support/BuildType.cs
-../../../external/Lucene.Net/src/core/Support/Character.cs
-../../../external/Lucene.Net/src/core/Support/CloseableThreadLocalProfiler.cs
-../../../external/Lucene.Net/src/core/Support/CollectionsHelper.cs
-../../../external/Lucene.Net/src/core/Support/Compare.cs
-../../../external/Lucene.Net/src/core/Support/Compatibility/ConcurrentDictionary.cs
-../../../external/Lucene.Net/src/core/Support/Compatibility/Func.cs
-../../../external/Lucene.Net/src/core/Support/Compatibility/ISet.cs
-../../../external/Lucene.Net/src/core/Support/Compatibility/SetFactory.cs
-../../../external/Lucene.Net/src/core/Support/Compatibility/SortedSet.cs
-../../../external/Lucene.Net/src/core/Support/Compatibility/ThreadLocal.cs
-../../../external/Lucene.Net/src/core/Support/Compatibility/WrappedHashSet.cs
-../../../external/Lucene.Net/src/core/Support/CRC32.cs
-../../../external/Lucene.Net/src/core/Support/Cryptography.cs
-../../../external/Lucene.Net/src/core/Support/Deflater.cs
-../../../external/Lucene.Net/src/core/Support/Double.cs
-../../../external/Lucene.Net/src/core/Support/EquatableList.cs
-../../../external/Lucene.Net/src/core/Support/FileSupport.cs
-../../../external/Lucene.Net/src/core/Support/GeneralKeyedCollection.cs
-../../../external/Lucene.Net/src/core/Support/HashMap.cs
-../../../external/Lucene.Net/src/core/Support/IChecksum.cs
-../../../external/Lucene.Net/src/core/Support/Inflater.cs
-../../../external/Lucene.Net/src/core/Support/IThreadRunnable.cs
-../../../external/Lucene.Net/src/core/Support/Number.cs
-../../../external/Lucene.Net/src/core/Support/OS.cs
-../../../external/Lucene.Net/src/core/Support/SharpZipLib.cs
-../../../external/Lucene.Net/src/core/Support/Single.cs
-../../../external/Lucene.Net/src/core/Support/TextSupport.cs
-../../../external/Lucene.Net/src/core/Support/ThreadClass.cs
-../../../external/Lucene.Net/src/core/Support/ThreadLock.cs
-../../../external/Lucene.Net/src/core/Support/WeakDictionary.cs
-../../../external/Lucene.Net/src/core/Util/ArrayUtil.cs
-../../../external/Lucene.Net/src/core/Util/Attribute.cs
-../../../external/Lucene.Net/src/core/Util/AttributeSource.cs
-../../../external/Lucene.Net/src/core/Util/AverageGuessMemoryModel.cs
-../../../external/Lucene.Net/src/core/Util/BitUtil.cs
-../../../external/Lucene.Net/src/core/Util/BitVector.cs
-../../../external/Lucene.Net/src/core/Util/Cache/Cache.cs
-../../../external/Lucene.Net/src/core/Util/Cache/SimpleLRUCache.cs
-../../../external/Lucene.Net/src/core/Util/Cache/SimpleMapCache.cs
-../../../external/Lucene.Net/src/core/Util/CloseableThreadLocal.cs
-../../../external/Lucene.Net/src/core/Util/Constants.cs
-../../../external/Lucene.Net/src/core/Util/DocIdBitSet.cs
-../../../external/Lucene.Net/src/core/Util/FieldCacheSanityChecker.cs
-../../../external/Lucene.Net/src/core/Util/IAttribute.cs
-../../../external/Lucene.Net/src/core/Util/IdentityDictionary.cs
-../../../external/Lucene.Net/src/core/Util/IndexableBinaryStringTools.cs
-../../../external/Lucene.Net/src/core/Util/MapOfSets.cs
-../../../external/Lucene.Net/src/core/Util/MemoryModel.cs
-../../../external/Lucene.Net/src/core/Util/NumericUtils.cs
-../../../external/Lucene.Net/src/core/Util/OpenBitSet.cs
-../../../external/Lucene.Net/src/core/Util/OpenBitSetDISI.cs
-../../../external/Lucene.Net/src/core/Util/OpenBitSetIterator.cs
-../../../external/Lucene.Net/src/core/Util/PriorityQueue.cs
-../../../external/Lucene.Net/src/core/Util/RamUsageEstimator.cs
-../../../external/Lucene.Net/src/core/Util/ReaderUtil.cs
-../../../external/Lucene.Net/src/core/Util/ScorerDocQueue.cs
-../../../external/Lucene.Net/src/core/Util/SimpleStringInterner.cs
-../../../external/Lucene.Net/src/core/Util/SmallFloat.cs
-../../../external/Lucene.Net/src/core/Util/SortedVIntList.cs
-../../../external/Lucene.Net/src/core/Util/SorterTemplate.cs
-../../../external/Lucene.Net/src/core/Util/StringHelper.cs
-../../../external/Lucene.Net/src/core/Util/StringInterner.cs
-../../../external/Lucene.Net/src/core/Util/ToStringUtils.cs
-../../../external/Lucene.Net/src/core/Util/UnicodeUtil.cs
-../../../external/Lucene.Net/src/core/Util/Version.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Analyzer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/ASCIIFoldingFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/BaseCharFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/CachingTokenFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/CharArraySet.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/CharFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/CharReader.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/CharStream.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/CharTokenizer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/ISOLatin1AccentFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/KeywordAnalyzer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/KeywordTokenizer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/LengthFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/LetterTokenizer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/LowerCaseFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/LowerCaseTokenizer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/MappingCharFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/NormalizeCharMap.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/NumericTokenStream.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/PerFieldAnalyzerWrapper.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/PorterStemFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/PorterStemmer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/SimpleAnalyzer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Standard/StandardAnalyzer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Standard/StandardFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Standard/StandardTokenizer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Standard/StandardTokenizerImpl.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/StopAnalyzer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/StopFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/TeeSinkTokenFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Token.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/FlagsAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IFlagsAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IOffsetAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IPayloadAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/IPositionIncrementAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/ITermAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/ITypeAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/OffsetAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/PayloadAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/PositionIncrementAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/TermAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenattributes/TypeAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/TokenFilter.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/Tokenizer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/TokenStream.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/WhitespaceAnalyzer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/WhitespaceTokenizer.cs
+../../../external/Lucene.Net.Light/src/core/Analysis/WordlistLoader.cs
+../../../external/Lucene.Net.Light/src/core/Document/AbstractField.cs
+../../../external/Lucene.Net.Light/src/core/Document/CompressionTools.cs
+../../../external/Lucene.Net.Light/src/core/Document/DateField.cs
+../../../external/Lucene.Net.Light/src/core/Document/DateTools.cs
+../../../external/Lucene.Net.Light/src/core/Document/Document.cs
+../../../external/Lucene.Net.Light/src/core/Document/Field.cs
+../../../external/Lucene.Net.Light/src/core/Document/Fieldable.cs
+../../../external/Lucene.Net.Light/src/core/Document/FieldSelector.cs
+../../../external/Lucene.Net.Light/src/core/Document/FieldSelectorResult.cs
+../../../external/Lucene.Net.Light/src/core/Document/LoadFirstFieldSelector.cs
+../../../external/Lucene.Net.Light/src/core/Document/MapFieldSelector.cs
+../../../external/Lucene.Net.Light/src/core/Document/NumberTools.cs
+../../../external/Lucene.Net.Light/src/core/Document/NumericField.cs
+../../../external/Lucene.Net.Light/src/core/Document/SetBasedFieldSelector.cs
+../../../external/Lucene.Net.Light/src/core/Index/AbstractAllTermDocs.cs
+../../../external/Lucene.Net.Light/src/core/Index/AllTermDocs.cs
+../../../external/Lucene.Net.Light/src/core/Index/BufferedDeletes.cs
+../../../external/Lucene.Net.Light/src/core/Index/ByteBlockPool.cs
+../../../external/Lucene.Net.Light/src/core/Index/ByteSliceReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/ByteSliceWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/CharBlockPool.cs
+../../../external/Lucene.Net.Light/src/core/Index/CheckIndex.cs
+../../../external/Lucene.Net.Light/src/core/Index/CompoundFileReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/CompoundFileWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/ConcurrentMergeScheduler.cs
+../../../external/Lucene.Net.Light/src/core/Index/CorruptIndexException.cs
+../../../external/Lucene.Net.Light/src/core/Index/DefaultSkipListReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/DefaultSkipListWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/DirectoryReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocConsumer.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocConsumerPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumer.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumerPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumerPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumers.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumersPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocFieldConsumersPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocFieldProcessor.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocFieldProcessorPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocFieldProcessorPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocInverter.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocInverterPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocInverterPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocumentsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/DocumentsWriterThreadState.cs
+../../../external/Lucene.Net.Light/src/core/Index/FieldInfo.cs
+../../../external/Lucene.Net.Light/src/core/Index/FieldInfos.cs
+../../../external/Lucene.Net.Light/src/core/Index/FieldInvertState.cs
+../../../external/Lucene.Net.Light/src/core/Index/FieldReaderException.cs
+../../../external/Lucene.Net.Light/src/core/Index/FieldSortedTermVectorMapper.cs
+../../../external/Lucene.Net.Light/src/core/Index/FieldsReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/FieldsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/FilterIndexReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsDocsConsumer.cs
+../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsDocsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsFieldsConsumer.cs
+../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsFieldsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsPositionsConsumer.cs
+../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsPositionsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsTermsConsumer.cs
+../../../external/Lucene.Net.Light/src/core/Index/FormatPostingsTermsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/FreqProxFieldMergeState.cs
+../../../external/Lucene.Net.Light/src/core/Index/FreqProxTermsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/FreqProxTermsWriterPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/FreqProxTermsWriterPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/IndexCommit.cs
+../../../external/Lucene.Net.Light/src/core/Index/IndexDeletionPolicy.cs
+../../../external/Lucene.Net.Light/src/core/Index/IndexFileDeleter.cs
+../../../external/Lucene.Net.Light/src/core/Index/IndexFileNameFilter.cs
+../../../external/Lucene.Net.Light/src/core/Index/IndexFileNames.cs
+../../../external/Lucene.Net.Light/src/core/Index/IndexReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/IndexWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/IntBlockPool.cs
+../../../external/Lucene.Net.Light/src/core/Index/InvertedDocConsumer.cs
+../../../external/Lucene.Net.Light/src/core/Index/InvertedDocConsumerPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/InvertedDocConsumerPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/InvertedDocEndConsumer.cs
+../../../external/Lucene.Net.Light/src/core/Index/InvertedDocEndConsumerPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/InvertedDocEndConsumerPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/KeepOnlyLastCommitDeletionPolicy.cs
+../../../external/Lucene.Net.Light/src/core/Index/LogByteSizeMergePolicy.cs
+../../../external/Lucene.Net.Light/src/core/Index/LogDocMergePolicy.cs
+../../../external/Lucene.Net.Light/src/core/Index/LogMergePolicy.cs
+../../../external/Lucene.Net.Light/src/core/Index/MergeDocIDRemapper.cs
+../../../external/Lucene.Net.Light/src/core/Index/MergePolicy.cs
+../../../external/Lucene.Net.Light/src/core/Index/MergeScheduler.cs
+../../../external/Lucene.Net.Light/src/core/Index/MultiLevelSkipListReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/MultiLevelSkipListWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/MultipleTermPositions.cs
+../../../external/Lucene.Net.Light/src/core/Index/MultiReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/NormsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/NormsWriterPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/NormsWriterPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/ParallelReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/Payload.cs
+../../../external/Lucene.Net.Light/src/core/Index/PositionBasedTermVectorMapper.cs
+../../../external/Lucene.Net.Light/src/core/Index/RawPostingList.cs
+../../../external/Lucene.Net.Light/src/core/Index/ReadOnlyDirectoryReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/ReadOnlySegmentReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/ReusableStringReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentInfo.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentInfos.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentMergeInfo.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentMergeQueue.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentMerger.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentTermDocs.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentTermEnum.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentTermPositions.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentTermPositionVector.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentTermVector.cs
+../../../external/Lucene.Net.Light/src/core/Index/SegmentWriteState.cs
+../../../external/Lucene.Net.Light/src/core/Index/SerialMergeScheduler.cs
+../../../external/Lucene.Net.Light/src/core/Index/SnapshotDeletionPolicy.cs
+../../../external/Lucene.Net.Light/src/core/Index/SortedTermVectorMapper.cs
+../../../external/Lucene.Net.Light/src/core/Index/StaleReaderException.cs
+../../../external/Lucene.Net.Light/src/core/Index/StoredFieldsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/StoredFieldsWriterPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/Term.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermBuffer.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermDocs.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermEnum.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermFreqVector.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermInfo.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermInfosReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermInfosWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermPositions.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermPositionVector.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermsHash.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermsHashConsumer.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermsHashConsumerPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermsHashConsumerPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermsHashPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermsHashPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermVectorEntry.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermVectorEntryFreqSortedComparator.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermVectorMapper.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermVectorOffsetInfo.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermVectorsReader.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermVectorsTermsWriter.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermVectorsTermsWriterPerField.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermVectorsTermsWriterPerThread.cs
+../../../external/Lucene.Net.Light/src/core/Index/TermVectorsWriter.cs
+../../../external/Lucene.Net.Light/src/core/LucenePackage.cs
+../../../external/Lucene.Net.Light/src/core/LZOCompressor.cs
+../../../external/Lucene.Net.Light/src/core/Messages/INLSException.cs
+../../../external/Lucene.Net.Light/src/core/Messages/Message.cs
+../../../external/Lucene.Net.Light/src/core/Messages/MessageImpl.cs
+../../../external/Lucene.Net.Light/src/core/Messages/NLS.cs
+../../../external/Lucene.Net.Light/src/core/QueryParser/CharStream.cs
+../../../external/Lucene.Net.Light/src/core/QueryParser/FastCharStream.cs
+../../../external/Lucene.Net.Light/src/core/QueryParser/MultiFieldQueryParser.cs
+../../../external/Lucene.Net.Light/src/core/QueryParser/ParseException.cs
+../../../external/Lucene.Net.Light/src/core/QueryParser/QueryParser.cs
+../../../external/Lucene.Net.Light/src/core/QueryParser/QueryParserConstants.cs
+../../../external/Lucene.Net.Light/src/core/QueryParser/QueryParserTokenManager.cs
+../../../external/Lucene.Net.Light/src/core/QueryParser/Token.cs
+../../../external/Lucene.Net.Light/src/core/QueryParser/TokenMgrError.cs
+../../../external/Lucene.Net.Light/src/core/Search/BooleanClause.cs
+../../../external/Lucene.Net.Light/src/core/Search/BooleanQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/BooleanScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/BooleanScorer2.cs
+../../../external/Lucene.Net.Light/src/core/Search/CachingSpanFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/CachingWrapperFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/Collector.cs
+../../../external/Lucene.Net.Light/src/core/Search/ComplexExplanation.cs
+../../../external/Lucene.Net.Light/src/core/Search/ConjunctionScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/ConstantScoreQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/DefaultSimilarity.cs
+../../../external/Lucene.Net.Light/src/core/Search/DisjunctionMaxQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/DisjunctionMaxScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/DisjunctionSumScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/DocIdSet.cs
+../../../external/Lucene.Net.Light/src/core/Search/DocIdSetIterator.cs
+../../../external/Lucene.Net.Light/src/core/Search/ExactPhraseScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/Explanation.cs
+../../../external/Lucene.Net.Light/src/core/Search/FieldCache.cs
+../../../external/Lucene.Net.Light/src/core/Search/FieldCacheImpl.cs
+../../../external/Lucene.Net.Light/src/core/Search/FieldCacheRangeFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/FieldCacheTermsFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/FieldComparator.cs
+../../../external/Lucene.Net.Light/src/core/Search/FieldComparatorSource.cs
+../../../external/Lucene.Net.Light/src/core/Search/FieldDoc.cs
+../../../external/Lucene.Net.Light/src/core/Search/FieldDocSortedHitQueue.cs
+../../../external/Lucene.Net.Light/src/core/Search/FieldValueHitQueue.cs
+../../../external/Lucene.Net.Light/src/core/Search/Filter.cs
+../../../external/Lucene.Net.Light/src/core/Search/FilteredDocIdSet.cs
+../../../external/Lucene.Net.Light/src/core/Search/FilteredDocIdSetIterator.cs
+../../../external/Lucene.Net.Light/src/core/Search/FilteredQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/FilteredTermEnum.cs
+../../../external/Lucene.Net.Light/src/core/Search/FilterManager.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/ByteFieldSource.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/CustomScoreProvider.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/CustomScoreQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/DocValues.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/FieldCacheSource.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/FieldScoreQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/FloatFieldSource.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/IntFieldSource.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/OrdFieldSource.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/ReverseOrdFieldSource.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/ShortFieldSource.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/ValueSource.cs
+../../../external/Lucene.Net.Light/src/core/Search/Function/ValueSourceQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/FuzzyQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/FuzzyTermEnum.cs
+../../../external/Lucene.Net.Light/src/core/Search/HitQueue.cs
+../../../external/Lucene.Net.Light/src/core/Search/IndexSearcher.cs
+../../../external/Lucene.Net.Light/src/core/Search/MatchAllDocsQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/MultiPhraseQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/MultiSearcher.cs
+../../../external/Lucene.Net.Light/src/core/Search/MultiTermQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/MultiTermQueryWrapperFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/NumericRangeFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/NumericRangeQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/ParallelMultiSearcher.cs
+../../../external/Lucene.Net.Light/src/core/Search/Payloads/AveragePayloadFunction.cs
+../../../external/Lucene.Net.Light/src/core/Search/Payloads/MaxPayloadFunction.cs
+../../../external/Lucene.Net.Light/src/core/Search/Payloads/MinPayloadFunction.cs
+../../../external/Lucene.Net.Light/src/core/Search/Payloads/PayloadFunction.cs
+../../../external/Lucene.Net.Light/src/core/Search/Payloads/PayloadNearQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Payloads/PayloadSpanUtil.cs
+../../../external/Lucene.Net.Light/src/core/Search/Payloads/PayloadTermQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/PhrasePositions.cs
+../../../external/Lucene.Net.Light/src/core/Search/PhraseQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/PhraseQueue.cs
+../../../external/Lucene.Net.Light/src/core/Search/PhraseScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/PositiveScoresOnlyCollector.cs
+../../../external/Lucene.Net.Light/src/core/Search/PrefixFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/PrefixQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/PrefixTermEnum.cs
+../../../external/Lucene.Net.Light/src/core/Search/Query.cs
+../../../external/Lucene.Net.Light/src/core/Search/QueryTermVector.cs
+../../../external/Lucene.Net.Light/src/core/Search/QueryWrapperFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/ReqExclScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/ReqOptSumScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/ScoreCachingWrappingScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/ScoreDoc.cs
+../../../external/Lucene.Net.Light/src/core/Search/Scorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/Searchable.cs
+../../../external/Lucene.Net.Light/src/core/Search/Searcher.cs
+../../../external/Lucene.Net.Light/src/core/Search/Similarity.cs
+../../../external/Lucene.Net.Light/src/core/Search/SimilarityDelegator.cs
+../../../external/Lucene.Net.Light/src/core/Search/SingleTermEnum.cs
+../../../external/Lucene.Net.Light/src/core/Search/SloppyPhraseScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/Sort.cs
+../../../external/Lucene.Net.Light/src/core/Search/SortField.cs
+../../../external/Lucene.Net.Light/src/core/Search/SpanFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/SpanFilterResult.cs
+../../../external/Lucene.Net.Light/src/core/Search/SpanQueryFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/FieldMaskingSpanQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/NearSpansOrdered.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/NearSpansUnordered.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanFirstQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanNearQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanNotQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanOrQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/Spans.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanTermQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/SpanWeight.cs
+../../../external/Lucene.Net.Light/src/core/Search/Spans/TermSpans.cs
+../../../external/Lucene.Net.Light/src/core/Search/TermQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/TermRangeFilter.cs
+../../../external/Lucene.Net.Light/src/core/Search/TermRangeQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/TermRangeTermEnum.cs
+../../../external/Lucene.Net.Light/src/core/Search/TermScorer.cs
+../../../external/Lucene.Net.Light/src/core/Search/TimeLimitingCollector.cs
+../../../external/Lucene.Net.Light/src/core/Search/TopDocs.cs
+../../../external/Lucene.Net.Light/src/core/Search/TopDocsCollector.cs
+../../../external/Lucene.Net.Light/src/core/Search/TopFieldCollector.cs
+../../../external/Lucene.Net.Light/src/core/Search/TopFieldDocs.cs
+../../../external/Lucene.Net.Light/src/core/Search/TopScoreDocCollector.cs
+../../../external/Lucene.Net.Light/src/core/Search/Weight.cs
+../../../external/Lucene.Net.Light/src/core/Search/WildcardQuery.cs
+../../../external/Lucene.Net.Light/src/core/Search/WildcardTermEnum.cs
+../../../external/Lucene.Net.Light/src/core/Store/AlreadyClosedException.cs
+../../../external/Lucene.Net.Light/src/core/Store/BufferedIndexInput.cs
+../../../external/Lucene.Net.Light/src/core/Store/BufferedIndexOutput.cs
+../../../external/Lucene.Net.Light/src/core/Store/CheckSumIndexInput.cs
+../../../external/Lucene.Net.Light/src/core/Store/CheckSumIndexOutput.cs
+../../../external/Lucene.Net.Light/src/core/Store/Directory.cs
+../../../external/Lucene.Net.Light/src/core/Store/FileSwitchDirectory.cs
+../../../external/Lucene.Net.Light/src/core/Store/FSDirectory.cs
+../../../external/Lucene.Net.Light/src/core/Store/FSLockFactory.cs
+../../../external/Lucene.Net.Light/src/core/Store/IndexInput.cs
+../../../external/Lucene.Net.Light/src/core/Store/IndexOutput.cs
+../../../external/Lucene.Net.Light/src/core/Store/Lock.cs
+../../../external/Lucene.Net.Light/src/core/Store/LockFactory.cs
+../../../external/Lucene.Net.Light/src/core/Store/LockObtainFailedException.cs
+../../../external/Lucene.Net.Light/src/core/Store/LockReleaseFailedException.cs
+../../../external/Lucene.Net.Light/src/core/Store/LockStressTest.cs
+../../../external/Lucene.Net.Light/src/core/Store/LockVerifyServer.cs
+../../../external/Lucene.Net.Light/src/core/Store/MMapDirectory.cs
+../../../external/Lucene.Net.Light/src/core/Store/NativeFSLockFactory.cs
+../../../external/Lucene.Net.Light/src/core/Store/NIOFSDirectory.cs
+../../../external/Lucene.Net.Light/src/core/Store/NoLockFactory.cs
+../../../external/Lucene.Net.Light/src/core/Store/NoSuchDirectoryException.cs
+../../../external/Lucene.Net.Light/src/core/Store/RAMDirectory.cs
+../../../external/Lucene.Net.Light/src/core/Store/RAMFile.cs
+../../../external/Lucene.Net.Light/src/core/Store/RAMInputStream.cs
+../../../external/Lucene.Net.Light/src/core/Store/RAMOutputStream.cs
+../../../external/Lucene.Net.Light/src/core/Store/SimpleFSDirectory.cs
+../../../external/Lucene.Net.Light/src/core/Store/SimpleFSLockFactory.cs
+../../../external/Lucene.Net.Light/src/core/Store/SingleInstanceLockFactory.cs
+../../../external/Lucene.Net.Light/src/core/Store/VerifyingLockFactory.cs
+../../../external/Lucene.Net.Light/src/core/Support/AppSettings.cs
+../../../external/Lucene.Net.Light/src/core/Support/AttributeImplItem.cs
+../../../external/Lucene.Net.Light/src/core/Support/BitSetSupport.cs
+../../../external/Lucene.Net.Light/src/core/Support/BuildType.cs
+../../../external/Lucene.Net.Light/src/core/Support/Character.cs
+../../../external/Lucene.Net.Light/src/core/Support/CloseableThreadLocalProfiler.cs
+../../../external/Lucene.Net.Light/src/core/Support/CollectionsHelper.cs
+../../../external/Lucene.Net.Light/src/core/Support/Compare.cs
+../../../external/Lucene.Net.Light/src/core/Support/Compatibility/ConcurrentDictionary.cs
+../../../external/Lucene.Net.Light/src/core/Support/Compatibility/Func.cs
+../../../external/Lucene.Net.Light/src/core/Support/Compatibility/ISet.cs
+../../../external/Lucene.Net.Light/src/core/Support/Compatibility/SetFactory.cs
+../../../external/Lucene.Net.Light/src/core/Support/Compatibility/SortedSet.cs
+../../../external/Lucene.Net.Light/src/core/Support/Compatibility/ThreadLocal.cs
+../../../external/Lucene.Net.Light/src/core/Support/Compatibility/WrappedHashSet.cs
+../../../external/Lucene.Net.Light/src/core/Support/CRC32.cs
+../../../external/Lucene.Net.Light/src/core/Support/Cryptography.cs
+../../../external/Lucene.Net.Light/src/core/Support/Deflater.cs
+../../../external/Lucene.Net.Light/src/core/Support/Double.cs
+../../../external/Lucene.Net.Light/src/core/Support/EquatableList.cs
+../../../external/Lucene.Net.Light/src/core/Support/FileSupport.cs
+../../../external/Lucene.Net.Light/src/core/Support/GeneralKeyedCollection.cs
+../../../external/Lucene.Net.Light/src/core/Support/HashMap.cs
+../../../external/Lucene.Net.Light/src/core/Support/IChecksum.cs
+../../../external/Lucene.Net.Light/src/core/Support/Inflater.cs
+../../../external/Lucene.Net.Light/src/core/Support/IThreadRunnable.cs
+../../../external/Lucene.Net.Light/src/core/Support/Number.cs
+../../../external/Lucene.Net.Light/src/core/Support/OS.cs
+../../../external/Lucene.Net.Light/src/core/Support/SharpZipLib.cs
+../../../external/Lucene.Net.Light/src/core/Support/Single.cs
+../../../external/Lucene.Net.Light/src/core/Support/TextSupport.cs
+../../../external/Lucene.Net.Light/src/core/Support/ThreadClass.cs
+../../../external/Lucene.Net.Light/src/core/Support/ThreadLock.cs
+../../../external/Lucene.Net.Light/src/core/Support/WeakDictionary.cs
+../../../external/Lucene.Net.Light/src/core/Util/ArrayUtil.cs
+../../../external/Lucene.Net.Light/src/core/Util/Attribute.cs
+../../../external/Lucene.Net.Light/src/core/Util/AttributeSource.cs
+../../../external/Lucene.Net.Light/src/core/Util/AverageGuessMemoryModel.cs
+../../../external/Lucene.Net.Light/src/core/Util/BitUtil.cs
+../../../external/Lucene.Net.Light/src/core/Util/BitVector.cs
+../../../external/Lucene.Net.Light/src/core/Util/Cache/Cache.cs
+../../../external/Lucene.Net.Light/src/core/Util/Cache/SimpleLRUCache.cs
+../../../external/Lucene.Net.Light/src/core/Util/Cache/SimpleMapCache.cs
+../../../external/Lucene.Net.Light/src/core/Util/CloseableThreadLocal.cs
+../../../external/Lucene.Net.Light/src/core/Util/Constants.cs
+../../../external/Lucene.Net.Light/src/core/Util/DocIdBitSet.cs
+../../../external/Lucene.Net.Light/src/core/Util/FieldCacheSanityChecker.cs
+../../../external/Lucene.Net.Light/src/core/Util/IAttribute.cs
+../../../external/Lucene.Net.Light/src/core/Util/IdentityDictionary.cs
+../../../external/Lucene.Net.Light/src/core/Util/IndexableBinaryStringTools.cs
+../../../external/Lucene.Net.Light/src/core/Util/MapOfSets.cs
+../../../external/Lucene.Net.Light/src/core/Util/MemoryModel.cs
+../../../external/Lucene.Net.Light/src/core/Util/NumericUtils.cs
+../../../external/Lucene.Net.Light/src/core/Util/OpenBitSet.cs
+../../../external/Lucene.Net.Light/src/core/Util/OpenBitSetDISI.cs
+../../../external/Lucene.Net.Light/src/core/Util/OpenBitSetIterator.cs
+../../../external/Lucene.Net.Light/src/core/Util/PriorityQueue.cs
+../../../external/Lucene.Net.Light/src/core/Util/RamUsageEstimator.cs
+../../../external/Lucene.Net.Light/src/core/Util/ReaderUtil.cs
+../../../external/Lucene.Net.Light/src/core/Util/ScorerDocQueue.cs
+../../../external/Lucene.Net.Light/src/core/Util/SimpleStringInterner.cs
+../../../external/Lucene.Net.Light/src/core/Util/SmallFloat.cs
+../../../external/Lucene.Net.Light/src/core/Util/SortedVIntList.cs
+../../../external/Lucene.Net.Light/src/core/Util/SorterTemplate.cs
+../../../external/Lucene.Net.Light/src/core/Util/StringHelper.cs
+../../../external/Lucene.Net.Light/src/core/Util/StringInterner.cs
+../../../external/Lucene.Net.Light/src/core/Util/ToStringUtils.cs
+../../../external/Lucene.Net.Light/src/core/Util/UnicodeUtil.cs
+../../../external/Lucene.Net.Light/src/core/Util/Version.cs
index 02709af2ba7bf6f541646aadf7f5ff95ad11482f..fcb63961d23eaa7a64e09ba4c7bc835ea05214ac 100644 (file)
@@ -14,5 +14,9 @@ namespace MonoTests.Helpers {
                        l.Stop();
                        return port;
                }
+               public static IPEndPoint LocalEphemeralEndPoint ()
+               {
+                       return new IPEndPoint (IPAddress.Loopback, FindFreePort());
+               }
        }
 }
diff --git a/mcs/errors/CS0101-9-2.cs b/mcs/errors/CS0101-9-2.cs
new file mode 100644 (file)
index 0000000..8b42750
--- /dev/null
@@ -0,0 +1,4 @@
+namespace N
+{
+       class Test<T> {}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0101-9.cs b/mcs/errors/cs0101-9.cs
new file mode 100644 (file)
index 0000000..9ae3a3a
--- /dev/null
@@ -0,0 +1,8 @@
+// CS0101: The namespace `N' already contains a definition for `Test<T>'
+// Line: 7
+// Compiler options: CS0101-9-2.cs
+
+namespace N
+{
+       class Test<T> {}
+}
\ No newline at end of file
diff --git a/mcs/ilasm/codegen/AssemblyNameStore.cs b/mcs/ilasm/codegen/AssemblyNameStore.cs
deleted file mode 100644 (file)
index e138a63..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// Mono.ILASM.AssemblyNameStore
-//
-// Author(s):
-//  Jackson Harper (Jackson@LatitudeGeo.com)
-//
-// (C) 2003 Jackson Harper, All rights reserved
-//
-
-
-using System;
-using System.Reflection;
-using System.Collections;
-
-namespace Mono.ILASM {
-
-       public class AssemblyNameStore {
-       
-               private Hashtable name_store;
-
-               public AssemblyNameStore ()
-               {
-
-               }
-
-               public void Add (AssemblyName assembly_name) 
-               {
-                       if (name_store == null)
-                               name_store = new Hashtable ();
-                       name_store.Add (assembly_name.Name, assembly_name);
-               }
-
-               public Assembly Get (string name)
-               {
-                       AssemblyName assembly_name;
-
-                       assembly_name = (AssemblyName)name_store[name];
-
-                       if (assembly_name == null)
-                               return null;
-                               
-                       return Assembly.Load (assembly_name);
-               }
-       }
-
-}
-
diff --git a/mcs/ilasm/codegen/Class.cs b/mcs/ilasm/codegen/Class.cs
deleted file mode 100644 (file)
index 58a946c..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-// Class.cs\r
-// (C) Sergey Chaban (serge@wildwestsoftware.com)\r
-\r
-using System;\r
-using System.Collections;\r
-using System.Reflection;\r
-using System.Reflection.Emit;\r
-\r
-namespace Mono.ILASM {\r
-\r
-       /// <summary>\r
-       /// </summary>\r
-       public class ClassName {\r
-\r
-               private string name;\r
-               private string assembly;\r
-               private string module;\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <param name="name"></param>\r
-               public ClassName (string name) {\r
-                       this.name = name;\r
-                       this.assembly = String.Empty;\r
-                       this.module = String.Empty;\r
-               }\r
-\r
-\r
-               public string Name {\r
-                       get {\r
-                               return name;\r
-                       }\r
-               }\r
-\r
-\r
-       }\r
-\r
-\r
-       /// <summary>\r
-       /// </summary>\r
-       public class Class {\r
-\r
-               private string name;\r
-\r
-               // extends clause\r
-               private ClassName baseClass;\r
-\r
-               // implements clause\r
-               private ArrayList interfaces;\r
-\r
-               private ArrayList methods;\r
-\r
-               private TypeBuilder tb;\r
-\r
-               private CodeGen codgen;\r
-\r
-               private TypeAttributes attrs;\r
-\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <param name="name"></param>\r
-               public Class (string name)\r
-               {\r
-                       this.name = name;\r
-               }\r
-\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <param name="m"></param>\r
-               public void AddMethod (Method m)\r
-               {\r
-                       if (methods == null) methods = new ArrayList ();\r
-                       methods.Add (m);\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public CodeGen CodeGen {\r
-                       get {\r
-                               return codgen;\r
-                       }\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public TypeAttributes Attrs {\r
-                       get {\r
-                               return attrs;\r
-                       }\r
-                       set {\r
-                               attrs = value;\r
-                       }\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public TypeBuilder TypeBuilder {\r
-                       get {\r
-                               if (tb == null && codgen != null) {\r
-                                       tb = codgen.ModBuilder.DefineType (name, Attrs);\r
-                               }\r
-                               return tb;\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <param name="cg"></param>\r
-               public void Emit (CodeGen cg)\r
-               {\r
-                       codgen = cg;\r
-                       \r
-                       TypeBuilder.CreateType();\r
-                       cg.TypeManager[name] = TypeBuilder;\r
-\r
-                       if (methods != null) {\r
-                               foreach (Method m in methods) \r
-                                       m.Resolve (this);\r
-                       }\r
-\r
-                       if (methods != null) {\r
-                               foreach (Method m in methods) {\r
-                                       m.Emit (this);\r
-                                       if (m.IsEntryPoint)\r
-                                               cg.SetEntryPoint (m.Builder);\r
-                               }\r
-                       }       \r
-               }\r
-               \r
-               // This can be removed when System.Reflection.Emit.TypeBuilder.GetMethod is implemented\r
-               // TODO: This function needs allot of work\r
-               public MethodInfo GetMethod (string method_name, BindingFlags binding_flags,\r
-                       Type[] param_type_list)\r
-               {\r
-                       foreach (Method method in methods) {\r
-                               if (method.Name != method_name)\r
-                                       continue;\r
-                               ParameterInfo[] param_info = method.Builder.GetParameters ();\r
-                               if (param_info == null) {\r
-                                       if (param_type_list.Length == 0)\r
-                                               return method.Builder;\r
-                                       else\r
-                                               continue;\r
-                               }\r
-                               int size = param_info.Length;\r
-                               if (param_type_list.Length != size)\r
-                                       continue;\r
-                               for (int i=0; i<size; i++) {\r
-                                       if (param_type_list[i] != param_info[i].ParameterType)\r
-                                               goto end;       \r
-                               }\r
-\r
-                               return method.Builder;\r
-                               end: continue;\r
-                       }\r
-       \r
-                       return null;\r
-               }\r
-       }\r
-}\r
-\r
diff --git a/mcs/ilasm/codegen/ClassTable.cs b/mcs/ilasm/codegen/ClassTable.cs
deleted file mode 100644 (file)
index 0c2b5ad..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-//
-// Mono.ILASM.ClassTable.cs
-//
-// Author(s):
-//  Jackson Harper (Jackson@LatitudeGeo.com)
-//
-// (C) 2003 Jackson Harper, All rights reserved
-//
-
-using PEAPI;
-using System;
-using System.Collections;
-
-namespace Mono.ILASM {
-
-        public class ClassTable {
-
-                private class ClassTableItem {
-
-                        private static readonly int DefinedFlag = 2;
-
-                        private int flags;
-
-                        public ArrayList LocationList;
-                        public ClassDef Class;
-                        public MethodTable method_table;
-                        public FieldTable field_table;
-
-                        public ClassTableItem (ClassDef klass, Location location)
-                        {
-                                flags = 0;
-                                Class = klass;
-                                LocationList = new ArrayList ();
-                                LocationList.Add (location);
-                                method_table = new MethodTable (klass);
-                                field_table = new FieldTable (klass);
-                        }
-
-                        public bool Defined {
-                                get { return ((flags & DefinedFlag) != 0); }
-                                set {
-                                        if (value)
-                                                flags |= DefinedFlag;
-                                        else
-                                                flags ^= DefinedFlag;
-                                }
-                        }
-
-                        public bool CheckDefined ()
-                        {
-                                if (!Defined)
-                                        return false;
-
-                                if (!FieldTable.CheckDefined ())
-                                        return false;
-
-                                if (!MethodTable.CheckDefined ())
-                                        return false;
-
-                                return true;
-                        }
-
-                        public MethodTable MethodTable {
-                                get { return method_table; }
-                        }
-
-                        public FieldTable FieldTable {
-                                get { return field_table; }
-                        }
-
-                }
-
-                protected readonly TypeAttr DefaultAttr;
-                protected Hashtable table;
-                protected PEFile pefile;
-
-                public ClassTable (PEFile pefile)
-                {
-                        DefaultAttr = TypeAttr.Public;
-                        this.pefile = pefile;
-                        table = new Hashtable ();
-                }
-
-                public Class Get (string full_name)
-                {
-                        ClassTableItem item = table[full_name] as ClassTableItem;
-
-                        if (item == null)
-                                return null;
-
-                        return item.Class;
-                }
-
-                public Class GetReference (string full_name, Location location)
-                {
-                        ClassTableItem item = table[full_name] as ClassTableItem;
-
-                        if (item != null) {
-                                item.LocationList.Add (location);
-                                return item.Class;
-                        }
-
-                        string name_space, name;
-                        GetNameAndNamespace (full_name, out name_space, out name);
-                        ClassDef klass = pefile.AddClass (DefaultAttr, name_space, name);
-                        AddReference (full_name, klass, location);
-
-                        return klass;
-                }
-
-                public MethodTable GetMethodTable (string full_name, Location location)
-                {
-                        ClassTableItem item = table[full_name] as ClassTableItem;
-
-                        if (item == null) {
-                                GetReference (full_name, location);
-                                return GetMethodTable (full_name, location);
-                        }
-
-                        return item.MethodTable;
-                }
-
-                public FieldTable GetFieldTable (string full_name, Location location)
-                {
-                        ClassTableItem item = table[full_name] as ClassTableItem;
-
-                        if (item == null) {
-                                GetReference (full_name, location);
-                                return GetFieldTable (full_name, location);
-                        }
-
-                        return item.FieldTable;
-                }
-
-                public ClassDef AddDefinition (string name_space, string name,
-                        TypeAttr attr, Location location)
-                {
-                        string full_name;
-
-                        if (name_space != null)
-                                full_name = String.Format ("{0}.{1}", name_space, name);
-                        else
-                                full_name = name;
-
-                        ClassTableItem item = (ClassTableItem) table[full_name];
-
-                        if (item == null) {
-                                ClassDef klass = pefile.AddClass (attr, name_space, name);
-                                AddDefined (full_name, klass, location);
-                                return klass;
-                        }
-
-                        item.Class.AddAttribute (attr);
-                        item.Defined = true;
-
-                        return item.Class;
-                }
-
-                public ClassDef AddDefinition (string name_space, string name,
-                        TypeAttr attr, Class parent, Location location)
-                {
-                        string full_name;
-
-                        if (name_space != null)
-                                full_name = String.Format ("{0}.{1}", name_space, name);
-                        else
-                                full_name = name;
-
-                        ClassTableItem item = (ClassTableItem) table[full_name];
-
-                        if (item == null) {
-                                ClassDef klass = pefile.AddClass (attr, name_space, name, parent);
-                                AddDefined (full_name, klass, location);
-                                return klass;
-                        }
-
-                        /// TODO: Need to set parent, will need to modify PEAPI for this.
-                        item.Class.AddAttribute (attr);
-                        item.Defined = true;
-
-                        return item.Class;
-                }
-
-                /// <summary>
-                ///  When there is no code left to compile, check to make sure referenced types where defined
-                ///  TODO: Proper error reporting
-                /// </summary>
-                public void CheckForUndefined ()
-                {
-                        foreach (DictionaryEntry dic_entry in table) {
-                                ClassTableItem table_item = (ClassTableItem) dic_entry.Value;
-                                if (table_item.CheckDefined ())
-                                        continue;
-                                Report.Error (String.Format ("Type: {0} is not defined.", dic_entry.Key));
-                        }
-                }
-
-                /// <summary>
-                ///  If a type is allready defined throw an Error
-                /// </summary>
-                protected void CheckExists (string full_name)
-                {
-                        ClassTableItem item = table[full_name] as ClassTableItem;
-
-                        if ((item != null) && (item.Defined)) {
-                                Report.Error (String.Format ("Class: {0} defined in multiple locations.",
-                                        full_name));
-                        }
-                }
-
-                protected void AddDefined (string full_name, ClassDef klass, Location location)
-                {
-                        if (table.Contains (full_name))
-                                return;
-
-                        ClassTableItem item = new ClassTableItem (klass, location);
-                        item.Defined = true;
-
-                        table[full_name] = item;
-                }
-
-                protected void AddReference (string full_name, ClassDef klass, Location location)
-                {
-                        if (table.Contains (full_name))
-                                return;
-
-                        ClassTableItem item = new ClassTableItem (klass, location);
-
-                        table[full_name] = item;
-                }
-
-                public static void GetNameAndNamespace (string full_name,
-                        out string name_space, out string name) {
-
-                        int last_dot = full_name.LastIndexOf ('.');
-
-                        if (last_dot < 0) {
-                                name_space = String.Empty;
-                                name = full_name;
-                                return;
-                        }
-
-                        name_space = full_name.Substring (0, last_dot);
-                        name = full_name.Substring (last_dot + 1);
-                }
-
-        }
-
-}
-
diff --git a/mcs/ilasm/codegen/ExternTypeRefInst.cs b/mcs/ilasm/codegen/ExternTypeRefInst.cs
deleted file mode 100644 (file)
index 6d01117..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-//
-// Mono.ILASM.ExternTypeRefInst
-//
-// Author(s):
-//  Jackson Harper (Jackson@LatitudeGeo.com)
-//
-// (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
-
-using System;
-using System.Collections;
-
-namespace Mono.ILASM {
-
-       public class ExternTypeRefInst : BaseTypeRef {
-
-               private ExternTypeRef type_ref;
-               private PEAPI.Type type;
-               private bool is_valuetypeinst;
-               private bool is_resolved;
-               private GenericArguments gen_args;
-               private static Hashtable method_table = new Hashtable ();
-
-               public ExternTypeRefInst (ExternTypeRef type_ref, GenericArguments gen_args, bool is_valuetypeinst)
-               {
-                       this.type_ref = type_ref;
-                       this.gen_args = gen_args;
-                       this.is_valuetypeinst = is_valuetypeinst;
-
-                       is_resolved = false;
-               }
-
-               public PEAPI.Type PeapiType {
-                       get { return type; }
-               }
-
-               public string FullName {
-                       get { return type_ref.FullName; }
-               }
-
-
-               public string SigMod {
-                       get { return type_ref.SigMod; }
-                       set { type_ref.SigMod = value; }
-               }
-
-               
-               public bool IsPinned {
-                       get { return type_ref.IsPinned; }
-               }
-
-               public bool IsRef {
-                       get { return type_ref.IsRef; }
-               }
-
-               public bool IsArray {
-                       get { return type_ref.IsArray; }
-               }
-
-               public bool UseTypeSpec {
-                       get { return type_ref.UseTypeSpec; }
-               }
-
-                public ExternTypeRefInst Clone ()
-               {
-                       return new ExternTypeRefInst (type_ref.Clone (), gen_args, is_valuetypeinst);
-               }
-
-               public void MakeArray ()
-               {
-                       is_valuetypeinst = false;
-                       type_ref.MakeArray ();
-               }
-
-               public void MakeBoundArray (ArrayList bounds)
-               {
-                       is_valuetypeinst = false;
-                       type_ref.MakeBoundArray (bounds);
-               }
-
-               public void MakeManagedPointer ()
-               {
-                       type_ref.MakeManagedPointer ();
-               }
-
-               public void MakeUnmanagedPointer ()
-               {
-                       type_ref.MakeUnmanagedPointer ();
-               }
-
-               public void MakeCustomModified (CodeGen code_gen,
-                               PEAPI.CustomModifier modifier, BaseClassRef klass)
-               {
-                       type_ref.MakeCustomModified (code_gen, modifier, klass);
-               }
-
-               public void MakePinned ()
-               {
-                       type_ref.MakePinned ();
-               }
-
-               public void MakeValueClass ()
-               {
-                       type_ref.MakeValueClass ();
-               }
-
-               public void Resolve (CodeGen code_gen)
-               {
-                       if (is_resolved)
-                               return;
-
-                       type_ref.Resolve (code_gen);
-
-                       type = new PEAPI.GenericTypeInst (type_ref.PeapiType, gen_args.Resolve (code_gen));
-
-                       is_resolved = true;
-               }
-
-               public BaseMethodRef GetMethodRef (BaseTypeRef ret_type, PEAPI.CallConv call_conv,
-                               string name, BaseTypeRef[] param, int gen_param_count)
-               {
-                       string key = type_ref.FullName + MethodDef.CreateSignature (ret_type, name, param, gen_param_count) + type_ref.SigMod;
-                       TypeSpecMethodRef mr = method_table [key] as TypeSpecMethodRef;
-                       if (mr == null) {        
-                               mr = new TypeSpecMethodRef (this, ret_type, call_conv, name, param, gen_param_count);
-                               method_table [key] = mr;
-                       }
-
-                       return mr;
-               }
-
-               public IFieldRef GetFieldRef (BaseTypeRef ret_type, string name)
-               {
-                       return new TypeSpecFieldRef (this, ret_type, name);
-               }
-       }
-}
-
diff --git a/mcs/ilasm/codegen/FieldTable.cs b/mcs/ilasm/codegen/FieldTable.cs
deleted file mode 100644 (file)
index 0a5aa46..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-//
-// Mono.ILASM.FieldTable.cs
-//
-// Author(s):
-//  Jackson Harper (Jackson@LatitudeGeo.com)
-//
-// (C) 2003 Jackson Harper, All rights reserved
-//
-
-using PEAPI;
-using System;
-using System.Text;
-using System.Collections;
-
-namespace Mono.ILASM {
-
-       public class FieldTable {
-
-               private class FieldTableItem {
-               
-                       private static readonly int DefinedFlag = 2;
-       
-                       private int flags;
-
-                       public ArrayList LocationList;
-                       public FieldDef Field;
-
-                       public FieldTableItem (FieldDef field, Location location)
-                       {
-                               flags = 0;
-                               Field = field;
-                               LocationList = new ArrayList ();
-                               LocationList.Add (location);
-                       }
-               
-                       public bool Defined {
-                               get { return ((flags & DefinedFlag) != 0); }
-                               set {
-                                       if (value)
-                                               flags |= DefinedFlag;
-                                       else
-                                               flags ^= DefinedFlag;
-                               }
-                       }
-               }
-
-               protected Hashtable table;
-               protected ClassDef parent_class;
-               
-               public FieldTable (ClassDef parent_class)
-               {
-                       this.parent_class = parent_class;
-                       table = new Hashtable ();
-               }
-
-               public Field GetReference (TypeRef type, string name, Location location)
-               {
-                       FieldTableItem item = table[name] as FieldTableItem;
-                       
-                       if (item != null) {
-                               item.LocationList.Add (location);
-                               return item.Field;
-                       }
-                       
-                       FieldDef field = parent_class.AddField (name, type.Type);
-                       AddReferenced (name, field, location);
-
-                       return field;
-               }
-       
-               public FieldDef AddDefinition (FieldAttr field_attr, string name, 
-                       TypeRef type, Location location) 
-               {
-                       FieldTableItem item = (FieldTableItem) table[name];
-                       
-                       if (item == null) {
-                               FieldDef field = parent_class.AddField (field_attr, name, type.Type);
-                               AddDefined (name, field, location);
-                               return field;
-                       }
-                       
-                       item.Field.AddFieldAttr (field_attr);
-                       item.Defined = true;
-                       
-                       return item.Field;
-               }
-
-               public bool CheckDefined ()
-               {
-                       foreach (DictionaryEntry dic_entry in table) {
-                               FieldTableItem table_item = (FieldTableItem) dic_entry.Value;
-                               if (table_item.Defined)
-                                       continue;
-                               Report.Error (String.Format ("Field: {0} is not defined.", dic_entry.Key));
-                       }
-                       return true;
-               }
-                       
-               protected void AddDefined (string signature, FieldDef field, Location location)
-               {
-                       if (table.Contains (signature))
-                               return; 
-
-                       FieldTableItem item = new FieldTableItem (field, location);
-                       item.Defined = true;
-
-                       table[signature] = item;
-               }
-
-               protected void AddReferenced (string signature, FieldDef field, Location location)
-               {
-                       FieldTableItem item = new FieldTableItem (field, location);
-                       
-                       table[signature] = item;
-               }
-
-               /// <summary>
-               ///  If a field is allready defined throw an Error
-               /// </summary>
-               protected void CheckExists (string signature) 
-               {
-                       FieldTableItem item = table[signature] as FieldTableItem;
-                       
-                       if ((item != null) && (item.Defined))
-                               Report.Error ("Field: " + signature + " defined in multiple locations.");
-               }
-       }
-
-}
-
diff --git a/mcs/ilasm/codegen/IClassRef.cs b/mcs/ilasm/codegen/IClassRef.cs
deleted file mode 100644 (file)
index 699edad..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// Mono.ILASM.IClassRef
-//
-// Author(s):
-//  Jackson Harper (Jackson@LatitudeGeo.com)
-//  Ankit Jain  (JAnkit@novell.com)
-//
-// (C) 2003 Jackson Harper, All rights reserved
-// (C) 2005 Novell, Inc (http://www.novell.com)
-//
-
-using System;
-
-namespace Mono.ILASM {
-
-        public interface BaseClassRef : BaseTypeRef {
-
-                PEAPI.Class PeapiClass { get; }
-
-                void MakeValueClass ();
-
-                IClassRef Clone ();
-                
-                /* Returns the Generic Instance for the BaseClassRef */
-                GenericTypeInst GetGenericTypeInst (GenericArguments gen_args);
-
-                /* Resolves the Generic instance and returns the 
-                   resolved type (typically, PEAPI.GenericTypeInst) */
-                PEAPI.Type ResolveInstance (CodeGen code_gen, GenericArguments gen_args);
-        }
-
-}
-
diff --git a/mcs/ilasm/codegen/ITypeRef.cs b/mcs/ilasm/codegen/ITypeRef.cs
deleted file mode 100644 (file)
index 80333ee..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// Mono.ILASM.BaseTypeRef
-//
-// Interface that all Type references must implement
-//
-// Author(s):
-//  Jackson Harper (Jackson@LatitudeGeo.com)
-//
-// (C) 2003 Jackson Harper, All rights reserved
-//
-
-
-using System;
-using System.Collections;
-
-namespace Mono.ILASM {
-
-        public interface ITypeRef {
-
-                /// <summary>
-                ///  The full name of the type, <namespace>.<name>
-                /// ie System.Collections.ArrayList
-                /// </summary>
-                string FullName { get; }
-
-                bool IsPinned { get; }
-                bool IsRef { get; }
-                bool IsArray { get; }
-                bool UseTypeSpec { get; }
-
-                /// <summary>
-                ///  The PEAPI.Type of this typeref, this is not guaranteed
-                ///  to be correct untill after this is resolved.
-                /// </summary>
-                PEAPI.Type PeapiType { get; }
-
-                /// <summary>
-                ///  Convert this typeref into a zero based array
-                /// </summary>
-                void MakeArray ();
-
-                /// <summary>
-                ///  Convert this typeref into a bound array. The ArrayList
-                ///  should be in the format Entry (lower_bound, upper_bound) with
-                ///  null being used for unset bounds.
-                /// </summary>
-                void MakeBoundArray (ArrayList bounds);
-
-                /// <summary>
-                ///  Convert this typeref into a reference
-                /// </summary>
-                void MakeManagedPointer ();
-
-                /// <summary>
-                ///  Convert this typeref into an unmanaged pointer
-                /// </summary>
-                void MakeUnmanagedPointer ();
-
-                /// <summary>
-                ///  Convert this typeref into a CustomModifiedType
-                /// </summary>
-                void MakeCustomModified (CodeGen code_gen,
-                                PEAPI.CustomModifier modifier, IClassRef klass);
-
-                /// <summary>
-                ///  Make this typeref pinned.
-                /// </summary>
-                void MakePinned ();
-
-                void Resolve (CodeGen code_gen);
-
-                BaseMethodRef GetMethodRef (ITypeRef ret_type, PEAPI.CallConv call_conv,
-                                string name, ITypeRef[] param, int gen_param_count);
-
-                IFieldRef GetFieldRef (ITypeRef ret_type, string name);
-
-                /// <summary>
-                ///  Convert this typeref to a classref if not possible
-                ///  throw an exception
-                /// </summary>
-                // IClassRef AsClassRef (CodeGen code_gen);
-        }
-
-}
-
diff --git a/mcs/ilasm/codegen/Location.cs b/mcs/ilasm/codegen/Location.cs
deleted file mode 100644 (file)
index 2fc4637..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Mono.ILASM.Location.cs
-//
-// Author(s):
-//  Jackson Harper (Jackson@LatitudeGeo.com)
-//
-// (C) 2003 Jackson Harper, All rights reserved
-//
-
-using System;
-
-namespace Mono.ILASM {
-
-        /// TODO: This class will eventually store il file location info,
-        /// like line and col
-        public class Location
-        {
-
-        }
-
-}
-
diff --git a/mcs/ilasm/codegen/Method.cs b/mcs/ilasm/codegen/Method.cs
deleted file mode 100644 (file)
index a52ce89..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-// Method.cs\r
-// (C) Sergey Chaban (serge@wildwestsoftware.com)\r
-\r
-using System;\r
-using System.Collections;\r
-using System.Reflection;\r
-using System.Reflection.Emit;\r
-\r
-namespace Mono.ILASM {\r
-\r
-\r
-       public class MethodName {\r
-               private static int methodCount = 0;\r
-\r
-               private bool isCtor;\r
-               private string name;\r
-               \r
-               /// <summary>\r
-               /// </summary>\r
-               public MethodName () : this ("M_" + (methodCount++))\r
-               {\r
-               }\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <param name="name"></param>\r
-               public MethodName (string name) : this (name, false)\r
-               {\r
-               }\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <param name="name"></param>\r
-               /// <param name="ctor"></param>\r
-               public MethodName (string name, bool ctor)\r
-               {\r
-                       this.name = name;\r
-                       this.isCtor = ctor;\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public string Name {\r
-                       get {\r
-                               return name;\r
-                       }\r
-                       set {\r
-                               name = value;\r
-                       }\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public bool IsCtor {\r
-                       get {\r
-                               return isCtor;\r
-                       }\r
-                       set {\r
-                               isCtor = value;\r
-                       }\r
-               }\r
-\r
-       }\r
-\r
-\r
-\r
-       /// <summary>\r
-       /// </summary>\r
-       public class Method {\r
-\r
-               private MethodName name;\r
-               private MethodAttributes attrs;\r
-               private CallingConventions callConv;\r
-               private string retType;\r
-               private MethodBuilder method_builder;\r
-               private bool entry_point = false;\r
-\r
-               private ArrayList param_list;\r
-               private ArrayList instructions;\r
-               private ArrayList local_list;\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public Method ()\r
-               {\r
-                       name = new MethodName ();\r
-                       attrs = 0;\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public string Name {\r
-                       get {\r
-                               return name.Name;\r
-                       }\r
-                       set {\r
-                               name.Name = value;\r
-                       }\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <param name="name"></param>\r
-               public void SetMethodName (MethodName name)\r
-               {\r
-                       this.name = name;\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public bool IsCtor {\r
-                       get {\r
-                               return name.IsCtor;\r
-                       }\r
-                       set {\r
-                               name.IsCtor = value;\r
-                       }\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public string RetType {\r
-                       get {\r
-                               return retType;\r
-                       }\r
-                       set {\r
-                               retType = value;\r
-                       }\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public MethodAttributes Attrs {\r
-                       get {\r
-                               return attrs;\r
-                       }\r
-                       set {\r
-                               attrs = value;\r
-                       }\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public CallingConventions CallConv {\r
-                       get {\r
-                               return callConv;\r
-                       }\r
-                       set {\r
-                               callConv = value;\r
-                       }\r
-               }\r
-\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public bool IsEntryPoint {\r
-                       get {\r
-                               return entry_point;\r
-                       }\r
-                       set {\r
-                               entry_point = value;\r
-                       }\r
-               }               \r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <param name="instr"></param>\r
-               public void AddInstruction (InstrBase instr)\r
-               {\r
-                       if (instr == null) {\r
-                               throw new InternalErrorException ("<null> instruction");\r
-                       }\r
-\r
-                       if (instructions == null) {\r
-                               this.instructions = new ArrayList ();\r
-                       }\r
-\r
-                       instructions.Add (instr);\r
-               }\r
-\r
-               public void AddLocal (DictionaryEntry local)\r
-               {\r
-                       if (local_list == null)\r
-                               local_list = new ArrayList ();\r
-\r
-                       local_list.Add (local);\r
-       \r
-               }\r
-\r
-               public void SetParamList (ArrayList param_list)\r
-               {\r
-                       this.param_list = param_list;\r
-               }\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               public int InstrCount {\r
-                       get {\r
-                               return (instructions != null) ? instructions.Count : 0;\r
-                       }\r
-               }\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <returns></returns>\r
-               public override string ToString ()\r
-               {\r
-                       return String.Format ("IL.Method [Name: {0}, Attrs: {1}, CallConv: {2}, RetType: {3}, Instr: {4}]",\r
-                                             Name, Attrs, CallConv, RetType, InstrCount);\r
-               }\r
-\r
-               public MethodBuilder Builder {\r
-                       get {\r
-                               return method_builder;\r
-                       }\r
-               }\r
-\r
-               public void Resolve (Class host)\r
-               {\r
-                       Type return_type = host.CodeGen.TypeManager[RetType];\r
-                       method_builder = host.TypeBuilder.DefineMethod (Name, Attrs, \r
-                               CallConv, return_type, CreateTypeList (host.CodeGen.TypeManager));\r
-               }\r
-\r
-               /// <summary>\r
-               /// </summary>\r
-               /// <param name="tb"></param>\r
-               public void Emit (Class host)\r
-               {\r
-                       TypeBuilder tb = host.TypeBuilder;\r
-\r
-                       if (IsCtor) {\r
-                       } else {\r
-                               ILGenerator ilgen = method_builder.GetILGenerator ();\r
-\r
-                               if (local_list != null) {\r
-                                       foreach (DictionaryEntry local in local_list) {\r
-                                               Type local_type = host.CodeGen.TypeManager[(string)local.Key];\r
-                                               if (local_type == null) {\r
-                                                       Console.WriteLine ("Could not find type: {0}", local.Key);\r
-                                                       return;\r
-                                               }\r
-                                               ilgen.DeclareLocal (local_type);\r
-                                       }\r
-                               }\r
-\r
-                               if (instructions != null) {\r
-                                       foreach (InstrBase instr in instructions)\r
-                                               instr.Emit (ilgen, host);\r
-                               }\r
-                       }\r
-               }\r
-\r
-               private Type[] CreateTypeList (TypeManager type_manager)\r
-               {\r
-                       if (param_list == null)\r
-                               return new Type[0];\r
-\r
-                       int count = param_list.Count;\r
-                       Type[] type_list = new Type[count];\r
-                       \r
-                       for (int i=0; i<count; i++) {\r
-                               type_list[i] = type_manager[(string) param_list[i]];\r
-                       }\r
-               \r
-                       return type_list;\r
-               }\r
-\r
-       }\r
-\r
-       \r
-}\r
index a13d9f1f9f2e2d803757ff38c7aec06e8cf6295f..7c5e5fc8a9f7acf2fc3c6f438fe58bf1406507ed 100644 (file)
@@ -707,13 +707,16 @@ namespace Mono.ILASM {
                         if (IsVararg)
                                 signature = CreateVarargSignature (RetType, name, param_list);
                         else
-                                signature = CreateSignature (RetType, name, param_list, GenParamCount);
+                                signature = CreateSignature (RetType, name, param_list, GenParamCount, Attributes);
                 }
 
-                static string CreateSignature (BaseTypeRef RetType, string name, IList param_list, int gen_param_count)
+                               static string CreateSignature (BaseTypeRef RetType, string name, IList param_list, int gen_param_count, PEAPI.MethAttr attrs)
                 {
                         StringBuilder builder = new StringBuilder ();
 
+                                               if ((attrs & PEAPI.MethAttr.Static) == 0)
+                                                       builder.Append ("instance ");
+
                        builder.Append (RetType.FullName);
                        builder.Append (" ");
                         builder.Append (name);
@@ -777,10 +780,10 @@ namespace Mono.ILASM {
                         if ((call_conv & PEAPI.CallConv.Vararg) != 0)
                                 return CreateVarargSignature (RetType, name, param_list, include_optional);
                         else
-                                return CreateSignature (RetType, name, param_list, gen_param_count, include_optional);
+                                return CreateSignature (RetType, name, param_list, gen_param_count, include_optional, call_conv);
                 }
 
-                static string CreateVarargSignature (BaseTypeRef RetType, string name, BaseTypeRef [] param_list, bool include_optional)
+                               static string CreateVarargSignature (BaseTypeRef RetType, string name, BaseTypeRef [] param_list, bool include_optional)
                 {
                         StringBuilder builder = new StringBuilder ();
                         BaseTypeRef last = null;
@@ -815,10 +818,14 @@ namespace Mono.ILASM {
                         return builder.ToString ();
                 }
 
-                static string CreateSignature (BaseTypeRef RetType, string name, BaseTypeRef[] param_list, int gen_param_count, bool include_optional)
+                               static string CreateSignature (BaseTypeRef RetType, string name, BaseTypeRef[] param_list, int gen_param_count, bool include_optional, PEAPI.CallConv call_conv)
                 {
                         StringBuilder builder = new StringBuilder ();
 
+                                               if ((call_conv & PEAPI.CallConv.Instance) != 0)
+                                                       builder.Append ("instance ");
+
+
                        builder.Append (RetType.FullName);
                        builder.Append (" ");
                         builder.Append (name);
index 5c0553febf0424ae80cc9d05006118c9840ab77c..698237c8d78c515524704be9f492c6b36c0b6c22 100644 (file)
@@ -32,13 +32,6 @@ namespace Mono.ILASM {
                        if (owner_def == null)
                                Report.Error ("Reference to undefined class '" + owner.FullName + "'");
 
-                        string write_name;
-
-                        if (name == "<init>")
-                                write_name = ".ctor";
-                        else
-                                write_name = name;
-
                         if ((call_conv & PEAPI.CallConv.Vararg) == 0) {
                                 peapi_method = owner_def.ResolveMethod (ret_type, call_conv, name, 
                                         param, gen_param_count, code_gen);
diff --git a/mcs/ilasm/codegen/MethodTable.cs b/mcs/ilasm/codegen/MethodTable.cs
deleted file mode 100644 (file)
index 2ac19d1..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-//
-// Mono.ILASM.MethodTable.cs
-//
-// Author(s):
-//  Jackson Harper (Jackson@LatitudeGeo.com)
-//
-// (C) 2003 Jackson Harper, All rights reserved
-//
-
-using PEAPI;
-using System;
-using System.Text;
-using System.Collections;
-
-namespace Mono.ILASM {
-
-
-       public delegate void MethodDefinedEvent (object sender, MethodDefinedEventArgs args);
-       public delegate void MethodReferencedEvent (object sender, MethodReferencedEventArgs args);
-
-       public class MethodEventArgs : EventArgs {
-               
-               public readonly string Signature;
-               public readonly string Name;
-               public readonly TypeRef ReturnType;
-               public readonly Param[] ParamList;
-               public readonly bool IsInTable;
-
-               public MethodEventArgs (string signature, string name,
-                       TypeRef return_type, Param[] param_list, bool is_in_table) 
-               {
-                       Signature = signature;
-                       Name = name;
-                       ReturnType = return_type;
-                       ParamList = param_list;
-                       IsInTable = is_in_table;
-               }
-       }
-
-       public class MethodDefinedEventArgs : MethodEventArgs {
-
-               public readonly MethAttr MethodAttributes;
-               public readonly ImplAttr ImplAttributes;
-               public readonly CallConv CallConv;
-               
-               public MethodDefinedEventArgs (string signature, string name, 
-                       TypeRef return_type, Param[] param_list, bool is_in_table, MethAttr method_attr, 
-                       ImplAttr impl_attr, CallConv call_conv) : base (signature, name, 
-                       return_type, param_list, is_in_table)
-               {
-                       MethodAttributes = method_attr;
-                       ImplAttributes = impl_attr;
-                       CallConv = call_conv;
-               }
-       }
-
-       public class MethodReferencedEventArgs : MethodEventArgs {
-               
-               public MethodReferencedEventArgs (string signature, string name, 
-                       TypeRef return_type, Param[] param_list, bool is_in_table) : base (signature, name, 
-                       return_type, param_list, is_in_table)
-               {
-
-               }
-       }
-
-
-       public class MethodTable {
-
-               private class MethodTableItem {
-               
-                       private static readonly int DefinedFlag = 2;
-       
-                       private int flags;
-
-                       public ArrayList LocationList;
-                       public MethodDef Method;
-
-                       public MethodTableItem (MethodDef method, Location location)
-                       {
-                               flags = 0;
-                               Method = method;
-                               LocationList = new ArrayList ();
-                               LocationList.Add (location);
-                       }
-               
-                       public bool Defined {
-                               get { return ((flags & DefinedFlag) != 0); }
-                               set {
-                                       if (value)
-                                               flags |= DefinedFlag;
-                                       else
-                                               flags ^= DefinedFlag;
-                               }
-                       }
-               }
-
-               protected Hashtable table;
-               protected ClassDef parent_class;
-               
-               public static event MethodReferencedEvent MethodReferencedEvent;
-               public static event MethodDefinedEvent MethodDefinedEvent;
-
-               public MethodTable (ClassDef parent_class)
-               {
-                       this.parent_class = parent_class;
-                       table = new Hashtable ();
-               }
-
-               public Method GetReference (string name, TypeRef return_type, 
-                       Param[] param_list, TypeRef[] param_type_list, Location location)
-               {
-                       string signature = GetSignature (name, return_type, param_type_list);
-
-                       if (MethodReferencedEvent != null)
-                               MethodReferencedEvent (this, new MethodReferencedEventArgs (signature, name,
-                                       return_type, param_list, table.Contains (signature)));
-
-                       MethodTableItem item = table[signature] as MethodTableItem;
-                       
-                       if (item != null) {
-                               item.LocationList.Add (location);
-                               return item.Method;
-                       }
-                       
-                       MethodDef method = parent_class.AddMethod (name, return_type.Type,
-                               param_list);
-                       
-                       AddReferenced (signature, method, location);
-
-                       return method;
-               }
-       
-               public MethodDef AddDefinition (MethAttr method_attr, ImplAttr impl_attr, CallConv call_conv, 
-                       string name, TypeRef return_type, Param[] param_list, 
-                       TypeRef[] param_type_list, Location location) 
-               {
-                       string signature = GetSignature (name, return_type, param_type_list);
-
-                       if (MethodDefinedEvent != null)
-                               MethodDefinedEvent (this, new MethodDefinedEventArgs (signature, name,
-                                       return_type, param_list, table.Contains (signature), method_attr, 
-                                       impl_attr, call_conv));
-
-                       MethodTableItem item = (MethodTableItem) table[signature];
-                       
-                       if (item == null) {
-                               MethodDef method = parent_class.AddMethod (method_attr, impl_attr, name, 
-                                       return_type.Type, param_list);
-                               method.AddCallConv (call_conv);
-                               AddDefined (signature, method, location);
-                               return method;
-                       }
-                       
-                       item.Method.AddMethAttribute (method_attr);
-                       item.Method.AddImplAttribute (impl_attr);
-                       item.Method.AddCallConv (call_conv);
-                       item.Defined = true;
-               
-                       return item.Method;
-               }
-
-               public bool CheckDefined ()
-               {
-                       foreach (DictionaryEntry dic_entry in table) {
-                               MethodTableItem table_item = (MethodTableItem) dic_entry.Value;
-                               if (table_item.Defined)
-                                       continue;
-                               Report.Error (String.Format ("Method: {0} is not defined.", dic_entry.Key));
-                       }
-                       return true;
-               }
-                                       
-               protected string GetSignature (string name, TypeRef return_type, 
-                       TypeRef[] param_list)
-               {
-                       StringBuilder builder = new StringBuilder ();
-                       
-                       builder.Append (return_type.FullName);
-                       builder.Append ('_');
-                       builder.Append (name);
-                       builder.Append ('(');
-                       
-                       bool first = true;
-                       foreach (TypeRef type_ref in param_list) {
-                               if (!first)
-                                       builder.Append (',');
-                               builder.Append (type_ref.FullName);
-                       }
-                       builder.Append (')');
-
-                       return builder.ToString ();
-               }
-
-               protected void AddDefined (string signature, MethodDef method, Location location)
-               {
-                       if (table.Contains (signature))
-                               return; 
-
-                       MethodTableItem item = new MethodTableItem (method, location);
-                       item.Defined = true;
-
-                       table[signature] = item;
-               }
-
-               protected void AddReferenced (string signature, MethodDef method, Location location)
-               {
-                       MethodTableItem item = new MethodTableItem (method, location);
-                       
-                       table[signature] = item;
-               }
-
-               /// <summary>
-               ///  If a method is allready defined throw an Error
-               /// </summary>
-               protected void CheckExists (string signature) 
-               {
-                       MethodTableItem item = table[signature] as MethodTableItem;
-                       
-                       if ((item != null) && (item.Defined)) {
-                               Report.Error (String.Format ("Method: {0} defined in multiple locations.", 
-                                       signature));
-                       }
-               }
-       }
-
-}
-
index 21fbd8ee575d780b483bf38d34a0bc318ab43d99..2fce6857033367125b6f515d07cd9cecdd3b4d3b 100644 (file)
@@ -13,8 +13,8 @@ using System.Collections;
 
 namespace Mono.ILASM {
         public class Pair {
-                private PEAPI.Type type;
-                private string sig;
+                protected PEAPI.Type type;
+                protected string sig;
 
                 public Pair (PEAPI.Type type, string sig)
                 {
@@ -38,6 +38,31 @@ namespace Mono.ILASM {
                 }
         }
 
+        class Triplet : Pair
+        {
+                string typeMod;
+
+                public Triplet (PEAPI.Type type, string sig, string typeMod)
+                        : base (type, sig)
+                {
+                        this.typeMod = typeMod;
+                }
+
+                public override int GetHashCode ()
+                {
+                        return base.GetHashCode () ^ typeMod.GetHashCode ();
+                }
+
+                public override bool Equals (object o)
+                {
+                        Triplet t = o as Triplet;
+                        if (t == null)
+                                return false;
+
+                        return t.type == type && t.sig == sig && t.typeMod == typeMod;
+                }
+        }
+
         public class PeapiTypeRef  {
 
                 private PEAPI.Type peapi_type;
@@ -202,7 +227,7 @@ namespace Mono.ILASM {
 
                         use_type_spec = true;
                         
-                        Pair p = new Pair (peapi_type, modifier.ToString ());
+                        Pair p = new Triplet (peapi_type, modifier.ToString (), klass.FullName);
                         type = type_table [p] as PEAPI.Type;
                         if (type == null) {
                                 type = GetType (code_gen, modifier, klass);
diff --git a/mcs/ilasm/ilasm.csproj b/mcs/ilasm/ilasm.csproj
new file mode 100644 (file)
index 0000000..4c2a6cf
--- /dev/null
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProjectGuid>{C02B3C37-DB98-40A5-84F0-F98633DA7EE4}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>ilasm</RootNamespace>
+    <AssemblyName>ilasm</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;NET_4_5</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Externalconsole>true</Externalconsole>
+    <PlatformTarget>x86</PlatformTarget>
+    <Commandlineparameters></Commandlineparameters>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>full</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Externalconsole>true</Externalconsole>
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="PEAPI">
+      <HintPath>..\class\lib\net_4_5\PEAPI.dll</HintPath>
+    </Reference>
+    <Reference Include="Mono.CompilerServices.SymbolWriter" />
+    <Reference Include="Mono.Security" />
+  </ItemGroup>
+  <ItemGroup>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <Folder Include="codegen\" />
+    <Folder Include="parser\" />
+    <Folder Include="scanner\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="codegen\Assembly.cs" />
+    <Compile Include="codegen\BaseClassRef.cs" />
+    <Compile Include="codegen\BaseGenericTypeRef.cs" />
+    <Compile Include="codegen\BaseMethodRef.cs" />
+    <Compile Include="codegen\BaseTypeRef.cs" />
+    <Compile Include="codegen\BranchInstr.cs" />
+    <Compile Include="codegen\CalliInstr.cs" />
+    <Compile Include="codegen\CatchBlock.cs" />
+    <Compile Include="codegen\CodeGen.cs" />
+    <Compile Include="codegen\CustomAttr.cs" />
+    <Compile Include="codegen\DataDef.cs" />
+    <Compile Include="codegen\DebuggingInfo.cs" />
+    <Compile Include="codegen\DeclSecurity.cs" />
+    <Compile Include="codegen\EmitByteInstr.cs" />
+    <Compile Include="codegen\EventDef.cs" />
+    <Compile Include="codegen\ExternFieldRef.cs" />
+    <Compile Include="codegen\ExternMethodRef.cs" />
+    <Compile Include="codegen\ExternTable.cs" />
+    <Compile Include="codegen\ExternTypeRef.cs" />
+    <Compile Include="codegen\FaultBlock.cs" />
+    <Compile Include="codegen\FeatureAttr.cs" />
+    <Compile Include="codegen\FieldDef.cs" />
+    <Compile Include="codegen\FieldInstr.cs" />
+    <Compile Include="codegen\FieldRef.cs" />
+    <Compile Include="codegen\FileRef.cs" />
+    <Compile Include="codegen\FilterBlock.cs" />
+    <Compile Include="codegen\FinallyBlock.cs" />
+    <Compile Include="codegen\GenericArguments.cs" />
+    <Compile Include="codegen\GenericMethodRef.cs" />
+    <Compile Include="codegen\GenericMethodSig.cs" />
+    <Compile Include="codegen\GenericParamRef.cs" />
+    <Compile Include="codegen\GenericParameters.cs" />
+    <Compile Include="codegen\GenericTypeInst.cs" />
+    <Compile Include="codegen\GlobalFieldRef.cs" />
+    <Compile Include="codegen\GlobalMethodRef.cs" />
+    <Compile Include="codegen\HandlerBlock.cs" />
+    <Compile Include="codegen\IFieldRef.cs" />
+    <Compile Include="codegen\IInstr.cs" />
+    <Compile Include="codegen\IMethodRef.cs" />
+    <Compile Include="codegen\ISehClause.cs" />
+    <Compile Include="codegen\InstrTable.cs" />
+    <Compile Include="codegen\IntInstr.cs" />
+    <Compile Include="codegen\LabelInfo.cs" />
+    <Compile Include="codegen\LdcInstr.cs" />
+    <Compile Include="codegen\LdstrInstr.cs" />
+    <Compile Include="codegen\LdtokenInstr.cs" />
+    <Compile Include="codegen\Local.cs" />
+    <Compile Include="codegen\MethodDef.cs" />
+    <Compile Include="codegen\MethodInstr.cs" />
+    <Compile Include="codegen\MethodPointerTypeRef.cs" />
+    <Compile Include="codegen\MethodRef.cs" />
+    <Compile Include="codegen\MiscInstr.cs" />
+    <Compile Include="codegen\ModifiableType.cs" />
+    <Compile Include="codegen\Module.cs" />
+    <Compile Include="codegen\ParamDef.cs" />
+    <Compile Include="codegen\PeapiTypeRef.cs" />
+    <Compile Include="codegen\Permission.cs" />
+    <Compile Include="codegen\PermissionMember.cs" />
+    <Compile Include="codegen\PermissionSet.cs" />
+    <Compile Include="codegen\PrimitiveTypeRef.cs" />
+    <Compile Include="codegen\PropertyDef.cs" />
+    <Compile Include="codegen\Sentinel.cs" />
+    <Compile Include="codegen\SimpInstr.cs" />
+    <Compile Include="codegen\SwitchInstr.cs" />
+    <Compile Include="codegen\TryBlock.cs" />
+    <Compile Include="codegen\TypeDef.cs" />
+    <Compile Include="codegen\TypeInstr.cs" />
+    <Compile Include="codegen\TypeManager.cs" />
+    <Compile Include="codegen\TypeRef.cs" />
+    <Compile Include="codegen\TypeSpecFieldRef.cs" />
+    <Compile Include="codegen\TypeSpecMethodRef.cs" />
+    <Compile Include="codegen\Types.cs" />
+    <Compile Include="parser\ScannerAdapter.cs" />
+    <Compile Include="AssemblyInfo.cs" />
+    <Compile Include="Driver.cs" />
+    <Compile Include="Report.cs" />
+    <Compile Include="scanner\ILReader.cs" />
+    <Compile Include="scanner\ILTables.cs" />
+    <Compile Include="scanner\ILToken.cs" />
+    <Compile Include="scanner\ILTokenizer.cs" />
+    <Compile Include="scanner\ILTokenizingException.cs" />
+    <Compile Include="scanner\ITokenStream.cs" />
+    <Compile Include="scanner\InstrToken.cs" />
+    <Compile Include="scanner\Location.cs" />
+    <Compile Include="scanner\NumberHelper.cs" />
+    <Compile Include="scanner\StringHelper.cs" />
+    <Compile Include="scanner\StringHelperBase.cs" />
+    <Compile Include="ILParser.cs" />
+    <Compile Include="..\build\common\Consts.cs">
+      <Link>Consts.cs</Link>
+    </Compile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
index 4cd03495ef3ac0cb64037589e9e15f420d11fc92..e4a980cb115832ec2fcfd7c24a6e4bde09536a35 100644 (file)
@@ -591,9 +591,6 @@ class_head          : D_CLASS class_attr comp_name formal_typars_clause extends_clause
                           }\r
                        ;\r
 \r
-class_attrs            : class_attrs class_attr\r
-                       ;\r
-\r
 class_attr             : /* EMPTY */                           \r
                          { \r
                                // Reset some flags\r
@@ -689,13 +686,13 @@ constraints_clause        : /* EMTPY */
                        ;\r
 \r
 \r
-constraints            : generic_class_ref\r
+constraints            : type\r
                          {\r
                                 ArrayList al = new ArrayList ();\r
                                 al.Add ($1);\r
                                 $$ = al;\r
                            }\r
-                       | constraints COMMA generic_class_ref\r
+                       | constraints COMMA type\r
                           {\r
                                 ArrayList al = (ArrayList) $1;\r
                                 al.Add ($3);\r
@@ -707,6 +704,10 @@ generic_class_ref  : class_ref
                          {\r
                                 $$ = $1;\r
                          }\r
+                       | K_OBJECT\r
+                          {\r
+                                $$ = new PrimitiveTypeRef (PrimitiveType.Object, "System.Object");\r
+                          }\r
                        | K_CLASS class_ref typars_clause\r
                          {\r
                                 if ($3 != null)\r
@@ -921,17 +922,13 @@ class_decl                : method_all
 \r
 type                   : generic_class_ref\r
                           {\r
-                               $$ = $1;\r
-                          }\r
-                       | K_OBJECT\r
-                          {\r
-                                $$ = new PrimitiveTypeRef (PrimitiveType.Object, "System.Object");\r
+                               $$ = GetTypeRef ((BaseTypeRef) $1);\r
                           }\r
                        | K_VALUE K_CLASS class_ref\r
                           {\r
-                               BaseClassRef class_ref = (BaseClassRef) $3;\r
-                               class_ref.MakeValueClass ();\r
-                                $$ = class_ref;\r
+                                BaseClassRef class_ref = (BaseClassRef) $3;\r
+                                class_ref.MakeValueClass ();\r
+                                $$ = GetTypeRef (class_ref);\r
                           }\r
                        | K_VALUETYPE OPEN_BRACKET slashed_name CLOSE_BRACKET slashed_name typars_clause\r
                           {\r
@@ -939,7 +936,7 @@ type                        : generic_class_ref
                                 if ($6 != null)\r
                                         $$ = ext_ref.GetGenericTypeInst ((GenericArguments) $6);\r
                                 else\r
-                                        $$ = ext_ref;\r
+                                        $$ = GetTypeRef (ext_ref);\r
                           }\r
                         | K_VALUETYPE slashed_name typars_clause\r
                           {\r
@@ -948,42 +945,42 @@ type                      : generic_class_ref
                                 if ($3 != null)\r
                                         $$ = t_ref.GetGenericTypeInst ((GenericArguments) $3);\r
                                 else\r
-                                        $$ = t_ref;\r
+                                        $$ = GetTypeRef (t_ref);\r
                           }\r
                        | type OPEN_BRACKET CLOSE_BRACKET\r
                           {\r
-                                BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);\r
+                                BaseTypeRef base_type = (BaseTypeRef) $1;\r
                                 base_type.MakeArray ();\r
                                 $$ = base_type;\r
                           }\r
                        | type OPEN_BRACKET bounds CLOSE_BRACKET\r
                           {\r
-                                BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);\r
+                                BaseTypeRef base_type = (BaseTypeRef) $1;\r
                                 ArrayList bound_list = (ArrayList) $3;\r
                                 base_type.MakeBoundArray (bound_list);\r
                                 $$ = base_type;\r
                           }\r
                        | type AMPERSAND\r
                           {\r
-                                BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);\r
+                                BaseTypeRef base_type = (BaseTypeRef) $1;\r
                                 base_type.MakeManagedPointer ();\r
                                 $$ = base_type;\r
                           }\r
                        | type STAR\r
                           {\r
-                                BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);\r
+                                BaseTypeRef base_type = (BaseTypeRef) $1;\r
                                 base_type.MakeUnmanagedPointer ();\r
                                 $$ = base_type;\r
                           }\r
                        | type K_PINNED\r
                           {\r
-                                BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);\r
+                                BaseTypeRef base_type = (BaseTypeRef) $1;\r
                                 base_type.MakePinned ();\r
                                 $$ = base_type;\r
                           }\r
                        | type K_MODREQ OPEN_PARENS custom_modifier_type CLOSE_PARENS\r
                           {\r
-                                BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);\r
+                                BaseTypeRef base_type = (BaseTypeRef) $1;\r
                                 BaseTypeRef class_ref = (BaseTypeRef) $4;\r
                                 base_type.MakeCustomModified (codegen,\r
                                         CustomModifier.modreq, class_ref);\r
@@ -991,7 +988,7 @@ type                        : generic_class_ref
                           }\r
                        | type K_MODOPT OPEN_PARENS custom_modifier_type CLOSE_PARENS\r
                           {\r
-                                BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);\r
+                                BaseTypeRef base_type = (BaseTypeRef) $1;\r
                                 BaseTypeRef class_ref = (BaseTypeRef) $4;\r
                                 base_type.MakeCustomModified (codegen,\r
                                         CustomModifier.modopt, class_ref);\r
@@ -1004,8 +1001,6 @@ type                      : generic_class_ref
                        | primitive_type\r
                        ;\r
 \r
-                       ;\r
-\r
 primitive_type         : K_INT8\r
                           {\r
                                 $$ = new PrimitiveTypeRef (PrimitiveType.Int8, "System.SByte");\r
@@ -1490,7 +1485,7 @@ custom_modifier_type
                        | class_ref\r
                        ;\r
 \r
-field_decl             : D_FIELD repeat_opt field_attr type id at_opt init_opt\r
+field_decl             : D_FIELD repeat_opt field_attr type id at_opt init_opt semicolon_opt\r
                           {\r
                                 FieldDef field_def = new FieldDef((FieldAttr) $3, \r
                                        (string) $5, (BaseTypeRef) $4);\r
@@ -1683,6 +1678,23 @@ member_init : field_init_full
                          }\r
                        ;\r
 \r
+opt_truefalse_list\r
+                               : truefalse_list\r
+                               ;\r
+\r
+truefalse_list\r
+                               : truefalse\r
+                                 {\r
+                                       $$ = new List<BoolConst> () { new BoolConst ((bool) $1) };\r
+                                 }\r
+                               | truefalse_list truefalse\r
+                                 {\r
+                                       var l = (List<BoolConst>) $1;\r
+                                       l.Add (new BoolConst ((bool) $2));\r
+                                       $$ = l;\r
+                                 }\r
+                               ;\r
+\r
 data_decl              : data_head data_body\r
                           {\r
                                 DataDef datadef = (DataDef) $1;\r
@@ -2698,22 +2710,22 @@ event_decls             : /* EMPTY */
                        | event_decls event_decl\r
                        ;\r
 \r
-event_decl             : D_ADDON method_ref\r
+event_decl             : D_ADDON method_ref semicolon_opt\r
                           {\r
                                 codegen.CurrentTypeDef.CurrentEvent.AddAddon (\r
                                         (MethodRef) $2);                                \r
                           }\r
-                       | D_REMOVEON method_ref\r
+                       | D_REMOVEON method_ref semicolon_opt\r
                           {\r
                                 codegen.CurrentTypeDef.CurrentEvent.AddRemoveon (\r
                                         (MethodRef) $2);\r
                           }\r
-                       | D_FIRE method_ref\r
+                       | D_FIRE method_ref semicolon_opt\r
                           {\r
                                 codegen.CurrentTypeDef.CurrentEvent.AddFire (\r
                                         (MethodRef) $2);\r
                           }\r
-                       | D_OTHER method_ref\r
+                       | D_OTHER method_ref semicolon_opt\r
                           {\r
                                 codegen.CurrentTypeDef.CurrentEvent.AddOther (\r
                                         (MethodRef) $2);\r
@@ -2789,23 +2801,76 @@ prop_decl               : D_SET method_ref
                        | language_decl\r
                        ;\r
 \r
-customattr_decl                : D_CUSTOM custom_type\r
+customattr_decl\r
+                       : D_CUSTOM customattr_owner_type_opt custom_type\r
                           {\r
-                                $$ = new CustomAttr ((BaseMethodRef) $2, null);\r
+                                $$ = new CustomAttr ((BaseMethodRef) $3, null);\r
                           }\r
-                       | D_CUSTOM custom_type ASSIGN comp_qstring\r
-                       | D_CUSTOM custom_type ASSIGN bytes_list\r
+                       | D_CUSTOM customattr_owner_type_opt custom_type ASSIGN comp_qstring\r
+                       | D_CUSTOM customattr_owner_type_opt custom_type ASSIGN bytes_list\r
                           {\r
-                                $$ = new CustomAttr ((BaseMethodRef) $2, new ByteArrConst ((byte[]) $4));\r
+                                $$ = new CustomAttr ((BaseMethodRef) $3, new ByteArrConst ((byte[]) $5));\r
                           }\r
-            | D_CUSTOM custom_type ASSIGN OPEN_BRACE member_init CLOSE_BRACE\r
+            | D_CUSTOM customattr_owner_type_opt custom_type ASSIGN OPEN_BRACE customattr_values CLOSE_BRACE\r
               {\r
-               $$ = new CustomAttr ((BaseMethodRef) $2, null);\r
+               $$ = new CustomAttr ((BaseMethodRef) $3, (PEAPI.Constant) $6);\r
               }\r
-                       | D_CUSTOM OPEN_PARENS owner_type CLOSE_PARENS custom_type\r
-                       | D_CUSTOM OPEN_PARENS owner_type CLOSE_PARENS custom_type ASSIGN comp_qstring\r
-                       | D_CUSTOM OPEN_PARENS owner_type CLOSE_PARENS custom_type ASSIGN bytes_list\r
                        ;\r
+\r
+// TODO: unused for now\r
+customattr_owner_type_opt\r
+                       : /* empty */\r
+                       | OPEN_PARENS type CLOSE_PARENS\r
+                       ;\r
+\r
+customattr_values\r
+                               : /* empty */\r
+                               | K_BOOL OPEN_BRACKET int32 CLOSE_BRACKET OPEN_PARENS opt_truefalse_list CLOSE_PARENS\r
+                                 {\r
+                                       var l = (List<BoolConst>) $6;\r
+                                       $$ = new ArrayConstant (l?.ToArray ()) {\r
+                                               ExplicitSize = (int) $3\r
+                                       };\r
+                                 }\r
+                               | K_BYTEARRAY bytes_list\r
+                 {\r
+                               $$ = new ByteArrConst ((byte[]) $2);\r
+                 }\r
+                               | K_STRING OPEN_PARENS SQSTRING CLOSE_PARENS\r
+                                 {\r
+                                       $$ = new StringConst ((string) $3);\r
+                                 }\r
+                               | customattr_ctor_args\r
+                                 {\r
+                                       var c = $1 as Constant;\r
+                                       $$ = c ?? new ArrayConstant (((List<DataConstant>) $1).ToArray ());\r
+                                 }\r
+                               ;\r
+\r
+customattr_ctor_args\r
+                               : customattr_ctor_arg\r
+                               | customattr_ctor_args customattr_ctor_arg\r
+                                 {\r
+                                       var l = $1 as List<DataConstant>;\r
+                                       if (l == null) {\r
+                                               l = new List<DataConstant> () {\r
+                                                       (DataConstant) $1\r
+                                               };\r
+                                       }\r
+\r
+                                       l.Add ((DataConstant) $2);\r
+                                       $$ = l;\r
+                                 }\r
+                               ;\r
+\r
+customattr_ctor_arg\r
+                               : field_init_primitive\r
+                               | K_TYPE OPEN_PARENS type CLOSE_PARENS\r
+                                 {\r
+                                       $$ = new StringConst (((TypeRef) $3).FullName);\r
+                                 }\r
+                               ;\r
+\r
                        \r
 custom_type            : call_conv type type_spec DOUBLE_COLON method_name OPEN_PARENS type_list CLOSE_PARENS\r
                           {\r
@@ -3355,6 +3420,11 @@ comp_name                : id
                         | COMP_NAME\r
                        ;\r
 \r
+semicolon_opt\r
+                       : /* empty */\r
+                       | SEMICOLON\r
+                       ;\r
+\r
 %%\r
 \r
 }\r
diff --git a/mcs/ilasm/scanner/ILSyntaxError.cs b/mcs/ilasm/scanner/ILSyntaxError.cs
deleted file mode 100644 (file)
index 9645746..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// ILSyntaxError.cs\r
-// Author: Sergey Chaban (serge@wildwestsoftware.com)\r
-\r
-using System;\r
-\r
-namespace Mono.ILASM {\r
-\r
-       public class ILSyntaxError : Exception {\r
-               private Location loc = Location.Unknown;\r
-\r
-               public ILSyntaxError () : base ()\r
-               {\r
-               }\r
-\r
-               public ILSyntaxError (string msg) : base (msg)\r
-               {\r
-               }\r
-\r
-\r
-               public ILSyntaxError (string msg, Location loc) : base (msg)\r
-               {\r
-                       this.loc = loc.Clone () as Location;\r
-               }\r
-       }\r
-}\r
-\r
index 3641c6460a69a768b9c0e848471fb757ba395e4a..518e2c5ab8f6d659c4aa15361c6eb008b935d96f 100644 (file)
@@ -240,6 +240,7 @@ namespace Mono.CSharp
                public bool parsing_catch_when;
 
                int parsing_string_interpolation;
+               Stack<bool> parsing_string_interpolation_quoted;
 
                public bool parsing_interpolation_format;
 
@@ -410,6 +411,7 @@ namespace Mono.CSharp
                        public int current_token;
                        public object val;
                        public int parsing_string_interpolation;
+                       public Stack<bool> parsing_string_interpolation_quoted;
 
                        public Position (Tokenizer t)
                        {
@@ -428,9 +430,14 @@ namespace Mono.CSharp
                                        ifstack = new Stack<int> (clone);
                                }
                                parsing_generic_less_than = t.parsing_generic_less_than;
-                               parsing_string_interpolation = t.parsing_string_interpolation;
                                current_token = t.current_token;
                                val = t.val;
+                               parsing_string_interpolation = t.parsing_string_interpolation;
+                               if (t.parsing_string_interpolation_quoted != null && t.parsing_string_interpolation_quoted.Count != 0) {
+                                       var clone = t.parsing_string_interpolation_quoted.ToArray ();
+                                       Array.Reverse (clone);
+                                       parsing_string_interpolation_quoted = new Stack<bool> (clone);
+                               }
                        }
                }
 
@@ -474,6 +481,7 @@ namespace Mono.CSharp
                        ifstack = p.ifstack;
                        parsing_generic_less_than = p.parsing_generic_less_than;
                        parsing_string_interpolation = p.parsing_string_interpolation;
+                       parsing_string_interpolation_quoted = p.parsing_string_interpolation_quoted;
                        current_token = p.current_token;
                        val = p.val;
                }
@@ -3369,7 +3377,14 @@ namespace Mono.CSharp
                                case '}':
                                        if (parsing_string_interpolation > 0) {
                                                --parsing_string_interpolation;
-                                               return TokenizeInterpolatedString ();
+                                               bool quoted;
+                                               if (parsing_string_interpolation_quoted != null && parsing_string_interpolation_quoted.Count > 0) {
+                                                       quoted = parsing_string_interpolation_quoted.Pop ();
+                                               } else {
+                                                       quoted = false;
+                                               }
+
+                                               return TokenizeInterpolatedString (quoted);
                                        }
 
                                        val = ltb.Create (current_source, ref_line, col);
@@ -3791,9 +3806,18 @@ namespace Mono.CSharp
                                        return Token.ERROR;
 
                                case '$':
-                                       if (peek_char () == '"') {
+                                       switch (peek_char ()) {
+                                       case '"':
+                                               get_char ();
+                                               return TokenizeInterpolatedString (false);
+                                       case '@':
                                                get_char ();
-                                               return TokenizeInterpolatedString ();
+                                               if (peek_char () == '"') {
+                                                       get_char ();
+                                                       return TokenizeInterpolatedString (true);
+                                               }
+
+                                               break;
                                        }
 
                                        break;
@@ -3922,7 +3946,7 @@ namespace Mono.CSharp
                        return Token.OP_LT;
                }
 
-               int TokenizeInterpolatedString ()
+               int TokenizeInterpolatedString (bool quoted)
                {
                        int pos = 0;
                        var start_location = Location;
@@ -3931,6 +3955,11 @@ namespace Mono.CSharp
                                var ch = get_char ();
                                switch (ch) {
                                case '"':
+                                       if (quoted && peek_char () == '"') {
+                                               get_char ();
+                                               break;
+                                       }
+
                                        val = new StringLiteral (context.BuiltinTypes, CreateStringFromBuilder (pos), start_location);
                                        return Token.INTERPOLATED_STRING_END;
                                case '{':
@@ -3941,9 +3970,21 @@ namespace Mono.CSharp
                                        }
 
                                        ++parsing_string_interpolation;
+                                       if (quoted) {
+                                               if (parsing_string_interpolation_quoted == null)
+                                                       parsing_string_interpolation_quoted = new Stack<bool> ();
+                                       }
+
+                                       if (parsing_string_interpolation_quoted != null) {
+                                               parsing_string_interpolation_quoted.Push (quoted);
+                                       }
+
                                        val = new StringLiteral (context.BuiltinTypes, CreateStringFromBuilder (pos), start_location);
                                        return Token.INTERPOLATED_STRING;
                                case '\\':
+                                       if (quoted)
+                                               break;
+                                       
                                        ++col;
                                        int surrogate;
                                        ch = escape (ch, out surrogate);
index 74501e89b1503db64ab68fca1a7a884ba1632867..f34ba17146dc0730175ae02197d82dd0aa1e423d 100644 (file)
@@ -7036,6 +7036,14 @@ namespace Mono.CSharp {
                        if (!rc.HasSet (ResolveContext.Options.ConstructorScope))
                                return false;
 
+                       if (prop.Parent.PartialContainer != rc.CurrentMemberDefinition.Parent.PartialContainer) {
+                               var ps = MemberCache.FindMember (rc.CurrentType, MemberFilter.Property (prop.ShortName, prop.MemberType), BindingRestriction.DeclaredOnly) as PropertySpec;
+                               if (ps == null)
+                                       return false;
+
+                               prop = (Property) ps.MemberDefinition;
+                       }
+
                        var spec = prop.BackingField;
                        if (spec == null)
                                return false;
index 5f6c0633727978265700c2e19e9e9df2f82b839e..288a48704608945adee1c955e07cbd896ccbdd31 100644 (file)
@@ -1485,6 +1485,11 @@ namespace Mono.CSharp
                        expr.FlowAnalysis (fc);
                }
 
+               public override bool HasConditionalAccess ()
+               {
+                       return expr.HasConditionalAccess ();
+               }
+
                protected abstract string OperatorName { get; }
 
                protected override void CloneTo (CloneContext clonectx, Expression t)
@@ -9665,9 +9670,18 @@ namespace Mono.CSharp
                                        expr = null;
                                }
                        } else {
-                               using (rc.Set (ResolveContext.Options.ConditionalAccessReceiver)) {
-                                       expr = expr.Resolve (rc, flags);
+                               bool resolved = false;
+                               if (!rc.HasSet (ResolveContext.Options.ConditionalAccessReceiver)) {
+                                       if (expr.HasConditionalAccess ()) {
+                                               resolved = true;
+                                               using (rc.Set (ResolveContext.Options.ConditionalAccessReceiver)) {
+                                                       expr = expr.Resolve (rc, flags);
+                                               }
+                                       }
                                }
+
+                               if (!resolved)
+                                       expr = expr.Resolve (rc, flags);
                        }
 
                        if (expr == null)
index fb7b6c79942278a404d2105f69c243ce1885d4e9..369ee5db92e12ba9d6a7406e0ae4d7601db40a00 100644 (file)
@@ -1114,14 +1114,20 @@ namespace Mono.CSharp {
                        //
                        bool found;
                        if (!TypeSpecComparer.Override.IsEqual (BaseType, other.BaseType)) {
-                               if (other.targs == null)
-                                       return false;
-
                                found = false;
-                               foreach (var otarg in other.targs) {
-                                       if (TypeSpecComparer.Override.IsEqual (BaseType, otarg)) {
-                                               found = true;
-                                               break;
+                               if (other.targs != null) {
+                                       foreach (var otarg in other.targs) {
+                                               if (TypeSpecComparer.Override.IsEqual (BaseType, otarg)) {
+                                                       found = true;
+                                                       break;
+                                               }
+                                       }
+                               } else if (targs != null) {
+                                       foreach (var targ in targs) {
+                                               if (TypeSpecComparer.Override.IsEqual (targ, other.BaseType)) {
+                                                       found = true;
+                                                       break;
+                                               }
                                        }
                                }
 
@@ -1164,18 +1170,25 @@ namespace Mono.CSharp {
 
                        // Check interfaces implementation <- definition
                        if (other.InterfacesDefined != null) {
-                               if (InterfacesDefined == null)
-                                       return false;
-
                                //
                                // Iterate over inflated interfaces
                                //
                                foreach (var oiface in other.Interfaces) {
                                        found = false;
-                                       foreach (var iface in Interfaces) {
-                                               if (TypeSpecComparer.Override.IsEqual (iface, oiface)) {
-                                                       found = true;
-                                                       break;
+
+                                       if (InterfacesDefined != null) {
+                                               foreach (var iface in Interfaces) {
+                                                       if (TypeSpecComparer.Override.IsEqual (iface, oiface)) {
+                                                               found = true;
+                                                               break;
+                                                       }
+                                               }
+                                       } else if (targs != null) {
+                                               foreach (var targ in targs) {
+                                                       if (TypeSpecComparer.Override.IsEqual (targ, oiface)) {
+                                                               found = true;
+                                                               break;
+                                                       }
                                                }
                                        }
 
@@ -1186,18 +1199,30 @@ namespace Mono.CSharp {
 
                        // Check type parameters implementation -> definition
                        if (targs != null) {
-                               if (other.targs == null)
-                                       return false;
-
                                foreach (var targ in targs) {
                                        found = false;
-                                       foreach (var otarg in other.targs) {
-                                               if (TypeSpecComparer.Override.IsEqual (targ, otarg)) {
-                                                       found = true;
-                                                       break;
+
+                                       if (other.targs != null) {
+                                               foreach (var otarg in other.targs) {
+                                                       if (TypeSpecComparer.Override.IsEqual (targ, otarg)) {
+                                                               found = true;
+                                                               break;
+                                                       }
                                                }
                                        }
 
+                                       if (other.InterfacesDefined != null && !found) {
+                                               foreach (var iface in other.Interfaces) {
+                                                       if (TypeSpecComparer.Override.IsEqual (iface, targ)) {
+                                                               found = true;
+                                                               break;
+                                                       }
+                                               }
+                                       }
+
+                                       if (!found)
+                                               found = TypeSpecComparer.Override.IsEqual (targ, other.BaseType);
+
                                        if (!found)
                                                return false;
                                }
index da6b0c11ab56b9ab6eda6b3123dff78bbf71082a..42d56ff3334196540490040daf7e8d03c2af4e73 100644 (file)
@@ -414,7 +414,11 @@ namespace Mono.CSharp
 
                public override bool HasObjectType (Assembly assembly)
                {
-                       return assembly.GetType (compiler.BuiltinTypes.Object.FullName) != null;
+                       try {
+                               return assembly.GetType (compiler.BuiltinTypes.Object.FullName) != null;
+                       } catch (Exception e) {
+                               throw new InternalErrorException (e, "Failed to load assembly `{0}'", assembly.FullName);
+                       }
                }
 
                public override Assembly LoadAssemblyFile (string fileName, bool isImplicitReference)
index bed7f9e5e7164b027a3101870220ffc2ee03859a..541466770e7e2bc8f1e00f6831f7177614354137 100644 (file)
@@ -841,7 +841,7 @@ namespace Mono.CSharp {
                                        //
                                        // Same name conflict in different namespace containers
                                        //
-                                       var conflict = ns.GetAllTypes (name);
+                                       var conflict = ns.GetAllTypes (mn.Name);
                                        if (conflict != null) {
                                                foreach (var e in conflict) {
                                                        if (e.Arity == mn.Arity) {
index 4b7b21e4887bfb9c5627b494cfbb489e03dededd..718fe669922f885d4191817f1de83d06e4543221 100644 (file)
@@ -619,8 +619,7 @@ namespace Mono.CSharp
                                                GetSignatureForError ());
                                }
                        } else if ((ModFlags & Modifiers.OVERRIDE) == 0 && 
-                               (Get == null && (Set.ModFlags & Modifiers.AccessibilityMask) != 0) ||
-                               (Set == null && (Get.ModFlags & Modifiers.AccessibilityMask) != 0)) {
+                               ((Get == null && (Set.ModFlags & Modifiers.AccessibilityMask) != 0) || (Set == null && (Get.ModFlags & Modifiers.AccessibilityMask) != 0))) {
                                Report.Error (276, Location, 
                                              "`{0}': accessibility modifiers on accessors may only be used if the property or indexer has both a get and a set accessor",
                                              GetSignatureForError ());
diff --git a/mcs/tests/gtest-631.cs b/mcs/tests/gtest-631.cs
new file mode 100644 (file)
index 0000000..32939c9
--- /dev/null
@@ -0,0 +1,22 @@
+public class BaseClass<TSource>
+{
+       public void DoStuff<TInput> (TInput stuff) where TInput: TSource 
+       {
+       }
+}
+
+public class MyClass: BaseClass<TInterface>, MyInterface
+{
+       public static void Main ()
+       {
+       }
+}
+
+public interface TInterface
+{
+}
+
+public interface MyInterface 
+{
+       void DoStuff<TInput> (TInput stuff) where TInput: TInterface;
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-632.cs b/mcs/tests/gtest-632.cs
new file mode 100644 (file)
index 0000000..59cbafb
--- /dev/null
@@ -0,0 +1,22 @@
+public class BaseClass<TSource>
+{
+       public void DoStuff<TInput> (TInput stuff) where TInput: TSource 
+       {
+       }
+}
+
+public class MyClass: BaseClass<TInterface>, MyInterface
+{
+       public static void Main ()
+       {
+       }
+}
+
+public class TInterface
+{
+}
+
+public interface MyInterface 
+{
+       void DoStuff<TInput> (TInput stuff) where TInput: TInterface;
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-autoproperty-19.cs b/mcs/tests/gtest-autoproperty-19.cs
new file mode 100644 (file)
index 0000000..58f9d0f
--- /dev/null
@@ -0,0 +1,23 @@
+abstract class Node
+{
+       public virtual int Next { get; }
+}
+
+class NodeLinked : Node
+{
+       public NodeLinked (int next)
+       {
+               this.Next = next;
+       }
+
+       public override int Next { get; }
+
+       public static int Main ()
+       {
+               var nl = new NodeLinked (5);
+               if (nl.Next != 5)
+                       return 1;
+
+               return 0;
+       }
+}
diff --git a/mcs/tests/test-926.cs b/mcs/tests/test-926.cs
new file mode 100644 (file)
index 0000000..dfb7b3b
--- /dev/null
@@ -0,0 +1,32 @@
+class Program
+{
+       public static void Main ()
+       {
+               System.Console.WriteLine("Hi");
+       }
+}
+
+public class MyClass
+{
+       protected internal virtual int this[int i]
+       {
+               protected get
+               {
+                       return 2;
+               }
+               set
+               {
+               }
+       }
+}
+
+public class Derived : MyClass
+{
+       protected internal override int this[int i]
+       {
+               protected get
+               {
+                       return 4;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-interpolation-06.cs b/mcs/tests/test-interpolation-06.cs
new file mode 100644 (file)
index 0000000..3341f8d
--- /dev/null
@@ -0,0 +1,20 @@
+class X
+{
+       public static int Main ()
+       {
+               int foo = 4;
+               string s = $@"{foo}";
+               if (s != "4")
+                       return 1;
+
+               string s2 = $@"c:\{foo}\temp";
+               if (s2 != "c:\\4\\temp")
+                       return 2;
+
+               string s3 = $@"""{foo}"" ""foo""";
+               if (s3 != "\"4\" \"foo\"")
+                       return 3;
+
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-null-operator-10.cs b/mcs/tests/test-null-operator-10.cs
new file mode 100644 (file)
index 0000000..1822fb7
--- /dev/null
@@ -0,0 +1,16 @@
+using System;
+
+class Event
+{
+       public string Name { get; set; }
+       public string Foo { get; set; }
+}
+
+class X
+{
+       public static void Main ()
+       {
+               var evt = new Event();
+               string str = (evt.Foo != null ? evt?.Name : "").Trim();
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/test-null-operator-11.cs b/mcs/tests/test-null-operator-11.cs
new file mode 100644 (file)
index 0000000..3f14ebe
--- /dev/null
@@ -0,0 +1,28 @@
+class X
+{
+       public static void Main ()
+       {
+               A a = new A ();
+               var x = (a.b?.c?.d as A)?.b;
+       }
+}
+
+class A
+{
+       public B b { get; set; }
+}
+
+class B
+{
+       public C c { get; set; }
+}
+
+class C
+{
+       public D d { get; set; }
+}
+
+class D : A
+{
+
+}
\ No newline at end of file
index b306de4869ad986ab7ed4a5324e0f4f171b289a2..8fc5955992d18b9490dc8e4be7545d137f8c6644 100644 (file)
       </method>
     </type>
   </test>
+  <test name="dtest-061.cs">
+    <type name="Test.Program">
+      <method name="Void Main()" attrs="150">
+        <size>88</size>
+      </method>
+      <method name="Void AreEqual[A,B](A, B)" attrs="150">
+        <size>54</size>
+      </method>
+      <method name="Void ShiftTest(Int32, Int32)" attrs="134">
+        <size>2459</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+      <method name="Void .cctor()" attrs="6289">
+        <size>24</size>
+      </method>
+    </type>
+  </test>
   <test name="dtest-anontype-01.cs">
     <type name="C">
       <method name="Void Main()" attrs="150">
       </method>
     </type>
   </test>
+  <test name="gtest-631.cs">
+    <type name="BaseClass`1[TSource]">
+      <method name="Void DoStuff[TInput](TInput)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyClass">
+      <method name="Void Main()" attrs="150">
+        <size>2</size>
+      </method>
+      <method name="Void MyInterface.DoStuff[TInput](TInput)" attrs="993">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="gtest-632.cs">
+    <type name="BaseClass`1[TSource]">
+      <method name="Void DoStuff[TInput](TInput)" attrs="134">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyClass">
+      <method name="Void Main()" attrs="150">
+        <size>2</size>
+      </method>
+      <method name="Void MyInterface.DoStuff[TInput](TInput)" attrs="993">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="TInterface">
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-anontype-01.cs">
     <type name="Test">
       <method name="Int32 Main()" attrs="150">
       </method>
     </type>
   </test>
+  <test name="gtest-autoproperty-19.cs">
+    <type name="Node">
+      <method name="Int32 get_Next()" attrs="2502">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()" attrs="6276">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="NodeLinked">
+      <method name="Int32 get_Next()" attrs="2246">
+        <size>14</size>
+      </method>
+      <method name="Int32 Main()" attrs="150">
+        <size>36</size>
+      </method>
+      <method name="Void .ctor(Int32)" attrs="6278">
+        <size>15</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-collectioninit-01.cs">
     <type name="Test">
       <method name="Void TestList(System.Collections.Generic.List`1[System.Int32], Int32)" attrs="145">
       </method>
     </type>
   </test>
+  <test name="test-926.cs">
+    <type name="Program">
+      <method name="Void Main()" attrs="150">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="MyClass">
+      <method name="Int32 get_Item(Int32)" attrs="2500">
+        <size>10</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32)" attrs="2501">
+        <size>2</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Derived">
+      <method name="Int32 get_Item(Int32)" attrs="2244">
+        <size>10</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-93.cs">
     <type name="N1.C">
       <method name="Void .ctor()" attrs="6278">
       </method>
     </type>
   </test>
+  <test name="test-interpolation-06.cs">
+    <type name="X">
+      <method name="Int32 Main()" attrs="150">
+        <size>134</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-iter-01.cs">
     <type name="X">
       <method name="Int32 Main()" attrs="150">
       </method>
     </type>
   </test>
+  <test name="test-null-operator-10.cs">
+    <type name="Event">
+      <method name="System.String get_Name()" attrs="2182">
+        <size>14</size>
+      </method>
+      <method name="Void set_Name(System.String)" attrs="2182">
+        <size>8</size>
+      </method>
+      <method name="System.String get_Foo()" attrs="2182">
+        <size>14</size>
+      </method>
+      <method name="Void set_Foo(System.String)" attrs="2182">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="X">
+      <method name="Void Main()" attrs="150">
+        <size>50</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-null-operator-11.cs">
+    <type name="X">
+      <method name="Void Main()" attrs="150">
+        <size>60</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A">
+      <method name="B get_b()" attrs="2182">
+        <size>14</size>
+      </method>
+      <method name="Void set_b(B)" attrs="2182">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="B">
+      <method name="C get_c()" attrs="2182">
+        <size>14</size>
+      </method>
+      <method name="Void set_c(C)" attrs="2182">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C">
+      <method name="D get_d()" attrs="2182">
+        <size>14</size>
+      </method>
+      <method name="Void set_d(D)" attrs="2182">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="D">
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-partial-01.cs">
     <type name="Foo.Hello">
       <method name="Void .ctor()" attrs="6278">
index 6b0ddafedfd57ad3cd97a2ca7e957e1724c85e29..4f0e2eeaaee1c8a73fc39e71e370ad57d515f442 100644 (file)
@@ -179,81 +179,118 @@ namespace Mono.Linker.Steps {
                        if (!type.HasMethods)
                                return null;
 
-                       foreach (MethodDefinition candidate in type.Methods)
-                               if (MethodMatch (candidate, method))
+                       Dictionary<string,string> gp = null;
+                       foreach (MethodDefinition candidate in type.Methods) {
+                               if (MethodMatch (candidate, method, ref gp))
                                        return candidate;
+                               if (gp != null)
+                                       gp.Clear ();
+                       }
 
                        return null;
                }
 
-               static bool MethodMatch (MethodDefinition candidate, MethodDefinition method)
+               static bool MethodMatch (MethodDefinition candidate, MethodDefinition method, ref Dictionary<string,string> genericParameters)
                {
                        if (!candidate.IsVirtual)
                                return false;
 
+                       if (candidate.HasParameters != method.HasParameters)
+                               return false;
+
                        if (candidate.Name != method.Name)
                                return false;
 
-                       if (!TypeMatch (candidate.ReturnType, method.ReturnType))
+                       if (candidate.HasGenericParameters != method.HasGenericParameters)
                                return false;
 
-                       if (candidate.Parameters.Count != method.Parameters.Count)
+                       // we need to track what the generic parameter represent - as we cannot allow it to
+                       // differ between the return type or any parameter
+                       if (!TypeMatch (candidate.ReturnType, method.ReturnType, ref genericParameters))
+                               return false;
+
+                       if (!candidate.HasParameters)
+                               return true;
+
+                       var cp = candidate.Parameters;
+                       var mp = method.Parameters;
+                       if (cp.Count != mp.Count)
                                return false;
 
-                       for (int i = 0; i < candidate.Parameters.Count; i++)
-                               if (!TypeMatch (candidate.Parameters [i].ParameterType, method.Parameters [i].ParameterType))
+                       for (int i = 0; i < cp.Count; i++) {
+                               if (!TypeMatch (cp [i].ParameterType, mp [i].ParameterType, ref genericParameters))
                                        return false;
+                       }
 
                        return true;
                }
 
-               static bool TypeMatch (IModifierType a, IModifierType b)
+               static bool TypeMatch (IModifierType a, IModifierType b, ref Dictionary<string,string> gp)
                {
-                       if (!TypeMatch (a.ModifierType, b.ModifierType))
+                       if (!TypeMatch (a.ModifierType, b.ModifierType, ref gp))
                                return false;
 
-                       return TypeMatch (a.ElementType, b.ElementType);
+                       return TypeMatch (a.ElementType, b.ElementType, ref gp);
                }
 
-               static bool TypeMatch (TypeSpecification a, TypeSpecification b)
+               static bool TypeMatch (TypeSpecification a, TypeSpecification b, ref Dictionary<string,string> gp)
                {
-                       if (a is GenericInstanceType)
-                               return TypeMatch ((GenericInstanceType) a, (GenericInstanceType) b);
+                       var gita = a as GenericInstanceType;
+                       if (gita != null)
+                               return TypeMatch (gita, (GenericInstanceType) b, ref gp);
 
-                       if (a is IModifierType)
-                               return TypeMatch ((IModifierType) a, (IModifierType) b);
+                       var mta = a as IModifierType;
+                       if (mta != null)
+                               return TypeMatch (mta, (IModifierType) b, ref gp);
 
-                       return TypeMatch (a.ElementType, b.ElementType);
+                       return TypeMatch (a.ElementType, b.ElementType, ref gp);
                }
 
-               static bool TypeMatch (GenericInstanceType a, GenericInstanceType b)
+               static bool TypeMatch (GenericInstanceType a, GenericInstanceType b, ref Dictionary<string,string> gp)
                {
-                       if (!TypeMatch (a.ElementType, b.ElementType))
+                       if (!TypeMatch (a.ElementType, b.ElementType, ref gp))
                                return false;
 
-                       if (a.GenericArguments.Count != b.GenericArguments.Count)
+                       if (a.HasGenericArguments != b.HasGenericArguments)
                                return false;
 
-                       if (a.GenericArguments.Count == 0)
+                       if (!a.HasGenericArguments)
                                return true;
 
-                       for (int i = 0; i < a.GenericArguments.Count; i++)
-                               if (!TypeMatch (a.GenericArguments [i], b.GenericArguments [i]))
+                       var gaa = a.GenericArguments;
+                       var gab = b.GenericArguments;
+                       if (gaa.Count != gab.Count)
+                               return false;
+
+                       for (int i = 0; i < gaa.Count; i++) {
+                               if (!TypeMatch (gaa [i], gab [i], ref gp))
                                        return false;
+                       }
 
                        return true;
                }
 
-               static bool TypeMatch (TypeReference a, TypeReference b)
+               static bool TypeMatch (TypeReference a, TypeReference b, ref Dictionary<string,string> gp)
                {
-                       if (a is GenericParameter)
-                               return true;
+                       var gpa = a as GenericParameter;
+                       if (gpa != null) {
+                               if (gp == null)
+                                       gp = new Dictionary<string, string> ();
+                               string match;
+                               if (!gp.TryGetValue (gpa.FullName, out match)) {
+                                       // first use, we assume it will always be used this way
+                                       gp.Add (gpa.FullName, b.ToString ());
+                                       return true;
+                               }
+                               // re-use, it should match the previous usage
+                               return match == b.ToString ();
+                       }
 
                        if (a is TypeSpecification || b is TypeSpecification) {
                                if (a.GetType () != b.GetType ())
                                        return false;
 
-                               return TypeMatch ((TypeSpecification) a, (TypeSpecification) b);
+                               return TypeMatch ((TypeSpecification) a, (TypeSpecification) b, ref gp);
                        }
 
                        return a.FullName == b.FullName;
index dc2b0e6d61f20b86ba043739a30b2e2f42230fcd..cf35f82519790874f31eae46c1a94ac19d4e9096 100644 (file)
        <Import Project="Microsoft.Common.targets" />
 
        <PropertyGroup>
-               <VbcToolExe Condition="'$(VbcToolExe)' == '' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(OS)' != 'Windows_NT'">vbnc2</VbcToolExe>
-               <VbcToolExe Condition="'$(VbcToolExe)' == '' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(OS)' == 'Windows_NT'">vbnc2.bat</VbcToolExe>
-
-               <VbcToolExe Condition="'$(VbcToolExe)' == '' and '$(TargetFrameworkVersion)' == 'v4.0' and '$(OS)' != 'Windows_NT'">vbnc</VbcToolExe>
-               <VbcToolExe Condition="'$(VbcToolExe)' == '' and '$(TargetFrameworkVersion)' == 'v4.0' and '$(OS)' == 'Windows_NT'">vbnc.bat</VbcToolExe>
+               <VbcToolExe Condition="'$(VbcToolExe)' == ''">vbnc.exe</VbcToolExe>
        </PropertyGroup>
 
 </Project>
index 05e83101039c2aef3d8c99a8bf48206ddf948650..9e219a3b61f84fd86b40dd52f95fc3a15847360e 100644 (file)
@@ -242,6 +242,14 @@ typedef struct {
        char    r2 : 4;
 } RRF_Format_3;
 
+typedef struct {
+       short   op;
+       char    m3 : 4;
+       char    m4 : 4;
+       char    r1 : 4;
+       char    r2 : 4;
+} RRF_Format_4;
+
 typedef struct {
        char    op;
        char    r1 : 4;
@@ -502,6 +510,8 @@ typedef struct {
 
 #define S390_RRF_3(c,opc,g1,g2,k4,g3)  s390_emit32(c, (opc << 16 | (g3) << 12 | (k4) << 8 | (g1) << 4 | g2))
 
+#define S390_RRF_4(c,opc,g1,m3,g2,m4)  s390_emit32(c, (opc << 16 | (m3) << 12 | (m4) << 8 | (g1) << 4 | g2))
+
 #define S390_RX(c,opc,g1,n2,s2,p2)     s390_emit32(c, (opc << 24 | (g1) << 20 | (n2) << 16 | (s2) << 12 | ((p2) & 0xfff)))
 
 #define S390_RXE(c,opc,g1,n2,s2,p2) do                         \
@@ -712,6 +722,7 @@ typedef struct {
 #define s390_ar(c, r1, r2)             S390_RR(c, 0x1a, r1, r2)
 #define s390_ark(c, r1, r2, r3)                S390_RRF_1(c, 0xb9f8, r1, r2, r3)
 #define s390_asi(c, r, v)              S390_SIY(c, 0xeb6a, r, v)
+#define s390_axbr(c, r1, r2)           S390_RRE(c, 0xb34a, r1, r2)
 #define s390_ay(c, r, x, b, d)         S390_RXY(c, 0xe35a, r, x, b, d)
 #define s390_basr(c, r1, r2)           S390_RR(c, 0x0d, r1, r2)
 #define s390_bctr(c, r1, r2)           S390_RR(c, 0x06, r1, r2)
@@ -729,6 +740,8 @@ typedef struct {
 #define s390_cdbr(c, r1, r2)           S390_RRE(c, 0xb319, r1, r2)
 #define s390_cdfbr(c, r1, r2)          S390_RRE(c, 0xb395, r1, r2)
 #define s390_cdgbr(c, r1, r2)          S390_RRE(c, 0xb3a5, r1, r2)
+#define s390_cdlfbr(c, r1, m3, r2, m4) S390_RRF_4(c, 0xb391, r1, m3, r2, m4)
+#define s390_cdlgbr(c, r1, m3, r2, m4) S390_RRF_4(c, 0xb3a1, r1, m3, r2, m4)
 #define s390_cds(c, r1, r2, b, d)      S390_RX(c, 0xbb, r1, r2, b, d)
 #define s390_cdsg(c, r1, r2, b, d)     S390_RSY_1(c, 0xeb3e, r1, r2, b, d)
 #define s390_cdsy(c, r1, r2, b, d)     S390_RSY_1(c, 0xeb31, r1, r2, b, d)
@@ -753,10 +766,12 @@ typedef struct {
 #define s390_cij(c, r, i, m, d)                S390_RIE_3(c, 0xec7e, r, i, m, d)
 #define s390_cit(c, r, i, m)           S390_RIE_4(c, 0xec72, r, i m);
 #define s390_cl(c, r, x, b, d)         S390_RX(c, 0x55, r, x, b, d)
+#define s390_clfdbr(c, r1, m3, r2, m4) S390_RRF_4(c, 0xb39d, r1, m3, r2, m4)
 #define s390_clg(c, r, x, b, d)                S390_RXY(c, 0xe321, r, x, b, d)
 #define s390_clgib(c, r, i, m, b, d)   S390_RIS(c, 0xecfd, r, i, m, b, d)
 #define s390_clgij(c, r, i, b)         S390_RIE_3(c, 0xec7d, r, i, m, d)
 #define s390_clgr(c, r1, r2)           S390_RRE(c, 0xb921, r1, r2)
+#define s390_clgdbr(c, r1, m3, r2, m4) S390_RRF_4(c, 0xb3ad, r1, m3, r2, m4)
 #define s390_clgrj(c, r1, r2, m, v)    S390_RIE_2(c, 0xec65, r1, r2, m, v)
 #define s390_clgrb(c, r1, r2, m3, b, d)        S390_RRS(c, 0xece5, r1, r2, m3, b, d)
 #define s390_cli(c, b, d, v)           S390_SI(c, 0x95, b, d, v)
@@ -775,6 +790,7 @@ typedef struct {
 #define s390_csg(c, r1, r2, b, d)      S390_RSY_1(c, 0xeb30, r1, r2, b, d)
 #define s390_csst(c, d1, b1, d2, b2, r)        S390_SSF(c, 0xc82, b1, d1, b2, d2, r)
 #define s390_csy(c, r1, r2, b, d)      S390_RSY_1(c, 0xeb14, r1, r2, b, d)
+#define s390_cxgbr(c, r1, r2)          S390_RRE(c, 0xb3a6, r1, r2)
 #define s390_ddbr(c, r1, r2)           S390_RRE(c, 0xb31d, r1, r2)
 #define s390_debr(c, r1, r2)           S390_RRE(c, 0xb30d, r1, r2)
 #define s390_didbr(c, r1, r2, m, r3)    S390_RRF_3(c, 0xb35b, r1, r2, m, r3)
@@ -848,6 +864,7 @@ typedef struct {
 #define s390_ldeb(c, r, x, b, d)       S390_RXE(c, 0xed04, r, x, b, d)
 #define s390_ldebr(c, r1, r2)          S390_RRE(c, 0xb304, r1, r2)
 #define s390_ldgr(c, r1, r2)           S390_RRE(c, 0xb3c1, r1, r2)
+#define s390_ldxbr(c, r1, r2)          S390_RRE(c, 0xb345, r1, r2)
 #define s390_ldr(c, r1, r2)            S390_RR(c, 0x28, r1, r2)
 #define s390_le(c, f, x, b, d)         S390_RX(c, 0x78, f, x, b, d)
 #define s390_ledbr(c, r1, r2)          S390_RRE(c, 0xb344, r1, r2)
@@ -941,7 +958,7 @@ typedef struct {
 #define s390_oihl(c, r, v)             S390_RI(c, 0xa59, r, v)
 #define s390_oilf(c, r, v)             S390_RIL_1(c, 0xc0d, r, v)
 #define s390_oilh(c, r, v)             S390_RI(c, 0xa5a, r, v)
-#define s390_oill(c, r, v)             S390_RI(c, 0xa5b` r, v)
+#define s390_oill(c, r, v)             S390_RI(c, 0xa5b, r, v)
 #define s390_oiy(c, b, d, v)           S390_SIY(c, 0xeb56 b, d, v) 
 #define s390_og(c, r, x, b, d)         S390_RXY(c, 0xe381, r, x, b, d)
 #define s390_ogr(c, r1, r2)            S390_RRE(c, 0xb981, r1, r2)
index cdb191f3171efc1ad6582ad4201bd023a61f65ca..a57d8aaeb7ad287a7eebf321b6ddf9e2b5c648ad 100644 (file)
 #endif
 #endif
 
-#if defined(PLATFORM_MACOSX) || defined(__OpenBSD__)
+#if defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__FreeBSD__)
 #include <sys/proc.h>
 #include <sys/sysctl.h>
 #  if !defined(__OpenBSD__)
 #    include <sys/utsname.h>
 #  endif
+#  if defined(__FreeBSD__)
+#    include <sys/user.h>  /* struct kinfo_proc */
+#  endif
 #endif
 
 #ifdef PLATFORM_SOLARIS
@@ -115,7 +118,7 @@ static guint32 process_wait (gpointer handle, guint32 timeout, gboolean alertabl
 static void process_close (gpointer handle, gpointer data);
 static gboolean is_pid_valid (pid_t pid);
 
-#if !(defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__HAIKU__))
+#if !(defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__))
 static FILE *
 open_process_map (int pid, const char *mode);
 #endif
@@ -175,7 +178,7 @@ is_pid_valid (pid_t pid)
 {
        gboolean result = FALSE;
 
-#if defined(PLATFORM_MACOSX) || defined(__OpenBSD__)
+#if defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__FreeBSD__)
        if (((kill(pid, 0) == 0) || (errno == EPERM)) && pid != 0)
                result = TRUE;
 #elif defined(__HAIKU__)
@@ -1448,7 +1451,7 @@ static GSList *load_modules (void)
        
        return(ret);
 }
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) || defined(__FreeBSD__)
 #include <link.h>
 static int load_modules_callback (struct dl_phdr_info *info, size_t size, void *ptr)
 {
@@ -1670,6 +1673,7 @@ static gboolean match_procname_to_modulename (char *procname, char *modulename)
        if (procname == NULL || modulename == NULL)
                return (FALSE);
 
+       DEBUG ("%s: procname=\"%s\", modulename=\"%s\"", __func__, procname, modulename);
        pname = mono_path_resolve_symlinks (procname);
        mname = mono_path_resolve_symlinks (modulename);
 
@@ -1698,10 +1702,11 @@ static gboolean match_procname_to_modulename (char *procname, char *modulename)
        g_free (pname);
        g_free (mname);
 
+       DEBUG ("%s: result is %d", __func__, result);
        return result;
 }
 
-#if !(defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__HAIKU__))
+#if !(defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__))
 static FILE *
 open_process_map (int pid, const char *mode)
 {
@@ -1724,11 +1729,13 @@ open_process_map (int pid, const char *mode)
 }
 #endif
 
+static char *get_process_name_from_proc (pid_t pid);
+
 gboolean EnumProcessModules (gpointer process, gpointer *modules,
                             guint32 size, guint32 *needed)
 {
        WapiHandle_process *process_handle;
-#if !defined(__OpenBSD__) && !defined(PLATFORM_MACOSX)
+#if !defined(__OpenBSD__) && !defined(PLATFORM_MACOSX) && !defined(__FreeBSD__)
        FILE *fp;
 #endif
        GSList *mods = NULL;
@@ -1752,6 +1759,7 @@ gboolean EnumProcessModules (gpointer process, gpointer *modules,
 
        if (WAPI_IS_PSEUDO_PROCESS_HANDLE (process)) {
                pid = WAPI_HANDLE_TO_PID (process);
+               proc_name = get_process_name_from_proc (pid);
        } else {
                process_handle = lookup_process_handle (process);
                if (!process_handle) {
@@ -1763,7 +1771,7 @@ gboolean EnumProcessModules (gpointer process, gpointer *modules,
                proc_name = process_handle->proc_name;
        }
        
-#if defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__HAIKU__)
+#if defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__)
        mods = load_modules ();
        if (!proc_name) {
                modules[0] = NULL;
@@ -1818,7 +1826,7 @@ gboolean EnumProcessModules (gpointer process, gpointer *modules,
 static char *
 get_process_name_from_proc (pid_t pid)
 {
-#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
        int mib [6];
        size_t size;
        struct kinfo_proc *pi;
@@ -1876,6 +1884,30 @@ get_process_name_from_proc (pid_t pid)
 
        free(pi);
 #endif
+#elif defined(__FreeBSD__)
+       mib [0] = CTL_KERN;
+       mib [1] = KERN_PROC;
+       mib [2] = KERN_PROC_PID;
+       mib [3] = pid;
+       if (sysctl(mib, 4, NULL, &size, NULL, 0) < 0) {
+               DEBUG ("%s: sysctl() failed: %d", __func__, errno);
+               return(ret);
+       }
+
+       if ((pi = malloc(size)) == NULL)
+               return(ret);
+
+       if (sysctl (mib, 4, pi, &size, NULL, 0) < 0) {
+               if (errno == ENOMEM) {
+                       free(pi);
+                       DEBUG ("%s: Didn't allocate enough memory for kproc info", __func__);
+               }
+               return(ret);
+       }
+
+       if (strlen (pi->ki_comm) > 0)
+               ret = g_strdup (pi->ki_comm);
+       free(pi);
 #elif defined(__OpenBSD__)
        mib [0] = CTL_KERN;
        mib [1] = KERN_PROC;
@@ -1885,8 +1917,10 @@ get_process_name_from_proc (pid_t pid)
        mib [5] = 0;
 
 retry:
-       if (sysctl(mib, 6, NULL, &size, NULL, 0) < 0)
+       if (sysctl(mib, 6, NULL, &size, NULL, 0) < 0) {
+               DEBUG ("%s: sysctl() failed: %d", __func__, errno);
                return(ret);
+       }
 
        if ((pi = malloc(size)) == NULL)
                return(ret);
@@ -1902,8 +1936,13 @@ retry:
                return(ret);
        }
 
+#if defined(__OpenBSD__)
        if (strlen (pi->p_comm) > 0)
                ret = g_strdup (pi->p_comm);
+#elif defined(__FreeBSD__)
+       if (strlen (pi->ki_comm) > 0)
+               ret = g_strdup (pi->ki_comm);
+#endif
 
        free(pi);
 #elif defined(__HAIKU__)
@@ -2010,7 +2049,7 @@ get_module_name (gpointer process, gpointer module,
        char *procname_ext = NULL;
        glong len;
        gsize bytes;
-#if !defined(__OpenBSD__) && !defined(PLATFORM_MACOSX)
+#if !defined(__OpenBSD__) && !defined(PLATFORM_MACOSX) && !defined(__FreeBSD__)
        FILE *fp;
 #endif
        GSList *mods = NULL;
@@ -2044,7 +2083,7 @@ get_module_name (gpointer process, gpointer module,
        }
 
        /* Look up the address in /proc/<pid>/maps */
-#if defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__HAIKU__)
+#if defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__)
        mods = load_modules ();
 #else
        fp = open_process_map (pid, "r");
@@ -2150,7 +2189,7 @@ GetModuleInformation (gpointer process, gpointer module,
 {
        WapiHandle_process *process_handle;
        pid_t pid;
-#if !defined(__OpenBSD__) && !defined(PLATFORM_MACOSX)
+#if !defined(__OpenBSD__) && !defined(PLATFORM_MACOSX) && !defined(__FreeBSD__)
        FILE *fp;
 #endif
        GSList *mods = NULL;
@@ -2181,7 +2220,7 @@ GetModuleInformation (gpointer process, gpointer module,
                proc_name = g_strdup (process_handle->proc_name);
        }
 
-#if defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__HAIKU__)
+#if defined(PLATFORM_MACOSX) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
        mods = load_modules ();
 #else
        /* Look up the address in /proc/<pid>/maps */
index daef6ba5ecdd05eb45aab60bcd2ed5dc23391a51..aec0d136fc059c12ca222f245a7036aee71a8f06 100644 (file)
@@ -153,8 +153,6 @@ common_sources = \
        mono-basic-block.c      \
        mono-basic-block.h      \
        mono-config.c           \
-       mono-cq.c               \
-       mono-cq.h               \
        mono-debug.h            \
        mono-debug.c            \
        mono-debug-debugger.h   \
@@ -169,8 +167,6 @@ common_sources = \
        mono-ptr-array.h        \
        mono-route.c            \
        mono-route.h            \
-       mono-wsq.c              \
-       mono-wsq.h              \
        monitor.h               \
        nacl-stub.c             \
        normalization-tables.h  \
@@ -203,14 +199,10 @@ common_sources = \
        tabledefs.h             \
        threads.c               \
        threads-types.h         \
-       threadpool.c            \
-       threadpool.h            \
-       threadpool-internals.h  \
        threadpool-ms.c \
        threadpool-ms.h \
        threadpool-ms-io.c      \
        threadpool-ms-io.h      \
-       tpool-poll.c    \
        verify.c                \
        verify-internals.h      \
        wrapper-types.h \
@@ -328,5 +320,4 @@ endif
 endif
 
 EXTRA_DIST = $(win32_sources) $(unix_sources) $(null_sources) runtime.h \
-               tpool-poll.c tpool-epoll.c tpool-kqueue.c \
                threadpool-ms-io-poll.c threadpool-ms-io-epoll.c threadpool-ms-io-kqueue.c
index b3742cb943fceff38b5601b7ae8662ff2c7f2c63..0071cdecda3e6f6cac69b6c5d0a5ce537eaec77d 100644 (file)
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/exception.h>
 #include <mono/metadata/threads.h>
+#include <mono/metadata/threadpool-ms.h>
 #include <mono/metadata/socket-io.h>
 #include <mono/metadata/tabledefs.h>
 #include <mono/metadata/gc-internal.h>
 #include <mono/metadata/mono-gc.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/monitor.h>
-#include <mono/metadata/threadpool.h>
 #include <mono/metadata/mono-debug.h>
 #include <mono/metadata/mono-debug-debugger.h>
 #include <mono/metadata/attach.h>
@@ -232,7 +232,6 @@ mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb,
        
        mono_gc_base_init ();
        mono_monitor_init ();
-       mono_thread_pool_init ();
        mono_marshal_init ();
 
        mono_install_assembly_preload_hook (mono_domain_assembly_preload, GUINT_TO_POINTER (FALSE));
@@ -2277,7 +2276,7 @@ unload_thread_main (void *arg)
                goto failure;
        }
 
-       if (!mono_thread_pool_remove_domain_jobs (domain, -1)) {
+       if (!mono_threadpool_ms_remove_domain_jobs (domain, -1)) {
                data->failure_reason = g_strdup_printf ("Cleanup of threadpool jobs of domain %s timed out.", domain->friendly_name);
                goto failure;
        }
index 441b0a4271ce2118e96a4cb63c8139a775ab2343..6fcb23308e05b6b3247a1a4b68b088505576c2e2 100644 (file)
@@ -11,6 +11,7 @@
 #include <mono/io-layer/io-layer.h>
 #include "mono/utils/mono-compiler.h"
 #include "mono/utils/mono-error.h"
+#include "mono/sgen/gc-internal-agnostic.h"
 
 #define MONO_CLASS_IS_ARRAY(c) ((c)->rank)
 
@@ -394,7 +395,7 @@ struct _MonoClass {
        MonoGenericClass *generic_class;
        MonoGenericContainer *generic_container;
 
-       void *gc_descr;
+       MonoGCDescriptor gc_descr;
 
        MonoClassRuntimeInfo *runtime_info;
 
@@ -452,7 +453,7 @@ struct MonoVTable {
         * According to comments in gc_gcj.h, this should be the second word in
         * the vtable.
         */
-       void *gc_descr;         
+       MonoGCDescriptor gc_descr;
        MonoDomain *domain;  /* each object/vtable belongs to exactly one domain */
         gpointer    type; /* System.Type type for klass */
        guint8     *interface_bitmap;
@@ -861,23 +862,6 @@ typedef struct {
        void       *handle;
 } MonoHandleRef;
 
-enum {
-       MONO_GENERIC_SHARING_NONE,
-       MONO_GENERIC_SHARING_COLLECTIONS,
-       MONO_GENERIC_SHARING_CORLIB,
-       MONO_GENERIC_SHARING_ALL
-};
-
-/*
- * Flags for which contexts were used in inflating a generic.
- */
-enum {
-       MONO_GENERIC_CONTEXT_USED_CLASS = 1,
-       MONO_GENERIC_CONTEXT_USED_METHOD = 2
-};
-
-#define MONO_GENERIC_CONTEXT_USED_BOTH         (MONO_GENERIC_CONTEXT_USED_CLASS | MONO_GENERIC_CONTEXT_USED_METHOD)
-
 extern MonoStats mono_stats;
 
 typedef gpointer (*MonoTrampoline)       (MonoMethod *method);
@@ -1223,6 +1207,9 @@ mono_loader_get_last_error (void);
 void
 mono_loader_clear_error    (void);
 
+void
+mono_loader_assert_no_error (void);
+
 void
 mono_reflection_init       (void);
 
index ca7567985ff3193344445353b7920d60b46a516c..058c0c982d2879f7061c0a050139350518727c56 100644 (file)
@@ -280,7 +280,7 @@ done:
                        mono_error_set_type_load_name (error, name, assembly, "Could not resolve type with token %08x", type_token);
                }
        }
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        return res;
 }
 
@@ -1335,7 +1335,7 @@ mono_class_find_enum_basetype (MonoClass *class, MonoError *error)
        mono_error_set_type_load_class (error, class, "Could not find base type");
 
 fail:
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        return NULL;
 }
 
@@ -5744,7 +5744,7 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
 
        if (mono_metadata_token_table (type_token) != MONO_TABLE_TYPEDEF || tidx > tt->rows) {
                mono_error_set_bad_image (error, image, "Invalid typedef token %x", type_token);
-               g_assert (!mono_loader_get_last_error ());
+               mono_loader_assert_no_error ();
                return NULL;
        }
 
@@ -5752,7 +5752,7 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
 
        if ((class = mono_internal_hash_table_lookup (&image->class_cache, GUINT_TO_POINTER (type_token)))) {
                mono_loader_unlock ();
-               g_assert (!mono_loader_get_last_error ());
+               mono_loader_assert_no_error ();
                return class;
        }
 
@@ -5841,7 +5841,7 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
                        mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup (mono_error_get_message (error)));
                        mono_loader_unlock ();
                        mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
-                       g_assert (!mono_loader_get_last_error ());
+                       mono_loader_assert_no_error ();
                        return NULL;
                }
        }
@@ -5913,7 +5913,7 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
                        mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup (mono_error_get_message (error)));
                        mono_loader_unlock ();
                        mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
-                       g_assert (!mono_loader_get_last_error ());
+                       mono_loader_assert_no_error ();
                        return NULL;
                }
                class->cast_class = class->element_class = mono_class_from_mono_type (enum_basetype);
@@ -5928,7 +5928,7 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
                mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup_printf ("Could not load generic parameter constrains due to %s", mono_error_get_message (error)));
                mono_loader_unlock ();
                mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
-               g_assert (!mono_loader_get_last_error ());
+               mono_loader_assert_no_error ();
                return NULL;
        }
 
@@ -5940,7 +5940,7 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
        mono_loader_unlock ();
 
        mono_profiler_class_loaded (class, MONO_PROFILE_OK);
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
 
        return class;
 
@@ -5948,7 +5948,7 @@ parent_failure:
        mono_class_setup_mono_type (class);
        mono_loader_unlock ();
        mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        return NULL;
 }
 
@@ -6546,7 +6546,7 @@ mono_type_retrieve_from_typespec (MonoImage *image, guint32 type_spec, MonoGener
                MonoType *inflated = inflate_generic_type (NULL, t, context, error);
 
                if (!mono_error_ok (error)) {
-                       g_assert (!mono_loader_get_last_error ());
+                       mono_loader_assert_no_error ();
                        return NULL;
                }
 
@@ -7408,7 +7408,7 @@ mono_type_get_checked (MonoImage *image, guint32 type_token, MonoGenericContext
                MonoClass *class = mono_class_get_checked (image, type_token, error);
 
                if (!class) {
-                       g_assert (!mono_loader_get_last_error ());
+                       mono_loader_assert_no_error ();
                        return NULL;
                }
 
@@ -7419,7 +7419,7 @@ mono_type_get_checked (MonoImage *image, guint32 type_token, MonoGenericContext
        type = mono_type_retrieve_from_typespec (image, type_token, context, &inflated, error);
 
        if (!type) {
-               g_assert (!mono_loader_get_last_error ());
+               mono_loader_assert_no_error ();
                return NULL;
        }
 
index 2edc8179e79269fd210644481e2279d6ba11088a..bdc8cb1f85481080cd96fda65eb3dbe64cc8c2d9 100644 (file)
@@ -23,7 +23,6 @@
 #include "metadata/appdomain.h"
 #include "metadata/reflection-internals.h"
 #include "mono/metadata/debug-helpers.h"
-#include "mono/metadata/threadpool.h"
 #include "mono/metadata/threads.h"
 #include "mono/metadata/monitor.h"
 #include "mono/metadata/metadata-internals.h"
index dd64b249703eb62873c90b21d8af5697f375ccc8..58eff825c01200ec73875191c4192f4afc991e2b 100644 (file)
@@ -33,7 +33,7 @@
 #include <mono/metadata/domain-internals.h>
 #include <mono/metadata/gc-internal.h>
 #include <mono/metadata/metadata.h>
-#include <mono/metadata/threadpool.h>
+#include <mono/metadata/threadpool-ms.h>
 #include <mono/utils/mono-signal-handler.h>
 #include <mono/utils/mono-proclib.h>
 
@@ -251,7 +251,7 @@ do_console_cancel_event (void)
        method = mono_class_get_method_from_name (klass, "BeginInvoke", -1);
        g_assert (method != NULL);
 
-       mono_thread_pool_begin_invoke (domain, (MonoObject*) load_value, method, NULL);
+       mono_threadpool_ms_begin_invoke (domain, (MonoObject*) load_value, method, NULL);
 }
 
 static int need_cancel = FALSE;
index 2e751e1f57bd127378376f5fa5b15b7bc9d44fc0..7de83602c9b252cdfce50d16369e75de67e2f1a0 100644 (file)
@@ -26,7 +26,6 @@
 #include <mono/metadata/domain-internals.h>
 #include <mono/metadata/gc-internal.h>
 #include <mono/metadata/metadata.h>
-#include <mono/metadata/threadpool.h>
 
 #include <mono/metadata/console-io.h>
 #include <mono/metadata/exception.h>
index f1fd30c136043744d0394095da88f7aafc7553bf..7d7b7588e7dae77ee43323197a1e31c9ad6c5adb 100644 (file)
@@ -38,77 +38,77 @@ static const DateTimeFormatEntry datetime_format_entries [] = {
        {1921, 1929, 1932, {9187, 9196, 9208, 9215, 9223, 9233, 9239}, {9246, 9250, 9254, 9258, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {9286, 9296, 9305, 9313, 9321, 9329, 9336, 9343, 9351, 2102, 9357, 9365, 0}, {9374, 9384, 9393, 9401, 9409, 9417, 9424, 9431, 9440, 7911, 9446, 9456, 0}, {9465, 9469, 9474, 9479, 9483, 7945, 2239, 9487, 9491, 2255, 9495, 2259, 0}, {9465, 9469, 9474, 9479, 9483, 7945, 2239, 9487, 9491, 2255, 9495, 2259, 0}, 0, 1, 691, 187, {9499,9509,6153,9517,9529,9539,9549,1692,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
        {1921, 1929, 1932, {9610, 9618, 9627, 9634, 9641, 9650, 1985}, {1992, 1995, 9657, 2002, 9660, 9664, 2013}, {2016, 2018, 9667, 2023, 9669, 2018, 2023}, {5710, 5718, 9672, 6077, 9678, 9683, 9688, 2479, 2486, 5789, 2504, 2513, 0}, {9693, 9702, 7844, 9712, 9720, 9726, 9732, 9738, 9746, 9756, 9765, 9774, 0}, {2522, 2526, 2530, 2534, 9678, 9683, 9688, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 9678, 9683, 9688, 2546, 2550, 2554, 2558, 2562, 0}, 2, 1, 691, 187, {4753,1156,1167,1692,5888,9783,9796,9806,0,0,0,0,0,0},{2300,0,0,0,0,0,0,0,0,0},{843,251,2321,0,0,0,0,0,0,0,0,0},{848,269,2337,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {289, 9817, 9826, {9834, 9841, 9850, 9859, 9871, 9879, 9888}, {9898, 9902, 3761, 9907, 9912, 9916, 9920}, {2673, 5694, 2428, 2428, 9924, 2018, 2023}, {9926, 9932, 4887, 9939, 2465, 9945, 9953, 9960, 9966, 9974, 9980, 9988, 0}, {9926, 9932, 4887, 9939, 2465, 9945, 9953, 9960, 9966, 9974, 9980, 9988, 0}, {2759, 9996, 3761, 10000, 10004, 10008, 10012, 10016, 9920, 10020, 10024, 10029, 0}, {2759, 9996, 3761, 10000, 10004, 10008, 10012, 10016, 9920, 10020, 10024, 10029, 0}, 0, 1, 691, 187, {4753,4762,0,0,0,0,0,0,0,0,0,0,0,0},{1207,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {10033, 10046, 10049, {10052, 10060, 10068, 2368, 2375, 2383, 10075}, {10083, 10088, 10093, 10097, 10101, 10105, 10109}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {10114, 10122, 10131, 2696, 10004, 2706, 2711, 10136, 2723, 2733, 2741, 3752, 0}, {7370, 7378, 4887, 2459, 2465, 2469, 2474, 10144, 2486, 2496, 2504, 2513, 0}, {2759, 2763, 3761, 2772, 10004, 2776, 2780, 2784, 2788, 2792, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 10004, 2776, 2780, 2784, 2788, 2792, 2796, 3769, 0}, 2, 1, 2566, 187, {1692,5888,0,0,0,0,0,0,0,0,0,0,0,0},{10152,10170,0,0,0,0,0,0,0,0},{251,843,7529,0,0,0,0,0,0,0,0,0},{269,848,7585,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 185, 187, {2277,2286,189,198,8579,10193,1692,0,0,0,0,0,0,0},{1242,10205,10221,0,0,0,0,0,0,0},{843,251,3594,242,0,0,0,0,0,0,0,0},{848,269,3602,257,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 10263, 10268, {10272, 10278, 10288, 10294, 10305, 10315, 10320}, {10330, 10334, 10338, 10342, 10347, 10351, 10355}, {2018, 2018, 2023, 10359, 2018, 7736, 7736}, {10362, 10367, 10374, 10379, 10385, 10392, 10400, 10407, 10416, 10423, 10428, 10435, 0}, {10362, 10367, 10374, 10379, 10385, 10392, 10400, 10407, 10416, 10423, 10428, 10435, 0}, {10443, 10447, 3761, 10452, 3730, 10456, 10460, 10464, 10469, 10473, 10477, 10481, 0}, {10443, 10447, 3761, 10452, 3730, 10456, 10460, 10464, 10469, 10473, 10477, 10481, 0}, 0, 1, 691, 187, {4753,4762,1156,1167,0,0,0,0,0,0,0,0,0,0},{10485,1242,10502,5505,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 10520, 10538, {10556, 10567, 10580, 10589, 10596, 10609, 10618}, {10556, 10567, 10580, 10589, 10596, 10609, 10618}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {10627, 10638, 10649, 10658, 10669, 10676, 10683, 10696, 10705, 10716, 10729, 10740, 0}, {10627, 10638, 10649, 10658, 10669, 10676, 10683, 10696, 10705, 10716, 10729, 10740, 0}, {10627, 10638, 10649, 10658, 10669, 10676, 10683, 10696, 10705, 10716, 10729, 10740, 0}, {10627, 10638, 10649, 10658, 10669, 10676, 10683, 10696, 10705, 10716, 10729, 10740, 0}, 0, 0, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 1929, 1932, {10765, 10772, 10778, 10785, 10790, 10796, 10802}, {10808, 10812, 10816, 10820, 10824, 10828, 10832}, {2428, 2023, 2023, 10836, 4442, 3987, 2023}, {10114, 10122, 10838, 2696, 10844, 2706, 2711, 10848, 2723, 2733, 2741, 10856, 0}, {10114, 10122, 10838, 2696, 10844, 2706, 2711, 10848, 2723, 2733, 2741, 10856, 0}, {2759, 2763, 3761, 2772, 10844, 2776, 2780, 10865, 2788, 2792, 2796, 10869, 0}, {2759, 2763, 3761, 2772, 10844, 2776, 2780, 10865, 2788, 2792, 2796, 10869, 0}, 0, 0, 185, 187, {198,189,1128,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 10873, 10878, {10883, 10896, 10915, 10932, 10945, 10958, 10975}, {10988, 8775, 8780, 8785, 8790, 8795, 8800}, {10993, 8808, 8805, 8811, 8814, 8808, 8811}, {10996, 11009, 11020, 11037, 11052, 11067, 11082, 11095, 11110, 11127, 11142, 11159, 0}, {11174, 11185, 11198, 11213, 11226, 11239, 11252, 11263, 11276, 11291, 11304, 11323, 0}, {11336, 11343, 11350, 11357, 11364, 11371, 11378, 11385, 11392, 11399, 11406, 11413, 0}, {11336, 11343, 11350, 11357, 11364, 11371, 11378, 11385, 11392, 11399, 11406, 11413, 0}, 0, 1, 691, 187, {1156,1167,1692,0,0,0,0,0,0,0,0,0,0,0},{11420,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{11438,0,0,0,0,0,0,0}},
-       {289, 11454, 11467, {11480, 11495, 11516, 11531, 11544, 11557, 10975}, {421, 426, 11572, 436, 11577, 446, 451}, {456, 459, 11582, 465, 468, 459, 465}, {11585, 11602, 11611, 11626, 521, 11643, 11658, 11671, 11686, 11703, 11724, 11741, 0}, {11756, 11773, 11786, 11803, 9017, 11822, 11837, 11850, 11863, 11878, 11901, 11920, 0}, {11933, 11940, 11947, 11954, 521, 11961, 11968, 11975, 11982, 11989, 11996, 12003, 0}, {11933, 11940, 11947, 11954, 521, 11961, 11968, 11975, 11982, 11989, 11996, 12003, 0}, 0, 0, 691, 187, {1167,0,0,0,0,0,0,0,0,0,0,0,0,0},{1242,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1921, 12010, 12015, {12020, 12028, 12039, 12045, 12051, 12060, 1985}, {9246, 9250, 2415, 12066, 9262, 9267, 12070}, {9275, 9277, 12074, 9281, 9283, 9277, 9281}, {2438, 2445, 9672, 2459, 2465, 12076, 12082, 12088, 2486, 2496, 2504, 2513, 0}, {2438, 2445, 9672, 2459, 2465, 12076, 12082, 12088, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,12099,1167,9806,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {12109, 12118, 12123, {12128, 12139, 12150, 12161, 12172, 12183, 12189}, {2018, 9924, 2430, 4442, 2016, 10836, 2436}, {2018, 9924, 2430, 4442, 2016, 10836, 2436}, {12198, 12206, 12215, 12222, 4898, 12229, 12235, 2479, 2486, 12241, 2504, 12250, 0}, {12198, 12206, 12215, 12222, 4898, 12229, 12235, 2479, 2486, 12241, 2504, 12250, 0}, {12260, 12265, 12215, 2534, 4898, 12229, 12235, 2546, 12271, 2554, 2558, 12276, 0}, {12260, 12265, 12215, 2534, 4898, 12229, 12235, 2546, 12271, 2554, 2558, 12276, 0}, 2, 1, 691, 187, {7519,1156,1167,1692,0,0,0,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1921, 12281, 12298, {12312, 12323, 12333, 12342, 12353, 12365, 12376}, {12386, 12389, 12392, 12395, 12398, 12401, 12404}, {2023, 2018, 2432, 2430, 7736, 2018, 2023}, {12407, 12417, 12428, 12434, 12443, 12449, 12457, 12465, 12473, 12484, 12493, 12503, 0}, {12513, 12523, 2453, 12534, 12543, 12549, 12557, 12565, 12573, 12584, 12593, 12603, 0}, {12613, 12619, 12428, 12625, 12443, 12630, 12636, 12642, 4190, 12647, 4201, 12652, 0}, {12613, 12619, 12428, 12625, 12443, 12630, 12636, 12642, 4190, 12647, 4201, 12652, 0}, 0, 1, 691, 187, {9517,9539,12657,0,0,0,0,0,0,0,0,0,0,0},{12669,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{12696,0,0,0,0,0,0,0}},
-       {12714, 12726, 12015, {12732, 12744, 12756, 12768, 12782, 12797, 12810}, {12824, 12827, 12830, 12833, 12836, 12839, 9660}, {2023, 2018, 12842, 2430, 4442, 2018, 9669}, {12844, 12851, 12859, 12865, 12874, 12883, 12893, 12899, 12910, 12920, 12927, 12937, 0}, {12844, 12851, 12859, 12865, 12874, 12883, 12893, 12899, 12910, 12920, 12927, 12937, 0}, {12945, 12951, 12956, 12961, 12966, 12971, 12978, 12984, 12990, 12996, 13002, 13009, 0}, {12945, 12951, 12956, 12961, 12966, 12971, 12978, 12984, 12990, 12996, 13002, 13009, 0}, 2, 1, 2566, 187, {1692,2568,0,0,0,0,0,0,0,0,0,0,0,0},{13016,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{13038,0,0,0,0,0,0,0}},
-       {1, 13053, 13065, {13077, 13092, 13107, 13122, 13139, 13158, 13169}, {13180, 13187, 13194, 13201, 13208, 13215, 13222}, {0, 0, 0, 0, 0, 0, 0}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, 0, 0, 691, 187, {1156,1167,4762,1128,189,0,0,0,0,0,0,0,0,0},{13393,13411,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 13430, 13450, {13467, 13480, 13493, 13509, 13526, 13541, 13550}, {13467, 13480, 13493, 13509, 13526, 13541, 13550}, {13559, 13562, 13565, 13568, 13571, 13574, 13577}, {13580, 13593, 13604, 13613, 13624, 13629, 13638, 13649, 13656, 13671, 13682, 13695, 0}, {13708, 13723, 13604, 13613, 13736, 13629, 13743, 13649, 13656, 13671, 13682, 13695, 0}, {13580, 13593, 13604, 13613, 13624, 13629, 13638, 13649, 13656, 13671, 13682, 13695, 0}, {13580, 13593, 13604, 13613, 13624, 13629, 13638, 13649, 13656, 13671, 13682, 13695, 0}, 0, 6, 185, 187, {198,189,0,0,0,0,0,0,0,0,0,0,0,0},{13756,5505,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 13775, 13778, {13781, 13794, 13804, 13813, 13823, 13834, 13845}, {13857, 13860, 13865, 13870, 13875, 13880, 13885}, {13857, 13890, 13893, 13896, 13899, 13902, 13905}, {13908, 13917, 13926, 13935, 13944, 13953, 13962, 13971, 13980, 13989, 13999, 14009, 0}, {14019, 14028, 14037, 14046, 14055, 14064, 14073, 14082, 14091, 14100, 14110, 14120, 0}, {14130, 14136, 14142, 14148, 14154, 14160, 14166, 14172, 14178, 14184, 14191, 14198, 0}, {14130, 14136, 14142, 14148, 14154, 14160, 14166, 14172, 14178, 14184, 14191, 14198, 0}, 0, 1, 185, 187, {198,189,1139,1128,1692,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 14205, 14229, {14253, 14266, 14287, 14306, 14327, 14346, 14359}, {14370, 14377, 14384, 14391, 14398, 14405, 14412}, {14419, 14422, 14422, 14425, 14428, 14431, 14436}, {14439, 14454, 14469, 14478, 14489, 14500, 14513, 14526, 14541, 14560, 14579, 14596, 0}, {14615, 14632, 14649, 14660, 14673, 14686, 14701, 14716, 14733, 14754, 14775, 14794, 0}, {14815, 14822, 14829, 14836, 14843, 14850, 14857, 14864, 14871, 14878, 14885, 14892, 0}, {14815, 14822, 14829, 14836, 14843, 14850, 14857, 14864, 14871, 14878, 14885, 14892, 0}, 0, 1, 691, 187, {1156,1167,9796,198,14899,3582,1692,0,0,0,0,0,0,0},{3870,1207,13756,5505,14910,14921,14933,14950,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {14968, 14974, 14988, 15011, 15025, 15041, 15048}, {15057, 15060, 15065, 15071, 15075, 7736, 15080}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {15084, 15091, 10374, 15098, 3730, 15104, 15110, 15116, 15123, 15132, 15140, 15147, 0}, {15154, 15161, 15168, 15173, 15179, 15183, 15188, 15193, 15200, 15209, 15217, 15224, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, 0, 0, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{15259,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {15281, 1929, 1932, {15296, 15304, 15315, 15325, 15336, 15345, 15354}, {15364, 15368, 15372, 15376, 15380, 15384, 15388}, {15392, 12842, 12842, 12842, 2432, 2432, 2436}, {15394, 15404, 15412, 15420, 15428, 15436, 15443, 15451, 15459, 15466, 15472, 15479, 0}, {15487, 15498, 15507, 15516, 15525, 15534, 15542, 15551, 15560, 15568, 15575, 15583, 0}, {15592, 15597, 4845, 15602, 15607, 15612, 15617, 15622, 15627, 15632, 15637, 15642, 0}, {15592, 15597, 4845, 15602, 15607, 15612, 15617, 15622, 15627, 15632, 15637, 15642, 0}, 2, 1, 185, 187, {1681,1692,0,0,0,0,0,0,0,0,0,0,0,0},{15647,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{15680,0,0,0,0,0,0,0}},
-       {289, 15697, 15718, {15735, 331, 352, 8714, 15748, 15765, 15776}, {15789, 15797, 15805, 15811, 15819, 15827, 15835}, {456, 459, 462, 465, 468, 459, 465}, {15843, 484, 501, 510, 15858, 15865, 15874, 542, 555, 574, 591, 606, 0}, {15843, 484, 501, 510, 15858, 15865, 15874, 542, 555, 574, 591, 606, 0}, {15883, 15891, 15899, 639, 15858, 15907, 15915, 647, 655, 665, 673, 683, 0}, {15883, 15891, 15899, 639, 15858, 15907, 15915, 647, 655, 665, 673, 683, 0}, 0, 1, 691, 187, {1156,1167,15923,0,0,0,0,0,0,0,0,0,0,0},{13756,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 0, 0, {15940, 15947, 15958, 15967, 15976, 15983, 15994}, {16004, 16008, 16012, 16016, 16020, 16023, 16027}, {0, 0, 0, 0, 0, 0, 0}, {16031, 16041, 16050, 16058, 16067, 16080, 16092, 16099, 16106, 16113, 16123, 16135, 0}, {16031, 16041, 16050, 16058, 16067, 16080, 16092, 16099, 16106, 16113, 16123, 16135, 0}, {16148, 16152, 16156, 16160, 16164, 16168, 16172, 16176, 16180, 16184, 16188, 16192, 0}, {16148, 16152, 16156, 16160, 16164, 16168, 16172, 16176, 16180, 16184, 16188, 16192, 0}, 0, 0, 185, 187, {189,1681,1735,1692,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 0, 0, {16196, 16201, 16207, 16217, 16229, 16237, 16248}, {16257, 16261, 16265, 16269, 16273, 16277, 16281}, {0, 0, 0, 0, 0, 0, 0}, {16285, 16295, 16305, 16312, 16319, 2706, 16324, 16331, 16338, 16347, 16355, 16363, 0}, {16285, 16295, 16305, 16312, 16319, 2706, 16324, 16331, 16338, 16347, 16355, 16363, 0}, {2759, 2763, 16027, 16371, 16375, 2776, 2780, 16379, 2788, 2792, 2796, 16383, 0}, {2759, 2763, 16027, 16371, 16375, 2776, 2780, 16379, 2788, 2792, 2796, 16383, 0}, 0, 0, 185, 187, {1681,1735,1692,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {16387, 16393, 16404, 16217, 16229, 16237, 16248}, {16414, 16418, 16422, 16269, 16273, 16277, 16281}, {2023, 2428, 16426, 2430, 2023, 5694, 2428}, {16428, 16438, 16449, 16456, 16465, 16471, 16477, 16485, 16493, 16504, 16514, 16523, 0}, {16532, 16295, 16541, 16547, 16319, 2706, 16324, 16331, 16554, 16347, 16355, 16363, 0}, {2759, 2763, 16564, 2772, 16375, 2776, 2780, 16379, 2788, 2792, 2796, 16383, 0}, {2759, 2763, 16564, 2772, 16375, 2776, 2780, 16379, 2788, 2792, 2796, 16383, 0}, 0, 0, 2566, 187, {1128,1139,189,1681,1735,1692,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 16568, 16572, {16576, 16583, 16591, 16599, 16608, 16618, 16625}, {2652, 16634, 2658, 16637, 2664, 16640, 2670}, {2023, 2428, 2673, 3705, 2673, 3989, 2023}, {16643, 16652, 16662, 2696, 10844, 16668, 16674, 16680, 2723, 2733, 2741, 10856, 0}, {16643, 16652, 16662, 2696, 10844, 16668, 16674, 16680, 2723, 2733, 2741, 10856, 0}, {2759, 2763, 3761, 2772, 10844, 2776, 2780, 2784, 2788, 2792, 2796, 10869, 0}, {2759, 2763, 3761, 2772, 10844, 2776, 2780, 2784, 2788, 2792, 2796, 10869, 0}, 0, 0, 185, 187, {1681,1735,1692,16689,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {16701, 16717, 16742, 16770, 16798, 16826, 16854}, {16873, 16883, 16893, 16903, 16913, 16923, 16933}, {16943, 16947, 16951, 16947, 16955, 16959, 16963}, {16967, 16989, 17017, 17033, 17052, 17068, 17087, 17106, 17128, 17159, 17187, 17212, 0}, {16967, 16989, 17017, 17033, 17052, 17068, 17087, 17106, 17128, 17159, 17187, 17212, 0}, {17240, 17250, 17260, 17270, 17280, 17290, 17300, 17310, 17320, 17330, 17340, 17350, 0}, {17240, 17250, 17260, 17270, 17280, 17290, 17300, 17310, 17320, 17330, 17340, 17350, 0}, 0, 1, 691, 187, {1156,1167,7419,1176,4762,4753,1692,0,0,0,0,0,0,0},{17360,17394,17427,3870,17461,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 17473, 17478, {5932, 17483, 17494, 17504, 17514, 17524, 17538}, {17550, 17554, 17559, 17564, 17568, 17573, 17578}, {2023, 2428, 2430, 2428, 5694, 2434, 2436}, {2438, 2445, 4887, 6077, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2438, 2445, 4887, 6077, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, 2, 1, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{2300,0,0,0,0,0,0,0,0,0},{251,4288,0,0,0,0,0,0,0,0,0,0},{269,4302,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 17582, 17598, {17608, 17627, 17646, 17668, 17687, 17709, 17734}, {17753, 17763, 17773, 17786, 17796, 17809, 17825}, {17835, 17839, 17846, 17853, 17860, 17867, 17874}, {17878, 17894, 17913, 17929, 17948, 17955, 17965, 17981, 17997, 18016, 18038, 18054, 0}, {17878, 17894, 17913, 17929, 17948, 17955, 17965, 17981, 17997, 18016, 18038, 18054, 0}, {18073, 18080, 17913, 18090, 17948, 17955, 18106, 18119, 18126, 18139, 18155, 18165, 0}, {18073, 18080, 17913, 18090, 17948, 17955, 18106, 18119, 18126, 18139, 18155, 18165, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {18178, 18192, 18195, {18198, 18207, 18216, 18226, 18236, 18246, 18258}, {18266, 18271, 18275, 18279, 18283, 18288, 18293}, {18297, 2430, 2430, 9924, 18297, 18300, 2023}, {18303, 18310, 18315, 2696, 18321, 18327, 18334, 18340, 18348, 18358, 18366, 18375, 0}, {18303, 18310, 18315, 2696, 18321, 18327, 18334, 18340, 18348, 18358, 18366, 18375, 0}, {2759, 18385, 3761, 2772, 18389, 18393, 18398, 18402, 18406, 18410, 2796, 18414, 0}, {2759, 18385, 3761, 2772, 18389, 18393, 18398, 18402, 18406, 18410, 2796, 18414, 0}, 0, 0, 185, 187, {198,1692,18419,7410,2277,0,0,0,0,0,0,0,0,0},{18428,18453,10193,0,0,0,0,0,0,0},{251,3594,843,0,0,0,0,0,0,0,0,0},{269,3602,848,3594,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {18472, 18485, 18490, {18495, 18507, 18518, 18532, 18544, 18554, 18564}, {18575, 18580, 18585, 18590, 18595, 18600, 18605}, {2023, 3989, 2428, 6293, 2673, 16426, 2436}, {18610, 18627, 18640, 18654, 18667, 18680, 18693, 18707, 18719, 18733, 18747, 18761, 0}, {18610, 18627, 18640, 18654, 18667, 18680, 18693, 18707, 18719, 18733, 18747, 18761, 0}, {18774, 18781, 18786, 18791, 18795, 18800, 18805, 18810, 18815, 18822, 18827, 18833, 0}, {18774, 18781, 18786, 18791, 18795, 18800, 18805, 18810, 18815, 18822, 18827, 18833, 0}, 2, 1, 691, 187, {1156,1167,4762,1692,0,0,0,0,0,0,0,0,0,0},{18838,18862,0,0,0,0,0,0,0,0},{251,843,4288,0,0,0,0,0,0,0,0,0},{269,848,4302,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 7281, 7286, {18880, 18894, 18904, 18915, 18929, 18940, 18951}, {18964, 18969, 18974, 18981, 18987, 18993, 18999}, {2673, 2436, 2428, 7736, 2673, 12842, 2023}, {19004, 19012, 19020, 19027, 19036, 19046, 19056, 19062, 19070, 19085, 19103, 19111, 0}, {19004, 19012, 19020, 19027, 19036, 19046, 19056, 19062, 19070, 19085, 19103, 19111, 0}, {19119, 19123, 19020, 19129, 19133, 19138, 19056, 19144, 19149, 19156, 19163, 19168, 0}, {19119, 19123, 19020, 19129, 19133, 19138, 19056, 19144, 19149, 19156, 19163, 19168, 0}, 2, 0, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{1242,5505,10193,8579,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 19173, 19176, {19180, 19185, 10778, 10785, 19191, 19198, 10802}, {19205, 19209, 10816, 10820, 19213, 10828, 10832}, {12842, 15392, 2023, 10836, 4442, 3987, 2023}, {10114, 10122, 19217, 2696, 10844, 2776, 19221, 19227, 2723, 2733, 2741, 19232, 0}, {10114, 10122, 19217, 2696, 10844, 2776, 19221, 19227, 2723, 2733, 2741, 19232, 0}, {2759, 2763, 19217, 2772, 10844, 2776, 2780, 19241, 2788, 2792, 2796, 16383, 0}, {2759, 2763, 19217, 2772, 10844, 2776, 2780, 19241, 2788, 2792, 2796, 16383, 0}, 0, 0, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 19245, 19267, {19291, 19306, 19323, 19340, 19357, 19374, 19383}, {19394, 19400, 19406, 19412, 19418, 19424, 19430}, {19436, 19439, 8811, 8811, 19442, 19436, 8811}, {19445, 19458, 19469, 19482, 19493, 19504, 19517, 19528, 19539, 19556, 19567, 19580, 0}, {19445, 19458, 19469, 19482, 19493, 19504, 19517, 19528, 19539, 19556, 19567, 19580, 0}, {19599, 19607, 19615, 19623, 19631, 19639, 19647, 19655, 19663, 19671, 19679, 19687, 0}, {19599, 19607, 19615, 19623, 19631, 19639, 19647, 19655, 19663, 19671, 19679, 19687, 0}, 0, 0, 2566, 187, {6488,0,0,0,0,0,0,0,0,0,0,0,0,0},{19697,19715,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {19734, 19743, 19769, {19797, 19804, 19811, 19818, 19825, 19832, 19839}, {19797, 19804, 19811, 19818, 19825, 19832, 19839}, {19436, 19439, 19846, 19846, 19442, 19436, 19849}, {19852, 19865, 501, 19880, 521, 19893, 19902, 542, 19911, 19928, 19943, 19956, 0}, {19852, 19865, 501, 19880, 521, 19893, 19902, 542, 19911, 19928, 19943, 19956, 0}, {19971, 15891, 15899, 639, 521, 19979, 19987, 647, 19995, 665, 20003, 683, 0}, {19971, 15891, 15899, 639, 521, 19979, 19987, 647, 19995, 665, 20003, 683, 0}, 0, 0, 2566, 187, {20011,0,0,0,0,0,0,0,0,0,0,0,0,0},{20020,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{20041,0,0,0,0,0,0,0}},
-       {20057, 1929, 1932, {20065, 20074, 20083, 20091, 20100, 20109, 20116}, {20125, 20128, 20131, 20134, 20137, 20141, 20144}, {6607, 6609, 6611, 6613, 12842, 15392, 6605}, {10114, 10122, 20147, 20153, 10844, 2706, 19221, 20160, 16338, 20167, 16355, 20174, 0}, {10114, 10122, 20147, 20153, 10844, 2706, 19221, 20160, 16338, 20167, 16355, 20174, 0}, {2759, 2763, 19217, 2772, 10844, 2776, 2780, 20182, 2788, 2792, 2796, 10869, 0}, {2759, 2763, 19217, 2772, 10844, 2776, 2780, 20182, 2788, 2792, 2796, 10869, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {20220, 1929, 1932, {20227, 20237, 20246, 20255, 20266, 20276, 20281}, {20288, 20294, 20299, 20304, 20309, 10828, 20313}, {20318, 2673, 2023, 7736, 2018, 3987, 2023}, {15084, 15091, 10374, 15098, 3730, 20320, 20325, 20330, 15123, 15132, 15140, 15147, 0}, {15084, 15091, 10374, 15098, 3730, 20320, 20325, 20330, 15123, 15132, 15140, 15147, 0}, {20337, 20342, 3761, 2772, 3730, 20320, 20325, 20346, 10812, 2792, 20350, 20355, 0}, {20337, 20342, 3761, 2772, 3730, 20320, 20325, 20346, 10812, 2792, 20350, 20355, 0}, 0, 0, 691, 187, {1156,0,0,0,0,0,0,0,0,0,0,0,0,0},{20359,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 20377, 20405, {20427, 20446, 20465, 20490, 20509, 20543, 20568}, {20587, 20597, 20607, 20623, 20633, 20658, 20674}, {20684, 20688, 20695, 20699, 20706, 20713, 20720}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, 0, 1, 2566, 187, {1139,2293,1128,20970,20983,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20998,21007,0,0,0,0,0,0,0,0},{4302,2337,21015,21027,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 1929, 1932, {21038, 21054, 21073, 21095, 21114, 21133, 21161}, {21183, 21191, 21202, 21216, 21227, 21238, 21258}, {21272, 21276, 21283, 21290, 21300, 21307, 21320}, {21327, 21343, 21362, 21375, 21394, 21401, 21411, 21427, 21440, 21456, 21475, 21491, 0}, {21327, 21343, 21362, 21375, 21394, 21401, 21411, 21427, 21440, 21456, 21475, 21491, 0}, {21327, 21343, 21362, 21375, 21394, 21401, 21411, 21427, 21440, 21456, 21475, 21491, 0}, {21327, 21343, 21362, 21375, 21394, 21401, 21411, 21427, 21440, 21456, 21475, 21491, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{10502,1242,0,0,0,0,0,0,0,0},{1866,1858,843,251,0,0,0,0,0,0,0,0},{1886,1875,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 1929, 1932, {21507, 21526, 21545, 21567, 21586, 21608, 21633}, {21652, 21662, 21672, 21685, 21695, 21708, 21724}, {21734, 21738, 21745, 21752, 21759, 21766, 21773}, {21777, 21805, 21833, 21849, 21868, 21875, 21885, 21901, 21917, 21945, 21967, 21989, 0}, {21777, 21805, 21833, 21849, 21868, 21875, 21885, 21901, 21917, 21945, 21967, 21989, 0}, {22014, 22033, 21833, 21849, 21868, 21875, 21885, 22052, 22059, 22075, 22091, 22101, 0}, {22014, 22033, 21833, 21849, 21868, 21875, 21885, 22052, 22059, 22075, 22091, 22101, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 8151, 22114, {22117, 22136, 22155, 22180, 22199, 22221, 22246}, {22265, 22275, 22285, 22301, 22311, 22324, 22340}, {22350, 22354, 22361, 22365, 22372, 22379, 22386}, {22390, 22412, 22443, 22465, 22484, 22491, 22501, 22517, 22533, 22564, 22586, 22608, 0}, {22390, 22412, 22443, 22465, 22484, 22491, 22501, 22517, 22533, 22564, 22586, 22608, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 22633, 22658, {22683, 22702, 22724, 22749, 22765, 22787, 22806}, {22816, 22823, 22830, 22837, 22844, 22851, 22858}, {22816, 22823, 22830, 22837, 22844, 22851, 22858}, {22862, 22878, 22903, 22922, 22941, 22948, 22961, 22974, 22993, 23024, 23049, 23071, 0}, {22862, 22878, 22903, 22922, 22941, 22948, 22961, 23096, 22993, 23024, 23049, 23071, 0}, {23115, 23123, 23137, 23151, 22941, 22948, 22961, 23162, 23170, 23184, 23195, 23203, 0}, {23115, 23123, 23137, 23151, 22941, 22948, 22961, 23162, 23170, 23184, 23195, 23203, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3613, 1929, 1932, {23214, 23236, 23258, 23283, 23305, 23330, 23358}, {23380, 23390, 23400, 23413, 23423, 23436, 23452}, {23462, 23466, 23473, 23477, 23484, 23491, 23498}, {23502, 23518, 23543, 23562, 23584, 23591, 23604, 23617, 23636, 23667, 23692, 23711, 0}, {23502, 23518, 23543, 23562, 23584, 23591, 23736, 23617, 23636, 23667, 23692, 23711, 0}, {23749, 23756, 23543, 23772, 23584, 23591, 23736, 23617, 23788, 23810, 23826, 23836, 0}, {23749, 23756, 23543, 23772, 23584, 23591, 23736, 23617, 23788, 23810, 23826, 23836, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {3613, 1929, 1932, {23852, 23871, 23890, 23912, 23931, 23953, 23978}, {23997, 24007, 24017, 24030, 24040, 24053, 24069}, {24079, 24083, 24090, 24097, 24104, 24111, 24118}, {24122, 24138, 24163, 24182, 24204, 24211, 24224, 24237, 24256, 24284, 24309, 24331, 0}, {24122, 24138, 24163, 24182, 24204, 24211, 24224, 24237, 24256, 24284, 24309, 24331, 0}, {24356, 24364, 24384, 24391, 24204, 24408, 24415, 24423, 24431, 24454, 24471, 24485, 0}, {24356, 24364, 24384, 24391, 24204, 24408, 24415, 24423, 24431, 24454, 24471, 24485, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {20057, 1929, 1932, {24502, 24530, 24564, 24592, 24620, 24651, 24688}, {24716, 24729, 24748, 24764, 24777, 24796, 24815}, {24825, 24832, 24839, 24846, 24853, 24866, 24873}, {24877, 24896, 24924, 24946, 24965, 24978, 24988, 25001, 25026, 25057, 25082, 25098, 0}, {24877, 24896, 24924, 24946, 24965, 24978, 24988, 25001, 25026, 25057, 25082, 25098, 0}, {25117, 25127, 25146, 25156, 24965, 24978, 24988, 25172, 25179, 25204, 25220, 25230, 0}, {25117, 25127, 25146, 25156, 24965, 24978, 24988, 25172, 25179, 25204, 25220, 25230, 0}, 0, 0, 2566, 187, {1139,2293,1167,4762,0,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20998,21007,0,0,0,0,0,0,0,0},{4302,2337,21015,21027,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 25243, 25271, {25293, 25312, 25331, 25356, 25375, 25409, 25434}, {25453, 20597, 20607, 20623, 25463, 25488, 20674}, {0, 0, 0, 0, 0, 0, 0}, {25504, 25529, 25560, 25576, 20821, 20828, 20838, 25595, 25611, 25642, 25664, 25686, 0}, {25504, 25529, 25560, 25576, 20821, 20828, 20838, 25595, 25611, 25642, 25664, 25686, 0}, {25711, 25724, 25560, 25576, 20821, 20828, 20838, 25743, 25750, 25766, 25782, 25792, 0}, {25711, 25724, 25560, 25576, 20821, 20828, 20838, 25743, 25750, 25766, 25782, 25792, 0}, 0, 0, 2566, 187, {1128,0,0,0,0,0,0,0,0,0,0,0,0,0},{25805,0,0,0,0,0,0,0,0,0},{1858,1866,0,0,0,0,0,0,0,0,0,0},{1875,1886,0,0,0,0,0,0,0},{25824,25832,0,0,0,0,0,0}},
-       {1, 1929, 1932, {17608, 17627, 25842, 17668, 17687, 17709, 17734}, {17753, 17763, 25864, 17786, 17796, 17809, 17825}, {17835, 17839, 17846, 17853, 17860, 17867, 17874}, {25877, 25902, 17913, 25933, 25952, 17955, 25959, 25972, 25988, 26013, 26035, 26063, 0}, {25877, 25902, 17913, 25933, 25952, 17955, 25959, 25972, 25988, 26013, 26035, 26063, 0}, {26085, 26098, 17913, 26117, 25952, 17955, 25959, 26133, 26140, 26159, 26175, 26197, 0}, {26085, 26098, 17913, 26117, 25952, 17955, 25959, 26133, 26140, 26159, 26175, 26197, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {5619, 26213, 26218, {26223, 26230, 26241, 26254, 26267, 26278, 26291}, {26302, 26307, 26312, 26317, 26322, 26327, 26332}, {6605, 6607, 6609, 6611, 6613, 6615, 6617}, {26337, 26363, 26391, 26421, 26451, 26477, 26507, 26533, 26561, 26585, 26613, 26650, 0}, {26337, 26363, 26391, 26421, 26451, 26477, 26507, 26533, 26561, 26585, 26613, 26650, 0}, {26689, 26701, 26713, 26725, 26737, 26749, 26761, 26773, 26785, 26797, 26810, 26823, 0}, {26689, 26701, 26713, 26725, 26737, 26749, 26761, 26773, 26785, 26797, 26810, 26823, 0}, 0, 0, 2566, 187, {1692,0,0,0,0,0,0,0,0,0,0,0,0,0},{26836,26890,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{26926,0,0,0,0,0,0,0}},
-       {26945, 26969, 26991, {27016, 27044, 27072, 27109, 27140, 27174, 27199}, {27233, 27249, 27265, 27290, 27309, 27331, 27344}, {27366, 27373, 27380, 27387, 27394, 27401, 27405}, {27415, 27449, 27486, 27520, 27554, 27585, 27622, 27659, 27699, 27733, 27767, 27816, 0}, {27415, 27449, 27486, 27520, 27554, 27585, 27622, 27659, 27699, 27733, 27767, 27816, 0}, {27865, 27878, 27891, 27904, 27917, 27930, 27943, 27956, 27969, 27982, 27998, 28014, 0}, {27865, 27878, 27891, 27904, 27917, 27930, 27943, 27956, 27969, 27982, 27998, 28014, 0}, 0, 0, 185, 187, {1654,1663,1672,1703,1692,1681,1721,1714,1728,0,0,0,0,0},{28030,28073,28121,28153,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{28190,1914,0,0,0,0,0,0}},
-       {289, 1929, 1932, {28223, 28232, 28242, 28254, 28267, 28276, 28288}, {28300, 28304, 28309, 28313, 28317, 28321, 28325}, {2023, 28329, 2428, 2428, 15392, 6293, 2023}, {28332, 28339, 28348, 28355, 2702, 28362, 28370, 28381, 28386, 28391, 28398, 28407, 0}, {28332, 28339, 28348, 28355, 2702, 28362, 28370, 28381, 28386, 28391, 28398, 28407, 0}, {28415, 28419, 28309, 28423, 2702, 28427, 28431, 28381, 28386, 28435, 28439, 28444, 0}, {28415, 28419, 28309, 28423, 2702, 28427, 28431, 28381, 28386, 28435, 28439, 28444, 0}, 2, 1, 185, 187, {189,198,5002,8579,0,0,0,0,0,0,0,0,0,0},{1242,1207,0,0,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 28449, 28465, {28481, 28503, 28516, 28535, 28545, 28576, 28592}, {28481, 28503, 28516, 28535, 28545, 28576, 28592}, {6605, 6607, 6609, 6611, 6613, 6615, 6617}, {28605, 28618, 28637, 28650, 28663, 28676, 28695, 28714, 28727, 28743, 28756, 28781, 0}, {28605, 28618, 28637, 28650, 28663, 28676, 28695, 28714, 28727, 28743, 28756, 28781, 0}, {28605, 28618, 28637, 28650, 28663, 28676, 28695, 28714, 28727, 28743, 28756, 28781, 0}, {28605, 28618, 28637, 28650, 28663, 28676, 28695, 28714, 28727, 28743, 28756, 28781, 0}, 0, 0, 185, 187, {189,1692,0,0,0,0,0,0,0,0,0,0,0,0},{1242,10205,0,0,0,0,0,0,0,0},{843,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{28794,0,0,0,0,0,0,0}},
-       {289, 28829, 28854, {28879, 28904, 28923, 28951, 28970, 28995, 29014}, {28879, 28904, 28923, 28951, 28970, 28995, 29014}, {29036, 29040, 29044, 29048, 29058, 29062, 29072}, {29076, 29095, 29111, 29124, 29137, 29159, 29178, 29200, 29216, 29232, 29245, 29261, 0}, {29076, 29095, 29111, 29124, 29137, 29159, 29178, 29200, 29216, 29232, 29245, 29261, 0}, {29277, 29286, 29295, 29304, 29313, 29322, 29334, 29343, 29352, 29361, 29370, 29379, 0}, {29277, 29286, 29295, 29304, 29313, 29322, 29334, 29343, 29352, 29361, 29370, 29379, 0}, 0, 0, 185, 187, {198,29388,6480,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3883, 7281, 7286, {3895, 29398, 3909, 29403, 29413, 29419, 3942}, {29426, 8413, 3761, 29430, 29435, 29439, 29443}, {2673, 2436, 2428, 2428, 29448, 3989, 2023}, {29450, 29458, 4005, 4011, 29467, 29472, 29478, 4034, 29484, 29493, 29501, 29510, 0}, {29519, 29527, 4094, 1012, 8083, 29536, 29542, 4117, 8100, 8109, 8117, 29548, 0}, {29557, 2763, 3761, 29561, 2702, 29565, 29570, 20182, 18406, 29574, 2796, 3769, 0}, {29557, 2763, 3761, 29561, 2702, 29565, 29570, 20182, 18406, 29574, 2796, 3769, 0}, 2, 1, 185, 187, {198,189,1120,2286,1139,1167,1692,0,0,0,0,0,0,0},{29578,4239,4266,1242,0,0,0,0,0,0},{843,251,242,29607,0,0,0,0,0,0,0,0},{848,269,257,29619,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {1, 29639, 29651, {29663, 17627, 29691, 17668, 17687, 17709, 17734}, {17753, 17763, 25864, 17786, 17796, 17809, 17825}, {0, 0, 0, 0, 0, 0, 0}, {25877, 25902, 17913, 25933, 25952, 17955, 25959, 29710, 29726, 29754, 26035, 26063, 0}, {25877, 25902, 17913, 25933, 25952, 17955, 25959, 29710, 29726, 29754, 26035, 26063, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {20057, 29776, 29788, {29797, 29813, 29829, 29857, 29873, 29916, 29941}, {29797, 29813, 29969, 29857, 29979, 30001, 30014}, {30024, 30028, 30032, 30036, 30040, 30053, 30060}, {30067, 30086, 30111, 30130, 30155, 30168, 30181, 30194, 30216, 30250, 30275, 30303, 0}, {30067, 30086, 30111, 30130, 30155, 30168, 30181, 30194, 30216, 30250, 30275, 30303, 0}, {30331, 30338, 30348, 30130, 30155, 30168, 30181, 30361, 30371, 30384, 30394, 30407, 0}, {30331, 30338, 30348, 30130, 30155, 30168, 30181, 30361, 30371, 30384, 30394, 30407, 0}, 0, 1, 2566, 187, {1692,1681,1735,198,189,0,0,0,0,0,0,0,0,0},{30420,0,0,0,0,0,0,0,0,0},{1858,1866,843,251,0,0,0,0,0,0,0,0},{1875,1886,848,269,0,0,0,0,0},{30468,0,0,0,0,0,0,0}},
-       {30478, 30494, 30504, {30517, 30527, 30534, 30547, 30557, 30567, 30577}, {30517, 30527, 30587, 30547, 30557, 30567, 30577}, {30597, 30601, 30605, 30609, 30613, 30617, 30621}, {30625, 30641, 30657, 30667, 30680, 30687, 30694, 30704, 30717, 30736, 30752, 30768, 0}, {30625, 30641, 30657, 30667, 30680, 30687, 30694, 30704, 30717, 30784, 30752, 30768, 0}, {30803, 30813, 30657, 30823, 30680, 30687, 30694, 30833, 30843, 30853, 30863, 30873, 0}, {30803, 30813, 30657, 30823, 30680, 30687, 30694, 30833, 30843, 30853, 30863, 30873, 0}, 0, 0, 185, 187, {2277,1692,0,0,0,0,0,0,0,0,0,0,0,0},{30883,0,0,0,0,0,0,0,0,0},{3594,0,0,0,0,0,0,0,0,0,0,0},{3602,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 30915, 30925, {30938, 30945, 30951, 30958, 30964, 30970, 30978}, {30988, 30992, 30996, 31000, 31004, 31008, 31012}, {12842, 12842, 12842, 12842, 12842, 12842, 12842}, {31018, 31027, 10131, 31036, 31042, 31048, 31054, 31061, 31067, 31076, 31085, 31093, 0}, {31018, 31027, 10131, 31036, 31042, 31048, 31054, 31061, 31067, 31076, 31085, 31093, 0}, {31102, 31106, 3761, 31110, 3730, 31114, 31118, 31122, 31127, 31131, 31137, 31141, 0}, {31102, 31106, 3761, 31110, 3730, 31114, 31118, 31122, 31127, 31131, 31137, 31141, 0}, 0, 0, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 31145, 31186, {31227, 31246, 31265, 31290, 31309, 31331, 31356}, {31375, 17763, 31385, 17786, 31401, 17809, 17825}, {31414, 17839, 31418, 17853, 31422, 17867, 17874}, {17878, 31429, 17913, 31457, 25952, 31476, 17965, 31486, 31502, 31533, 31555, 31580, 0}, {17878, 31429, 17913, 31457, 25952, 31476, 17965, 31486, 31502, 31533, 31555, 31580, 0}, {17878, 31429, 17913, 31457, 25952, 31476, 17965, 31486, 31502, 31533, 31555, 31580, 0}, {17878, 31429, 17913, 31457, 25952, 31476, 17965, 31486, 31502, 31533, 31555, 31580, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{25832,0,0,0,0,0,0,0}},
-       {289, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {31605, 31612, 31621, 31636, 31647, 31656, 31663, 31670, 31677, 31688, 31701, 31714, 0}, {31605, 31612, 31621, 31636, 31647, 31656, 31663, 31670, 31677, 31688, 31701, 31714, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 6, 185, 187, {1654,1692,0,0,0,0,0,0,0,0,0,0,0,0},{31719,31740,0,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {31755, 1929, 1932, {31761, 31768, 31774, 31781, 31792, 31800, 31809}, {31816, 8413, 3761, 31820, 31824, 31828, 10832}, {2436, 2436, 2428, 2428, 5694, 16426, 2023}, {3991, 31832, 31840, 4011, 4017, 31846, 31852, 4034, 31858, 31868, 31876, 31886, 0}, {3991, 31832, 31840, 4011, 4017, 31846, 31852, 4034, 31858, 31868, 31876, 31886, 0}, {31896, 31900, 3761, 29561, 3730, 31904, 31908, 20182, 18406, 2792, 31912, 16383, 0}, {31896, 31900, 3761, 29561, 3730, 31904, 31908, 20182, 18406, 2792, 31912, 16383, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 0, 0, {31916, 31923, 31931, 31938, 31945, 31953, 31961}, {31968, 31971, 31974, 31977, 31980, 31983, 31986}, {2436, 2436, 2430, 2436, 12842, 3987, 12842}, {31989, 31997, 32007, 32013, 32021, 32026, 32031, 32036, 32043, 20167, 32051, 32059, 0}, {31989, 31997, 32007, 32013, 32021, 32026, 32031, 32036, 32043, 20167, 32051, 32059, 0}, {2759, 32067, 3761, 32071, 3730, 31114, 31118, 32075, 3701, 2792, 32079, 16383, 0}, {2759, 32067, 3761, 32071, 3730, 31114, 31118, 32075, 3701, 2792, 32079, 16383, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 32083, 32094, {32104, 32122, 32137, 32159, 32172, 32186, 32203}, {32227, 32235, 32240, 32159, 32172, 32252, 32259}, {0, 0, 0, 0, 0, 0, 0}, {32273, 32295, 32311, 32331, 32345, 32362, 32377, 32394, 32408, 32421, 32440, 32454, 0}, {32273, 32295, 32311, 32331, 32345, 32362, 32377, 32394, 32408, 32421, 32440, 32454, 0}, {32473, 32488, 32497, 32510, 32517, 32527, 32535, 32545, 32552, 32558, 32570, 32577, 0}, {32473, 32488, 32497, 32510, 32517, 32527, 32535, 32545, 32552, 32558, 32570, 32577, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{222,20186,20206,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{25832,0,0,0,0,0,0,0}},
-       {3613, 0, 0, {32589, 32597, 15958, 15967, 15976, 32608, 32618}, {16414, 16008, 16012, 16016, 16020, 16277, 32627}, {0, 0, 0, 0, 0, 0, 0}, {32631, 32640, 32650, 32658, 10844, 3734, 32666, 32672, 32681, 32690, 32699, 32708, 0}, {32631, 32640, 32650, 32658, 10844, 3734, 32666, 32672, 32681, 32690, 32699, 32708, 0}, {2759, 2763, 16027, 32717, 10844, 2776, 2780, 20182, 18406, 2792, 32721, 16383, 0}, {2759, 2763, 16027, 32717, 10844, 2776, 2780, 20182, 18406, 2792, 32721, 16383, 0}, 0, 0, 185, 187, {189,1681,1735,1692,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {32725, 32738, 32743, {32748, 32755, 32770, 32784, 32800, 32815, 32831}, {6289, 32846, 2530, 32850, 32854, 32858, 32862}, {2023, 12842, 2428, 2018, 2023, 2430, 12842}, {7370, 7378, 32866, 32873, 32880, 2469, 2474, 32885, 32895, 32906, 32915, 32925, 0}, {7370, 7378, 32866, 32873, 32880, 2469, 2474, 32885, 32895, 32906, 32915, 32925, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 0, 0, 2566, 187, {1128,1139,1692,2568,0,0,0,0,0,0,0,0,0,0},{32935,2300,4769,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 32954, 32959, {32964, 32980, 32988, 32996, 33005, 33017, 33027}, {33037, 33043, 33049, 33053, 33057, 33065, 3701}, {0, 0, 0, 0, 0, 0, 0}, {33072, 33085, 33099, 33108, 33114, 33118, 33123, 33131, 16338, 33144, 16355, 16363, 0}, {33072, 33085, 33099, 33108, 33114, 33118, 33123, 33131, 16338, 33144, 16355, 16363, 0}, {33153, 2763, 33157, 16371, 33114, 33161, 2780, 33165, 2788, 33173, 2796, 16383, 0}, {33153, 2763, 33157, 16371, 33114, 33161, 2780, 33165, 2788, 33173, 2796, 16383, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{2313,0,0,0,0,0,0,0,0,0,0,0},{2326,0,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {33179, 33206, 33213, {33220, 33230, 33240, 33250, 33260, 33270, 33280}, {33290, 33297, 33304, 33311, 33318, 33325, 33332}, {33339, 33343, 33347, 33351, 33355, 33359, 33363}, {33367, 33374, 33381, 33388, 33395, 33402, 33409, 33416, 33423, 33430, 33437, 33447, 0}, {33367, 33374, 33381, 33388, 33395, 33402, 33409, 33416, 33423, 33430, 33437, 33447, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 185, 187, {1654,1663,1672,1703,1692,1681,0,0,0,0,0,0,0,0},{33457,33481,33511,33541,33558,0,0,0,0,0},{1858,843,251,0,0,0,0,0,0,0,0,0},{1875,848,269,0,0,0,0,0,0},{33581,1914,0,0,0,0,0,0}},
-       {289, 0, 0, {28300, 8413, 33598, 33605, 33615, 33620, 33627}, {33634, 6273, 33638, 4850, 33643, 33648, 33653}, {4421, 33658, 33661, 33664, 33667, 33670, 33673}, {33676, 33683, 33598, 33694, 33700, 33704, 33713, 33720, 33725, 33734, 33739, 33742, 0}, {33676, 33683, 33598, 33694, 33700, 33704, 33713, 33720, 33725, 33734, 33739, 33742, 0}, {33748, 33752, 33759, 28423, 33700, 33764, 33769, 33720, 33774, 33734, 33739, 33779, 0}, {33748, 33752, 33759, 28423, 33700, 33764, 33769, 33720, 33774, 33734, 33739, 33779, 0}, 2, 1, 185, 187, {198,189,1167,1139,1692,0,0,0,0,0,0,0,0,0},{4985,5002,1242,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1921, 33783, 33788, {33793, 33801, 33811, 33821, 33830, 33840, 33848}, {33858, 33862, 33867, 33871, 33875, 33879, 33883}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 33887, 33896, 33907, 33916, 33926, 0}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 33887, 33896, 33907, 33916, 33926, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 0, 0, 185, 187, {198,189,1167,1139,1692,0,0,0,0,0,0,0,0,0},{4985,5002,1242,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {33936, 33954, 33959, {33964, 33989, 34018, 34043, 34056, 34071, 34088}, {34103, 34108, 34113, 34118, 34123, 34128, 8800}, {19442, 19442, 34133, 8811, 8814, 19442, 8811}, {34136, 34155, 34170, 34192, 34212, 34228, 34244, 34258, 34284, 34308, 34325, 34342, 0}, {34136, 34155, 34170, 34192, 34212, 34228, 34244, 34258, 34284, 34308, 34325, 34342, 0}, {34359, 34368, 34377, 34391, 34405, 34417, 34429, 34439, 34455, 34469, 34476, 34483, 0}, {34359, 34368, 34377, 34391, 34405, 34417, 34429, 34439, 34455, 34469, 34476, 34483, 0}, 0, 1, 691, 187, {1156,4753,1692,34490,34500,0,0,0,0,0,0,0,0,0},{34513,34548,34577,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{34612,0,0,0,0,0,0,0}},
-       {20057, 0, 0, {34628, 34640, 34651, 34663, 34675, 34685, 34697}, {34712, 34717, 34722, 34727, 34732, 34737, 34742}, {0, 0, 0, 0, 0, 0, 0}, {34747, 34756, 34768, 34776, 34781, 34791, 34798, 34807, 34814, 34820, 34829, 34840, 0}, {34747, 34756, 34768, 34776, 34781, 34791, 34798, 34807, 34814, 34820, 34829, 34840, 0}, {34848, 34853, 34858, 34863, 34868, 34873, 34878, 34732, 34883, 34888, 34893, 34898, 0}, {34848, 34853, 34858, 34863, 34868, 34873, 34878, 34732, 34883, 34888, 34893, 34898, 0}, 0, 0, 185, 187, {9796,2286,0,0,0,0,0,0,0,0,0,0,0,0},{34903,1207,0,0,0,0,0,0,0,0},{843,0,0,0,0,0,0,0,0,0,0,0},{848,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 34923, 34925, {34927, 34940, 34948, 34957, 34967, 34977, 34986}, {34998, 35002, 35006, 35010, 35014, 35018, 35022}, {2673, 2436, 2428, 7736, 12842, 5694, 2023}, {35026, 35040, 35051, 35060, 35071, 35083, 35097, 35109, 35122, 35135, 35147, 35160, 0}, {35026, 35040, 35051, 35060, 35071, 35083, 35097, 35109, 35122, 35135, 35147, 35160, 0}, {35174, 35179, 35185, 35191, 35196, 35202, 35208, 35213, 35219, 35224, 19163, 35230, 0}, {35174, 35179, 35185, 35191, 35196, 35202, 35208, 35213, 35219, 35224, 19163, 35230, 0}, 2, 1, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {10033, 10046, 10049, {10052, 10060, 10068, 2368, 2375, 2383, 10075}, {10083, 10088, 10093, 2411, 2415, 2419, 10097}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {7370, 7378, 4887, 2459, 2465, 2469, 2474, 10102, 2486, 2496, 2504, 2513, 0}, {7370, 7378, 4887, 2459, 2465, 2469, 2474, 10102, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 2, 1, 2566, 187, {1692,5888,0,0,0,0,0,0,0,0,0,0,0,0},{10110,10128,0,0,0,0,0,0,0,0},{251,843,7529,0,0,0,0,0,0,0,0,0},{269,848,7585,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 185, 187, {2277,2286,189,198,8579,10151,1692,0,0,0,0,0,0,0},{1242,10163,10179,0,0,0,0,0,0,0},{843,251,3594,242,0,0,0,0,0,0,0,0},{848,269,3602,257,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 10221, 10226, {10230, 10236, 10246, 10252, 10263, 10273, 10278}, {10288, 10292, 10296, 10300, 10305, 10309, 10313}, {2018, 2018, 2023, 10317, 2018, 7736, 7736}, {10320, 10325, 10332, 10337, 10343, 10350, 10358, 10365, 10374, 10381, 10386, 10393, 0}, {10320, 10325, 10332, 10337, 10343, 10350, 10358, 10365, 10374, 10381, 10386, 10393, 0}, {10401, 10405, 3761, 10410, 3730, 10414, 10418, 10422, 10427, 10431, 10435, 10439, 0}, {10401, 10405, 3761, 10410, 3730, 10414, 10418, 10422, 10427, 10431, 10435, 10439, 0}, 0, 1, 691, 187, {4753,4762,1156,1167,0,0,0,0,0,0,0,0,0,0},{10443,1242,10460,5505,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 10478, 10496, {10514, 10525, 10538, 10547, 10554, 10567, 10576}, {10514, 10525, 10538, 10547, 10554, 10567, 10576}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {10585, 10596, 10607, 10616, 10627, 10634, 10641, 10654, 10663, 10674, 10687, 10698, 0}, {10585, 10596, 10607, 10616, 10627, 10634, 10641, 10654, 10663, 10674, 10687, 10698, 0}, {10585, 10596, 10607, 10616, 10627, 10634, 10641, 10654, 10663, 10674, 10687, 10698, 0}, {10585, 10596, 10607, 10616, 10627, 10634, 10641, 10654, 10663, 10674, 10687, 10698, 0}, 0, 0, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 1929, 1932, {10723, 10730, 10736, 10743, 10748, 10754, 10760}, {10766, 10770, 10774, 10778, 10782, 10786, 10790}, {2428, 2023, 2023, 10794, 4442, 3987, 2023}, {10796, 10804, 10813, 2696, 10819, 2706, 2711, 10823, 2723, 2733, 2741, 10831, 0}, {10796, 10804, 10813, 2696, 10819, 2706, 2711, 10823, 2723, 2733, 2741, 10831, 0}, {2759, 2763, 3761, 2772, 10819, 2776, 2780, 10840, 2788, 2792, 2796, 10844, 0}, {2759, 2763, 3761, 2772, 10819, 2776, 2780, 10840, 2788, 2792, 2796, 10844, 0}, 0, 0, 185, 187, {198,189,1128,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 10848, 10853, {10858, 10871, 10890, 10907, 10920, 10933, 10950}, {10963, 8775, 8780, 8785, 8790, 8795, 8800}, {10968, 8808, 8805, 8811, 8814, 8808, 8811}, {10971, 10984, 10995, 11012, 11027, 11042, 11057, 11070, 11085, 11102, 11117, 11134, 0}, {11149, 11160, 11173, 11188, 11201, 11214, 11227, 11238, 11251, 11266, 11279, 11298, 0}, {11311, 11318, 11325, 11332, 11339, 11346, 11353, 11360, 11367, 11374, 11381, 11388, 0}, {11311, 11318, 11325, 11332, 11339, 11346, 11353, 11360, 11367, 11374, 11381, 11388, 0}, 0, 1, 691, 187, {1156,1167,1692,0,0,0,0,0,0,0,0,0,0,0},{11395,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{11413,0,0,0,0,0,0,0}},
+       {289, 11429, 11442, {11455, 11470, 11491, 11506, 11519, 11532, 10950}, {421, 426, 11547, 436, 11552, 446, 451}, {456, 459, 11557, 465, 468, 459, 465}, {11560, 11577, 11586, 11601, 521, 11618, 11633, 11646, 11661, 11678, 11699, 11716, 0}, {11731, 11748, 11761, 11778, 9017, 11797, 11812, 11825, 11838, 11853, 11876, 11895, 0}, {11908, 11915, 11922, 11929, 521, 11936, 11943, 11950, 11957, 11964, 11971, 11978, 0}, {11908, 11915, 11922, 11929, 521, 11936, 11943, 11950, 11957, 11964, 11971, 11978, 0}, 0, 0, 691, 187, {1167,0,0,0,0,0,0,0,0,0,0,0,0,0},{1242,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1921, 11985, 11990, {11995, 12003, 12014, 12020, 12026, 12035, 1985}, {9246, 9250, 2415, 12041, 9262, 9267, 12045}, {9275, 9277, 12049, 9281, 9283, 9277, 9281}, {2438, 2445, 9672, 2459, 2465, 12051, 12057, 12063, 2486, 2496, 2504, 2513, 0}, {2438, 2445, 9672, 2459, 2465, 12051, 12057, 12063, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,12074,1167,9806,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {12084, 12093, 12098, {12103, 12114, 12125, 12136, 12147, 12158, 12164}, {2018, 9924, 2430, 4442, 2016, 10794, 2436}, {2018, 9924, 2430, 4442, 2016, 10794, 2436}, {12173, 12181, 12190, 12197, 4898, 12204, 12210, 2479, 2486, 12216, 2504, 12225, 0}, {12173, 12181, 12190, 12197, 4898, 12204, 12210, 2479, 2486, 12216, 2504, 12225, 0}, {12235, 12240, 12190, 2534, 4898, 12204, 12210, 2546, 12246, 2554, 2558, 12251, 0}, {12235, 12240, 12190, 2534, 4898, 12204, 12210, 2546, 12246, 2554, 2558, 12251, 0}, 2, 1, 691, 187, {7519,1156,1167,1692,0,0,0,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1921, 12256, 12273, {12287, 12298, 12308, 12317, 12328, 12340, 12351}, {12361, 12364, 12367, 12370, 12373, 12376, 12379}, {2023, 2018, 2432, 2430, 7736, 2018, 2023}, {12382, 12392, 12403, 12409, 12418, 12424, 12432, 12440, 12448, 12459, 12468, 12478, 0}, {12488, 12498, 2453, 12509, 12518, 12524, 12532, 12540, 12548, 12559, 12568, 12578, 0}, {12588, 12594, 12403, 12600, 12418, 12605, 12611, 12617, 4190, 12622, 4201, 12627, 0}, {12588, 12594, 12403, 12600, 12418, 12605, 12611, 12617, 4190, 12622, 4201, 12627, 0}, 0, 1, 691, 187, {9517,9539,12632,0,0,0,0,0,0,0,0,0,0,0},{12644,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{12671,0,0,0,0,0,0,0}},
+       {12689, 12701, 11990, {12707, 12719, 12731, 12743, 12757, 12772, 12785}, {12799, 12802, 12805, 12808, 12811, 12814, 9660}, {2023, 2018, 12817, 2430, 4442, 2018, 9669}, {12819, 12826, 12834, 12840, 12849, 12858, 12868, 12874, 12885, 12895, 12902, 12912, 0}, {12819, 12826, 12834, 12840, 12849, 12858, 12868, 12874, 12885, 12895, 12902, 12912, 0}, {12920, 12926, 12931, 12936, 12941, 12946, 12953, 12959, 12965, 12971, 12977, 12984, 0}, {12920, 12926, 12931, 12936, 12941, 12946, 12953, 12959, 12965, 12971, 12977, 12984, 0}, 2, 1, 2566, 187, {1692,2568,0,0,0,0,0,0,0,0,0,0,0,0},{12991,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{13013,0,0,0,0,0,0,0}},
+       {1, 13028, 13040, {13052, 13067, 13082, 13097, 13114, 13133, 13144}, {13155, 13162, 13169, 13176, 13183, 13190, 13197}, {0, 0, 0, 0, 0, 0, 0}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, 0, 0, 691, 187, {1156,1167,4762,1128,189,0,0,0,0,0,0,0,0,0},{13368,13386,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 13405, 13425, {13442, 13455, 13468, 13484, 13501, 13516, 13525}, {13442, 13455, 13468, 13484, 13501, 13516, 13525}, {13534, 13537, 13540, 13543, 13546, 13549, 13552}, {13555, 13568, 13579, 13588, 13599, 13604, 13613, 13624, 13631, 13646, 13657, 13670, 0}, {13683, 13698, 13579, 13588, 13711, 13604, 13718, 13624, 13631, 13646, 13657, 13670, 0}, {13555, 13568, 13579, 13588, 13599, 13604, 13613, 13624, 13631, 13646, 13657, 13670, 0}, {13555, 13568, 13579, 13588, 13599, 13604, 13613, 13624, 13631, 13646, 13657, 13670, 0}, 0, 6, 185, 187, {198,189,0,0,0,0,0,0,0,0,0,0,0,0},{13731,5505,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 13750, 13753, {13756, 13769, 13779, 13788, 13798, 13809, 13820}, {13832, 13835, 13840, 13845, 13850, 13855, 13860}, {13832, 13865, 13868, 13871, 13874, 13877, 13880}, {13883, 13892, 13901, 13910, 13919, 13928, 13937, 13946, 13955, 13964, 13974, 13984, 0}, {13994, 14003, 14012, 14021, 14030, 14039, 14048, 14057, 14066, 14075, 14085, 14095, 0}, {14105, 14111, 14117, 14123, 14129, 14135, 14141, 14147, 14153, 14159, 14166, 14173, 0}, {14105, 14111, 14117, 14123, 14129, 14135, 14141, 14147, 14153, 14159, 14166, 14173, 0}, 0, 1, 185, 187, {198,189,1139,1128,1692,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 14180, 14204, {14228, 14241, 14262, 14281, 14302, 14321, 14334}, {14345, 14352, 14359, 14366, 14373, 14380, 14387}, {14394, 14397, 14397, 14400, 14403, 14406, 14411}, {14414, 14429, 14444, 14453, 14464, 14475, 14488, 14501, 14516, 14535, 14554, 14571, 0}, {14590, 14607, 14624, 14635, 14648, 14661, 14676, 14691, 14708, 14729, 14750, 14769, 0}, {14790, 14797, 14804, 14811, 14818, 14825, 14832, 14839, 14846, 14853, 14860, 14867, 0}, {14790, 14797, 14804, 14811, 14818, 14825, 14832, 14839, 14846, 14853, 14860, 14867, 0}, 0, 1, 691, 187, {1156,1167,9796,198,14874,3582,1692,0,0,0,0,0,0,0},{3870,1207,13731,5505,14885,14896,14908,14925,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {14943, 14949, 14963, 14986, 15000, 15016, 15023}, {15032, 15035, 15040, 15046, 15050, 7736, 15055}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {15059, 15066, 10332, 15073, 3730, 15079, 15085, 15091, 15098, 15107, 15115, 15122, 0}, {15129, 15136, 15143, 15148, 15154, 15158, 15163, 15168, 15175, 15184, 15192, 15199, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, 0, 0, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{15234,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {15256, 1929, 1932, {15271, 15279, 15290, 15300, 15311, 15320, 15329}, {15339, 15343, 15347, 15351, 15355, 15359, 15363}, {15367, 12817, 12817, 12817, 2432, 2432, 2436}, {15369, 15379, 15387, 15395, 15403, 15411, 15418, 15426, 15434, 15441, 15447, 15454, 0}, {15462, 15473, 15482, 15491, 15500, 15509, 15517, 15526, 15535, 15543, 15550, 15558, 0}, {15567, 15572, 4845, 15577, 15582, 15587, 15592, 15597, 15602, 15607, 15612, 15617, 0}, {15567, 15572, 4845, 15577, 15582, 15587, 15592, 15597, 15602, 15607, 15612, 15617, 0}, 2, 1, 185, 187, {1681,1692,0,0,0,0,0,0,0,0,0,0,0,0},{15622,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{15655,0,0,0,0,0,0,0}},
+       {289, 15672, 15693, {15710, 331, 352, 8714, 15723, 15740, 15751}, {15764, 15772, 15780, 15786, 15794, 15802, 15810}, {456, 459, 462, 465, 468, 459, 465}, {15818, 484, 501, 510, 15833, 15840, 15849, 542, 555, 574, 591, 606, 0}, {15818, 484, 501, 510, 15833, 15840, 15849, 542, 555, 574, 591, 606, 0}, {15858, 15866, 15874, 639, 15833, 15882, 15890, 647, 655, 665, 673, 683, 0}, {15858, 15866, 15874, 639, 15833, 15882, 15890, 647, 655, 665, 673, 683, 0}, 0, 1, 691, 187, {1156,1167,15898,0,0,0,0,0,0,0,0,0,0,0},{13731,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 0, 0, {15915, 15922, 15933, 15942, 15951, 15958, 15969}, {15979, 15983, 15987, 15991, 15995, 15998, 16002}, {0, 0, 0, 0, 0, 0, 0}, {16006, 16016, 16025, 16033, 16042, 16055, 16067, 16074, 16081, 16088, 16098, 16110, 0}, {16006, 16016, 16025, 16033, 16042, 16055, 16067, 16074, 16081, 16088, 16098, 16110, 0}, {16123, 16127, 16131, 16135, 16139, 16143, 16147, 16151, 16155, 16159, 16163, 16167, 0}, {16123, 16127, 16131, 16135, 16139, 16143, 16147, 16151, 16155, 16159, 16163, 16167, 0}, 0, 0, 185, 187, {189,1681,1735,1692,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 0, 0, {16171, 16176, 16182, 16192, 16204, 16212, 16223}, {16232, 16236, 16240, 16244, 16248, 16252, 16256}, {0, 0, 0, 0, 0, 0, 0}, {16260, 16270, 16280, 16287, 16294, 2706, 16299, 16306, 16313, 16322, 16330, 16338, 0}, {16260, 16270, 16280, 16287, 16294, 2706, 16299, 16306, 16313, 16322, 16330, 16338, 0}, {2759, 2763, 16002, 16346, 16350, 2776, 2780, 16354, 2788, 2792, 2796, 16358, 0}, {2759, 2763, 16002, 16346, 16350, 2776, 2780, 16354, 2788, 2792, 2796, 16358, 0}, 0, 0, 185, 187, {1681,1735,1692,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {16362, 16368, 16379, 16192, 16204, 16212, 16223}, {16389, 16393, 16397, 16244, 16248, 16252, 16256}, {2023, 2428, 16401, 2430, 2023, 5694, 2428}, {16403, 16413, 16424, 16431, 16440, 16446, 16452, 16460, 16468, 16479, 16489, 16498, 0}, {16507, 16270, 16516, 16522, 16294, 2706, 16299, 16306, 16529, 16322, 16330, 16338, 0}, {2759, 2763, 16539, 2772, 16350, 2776, 2780, 16354, 2788, 2792, 2796, 16358, 0}, {2759, 2763, 16539, 2772, 16350, 2776, 2780, 16354, 2788, 2792, 2796, 16358, 0}, 0, 0, 2566, 187, {1128,1139,189,1681,1735,1692,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 16543, 16547, {16551, 16558, 16566, 16574, 16583, 16593, 16600}, {2652, 16609, 2658, 16612, 2664, 16615, 2670}, {2023, 2428, 2673, 3705, 2673, 3989, 2023}, {16618, 16627, 16637, 2696, 10819, 16643, 16649, 16655, 2723, 2733, 2741, 10831, 0}, {16618, 16627, 16637, 2696, 10819, 16643, 16649, 16655, 2723, 2733, 2741, 10831, 0}, {2759, 2763, 3761, 2772, 10819, 2776, 2780, 2784, 2788, 2792, 2796, 10844, 0}, {2759, 2763, 3761, 2772, 10819, 2776, 2780, 2784, 2788, 2792, 2796, 10844, 0}, 0, 0, 185, 187, {1681,1735,1692,16664,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {16676, 16692, 16717, 16745, 16773, 16801, 16829}, {16848, 16858, 16868, 16878, 16888, 16898, 16908}, {16918, 16922, 16926, 16922, 16930, 16934, 16938}, {16942, 16964, 16992, 17008, 17027, 17043, 17062, 17081, 17103, 17134, 17162, 17187, 0}, {16942, 16964, 16992, 17008, 17027, 17043, 17062, 17081, 17103, 17134, 17162, 17187, 0}, {17215, 17225, 17235, 17245, 17255, 17265, 17275, 17285, 17295, 17305, 17315, 17325, 0}, {17215, 17225, 17235, 17245, 17255, 17265, 17275, 17285, 17295, 17305, 17315, 17325, 0}, 0, 1, 691, 187, {1156,1167,7419,1176,4762,4753,1692,0,0,0,0,0,0,0},{17335,17369,17402,3870,17436,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 17448, 17453, {5932, 17458, 17469, 17479, 17489, 17499, 17513}, {17525, 17529, 17534, 17539, 17543, 17548, 17553}, {2023, 2428, 2430, 2428, 5694, 2434, 2436}, {2438, 2445, 4887, 6077, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2438, 2445, 4887, 6077, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, 2, 1, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{2300,0,0,0,0,0,0,0,0,0},{251,4288,0,0,0,0,0,0,0,0,0,0},{269,4302,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 17557, 17573, {17583, 17602, 17621, 17643, 17662, 17684, 17709}, {17728, 17738, 17748, 17761, 17771, 17784, 17800}, {17810, 17814, 17821, 17828, 17835, 17842, 17849}, {17853, 17869, 17888, 17904, 17923, 17930, 17940, 17956, 17972, 17991, 18013, 18029, 0}, {17853, 17869, 17888, 17904, 17923, 17930, 17940, 17956, 17972, 17991, 18013, 18029, 0}, {18048, 18055, 17888, 18065, 17923, 17930, 18081, 18094, 18101, 18114, 18130, 18140, 0}, {18048, 18055, 17888, 18065, 17923, 17930, 18081, 18094, 18101, 18114, 18130, 18140, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {18153, 18167, 18170, {18173, 18182, 18191, 18201, 18211, 18221, 18233}, {18241, 18246, 18250, 18254, 18258, 18263, 18268}, {18272, 2430, 2430, 9924, 18272, 18275, 2023}, {18278, 18285, 18290, 2696, 18296, 18302, 18309, 18315, 18323, 18333, 18341, 18350, 0}, {18278, 18285, 18290, 2696, 18296, 18302, 18309, 18315, 18323, 18333, 18341, 18350, 0}, {2759, 18360, 3761, 2772, 18364, 18368, 18373, 18377, 18381, 18385, 2796, 18389, 0}, {2759, 18360, 3761, 2772, 18364, 18368, 18373, 18377, 18381, 18385, 2796, 18389, 0}, 0, 0, 185, 187, {198,1692,18394,7410,2277,0,0,0,0,0,0,0,0,0},{18403,18428,10151,0,0,0,0,0,0,0},{251,3594,843,0,0,0,0,0,0,0,0,0},{269,3602,848,3594,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {18447, 18460, 18465, {18470, 18482, 18493, 18507, 18519, 18529, 18539}, {18550, 18555, 18560, 18565, 18570, 18575, 18580}, {2023, 3989, 2428, 6293, 2673, 16401, 2436}, {18585, 18602, 18615, 18629, 18642, 18655, 18668, 18682, 18694, 18708, 18722, 18736, 0}, {18585, 18602, 18615, 18629, 18642, 18655, 18668, 18682, 18694, 18708, 18722, 18736, 0}, {18749, 18756, 18761, 18766, 18770, 18775, 18780, 18785, 18790, 18797, 18802, 18808, 0}, {18749, 18756, 18761, 18766, 18770, 18775, 18780, 18785, 18790, 18797, 18802, 18808, 0}, 2, 1, 691, 187, {1156,1167,4762,1692,0,0,0,0,0,0,0,0,0,0},{18813,18837,0,0,0,0,0,0,0,0},{251,843,4288,0,0,0,0,0,0,0,0,0},{269,848,4302,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 7281, 7286, {18855, 18869, 18879, 18890, 18904, 18915, 18926}, {18939, 18944, 18949, 18956, 18962, 18968, 18974}, {2673, 2436, 2428, 7736, 2673, 12817, 2023}, {18979, 18987, 18995, 19002, 19011, 19021, 19031, 19037, 19045, 19060, 19078, 19086, 0}, {18979, 18987, 18995, 19002, 19011, 19021, 19031, 19037, 19045, 19060, 19078, 19086, 0}, {19094, 19098, 18995, 19104, 19108, 19113, 19031, 19119, 19124, 19131, 19138, 19143, 0}, {19094, 19098, 18995, 19104, 19108, 19113, 19031, 19119, 19124, 19131, 19138, 19143, 0}, 2, 0, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{1242,5505,10151,8579,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 19148, 19151, {19155, 19160, 10736, 10743, 19166, 19173, 10760}, {19180, 19184, 10774, 10778, 19188, 10786, 10790}, {12817, 15367, 2023, 10794, 4442, 3987, 2023}, {10796, 10804, 19192, 2696, 10819, 2776, 19196, 19202, 2723, 2733, 2741, 19207, 0}, {10796, 10804, 19192, 2696, 10819, 2776, 19196, 19202, 2723, 2733, 2741, 19207, 0}, {2759, 2763, 19192, 2772, 10819, 2776, 2780, 19216, 2788, 2792, 2796, 16358, 0}, {2759, 2763, 19192, 2772, 10819, 2776, 2780, 19216, 2788, 2792, 2796, 16358, 0}, 0, 0, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 19220, 19242, {19266, 19281, 19298, 19315, 19332, 19349, 19358}, {19369, 19375, 19381, 19387, 19393, 19399, 19405}, {19411, 19414, 8811, 8811, 19417, 19411, 8811}, {19420, 19433, 19444, 19457, 19468, 19479, 19492, 19503, 19514, 19531, 19542, 19555, 0}, {19420, 19433, 19444, 19457, 19468, 19479, 19492, 19503, 19514, 19531, 19542, 19555, 0}, {19574, 19582, 19590, 19598, 19606, 19614, 19622, 19630, 19638, 19646, 19654, 19662, 0}, {19574, 19582, 19590, 19598, 19606, 19614, 19622, 19630, 19638, 19646, 19654, 19662, 0}, 0, 0, 2566, 187, {6488,0,0,0,0,0,0,0,0,0,0,0,0,0},{19672,19690,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {19709, 19718, 19744, {19772, 19779, 19786, 19793, 19800, 19807, 19814}, {19772, 19779, 19786, 19793, 19800, 19807, 19814}, {19411, 19414, 19821, 19821, 19417, 19411, 19824}, {19827, 19840, 501, 19855, 521, 19868, 19877, 542, 19886, 19903, 19918, 19931, 0}, {19827, 19840, 501, 19855, 521, 19868, 19877, 542, 19886, 19903, 19918, 19931, 0}, {19946, 15866, 15874, 639, 521, 19954, 19962, 647, 19970, 665, 19978, 683, 0}, {19946, 15866, 15874, 639, 521, 19954, 19962, 647, 19970, 665, 19978, 683, 0}, 0, 0, 2566, 187, {19986,0,0,0,0,0,0,0,0,0,0,0,0,0},{19995,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{20016,0,0,0,0,0,0,0}},
+       {20032, 1929, 1932, {20040, 20049, 20058, 20066, 20075, 20084, 20091}, {20100, 20103, 20106, 20109, 20112, 20116, 20119}, {6607, 6609, 6611, 6613, 12817, 15367, 6605}, {10796, 10804, 20122, 20128, 10819, 2706, 19196, 20135, 16313, 20142, 16330, 20149, 0}, {10796, 10804, 20122, 20128, 10819, 2706, 19196, 20135, 16313, 20142, 16330, 20149, 0}, {2759, 2763, 19192, 2772, 10819, 2776, 2780, 20157, 2788, 2792, 2796, 10844, 0}, {2759, 2763, 19192, 2772, 10819, 2776, 2780, 20157, 2788, 2792, 2796, 10844, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {20195, 1929, 1932, {20202, 20212, 20221, 20230, 20241, 20251, 20256}, {20263, 20269, 20274, 20279, 20284, 10786, 20288}, {20293, 2673, 2023, 7736, 2018, 3987, 2023}, {15059, 15066, 10332, 15073, 3730, 20295, 20300, 20305, 15098, 15107, 15115, 15122, 0}, {15059, 15066, 10332, 15073, 3730, 20295, 20300, 20305, 15098, 15107, 15115, 15122, 0}, {20312, 20317, 3761, 2772, 3730, 20295, 20300, 20321, 10770, 2792, 20325, 20330, 0}, {20312, 20317, 3761, 2772, 3730, 20295, 20300, 20321, 10770, 2792, 20325, 20330, 0}, 0, 0, 691, 187, {1156,0,0,0,0,0,0,0,0,0,0,0,0,0},{20334,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 20352, 20380, {20402, 20421, 20440, 20465, 20484, 20518, 20543}, {20562, 20572, 20582, 20598, 20608, 20633, 20649}, {20659, 20663, 20670, 20674, 20681, 20688, 20695}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, 0, 1, 2566, 187, {1139,2293,1128,20945,20958,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20973,20982,0,0,0,0,0,0,0,0},{4302,2337,20990,21002,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 1929, 1932, {21013, 21029, 21048, 21070, 21089, 21108, 21136}, {21158, 21166, 21177, 21191, 21202, 21213, 21233}, {21247, 21251, 21258, 21265, 21275, 21282, 21295}, {21302, 21318, 21337, 21350, 21369, 21376, 21386, 21402, 21415, 21431, 21450, 21466, 0}, {21302, 21318, 21337, 21350, 21369, 21376, 21386, 21402, 21415, 21431, 21450, 21466, 0}, {21302, 21318, 21337, 21350, 21369, 21376, 21386, 21402, 21415, 21431, 21450, 21466, 0}, {21302, 21318, 21337, 21350, 21369, 21376, 21386, 21402, 21415, 21431, 21450, 21466, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{10460,1242,0,0,0,0,0,0,0,0},{1866,1858,843,251,0,0,0,0,0,0,0,0},{1886,1875,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 1929, 1932, {21482, 21501, 21520, 21542, 21561, 21583, 21608}, {21627, 21637, 21647, 21660, 21670, 21683, 21699}, {21709, 21713, 21720, 21727, 21734, 21741, 21748}, {21752, 21780, 21808, 21824, 21843, 21850, 21860, 21876, 21892, 21920, 21942, 21964, 0}, {21752, 21780, 21808, 21824, 21843, 21850, 21860, 21876, 21892, 21920, 21942, 21964, 0}, {21989, 22008, 21808, 21824, 21843, 21850, 21860, 22027, 22034, 22050, 22066, 22076, 0}, {21989, 22008, 21808, 21824, 21843, 21850, 21860, 22027, 22034, 22050, 22066, 22076, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 8151, 22089, {22092, 22111, 22130, 22155, 22174, 22196, 22221}, {22240, 22250, 22260, 22276, 22286, 22299, 22315}, {22325, 22329, 22336, 22340, 22347, 22354, 22361}, {22365, 22387, 22418, 22440, 22459, 22466, 22476, 22492, 22508, 22539, 22561, 22583, 0}, {22365, 22387, 22418, 22440, 22459, 22466, 22476, 22492, 22508, 22539, 22561, 22583, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 22608, 22633, {22658, 22677, 22699, 22724, 22740, 22762, 22781}, {22791, 22798, 22805, 22812, 22819, 22826, 22833}, {22791, 22798, 22805, 22812, 22819, 22826, 22833}, {22837, 22853, 22878, 22897, 22916, 22923, 22936, 22949, 22968, 22999, 23024, 23046, 0}, {22837, 22853, 22878, 22897, 22916, 22923, 22936, 23071, 22968, 22999, 23024, 23046, 0}, {23090, 23098, 23112, 23126, 22916, 22923, 22936, 23137, 23145, 23159, 23170, 23178, 0}, {23090, 23098, 23112, 23126, 22916, 22923, 22936, 23137, 23145, 23159, 23170, 23178, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {3613, 1929, 1932, {23189, 23211, 23233, 23258, 23280, 23305, 23333}, {23355, 23365, 23375, 23388, 23398, 23411, 23427}, {23437, 23441, 23448, 23452, 23459, 23466, 23473}, {23477, 23493, 23518, 23537, 23559, 23566, 23579, 23592, 23611, 23642, 23667, 23686, 0}, {23477, 23493, 23518, 23537, 23559, 23566, 23711, 23592, 23611, 23642, 23667, 23686, 0}, {23724, 23731, 23518, 23747, 23559, 23566, 23711, 23592, 23763, 23785, 23801, 23811, 0}, {23724, 23731, 23518, 23747, 23559, 23566, 23711, 23592, 23763, 23785, 23801, 23811, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {3613, 1929, 1932, {23827, 23846, 23865, 23887, 23906, 23928, 23953}, {23972, 23982, 23992, 24005, 24015, 24028, 24044}, {24054, 24058, 24065, 24072, 24079, 24086, 24093}, {24097, 24113, 24138, 24157, 24179, 24186, 24199, 24212, 24231, 24259, 24284, 24306, 0}, {24097, 24113, 24138, 24157, 24179, 24186, 24199, 24212, 24231, 24259, 24284, 24306, 0}, {24331, 24339, 24359, 24366, 24179, 24383, 24390, 24398, 24406, 24429, 24446, 24460, 0}, {24331, 24339, 24359, 24366, 24179, 24383, 24390, 24398, 24406, 24429, 24446, 24460, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {20032, 1929, 1932, {24477, 24505, 24539, 24567, 24595, 24626, 24663}, {24691, 24704, 24723, 24739, 24752, 24771, 24790}, {24800, 24807, 24814, 24821, 24828, 24841, 24848}, {24852, 24871, 24899, 24921, 24940, 24953, 24963, 24976, 25001, 25032, 25057, 25073, 0}, {24852, 24871, 24899, 24921, 24940, 24953, 24963, 24976, 25001, 25032, 25057, 25073, 0}, {25092, 25102, 25121, 25131, 24940, 24953, 24963, 25147, 25154, 25179, 25195, 25205, 0}, {25092, 25102, 25121, 25131, 24940, 24953, 24963, 25147, 25154, 25179, 25195, 25205, 0}, 0, 0, 2566, 187, {1139,2293,1167,4762,0,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20973,20982,0,0,0,0,0,0,0,0},{4302,2337,20990,21002,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 25218, 25246, {25268, 25287, 25306, 25331, 25350, 25384, 25409}, {25428, 20572, 20582, 20598, 25438, 25463, 20649}, {0, 0, 0, 0, 0, 0, 0}, {25479, 25504, 25535, 25551, 20796, 20803, 20813, 25570, 25586, 25617, 25639, 25661, 0}, {25479, 25504, 25535, 25551, 20796, 20803, 20813, 25570, 25586, 25617, 25639, 25661, 0}, {25686, 25699, 25535, 25551, 20796, 20803, 20813, 25718, 25725, 25741, 25757, 25767, 0}, {25686, 25699, 25535, 25551, 20796, 20803, 20813, 25718, 25725, 25741, 25757, 25767, 0}, 0, 0, 2566, 187, {1128,0,0,0,0,0,0,0,0,0,0,0,0,0},{25780,0,0,0,0,0,0,0,0,0},{1858,1866,0,0,0,0,0,0,0,0,0,0},{1875,1886,0,0,0,0,0,0,0},{25799,25807,0,0,0,0,0,0}},
+       {1, 1929, 1932, {17583, 17602, 25817, 17643, 17662, 17684, 17709}, {17728, 17738, 25839, 17761, 17771, 17784, 17800}, {17810, 17814, 17821, 17828, 17835, 17842, 17849}, {25852, 25877, 17888, 25908, 25927, 17930, 25934, 25947, 25963, 25988, 26010, 26038, 0}, {25852, 25877, 17888, 25908, 25927, 17930, 25934, 25947, 25963, 25988, 26010, 26038, 0}, {26060, 26073, 17888, 26092, 25927, 17930, 25934, 26108, 26115, 26134, 26150, 26172, 0}, {26060, 26073, 17888, 26092, 25927, 17930, 25934, 26108, 26115, 26134, 26150, 26172, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {5619, 26188, 26193, {26198, 26205, 26216, 26229, 26242, 26253, 26266}, {26277, 26282, 26287, 26292, 26297, 26302, 26307}, {6605, 6607, 6609, 6611, 6613, 6615, 6617}, {26312, 26338, 26366, 26396, 26426, 26452, 26482, 26508, 26536, 26560, 26588, 26625, 0}, {26312, 26338, 26366, 26396, 26426, 26452, 26482, 26508, 26536, 26560, 26588, 26625, 0}, {26664, 26676, 26688, 26700, 26712, 26724, 26736, 26748, 26760, 26772, 26785, 26798, 0}, {26664, 26676, 26688, 26700, 26712, 26724, 26736, 26748, 26760, 26772, 26785, 26798, 0}, 0, 0, 2566, 187, {1692,0,0,0,0,0,0,0,0,0,0,0,0,0},{26811,26865,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{26901,0,0,0,0,0,0,0}},
+       {26920, 26944, 26966, {26991, 27019, 27047, 27084, 27115, 27149, 27174}, {27208, 27224, 27240, 27265, 27284, 27306, 27319}, {27341, 27348, 27355, 27362, 27369, 27376, 27380}, {27390, 27424, 27461, 27495, 27529, 27560, 27597, 27634, 27674, 27708, 27742, 27791, 0}, {27390, 27424, 27461, 27495, 27529, 27560, 27597, 27634, 27674, 27708, 27742, 27791, 0}, {27840, 27853, 27866, 27879, 27892, 27905, 27918, 27931, 27944, 27957, 27973, 27989, 0}, {27840, 27853, 27866, 27879, 27892, 27905, 27918, 27931, 27944, 27957, 27973, 27989, 0}, 0, 0, 185, 187, {1654,1663,1672,1703,1692,1681,1721,1714,1728,0,0,0,0,0},{28005,28048,28096,28128,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{28165,1914,0,0,0,0,0,0}},
+       {289, 1929, 1932, {28198, 28207, 28217, 28229, 28242, 28251, 28263}, {28275, 28279, 28284, 28288, 28292, 28296, 28300}, {2023, 28304, 2428, 2428, 15367, 6293, 2023}, {28307, 28314, 28323, 28330, 2702, 28337, 28345, 28356, 28361, 28366, 28373, 28382, 0}, {28307, 28314, 28323, 28330, 2702, 28337, 28345, 28356, 28361, 28366, 28373, 28382, 0}, {28390, 28394, 28284, 28398, 2702, 28402, 28406, 28356, 28361, 28410, 28414, 28419, 0}, {28390, 28394, 28284, 28398, 2702, 28402, 28406, 28356, 28361, 28410, 28414, 28419, 0}, 2, 1, 185, 187, {189,198,5002,8579,0,0,0,0,0,0,0,0,0,0},{1242,1207,0,0,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 28424, 28440, {28456, 28478, 28491, 28510, 28520, 28551, 28567}, {28456, 28478, 28491, 28510, 28520, 28551, 28567}, {6605, 6607, 6609, 6611, 6613, 6615, 6617}, {28580, 28593, 28612, 28625, 28638, 28651, 28670, 28689, 28702, 28718, 28731, 28756, 0}, {28580, 28593, 28612, 28625, 28638, 28651, 28670, 28689, 28702, 28718, 28731, 28756, 0}, {28580, 28593, 28612, 28625, 28638, 28651, 28670, 28689, 28702, 28718, 28731, 28756, 0}, {28580, 28593, 28612, 28625, 28638, 28651, 28670, 28689, 28702, 28718, 28731, 28756, 0}, 0, 0, 185, 187, {189,1692,0,0,0,0,0,0,0,0,0,0,0,0},{1242,10163,0,0,0,0,0,0,0,0},{843,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{28769,0,0,0,0,0,0,0}},
+       {289, 28804, 28829, {28854, 28879, 28898, 28926, 28945, 28970, 28989}, {28854, 28879, 28898, 28926, 28945, 28970, 28989}, {29011, 29015, 29019, 29023, 29033, 29037, 29047}, {29051, 29070, 29086, 29099, 29112, 29134, 29153, 29175, 29191, 29207, 29220, 29236, 0}, {29051, 29070, 29086, 29099, 29112, 29134, 29153, 29175, 29191, 29207, 29220, 29236, 0}, {29252, 29261, 29270, 29279, 29288, 29297, 29309, 29318, 29327, 29336, 29345, 29354, 0}, {29252, 29261, 29270, 29279, 29288, 29297, 29309, 29318, 29327, 29336, 29345, 29354, 0}, 0, 0, 185, 187, {198,29363,6480,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {3883, 7281, 7286, {3895, 29373, 3909, 29378, 29388, 29394, 3942}, {29401, 8413, 3761, 29405, 29410, 29414, 29418}, {2673, 2436, 2428, 2428, 29423, 3989, 2023}, {29425, 29433, 4005, 4011, 29442, 29447, 29453, 4034, 29459, 29468, 29476, 29485, 0}, {29494, 29502, 4094, 1012, 8083, 29511, 29517, 4117, 8100, 8109, 8117, 29523, 0}, {29532, 2763, 3761, 29536, 2702, 29540, 29545, 20157, 18381, 29549, 2796, 3769, 0}, {29532, 2763, 3761, 29536, 2702, 29540, 29545, 20157, 18381, 29549, 2796, 3769, 0}, 2, 1, 185, 187, {198,189,1120,2286,1139,1167,1692,0,0,0,0,0,0,0},{29553,4239,4266,1242,0,0,0,0,0,0},{843,251,242,29582,0,0,0,0,0,0,0,0},{848,269,257,29594,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1, 29614, 29626, {29638, 17602, 29666, 17643, 17662, 17684, 17709}, {17728, 17738, 25839, 17761, 17771, 17784, 17800}, {0, 0, 0, 0, 0, 0, 0}, {25852, 25877, 17888, 25908, 25927, 17930, 25934, 29685, 29701, 29729, 26010, 26038, 0}, {25852, 25877, 17888, 25908, 25927, 17930, 25934, 29685, 29701, 29729, 26010, 26038, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {20032, 29751, 29763, {29772, 29788, 29804, 29832, 29848, 29891, 29916}, {29772, 29788, 29944, 29832, 29954, 29976, 29989}, {29999, 30003, 30007, 30011, 30015, 30028, 30035}, {30042, 30061, 30086, 30105, 30130, 30143, 30156, 30169, 30191, 30225, 30250, 30278, 0}, {30042, 30061, 30086, 30105, 30130, 30143, 30156, 30169, 30191, 30225, 30250, 30278, 0}, {30306, 30313, 30323, 30105, 30130, 30143, 30156, 30336, 30346, 30359, 30369, 30382, 0}, {30306, 30313, 30323, 30105, 30130, 30143, 30156, 30336, 30346, 30359, 30369, 30382, 0}, 0, 1, 2566, 187, {1692,1681,1735,198,189,0,0,0,0,0,0,0,0,0},{30395,0,0,0,0,0,0,0,0,0},{1858,1866,843,251,0,0,0,0,0,0,0,0},{1875,1886,848,269,0,0,0,0,0},{30443,0,0,0,0,0,0,0}},
+       {30453, 30469, 30479, {30492, 30502, 30509, 30522, 30532, 30542, 30552}, {30492, 30502, 30562, 30522, 30532, 30542, 30552}, {30572, 30576, 30580, 30584, 30588, 30592, 30596}, {30600, 30616, 30632, 30642, 30655, 30662, 30669, 30679, 30692, 30711, 30727, 30743, 0}, {30600, 30616, 30632, 30642, 30655, 30662, 30669, 30679, 30692, 30759, 30727, 30743, 0}, {30778, 30788, 30632, 30798, 30655, 30662, 30669, 30808, 30818, 30828, 30838, 30848, 0}, {30778, 30788, 30632, 30798, 30655, 30662, 30669, 30808, 30818, 30828, 30838, 30848, 0}, 0, 0, 185, 187, {2277,1692,0,0,0,0,0,0,0,0,0,0,0,0},{30858,0,0,0,0,0,0,0,0,0},{3594,0,0,0,0,0,0,0,0,0,0,0},{3602,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 30890, 30900, {30913, 30920, 30926, 30933, 30939, 30945, 30953}, {30963, 30967, 30971, 30975, 30979, 30983, 30987}, {12817, 12817, 12817, 12817, 12817, 12817, 12817}, {30993, 31002, 31011, 31016, 31022, 31028, 31034, 31041, 31047, 31056, 31065, 31073, 0}, {30993, 31002, 31011, 31016, 31022, 31028, 31034, 31041, 31047, 31056, 31065, 31073, 0}, {31082, 31086, 3761, 31090, 3730, 31094, 31098, 31102, 31107, 31111, 31117, 31121, 0}, {31082, 31086, 3761, 31090, 3730, 31094, 31098, 31102, 31107, 31111, 31117, 31121, 0}, 0, 0, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 31125, 31166, {31207, 31226, 31245, 31270, 31289, 31311, 31336}, {31355, 17738, 31365, 17761, 31381, 17784, 17800}, {31394, 17814, 31398, 17828, 31402, 17842, 17849}, {17853, 31409, 17888, 31437, 25927, 31456, 17940, 31466, 31482, 31513, 31535, 31560, 0}, {17853, 31409, 17888, 31437, 25927, 31456, 17940, 31466, 31482, 31513, 31535, 31560, 0}, {17853, 31409, 17888, 31437, 25927, 31456, 17940, 31466, 31482, 31513, 31535, 31560, 0}, {17853, 31409, 17888, 31437, 25927, 31456, 17940, 31466, 31482, 31513, 31535, 31560, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{25807,0,0,0,0,0,0,0}},
+       {289, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {31585, 31592, 31601, 31616, 31627, 31636, 31643, 31650, 31657, 31668, 31681, 31694, 0}, {31585, 31592, 31601, 31616, 31627, 31636, 31643, 31650, 31657, 31668, 31681, 31694, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 6, 185, 187, {1654,1692,0,0,0,0,0,0,0,0,0,0,0,0},{31699,31720,0,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {31735, 1929, 1932, {31741, 31748, 31754, 31761, 31772, 31780, 31789}, {31796, 8413, 3761, 31800, 31804, 31808, 10790}, {2436, 2436, 2428, 2428, 5694, 16401, 2023}, {3991, 31812, 31820, 4011, 4017, 31826, 31832, 4034, 31838, 31848, 31856, 31866, 0}, {3991, 31812, 31820, 4011, 4017, 31826, 31832, 4034, 31838, 31848, 31856, 31866, 0}, {31876, 31880, 3761, 29536, 3730, 31884, 31888, 20157, 18381, 2792, 31892, 16358, 0}, {31876, 31880, 3761, 29536, 3730, 31884, 31888, 20157, 18381, 2792, 31892, 16358, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 0, 0, {31896, 31903, 31911, 31918, 31925, 31933, 31941}, {31948, 31951, 31954, 31957, 31960, 31963, 31966}, {2436, 2436, 2430, 2436, 12817, 3987, 12817}, {31969, 31977, 31987, 31993, 32001, 32006, 32011, 32016, 32023, 20142, 32031, 32039, 0}, {31969, 31977, 31987, 31993, 32001, 32006, 32011, 32016, 32023, 20142, 32031, 32039, 0}, {2759, 32047, 3761, 32051, 3730, 31094, 31098, 32055, 3701, 2792, 32059, 16358, 0}, {2759, 32047, 3761, 32051, 3730, 31094, 31098, 32055, 3701, 2792, 32059, 16358, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 32063, 32074, {32084, 32102, 32117, 32139, 32152, 32166, 32183}, {32207, 32215, 32220, 32139, 32152, 32232, 32239}, {0, 0, 0, 0, 0, 0, 0}, {32253, 32275, 32291, 32311, 32325, 32342, 32357, 32374, 32388, 32401, 32420, 32434, 0}, {32253, 32275, 32291, 32311, 32325, 32342, 32357, 32374, 32388, 32401, 32420, 32434, 0}, {32453, 32468, 32477, 32490, 32497, 32507, 32515, 32525, 32532, 32538, 32550, 32557, 0}, {32453, 32468, 32477, 32490, 32497, 32507, 32515, 32525, 32532, 32538, 32550, 32557, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{222,20161,20181,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{25807,0,0,0,0,0,0,0}},
+       {3613, 0, 0, {32569, 32577, 15933, 15942, 15951, 32588, 32598}, {16389, 15983, 15987, 15991, 15995, 16252, 32607}, {0, 0, 0, 0, 0, 0, 0}, {32611, 32620, 32630, 32638, 10819, 3734, 32646, 32652, 32661, 32670, 32679, 32688, 0}, {32611, 32620, 32630, 32638, 10819, 3734, 32646, 32652, 32661, 32670, 32679, 32688, 0}, {2759, 2763, 16002, 32697, 10819, 2776, 2780, 20157, 18381, 2792, 32701, 16358, 0}, {2759, 2763, 16002, 32697, 10819, 2776, 2780, 20157, 18381, 2792, 32701, 16358, 0}, 0, 0, 185, 187, {189,1681,1735,1692,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {32705, 32718, 32723, {32728, 32735, 32750, 32764, 32780, 32795, 32811}, {6289, 32826, 2530, 32830, 32834, 32838, 32842}, {2023, 12817, 2428, 2018, 2023, 2430, 12817}, {7370, 7378, 32846, 32853, 32860, 2469, 2474, 32865, 32875, 32886, 32895, 32905, 0}, {7370, 7378, 32846, 32853, 32860, 2469, 2474, 32865, 32875, 32886, 32895, 32905, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 0, 0, 2566, 187, {1128,1139,1692,2568,0,0,0,0,0,0,0,0,0,0},{32915,2300,4769,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 32934, 32939, {32944, 32960, 32968, 32976, 32985, 32997, 33007}, {33017, 33023, 33029, 33033, 33037, 33045, 3701}, {0, 0, 0, 0, 0, 0, 0}, {33052, 33065, 33079, 33088, 33094, 33098, 33103, 33111, 16313, 33124, 16330, 16338, 0}, {33052, 33065, 33079, 33088, 33094, 33098, 33103, 33111, 16313, 33124, 16330, 16338, 0}, {33133, 2763, 33137, 16346, 33094, 33141, 2780, 33145, 2788, 33153, 2796, 16358, 0}, {33133, 2763, 33137, 16346, 33094, 33141, 2780, 33145, 2788, 33153, 2796, 16358, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{2313,0,0,0,0,0,0,0,0,0,0,0},{2326,0,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {33159, 33186, 33193, {33200, 33210, 33220, 33230, 33240, 33250, 33260}, {33270, 33277, 33284, 33291, 33298, 33305, 33312}, {33319, 33323, 33327, 33331, 33335, 33339, 33343}, {33347, 33354, 33361, 33368, 33375, 33382, 33389, 33396, 33403, 33410, 33417, 33427, 0}, {33347, 33354, 33361, 33368, 33375, 33382, 33389, 33396, 33403, 33410, 33417, 33427, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 185, 187, {1654,1663,1672,1703,1692,1681,0,0,0,0,0,0,0,0},{33437,33461,33491,33521,33538,0,0,0,0,0},{1858,843,251,0,0,0,0,0,0,0,0,0},{1875,848,269,0,0,0,0,0,0},{33561,1914,0,0,0,0,0,0}},
+       {289, 0, 0, {28275, 8413, 33578, 33585, 33595, 33600, 33607}, {33614, 6273, 33618, 4850, 33623, 33628, 33633}, {4421, 33638, 33641, 33644, 33647, 33650, 33653}, {33656, 33663, 33578, 33674, 33680, 33684, 33693, 33700, 33705, 33714, 33719, 33722, 0}, {33656, 33663, 33578, 33674, 33680, 33684, 33693, 33700, 33705, 33714, 33719, 33722, 0}, {33728, 33732, 33739, 28398, 33680, 33744, 33749, 33700, 33754, 33714, 33719, 33759, 0}, {33728, 33732, 33739, 28398, 33680, 33744, 33749, 33700, 33754, 33714, 33719, 33759, 0}, 2, 1, 185, 187, {198,189,1167,1139,1692,0,0,0,0,0,0,0,0,0},{4985,5002,1242,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1921, 33763, 33768, {33773, 33781, 33791, 33801, 33810, 33820, 33828}, {33838, 33842, 33847, 33851, 33855, 33859, 33863}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 33867, 33876, 33887, 33896, 33906, 0}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 33867, 33876, 33887, 33896, 33906, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 0, 0, 185, 187, {198,189,1167,1139,1692,0,0,0,0,0,0,0,0,0},{4985,5002,1242,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {33916, 33934, 33939, {33944, 33969, 33998, 34023, 34036, 34051, 34068}, {34083, 34088, 34093, 34098, 34103, 34108, 8800}, {19417, 19417, 34113, 8811, 8814, 19417, 8811}, {34116, 34135, 34150, 34172, 34192, 34208, 34224, 34238, 34264, 34288, 34305, 34322, 0}, {34116, 34135, 34150, 34172, 34192, 34208, 34224, 34238, 34264, 34288, 34305, 34322, 0}, {34339, 34348, 34357, 34371, 34385, 34397, 34409, 34419, 34435, 34449, 34456, 34463, 0}, {34339, 34348, 34357, 34371, 34385, 34397, 34409, 34419, 34435, 34449, 34456, 34463, 0}, 0, 1, 691, 187, {1156,4753,1692,34470,34480,0,0,0,0,0,0,0,0,0},{34493,34528,34557,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{34592,0,0,0,0,0,0,0}},
+       {20032, 0, 0, {34608, 34620, 34631, 34643, 34655, 34665, 34677}, {34692, 34697, 34702, 34707, 34712, 34717, 34722}, {0, 0, 0, 0, 0, 0, 0}, {34727, 34736, 34748, 34756, 34761, 34771, 34778, 34787, 34794, 34800, 34809, 34820, 0}, {34727, 34736, 34748, 34756, 34761, 34771, 34778, 34787, 34794, 34800, 34809, 34820, 0}, {34828, 34833, 34838, 34843, 34848, 34853, 34858, 34712, 34863, 34868, 34873, 34878, 0}, {34828, 34833, 34838, 34843, 34848, 34853, 34858, 34712, 34863, 34868, 34873, 34878, 0}, 0, 0, 185, 187, {9796,2286,0,0,0,0,0,0,0,0,0,0,0,0},{34883,1207,0,0,0,0,0,0,0,0},{843,0,0,0,0,0,0,0,0,0,0,0},{848,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 34903, 34905, {34907, 34920, 34928, 34937, 34947, 34957, 34966}, {34978, 34982, 34986, 34990, 34994, 34998, 35002}, {2673, 2436, 2428, 7736, 12817, 5694, 2023}, {35006, 35020, 35031, 35040, 35051, 35063, 35077, 35089, 35102, 35115, 35127, 35140, 0}, {35006, 35020, 35031, 35040, 35051, 35063, 35077, 35089, 35102, 35115, 35127, 35140, 0}, {35154, 35159, 35165, 35171, 35176, 35182, 35188, 35193, 35199, 35204, 19138, 35210, 0}, {35154, 35159, 35165, 35171, 35176, 35182, 35188, 35193, 35199, 35204, 19138, 35210, 0}, 2, 1, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {1, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {9, 18, 25, 45, 65, 89, 113, 120, 131, 142, 151, 169, 0}, {9, 18, 25, 45, 65, 89, 113, 120, 131, 142, 151, 169, 0}, {9, 18, 25, 45, 65, 89, 113, 120, 131, 142, 151, 169, 0}, {9, 18, 25, 45, 65, 89, 113, 120, 131, 142, 151, 169, 0}, 0, 0, 185, 187, {189,198,0,0,0,0,0,0,0,0,0,0,0,0},{209,222,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
        {289, 296, 307, {318, 331, 352, 367, 378, 397, 408}, {421, 426, 431, 436, 441, 446, 451}, {456, 459, 462, 465, 468, 459, 465}, {471, 484, 501, 510, 521, 528, 535, 542, 555, 574, 591, 606, 0}, {471, 484, 501, 510, 521, 528, 535, 542, 555, 574, 591, 606, 0}, {623, 629, 501, 639, 521, 528, 535, 647, 655, 665, 673, 683, 0}, {623, 629, 501, 639, 521, 528, 535, 647, 655, 665, 673, 683, 0}, 2, 1, 691, 187, {693,708,724,740,0,0,0,0,0,0,0,0,0,0},{757,776,794,819,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{856,0,0,0,0,0,0,0}},
        {289, 872, 878, {884, 893, 901, 909, 918, 925, 935}, {944, 948, 952, 956, 960, 964, 968}, {972, 975, 978, 981, 984, 987, 990}, {993, 999, 1006, 1012, 1018, 1023, 1028, 1035, 1041, 1050, 1058, 1067, 0}, {993, 999, 1006, 1012, 1018, 1023, 1028, 1035, 1041, 1050, 1058, 1067, 0}, {1076, 1081, 1006, 1086, 1018, 1023, 1091, 1096, 1100, 1105, 1110, 1115, 0}, {1076, 1081, 1006, 1086, 1018, 1023, 1091, 1096, 1100, 1105, 1110, 1115, 0}, 2, 1, 185, 187, {198,189,1120,1128,1139,1148,1156,1167,1176,0,0,0,0,0},{1184,1207,1225,1242,1254,1270,0,0,0,0},{843,0,0,0,0,0,0,0,0,0,0,0},{848,0,0,0,0,0,0,0,0},{1286,1301,1311,1320,0,0,0,0}},
-       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35236, 35243, 35250, 35257, 35264, 35271, 35278}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {1654,1681,1692,0,0,0,0,0,0,0,0,0,0,0},{1744,6632,1822,35285,0,0,0,0,0,0},{1866,1858,251,843,0,0,0,0,0,0,0,0},{1886,1875,269,848,0,0,0,0,0},{1898,0,0,0,0,0,0,0}},
+       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35216, 35223, 35230, 35237, 35244, 35251, 35258}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {1654,1681,1692,0,0,0,0,0,0,0,0,0,0,0},{1744,6632,1822,35265,0,0,0,0,0,0},{1866,1858,251,843,0,0,0,0,0,0,0,0},{1886,1875,269,848,0,0,0,0,0},{1898,0,0,0,0,0,0,0}},
        {1921, 1929, 1932, {1935, 1943, 1953, 1961, 1969, 1978, 1985}, {1992, 1995, 1998, 2002, 2005, 2009, 2013}, {2016, 2018, 2020, 2023, 2025, 2018, 2023}, {2028, 2034, 2040, 2048, 2054, 2062, 2070, 2080, 2086, 2094, 2102, 2111, 0}, {2120, 2126, 2133, 2141, 2147, 2155, 2163, 2173, 2086, 2179, 2187, 2197, 0}, {2206, 2210, 2215, 2220, 2224, 2229, 2234, 2239, 2243, 2249, 2255, 2259, 0}, {2206, 2210, 2215, 2220, 2224, 2229, 2234, 2239, 2243, 2249, 2255, 2259, 0}, 2, 1, 2263, 187, {2266,2277,198,2286,189,2293,1692,1663,1721,0,0,0,0,0},{2300,0,0,0,0,0,0,0,0,0},{843,251,2313,2321,0,0,0,0,0,0,0,0},{848,269,2326,2337,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {1921, 1929, 1932, {2345, 2353, 2360, 2368, 2375, 2383, 2390}, {2398, 2403, 2407, 2411, 2415, 2419, 2423}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {2438, 2445, 2453, 2459, 2465, 2469, 2474, 2479, 2486, 2496, 2504, 2513, 0}, {2438, 2445, 2453, 2459, 2465, 2469, 2474, 2479, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 2, 1, 2566, 187, {1128,1139,1692,2568,0,0,0,0,0,0,0,0,0,0},{2300,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {1921, 2579, 2585, {2592, 2600, 2607, 2616, 2625, 2636, 2644}, {2652, 2655, 2658, 2661, 2664, 2667, 2670}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 2, 1, 691, 187, {1156,1167,1692,2804,0,0,0,0,0,0,0,0,0,0},{2818,2300,2837,0,0,0,0,0,0,0},{251,2850,0,0,0,0,0,0,0,0,0,0},{269,2862,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
@@ -132,1261 +132,1261 @@ static const DateTimeFormatEntry datetime_format_entries [] = {
        {1921, 1929, 1932, {9187, 9196, 9208, 9215, 9223, 9233, 9239}, {9246, 9250, 9254, 9258, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {9286, 9296, 9305, 9313, 9321, 9329, 9336, 9343, 9351, 2102, 9357, 9365, 0}, {9374, 9384, 9393, 9401, 9409, 9417, 9424, 9431, 9440, 7911, 9446, 9456, 0}, {9465, 9469, 9474, 9479, 9483, 7945, 2239, 9487, 9491, 2255, 9495, 2259, 0}, {9465, 9469, 9474, 9479, 9483, 7945, 2239, 9487, 9491, 2255, 9495, 2259, 0}, 0, 1, 691, 187, {9499,9509,6153,9517,9529,9539,9549,1692,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
        {1921, 1929, 1932, {9610, 9618, 9627, 9634, 9641, 9650, 1985}, {1992, 1995, 9657, 2002, 9660, 9664, 2013}, {2016, 2018, 9667, 2023, 9669, 2018, 2023}, {5710, 5718, 9672, 6077, 9678, 9683, 9688, 2479, 2486, 5789, 2504, 2513, 0}, {9693, 9702, 7844, 9712, 9720, 9726, 9732, 9738, 9746, 9756, 9765, 9774, 0}, {2522, 2526, 2530, 2534, 9678, 9683, 9688, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 9678, 9683, 9688, 2546, 2550, 2554, 2558, 2562, 0}, 2, 1, 691, 187, {4753,1156,1167,1692,5888,9783,9796,9806,0,0,0,0,0,0},{2300,0,0,0,0,0,0,0,0,0},{843,251,2321,0,0,0,0,0,0,0,0,0},{848,269,2337,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {289, 9817, 9826, {9834, 9841, 9850, 9859, 9871, 9879, 9888}, {9898, 9902, 3761, 9907, 9912, 9916, 9920}, {2673, 5694, 2428, 2428, 9924, 2018, 2023}, {9926, 9932, 4887, 9939, 2465, 9945, 9953, 9960, 9966, 9974, 9980, 9988, 0}, {9926, 9932, 4887, 9939, 2465, 9945, 9953, 9960, 9966, 9974, 9980, 9988, 0}, {2759, 9996, 3761, 10000, 10004, 10008, 10012, 10016, 9920, 10020, 10024, 10029, 0}, {2759, 9996, 3761, 10000, 10004, 10008, 10012, 10016, 9920, 10020, 10024, 10029, 0}, 0, 1, 691, 187, {4753,4762,0,0,0,0,0,0,0,0,0,0,0,0},{1207,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {10033, 10046, 10049, {10052, 10060, 10068, 2368, 2375, 2383, 10075}, {10083, 10088, 10093, 10097, 10101, 10105, 10109}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {10114, 10122, 10131, 2696, 10004, 2706, 2711, 10136, 2723, 2733, 2741, 3752, 0}, {7370, 7378, 4887, 2459, 2465, 2469, 2474, 10144, 2486, 2496, 2504, 2513, 0}, {2759, 2763, 3761, 2772, 10004, 2776, 2780, 2784, 2788, 2792, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 10004, 2776, 2780, 2784, 2788, 2792, 2796, 3769, 0}, 2, 1, 2566, 187, {1692,5888,0,0,0,0,0,0,0,0,0,0,0,0},{10152,10170,0,0,0,0,0,0,0,0},{251,843,7529,0,0,0,0,0,0,0,0,0},{269,848,7585,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 185, 187, {2277,2286,189,198,8579,10193,1692,0,0,0,0,0,0,0},{1242,10205,10221,0,0,0,0,0,0,0},{843,251,3594,242,0,0,0,0,0,0,0,0},{848,269,3602,257,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 10263, 10268, {10272, 10278, 10288, 10294, 10305, 10315, 10320}, {10330, 10334, 10338, 10342, 10347, 10351, 10355}, {2018, 2018, 2023, 10359, 2018, 7736, 7736}, {10362, 10367, 10374, 10379, 10385, 10392, 10400, 10407, 10416, 10423, 10428, 10435, 0}, {10362, 10367, 10374, 10379, 10385, 10392, 10400, 10407, 10416, 10423, 10428, 10435, 0}, {10443, 10447, 3761, 10452, 3730, 10456, 10460, 10464, 10469, 10473, 10477, 10481, 0}, {10443, 10447, 3761, 10452, 3730, 10456, 10460, 10464, 10469, 10473, 10477, 10481, 0}, 0, 1, 691, 187, {4753,4762,1156,1167,0,0,0,0,0,0,0,0,0,0},{10485,1242,10502,5505,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 10520, 10538, {10556, 10567, 10580, 10589, 10596, 10609, 10618}, {10556, 10567, 10580, 10589, 10596, 10609, 10618}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {10627, 10638, 10649, 10658, 10669, 10676, 10683, 10696, 10705, 10716, 10729, 10740, 0}, {10627, 10638, 10649, 10658, 10669, 10676, 10683, 10696, 10705, 10716, 10729, 10740, 0}, {10627, 10638, 10649, 10658, 10669, 10676, 10683, 10696, 10705, 10716, 10729, 10740, 0}, {10627, 10638, 10649, 10658, 10669, 10676, 10683, 10696, 10705, 10716, 10729, 10740, 0}, 0, 0, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 1929, 1932, {10765, 10772, 10778, 10785, 10790, 10796, 10802}, {10808, 10812, 10816, 10820, 10824, 10828, 10832}, {2428, 2023, 2023, 10836, 4442, 3987, 2023}, {10114, 10122, 10838, 2696, 10844, 2706, 2711, 10848, 2723, 2733, 2741, 10856, 0}, {10114, 10122, 10838, 2696, 10844, 2706, 2711, 10848, 2723, 2733, 2741, 10856, 0}, {2759, 2763, 3761, 2772, 10844, 2776, 2780, 10865, 2788, 2792, 2796, 10869, 0}, {2759, 2763, 3761, 2772, 10844, 2776, 2780, 10865, 2788, 2792, 2796, 10869, 0}, 0, 0, 185, 187, {198,189,1128,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 10873, 10878, {10883, 10896, 10915, 10932, 10945, 10958, 10975}, {10988, 8775, 8780, 8785, 8790, 8795, 8800}, {10993, 8808, 8805, 8811, 8814, 8808, 8811}, {10996, 11009, 11020, 11037, 11052, 11067, 11082, 11095, 11110, 11127, 11142, 11159, 0}, {11174, 11185, 11198, 11213, 11226, 11239, 11252, 11263, 11276, 11291, 11304, 11323, 0}, {11336, 11343, 11350, 11357, 11364, 11371, 11378, 11385, 11392, 11399, 11406, 11413, 0}, {11336, 11343, 11350, 11357, 11364, 11371, 11378, 11385, 11392, 11399, 11406, 11413, 0}, 0, 1, 691, 187, {1156,1167,1692,0,0,0,0,0,0,0,0,0,0,0},{11420,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{11438,0,0,0,0,0,0,0}},
-       {289, 11454, 11467, {11480, 11495, 11516, 11531, 11544, 11557, 10975}, {421, 426, 11572, 436, 11577, 446, 451}, {456, 459, 11582, 465, 468, 459, 465}, {11585, 11602, 11611, 11626, 521, 11643, 11658, 11671, 11686, 11703, 11724, 11741, 0}, {11756, 11773, 11786, 11803, 9017, 11822, 11837, 11850, 11863, 11878, 11901, 11920, 0}, {11933, 11940, 11947, 11954, 521, 11961, 11968, 11975, 11982, 11989, 11996, 12003, 0}, {11933, 11940, 11947, 11954, 521, 11961, 11968, 11975, 11982, 11989, 11996, 12003, 0}, 0, 0, 691, 187, {1167,0,0,0,0,0,0,0,0,0,0,0,0,0},{1242,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1921, 12010, 12015, {12020, 12028, 12039, 12045, 12051, 12060, 1985}, {9246, 9250, 2415, 12066, 9262, 9267, 12070}, {9275, 9277, 12074, 9281, 9283, 9277, 9281}, {2438, 2445, 9672, 2459, 2465, 12076, 12082, 12088, 2486, 2496, 2504, 2513, 0}, {2438, 2445, 9672, 2459, 2465, 12076, 12082, 12088, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,12099,1167,9806,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {12109, 12118, 12123, {12128, 12139, 12150, 12161, 12172, 12183, 12189}, {2018, 9924, 2430, 4442, 2016, 10836, 2436}, {2018, 9924, 2430, 4442, 2016, 10836, 2436}, {12198, 12206, 12215, 12222, 4898, 12229, 12235, 2479, 2486, 12241, 2504, 12250, 0}, {12198, 12206, 12215, 12222, 4898, 12229, 12235, 2479, 2486, 12241, 2504, 12250, 0}, {12260, 12265, 12215, 2534, 4898, 12229, 12235, 2546, 12271, 2554, 2558, 12276, 0}, {12260, 12265, 12215, 2534, 4898, 12229, 12235, 2546, 12271, 2554, 2558, 12276, 0}, 2, 1, 691, 187, {7519,1156,1167,1692,0,0,0,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1921, 12281, 12298, {12312, 12323, 12333, 12342, 12353, 12365, 12376}, {12386, 12389, 12392, 12395, 12398, 12401, 12404}, {2023, 2018, 2432, 2430, 7736, 2018, 2023}, {12407, 12417, 12428, 12434, 12443, 12449, 12457, 12465, 12473, 12484, 12493, 12503, 0}, {12513, 12523, 2453, 12534, 12543, 12549, 12557, 12565, 12573, 12584, 12593, 12603, 0}, {12613, 12619, 12428, 12625, 12443, 12630, 12636, 12642, 4190, 12647, 4201, 12652, 0}, {12613, 12619, 12428, 12625, 12443, 12630, 12636, 12642, 4190, 12647, 4201, 12652, 0}, 0, 1, 691, 187, {9517,9539,12657,0,0,0,0,0,0,0,0,0,0,0},{12669,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{12696,0,0,0,0,0,0,0}},
-       {12714, 12726, 12015, {12732, 12744, 12756, 12768, 12782, 12797, 12810}, {12824, 12827, 12830, 12833, 12836, 12839, 9660}, {2023, 2018, 12842, 2430, 4442, 2018, 9669}, {12844, 12851, 12859, 12865, 12874, 12883, 12893, 12899, 12910, 12920, 12927, 12937, 0}, {12844, 12851, 12859, 12865, 12874, 12883, 12893, 12899, 12910, 12920, 12927, 12937, 0}, {12945, 12951, 12956, 12961, 12966, 12971, 12978, 12984, 12990, 12996, 13002, 13009, 0}, {12945, 12951, 12956, 12961, 12966, 12971, 12978, 12984, 12990, 12996, 13002, 13009, 0}, 2, 1, 2566, 187, {1692,2568,0,0,0,0,0,0,0,0,0,0,0,0},{13016,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{13038,0,0,0,0,0,0,0}},
-       {1, 13053, 13065, {13077, 13092, 13107, 13122, 13139, 13158, 13169}, {13180, 13187, 13194, 13201, 13208, 13215, 13222}, {0, 0, 0, 0, 0, 0, 0}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, 0, 1, 691, 187, {1156,1167,4762,1128,189,0,0,0,0,0,0,0,0,0},{13393,13411,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 13430, 13450, {13467, 13480, 13493, 13509, 13526, 13541, 13550}, {13467, 13480, 13493, 13509, 13526, 13541, 13550}, {13559, 13562, 13565, 13568, 13571, 13574, 13577}, {13580, 13593, 13604, 13613, 13624, 13629, 13638, 13649, 13656, 13671, 13682, 13695, 0}, {13708, 13723, 13604, 13613, 13736, 13629, 13743, 13649, 13656, 13671, 13682, 13695, 0}, {13580, 13593, 13604, 13613, 13624, 13629, 13638, 13649, 13656, 13671, 13682, 13695, 0}, {13580, 13593, 13604, 13613, 13624, 13629, 13638, 13649, 13656, 13671, 13682, 13695, 0}, 0, 6, 185, 187, {198,189,0,0,0,0,0,0,0,0,0,0,0,0},{13756,5505,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 13775, 13778, {13781, 13794, 13804, 13813, 13823, 13834, 13845}, {13857, 13860, 13865, 13870, 13875, 13880, 13885}, {13857, 13890, 13893, 13896, 13899, 13902, 13905}, {13908, 13917, 13926, 13935, 13944, 13953, 13962, 13971, 13980, 13989, 13999, 14009, 0}, {14019, 14028, 14037, 14046, 14055, 14064, 14073, 14082, 14091, 14100, 14110, 14120, 0}, {14130, 14136, 14142, 14148, 14154, 14160, 14166, 14172, 14178, 14184, 14191, 14198, 0}, {14130, 14136, 14142, 14148, 14154, 14160, 14166, 14172, 14178, 14184, 14191, 14198, 0}, 0, 1, 185, 187, {198,189,1139,1128,1692,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 14205, 14229, {14253, 14266, 14287, 14306, 14327, 14346, 14359}, {14370, 14377, 14384, 14391, 14398, 14405, 14412}, {14419, 14422, 14422, 14425, 14428, 14431, 14436}, {14439, 14454, 14469, 14478, 14489, 14500, 14513, 14526, 14541, 14560, 14579, 14596, 0}, {14615, 14632, 14649, 14660, 14673, 14686, 14701, 14716, 14733, 14754, 14775, 14794, 0}, {14815, 14822, 14829, 14836, 14843, 14850, 14857, 14864, 14871, 14878, 14885, 14892, 0}, {14815, 14822, 14829, 14836, 14843, 14850, 14857, 14864, 14871, 14878, 14885, 14892, 0}, 0, 1, 691, 187, {1156,1167,9796,198,14899,3582,1692,0,0,0,0,0,0,0},{3870,1207,13756,5505,14910,14921,14933,14950,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {14968, 14974, 14988, 15011, 15025, 15041, 15048}, {15057, 15060, 15065, 15071, 15075, 7736, 15080}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {15084, 15091, 10374, 15098, 3730, 15104, 15110, 15116, 15123, 15132, 15140, 15147, 0}, {15154, 15161, 15168, 15173, 15179, 15183, 15188, 15193, 15200, 15209, 15217, 15224, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, 0, 1, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{15259,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {15281, 1929, 1932, {15296, 15304, 15315, 15325, 15336, 15345, 15354}, {15364, 15368, 15372, 15376, 15380, 15384, 15388}, {15392, 12842, 12842, 12842, 2432, 2432, 2436}, {15394, 15404, 15412, 15420, 15428, 15436, 15443, 15451, 15459, 15466, 15472, 15479, 0}, {15487, 15498, 15507, 15516, 15525, 15534, 15542, 15551, 15560, 15568, 15575, 15583, 0}, {15592, 15597, 4845, 15602, 15607, 15612, 15617, 15622, 15627, 15632, 15637, 15642, 0}, {15592, 15597, 4845, 15602, 15607, 15612, 15617, 15622, 15627, 15632, 15637, 15642, 0}, 2, 1, 185, 187, {1681,1692,0,0,0,0,0,0,0,0,0,0,0,0},{15647,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{15680,0,0,0,0,0,0,0}},
-       {289, 15697, 15718, {15735, 331, 352, 8714, 15748, 15765, 15776}, {15789, 15797, 15805, 15811, 15819, 15827, 15835}, {456, 459, 462, 465, 468, 459, 465}, {15843, 484, 501, 510, 15858, 15865, 15874, 542, 555, 574, 591, 606, 0}, {15843, 484, 501, 510, 15858, 15865, 15874, 542, 555, 574, 591, 606, 0}, {15883, 15891, 15899, 639, 15858, 15907, 15915, 647, 655, 665, 673, 683, 0}, {15883, 15891, 15899, 639, 15858, 15907, 15915, 647, 655, 665, 673, 683, 0}, 0, 1, 691, 187, {1156,1167,15923,0,0,0,0,0,0,0,0,0,0,0},{13756,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 0, 0, {15940, 15947, 15958, 15967, 15976, 15983, 15994}, {16004, 16008, 16012, 16016, 16020, 16023, 16027}, {0, 0, 0, 0, 0, 0, 0}, {16031, 16041, 16050, 16058, 16067, 16080, 16092, 16099, 16106, 16113, 16123, 16135, 0}, {16031, 16041, 16050, 16058, 16067, 16080, 16092, 16099, 16106, 16113, 16123, 16135, 0}, {16148, 16152, 16156, 16160, 16164, 16168, 16172, 16176, 16180, 16184, 16188, 16192, 0}, {16148, 16152, 16156, 16160, 16164, 16168, 16172, 16176, 16180, 16184, 16188, 16192, 0}, 0, 0, 185, 187, {189,1681,1735,1692,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 0, 0, {16196, 16201, 16207, 16217, 16229, 16237, 16248}, {16257, 16261, 16265, 16269, 16273, 16277, 16281}, {0, 0, 0, 0, 0, 0, 0}, {16285, 16295, 16305, 16312, 16319, 2706, 16324, 16331, 16338, 16347, 16355, 16363, 0}, {16285, 16295, 16305, 16312, 16319, 2706, 16324, 16331, 16338, 16347, 16355, 16363, 0}, {2759, 2763, 16027, 16371, 16375, 2776, 2780, 16379, 2788, 2792, 2796, 16383, 0}, {2759, 2763, 16027, 16371, 16375, 2776, 2780, 16379, 2788, 2792, 2796, 16383, 0}, 0, 0, 185, 187, {1681,1735,1692,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {16387, 16393, 16404, 16217, 16229, 16237, 16248}, {16414, 16418, 16422, 16269, 16273, 16277, 16281}, {2023, 2428, 16426, 2430, 2023, 5694, 2428}, {16428, 16438, 16449, 16456, 16465, 16471, 16477, 16485, 16493, 16504, 16514, 16523, 0}, {16532, 16295, 16541, 16547, 16319, 2706, 16324, 16331, 16554, 16347, 16355, 16363, 0}, {2759, 2763, 16564, 2772, 16375, 2776, 2780, 16379, 2788, 2792, 2796, 16383, 0}, {2759, 2763, 16564, 2772, 16375, 2776, 2780, 16379, 2788, 2792, 2796, 16383, 0}, 0, 0, 2566, 187, {1128,1139,189,1681,1735,1692,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 16568, 16572, {16576, 16583, 16591, 16599, 16608, 16618, 16625}, {2652, 16634, 2658, 16637, 2664, 16640, 2670}, {2023, 2428, 2673, 3705, 2673, 3989, 2023}, {16643, 16652, 16662, 2696, 10844, 16668, 16674, 16680, 2723, 2733, 2741, 10856, 0}, {16643, 16652, 16662, 2696, 10844, 16668, 16674, 16680, 2723, 2733, 2741, 10856, 0}, {2759, 2763, 3761, 2772, 10844, 2776, 2780, 2784, 2788, 2792, 2796, 10869, 0}, {2759, 2763, 3761, 2772, 10844, 2776, 2780, 2784, 2788, 2792, 2796, 10869, 0}, 0, 0, 185, 187, {1681,1735,1692,16689,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {16701, 16717, 16742, 16770, 16798, 16826, 16854}, {16873, 16883, 16893, 16903, 16913, 16923, 16933}, {16943, 16947, 16951, 16947, 16955, 16959, 16963}, {16967, 16989, 17017, 17033, 17052, 17068, 17087, 17106, 17128, 17159, 17187, 17212, 0}, {16967, 16989, 17017, 17033, 17052, 17068, 17087, 17106, 17128, 17159, 17187, 17212, 0}, {17240, 17250, 17260, 17270, 17280, 17290, 17300, 17310, 17320, 17330, 17340, 17350, 0}, {17240, 17250, 17260, 17270, 17280, 17290, 17300, 17310, 17320, 17330, 17340, 17350, 0}, 0, 1, 691, 187, {1156,1167,7419,1176,4762,4753,1692,0,0,0,0,0,0,0},{17360,17394,17427,3870,17461,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 17473, 17478, {5932, 17483, 17494, 17504, 17514, 17524, 17538}, {17550, 17554, 17559, 17564, 17568, 17573, 17578}, {2023, 2428, 2430, 2428, 5694, 2434, 2436}, {2438, 2445, 4887, 6077, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2438, 2445, 4887, 6077, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, 2, 1, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{2300,0,0,0,0,0,0,0,0,0},{251,4288,0,0,0,0,0,0,0,0,0,0},{269,4302,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 17582, 17598, {17608, 17627, 17646, 17668, 17687, 17709, 17734}, {17753, 17763, 17773, 17786, 17796, 17809, 17825}, {17835, 17839, 17846, 17853, 17860, 17867, 17874}, {17878, 17894, 17913, 17929, 17948, 17955, 17965, 17981, 17997, 18016, 18038, 18054, 0}, {17878, 17894, 17913, 17929, 17948, 17955, 17965, 17981, 17997, 18016, 18038, 18054, 0}, {18073, 18080, 17913, 18090, 17948, 17955, 18106, 18119, 18126, 18139, 18155, 18165, 0}, {18073, 18080, 17913, 18090, 17948, 17955, 18106, 18119, 18126, 18139, 18155, 18165, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {18178, 18192, 18195, {18198, 18207, 18216, 18226, 18236, 18246, 18258}, {18266, 18271, 18275, 18279, 18283, 18288, 18293}, {18297, 2430, 2430, 9924, 18297, 18300, 2023}, {18303, 18310, 18315, 2696, 18321, 18327, 18334, 18340, 18348, 18358, 18366, 18375, 0}, {18303, 18310, 18315, 2696, 18321, 18327, 18334, 18340, 18348, 18358, 18366, 18375, 0}, {2759, 18385, 3761, 2772, 18389, 18393, 18398, 18402, 18406, 18410, 2796, 18414, 0}, {2759, 18385, 3761, 2772, 18389, 18393, 18398, 18402, 18406, 18410, 2796, 18414, 0}, 0, 0, 185, 187, {198,1692,18419,7410,2277,0,0,0,0,0,0,0,0,0},{18428,18453,10193,0,0,0,0,0,0,0},{251,3594,843,0,0,0,0,0,0,0,0,0},{269,3602,848,3594,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {18472, 18485, 18490, {18495, 18507, 18518, 18532, 18544, 18554, 18564}, {18575, 18580, 18585, 18590, 18595, 18600, 18605}, {2023, 3989, 2428, 6293, 2673, 16426, 2436}, {18610, 18627, 18640, 18654, 18667, 18680, 18693, 18707, 18719, 18733, 18747, 18761, 0}, {18610, 18627, 18640, 18654, 18667, 18680, 18693, 18707, 18719, 18733, 18747, 18761, 0}, {18774, 18781, 18786, 18791, 18795, 18800, 18805, 18810, 18815, 18822, 18827, 18833, 0}, {18774, 18781, 18786, 18791, 18795, 18800, 18805, 18810, 18815, 18822, 18827, 18833, 0}, 2, 1, 691, 187, {1156,1167,4762,1692,0,0,0,0,0,0,0,0,0,0},{18838,18862,0,0,0,0,0,0,0,0},{251,843,4288,0,0,0,0,0,0,0,0,0},{269,848,4302,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {20057, 1929, 1932, {20065, 20074, 20083, 20091, 20100, 20109, 20116}, {20125, 20128, 20131, 20134, 20137, 20141, 20144}, {6607, 6609, 6611, 6613, 12842, 15392, 6605}, {10114, 10122, 20147, 20153, 10844, 2706, 19221, 20160, 16338, 20167, 16355, 20174, 0}, {10114, 10122, 20147, 20153, 10844, 2706, 19221, 20160, 16338, 20167, 16355, 20174, 0}, {2759, 2763, 19217, 2772, 10844, 2776, 2780, 20182, 2788, 2792, 2796, 10869, 0}, {2759, 2763, 19217, 2772, 10844, 2776, 2780, 20182, 2788, 2792, 2796, 10869, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {20220, 1929, 1932, {20227, 20237, 20246, 20255, 20266, 20276, 20281}, {20288, 20294, 20299, 20304, 20309, 10828, 20313}, {20318, 2673, 2023, 7736, 2018, 3987, 2023}, {15084, 15091, 10374, 15098, 3730, 20320, 20325, 20330, 15123, 15132, 15140, 15147, 0}, {15084, 15091, 10374, 15098, 3730, 20320, 20325, 20330, 15123, 15132, 15140, 15147, 0}, {20337, 20342, 3761, 2772, 3730, 20320, 20325, 20346, 10812, 2792, 20350, 20355, 0}, {20337, 20342, 3761, 2772, 3730, 20320, 20325, 20346, 10812, 2792, 20350, 20355, 0}, 0, 1, 691, 187, {1156,0,0,0,0,0,0,0,0,0,0,0,0,0},{20359,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 20377, 20405, {20427, 20446, 20465, 20490, 20509, 20543, 20568}, {20587, 20597, 20607, 20623, 20633, 20658, 20674}, {20684, 20688, 20695, 20699, 20706, 20713, 20720}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, 0, 0, 2566, 187, {1139,2293,1128,20970,20983,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20998,21007,0,0,0,0,0,0,0,0},{4302,2337,21015,21027,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 1929, 1932, {21507, 21526, 21545, 21567, 21586, 21608, 21633}, {21652, 21662, 21672, 21685, 21695, 21708, 21724}, {21734, 21738, 21745, 21752, 21759, 21766, 21773}, {21777, 21805, 21833, 21849, 21868, 21875, 21885, 21901, 21917, 21945, 21967, 21989, 0}, {21777, 21805, 21833, 21849, 21868, 21875, 21885, 21901, 21917, 21945, 21967, 21989, 0}, {22014, 22033, 21833, 21849, 21868, 21875, 21885, 22052, 22059, 22075, 22091, 22101, 0}, {22014, 22033, 21833, 21849, 21868, 21875, 21885, 22052, 22059, 22075, 22091, 22101, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 8151, 22114, {22117, 22136, 22155, 22180, 22199, 22221, 22246}, {22265, 22275, 22285, 22301, 22311, 22324, 22340}, {22350, 22354, 22361, 22365, 22372, 22379, 22386}, {22390, 22412, 22443, 22465, 22484, 22491, 22501, 22517, 22533, 22564, 22586, 22608, 0}, {22390, 22412, 22443, 22465, 22484, 22491, 22501, 22517, 22533, 22564, 22586, 22608, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 22633, 22658, {22683, 22702, 22724, 22749, 22765, 22787, 22806}, {22816, 22823, 22830, 22837, 22844, 22851, 22858}, {22816, 22823, 22830, 22837, 22844, 22851, 22858}, {22862, 22878, 22903, 22922, 22941, 22948, 22961, 22974, 22993, 23024, 23049, 23071, 0}, {22862, 22878, 22903, 22922, 22941, 22948, 22961, 23096, 22993, 23024, 23049, 23071, 0}, {23115, 23123, 23137, 23151, 22941, 22948, 22961, 23162, 23170, 23184, 23195, 23203, 0}, {23115, 23123, 23137, 23151, 22941, 22948, 22961, 23162, 23170, 23184, 23195, 23203, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3613, 1929, 1932, {23214, 23236, 23258, 23283, 23305, 23330, 23358}, {23380, 23390, 23400, 23413, 23423, 23436, 23452}, {23462, 23466, 23473, 23477, 23484, 23491, 23498}, {23502, 23518, 23543, 23562, 23584, 23591, 23604, 23617, 23636, 23667, 23692, 23711, 0}, {23502, 23518, 23543, 23562, 23584, 23591, 23736, 23617, 23636, 23667, 23692, 23711, 0}, {23749, 23756, 23543, 23772, 23584, 23591, 23736, 23617, 23788, 23810, 23826, 23836, 0}, {23749, 23756, 23543, 23772, 23584, 23591, 23736, 23617, 23788, 23810, 23826, 23836, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {3613, 1929, 1932, {23852, 23871, 23890, 23912, 23931, 23953, 23978}, {23997, 24007, 24017, 24030, 24040, 24053, 24069}, {24079, 24083, 24090, 24097, 24104, 24111, 24118}, {24122, 24138, 24163, 24182, 24204, 24211, 24224, 24237, 24256, 24284, 24309, 24331, 0}, {24122, 24138, 24163, 24182, 24204, 24211, 24224, 24237, 24256, 24284, 24309, 24331, 0}, {24356, 24364, 24384, 24391, 24204, 24408, 24415, 24423, 24431, 24454, 24471, 24485, 0}, {24356, 24364, 24384, 24391, 24204, 24408, 24415, 24423, 24431, 24454, 24471, 24485, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {20057, 1929, 1932, {24502, 24530, 24564, 24592, 24620, 24651, 24688}, {24716, 24729, 24748, 24764, 24777, 24796, 24815}, {24825, 24832, 24839, 24846, 24853, 24866, 24873}, {24877, 24896, 24924, 24946, 24965, 24978, 24988, 25001, 25026, 25057, 25082, 25098, 0}, {24877, 24896, 24924, 24946, 24965, 24978, 24988, 25001, 25026, 25057, 25082, 25098, 0}, {25117, 25127, 25146, 25156, 24965, 24978, 24988, 25172, 25179, 25204, 25220, 25230, 0}, {25117, 25127, 25146, 25156, 24965, 24978, 24988, 25172, 25179, 25204, 25220, 25230, 0}, 0, 0, 2566, 187, {1139,2293,1167,4762,0,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20998,21007,0,0,0,0,0,0,0,0},{4302,2337,21015,21027,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 25243, 25271, {25293, 25312, 25331, 25356, 25375, 25409, 25434}, {25453, 20597, 20607, 20623, 25463, 25488, 20674}, {0, 0, 0, 0, 0, 0, 0}, {25504, 25529, 25560, 25576, 20821, 20828, 20838, 25595, 25611, 25642, 25664, 25686, 0}, {25504, 25529, 25560, 25576, 20821, 20828, 20838, 25595, 25611, 25642, 25664, 25686, 0}, {25711, 25724, 25560, 25576, 20821, 20828, 20838, 25743, 25750, 25766, 25782, 25792, 0}, {25711, 25724, 25560, 25576, 20821, 20828, 20838, 25743, 25750, 25766, 25782, 25792, 0}, 0, 0, 2566, 187, {1128,0,0,0,0,0,0,0,0,0,0,0,0,0},{25805,0,0,0,0,0,0,0,0,0},{1858,1866,0,0,0,0,0,0,0,0,0,0},{1875,1886,0,0,0,0,0,0,0},{25824,25832,0,0,0,0,0,0}},
-       {1, 1929, 1932, {17608, 17627, 25842, 17668, 17687, 17709, 17734}, {17753, 17763, 25864, 17786, 17796, 17809, 17825}, {17835, 17839, 17846, 17853, 17860, 17867, 17874}, {25877, 25902, 17913, 25933, 25952, 17955, 25959, 25972, 25988, 26013, 26035, 26063, 0}, {25877, 25902, 17913, 25933, 25952, 17955, 25959, 25972, 25988, 26013, 26035, 26063, 0}, {26085, 26098, 17913, 26117, 25952, 17955, 25959, 26133, 26140, 26159, 26175, 26197, 0}, {26085, 26098, 17913, 26117, 25952, 17955, 25959, 26133, 26140, 26159, 26175, 26197, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {26945, 26969, 26991, {27016, 27044, 27072, 27109, 27140, 27174, 27199}, {27233, 27249, 27265, 27290, 27309, 27331, 27344}, {27366, 27373, 27380, 27387, 27394, 27401, 27405}, {27415, 27449, 27486, 27520, 27554, 27585, 27622, 27659, 27699, 27733, 27767, 27816, 0}, {27415, 27449, 27486, 27520, 27554, 27585, 27622, 27659, 27699, 27733, 27767, 27816, 0}, {27865, 27878, 27891, 27904, 27917, 27930, 27943, 27956, 27969, 27982, 27998, 28014, 0}, {27865, 27878, 27891, 27904, 27917, 27930, 27943, 27956, 27969, 27982, 27998, 28014, 0}, 0, 0, 185, 187, {1654,1663,1672,1703,1692,1681,1721,1714,1728,0,0,0,0,0},{28030,28073,28121,28153,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{28190,1914,0,0,0,0,0,0}},
-       {289, 1929, 1932, {28223, 28232, 28242, 28254, 28267, 28276, 28288}, {28300, 28304, 28309, 28313, 28317, 28321, 28325}, {2023, 28329, 2428, 2428, 15392, 6293, 2023}, {28332, 28339, 28348, 28355, 2702, 28362, 28370, 28381, 28386, 28391, 28398, 28407, 0}, {28332, 28339, 28348, 28355, 2702, 28362, 28370, 28381, 28386, 28391, 28398, 28407, 0}, {28415, 28419, 28309, 28423, 2702, 28427, 28431, 28381, 28386, 28435, 28439, 28444, 0}, {28415, 28419, 28309, 28423, 2702, 28427, 28431, 28381, 28386, 28435, 28439, 28444, 0}, 2, 1, 185, 187, {189,198,5002,8579,0,0,0,0,0,0,0,0,0,0},{1242,1207,0,0,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 28449, 28465, {28481, 28503, 28516, 28535, 28545, 28576, 28592}, {28481, 28503, 28516, 28535, 28545, 28576, 28592}, {6605, 6607, 6609, 6611, 6613, 6615, 6617}, {28605, 28618, 28637, 28650, 28663, 28676, 28695, 28714, 28727, 28743, 28756, 28781, 0}, {28605, 28618, 28637, 28650, 28663, 28676, 28695, 28714, 28727, 28743, 28756, 28781, 0}, {28605, 28618, 28637, 28650, 28663, 28676, 28695, 28714, 28727, 28743, 28756, 28781, 0}, {28605, 28618, 28637, 28650, 28663, 28676, 28695, 28714, 28727, 28743, 28756, 28781, 0}, 0, 0, 185, 187, {189,1692,0,0,0,0,0,0,0,0,0,0,0,0},{1242,10205,0,0,0,0,0,0,0,0},{843,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{28794,0,0,0,0,0,0,0}},
-       {289, 28829, 28854, {28879, 28904, 28923, 28951, 28970, 28995, 29014}, {28879, 28904, 28923, 28951, 28970, 28995, 29014}, {29036, 29040, 29044, 29048, 29058, 29062, 29072}, {29076, 29095, 29111, 29124, 29137, 29159, 29178, 29200, 29216, 29232, 29245, 29261, 0}, {29076, 29095, 29111, 29124, 29137, 29159, 29178, 29200, 29216, 29232, 29245, 29261, 0}, {29277, 29286, 29295, 29304, 29313, 29322, 29334, 29343, 29352, 29361, 29370, 29379, 0}, {29277, 29286, 29295, 29304, 29313, 29322, 29334, 29343, 29352, 29361, 29370, 29379, 0}, 0, 0, 185, 187, {198,29388,6480,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3883, 7281, 7286, {3895, 29398, 3909, 29403, 29413, 29419, 3942}, {29426, 8413, 3761, 29430, 29435, 29439, 29443}, {2673, 2436, 2428, 2428, 29448, 3989, 2023}, {29450, 29458, 4005, 4011, 29467, 29472, 29478, 4034, 29484, 29493, 29501, 29510, 0}, {29519, 29527, 4094, 1012, 8083, 29536, 29542, 4117, 8100, 8109, 8117, 29548, 0}, {29557, 2763, 3761, 29561, 2702, 29565, 29570, 20182, 18406, 29574, 2796, 3769, 0}, {29557, 2763, 3761, 29561, 2702, 29565, 29570, 20182, 18406, 29574, 2796, 3769, 0}, 2, 1, 185, 187, {198,189,1120,2286,1139,1167,1692,0,0,0,0,0,0,0},{29578,4239,4266,1242,0,0,0,0,0,0},{843,251,242,29607,0,0,0,0,0,0,0,0},{848,269,257,29619,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {1, 29639, 29651, {29663, 17627, 29691, 17668, 17687, 17709, 17734}, {17753, 17763, 25864, 17786, 17796, 17809, 17825}, {0, 0, 0, 0, 0, 0, 0}, {25877, 25902, 17913, 25933, 25952, 17955, 25959, 29710, 29726, 29754, 26035, 26063, 0}, {25877, 25902, 17913, 25933, 25952, 17955, 25959, 29710, 29726, 29754, 26035, 26063, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {20057, 29776, 29788, {29797, 29813, 29829, 29857, 29873, 29916, 29941}, {29797, 29813, 29969, 29857, 29979, 30001, 30014}, {30024, 30028, 30032, 30036, 30040, 30053, 30060}, {30067, 30086, 30111, 30130, 30155, 30168, 30181, 30194, 30216, 30250, 30275, 30303, 0}, {30067, 30086, 30111, 30130, 30155, 30168, 30181, 30194, 30216, 30250, 30275, 30303, 0}, {30331, 30338, 30348, 30130, 30155, 30168, 30181, 30361, 30371, 30384, 30394, 30407, 0}, {30331, 30338, 30348, 30130, 30155, 30168, 30181, 30361, 30371, 30384, 30394, 30407, 0}, 0, 1, 2566, 187, {1692,1681,1735,198,189,0,0,0,0,0,0,0,0,0},{30420,0,0,0,0,0,0,0,0,0},{1858,1866,843,251,0,0,0,0,0,0,0,0},{1875,1886,848,269,0,0,0,0,0},{30468,0,0,0,0,0,0,0}},
-       {30478, 30494, 30504, {30517, 30527, 30534, 30547, 30557, 30567, 30577}, {30517, 30527, 30587, 30547, 30557, 30567, 30577}, {30597, 30601, 30605, 30609, 30613, 30617, 30621}, {30625, 30641, 30657, 30667, 30680, 30687, 30694, 30704, 30717, 30736, 30752, 30768, 0}, {30625, 30641, 30657, 30667, 30680, 30687, 30694, 30704, 30717, 30784, 30752, 30768, 0}, {30803, 30813, 30657, 30823, 30680, 30687, 30694, 30833, 30843, 30853, 30863, 30873, 0}, {30803, 30813, 30657, 30823, 30680, 30687, 30694, 30833, 30843, 30853, 30863, 30873, 0}, 0, 0, 185, 187, {2277,1692,0,0,0,0,0,0,0,0,0,0,0,0},{30883,0,0,0,0,0,0,0,0,0},{3594,0,0,0,0,0,0,0,0,0,0,0},{3602,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 31145, 31186, {31227, 31246, 31265, 31290, 31309, 31331, 31356}, {31375, 17763, 31385, 17786, 31401, 17809, 17825}, {31414, 17839, 31418, 17853, 31422, 17867, 17874}, {17878, 31429, 17913, 31457, 25952, 31476, 17965, 31486, 31502, 31533, 31555, 31580, 0}, {17878, 31429, 17913, 31457, 25952, 31476, 17965, 31486, 31502, 31533, 31555, 31580, 0}, {17878, 31429, 17913, 31457, 25952, 31476, 17965, 31486, 31502, 31533, 31555, 31580, 0}, {17878, 31429, 17913, 31457, 25952, 31476, 17965, 31486, 31502, 31533, 31555, 31580, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{25832,0,0,0,0,0,0,0}},
-       {289, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {31605, 31612, 31621, 31636, 31647, 31656, 31663, 31670, 31677, 31688, 31701, 31714, 0}, {31605, 31612, 31621, 31636, 31647, 31656, 31663, 31670, 31677, 31688, 31701, 31714, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 6, 185, 187, {1654,1692,0,0,0,0,0,0,0,0,0,0,0,0},{31719,31740,0,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {31755, 1929, 1932, {31761, 31768, 31774, 31781, 31792, 31800, 31809}, {31816, 8413, 3761, 31820, 31824, 31828, 10832}, {2436, 2436, 2428, 2428, 5694, 16426, 2023}, {3991, 31832, 31840, 4011, 4017, 31846, 31852, 4034, 31858, 31868, 31876, 31886, 0}, {3991, 31832, 31840, 4011, 4017, 31846, 31852, 4034, 31858, 31868, 31876, 31886, 0}, {31896, 31900, 3761, 29561, 3730, 31904, 31908, 20182, 18406, 2792, 31912, 16383, 0}, {31896, 31900, 3761, 29561, 3730, 31904, 31908, 20182, 18406, 2792, 31912, 16383, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 0, 0, {31916, 31923, 31931, 31938, 31945, 31953, 31961}, {31968, 31971, 31974, 31977, 31980, 31983, 31986}, {2436, 2436, 2430, 2436, 12842, 3987, 12842}, {31989, 31997, 32007, 32013, 32021, 32026, 32031, 32036, 32043, 20167, 32051, 32059, 0}, {31989, 31997, 32007, 32013, 32021, 32026, 32031, 32036, 32043, 20167, 32051, 32059, 0}, {2759, 32067, 3761, 32071, 3730, 31114, 31118, 32075, 3701, 2792, 32079, 16383, 0}, {2759, 32067, 3761, 32071, 3730, 31114, 31118, 32075, 3701, 2792, 32079, 16383, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 32083, 32094, {32104, 32122, 32137, 32159, 32172, 32186, 32203}, {32227, 32235, 32240, 32159, 32172, 32252, 32259}, {0, 0, 0, 0, 0, 0, 0}, {32273, 32295, 32311, 32331, 32345, 32362, 32377, 32394, 32408, 32421, 32440, 32454, 0}, {32273, 32295, 32311, 32331, 32345, 32362, 32377, 32394, 32408, 32421, 32440, 32454, 0}, {32473, 32488, 32497, 32510, 32517, 32527, 32535, 32545, 32552, 32558, 32570, 32577, 0}, {32473, 32488, 32497, 32510, 32517, 32527, 32535, 32545, 32552, 32558, 32570, 32577, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{222,20186,20206,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{25832,0,0,0,0,0,0,0}},
-       {3613, 0, 0, {32589, 32597, 15958, 15967, 15976, 32608, 32618}, {16414, 16008, 16012, 16016, 16020, 16277, 32627}, {0, 0, 0, 0, 0, 0, 0}, {32631, 32640, 32650, 32658, 10844, 3734, 32666, 32672, 32681, 32690, 32699, 32708, 0}, {32631, 32640, 32650, 32658, 10844, 3734, 32666, 32672, 32681, 32690, 32699, 32708, 0}, {2759, 2763, 16027, 32717, 10844, 2776, 2780, 20182, 18406, 2792, 32721, 16383, 0}, {2759, 2763, 16027, 32717, 10844, 2776, 2780, 20182, 18406, 2792, 32721, 16383, 0}, 0, 0, 185, 187, {189,1681,1735,1692,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {32725, 32738, 32743, {32748, 32755, 32770, 32784, 32800, 32815, 32831}, {6289, 32846, 2530, 32850, 32854, 32858, 32862}, {2023, 12842, 2428, 2018, 2023, 2430, 12842}, {7370, 7378, 32866, 32873, 32880, 2469, 2474, 32885, 32895, 32906, 32915, 32925, 0}, {7370, 7378, 32866, 32873, 32880, 2469, 2474, 32885, 32895, 32906, 32915, 32925, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 0, 0, 2566, 187, {1128,1139,1692,2568,0,0,0,0,0,0,0,0,0,0},{32935,2300,4769,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 32954, 32959, {32964, 32980, 32988, 32996, 33005, 33017, 33027}, {33037, 33043, 33049, 33053, 33057, 33065, 3701}, {0, 0, 0, 0, 0, 0, 0}, {33072, 33085, 33099, 33108, 33114, 33118, 33123, 33131, 16338, 33144, 16355, 16363, 0}, {33072, 33085, 33099, 33108, 33114, 33118, 33123, 33131, 16338, 33144, 16355, 16363, 0}, {33153, 2763, 33157, 16371, 33114, 33161, 2780, 33165, 2788, 33173, 2796, 16383, 0}, {33153, 2763, 33157, 16371, 33114, 33161, 2780, 33165, 2788, 33173, 2796, 16383, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{2313,0,0,0,0,0,0,0,0,0,0,0},{2326,0,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {33179, 33206, 33213, {33220, 33230, 33240, 33250, 33260, 33270, 33280}, {33290, 33297, 33304, 33311, 33318, 33325, 33332}, {33339, 33343, 33347, 33351, 33355, 33359, 33363}, {33367, 33374, 33381, 33388, 33395, 33402, 33409, 33416, 33423, 33430, 33437, 33447, 0}, {33367, 33374, 33381, 33388, 33395, 33402, 33409, 33416, 33423, 33430, 33437, 33447, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 185, 187, {1654,1663,1672,1703,1692,1681,0,0,0,0,0,0,0,0},{33457,33481,33511,33541,33558,0,0,0,0,0},{1858,843,251,0,0,0,0,0,0,0,0,0},{1875,848,269,0,0,0,0,0,0},{33581,1914,0,0,0,0,0,0}},
-       {289, 0, 0, {28300, 8413, 33598, 33605, 33615, 33620, 33627}, {33634, 6273, 33638, 4850, 33643, 33648, 33653}, {4421, 33658, 33661, 33664, 33667, 33670, 33673}, {33676, 33683, 33598, 33694, 33700, 33704, 33713, 33720, 33725, 33734, 33739, 33742, 0}, {33676, 33683, 33598, 33694, 33700, 33704, 33713, 33720, 33725, 33734, 33739, 33742, 0}, {33748, 33752, 33759, 28423, 33700, 33764, 33769, 33720, 33774, 33734, 33739, 33779, 0}, {33748, 33752, 33759, 28423, 33700, 33764, 33769, 33720, 33774, 33734, 33739, 33779, 0}, 2, 1, 185, 187, {198,189,1167,1139,1692,0,0,0,0,0,0,0,0,0},{4985,5002,1242,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {33936, 33954, 33959, {33964, 33989, 34018, 34043, 34056, 34071, 34088}, {34103, 34108, 34113, 34118, 34123, 34128, 8800}, {19442, 19442, 34133, 8811, 8814, 19442, 8811}, {34136, 34155, 34170, 34192, 34212, 34228, 34244, 34258, 34284, 34308, 34325, 34342, 0}, {34136, 34155, 34170, 34192, 34212, 34228, 34244, 34258, 34284, 34308, 34325, 34342, 0}, {34359, 34368, 34377, 34391, 34405, 34417, 34429, 34439, 34455, 34469, 34476, 34483, 0}, {34359, 34368, 34377, 34391, 34405, 34417, 34429, 34439, 34455, 34469, 34476, 34483, 0}, 0, 1, 691, 187, {1156,4753,1692,34490,34500,0,0,0,0,0,0,0,0,0},{34513,34548,34577,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{34612,0,0,0,0,0,0,0}},
-       {20057, 0, 0, {34628, 34640, 34651, 34663, 34675, 34685, 34697}, {34712, 34717, 34722, 34727, 34732, 34737, 34742}, {0, 0, 0, 0, 0, 0, 0}, {34747, 34756, 34768, 34776, 34781, 34791, 34798, 34807, 34814, 34820, 34829, 34840, 0}, {34747, 34756, 34768, 34776, 34781, 34791, 34798, 34807, 34814, 34820, 34829, 34840, 0}, {34848, 34853, 34858, 34863, 34868, 34873, 34878, 34732, 34883, 34888, 34893, 34898, 0}, {34848, 34853, 34858, 34863, 34868, 34873, 34878, 34732, 34883, 34888, 34893, 34898, 0}, 0, 0, 185, 187, {9796,2286,0,0,0,0,0,0,0,0,0,0,0,0},{34903,1207,0,0,0,0,0,0,0,0},{843,0,0,0,0,0,0,0,0,0,0,0},{848,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 34923, 34925, {34927, 34940, 34948, 34957, 34967, 34977, 34986}, {34998, 35002, 35006, 35010, 35014, 35018, 35022}, {2673, 2436, 2428, 7736, 12842, 5694, 2023}, {35026, 35040, 35051, 35060, 35071, 35083, 35097, 35109, 35122, 35135, 35147, 35160, 0}, {35026, 35040, 35051, 35060, 35071, 35083, 35097, 35109, 35122, 35135, 35147, 35160, 0}, {35174, 35179, 35185, 35191, 35196, 35202, 35208, 35213, 35219, 35224, 19163, 35230, 0}, {35174, 35179, 35185, 35191, 35196, 35202, 35208, 35213, 35219, 35224, 19163, 35230, 0}, 2, 1, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {10033, 10046, 10049, {10052, 10060, 10068, 2368, 2375, 2383, 10075}, {10083, 10088, 10093, 2411, 2415, 2419, 10097}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {7370, 7378, 4887, 2459, 2465, 2469, 2474, 10102, 2486, 2496, 2504, 2513, 0}, {7370, 7378, 4887, 2459, 2465, 2469, 2474, 10102, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 2, 1, 2566, 187, {1692,5888,0,0,0,0,0,0,0,0,0,0,0,0},{10110,10128,0,0,0,0,0,0,0,0},{251,843,7529,0,0,0,0,0,0,0,0,0},{269,848,7585,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 185, 187, {2277,2286,189,198,8579,10151,1692,0,0,0,0,0,0,0},{1242,10163,10179,0,0,0,0,0,0,0},{843,251,3594,242,0,0,0,0,0,0,0,0},{848,269,3602,257,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 10221, 10226, {10230, 10236, 10246, 10252, 10263, 10273, 10278}, {10288, 10292, 10296, 10300, 10305, 10309, 10313}, {2018, 2018, 2023, 10317, 2018, 7736, 7736}, {10320, 10325, 10332, 10337, 10343, 10350, 10358, 10365, 10374, 10381, 10386, 10393, 0}, {10320, 10325, 10332, 10337, 10343, 10350, 10358, 10365, 10374, 10381, 10386, 10393, 0}, {10401, 10405, 3761, 10410, 3730, 10414, 10418, 10422, 10427, 10431, 10435, 10439, 0}, {10401, 10405, 3761, 10410, 3730, 10414, 10418, 10422, 10427, 10431, 10435, 10439, 0}, 0, 1, 691, 187, {4753,4762,1156,1167,0,0,0,0,0,0,0,0,0,0},{10443,1242,10460,5505,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 10478, 10496, {10514, 10525, 10538, 10547, 10554, 10567, 10576}, {10514, 10525, 10538, 10547, 10554, 10567, 10576}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {10585, 10596, 10607, 10616, 10627, 10634, 10641, 10654, 10663, 10674, 10687, 10698, 0}, {10585, 10596, 10607, 10616, 10627, 10634, 10641, 10654, 10663, 10674, 10687, 10698, 0}, {10585, 10596, 10607, 10616, 10627, 10634, 10641, 10654, 10663, 10674, 10687, 10698, 0}, {10585, 10596, 10607, 10616, 10627, 10634, 10641, 10654, 10663, 10674, 10687, 10698, 0}, 0, 0, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 1929, 1932, {10723, 10730, 10736, 10743, 10748, 10754, 10760}, {10766, 10770, 10774, 10778, 10782, 10786, 10790}, {2428, 2023, 2023, 10794, 4442, 3987, 2023}, {10796, 10804, 10813, 2696, 10819, 2706, 2711, 10823, 2723, 2733, 2741, 10831, 0}, {10796, 10804, 10813, 2696, 10819, 2706, 2711, 10823, 2723, 2733, 2741, 10831, 0}, {2759, 2763, 3761, 2772, 10819, 2776, 2780, 10840, 2788, 2792, 2796, 10844, 0}, {2759, 2763, 3761, 2772, 10819, 2776, 2780, 10840, 2788, 2792, 2796, 10844, 0}, 0, 0, 185, 187, {198,189,1128,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 10848, 10853, {10858, 10871, 10890, 10907, 10920, 10933, 10950}, {10963, 8775, 8780, 8785, 8790, 8795, 8800}, {10968, 8808, 8805, 8811, 8814, 8808, 8811}, {10971, 10984, 10995, 11012, 11027, 11042, 11057, 11070, 11085, 11102, 11117, 11134, 0}, {11149, 11160, 11173, 11188, 11201, 11214, 11227, 11238, 11251, 11266, 11279, 11298, 0}, {11311, 11318, 11325, 11332, 11339, 11346, 11353, 11360, 11367, 11374, 11381, 11388, 0}, {11311, 11318, 11325, 11332, 11339, 11346, 11353, 11360, 11367, 11374, 11381, 11388, 0}, 0, 1, 691, 187, {1156,1167,1692,0,0,0,0,0,0,0,0,0,0,0},{11395,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{11413,0,0,0,0,0,0,0}},
+       {289, 11429, 11442, {11455, 11470, 11491, 11506, 11519, 11532, 10950}, {421, 426, 11547, 436, 11552, 446, 451}, {456, 459, 11557, 465, 468, 459, 465}, {11560, 11577, 11586, 11601, 521, 11618, 11633, 11646, 11661, 11678, 11699, 11716, 0}, {11731, 11748, 11761, 11778, 9017, 11797, 11812, 11825, 11838, 11853, 11876, 11895, 0}, {11908, 11915, 11922, 11929, 521, 11936, 11943, 11950, 11957, 11964, 11971, 11978, 0}, {11908, 11915, 11922, 11929, 521, 11936, 11943, 11950, 11957, 11964, 11971, 11978, 0}, 0, 0, 691, 187, {1167,0,0,0,0,0,0,0,0,0,0,0,0,0},{1242,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1921, 11985, 11990, {11995, 12003, 12014, 12020, 12026, 12035, 1985}, {9246, 9250, 2415, 12041, 9262, 9267, 12045}, {9275, 9277, 12049, 9281, 9283, 9277, 9281}, {2438, 2445, 9672, 2459, 2465, 12051, 12057, 12063, 2486, 2496, 2504, 2513, 0}, {2438, 2445, 9672, 2459, 2465, 12051, 12057, 12063, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,12074,1167,9806,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {12084, 12093, 12098, {12103, 12114, 12125, 12136, 12147, 12158, 12164}, {2018, 9924, 2430, 4442, 2016, 10794, 2436}, {2018, 9924, 2430, 4442, 2016, 10794, 2436}, {12173, 12181, 12190, 12197, 4898, 12204, 12210, 2479, 2486, 12216, 2504, 12225, 0}, {12173, 12181, 12190, 12197, 4898, 12204, 12210, 2479, 2486, 12216, 2504, 12225, 0}, {12235, 12240, 12190, 2534, 4898, 12204, 12210, 2546, 12246, 2554, 2558, 12251, 0}, {12235, 12240, 12190, 2534, 4898, 12204, 12210, 2546, 12246, 2554, 2558, 12251, 0}, 2, 1, 691, 187, {7519,1156,1167,1692,0,0,0,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1921, 12256, 12273, {12287, 12298, 12308, 12317, 12328, 12340, 12351}, {12361, 12364, 12367, 12370, 12373, 12376, 12379}, {2023, 2018, 2432, 2430, 7736, 2018, 2023}, {12382, 12392, 12403, 12409, 12418, 12424, 12432, 12440, 12448, 12459, 12468, 12478, 0}, {12488, 12498, 2453, 12509, 12518, 12524, 12532, 12540, 12548, 12559, 12568, 12578, 0}, {12588, 12594, 12403, 12600, 12418, 12605, 12611, 12617, 4190, 12622, 4201, 12627, 0}, {12588, 12594, 12403, 12600, 12418, 12605, 12611, 12617, 4190, 12622, 4201, 12627, 0}, 0, 1, 691, 187, {9517,9539,12632,0,0,0,0,0,0,0,0,0,0,0},{12644,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{12671,0,0,0,0,0,0,0}},
+       {12689, 12701, 11990, {12707, 12719, 12731, 12743, 12757, 12772, 12785}, {12799, 12802, 12805, 12808, 12811, 12814, 9660}, {2023, 2018, 12817, 2430, 4442, 2018, 9669}, {12819, 12826, 12834, 12840, 12849, 12858, 12868, 12874, 12885, 12895, 12902, 12912, 0}, {12819, 12826, 12834, 12840, 12849, 12858, 12868, 12874, 12885, 12895, 12902, 12912, 0}, {12920, 12926, 12931, 12936, 12941, 12946, 12953, 12959, 12965, 12971, 12977, 12984, 0}, {12920, 12926, 12931, 12936, 12941, 12946, 12953, 12959, 12965, 12971, 12977, 12984, 0}, 2, 1, 2566, 187, {1692,2568,0,0,0,0,0,0,0,0,0,0,0,0},{12991,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{13013,0,0,0,0,0,0,0}},
+       {1, 13028, 13040, {13052, 13067, 13082, 13097, 13114, 13133, 13144}, {13155, 13162, 13169, 13176, 13183, 13190, 13197}, {0, 0, 0, 0, 0, 0, 0}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, 0, 1, 691, 187, {1156,1167,4762,1128,189,0,0,0,0,0,0,0,0,0},{13368,13386,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 13405, 13425, {13442, 13455, 13468, 13484, 13501, 13516, 13525}, {13442, 13455, 13468, 13484, 13501, 13516, 13525}, {13534, 13537, 13540, 13543, 13546, 13549, 13552}, {13555, 13568, 13579, 13588, 13599, 13604, 13613, 13624, 13631, 13646, 13657, 13670, 0}, {13683, 13698, 13579, 13588, 13711, 13604, 13718, 13624, 13631, 13646, 13657, 13670, 0}, {13555, 13568, 13579, 13588, 13599, 13604, 13613, 13624, 13631, 13646, 13657, 13670, 0}, {13555, 13568, 13579, 13588, 13599, 13604, 13613, 13624, 13631, 13646, 13657, 13670, 0}, 0, 6, 185, 187, {198,189,0,0,0,0,0,0,0,0,0,0,0,0},{13731,5505,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 13750, 13753, {13756, 13769, 13779, 13788, 13798, 13809, 13820}, {13832, 13835, 13840, 13845, 13850, 13855, 13860}, {13832, 13865, 13868, 13871, 13874, 13877, 13880}, {13883, 13892, 13901, 13910, 13919, 13928, 13937, 13946, 13955, 13964, 13974, 13984, 0}, {13994, 14003, 14012, 14021, 14030, 14039, 14048, 14057, 14066, 14075, 14085, 14095, 0}, {14105, 14111, 14117, 14123, 14129, 14135, 14141, 14147, 14153, 14159, 14166, 14173, 0}, {14105, 14111, 14117, 14123, 14129, 14135, 14141, 14147, 14153, 14159, 14166, 14173, 0}, 0, 1, 185, 187, {198,189,1139,1128,1692,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 14180, 14204, {14228, 14241, 14262, 14281, 14302, 14321, 14334}, {14345, 14352, 14359, 14366, 14373, 14380, 14387}, {14394, 14397, 14397, 14400, 14403, 14406, 14411}, {14414, 14429, 14444, 14453, 14464, 14475, 14488, 14501, 14516, 14535, 14554, 14571, 0}, {14590, 14607, 14624, 14635, 14648, 14661, 14676, 14691, 14708, 14729, 14750, 14769, 0}, {14790, 14797, 14804, 14811, 14818, 14825, 14832, 14839, 14846, 14853, 14860, 14867, 0}, {14790, 14797, 14804, 14811, 14818, 14825, 14832, 14839, 14846, 14853, 14860, 14867, 0}, 0, 1, 691, 187, {1156,1167,9796,198,14874,3582,1692,0,0,0,0,0,0,0},{3870,1207,13731,5505,14885,14896,14908,14925,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {14943, 14949, 14963, 14986, 15000, 15016, 15023}, {15032, 15035, 15040, 15046, 15050, 7736, 15055}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {15059, 15066, 10332, 15073, 3730, 15079, 15085, 15091, 15098, 15107, 15115, 15122, 0}, {15129, 15136, 15143, 15148, 15154, 15158, 15163, 15168, 15175, 15184, 15192, 15199, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, 0, 1, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{15234,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {15256, 1929, 1932, {15271, 15279, 15290, 15300, 15311, 15320, 15329}, {15339, 15343, 15347, 15351, 15355, 15359, 15363}, {15367, 12817, 12817, 12817, 2432, 2432, 2436}, {15369, 15379, 15387, 15395, 15403, 15411, 15418, 15426, 15434, 15441, 15447, 15454, 0}, {15462, 15473, 15482, 15491, 15500, 15509, 15517, 15526, 15535, 15543, 15550, 15558, 0}, {15567, 15572, 4845, 15577, 15582, 15587, 15592, 15597, 15602, 15607, 15612, 15617, 0}, {15567, 15572, 4845, 15577, 15582, 15587, 15592, 15597, 15602, 15607, 15612, 15617, 0}, 2, 1, 185, 187, {1681,1692,0,0,0,0,0,0,0,0,0,0,0,0},{15622,0,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{15655,0,0,0,0,0,0,0}},
+       {289, 15672, 15693, {15710, 331, 352, 8714, 15723, 15740, 15751}, {15764, 15772, 15780, 15786, 15794, 15802, 15810}, {456, 459, 462, 465, 468, 459, 465}, {15818, 484, 501, 510, 15833, 15840, 15849, 542, 555, 574, 591, 606, 0}, {15818, 484, 501, 510, 15833, 15840, 15849, 542, 555, 574, 591, 606, 0}, {15858, 15866, 15874, 639, 15833, 15882, 15890, 647, 655, 665, 673, 683, 0}, {15858, 15866, 15874, 639, 15833, 15882, 15890, 647, 655, 665, 673, 683, 0}, 0, 1, 691, 187, {1156,1167,15898,0,0,0,0,0,0,0,0,0,0,0},{13731,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 0, 0, {15915, 15922, 15933, 15942, 15951, 15958, 15969}, {15979, 15983, 15987, 15991, 15995, 15998, 16002}, {0, 0, 0, 0, 0, 0, 0}, {16006, 16016, 16025, 16033, 16042, 16055, 16067, 16074, 16081, 16088, 16098, 16110, 0}, {16006, 16016, 16025, 16033, 16042, 16055, 16067, 16074, 16081, 16088, 16098, 16110, 0}, {16123, 16127, 16131, 16135, 16139, 16143, 16147, 16151, 16155, 16159, 16163, 16167, 0}, {16123, 16127, 16131, 16135, 16139, 16143, 16147, 16151, 16155, 16159, 16163, 16167, 0}, 0, 0, 185, 187, {189,1681,1735,1692,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 0, 0, {16171, 16176, 16182, 16192, 16204, 16212, 16223}, {16232, 16236, 16240, 16244, 16248, 16252, 16256}, {0, 0, 0, 0, 0, 0, 0}, {16260, 16270, 16280, 16287, 16294, 2706, 16299, 16306, 16313, 16322, 16330, 16338, 0}, {16260, 16270, 16280, 16287, 16294, 2706, 16299, 16306, 16313, 16322, 16330, 16338, 0}, {2759, 2763, 16002, 16346, 16350, 2776, 2780, 16354, 2788, 2792, 2796, 16358, 0}, {2759, 2763, 16002, 16346, 16350, 2776, 2780, 16354, 2788, 2792, 2796, 16358, 0}, 0, 0, 185, 187, {1681,1735,1692,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {16362, 16368, 16379, 16192, 16204, 16212, 16223}, {16389, 16393, 16397, 16244, 16248, 16252, 16256}, {2023, 2428, 16401, 2430, 2023, 5694, 2428}, {16403, 16413, 16424, 16431, 16440, 16446, 16452, 16460, 16468, 16479, 16489, 16498, 0}, {16507, 16270, 16516, 16522, 16294, 2706, 16299, 16306, 16529, 16322, 16330, 16338, 0}, {2759, 2763, 16539, 2772, 16350, 2776, 2780, 16354, 2788, 2792, 2796, 16358, 0}, {2759, 2763, 16539, 2772, 16350, 2776, 2780, 16354, 2788, 2792, 2796, 16358, 0}, 0, 0, 2566, 187, {1128,1139,189,1681,1735,1692,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 16543, 16547, {16551, 16558, 16566, 16574, 16583, 16593, 16600}, {2652, 16609, 2658, 16612, 2664, 16615, 2670}, {2023, 2428, 2673, 3705, 2673, 3989, 2023}, {16618, 16627, 16637, 2696, 10819, 16643, 16649, 16655, 2723, 2733, 2741, 10831, 0}, {16618, 16627, 16637, 2696, 10819, 16643, 16649, 16655, 2723, 2733, 2741, 10831, 0}, {2759, 2763, 3761, 2772, 10819, 2776, 2780, 2784, 2788, 2792, 2796, 10844, 0}, {2759, 2763, 3761, 2772, 10819, 2776, 2780, 2784, 2788, 2792, 2796, 10844, 0}, 0, 0, 185, 187, {1681,1735,1692,16664,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {16676, 16692, 16717, 16745, 16773, 16801, 16829}, {16848, 16858, 16868, 16878, 16888, 16898, 16908}, {16918, 16922, 16926, 16922, 16930, 16934, 16938}, {16942, 16964, 16992, 17008, 17027, 17043, 17062, 17081, 17103, 17134, 17162, 17187, 0}, {16942, 16964, 16992, 17008, 17027, 17043, 17062, 17081, 17103, 17134, 17162, 17187, 0}, {17215, 17225, 17235, 17245, 17255, 17265, 17275, 17285, 17295, 17305, 17315, 17325, 0}, {17215, 17225, 17235, 17245, 17255, 17265, 17275, 17285, 17295, 17305, 17315, 17325, 0}, 0, 1, 691, 187, {1156,1167,7419,1176,4762,4753,1692,0,0,0,0,0,0,0},{17335,17369,17402,3870,17436,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 17448, 17453, {5932, 17458, 17469, 17479, 17489, 17499, 17513}, {17525, 17529, 17534, 17539, 17543, 17548, 17553}, {2023, 2428, 2430, 2428, 5694, 2434, 2436}, {2438, 2445, 4887, 6077, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2438, 2445, 4887, 6077, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, 2, 1, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{2300,0,0,0,0,0,0,0,0,0},{251,4288,0,0,0,0,0,0,0,0,0,0},{269,4302,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 17557, 17573, {17583, 17602, 17621, 17643, 17662, 17684, 17709}, {17728, 17738, 17748, 17761, 17771, 17784, 17800}, {17810, 17814, 17821, 17828, 17835, 17842, 17849}, {17853, 17869, 17888, 17904, 17923, 17930, 17940, 17956, 17972, 17991, 18013, 18029, 0}, {17853, 17869, 17888, 17904, 17923, 17930, 17940, 17956, 17972, 17991, 18013, 18029, 0}, {18048, 18055, 17888, 18065, 17923, 17930, 18081, 18094, 18101, 18114, 18130, 18140, 0}, {18048, 18055, 17888, 18065, 17923, 17930, 18081, 18094, 18101, 18114, 18130, 18140, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {18153, 18167, 18170, {18173, 18182, 18191, 18201, 18211, 18221, 18233}, {18241, 18246, 18250, 18254, 18258, 18263, 18268}, {18272, 2430, 2430, 9924, 18272, 18275, 2023}, {18278, 18285, 18290, 2696, 18296, 18302, 18309, 18315, 18323, 18333, 18341, 18350, 0}, {18278, 18285, 18290, 2696, 18296, 18302, 18309, 18315, 18323, 18333, 18341, 18350, 0}, {2759, 18360, 3761, 2772, 18364, 18368, 18373, 18377, 18381, 18385, 2796, 18389, 0}, {2759, 18360, 3761, 2772, 18364, 18368, 18373, 18377, 18381, 18385, 2796, 18389, 0}, 0, 0, 185, 187, {198,1692,18394,7410,2277,0,0,0,0,0,0,0,0,0},{18403,18428,10151,0,0,0,0,0,0,0},{251,3594,843,0,0,0,0,0,0,0,0,0},{269,3602,848,3594,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {18447, 18460, 18465, {18470, 18482, 18493, 18507, 18519, 18529, 18539}, {18550, 18555, 18560, 18565, 18570, 18575, 18580}, {2023, 3989, 2428, 6293, 2673, 16401, 2436}, {18585, 18602, 18615, 18629, 18642, 18655, 18668, 18682, 18694, 18708, 18722, 18736, 0}, {18585, 18602, 18615, 18629, 18642, 18655, 18668, 18682, 18694, 18708, 18722, 18736, 0}, {18749, 18756, 18761, 18766, 18770, 18775, 18780, 18785, 18790, 18797, 18802, 18808, 0}, {18749, 18756, 18761, 18766, 18770, 18775, 18780, 18785, 18790, 18797, 18802, 18808, 0}, 2, 1, 691, 187, {1156,1167,4762,1692,0,0,0,0,0,0,0,0,0,0},{18813,18837,0,0,0,0,0,0,0,0},{251,843,4288,0,0,0,0,0,0,0,0,0},{269,848,4302,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {20032, 1929, 1932, {20040, 20049, 20058, 20066, 20075, 20084, 20091}, {20100, 20103, 20106, 20109, 20112, 20116, 20119}, {6607, 6609, 6611, 6613, 12817, 15367, 6605}, {10796, 10804, 20122, 20128, 10819, 2706, 19196, 20135, 16313, 20142, 16330, 20149, 0}, {10796, 10804, 20122, 20128, 10819, 2706, 19196, 20135, 16313, 20142, 16330, 20149, 0}, {2759, 2763, 19192, 2772, 10819, 2776, 2780, 20157, 2788, 2792, 2796, 10844, 0}, {2759, 2763, 19192, 2772, 10819, 2776, 2780, 20157, 2788, 2792, 2796, 10844, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {20195, 1929, 1932, {20202, 20212, 20221, 20230, 20241, 20251, 20256}, {20263, 20269, 20274, 20279, 20284, 10786, 20288}, {20293, 2673, 2023, 7736, 2018, 3987, 2023}, {15059, 15066, 10332, 15073, 3730, 20295, 20300, 20305, 15098, 15107, 15115, 15122, 0}, {15059, 15066, 10332, 15073, 3730, 20295, 20300, 20305, 15098, 15107, 15115, 15122, 0}, {20312, 20317, 3761, 2772, 3730, 20295, 20300, 20321, 10770, 2792, 20325, 20330, 0}, {20312, 20317, 3761, 2772, 3730, 20295, 20300, 20321, 10770, 2792, 20325, 20330, 0}, 0, 1, 691, 187, {1156,0,0,0,0,0,0,0,0,0,0,0,0,0},{20334,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 20352, 20380, {20402, 20421, 20440, 20465, 20484, 20518, 20543}, {20562, 20572, 20582, 20598, 20608, 20633, 20649}, {20659, 20663, 20670, 20674, 20681, 20688, 20695}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, 0, 0, 2566, 187, {1139,2293,1128,20945,20958,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20973,20982,0,0,0,0,0,0,0,0},{4302,2337,20990,21002,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 1929, 1932, {21482, 21501, 21520, 21542, 21561, 21583, 21608}, {21627, 21637, 21647, 21660, 21670, 21683, 21699}, {21709, 21713, 21720, 21727, 21734, 21741, 21748}, {21752, 21780, 21808, 21824, 21843, 21850, 21860, 21876, 21892, 21920, 21942, 21964, 0}, {21752, 21780, 21808, 21824, 21843, 21850, 21860, 21876, 21892, 21920, 21942, 21964, 0}, {21989, 22008, 21808, 21824, 21843, 21850, 21860, 22027, 22034, 22050, 22066, 22076, 0}, {21989, 22008, 21808, 21824, 21843, 21850, 21860, 22027, 22034, 22050, 22066, 22076, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 8151, 22089, {22092, 22111, 22130, 22155, 22174, 22196, 22221}, {22240, 22250, 22260, 22276, 22286, 22299, 22315}, {22325, 22329, 22336, 22340, 22347, 22354, 22361}, {22365, 22387, 22418, 22440, 22459, 22466, 22476, 22492, 22508, 22539, 22561, 22583, 0}, {22365, 22387, 22418, 22440, 22459, 22466, 22476, 22492, 22508, 22539, 22561, 22583, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 22608, 22633, {22658, 22677, 22699, 22724, 22740, 22762, 22781}, {22791, 22798, 22805, 22812, 22819, 22826, 22833}, {22791, 22798, 22805, 22812, 22819, 22826, 22833}, {22837, 22853, 22878, 22897, 22916, 22923, 22936, 22949, 22968, 22999, 23024, 23046, 0}, {22837, 22853, 22878, 22897, 22916, 22923, 22936, 23071, 22968, 22999, 23024, 23046, 0}, {23090, 23098, 23112, 23126, 22916, 22923, 22936, 23137, 23145, 23159, 23170, 23178, 0}, {23090, 23098, 23112, 23126, 22916, 22923, 22936, 23137, 23145, 23159, 23170, 23178, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {3613, 1929, 1932, {23189, 23211, 23233, 23258, 23280, 23305, 23333}, {23355, 23365, 23375, 23388, 23398, 23411, 23427}, {23437, 23441, 23448, 23452, 23459, 23466, 23473}, {23477, 23493, 23518, 23537, 23559, 23566, 23579, 23592, 23611, 23642, 23667, 23686, 0}, {23477, 23493, 23518, 23537, 23559, 23566, 23711, 23592, 23611, 23642, 23667, 23686, 0}, {23724, 23731, 23518, 23747, 23559, 23566, 23711, 23592, 23763, 23785, 23801, 23811, 0}, {23724, 23731, 23518, 23747, 23559, 23566, 23711, 23592, 23763, 23785, 23801, 23811, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {3613, 1929, 1932, {23827, 23846, 23865, 23887, 23906, 23928, 23953}, {23972, 23982, 23992, 24005, 24015, 24028, 24044}, {24054, 24058, 24065, 24072, 24079, 24086, 24093}, {24097, 24113, 24138, 24157, 24179, 24186, 24199, 24212, 24231, 24259, 24284, 24306, 0}, {24097, 24113, 24138, 24157, 24179, 24186, 24199, 24212, 24231, 24259, 24284, 24306, 0}, {24331, 24339, 24359, 24366, 24179, 24383, 24390, 24398, 24406, 24429, 24446, 24460, 0}, {24331, 24339, 24359, 24366, 24179, 24383, 24390, 24398, 24406, 24429, 24446, 24460, 0}, 0, 0, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {20032, 1929, 1932, {24477, 24505, 24539, 24567, 24595, 24626, 24663}, {24691, 24704, 24723, 24739, 24752, 24771, 24790}, {24800, 24807, 24814, 24821, 24828, 24841, 24848}, {24852, 24871, 24899, 24921, 24940, 24953, 24963, 24976, 25001, 25032, 25057, 25073, 0}, {24852, 24871, 24899, 24921, 24940, 24953, 24963, 24976, 25001, 25032, 25057, 25073, 0}, {25092, 25102, 25121, 25131, 24940, 24953, 24963, 25147, 25154, 25179, 25195, 25205, 0}, {25092, 25102, 25121, 25131, 24940, 24953, 24963, 25147, 25154, 25179, 25195, 25205, 0}, 0, 0, 2566, 187, {1139,2293,1167,4762,0,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20973,20982,0,0,0,0,0,0,0,0},{4302,2337,20990,21002,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 25218, 25246, {25268, 25287, 25306, 25331, 25350, 25384, 25409}, {25428, 20572, 20582, 20598, 25438, 25463, 20649}, {0, 0, 0, 0, 0, 0, 0}, {25479, 25504, 25535, 25551, 20796, 20803, 20813, 25570, 25586, 25617, 25639, 25661, 0}, {25479, 25504, 25535, 25551, 20796, 20803, 20813, 25570, 25586, 25617, 25639, 25661, 0}, {25686, 25699, 25535, 25551, 20796, 20803, 20813, 25718, 25725, 25741, 25757, 25767, 0}, {25686, 25699, 25535, 25551, 20796, 20803, 20813, 25718, 25725, 25741, 25757, 25767, 0}, 0, 0, 2566, 187, {1128,0,0,0,0,0,0,0,0,0,0,0,0,0},{25780,0,0,0,0,0,0,0,0,0},{1858,1866,0,0,0,0,0,0,0,0,0,0},{1875,1886,0,0,0,0,0,0,0},{25799,25807,0,0,0,0,0,0}},
+       {1, 1929, 1932, {17583, 17602, 25817, 17643, 17662, 17684, 17709}, {17728, 17738, 25839, 17761, 17771, 17784, 17800}, {17810, 17814, 17821, 17828, 17835, 17842, 17849}, {25852, 25877, 17888, 25908, 25927, 17930, 25934, 25947, 25963, 25988, 26010, 26038, 0}, {25852, 25877, 17888, 25908, 25927, 17930, 25934, 25947, 25963, 25988, 26010, 26038, 0}, {26060, 26073, 17888, 26092, 25927, 17930, 25934, 26108, 26115, 26134, 26150, 26172, 0}, {26060, 26073, 17888, 26092, 25927, 17930, 25934, 26108, 26115, 26134, 26150, 26172, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {26920, 26944, 26966, {26991, 27019, 27047, 27084, 27115, 27149, 27174}, {27208, 27224, 27240, 27265, 27284, 27306, 27319}, {27341, 27348, 27355, 27362, 27369, 27376, 27380}, {27390, 27424, 27461, 27495, 27529, 27560, 27597, 27634, 27674, 27708, 27742, 27791, 0}, {27390, 27424, 27461, 27495, 27529, 27560, 27597, 27634, 27674, 27708, 27742, 27791, 0}, {27840, 27853, 27866, 27879, 27892, 27905, 27918, 27931, 27944, 27957, 27973, 27989, 0}, {27840, 27853, 27866, 27879, 27892, 27905, 27918, 27931, 27944, 27957, 27973, 27989, 0}, 0, 0, 185, 187, {1654,1663,1672,1703,1692,1681,1721,1714,1728,0,0,0,0,0},{28005,28048,28096,28128,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{28165,1914,0,0,0,0,0,0}},
+       {289, 1929, 1932, {28198, 28207, 28217, 28229, 28242, 28251, 28263}, {28275, 28279, 28284, 28288, 28292, 28296, 28300}, {2023, 28304, 2428, 2428, 15367, 6293, 2023}, {28307, 28314, 28323, 28330, 2702, 28337, 28345, 28356, 28361, 28366, 28373, 28382, 0}, {28307, 28314, 28323, 28330, 2702, 28337, 28345, 28356, 28361, 28366, 28373, 28382, 0}, {28390, 28394, 28284, 28398, 2702, 28402, 28406, 28356, 28361, 28410, 28414, 28419, 0}, {28390, 28394, 28284, 28398, 2702, 28402, 28406, 28356, 28361, 28410, 28414, 28419, 0}, 2, 1, 185, 187, {189,198,5002,8579,0,0,0,0,0,0,0,0,0,0},{1242,1207,0,0,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 28424, 28440, {28456, 28478, 28491, 28510, 28520, 28551, 28567}, {28456, 28478, 28491, 28510, 28520, 28551, 28567}, {6605, 6607, 6609, 6611, 6613, 6615, 6617}, {28580, 28593, 28612, 28625, 28638, 28651, 28670, 28689, 28702, 28718, 28731, 28756, 0}, {28580, 28593, 28612, 28625, 28638, 28651, 28670, 28689, 28702, 28718, 28731, 28756, 0}, {28580, 28593, 28612, 28625, 28638, 28651, 28670, 28689, 28702, 28718, 28731, 28756, 0}, {28580, 28593, 28612, 28625, 28638, 28651, 28670, 28689, 28702, 28718, 28731, 28756, 0}, 0, 0, 185, 187, {189,1692,0,0,0,0,0,0,0,0,0,0,0,0},{1242,10163,0,0,0,0,0,0,0,0},{843,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{28769,0,0,0,0,0,0,0}},
+       {289, 28804, 28829, {28854, 28879, 28898, 28926, 28945, 28970, 28989}, {28854, 28879, 28898, 28926, 28945, 28970, 28989}, {29011, 29015, 29019, 29023, 29033, 29037, 29047}, {29051, 29070, 29086, 29099, 29112, 29134, 29153, 29175, 29191, 29207, 29220, 29236, 0}, {29051, 29070, 29086, 29099, 29112, 29134, 29153, 29175, 29191, 29207, 29220, 29236, 0}, {29252, 29261, 29270, 29279, 29288, 29297, 29309, 29318, 29327, 29336, 29345, 29354, 0}, {29252, 29261, 29270, 29279, 29288, 29297, 29309, 29318, 29327, 29336, 29345, 29354, 0}, 0, 0, 185, 187, {198,29363,6480,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {3883, 7281, 7286, {3895, 29373, 3909, 29378, 29388, 29394, 3942}, {29401, 8413, 3761, 29405, 29410, 29414, 29418}, {2673, 2436, 2428, 2428, 29423, 3989, 2023}, {29425, 29433, 4005, 4011, 29442, 29447, 29453, 4034, 29459, 29468, 29476, 29485, 0}, {29494, 29502, 4094, 1012, 8083, 29511, 29517, 4117, 8100, 8109, 8117, 29523, 0}, {29532, 2763, 3761, 29536, 2702, 29540, 29545, 20157, 18381, 29549, 2796, 3769, 0}, {29532, 2763, 3761, 29536, 2702, 29540, 29545, 20157, 18381, 29549, 2796, 3769, 0}, 2, 1, 185, 187, {198,189,1120,2286,1139,1167,1692,0,0,0,0,0,0,0},{29553,4239,4266,1242,0,0,0,0,0,0},{843,251,242,29582,0,0,0,0,0,0,0,0},{848,269,257,29594,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1, 29614, 29626, {29638, 17602, 29666, 17643, 17662, 17684, 17709}, {17728, 17738, 25839, 17761, 17771, 17784, 17800}, {0, 0, 0, 0, 0, 0, 0}, {25852, 25877, 17888, 25908, 25927, 17930, 25934, 29685, 29701, 29729, 26010, 26038, 0}, {25852, 25877, 17888, 25908, 25927, 17930, 25934, 29685, 29701, 29729, 26010, 26038, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,1866,1858,0,0,0,0,0,0,0,0},{269,848,1886,1875,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {20032, 29751, 29763, {29772, 29788, 29804, 29832, 29848, 29891, 29916}, {29772, 29788, 29944, 29832, 29954, 29976, 29989}, {29999, 30003, 30007, 30011, 30015, 30028, 30035}, {30042, 30061, 30086, 30105, 30130, 30143, 30156, 30169, 30191, 30225, 30250, 30278, 0}, {30042, 30061, 30086, 30105, 30130, 30143, 30156, 30169, 30191, 30225, 30250, 30278, 0}, {30306, 30313, 30323, 30105, 30130, 30143, 30156, 30336, 30346, 30359, 30369, 30382, 0}, {30306, 30313, 30323, 30105, 30130, 30143, 30156, 30336, 30346, 30359, 30369, 30382, 0}, 0, 1, 2566, 187, {1692,1681,1735,198,189,0,0,0,0,0,0,0,0,0},{30395,0,0,0,0,0,0,0,0,0},{1858,1866,843,251,0,0,0,0,0,0,0,0},{1875,1886,848,269,0,0,0,0,0},{30443,0,0,0,0,0,0,0}},
+       {30453, 30469, 30479, {30492, 30502, 30509, 30522, 30532, 30542, 30552}, {30492, 30502, 30562, 30522, 30532, 30542, 30552}, {30572, 30576, 30580, 30584, 30588, 30592, 30596}, {30600, 30616, 30632, 30642, 30655, 30662, 30669, 30679, 30692, 30711, 30727, 30743, 0}, {30600, 30616, 30632, 30642, 30655, 30662, 30669, 30679, 30692, 30759, 30727, 30743, 0}, {30778, 30788, 30632, 30798, 30655, 30662, 30669, 30808, 30818, 30828, 30838, 30848, 0}, {30778, 30788, 30632, 30798, 30655, 30662, 30669, 30808, 30818, 30828, 30838, 30848, 0}, 0, 0, 185, 187, {2277,1692,0,0,0,0,0,0,0,0,0,0,0,0},{30858,0,0,0,0,0,0,0,0,0},{3594,0,0,0,0,0,0,0,0,0,0,0},{3602,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 31125, 31166, {31207, 31226, 31245, 31270, 31289, 31311, 31336}, {31355, 17738, 31365, 17761, 31381, 17784, 17800}, {31394, 17814, 31398, 17828, 31402, 17842, 17849}, {17853, 31409, 17888, 31437, 25927, 31456, 17940, 31466, 31482, 31513, 31535, 31560, 0}, {17853, 31409, 17888, 31437, 25927, 31456, 17940, 31466, 31482, 31513, 31535, 31560, 0}, {17853, 31409, 17888, 31437, 25927, 31456, 17940, 31466, 31482, 31513, 31535, 31560, 0}, {17853, 31409, 17888, 31437, 25927, 31456, 17940, 31466, 31482, 31513, 31535, 31560, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{25807,0,0,0,0,0,0,0}},
+       {289, 0, 0, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {31585, 31592, 31601, 31616, 31627, 31636, 31643, 31650, 31657, 31668, 31681, 31694, 0}, {31585, 31592, 31601, 31616, 31627, 31636, 31643, 31650, 31657, 31668, 31681, 31694, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 6, 185, 187, {1654,1692,0,0,0,0,0,0,0,0,0,0,0,0},{31699,31720,0,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {31735, 1929, 1932, {31741, 31748, 31754, 31761, 31772, 31780, 31789}, {31796, 8413, 3761, 31800, 31804, 31808, 10790}, {2436, 2436, 2428, 2428, 5694, 16401, 2023}, {3991, 31812, 31820, 4011, 4017, 31826, 31832, 4034, 31838, 31848, 31856, 31866, 0}, {3991, 31812, 31820, 4011, 4017, 31826, 31832, 4034, 31838, 31848, 31856, 31866, 0}, {31876, 31880, 3761, 29536, 3730, 31884, 31888, 20157, 18381, 2792, 31892, 16358, 0}, {31876, 31880, 3761, 29536, 3730, 31884, 31888, 20157, 18381, 2792, 31892, 16358, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 0, 0, {31896, 31903, 31911, 31918, 31925, 31933, 31941}, {31948, 31951, 31954, 31957, 31960, 31963, 31966}, {2436, 2436, 2430, 2436, 12817, 3987, 12817}, {31969, 31977, 31987, 31993, 32001, 32006, 32011, 32016, 32023, 20142, 32031, 32039, 0}, {31969, 31977, 31987, 31993, 32001, 32006, 32011, 32016, 32023, 20142, 32031, 32039, 0}, {2759, 32047, 3761, 32051, 3730, 31094, 31098, 32055, 3701, 2792, 32059, 16358, 0}, {2759, 32047, 3761, 32051, 3730, 31094, 31098, 32055, 3701, 2792, 32059, 16358, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 32063, 32074, {32084, 32102, 32117, 32139, 32152, 32166, 32183}, {32207, 32215, 32220, 32139, 32152, 32232, 32239}, {0, 0, 0, 0, 0, 0, 0}, {32253, 32275, 32291, 32311, 32325, 32342, 32357, 32374, 32388, 32401, 32420, 32434, 0}, {32253, 32275, 32291, 32311, 32325, 32342, 32357, 32374, 32388, 32401, 32420, 32434, 0}, {32453, 32468, 32477, 32490, 32497, 32507, 32515, 32525, 32532, 32538, 32550, 32557, 0}, {32453, 32468, 32477, 32490, 32497, 32507, 32515, 32525, 32532, 32538, 32550, 32557, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{222,20161,20181,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{25807,0,0,0,0,0,0,0}},
+       {3613, 0, 0, {32569, 32577, 15933, 15942, 15951, 32588, 32598}, {16389, 15983, 15987, 15991, 15995, 16252, 32607}, {0, 0, 0, 0, 0, 0, 0}, {32611, 32620, 32630, 32638, 10819, 3734, 32646, 32652, 32661, 32670, 32679, 32688, 0}, {32611, 32620, 32630, 32638, 10819, 3734, 32646, 32652, 32661, 32670, 32679, 32688, 0}, {2759, 2763, 16002, 32697, 10819, 2776, 2780, 20157, 18381, 2792, 32701, 16358, 0}, {2759, 2763, 16002, 32697, 10819, 2776, 2780, 20157, 18381, 2792, 32701, 16358, 0}, 0, 0, 185, 187, {189,1681,1735,1692,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,3594,251,0,0,0,0,0,0,0,0,0},{257,3602,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {32705, 32718, 32723, {32728, 32735, 32750, 32764, 32780, 32795, 32811}, {6289, 32826, 2530, 32830, 32834, 32838, 32842}, {2023, 12817, 2428, 2018, 2023, 2430, 12817}, {7370, 7378, 32846, 32853, 32860, 2469, 2474, 32865, 32875, 32886, 32895, 32905, 0}, {7370, 7378, 32846, 32853, 32860, 2469, 2474, 32865, 32875, 32886, 32895, 32905, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 0, 0, 2566, 187, {1128,1139,1692,2568,0,0,0,0,0,0,0,0,0,0},{32915,2300,4769,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 32934, 32939, {32944, 32960, 32968, 32976, 32985, 32997, 33007}, {33017, 33023, 33029, 33033, 33037, 33045, 3701}, {0, 0, 0, 0, 0, 0, 0}, {33052, 33065, 33079, 33088, 33094, 33098, 33103, 33111, 16313, 33124, 16330, 16338, 0}, {33052, 33065, 33079, 33088, 33094, 33098, 33103, 33111, 16313, 33124, 16330, 16338, 0}, {33133, 2763, 33137, 16346, 33094, 33141, 2780, 33145, 2788, 33153, 2796, 16358, 0}, {33133, 2763, 33137, 16346, 33094, 33141, 2780, 33145, 2788, 33153, 2796, 16358, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{2313,0,0,0,0,0,0,0,0,0,0,0},{2326,0,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {33159, 33186, 33193, {33200, 33210, 33220, 33230, 33240, 33250, 33260}, {33270, 33277, 33284, 33291, 33298, 33305, 33312}, {33319, 33323, 33327, 33331, 33335, 33339, 33343}, {33347, 33354, 33361, 33368, 33375, 33382, 33389, 33396, 33403, 33410, 33417, 33427, 0}, {33347, 33354, 33361, 33368, 33375, 33382, 33389, 33396, 33403, 33410, 33417, 33427, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, {6605, 6607, 6609, 6611, 6613, 6615, 6617, 6619, 6621, 6623, 6626, 6629, 0}, 0, 0, 185, 187, {1654,1663,1672,1703,1692,1681,0,0,0,0,0,0,0,0},{33437,33461,33491,33521,33538,0,0,0,0,0},{1858,843,251,0,0,0,0,0,0,0,0,0},{1875,848,269,0,0,0,0,0,0},{33561,1914,0,0,0,0,0,0}},
+       {289, 0, 0, {28275, 8413, 33578, 33585, 33595, 33600, 33607}, {33614, 6273, 33618, 4850, 33623, 33628, 33633}, {4421, 33638, 33641, 33644, 33647, 33650, 33653}, {33656, 33663, 33578, 33674, 33680, 33684, 33693, 33700, 33705, 33714, 33719, 33722, 0}, {33656, 33663, 33578, 33674, 33680, 33684, 33693, 33700, 33705, 33714, 33719, 33722, 0}, {33728, 33732, 33739, 28398, 33680, 33744, 33749, 33700, 33754, 33714, 33719, 33759, 0}, {33728, 33732, 33739, 28398, 33680, 33744, 33749, 33700, 33754, 33714, 33719, 33759, 0}, 2, 1, 185, 187, {198,189,1167,1139,1692,0,0,0,0,0,0,0,0,0},{4985,5002,1242,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {33916, 33934, 33939, {33944, 33969, 33998, 34023, 34036, 34051, 34068}, {34083, 34088, 34093, 34098, 34103, 34108, 8800}, {19417, 19417, 34113, 8811, 8814, 19417, 8811}, {34116, 34135, 34150, 34172, 34192, 34208, 34224, 34238, 34264, 34288, 34305, 34322, 0}, {34116, 34135, 34150, 34172, 34192, 34208, 34224, 34238, 34264, 34288, 34305, 34322, 0}, {34339, 34348, 34357, 34371, 34385, 34397, 34409, 34419, 34435, 34449, 34456, 34463, 0}, {34339, 34348, 34357, 34371, 34385, 34397, 34409, 34419, 34435, 34449, 34456, 34463, 0}, 0, 1, 691, 187, {1156,4753,1692,34470,34480,0,0,0,0,0,0,0,0,0},{34493,34528,34557,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{34592,0,0,0,0,0,0,0}},
+       {20032, 0, 0, {34608, 34620, 34631, 34643, 34655, 34665, 34677}, {34692, 34697, 34702, 34707, 34712, 34717, 34722}, {0, 0, 0, 0, 0, 0, 0}, {34727, 34736, 34748, 34756, 34761, 34771, 34778, 34787, 34794, 34800, 34809, 34820, 0}, {34727, 34736, 34748, 34756, 34761, 34771, 34778, 34787, 34794, 34800, 34809, 34820, 0}, {34828, 34833, 34838, 34843, 34848, 34853, 34858, 34712, 34863, 34868, 34873, 34878, 0}, {34828, 34833, 34838, 34843, 34848, 34853, 34858, 34712, 34863, 34868, 34873, 34878, 0}, 0, 0, 185, 187, {9796,2286,0,0,0,0,0,0,0,0,0,0,0,0},{34883,1207,0,0,0,0,0,0,0,0},{843,0,0,0,0,0,0,0,0,0,0,0},{848,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 34903, 34905, {34907, 34920, 34928, 34937, 34947, 34957, 34966}, {34978, 34982, 34986, 34990, 34994, 34998, 35002}, {2673, 2436, 2428, 7736, 12817, 5694, 2023}, {35006, 35020, 35031, 35040, 35051, 35063, 35077, 35089, 35102, 35115, 35127, 35140, 0}, {35006, 35020, 35031, 35040, 35051, 35063, 35077, 35089, 35102, 35115, 35127, 35140, 0}, {35154, 35159, 35165, 35171, 35176, 35182, 35188, 35193, 35199, 35204, 19138, 35210, 0}, {35154, 35159, 35165, 35171, 35176, 35182, 35188, 35193, 35199, 35204, 19138, 35210, 0}, 2, 1, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
        {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {1424, 1431, 1438, 1445, 1452, 1459, 1466}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1501, 1508, 1515, 1522, 1529, 1536, 1543, 1550, 1557, 1564, 1571, 1581, 0}, {1501, 1508, 1515, 1522, 1529, 1536, 1543, 1550, 1557, 1564, 1571, 1581, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {1654,1663,1672,1681,1692,1703,1714,1721,1728,1735,0,0,0,0},{1744,1766,1794,1822,1837,0,0,0,0,0},{843,251,1858,1866,0,0,0,0,0,0,0,0},{848,269,1875,1886,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
-       {1921, 2579, 2585, {2592, 2600, 2607, 2616, 2625, 2636, 2644}, {2652, 2655, 2658, 2661, 2664, 2667, 2670}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 2, 1, 691, 187, {1156,1167,1176,35591,4762,1692,0,0,0,0,0,0,0,0},{2818,2300,35601,0,0,0,0,0,0,0},{251,843,35611,35620,35630,35641,8353,35646,35652,0,0,0},{269,848,35660,35673,2862,35685,35699,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 8151, 22114, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 2, 1, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,1207,13756,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3883, 7281, 7286, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {35706, 6273, 4845, 35711, 35717, 35722, 35726}, {2673, 2436, 2428, 29448, 3987, 3989, 2023}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {35732, 5803, 35736, 1086, 35741, 2538, 2542, 1096, 1100, 1105, 1110, 35745, 0}, {35732, 5803, 35736, 1086, 35741, 2538, 2542, 1096, 1100, 1105, 1110, 35745, 0}, 0, 0, 185, 187, {198,3582,189,1120,2286,1139,1692,0,0,0,0,0,0,0},{4211,4266,0,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1921, 2579, 2585, {2592, 2600, 2607, 2616, 2625, 2636, 2644}, {2652, 2655, 2658, 2661, 2664, 2667, 2670}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 2, 1, 691, 187, {1156,1167,1176,35571,4762,1692,0,0,0,0,0,0,0,0},{2818,2300,35581,0,0,0,0,0,0,0},{251,843,35591,35600,35610,35621,8353,35626,35632,0,0,0},{269,848,35640,35653,2862,35665,35679,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 8151, 22089, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 2, 1, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,1207,13731,0,0,0,0,0,0},{251,843,242,3594,0,0,0,0,0,0,0,0},{269,848,257,3602,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {3883, 7281, 7286, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {35686, 6273, 4845, 35691, 35697, 35702, 35706}, {2673, 2436, 2428, 29423, 3987, 3989, 2023}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {35712, 5803, 35716, 1086, 35721, 2538, 2542, 1096, 1100, 1105, 1110, 35725, 0}, {35712, 5803, 35716, 1086, 35721, 2538, 2542, 1096, 1100, 1105, 1110, 35725, 0}, 0, 0, 185, 187, {198,3582,189,1120,2286,1139,1692,0,0,0,0,0,0,0},{4211,4266,0,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
        {289, 1929, 1932, {4783, 4792, 4798, 4804, 4813, 4819, 4828}, {4835, 4840, 4845, 4850, 4855, 4860, 4865}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, 2, 1, 2566, 187, {1139,198,189,1128,0,0,0,0,0,0,0,0,0,0},{4985,1242,0,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {6207, 6216, 6224, 6233, 6244, 6253, 6262}, {6269, 6273, 2530, 6277, 6281, 6285, 6289}, {2673, 2436, 2428, 2428, 6293, 3989, 2023}, {6295, 6303, 4005, 6312, 6319, 6326, 6333, 4034, 6340, 6350, 6358, 6367, 0}, {6376, 6384, 4094, 6393, 6400, 6407, 6414, 4117, 6421, 6431, 1058, 6439, 0}, {6448, 2526, 2530, 2534, 6452, 6456, 6460, 6464, 6468, 6472, 2558, 6476, 0}, {6448, 2526, 2530, 2534, 6452, 6456, 6460, 6464, 6468, 6472, 2558, 6476, 0}, 2, 1, 691, 187, {1156,1167,9806,2286,6480,0,0,0,0,0,0,0,0,0},{2818,1242,1207,0,0,0,0,0,0,0},{251,843,35611,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 7281, 7286, {7291, 7298, 7306, 7314, 7323, 7333, 7341}, {7350, 4424, 7353, 7356, 7359, 7362, 7365}, {7368, 2428, 2673, 3705, 2673, 3989, 7368}, {7370, 7378, 7387, 2459, 7393, 2469, 2474, 7397, 2486, 2496, 2504, 2513, 0}, {7370, 7378, 7387, 2459, 7393, 2469, 2474, 7397, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 7406, 2534, 7393, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 7406, 2534, 7393, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 2, 1, 185, 187, {9796,1120,1139,1167,7419,1692,0,0,0,0,0,0,0,0},{4985,3809,1242,5548,0,0,0,0,0,0},{843,251,35750,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1921, 35760, 35765, {2345, 10060, 35770, 2368, 2375, 2383, 35777}, {2398, 35785, 35790, 2411, 2415, 2419, 35794}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, 2, 1, 691, 187, {1156,7519,1167,4762,2804,1692,0,0,0,0,0,0,0,0},{2300,4769,0,0,0,0,0,0,0,0},{251,843,7529,7539,4288,2321,7550,7561,0,0,0,0},{269,848,7571,7585,4302,2337,7598,7612,0},{1301,7625,7635,0,0,0,0,0}},
-       {3883, 7281, 7286, {3895, 7966, 7980, 7993, 8006, 8019, 3942}, {6269, 8031, 8035, 8039, 8043, 8047, 8051}, {2673, 2023, 2430, 8056, 8056, 2023, 2023}, {35798, 35806, 35816, 4011, 29467, 35823, 35829, 4034, 29484, 29493, 29501, 35835, 0}, {35798, 35806, 35816, 4011, 29467, 35823, 35829, 4034, 29484, 29493, 29501, 35835, 0}, {2759, 20342, 3761, 29561, 2702, 2776, 2780, 20182, 18406, 29574, 2796, 2800, 0}, {2759, 20342, 3761, 29561, 2702, 2776, 2780, 20182, 18406, 29574, 2796, 2800, 0}, 2, 1, 185, 187, {198,1156,1128,189,1167,1139,1681,1703,1692,1735,35844,5888,0,0},{4266,4211,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {10033, 10046, 10049, {10052, 10060, 10068, 2368, 2375, 2383, 10075}, {10083, 10088, 10093, 10097, 10101, 10105, 10109}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {10114, 10122, 10131, 2696, 10004, 2706, 2711, 10136, 2723, 2733, 2741, 3752, 0}, {7370, 7378, 4887, 2459, 2465, 2469, 2474, 10144, 2486, 2496, 2504, 2513, 0}, {2759, 2763, 3761, 2772, 10004, 2776, 2780, 2784, 2788, 2792, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 10004, 2776, 2780, 2784, 2788, 2792, 2796, 3769, 0}, 2, 1, 691, 187, {4753,1156,4762,1692,0,0,0,0,0,0,0,0,0,0},{10152,10170,0,0,0,0,0,0,0,0},{251,843,7529,0,0,0,0,0,0,0,0,0},{269,848,7585,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {35853, 35864, 35888, 35918, 35935, 35957, 35966}, {15057, 15060, 15065, 15071, 15075, 7736, 15080}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {35977, 35990, 501, 36003, 521, 36014, 36023, 542, 36032, 36049, 36064, 36077, 0}, {35977, 35990, 501, 36003, 521, 36014, 36023, 542, 36032, 36049, 36064, 36077, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, 0, 1, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{1242,5505,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 7281, 7286, {18880, 18894, 18904, 18915, 18929, 18940, 18951}, {18964, 18969, 18974, 18981, 18987, 18993, 18999}, {2673, 2436, 2428, 7736, 2673, 12842, 2023}, {19004, 19012, 19020, 19027, 19036, 19046, 19056, 19062, 19070, 19085, 19103, 19111, 0}, {19004, 19012, 19020, 19027, 19036, 19046, 19056, 19062, 19070, 19085, 19103, 19111, 0}, {19119, 19123, 19020, 19129, 19133, 19138, 19056, 19144, 19149, 19156, 19163, 19168, 0}, {19119, 19123, 19020, 19129, 19133, 19138, 19056, 19144, 19149, 19156, 19163, 19168, 0}, 2, 0, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{1242,5505,10193,8579,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {36090, 36105, 36120, 36135, 36152, 36169, 36178}, {36189, 36196, 36203, 36210, 36217, 19832, 36224}, {36231, 19439, 8811, 8814, 8808, 19436, 19846}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, 0, 1, 691, 187, {1156,1167,36234,4762,189,1692,0,0,0,0,0,0,0,0},{36245,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 20377, 20405, {20427, 20446, 20465, 20490, 20509, 20543, 20568}, {20587, 20597, 20607, 20623, 20633, 20658, 20674}, {20684, 20688, 20695, 20699, 20706, 20713, 20720}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, {20724, 20752, 20786, 20802, 20821, 20828, 20838, 20854, 20870, 20901, 20923, 20945, 0}, 0, 5, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20998,21007,0,0,0,0,0,0,0,0},{4302,2337,21015,21027,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35236, 35243, 35250, 35257, 35264, 35271, 35278}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,6632,1822,1837,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
-       {1921, 2579, 2585, {2592, 2600, 2607, 2616, 2625, 2636, 2644}, {2652, 2655, 2658, 2661, 2664, 2667, 2670}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {36395, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {36395, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {36403, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {36403, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 2, 1, 691, 187, {1156,1167,1692,36408,7419,0,0,0,0,0,0,0,0,0},{36418,36438,0,0,0,0,0,0,0,0},{251,843,2850,36450,35641,8353,35652,0,0,0,0,0},{269,848,2862,35685,35699,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {6207, 6216, 6224, 6233, 6244, 6253, 6262}, {6269, 6273, 2530, 6277, 6281, 6285, 6289}, {2673, 2436, 2428, 2428, 6293, 3989, 2023}, {6295, 6303, 4005, 6312, 6319, 6326, 6333, 4034, 6340, 6350, 6358, 6367, 0}, {6376, 6384, 4094, 6393, 6400, 6407, 6414, 4117, 6421, 6431, 1058, 6439, 0}, {6448, 2526, 2530, 2534, 6452, 6456, 6460, 6464, 6468, 6472, 2558, 6476, 0}, {6448, 2526, 2530, 2534, 6452, 6456, 6460, 6464, 6468, 6472, 2558, 6476, 0}, 2, 1, 691, 187, {1156,1167,9806,2286,6480,0,0,0,0,0,0,0,0,0},{2818,1242,1207,0,0,0,0,0,0,0},{251,843,35591,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 7281, 7286, {7291, 7298, 7306, 7314, 7323, 7333, 7341}, {7350, 4424, 7353, 7356, 7359, 7362, 7365}, {7368, 2428, 2673, 3705, 2673, 3989, 7368}, {7370, 7378, 7387, 2459, 7393, 2469, 2474, 7397, 2486, 2496, 2504, 2513, 0}, {7370, 7378, 7387, 2459, 7393, 2469, 2474, 7397, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 7406, 2534, 7393, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 7406, 2534, 7393, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 2, 1, 185, 187, {9796,1120,1139,1167,7419,1692,0,0,0,0,0,0,0,0},{4985,3809,1242,5548,0,0,0,0,0,0},{843,251,35730,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1921, 35740, 35745, {2345, 10060, 35750, 2368, 2375, 2383, 35757}, {2398, 10088, 35765, 2411, 2415, 2419, 35769}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, 2, 1, 691, 187, {1156,7519,1167,4762,2804,1692,0,0,0,0,0,0,0,0},{2300,4769,0,0,0,0,0,0,0,0},{251,843,7529,7539,4288,2321,7550,7561,0,0,0,0},{269,848,7571,7585,4302,2337,7598,7612,0},{1301,7625,7635,0,0,0,0,0}},
+       {3883, 7281, 7286, {3895, 7966, 7980, 7993, 8006, 8019, 3942}, {6269, 8031, 8035, 8039, 8043, 8047, 8051}, {2673, 2023, 2430, 8056, 8056, 2023, 2023}, {35773, 35781, 35791, 4011, 29442, 35798, 35804, 4034, 29459, 29468, 29476, 35810, 0}, {35773, 35781, 35791, 4011, 29442, 35798, 35804, 4034, 29459, 29468, 29476, 35810, 0}, {2759, 20317, 3761, 29536, 2702, 2776, 2780, 20157, 18381, 29549, 2796, 2800, 0}, {2759, 20317, 3761, 29536, 2702, 2776, 2780, 20157, 18381, 29549, 2796, 2800, 0}, 2, 1, 185, 187, {198,1156,1128,189,1167,1139,1681,1703,1692,1735,35819,5888,0,0},{4266,4211,0,0,0,0,0,0,0,0},{251,0,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {10033, 10046, 10049, {10052, 10060, 10068, 2368, 2375, 2383, 10075}, {10083, 10088, 10093, 2411, 2415, 2419, 10097}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {7370, 7378, 4887, 2459, 2465, 2469, 2474, 10102, 2486, 2496, 2504, 2513, 0}, {7370, 7378, 4887, 2459, 2465, 2469, 2474, 10102, 2486, 2496, 2504, 2513, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 2546, 2550, 2554, 2558, 2562, 0}, 2, 1, 691, 187, {4753,1156,4762,1692,0,0,0,0,0,0,0,0,0,0},{10110,10128,0,0,0,0,0,0,0,0},{251,843,7529,0,0,0,0,0,0,0,0,0},{269,848,7585,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {35828, 35839, 35863, 35893, 35910, 35932, 35941}, {15032, 15035, 15040, 15046, 15050, 7736, 15055}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {35952, 35965, 501, 35978, 521, 35989, 35998, 542, 36007, 36024, 36039, 36052, 0}, {35952, 35965, 501, 35978, 521, 35989, 35998, 542, 36007, 36024, 36039, 36052, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, 0, 1, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{1242,5505,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 7281, 7286, {18855, 18869, 18879, 18890, 18904, 18915, 18926}, {18939, 18944, 18949, 18956, 18962, 18968, 18974}, {2673, 2436, 2428, 7736, 2673, 12817, 2023}, {18979, 18987, 18995, 19002, 19011, 19021, 19031, 19037, 19045, 19060, 19078, 19086, 0}, {18979, 18987, 18995, 19002, 19011, 19021, 19031, 19037, 19045, 19060, 19078, 19086, 0}, {19094, 19098, 18995, 19104, 19108, 19113, 19031, 19119, 19124, 19131, 19138, 19143, 0}, {19094, 19098, 18995, 19104, 19108, 19113, 19031, 19119, 19124, 19131, 19138, 19143, 0}, 2, 0, 185, 187, {198,189,2286,4762,1692,0,0,0,0,0,0,0,0,0},{1242,5505,10151,8579,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {36065, 36080, 36095, 36110, 36127, 36144, 36153}, {36164, 36171, 36178, 36185, 36192, 19807, 36199}, {36206, 19414, 8811, 8814, 8808, 19411, 19821}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, 0, 1, 691, 187, {1156,1167,36209,4762,189,1692,0,0,0,0,0,0,0,0},{36220,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 20352, 20380, {20402, 20421, 20440, 20465, 20484, 20518, 20543}, {20562, 20572, 20582, 20598, 20608, 20633, 20649}, {20659, 20663, 20670, 20674, 20681, 20688, 20695}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, {20699, 20727, 20761, 20777, 20796, 20803, 20813, 20829, 20845, 20876, 20898, 20920, 0}, 0, 5, 2566, 187, {1139,2293,4762,1128,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{4288,2321,20973,20982,0,0,0,0,0,0,0,0},{4302,2337,20990,21002,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35216, 35223, 35230, 35237, 35244, 35251, 35258}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,6632,1822,1837,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
+       {1921, 2579, 2585, {2592, 2600, 2607, 2616, 2625, 2636, 2644}, {2652, 2655, 2658, 2661, 2664, 2667, 2670}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {36370, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {36370, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {36378, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {36378, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 2, 1, 691, 187, {1156,1167,1692,36383,7419,0,0,0,0,0,0,0,0,0},{36393,36413,0,0,0,0,0,0,0,0},{251,843,2850,36425,35621,8353,35632,0,0,0,0,0},{269,848,2862,35665,35679,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {3613, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {9796,1120,2286,2277,189,198,3809,5518,1692,1735,1681,0,0,0},{1207,1242,0,0,0,0,0,0,0,0},{3594,843,251,0,0,0,0,0,0,0,0,0},{3602,848,269,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 2, 1, 185, 187, {198,189,1120,2286,2293,1139,1167,1692,0,0,0,0,0,0},{4211,4239,4266,0,0,0,0,0,0,0},{843,251,2321,4288,4294,0,0,0,0,0,0,0},{848,269,2337,4302,4311,0,0,0,0},{1286,0,0,0,0,0,0,0}},
        {289, 1929, 1932, {4783, 4792, 4798, 4804, 4813, 4819, 4828}, {4835, 4840, 4845, 4850, 4855, 4860, 4865}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, 0, 0, 2566, 187, {1692,5888,1139,6179,189,3582,0,0,0,0,0,0,0,0},{1242,8579,0,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {18472, 18485, 18490, {36461, 36469, 36477, 36485, 36497, 36506, 36518}, {18575, 18580, 18585, 18590, 18595, 18600, 18605}, {2023, 2428, 2673, 6293, 2673, 16426, 2436}, {18610, 18627, 18640, 18654, 18667, 18680, 18693, 18707, 18719, 18733, 18747, 18761, 0}, {18610, 18627, 18640, 18654, 18667, 18680, 18693, 18707, 18719, 18733, 18747, 18761, 0}, {36529, 36540, 36547, 36555, 36562, 36569, 36576, 36584, 36590, 36598, 36606, 36614, 0}, {36529, 36540, 36547, 36555, 36562, 36569, 36576, 36584, 36590, 36598, 36606, 36614, 0}, 2, 1, 691, 187, {4753,1156,4762,1692,0,0,0,0,0,0,0,0,0,0},{36621,18862,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {1424, 1431, 1438, 1445, 1452, 1459, 1466}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1501, 1508, 1515, 1522, 1529, 1536, 1543, 1550, 1557, 1564, 1571, 1581, 0}, {1501, 1508, 1515, 1522, 1529, 1536, 1543, 1550, 1557, 1564, 1571, 1581, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,6632,1822,35285,0,0,0,0,0,0},{1858,1866,843,251,0,0,0,0,0,0,0,0},{1875,1886,848,269,0,0,0,0,0},{1898,0,0,0,0,0,0,0}},
-       {1921, 2579, 2585, {2592, 2600, 2607, 2616, 2625, 2636, 2644}, {2652, 2655, 2658, 2661, 2664, 2667, 2670}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 2, 1, 691, 187, {1156,1167,1176,4762,4753,1692,0,0,0,0,0,0,0,0},{36647,2818,36673,36688,0,0,0,0,0,0},{251,843,2321,35630,0,0,0,0,0,0,0,0},{269,35685,2862,35699,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 2566, 187, {1692,198,189,2286,5888,36702,3809,14921,1692,0,0,0,0,0},{3838,20186,36710,6488,0,0,0,0,0,0},{3594,242,251,843,0,0,0,0,0,0,0,0},{3602,257,269,848,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,9796,2286,1139,1692,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {18447, 18460, 18465, {36436, 36444, 36452, 36460, 36472, 36481, 36493}, {18550, 18555, 18560, 18565, 18570, 18575, 18580}, {2023, 2428, 2673, 6293, 2673, 16401, 2436}, {18585, 18602, 18615, 18629, 18642, 18655, 18668, 18682, 18694, 18708, 18722, 18736, 0}, {18585, 18602, 18615, 18629, 18642, 18655, 18668, 18682, 18694, 18708, 18722, 18736, 0}, {36504, 36515, 36522, 36530, 36537, 36544, 36551, 36559, 36565, 36573, 36581, 36589, 0}, {36504, 36515, 36522, 36530, 36537, 36544, 36551, 36559, 36565, 36573, 36581, 36589, 0}, 2, 1, 691, 187, {4753,1156,4762,1692,0,0,0,0,0,0,0,0,0,0},{36596,18837,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {1424, 1431, 1438, 1445, 1452, 1459, 1466}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1501, 1508, 1515, 1522, 1529, 1536, 1543, 1550, 1557, 1564, 1571, 1581, 0}, {1501, 1508, 1515, 1522, 1529, 1536, 1543, 1550, 1557, 1564, 1571, 1581, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,6632,1822,35265,0,0,0,0,0,0},{1858,1866,843,251,0,0,0,0,0,0,0,0},{1875,1886,848,269,0,0,0,0,0},{1898,0,0,0,0,0,0,0}},
+       {1921, 2579, 2585, {2592, 2600, 2607, 2616, 2625, 2636, 2644}, {2652, 2655, 2658, 2661, 2664, 2667, 2670}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 2, 1, 691, 187, {1156,1167,1176,4762,4753,1692,0,0,0,0,0,0,0,0},{36622,2818,36648,36663,0,0,0,0,0,0},{251,843,2321,35610,0,0,0,0,0,0,0,0},{269,35665,2862,35679,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 2566, 187, {1692,198,189,2286,5888,36677,3809,14896,1692,0,0,0,0,0},{3838,20161,36685,6488,0,0,0,0,0,0},{3594,242,251,843,0,0,0,0,0,0,0,0},{3602,257,269,848,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,9796,2286,1139,1692,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
        {289, 1929, 1932, {4783, 4792, 4798, 4804, 4813, 4819, 4828}, {4835, 4840, 4845, 4850, 4855, 4860, 4865}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, 2, 1, 691, 187, {1156,1167,4762,1692,0,0,0,0,0,0,0,0,0,0},{4985,1242,5002,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {1921, 1929, 1932, {9187, 9196, 9208, 9215, 9223, 9233, 9239}, {9246, 9250, 9254, 9258, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {9286, 9296, 9305, 9313, 9321, 9329, 9336, 9343, 9351, 2102, 9357, 9365, 0}, {9374, 9384, 9393, 9401, 9409, 9417, 9424, 9431, 9440, 7911, 9446, 9456, 0}, {9465, 9469, 9474, 9479, 9483, 7945, 2239, 9487, 9491, 2255, 9495, 2259, 0}, {9465, 9469, 9474, 9479, 9483, 7945, 2239, 9487, 9491, 2255, 9495, 2259, 0}, 0, 1, 691, 187, {9499,9509,6153,9517,9529,9539,9549,1692,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36721, 36732, 13604, 36743, 36754, 36761, 36770, 36783, 36343, 36356, 36369, 36382, 0}, {36721, 36732, 13604, 36743, 36754, 36761, 36770, 36783, 36343, 36356, 36369, 36382, 0}, {36721, 36732, 13604, 36743, 36754, 36761, 36770, 36783, 36343, 36356, 36369, 36382, 0}, {36721, 36732, 13604, 36743, 36754, 36761, 36770, 36783, 36343, 36356, 36369, 36382, 0}, 0, 6, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{843,251,242,0,0,0,0,0,0,0,0,0},{848,269,257,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35236, 35243, 35250, 35257, 35264, 35271, 35278}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,36790,36817,2568,1822,35285,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
-       {1921, 2579, 2585, {2592, 2600, 2607, 2616, 2625, 2636, 2644}, {2652, 2655, 2658, 2661, 2664, 2667, 2670}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 2, 1, 691, 187, {1156,1167,1176,35591,4762,1692,7419,4753,0,0,0,0,0,0},{2818,2300,36833,0,0,0,0,0,0,0},{251,843,35630,35641,2321,0,0,0,0,0,0,0},{269,848,2862,35685,35699,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36696, 36707, 13579, 36718, 36729, 36736, 36745, 36758, 36318, 36331, 36344, 36357, 0}, {36696, 36707, 13579, 36718, 36729, 36736, 36745, 36758, 36318, 36331, 36344, 36357, 0}, {36696, 36707, 13579, 36718, 36729, 36736, 36745, 36758, 36318, 36331, 36344, 36357, 0}, {36696, 36707, 13579, 36718, 36729, 36736, 36745, 36758, 36318, 36331, 36344, 36357, 0}, 0, 6, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{843,251,242,0,0,0,0,0,0,0,0,0},{848,269,257,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35216, 35223, 35230, 35237, 35244, 35251, 35258}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,36765,36792,2568,1822,35265,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
+       {1921, 2579, 2585, {2592, 2600, 2607, 2616, 2625, 2636, 2644}, {2652, 2655, 2658, 2661, 2664, 2667, 2670}, {2023, 2428, 2673, 2428, 2673, 2434, 2023}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2675, 2682, 2690, 2696, 2702, 2706, 2711, 2716, 2723, 2733, 2741, 2750, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, {2759, 2763, 2767, 2772, 2702, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 0}, 2, 1, 691, 187, {1156,1167,1176,35571,4762,1692,7419,4753,0,0,0,0,0,0},{2818,2300,36808,0,0,0,0,0,0,0},{251,843,35610,35621,2321,0,0,0,0,0,0,0},{269,848,2862,35665,35679,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {289, 7281, 7286, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {9796,1120,189,1176,1692,0,0,0,0,0,0,0,0,0},{1207,1242,0,0,0,0,0,0,0,0},{3594,242,251,843,0,0,0,0,0,0,0,0},{3602,257,269,848,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 1, 185, 187, {198,189,2286,1139,0,0,0,0,0,0,0,0,0,0},{4239,4266,3809,36845,14910,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {4783, 4792, 4798, 4804, 4813, 4819, 4828}, {4835, 4840, 4845, 4850, 4855, 4860, 4865}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, 2, 1, 185, 187, {198,189,1167,1139,1692,0,0,0,0,0,0,0,0,0},{36854,4985,5002,1242,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {12109, 36877, 36887, {9187, 9196, 9208, 9215, 9223, 9233, 9239}, {9246, 9250, 9254, 9258, 9262, 9267, 9271}, {0, 0, 0, 0, 0, 0, 0}, {2438, 2445, 15168, 2459, 2465, 2469, 2474, 12088, 36895, 36905, 36913, 36922, 0}, {2438, 2445, 15168, 2459, 2465, 2469, 2474, 12088, 36895, 36905, 36913, 36922, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36931,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36266, 36277, 13604, 36290, 36754, 36310, 36940, 36953, 36960, 36356, 36971, 36982, 0}, {36266, 36277, 13604, 36290, 36754, 36310, 36940, 36953, 36960, 36356, 36971, 36982, 0}, {36266, 36277, 13604, 36290, 36754, 36310, 36940, 36953, 36960, 36356, 36971, 36982, 0}, {36266, 36277, 13604, 36290, 36754, 36310, 36940, 36953, 36960, 36356, 36971, 36982, 0}, 0, 6, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{843,251,242,0,0,0,0,0,0,0,0,0},{848,269,257,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 1, 185, 187, {198,189,2286,1139,0,0,0,0,0,0,0,0,0,0},{4239,4266,3809,36820,14885,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {4783, 4792, 4798, 4804, 4813, 4819, 4828}, {4835, 4840, 4845, 4850, 4855, 4860, 4865}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, 2, 1, 185, 187, {198,189,1167,1139,1692,0,0,0,0,0,0,0,0,0},{36829,4985,5002,1242,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {12084, 36852, 36862, {9187, 9196, 9208, 9215, 9223, 9233, 9239}, {9246, 9250, 9254, 9258, 9262, 9267, 9271}, {0, 0, 0, 0, 0, 0, 0}, {2438, 2445, 15143, 2459, 2465, 2469, 2474, 12063, 36870, 36880, 36888, 36897, 0}, {2438, 2445, 15143, 2459, 2465, 2469, 2474, 12063, 36870, 36880, 36888, 36897, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36906,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36241, 36252, 13579, 36265, 36729, 36285, 36915, 36928, 36935, 36331, 36946, 36957, 0}, {36241, 36252, 13579, 36265, 36729, 36285, 36915, 36928, 36935, 36331, 36946, 36957, 0}, {36241, 36252, 13579, 36265, 36729, 36285, 36915, 36928, 36935, 36331, 36946, 36957, 0}, {36241, 36252, 13579, 36265, 36729, 36285, 36915, 36928, 36935, 36331, 36946, 36957, 0}, 0, 6, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{843,251,242,0,0,0,0,0,0,0,0,0},{848,269,257,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
        {289, 7281, 7286, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 2, 0, 185, 187, {198,1128,1692,0,0,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {2286,189,1139,1692,0,0,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {2286,189,1139,1692,0,0,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
        {289, 1929, 1932, {4783, 4792, 4798, 4804, 4813, 4819, 4828}, {4835, 4840, 4845, 4850, 4855, 4860, 4865}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4870, 4878, 4887, 4892, 4898, 4902, 4907, 4915, 4921, 4931, 1058, 4939, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, {4949, 4955, 4887, 4962, 4898, 4902, 4967, 4915, 4973, 1105, 1110, 4979, 0}, 2, 1, 185, 187, {198,189,1167,1139,1692,0,0,0,0,0,0,0,0,0},{4985,1242,5002,0,0,0,0,0,0,0},{251,843,4288,5011,5021,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1921, 36877, 36887, {12020, 36993, 9208, 12045, 9223, 9233, 9239}, {9246, 9250, 9254, 12066, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {2438, 2445, 15168, 2459, 2465, 2538, 2542, 12088, 36895, 36905, 36913, 36922, 0}, {2438, 2445, 15168, 2459, 2465, 2538, 2542, 12088, 36895, 36905, 36913, 36922, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{37004,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36721, 36732, 13604, 36743, 36754, 36761, 36770, 36783, 36343, 36356, 36369, 36382, 0}, {36721, 36732, 13604, 36743, 36754, 36761, 36770, 36783, 36343, 36356, 36369, 36382, 0}, {36721, 36732, 13604, 36743, 36754, 36761, 36770, 36783, 36343, 36356, 36369, 36382, 0}, {36721, 36732, 13604, 36743, 36754, 36761, 36770, 36783, 36343, 36356, 36369, 36382, 0}, 0, 0, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{843,251,242,0,0,0,0,0,0,0,0,0},{848,269,257,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1921, 36852, 36862, {11995, 36968, 9208, 12020, 9223, 9233, 9239}, {9246, 9250, 9254, 12041, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {2438, 2445, 15143, 2459, 2465, 2538, 2542, 12063, 36870, 36880, 36888, 36897, 0}, {2438, 2445, 15143, 2459, 2465, 2538, 2542, 12063, 36870, 36880, 36888, 36897, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{36979,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36696, 36707, 13579, 36718, 36729, 36736, 36745, 36758, 36318, 36331, 36344, 36357, 0}, {36696, 36707, 13579, 36718, 36729, 36736, 36745, 36758, 36318, 36331, 36344, 36357, 0}, {36696, 36707, 13579, 36718, 36729, 36736, 36745, 36758, 36318, 36331, 36344, 36357, 0}, {36696, 36707, 13579, 36718, 36729, 36736, 36745, 36758, 36318, 36331, 36344, 36357, 0}, 0, 0, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{843,251,242,0,0,0,0,0,0,0,0,0},{848,269,257,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
        {3613, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 2566, 187, {1692,0,0,0,0,0,0,0,0,0,0,0,0,0},{5505,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {2286,2277,2293,7410,4762,4753,0,0,0,0,0,0,0,0},{29578,4266,0,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {1921, 37015, 37033, {37048, 37061, 37080, 37093, 37108, 37125, 10975}, {37136, 37143, 37150, 37157, 37164, 37171, 37178}, {456, 459, 37185, 465, 468, 459, 465}, {37188, 37201, 501, 510, 15858, 15865, 15874, 542, 37216, 37235, 37250, 37267, 0}, {37188, 37201, 501, 510, 15858, 15865, 15874, 542, 37216, 37235, 37250, 37267, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {198,1692,0,0,0,0,0,0,0,0,0,0,0,0},{10751,14921,1128,20186,20206,222,0,0,0,0},{251,242,3594,843,0,0,0,0,0,0,0,0},{269,257,3602,848,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 2566, 187, {1128,198,189,2286,1139,1692,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {20057, 37015, 37033, {37048, 37061, 37080, 37093, 37108, 37125, 10975}, {37136, 37143, 37150, 37157, 37164, 37171, 37178}, {456, 459, 37185, 465, 468, 459, 465}, {37188, 37201, 501, 510, 15858, 15865, 15874, 542, 37216, 37235, 37250, 37267, 0}, {37188, 37201, 501, 510, 15858, 15865, 15874, 542, 37216, 37235, 37250, 37267, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36931,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, 0, 0, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,9796,2286,1139,1692,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {1921, 36877, 36887, {12020, 36993, 9208, 12045, 9223, 9233, 9239}, {9246, 9250, 9254, 12066, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {2438, 2445, 15168, 2459, 2465, 2538, 2542, 12088, 36895, 36905, 36913, 36922, 0}, {2438, 2445, 15168, 2459, 2465, 2538, 2542, 12088, 36895, 36905, 36913, 36922, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{37004,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {198,1692,0,0,0,0,0,0,0,0,0,0,0,0},{13756,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {1921, 37015, 37033, {37048, 37061, 37080, 8714, 37108, 37125, 10975}, {37136, 37143, 37150, 37361, 37164, 37171, 37178}, {456, 459, 37185, 465, 468, 459, 465}, {37188, 37201, 501, 510, 15858, 37312, 37319, 542, 37216, 37235, 37250, 37267, 0}, {37188, 37201, 501, 510, 15858, 37312, 37319, 542, 37216, 37235, 37250, 37267, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{37004,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {198,1692,0,0,0,0,0,0,0,0,0,0,0,0},{13756,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {37368, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{242,3594,251,843,0,0,0,0,0,0,0,0},{257,3602,269,848,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {1921, 36877, 36887, {12020, 36993, 9208, 12045, 9223, 9233, 9239}, {9246, 9250, 9254, 12066, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {2438, 2445, 15168, 2459, 2465, 2538, 2542, 12088, 36895, 36905, 36913, 36922, 0}, {2438, 2445, 15168, 2459, 2465, 2538, 2542, 12088, 36895, 36905, 36913, 36922, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {9499,9509,6153,9517,9529,9539,9549,1692,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{37004,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, {35423, 35447, 35456, 35465, 35476, 35485, 35498, 35507, 35512, 35523, 35545, 35569, 0}, 0, 1, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {198,2277,0,0,0,0,0,0,0,0,0,0,0,0},{1207,1242,5002,10205,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{37381,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 1, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {1921, 37015, 37033, {37048, 37061, 37080, 8714, 37108, 37125, 10975}, {37136, 37143, 37150, 37361, 37164, 37171, 37178}, {456, 459, 37185, 465, 468, 459, 465}, {37188, 37201, 501, 510, 15858, 37312, 37319, 542, 37216, 37235, 37250, 37267, 0}, {37188, 37201, 501, 510, 15858, 37312, 37319, 542, 37216, 37235, 37250, 37267, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, 0, 1, 691, 187, {9499,9509,6153,9517,9529,9539,9549,37391,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{37004,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {3613, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1692,1735,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {37403, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 1, 2566, 187, {1128,1139,189,2286,0,0,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 1, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{843,251,242,3594,0,0,0,0,0,0,0,0},{848,269,257,3602,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29578,4239,4266,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,278,0,0,0,0,0,0}},
-       {1, 35305, 35308, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35311, 35322, 35337, 35354, 35371, 35384, 35397}, {35408, 35411, 35414, 35417, 35420, 13574, 13565}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, {36266, 36277, 13604, 36290, 36301, 36310, 36321, 36332, 36343, 36356, 36369, 36382, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 8151, 22114, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,242,0,0,0,0,0,0,0,0,0},{269,848,2326,257,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {37403, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,2286,1139,0,0,0,0,0,0,0,0,0,0},{29578,4266,0,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,37414,1692,0,0,0,0,0,0,0,0,0,0},{29578,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {289, 8151, 22114, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {2277,2286,198,189,1692,0,0,0,0,0,0,0,0,0},{1207,1242,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,37414,1692,0,0,0,0,0,0,0,0,0,0},{4211,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,37414,1692,0,0,0,0,0,0,0,0,0,0},{4211,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{37425,0,0,0,0,0,0,0}},
-       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,37414,1692,0,0,0,0,0,0,0,0,0,0},{29578,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {3613, 1929, 1932, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
-       {20057, 37015, 37033, {37048, 37061, 37080, 37093, 37108, 37125, 10975}, {37136, 37143, 37150, 37157, 37164, 37171, 37178}, {456, 459, 37185, 465, 468, 459, 465}, {37188, 37201, 501, 510, 15858, 15865, 15874, 542, 37216, 37235, 37250, 37267, 0}, {37188, 37201, 501, 510, 15858, 15865, 15874, 542, 37216, 37235, 37250, 37267, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36931,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {12109, 36877, 36887, {9187, 9196, 9208, 9215, 9223, 9233, 9239}, {9246, 9250, 9254, 9258, 9262, 9267, 9271}, {0, 0, 0, 0, 0, 0, 0}, {2438, 2445, 15168, 2459, 2465, 2469, 2474, 12088, 36895, 36905, 36913, 36922, 0}, {2438, 2445, 15168, 2459, 2465, 2469, 2474, 12088, 36895, 36905, 36913, 36922, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36931,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {1921, 37015, 37033, {37048, 37061, 37080, 8714, 37108, 37125, 10975}, {37136, 37143, 37150, 37361, 37164, 37171, 37178}, {456, 459, 37185, 465, 468, 459, 465}, {37188, 37201, 501, 510, 15858, 37312, 37319, 542, 37216, 37235, 37250, 37267, 0}, {37188, 37201, 501, 510, 15858, 37312, 37319, 542, 37216, 37235, 37250, 37267, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{37004,0,0,0,0,0,0,0}},
-       {1921, 36877, 36887, {12020, 36993, 9208, 12045, 9223, 9233, 9239}, {9246, 9250, 9254, 12066, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {2438, 2445, 15168, 2459, 2465, 2538, 2542, 12088, 36895, 36905, 36913, 36922, 0}, {2438, 2445, 15168, 2459, 2465, 2538, 2542, 12088, 36895, 36905, 36913, 36922, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{37004,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {35853, 35864, 35888, 35918, 35935, 35957, 35966}, {15057, 15060, 15065, 15071, 15075, 7736, 15080}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {35977, 35990, 501, 36003, 521, 36014, 36023, 542, 36032, 36049, 36064, 36077, 0}, {35977, 35990, 501, 36003, 521, 36014, 36023, 542, 36032, 36049, 36064, 36077, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, 0, 1, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{1242,5505,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {2286,2277,2293,7410,4762,4753,0,0,0,0,0,0,0,0},{29553,4266,0,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1921, 36990, 37008, {37023, 37036, 37055, 37068, 37083, 37100, 10950}, {37111, 37118, 37125, 37132, 37139, 37146, 37153}, {456, 459, 37160, 465, 468, 459, 465}, {37163, 37176, 501, 510, 15833, 15840, 15849, 542, 37191, 37210, 37225, 37242, 0}, {37163, 37176, 501, 510, 15833, 15840, 15849, 542, 37191, 37210, 37225, 37242, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {198,1692,0,0,0,0,0,0,0,0,0,0,0,0},{10709,14896,1128,20161,20181,222,0,0,0,0},{251,242,3594,843,0,0,0,0,0,0,0,0},{269,257,3602,848,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 2566, 187, {1128,198,189,2286,1139,1692,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {20032, 36990, 37008, {37023, 37036, 37055, 37068, 37083, 37100, 10950}, {37111, 37118, 37125, 37132, 37139, 37146, 37153}, {456, 459, 37160, 465, 468, 459, 465}, {37163, 37176, 501, 510, 15833, 15840, 15849, 542, 37191, 37210, 37225, 37242, 0}, {37163, 37176, 501, 510, 15833, 15840, 15849, 542, 37191, 37210, 37225, 37242, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36906,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, 0, 0, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,9796,2286,1139,1692,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{3594,843,0,0,0,0,0,0,0,0,0,0},{3602,848,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1921, 36852, 36862, {11995, 36968, 9208, 12020, 9223, 9233, 9239}, {9246, 9250, 9254, 12041, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {2438, 2445, 15143, 2459, 2465, 2538, 2542, 12063, 36870, 36880, 36888, 36897, 0}, {2438, 2445, 15143, 2459, 2465, 2538, 2542, 12063, 36870, 36880, 36888, 36897, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{36979,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {198,1692,0,0,0,0,0,0,0,0,0,0,0,0},{13731,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1921, 36990, 37008, {37023, 37036, 37055, 8714, 37083, 37100, 10950}, {37111, 37118, 37125, 37336, 37139, 37146, 37153}, {456, 459, 37160, 465, 468, 459, 465}, {37163, 37176, 501, 510, 15833, 37287, 37294, 542, 37191, 37210, 37225, 37242, 0}, {37163, 37176, 501, 510, 15833, 37287, 37294, 542, 37191, 37210, 37225, 37242, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{36979,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {198,1692,0,0,0,0,0,0,0,0,0,0,0,0},{13731,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {37343, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{242,3594,251,843,0,0,0,0,0,0,0,0},{257,3602,269,848,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1921, 36852, 36862, {11995, 36968, 9208, 12020, 9223, 9233, 9239}, {9246, 9250, 9254, 12041, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {2438, 2445, 15143, 2459, 2465, 2538, 2542, 12063, 36870, 36880, 36888, 36897, 0}, {2438, 2445, 15143, 2459, 2465, 2538, 2542, 12063, 36870, 36880, 36888, 36897, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {9499,9509,6153,9517,9529,9539,9549,1692,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{36979,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, {35403, 35427, 35436, 35445, 35456, 35465, 35478, 35487, 35492, 35503, 35525, 35549, 0}, 0, 1, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {198,2277,0,0,0,0,0,0,0,0,0,0,0,0},{1207,1242,5002,10163,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{37356,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 1, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1921, 36990, 37008, {37023, 37036, 37055, 8714, 37083, 37100, 10950}, {37111, 37118, 37125, 37336, 37139, 37146, 37153}, {456, 459, 37160, 465, 468, 459, 465}, {37163, 37176, 501, 510, 15833, 37287, 37294, 542, 37191, 37210, 37225, 37242, 0}, {37163, 37176, 501, 510, 15833, 37287, 37294, 542, 37191, 37210, 37225, 37242, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, 0, 1, 691, 187, {9499,9509,6153,9517,9529,9539,9549,37366,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{36979,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {3613, 1929, 1932, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1692,1735,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {37378, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 1, 2566, 187, {1128,1139,189,2286,0,0,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 1, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{843,251,242,3594,0,0,0,0,0,0,0,0},{848,269,257,3602,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,2286,1139,1692,0,0,0,0,0,0,0,0,0},{29553,4239,4266,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,278,0,0,0,0,0,0}},
+       {1, 35285, 35288, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35291, 35302, 35317, 35334, 35351, 35364, 35377}, {35388, 35391, 35394, 35397, 35400, 13549, 13540}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, {36241, 36252, 13579, 36265, 36276, 36285, 36296, 36307, 36318, 36331, 36344, 36357, 0}, 0, 6, 185, 187, {198,189,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{242,251,843,0,0,0,0,0,0,0,0,0},{257,269,848,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 8151, 22089, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 2566, 187, {1128,1139,2293,4762,1692,0,0,0,0,0,0,0,0,0},{5505,1242,0,0,0,0,0,0,0,0},{251,843,242,0,0,0,0,0,0,0,0,0},{269,848,2326,257,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {37378, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,2286,1139,0,0,0,0,0,0,0,0,0,0},{29553,4266,0,0,0,0,0,0,0,0},{242,3594,843,251,0,0,0,0,0,0,0,0},{257,3602,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,37389,1692,0,0,0,0,0,0,0,0,0,0},{29553,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {289, 8151, 22089, {3620, 3627, 3634, 3642, 3652, 3661, 3668}, {3677, 3681, 3685, 3689, 3693, 3697, 3701}, {2023, 2428, 2430, 3705, 2430, 2434, 2023}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {3707, 3715, 3724, 2696, 3730, 3734, 3739, 2716, 2723, 3744, 2741, 3752, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, {2759, 2763, 3761, 2772, 3730, 2776, 2780, 2784, 2788, 3765, 2796, 3769, 0}, 0, 0, 185, 187, {2277,2286,198,189,1692,0,0,0,0,0,0,0,0,0},{1207,1242,0,0,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,37389,1692,0,0,0,0,0,0,0,0,0,0},{4211,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,37389,1692,0,0,0,0,0,0,0,0,0,0},{4211,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{37400,0,0,0,0,0,0,0}},
+       {3883, 872, 878, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {198,189,37389,1692,0,0,0,0,0,0,0,0,0,0},{29553,0,0,0,0,0,0,0,0,0},{242,251,0,0,0,0,0,0,0,0,0,0},{257,269,0,0,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {3613, 1929, 1932, {3895, 3903, 3909, 3916, 3927, 3934, 3942}, {3950, 3955, 3960, 3965, 3971, 3976, 3981}, {2673, 2436, 2428, 2428, 3987, 3989, 2023}, {3991, 3997, 4005, 4011, 4017, 4022, 4028, 4034, 4041, 4052, 4060, 4070, 0}, {4080, 4086, 4094, 1012, 4100, 4105, 4111, 4117, 4124, 1050, 4135, 4145, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, {4155, 4160, 3960, 4165, 4170, 4175, 4180, 4185, 4190, 4196, 4201, 4206, 0}, 0, 0, 185, 187, {3773,3782,3789,3798,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{1286,0,0,0,0,0,0,0}},
+       {20032, 36990, 37008, {37023, 37036, 37055, 37068, 37083, 37100, 10950}, {37111, 37118, 37125, 37132, 37139, 37146, 37153}, {456, 459, 37160, 465, 468, 459, 465}, {37163, 37176, 501, 510, 15833, 15840, 15849, 542, 37191, 37210, 37225, 37242, 0}, {37163, 37176, 501, 510, 15833, 15840, 15849, 542, 37191, 37210, 37225, 37242, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36906,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {12084, 36852, 36862, {9187, 9196, 9208, 9215, 9223, 9233, 9239}, {9246, 9250, 9254, 9258, 9262, 9267, 9271}, {0, 0, 0, 0, 0, 0, 0}, {2438, 2445, 15143, 2459, 2465, 2469, 2474, 12063, 36870, 36880, 36888, 36897, 0}, {2438, 2445, 15143, 2459, 2465, 2469, 2474, 12063, 36870, 36880, 36888, 36897, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36906,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {1921, 36990, 37008, {37023, 37036, 37055, 8714, 37083, 37100, 10950}, {37111, 37118, 37125, 37336, 37139, 37146, 37153}, {456, 459, 37160, 465, 468, 459, 465}, {37163, 37176, 501, 510, 15833, 37287, 37294, 542, 37191, 37210, 37225, 37242, 0}, {37163, 37176, 501, 510, 15833, 37287, 37294, 542, 37191, 37210, 37225, 37242, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{36979,0,0,0,0,0,0,0}},
+       {1921, 36852, 36862, {11995, 36968, 9208, 12020, 9223, 9233, 9239}, {9246, 9250, 9254, 12041, 9262, 9267, 9271}, {9275, 9277, 9279, 9281, 9283, 9277, 9281}, {2438, 2445, 15143, 2459, 2465, 2538, 2542, 12063, 36870, 36880, 36888, 36897, 0}, {2438, 2445, 15143, 2459, 2465, 2538, 2542, 12063, 36870, 36880, 36888, 36897, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{36979,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {35828, 35839, 35863, 35893, 35910, 35932, 35941}, {15032, 15035, 15040, 15046, 15050, 7736, 15055}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {35952, 35965, 501, 35978, 521, 35989, 35998, 542, 36007, 36024, 36039, 36052, 0}, {35952, 35965, 501, 35978, 521, 35989, 35998, 542, 36007, 36024, 36039, 36052, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, 0, 1, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{1242,5505,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{269,0,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
        {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {1424, 1431, 1438, 1445, 1452, 1459, 1466}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1501, 1508, 1515, 1522, 1529, 1536, 1543, 1550, 1557, 1564, 1571, 1581, 0}, {1501, 1508, 1515, 1522, 1529, 1536, 1543, 1550, 1557, 1564, 1571, 1581, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {1654,1663,1672,1681,1692,1703,1714,1721,1728,1735,0,0,0,0},{1744,1766,1794,1822,1837,0,0,0,0,0},{843,251,1858,1866,0,0,0,0,0,0,0,0},{848,269,1875,1886,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
-       {1921, 35760, 35765, {2345, 10060, 35770, 2368, 2375, 2383, 35777}, {2398, 35785, 35790, 2411, 2415, 2419, 35794}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, 2, 1, 691, 187, {1156,7519,1167,4762,2804,1692,0,0,0,0,0,0,0,0},{2300,4769,0,0,0,0,0,0,0,0},{251,843,7529,7539,4288,2321,7550,7561,0,0,0,0},{269,848,7571,7585,4302,2337,7598,7612,0},{1301,7625,7635,0,0,0,0,0}},
-       {12109, 36877, 36887, {9187, 9196, 9208, 9215, 9223, 9233, 9239}, {9246, 9250, 9254, 9258, 9262, 9267, 9271}, {0, 0, 0, 0, 0, 0, 0}, {2438, 2445, 15168, 2459, 2465, 2469, 2474, 12088, 36895, 36905, 36913, 36922, 0}, {2438, 2445, 15168, 2459, 2465, 2469, 2474, 12088, 36895, 36905, 36913, 36922, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12095, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36931,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {14968, 14974, 14988, 15011, 15025, 15041, 15048}, {15057, 15060, 15065, 15071, 15075, 7736, 15080}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {15084, 15091, 10374, 15098, 3730, 15104, 15110, 15116, 15123, 15132, 15140, 15147, 0}, {15154, 15161, 15168, 15173, 15179, 15183, 15188, 15193, 15200, 15209, 15217, 15224, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, {15231, 8135, 2530, 2534, 15179, 15235, 15239, 15243, 15247, 2554, 15251, 15255, 0}, 0, 1, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{15259,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 1929, 1932, {36090, 36105, 36120, 36135, 36152, 36169, 36178}, {36189, 36196, 36203, 36210, 36217, 19832, 36224}, {36231, 19439, 8811, 8814, 8808, 19436, 19846}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, 0, 1, 691, 187, {1156,1167,36234,4762,189,1692,0,0,0,0,0,0,0,0},{36245,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {5619, 26213, 26218, {26223, 26230, 26241, 26254, 26267, 26278, 26291}, {26302, 26307, 26312, 26317, 26322, 26327, 26332}, {6605, 6607, 6609, 6611, 6613, 6615, 6617}, {26337, 26363, 26391, 26421, 26451, 26477, 26507, 26533, 26561, 26585, 26613, 26650, 0}, {26337, 26363, 26391, 26421, 26451, 26477, 26507, 26533, 26561, 26585, 26613, 26650, 0}, {26689, 26701, 26713, 26725, 26737, 26749, 26761, 26773, 26785, 26797, 26810, 26823, 0}, {26689, 26701, 26713, 26725, 26737, 26749, 26761, 26773, 26785, 26797, 26810, 26823, 0}, 0, 0, 2566, 187, {1692,0,0,0,0,0,0,0,0,0,0,0,0,0},{26836,26890,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{26926,0,0,0,0,0,0,0}},
-       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35236, 35243, 35250, 35257, 35264, 35271, 35278}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,6632,1822,1837,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
-       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35236, 35243, 35250, 35257, 35264, 35271, 35278}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,6632,1822,1837,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
+       {1921, 35740, 35745, {2345, 10060, 35750, 2368, 2375, 2383, 35757}, {2398, 10088, 35765, 2411, 2415, 2419, 35769}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, 2, 1, 691, 187, {1156,7519,1167,4762,2804,1692,0,0,0,0,0,0,0,0},{2300,4769,0,0,0,0,0,0,0,0},{251,843,7529,7539,4288,2321,7550,7561,0,0,0,0},{269,848,7571,7585,4302,2337,7598,7612,0},{1301,7625,7635,0,0,0,0,0}},
+       {12084, 36852, 36862, {9187, 9196, 9208, 9215, 9223, 9233, 9239}, {9246, 9250, 9254, 9258, 9262, 9267, 9271}, {0, 0, 0, 0, 0, 0, 0}, {2438, 2445, 15143, 2459, 2465, 2469, 2474, 12063, 36870, 36880, 36888, 36897, 0}, {2438, 2445, 15143, 2459, 2465, 2469, 2474, 12063, 36870, 36880, 36888, 36897, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, {2522, 2526, 2530, 2534, 2465, 2538, 2542, 12070, 2550, 2554, 2558, 2562, 0}, 0, 1, 691, 187, {4753,4762,2266,1156,36906,1167,9806,1692,0,0,0,0,0,0},{2300,4769,2818,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {14943, 14949, 14963, 14986, 15000, 15016, 15023}, {15032, 15035, 15040, 15046, 15050, 7736, 15055}, {6617, 6605, 6607, 6609, 6611, 6613, 6615}, {15059, 15066, 10332, 15073, 3730, 15079, 15085, 15091, 15098, 15107, 15115, 15122, 0}, {15129, 15136, 15143, 15148, 15154, 15158, 15163, 15168, 15175, 15184, 15192, 15199, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, {15206, 8135, 2530, 2534, 15154, 15210, 15214, 15218, 15222, 2554, 15226, 15230, 0}, 0, 1, 691, 187, {1156,1167,4762,189,1692,0,0,0,0,0,0,0,0,0},{15234,0,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 1929, 1932, {36065, 36080, 36095, 36110, 36127, 36144, 36153}, {36164, 36171, 36178, 36185, 36192, 19807, 36199}, {36206, 19414, 8811, 8814, 8808, 19411, 19821}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, 0, 1, 691, 187, {1156,1167,36209,4762,189,1692,0,0,0,0,0,0,0,0},{36220,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {5619, 26188, 26193, {26198, 26205, 26216, 26229, 26242, 26253, 26266}, {26277, 26282, 26287, 26292, 26297, 26302, 26307}, {6605, 6607, 6609, 6611, 6613, 6615, 6617}, {26312, 26338, 26366, 26396, 26426, 26452, 26482, 26508, 26536, 26560, 26588, 26625, 0}, {26312, 26338, 26366, 26396, 26426, 26452, 26482, 26508, 26536, 26560, 26588, 26625, 0}, {26664, 26676, 26688, 26700, 26712, 26724, 26736, 26748, 26760, 26772, 26785, 26798, 0}, {26664, 26676, 26688, 26700, 26712, 26724, 26736, 26748, 26760, 26772, 26785, 26798, 0}, 0, 0, 2566, 187, {1692,0,0,0,0,0,0,0,0,0,0,0,0,0},{26811,26865,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{26901,0,0,0,0,0,0,0}},
+       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35216, 35223, 35230, 35237, 35244, 35251, 35258}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,6632,1822,1837,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
+       {1327, 1340, 1347, {1354, 1364, 1374, 1384, 1394, 1404, 1414}, {35216, 35223, 35230, 35237, 35244, 35251, 35258}, {1473, 1477, 1481, 1485, 1489, 1493, 1497}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, {1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1636, 1642, 1648, 0}, 0, 0, 185, 187, {2277,2286,189,1714,1735,1654,1681,1692,0,0,0,0,0,0},{1744,6632,1822,1837,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{1898,1914,0,0,0,0,0,0}},
        {1921, 7281, 7286, {2345, 2353, 2360, 2368, 2375, 2383, 2390}, {7485, 7490, 7494, 7498, 7502, 7506, 7510}, {2023, 2428, 2430, 2432, 2430, 2434, 2436}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2438, 2445, 4887, 2459, 4898, 2469, 2474, 2479, 2486, 2496, 2504, 6121, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, {2522, 2526, 2530, 2534, 4898, 2538, 2542, 2546, 2550, 2554, 2558, 7515, 0}, 2, 1, 691, 187, {1156,7519,1167,4762,2804,1692,0,0,0,0,0,0,0,0},{2300,4769,0,0,0,0,0,0,0,0},{251,843,7529,7539,4288,2321,7550,7561,0,0,0,0},{269,848,7571,7585,4302,2337,7598,7612,0},{1301,7625,7635,0,0,0,0,0}},
-       {1921, 37015, 37033, {37048, 37061, 37080, 8714, 37108, 37125, 10975}, {37136, 37143, 37150, 37361, 37164, 37171, 37178}, {456, 459, 37185, 465, 468, 459, 465}, {37188, 37201, 501, 510, 15858, 37312, 37319, 542, 37216, 37235, 37250, 37267, 0}, {37188, 37201, 501, 510, 15858, 37312, 37319, 542, 37216, 37235, 37250, 37267, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, {37284, 37291, 37298, 37305, 15858, 37312, 37319, 37326, 37333, 37340, 37347, 37354, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{37004,0,0,0,0,0,0,0}},
-       {1, 13053, 13065, {13077, 13092, 13107, 13122, 13139, 13158, 13169}, {13180, 13187, 13194, 13201, 13208, 13215, 13222}, {0, 0, 0, 0, 0, 0, 0}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13229, 13240, 8845, 13253, 8867, 13264, 13271, 8892, 13278, 13293, 13306, 13317, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, {13330, 13337, 13344, 13351, 8867, 13264, 13271, 13358, 13365, 13372, 13379, 13386, 0}, 0, 1, 691, 187, {1156,1167,4762,1128,189,0,0,0,0,0,0,0,0,0},{13393,13411,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {20220, 1929, 1932, {20227, 20237, 20246, 20255, 20266, 20276, 20281}, {20288, 20294, 20299, 20304, 20309, 10828, 20313}, {20318, 2673, 2023, 7736, 2018, 3987, 2023}, {15084, 15091, 10374, 15098, 3730, 20320, 20325, 20330, 15123, 15132, 15140, 15147, 0}, {15084, 15091, 10374, 15098, 3730, 20320, 20325, 20330, 15123, 15132, 15140, 15147, 0}, {20337, 20342, 3761, 2772, 3730, 20320, 20325, 20346, 10812, 2792, 20350, 20355, 0}, {20337, 20342, 3761, 2772, 3730, 20320, 20325, 20346, 10812, 2792, 20350, 20355, 0}, 0, 1, 691, 187, {1156,0,0,0,0,0,0,0,0,0,0,0,0,0},{20359,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
-       {289, 30915, 30925, {30938, 30945, 30951, 30958, 30964, 30970, 30978}, {30988, 30992, 30996, 31000, 31004, 31008, 31012}, {12842, 12842, 12842, 12842, 12842, 12842, 12842}, {31018, 31027, 10131, 31036, 31042, 31048, 31054, 31061, 31067, 31076, 31085, 31093, 0}, {31018, 31027, 10131, 31036, 31042, 31048, 31054, 31061, 31067, 31076, 31085, 31093, 0}, {31102, 31106, 3761, 31110, 3730, 31114, 31118, 31122, 31127, 31131, 31137, 31141, 0}, {31102, 31106, 3761, 31110, 3730, 31114, 31118, 31122, 31127, 31131, 31137, 31141, 0}, 0, 0, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10751,222,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
-       {289, 0, 0, {31916, 31923, 31931, 31938, 31945, 31953, 31961}, {31968, 31971, 31974, 31977, 31980, 31983, 31986}, {2436, 2436, 2430, 2436, 12842, 3987, 12842}, {31989, 31997, 32007, 32013, 32021, 32026, 32031, 32036, 32043, 20167, 32051, 32059, 0}, {31989, 31997, 32007, 32013, 32021, 32026, 32031, 32036, 32043, 20167, 32051, 32059, 0}, {2759, 32067, 3761, 32071, 3730, 31114, 31118, 32075, 3701, 2792, 32079, 16383, 0}, {2759, 32067, 3761, 32071, 3730, 31114, 31118, 32075, 3701, 2792, 32079, 16383, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20186,20206,222,10751,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}}
+       {1921, 36990, 37008, {37023, 37036, 37055, 8714, 37083, 37100, 10950}, {37111, 37118, 37125, 37336, 37139, 37146, 37153}, {456, 459, 37160, 465, 468, 459, 465}, {37163, 37176, 501, 510, 15833, 37287, 37294, 542, 37191, 37210, 37225, 37242, 0}, {37163, 37176, 501, 510, 15833, 37287, 37294, 542, 37191, 37210, 37225, 37242, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, {37259, 37266, 37273, 37280, 15833, 37287, 37294, 37301, 37308, 37315, 37322, 37329, 0}, 0, 1, 691, 187, {9499,9517,0,0,0,0,0,0,0,0,0,0,0,0},{9561,9575,9590,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{36979,0,0,0,0,0,0,0}},
+       {1, 13028, 13040, {13052, 13067, 13082, 13097, 13114, 13133, 13144}, {13155, 13162, 13169, 13176, 13183, 13190, 13197}, {0, 0, 0, 0, 0, 0, 0}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13204, 13215, 8845, 13228, 8867, 13239, 13246, 8892, 13253, 13268, 13281, 13292, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, {13305, 13312, 13319, 13326, 8867, 13239, 13246, 13333, 13340, 13347, 13354, 13361, 0}, 0, 1, 691, 187, {1156,1167,4762,1128,189,0,0,0,0,0,0,0,0,0},{13368,13386,0,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {20195, 1929, 1932, {20202, 20212, 20221, 20230, 20241, 20251, 20256}, {20263, 20269, 20274, 20279, 20284, 10786, 20288}, {20293, 2673, 2023, 7736, 2018, 3987, 2023}, {15059, 15066, 10332, 15073, 3730, 20295, 20300, 20305, 15098, 15107, 15115, 15122, 0}, {15059, 15066, 10332, 15073, 3730, 20295, 20300, 20305, 15098, 15107, 15115, 15122, 0}, {20312, 20317, 3761, 2772, 3730, 20295, 20300, 20321, 10770, 2792, 20325, 20330, 0}, {20312, 20317, 3761, 2772, 3730, 20295, 20300, 20321, 10770, 2792, 20325, 20330, 0}, 0, 1, 691, 187, {1156,0,0,0,0,0,0,0,0,0,0,0,0,0},{20334,1242,5505,0,0,0,0,0,0,0},{251,843,0,0,0,0,0,0,0,0,0,0},{269,848,0,0,0,0,0,0,0},{1301,0,0,0,0,0,0,0}},
+       {289, 30890, 30900, {30913, 30920, 30926, 30933, 30939, 30945, 30953}, {30963, 30967, 30971, 30975, 30979, 30983, 30987}, {12817, 12817, 12817, 12817, 12817, 12817, 12817}, {30993, 31002, 31011, 31016, 31022, 31028, 31034, 31041, 31047, 31056, 31065, 31073, 0}, {30993, 31002, 31011, 31016, 31022, 31028, 31034, 31041, 31047, 31056, 31065, 31073, 0}, {31082, 31086, 3761, 31090, 3730, 31094, 31098, 31102, 31107, 31111, 31117, 31121, 0}, {31082, 31086, 3761, 31090, 3730, 31094, 31098, 31102, 31107, 31111, 31117, 31121, 0}, 0, 0, 2566, 187, {1128,1139,1692,0,0,0,0,0,0,0,0,0,0,0},{10709,222,0,0,0,0,0,0,0,0},{843,251,0,0,0,0,0,0,0,0,0,0},{848,269,0,0,0,0,0,0,0},{278,0,0,0,0,0,0,0}},
+       {289, 0, 0, {31896, 31903, 31911, 31918, 31925, 31933, 31941}, {31948, 31951, 31954, 31957, 31960, 31963, 31966}, {2436, 2436, 2430, 2436, 12817, 3987, 12817}, {31969, 31977, 31987, 31993, 32001, 32006, 32011, 32016, 32023, 20142, 32031, 32039, 0}, {31969, 31977, 31987, 31993, 32001, 32006, 32011, 32016, 32023, 20142, 32031, 32039, 0}, {2759, 32047, 3761, 32051, 3730, 31094, 31098, 32055, 3701, 2792, 32059, 16358, 0}, {2759, 32047, 3761, 32051, 3730, 31094, 31098, 32055, 3701, 2792, 32059, 16358, 0}, 0, 0, 185, 187, {2277,2286,189,198,1735,1692,3809,0,0,0,0,0,0,0},{20161,20181,222,10709,0,0,0,0,0,0},{3594,242,843,251,0,0,0,0,0,0,0,0},{3602,257,848,269,0,0,0,0,0},{278,0,0,0,0,0,0,0}}
 };
 
 
 static const NumberFormatEntry number_format_entries [] = {
-       {691, 37441, 691, 37443, 37446, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37504, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37526, 37535, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37543, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37543, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37546, 37510, 37512, 37516, 37550, 37562, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37574, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37577, 37588, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37599, 37613, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 37501, 37522, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37647, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37512, 37516, 37656, 37664, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37672, 37510, 37512, 37516, 37676, 37487, 37689, 37694, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37699, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37574, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37628, 37702, 2566, 37520, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37712, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37716, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37720, 37730, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 0, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37739, 37510, 37512, 37516, 37743, 37762, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37781, 37510, 37512, 37516, 37628, 37702, 2566, 37520, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37501, 691, 37784, 37788, 37510, 37512, 37516, 37792, 37801, 2566, 37520, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 0, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37810, 37510, 37818, 37516, 37835, 37863, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37890, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 2, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37512, 37516, 37550, 37562, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 37501, 37893, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 37501, 37574, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37906, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37910, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37914, 37510, 37917, 37516, 37940, 37487, 37956, 37964, 3, 0, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37972, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37975, 37510, 37979, 37516, 37477, 37487, 2566, 37520, 5, 1, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37996, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 38000, 38014, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37501, 37441, 37501, 37522, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 38027, 37516, 38041, 38053, 2566, 37520, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 38064, 37441, 37501, 38066, 37510, 37512, 37516, 38069, 38080, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37441, 0, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
-       {185, 37441, 185, 37443, 38090, 37456, 38099, 37474, 38110, 37487, 38125, 37964, 3, 0, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38132, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 691, 38136, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 691, 0, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 38142, 38152, 2566, 37520, 8, 3, 10, 3, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38161, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37501, 10836, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37501, 10836, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 10836, 37510, 38168, 37516, 37477, 37487, 2566, 37520, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 38064, 37441, 37501, 10836, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 0, 37510, 38174, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37574, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 12, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 37522, 37510, 0, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 12, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37522, 37510, 0, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38219, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {2566, 37501, 37441, 37501, 0, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 0, 37510, 38222, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38239, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37443, 0, 37456, 37512, 37474, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38243, 37510, 38250, 37516, 37477, 37487, 2566, 37520, 12, 2, 1, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 0, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 0, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 2, 2, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 0, 37516, 37477, 37487, 2566, 37520, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
-       {38277, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {37441, 37501, 37441, 37441, 0, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37543, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
-       {691, 37441, 691, 37441, 38279, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 691, 38282, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}},
-       {691, 37441, 691, 691, 38286, 37510, 38290, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, 0}, {3, 0}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38215, 37510, 0, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38327, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 14, 2, 0, 0, 1, 2, 2, {3, -1}, {3, 2}},
-       {691, 37441, 691, 37441, 38335, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 1, {3, 0}, {3, 0}},
-       {37441, 38064, 37441, 37501, 0, 37510, 0, 37516, 37656, 37664, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38342, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
-       {691, 37441, 691, 37443, 38355, 37456, 0, 37516, 37477, 37487, 2566, 37520, 3, 0, 4, 2, 3, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38358, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 0, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38362, 37510, 0, 37516, 37477, 37487, 2566, 37520, 9, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37501, 10836, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37574, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, 0}},
-       {691, 37441, 691, 37441, 38362, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37543, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37784, 0, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37441, 37810, 37510, 0, 37516, 37477, 37487, 2566, 37520, 5, 1, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 691, 38366, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38279, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 37446, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37504, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37526, 37535, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38369, 37510, 38373, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37546, 37510, 37512, 37516, 37550, 37562, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37574, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37577, 37588, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37599, 37613, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37647, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37512, 37516, 37656, 37664, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37672, 37510, 37512, 37516, 37676, 37487, 37689, 37694, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37699, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37574, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37628, 37702, 2566, 37520, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37712, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37716, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37720, 37730, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37574, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37739, 37510, 37512, 37516, 37743, 37762, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37781, 37510, 37512, 37516, 37628, 37702, 2566, 37520, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37501, 691, 37784, 37788, 37510, 37512, 37516, 37792, 37801, 2566, 37520, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 0, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37810, 37510, 37818, 37516, 37835, 37863, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37890, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 2, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37512, 37516, 37550, 37562, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 37501, 37893, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 37501, 37574, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37906, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37910, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37914, 37510, 37917, 37516, 37940, 37487, 37956, 37964, 3, 0, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37972, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37975, 37510, 37979, 37516, 37477, 37487, 2566, 37520, 5, 1, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37996, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 38000, 38014, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37501, 37441, 37501, 37522, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 38027, 37516, 38041, 38053, 2566, 37520, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 38064, 37441, 37501, 38066, 37510, 37512, 37516, 38069, 38080, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37441, 38383, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
-       {185, 37441, 185, 37443, 38090, 37456, 38099, 37474, 38110, 37487, 38125, 37964, 3, 0, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38132, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 691, 38136, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 691, 38390, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 38142, 38152, 2566, 37520, 8, 3, 10, 3, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38161, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37501, 10836, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37501, 10836, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 10836, 37510, 38168, 37516, 37477, 37487, 2566, 37520, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 38064, 37441, 37501, 10836, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 0, 37510, 38174, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37574, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 12, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 37522, 37510, 0, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37574, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 12, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38239, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37443, 38395, 37456, 37512, 37474, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38215, 37510, 38250, 37516, 37477, 37487, 2566, 37520, 12, 2, 1, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 0, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 2, 2, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38215, 37510, 0, 37516, 37477, 37487, 2566, 37520, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
-       {38277, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 37543, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
-       {691, 37441, 691, 37441, 38279, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 691, 38282, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}},
-       {691, 37441, 691, 691, 38286, 37510, 38290, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, 0}, {3, 0}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38215, 37510, 0, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37441, 38327, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 14, 2, 0, 0, 1, 2, 2, {3, -1}, {3, 2}},
-       {691, 37441, 691, 37441, 38335, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 1, {3, 0}, {3, 0}},
-       {691, 37441, 691, 37441, 38342, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
-       {691, 37441, 691, 37443, 38355, 37456, 0, 37516, 37477, 37487, 2566, 37520, 3, 0, 4, 2, 3, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38358, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38362, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38362, 37510, 0, 37516, 37477, 37487, 2566, 37520, 9, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37501, 10836, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37574, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, 0}},
-       {691, 37441, 691, 37441, 38362, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37543, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37441, 37810, 37510, 0, 37516, 37477, 37487, 2566, 37520, 5, 1, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 691, 38366, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38279, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38401, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37712, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37501, 37441, 38411, 37788, 37510, 37512, 37516, 37577, 37588, 2566, 37520, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38279, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37656, 37664, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37501, 37441, 38411, 37788, 37510, 37512, 37516, 37628, 37702, 2566, 37520, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37720, 37730, 2566, 37520, 12, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37574, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37512, 37516, 37628, 37702, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 691, 38413, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37522, 37510, 0, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37443, 38421, 37456, 37512, 37474, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38428, 37510, 38250, 37516, 37477, 37487, 2566, 37520, 12, 2, 1, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {691, 37441, 691, 37443, 38432, 37456, 37512, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 38373, 37516, 37477, 37487, 2566, 37520, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37577, 37588, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37626, 37510, 37512, 37516, 37656, 37664, 2566, 37520, 15, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37899, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 691, 38442, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 0, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37577, 37588, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 8056, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37501, 37441, 38411, 37788, 37510, 37512, 37516, 37656, 37664, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38452, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 2, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38455, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38465, 37510, 38373, 37516, 37477, 37487, 2566, 37520, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 38411, 0, 37510, 37512, 37516, 37577, 37588, 2566, 37520, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38470, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 0, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 691, 37522, 37510, 37512, 37516, 37656, 37664, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38452, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38474, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37522, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38484, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 14, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37522, 37510, 37512, 37516, 37656, 37664, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38452, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 691, 38488, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 10836, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38498, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38503, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38513, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38498, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38517, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38527, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38532, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38542, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38546, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38554, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 691, 38564, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 14, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37522, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38574, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38358, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 9, 2, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38584, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 9, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38594, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38604, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 14, 2, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37443, 38608, 37456, 37459, 37474, 37477, 37487, 2566, 37496, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38215, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
-       {37441, 691, 37441, 691, 38618, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 14, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 2436, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 12, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38621, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37626, 37510, 37512, 37516, 37628, 37638, 2566, 37520, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
-       {37441, 691, 37441, 691, 38498, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38452, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38624, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38632, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 691, 38413, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 37543, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37574, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38452, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 691, 38390, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37443, 38421, 37456, 37512, 37474, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37441, 0, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38637, 37510, 38373, 37516, 37477, 37487, 2566, 37520, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38637, 37510, 38373, 37516, 37477, 37487, 2566, 37520, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37501, 37574, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 691, 37441, 691, 38632, 37510, 37512, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {37441, 37501, 37441, 37441, 38383, 37510, 0, 37516, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
-       {37441, 37501, 37441, 37443, 38395, 37456, 37512, 37474, 37477, 37487, 2566, 37520, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {37441, 38064, 37441, 37501, 0, 37510, 0, 37516, 37656, 37664, 2566, 37520, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {691, 37441, 691, 37441, 38362, 37510, 0, 37516, 37477, 37487, 2566, 37520, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}}
+       {691, 37416, 691, 37418, 37421, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37479, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37501, 37510, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37518, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37518, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37521, 37485, 37487, 37491, 37525, 37537, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37549, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37552, 37563, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37574, 37588, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 37476, 37497, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37622, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37487, 37491, 37631, 37639, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37647, 37485, 37487, 37491, 37651, 37462, 37664, 37669, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37674, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37549, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37603, 37677, 2566, 37495, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37687, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37691, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37695, 37705, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 0, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37714, 37485, 37487, 37491, 37718, 37737, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37756, 37485, 37487, 37491, 37603, 37677, 2566, 37495, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37476, 691, 37759, 37763, 37485, 37487, 37491, 37767, 37776, 2566, 37495, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 0, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37785, 37485, 37793, 37491, 37810, 37838, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37865, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 2, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37487, 37491, 37525, 37537, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 37476, 37868, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 37476, 37549, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37881, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37885, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37889, 37485, 37892, 37491, 37915, 37462, 37931, 37939, 3, 0, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37947, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37950, 37485, 37954, 37491, 37452, 37462, 2566, 37495, 5, 1, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37971, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37975, 37989, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37476, 37416, 37476, 37497, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 38002, 37491, 38016, 38028, 2566, 37495, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 38039, 37416, 37476, 38041, 37485, 37487, 37491, 38044, 38055, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37416, 0, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {185, 37416, 185, 37418, 38065, 37431, 38074, 37449, 38085, 37462, 38100, 37939, 3, 0, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38107, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 691, 38111, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 691, 0, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 38117, 38127, 2566, 37495, 8, 3, 10, 3, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38136, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37476, 10794, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37476, 10794, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 10794, 37485, 38143, 37491, 37452, 37462, 2566, 37495, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 38039, 37416, 37476, 10794, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 0, 37485, 38149, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37549, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 12, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 37497, 37485, 0, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 12, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37497, 37485, 0, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38194, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {2566, 37476, 37416, 37476, 0, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 0, 37485, 38197, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38214, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37418, 0, 37431, 37487, 37449, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38218, 37485, 38225, 37491, 37452, 37462, 2566, 37495, 12, 2, 1, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 0, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 0, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 2, 2, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 0, 37491, 37452, 37462, 2566, 37495, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
+       {38252, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {37416, 37476, 37416, 37416, 0, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37518, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {691, 37416, 691, 37416, 38254, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 691, 38257, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}},
+       {691, 37416, 691, 691, 38261, 37485, 38265, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, 0}, {3, 0}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38190, 37485, 0, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38302, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 14, 2, 0, 0, 1, 2, 2, {3, -1}, {3, 2}},
+       {691, 37416, 691, 37416, 38310, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 1, {3, 0}, {3, 0}},
+       {37416, 38039, 37416, 37476, 0, 37485, 0, 37491, 37631, 37639, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38317, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
+       {691, 37416, 691, 37418, 38330, 37431, 0, 37491, 37452, 37462, 2566, 37495, 3, 0, 4, 2, 3, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38333, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 0, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38337, 37485, 0, 37491, 37452, 37462, 2566, 37495, 9, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37476, 10794, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37549, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, 0}},
+       {691, 37416, 691, 37416, 38337, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37518, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37759, 0, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37416, 37785, 37485, 0, 37491, 37452, 37462, 2566, 37495, 5, 1, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 691, 38341, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38254, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 37421, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37479, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37501, 37510, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38344, 37485, 38348, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37521, 37485, 37487, 37491, 37525, 37537, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37549, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37552, 37563, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37574, 37588, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37622, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37487, 37491, 37631, 37639, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37647, 37485, 37487, 37491, 37651, 37462, 37664, 37669, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37674, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37549, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37603, 37677, 2566, 37495, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37687, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37691, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37695, 37705, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37549, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37714, 37485, 37487, 37491, 37718, 37737, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37756, 37485, 37487, 37491, 37603, 37677, 2566, 37495, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37476, 691, 37759, 37763, 37485, 37487, 37491, 37767, 37776, 2566, 37495, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 0, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37785, 37485, 37793, 37491, 37810, 37838, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37865, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 2, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37487, 37491, 37525, 37537, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 37476, 37868, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 37476, 37549, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37881, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37885, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37889, 37485, 37892, 37491, 37915, 37462, 37931, 37939, 3, 0, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37947, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37950, 37485, 37954, 37491, 37452, 37462, 2566, 37495, 5, 1, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37971, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37975, 37989, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37476, 37416, 37476, 37497, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 38002, 37491, 38016, 38028, 2566, 37495, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 38039, 37416, 37476, 38041, 37485, 37487, 37491, 38044, 38055, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37416, 38358, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {185, 37416, 185, 37418, 38065, 37431, 38074, 37449, 38085, 37462, 38100, 37939, 3, 0, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38107, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 691, 38111, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 691, 38365, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 38117, 38127, 2566, 37495, 8, 3, 10, 3, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38136, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37476, 10794, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37476, 10794, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 10794, 37485, 38143, 37491, 37452, 37462, 2566, 37495, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 38039, 37416, 37476, 10794, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 0, 37485, 38149, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37549, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 12, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 37497, 37485, 0, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37549, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 12, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38214, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37418, 38370, 37431, 37487, 37449, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38190, 37485, 38225, 37491, 37452, 37462, 2566, 37495, 12, 2, 1, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 0, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 2, 2, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38190, 37485, 0, 37491, 37452, 37462, 2566, 37495, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
+       {38252, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 37518, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {691, 37416, 691, 37416, 38254, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 691, 38257, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}},
+       {691, 37416, 691, 691, 38261, 37485, 38265, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, 0}, {3, 0}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38190, 37485, 0, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37416, 38302, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 14, 2, 0, 0, 1, 2, 2, {3, -1}, {3, 2}},
+       {691, 37416, 691, 37416, 38310, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 1, {3, 0}, {3, 0}},
+       {691, 37416, 691, 37416, 38317, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
+       {691, 37416, 691, 37418, 38330, 37431, 0, 37491, 37452, 37462, 2566, 37495, 3, 0, 4, 2, 3, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38333, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38337, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38337, 37485, 0, 37491, 37452, 37462, 2566, 37495, 9, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37476, 10794, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 2, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37549, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, 0}},
+       {691, 37416, 691, 37416, 38337, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37518, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37416, 37785, 37485, 0, 37491, 37452, 37462, 2566, 37495, 5, 1, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 691, 38341, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38254, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38376, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37687, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37476, 37416, 38386, 37763, 37485, 37487, 37491, 37552, 37563, 2566, 37495, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38254, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37631, 37639, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37476, 37416, 38386, 37763, 37485, 37487, 37491, 37603, 37677, 2566, 37495, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37695, 37705, 2566, 37495, 12, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37549, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37487, 37491, 37603, 37677, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 691, 38388, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37497, 37485, 0, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37418, 38396, 37431, 37487, 37449, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38403, 37485, 38225, 37491, 37452, 37462, 2566, 37495, 12, 2, 1, 0, 1, 2, 2, {3, 2}, {3, 2}},
+       {691, 37416, 691, 37418, 38407, 37431, 37487, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 38348, 37491, 37452, 37462, 2566, 37495, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37552, 37563, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37601, 37485, 37487, 37491, 37631, 37639, 2566, 37495, 15, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37874, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 691, 38417, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 0, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37552, 37563, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 8056, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37476, 37416, 38386, 37763, 37485, 37487, 37491, 37631, 37639, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38427, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 2, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38430, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38440, 37485, 38348, 37491, 37452, 37462, 2566, 37495, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 38386, 0, 37485, 37487, 37491, 37552, 37563, 2566, 37495, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38445, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 0, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 691, 37497, 37485, 37487, 37491, 37631, 37639, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38427, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38449, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37497, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38459, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 14, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37497, 37485, 37487, 37491, 37631, 37639, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38427, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 691, 38463, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 10794, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 2, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38473, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38478, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38488, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38473, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38492, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38502, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38507, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38517, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38521, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38529, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 691, 38539, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 14, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37497, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38549, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38333, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 9, 2, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38559, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 9, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38569, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 3, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38579, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 14, 2, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37418, 38583, 37431, 37434, 37449, 37452, 37462, 2566, 37471, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38190, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
+       {37416, 691, 37416, 691, 38593, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 14, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 0, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 2436, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 12, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38596, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37601, 37485, 37487, 37491, 37603, 37613, 2566, 37495, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
+       {37416, 691, 37416, 691, 38473, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38427, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38599, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38607, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 691, 38388, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 37518, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37549, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38427, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 691, 38365, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37418, 38396, 37431, 37487, 37449, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37416, 0, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38612, 37485, 38348, 37491, 37452, 37462, 2566, 37495, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38612, 37485, 38348, 37491, 37452, 37462, 2566, 37495, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37476, 37549, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 12, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 691, 37416, 691, 38607, 37485, 37487, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {37416, 37476, 37416, 37416, 38358, 37485, 0, 37491, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {37416, 37476, 37416, 37418, 38370, 37431, 37487, 37449, 37452, 37462, 2566, 37495, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
+       {37416, 38039, 37416, 37476, 0, 37485, 0, 37491, 37631, 37639, 2566, 37495, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
+       {691, 37416, 691, 37416, 38337, 37485, 0, 37491, 37452, 37462, 2566, 37495, 2, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}}
 };
 
 
 static const CultureInfoEntry culture_entries [] = {
-       {0x0001, 0x007F, 768, -1, 38641, 38644, 38651, 38666, 38670, 38641, 0, {0, 0, 38674, 0}, 0, 0, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x0002, 0x007F, 257, -1, 38702, 38705, 38715, 38734, 38738, 38702, 0, {38742, 0, 0, 0}, 1, 1, { 1251, 21025, 10007, 866, 0, ';' }},
-       {0x0003, 0x007F, 257, -1, 38784, 38787, 38795, 38803, 38807, 38784, 0, {38811, 0, 0, 0}, 2, 2, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0004, 0x0004, 257, -1, 38831, 38838, 38866, 38873, 38877, 38881, 0, {38884, 0, 0, 0}, 3, 3, { 936, 500, 10008, 936, 0, ',' }},
-       {0x0004, 0x7804, 257, -1, 38891, 38899, 38866, 38873, 38877, 38881, 0, {38884, 0, 0, 0}, 4, 4, { 936, 500, 10008, 936, 0, ',' }},
-       {0x0005, 0x007F, 257, -1, 38920, 38923, 38929, 38939, 38943, 38920, 0, {38947, 0, 0, 0}, 5, 5, { 1250, 500, 10029, 852, 0, ';' }},
-       {0x0006, 0x007F, 257, -1, 38973, 38976, 38983, 38989, 38993, 38973, 0, {38997, 0, 0, 0}, 6, 6, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x0007, 0x007F, 257, -1, 39018, 39021, 39028, 39036, 39040, 39018, 0, {39044, 0, 0, 0}, 7, 7, { 1252, 20273, 10000, 850, 0, ';' }},
-       {0x0008, 0x007F, 257, -1, 39069, 39072, 39078, 39095, 39099, 39069, 0, {39103, 0, 0, 0}, 8, 8, { 1253, 20273, 10006, 737, 0, ';' }},
-       {0x0009, 0x007F, 257, -1, 39145, 39148, 39148, 39156, 39160, 39145, 0, {39164, 0, 0, 0}, 9, 9, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x000A, 0x007F, 257, -1, 39183, 39186, 39194, 39203, 39207, 39183, 0, {39211, 0, 0, 0}, 10, 10, { 1252, 20284, 10000, 850, 0, ';' }},
-       {0x000B, 0x007F, 257, -1, 39233, 39236, 39244, 39250, 39254, 39233, 0, {39258, 0, 0, 0}, 11, 11, { 1252, 20278, 10000, 850, 0, ';' }},
-       {0x000C, 0x007F, 257, -1, 39283, 39286, 39293, 39303, 39307, 39283, 0, {39311, 0, 0, 0}, 12, 12, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x000D, 0x007F, 257, -1, 39333, 39336, 39343, 39354, 39358, 39333, 0, {39362, 0, 0, 0}, 13, 13, { 1255, 500, 10005, 862, 1, ',' }},
-       {0x000E, 0x007F, 257, -1, 39395, 39398, 39408, 39415, 39419, 39395, 0, {39423, 0, 0, 0}, 14, 14, { 1250, 500, 10029, 852, 0, ';' }},
-       {0x000F, 0x007F, 257, -1, 39439, 39442, 39452, 39462, 39466, 39439, 0, {39470, 0, 0, 0}, 15, 15, { 1252, 20871, 10079, 850, 0, ';' }},
-       {0x0010, 0x007F, 257, -1, 39490, 39493, 39501, 39510, 39514, 39490, 0, {39518, 0, 0, 0}, 16, 16, { 1252, 20280, 10000, 850, 0, ';' }},
-       {0x0011, 0x007F, 257, -1, 39540, 39543, 39552, 39562, 39566, 39540, 0, {39570, 0, 0, 0}, 17, 17, { 932, 20290, 10001, 932, 0, ',' }},
-       {0x0012, 0x007F, 257, -1, 39597, 39600, 39607, 39617, 39621, 39597, 0, {39625, 0, 0, 0}, 18, 18, { 949, 20833, 10003, 949, 0, ',' }},
-       {0x0013, 0x007F, 257, -1, 39635, 39638, 39644, 39655, 39659, 39635, 0, {39663, 0, 0, 0}, 19, 19, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0014, 0x007F, 257, -1, 39685, 39688, 39698, 39704, 39708, 39712, 0, {38997, 0, 0, 0}, 20, 20, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x0015, 0x007F, 257, -1, 39715, 39718, 39725, 39732, 39736, 39715, 0, {39740, 0, 0, 0}, 21, 21, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x0016, 0x007F, 257, -1, 39764, 39767, 39778, 39789, 39793, 39764, 0, {39797, 0, 0, 0}, 22, 22, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0017, 0x007F, 257, -1, 39820, 39823, 39831, 39841, 39845, 39820, 0, {39849, 0, 0, 0}, 23, 23, { 1252, 20273, 10000, 850, 0, ';' }},
-       {0x0018, 0x007F, 257, -1, 39869, 39872, 39881, 39890, 39894, 39869, 0, {39898, 0, 0, 0}, 24, 24, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x0019, 0x007F, 257, -1, 39917, 39920, 39928, 39943, 39947, 39917, 0, {39951, 0, 0, 0}, 25, 25, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x001A, 0x007F, 257, -1, 39997, 40000, 40009, 40018, 40022, 39997, 0, {40026, 0, 0, 0}, 26, 26, { 1250, 500, 10082, 852, 0, ';' }},
-       {0x001B, 0x007F, 257, -1, 12824, 40049, 40056, 40068, 40072, 12824, 0, {40076, 0, 0, 0}, 27, 27, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x001C, 0x007F, 257, -1, 40100, 40103, 40112, 40118, 40122, 40100, 0, {40126, 0, 0, 0}, 28, 28, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x001D, 0x007F, 257, -1, 40146, 40149, 40157, 40165, 40169, 40146, 0, {38997, 0, 0, 0}, 29, 29, { 1252, 20278, 10000, 850, 0, ';' }},
-       {0x001E, 0x007F, 512, -1, 40173, 40176, 40181, 40191, 40195, 40173, 0, {0, 40199, 0, 0}, 30, 30, { 874, 20838, 10021, 874, 0, ',' }},
-       {0x001F, 0x007F, 257, -1, 12833, 40230, 40238, 40247, 40251, 12833, 0, {40255, 0, 0, 0}, 31, 31, { 1254, 20905, 10081, 857, 0, ';' }},
-       {0x0020, 0x007F, 257, -1, 40269, 40272, 40277, 40286, 40290, 40269, 0, {40294, 0, 0, 0}, 32, 32, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x0021, 0x007F, 257, -1, 40324, 40327, 40338, 40355, 40359, 40324, 0, {40363, 0, 0, 0}, 33, 33, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0022, 0x007F, 257, -1, 40382, 40385, 40395, 40416, 40420, 40382, 0, {40424, 0, 0, 0}, 34, 34, { 1251, 500, 10017, 866, 0, ';' }},
-       {0x0023, 0x007F, 257, -1, 40470, 40473, 40484, 40505, 40509, 40470, 0, {40513, 0, 0, 0}, 35, 35, { 1251, 500, 10007, 866, 0, ';' }},
-       {0x0024, 0x007F, 257, -1, 40555, 40558, 40568, 40582, 40586, 40555, 0, {40590, 0, 0, 0}, 36, 36, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x0025, 0x007F, 257, -1, 40612, 40615, 40624, 40630, 40634, 40612, 0, {40638, 0, 0, 0}, 37, 37, { 1257, 500, 10029, 775, 0, ';' }},
-       {0x0026, 0x007F, 257, -1, 40658, 40661, 40669, 40679, 40683, 40658, 0, {40687, 0, 0, 0}, 38, 38, { 1257, 500, 10029, 775, 0, ';' }},
-       {0x0027, 0x007F, 257, -1, 40706, 40709, 40720, 40730, 40734, 40706, 0, {40738, 0, 0, 0}, 39, 39, { 1257, 500, 10029, 775, 0, ';' }},
-       {0x0028, 0x007F, 257, -1, 40761, 40764, 40770, 40783, 40787, 40761, 0, {0, 0, 0, 0}, 40, 40, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x0029, 0x007F, 257, -1, 40791, 40794, 40802, 40813, 40817, 40791, 0, {40821, 0, 0, 0}, 41, 41, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x002A, 0x007F, 257, -1, 40845, 40848, 40859, 40874, 35722, 40845, 0, {40878, 0, 0, 0}, 42, 42, { 1258, 500, 10000, 1258, 0, ',' }},
-       {0x002B, 0x007F, 257, -1, 40893, 40896, 40905, 40920, 40924, 40893, 0, {40928, 0, 0, 0}, 43, 43, { 0, 500, 2, 1, 0, ',' }},
-       {0x002C, 0x007F, 257, -1, 40958, 40961, 40973, 40985, 40989, 40958, 0, {40993, 0, 0, 0}, 44, 44, { 1254, 20905, 10081, 857, 0, ';' }},
-       {0x002D, 0x007F, 257, -1, 41012, 41015, 41022, 41030, 41034, 41012, 0, {41038, 0, 0, 0}, 45, 45, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x002F, 0x007F, 257, -1, 41058, 41061, 41072, 41093, 41097, 41058, 0, {41101, 0, 0, 0}, 46, 46, { 1251, 500, 10007, 866, 0, ';' }},
-       {0x0032, 0x007F, 257, -1, 41145, 41148, 41155, 41164, 41168, 41145, 0, {0, 0, 0, 0}, 47, 47, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0034, 0x007F, 257, -1, 41172, 41175, 41181, 41190, 41194, 41172, 0, {0, 0, 0, 0}, 48, 48, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0035, 0x007F, 257, -1, 41198, 41201, 41206, 41214, 41218, 41198, 0, {41222, 0, 0, 0}, 49, 49, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0036, 0x007F, 257, -1, 41243, 41246, 41246, 41256, 41260, 41243, 0, {41264, 0, 0, 0}, 50, 50, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0037, 0x007F, 257, -1, 41284, 41287, 41296, 41318, 41322, 41284, 0, {41326, 0, 0, 0}, 51, 51, { 0, 500, 2, 1, 0, ';' }},
-       {0x0038, 0x007F, 257, -1, 41391, 41394, 41402, 41412, 41416, 41391, 0, {0, 0, 0, 0}, 52, 52, { 1252, 20277, 10079, 850, 0, ';' }},
-       {0x0039, 0x007F, 257, -1, 41420, 41423, 41429, 41445, 41449, 41420, 0, {41453, 0, 0, 0}, 53, 53, { 0, 500, 2, 1, 0, ',' }},
-       {0x003A, 0x007F, 257, -1, 41506, 41509, 41517, 41523, 41527, 41506, 0, {41531, 0, 0, 0}, 54, 54, { 0, 500, 2, 1, 0, ',' }},
-       {0x003B, 0x007F, 257, -1, 41552, 41555, 41569, 41586, 41590, 41552, 0, {41594, 0, 0, 0}, 55, 55, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x003C, 0x007F, 257, -1, 41613, 41616, 41622, 41630, 41634, 41613, 0, {41638, 0, 0, 0}, 56, 56, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x003E, 0x007F, 257, -1, 41659, 41662, 41668, 41682, 41686, 41659, 0, {41690, 0, 0, 0}, 57, 57, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x003F, 0x007F, 257, -1, 41707, 41710, 41717, 41737, 41741, 41707, 0, {41745, 0, 0, 0}, 58, 58, { 0, 500, 2, 1, 0, ';' }},
-       {0x0040, 0x007F, 257, -1, 41787, 41790, 41797, 41814, 41818, 41787, 0, {41822, 0, 0, 0}, 59, 59, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x0041, 0x007F, 257, -1, 41860, 41863, 41871, 41881, 41885, 41860, 0, {41889, 0, 0, 0}, 60, 60, { 1252, 500, 10000, 437, 0, ',' }},
-       {0x0043, 0x007F, 257, -1, 41910, 41913, 41919, 41930, 41934, 41910, 0, {41938, 0, 0, 0}, 61, 61, { 1254, 500, 10029, 857, 0, ';' }},
-       {0x0045, 0x007F, 257, -1, 41958, 41961, 41969, 41985, 41989, 41958, 0, {41993, 0, 0, 0}, 62, 62, { 0, 500, 2, 1, 0, ',' }},
-       {0x0046, 0x007F, 257, -1, 42058, 42061, 42069, 42088, 42092, 42058, 0, {42096, 0, 0, 0}, 63, 63, { 0, 500, 2, 1, 0, ',' }},
-       {0x0047, 0x007F, 257, -1, 42143, 42146, 42155, 42177, 42181, 42143, 0, {42185, 0, 0, 0}, 64, 64, { 0, 500, 2, 1, 0, ',' }},
-       {0x0048, 0x007F, 257, -1, 42241, 42244, 42250, 42266, 42270, 42241, 0, {0, 0, 0, 0}, 65, 65, { 0, 500, 2, 1, 0, ',' }},
-       {0x0049, 0x007F, 257, -1, 42274, 42277, 42283, 42299, 42303, 42274, 0, {42307, 0, 0, 0}, 66, 66, { 0, 500, 2, 1, 0, ',' }},
-       {0x004A, 0x007F, 257, -1, 42372, 42375, 42382, 42401, 42405, 42372, 0, {42409, 0, 0, 0}, 67, 67, { 0, 500, 2, 1, 0, ',' }},
-       {0x004B, 0x007F, 257, -1, 37890, 42474, 42482, 42498, 42502, 37890, 0, {42506, 0, 0, 0}, 68, 68, { 0, 500, 2, 1, 0, ',' }},
-       {0x004C, 0x007F, 257, -1, 42571, 42574, 42584, 42603, 42607, 42571, 0, {42611, 0, 0, 0}, 69, 69, { 0, 500, 2, 1, 0, ',' }},
-       {0x004D, 0x007F, 257, -1, 42655, 42658, 42667, 42689, 42693, 42655, 0, {42697, 0, 0, 0}, 70, 70, { 0, 500, 2, 1, 0, ',' }},
-       {0x004E, 0x007F, 257, -1, 42750, 42753, 42761, 42777, 2530, 42750, 0, {42781, 0, 0, 0}, 71, 71, { 0, 500, 2, 1, 0, ',' }},
-       {0x0050, 0x007F, 257, -1, 42843, 42846, 42856, 42869, 42873, 42843, 0, {42877, 0, 0, 0}, 72, 72, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x0051, 0x007F, 257, -1, 42909, 42912, 42920, 42945, 42949, 42909, 0, {0, 0, 0, 0}, 73, 73, { 0, 500, 2, 1, 0, ',' }},
-       {0x0052, 0x007F, 257, -1, 42953, 42956, 42962, 42970, 42974, 42953, 0, {42978, 0, 0, 0}, 74, 74, { 1252, 20285, 10000, 850, 0, ',' }},
-       {0x0053, 0x007F, 257, -1, 42994, 42997, 43003, 43019, 43023, 42994, 0, {43027, 0, 0, 0}, 75, 75, { 0, 500, 2, 1, 0, ',' }},
-       {0x0054, 0x007F, 257, -1, 43082, 43085, 43089, 43099, 43103, 43082, 0, {43107, 0, 0, 0}, 76, 76, { 0, 500, 2, 1, 0, ',' }},
-       {0x0056, 0x007F, 257, -1, 43153, 43156, 43165, 43172, 43176, 43153, 0, {39518, 0, 0, 0}, 77, 77, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0057, 0x007F, 257, -1, 43180, 43184, 43192, 43211, 43180, 43180, 0, {0, 0, 0, 0}, 78, 78, { 0, 500, 2, 1, 0, ',' }},
-       {0x005B, 0x007F, 257, -1, 43215, 43218, 43226, 43242, 43246, 43215, 0, {43250, 0, 0, 0}, 79, 79, { 0, 500, 2, 1, 0, ',' }},
-       {0x005E, 0x007F, 257, -1, 8151, 43309, 43317, 43330, 43334, 8151, 0, {43338, 0, 0, 0}, 80, 80, { 0, 500, 2, 1, 0, ';' }},
-       {0x005F, 0x007F, 257, -1, 43383, 43387, 43411, 43421, 43383, 43383, 0, {0, 0, 0, 0}, 81, 81, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x0061, 0x007F, 257, -1, 1992, 43425, 43432, 43451, 43455, 1992, 0, {43459, 0, 0, 0}, 82, 82, { 0, 500, 2, 1, 0, ',' }},
-       {0x0063, 0x007F, 1024, -1, 43509, 43512, 43519, 43528, 43532, 43509, 0, {0, 0, 0, 0}, 83, 83, { 0, 500, 2, 1, 1, ';' }},
-       {0x0064, 0x007F, 257, -1, 43536, 43540, 43540, 43549, 43536, 43536, 0, {43553, 0, 0, 0}, 84, 84, { 1252, 500, 10000, 437, 0, ',' }},
-       {0x0068, 0x007F, 257, -1, 43576, 43579, 43579, 43585, 43589, 43576, 0, {0, 0, 0, 0}, 85, 85, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x006A, 0x007F, 257, -1, 43593, 43596, 43603, 43618, 43622, 43593, 0, {0, 0, 0, 0}, 86, 86, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x006C, 0x007F, 257, -1, 43626, 43630, 43645, 43662, 43626, 43626, 0, {0, 0, 0, 0}, 87, 87, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x006F, 0x007F, 257, -1, 43666, 43669, 43681, 43693, 43697, 43666, 0, {43701, 0, 0, 0}, 88, 88, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x0070, 0x007F, 257, -1, 43728, 43731, 43731, 43736, 43740, 43728, 0, {0, 0, 0, 0}, 89, 89, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x0078, 0x007F, 257, -1, 43744, 43747, 43758, 43768, 43772, 43744, 0, {43776, 0, 0, 0}, 90, 90, { 0, 500, 2, 1, 0, ',' }},
-       {0x007E, 0x007F, 257, -1, 43789, 43792, 43799, 43809, 43813, 43789, 0, {43817, 0, 0, 0}, 91, 91, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x0084, 0x007F, 257, -1, 43837, 43841, 43854, 43873, 43837, 43837, 0, {43877, 0, 0, 0}, 92, 92, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x0085, 0x007F, 257, -1, 43902, 43906, 43912, 43930, 43902, 43902, 0, {0, 0, 0, 0}, 93, 93, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x0087, 0x007F, 257, -1, 43934, 43937, 43937, 43949, 43953, 43934, 0, {0, 0, 0, 0}, 94, 94, { 1252, 37, 10000, 437, 0, ';' }},
-       {0x0091, 0x007F, 257, -1, 43957, 43960, 43976, 43986, 43990, 43957, 0, {43994, 0, 0, 0}, 95, 95, { 1252, 20285, 10000, 850, 0, ',' }},
-       {0x0401, 0x0001, 768, 95, 44019, 44025, 44047, 38666, 38670, 38641, 13775, {0, 0, 38674, 0}, 96, 96, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x0402, 0x0002, 257, 11, 44111, 44117, 44138, 38734, 38738, 38702, 44176, {38742, 0, 0, 0}, 97, 97, { 1251, 21025, 10007, 866, 0, ';' }},
-       {0x0403, 0x0003, 257, 31, 44179, 44185, 44201, 38803, 38807, 38784, 44219, {38811, 0, 0, 0}, 98, 98, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0404, 0x7C04, 257, 107, 44222, 44228, 44250, 44266, 38877, 38881, 44270, {44273, 0, 0, 0}, 99, 99, { 950, 500, 10002, 950, 0, ',' }},
-       {0x0405, 0x0005, 257, 23, 44280, 44286, 44309, 38939, 38943, 38920, 44339, {38947, 0, 0, 0}, 100, 100, { 1250, 500, 10029, 852, 0, ';' }},
-       {0x0406, 0x0006, 257, 25, 44342, 44348, 44365, 38989, 38993, 38973, 44381, {38997, 0, 0, 0}, 101, 101, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x0407, 0x0007, 257, 24, 44384, 44390, 44407, 39036, 39040, 39018, 44429, {39044, 0, 0, 0}, 102, 102, { 1252, 20273, 10000, 850, 0, ';' }},
-       {0x0408, 0x0008, 257, 39, 44432, 44438, 44453, 39095, 39099, 39069, 44485, {39103, 0, 0, 0}, 103, 103, { 1253, 20273, 10006, 737, 0, ';' }},
-       {0x0409, 0x0009, 257, 109, 44488, 44494, 44494, 39156, 39160, 39145, 44518, {39164, 0, 0, 0}, 104, 104, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x040B, 0x000B, 257, 33, 44521, 44527, 44545, 39250, 39254, 39233, 44559, {39258, 0, 0, 0}, 105, 105, { 1252, 20278, 10000, 850, 0, ';' }},
-       {0x040C, 0x000C, 257, 35, 44562, 44568, 44584, 39303, 39307, 39283, 44603, {39311, 0, 0, 0}, 106, 106, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x040D, 0x000D, 257, 47, 44606, 44612, 44628, 39354, 39358, 39333, 44652, {39362, 0, 0, 0}, 107, 107, { 1255, 500, 10005, 862, 1, ',' }},
-       {0x040E, 0x000E, 257, 44, 44655, 44661, 44681, 39415, 39419, 39395, 44704, {39423, 0, 0, 0}, 108, 108, { 1250, 500, 10029, 852, 0, ';' }},
-       {0x040F, 0x000F, 257, 51, 44707, 44713, 44733, 39462, 39466, 39439, 44753, {39470, 0, 0, 0}, 109, 109, { 1252, 20871, 10079, 850, 0, ';' }},
-       {0x0410, 0x0010, 257, 52, 44756, 44762, 44778, 39510, 39514, 39490, 44796, {39518, 0, 0, 0}, 110, 110, { 1252, 20280, 10000, 850, 0, ';' }},
-       {0x0411, 0x0011, 257, 55, 44799, 44805, 44822, 39562, 39566, 39540, 44841, {39570, 0, 0, 0}, 111, 111, { 932, 20290, 10001, 932, 0, ',' }},
-       {0x0412, 0x0012, 257, 58, 44844, 44850, 44871, 39617, 39621, 39597, 44896, {39625, 0, 0, 0}, 112, 112, { 949, 20833, 10003, 949, 0, ',' }},
-       {0x0413, 0x0013, 257, 77, 44899, 44905, 44925, 39655, 39659, 39635, 44948, {39663, 0, 0, 0}, 113, 113, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0414, 0x7C14, 257, 78, 44951, 44957, 44984, 39704, 39708, 39712, 45006, {38997, 0, 0, 0}, 114, 114, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x0415, 0x0015, 257, 86, 45009, 45015, 45031, 39732, 39736, 39715, 45047, {39740, 0, 0, 0}, 115, 115, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x0416, 0x0016, 257, 14, 45050, 45056, 45076, 39789, 39793, 39764, 45096, {39797, 0, 0, 0}, 116, 116, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0417, 0x0017, 257, 18, 45099, 45105, 45127, 39841, 39845, 39820, 13778, {39849, 0, 0, 0}, 117, 117, { 1252, 20273, 10000, 850, 0, ';' }},
-       {0x0418, 0x0018, 257, 91, 45146, 45152, 45171, 39890, 39894, 39869, 45191, {39898, 0, 0, 0}, 118, 118, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x0419, 0x0019, 257, 93, 45194, 45200, 45217, 39943, 39947, 39917, 45247, {39951, 0, 0, 0}, 119, 119, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x041A, 0x001A, 257, 43, 45250, 45256, 45275, 40018, 40022, 39997, 45295, {40026, 0, 0, 0}, 120, 120, { 1250, 500, 10082, 852, 0, ';' }},
-       {0x041B, 0x001B, 257, 99, 45298, 45304, 45322, 40068, 40072, 12824, 45346, {40076, 0, 0, 0}, 121, 121, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x041C, 0x001C, 257, 2, 45349, 45355, 45374, 40118, 40122, 40100, 45392, {40126, 0, 0, 0}, 122, 122, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x041D, 0x001D, 257, 96, 45395, 45401, 45418, 40165, 40169, 40146, 45436, {38997, 0, 0, 0}, 123, 123, { 1252, 20278, 10000, 850, 0, ';' }},
-       {0x041E, 0x001E, 512, 102, 45439, 45445, 45461, 40191, 40195, 40173, 45483, {0, 40199, 0, 0}, 124, 124, { 874, 20838, 10021, 874, 0, ',' }},
-       {0x041F, 0x001F, 257, 105, 45486, 45492, 45509, 40247, 40251, 12833, 45529, {40255, 0, 0, 0}, 125, 125, { 1254, 20905, 10081, 857, 0, ';' }},
-       {0x0420, 0x0020, 257, 85, 45532, 45538, 45554, 40286, 40290, 40269, 45580, {40294, 0, 0, 0}, 126, 126, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x0421, 0x0021, 257, 45, 45583, 45589, 45612, 40355, 40359, 40324, 45641, {40363, 0, 0, 0}, 127, 127, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0422, 0x0022, 257, 108, 45644, 45650, 45670, 40416, 40420, 40382, 45708, {40424, 0, 0, 0}, 128, 128, { 1251, 500, 10017, 866, 0, ';' }},
-       {0x0423, 0x0023, 257, 15, 45711, 45717, 45738, 40505, 40509, 40470, 45778, {40513, 0, 0, 0}, 129, 129, { 1251, 500, 10007, 866, 0, ';' }},
-       {0x0424, 0x0024, 257, 98, 45781, 45787, 45808, 40582, 40586, 40555, 45834, {40590, 0, 0, 0}, 130, 130, { 1250, 20880, 10029, 852, 0, ';' }},
-       {0x0425, 0x0025, 257, 29, 45837, 45843, 45862, 40630, 40634, 40612, 45876, {40638, 0, 0, 0}, 131, 131, { 1257, 500, 10029, 775, 0, ';' }},
-       {0x0426, 0x0026, 257, 66, 45879, 45885, 45902, 40679, 40683, 40658, 45922, {40687, 0, 0, 0}, 132, 132, { 1257, 500, 10029, 775, 0, ';' }},
-       {0x0427, 0x0027, 257, 64, 45925, 45931, 45954, 40730, 40734, 40706, 45974, {40738, 0, 0, 0}, 133, 133, { 1257, 500, 10029, 775, 0, ';' }},
-       {0x0428, 0x7C28, 257, 103, 45977, 45988, 46017, 40783, 40787, 40761, 46053, {0, 0, 0, 0}, 134, 134, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x0429, 0x0029, 257, 50, 46056, 46062, 46077, 40813, 40817, 40791, 46101, {40821, 0, 0, 0}, 135, 135, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x042A, 0x002A, 257, 113, 46104, 46110, 46131, 40874, 35722, 40845, 46159, {40878, 0, 0, 0}, 136, 136, { 1258, 500, 10000, 1258, 0, ',' }},
-       {0x042B, 0x002B, 257, 3, 46162, 46168, 46187, 40920, 40924, 40893, 1929, {40928, 0, 0, 0}, 137, 137, { 0, 500, 2, 1, 0, ',' }},
-       {0x042C, 0x782C, 257, 7, 46221, 46232, 46264, 40985, 40989, 40958, 46290, {40993, 0, 0, 0}, 138, 138, { 1254, 20905, 10081, 857, 0, ';' }},
-       {0x042D, 0x002D, 257, 31, 46293, 46299, 46314, 41030, 41034, 41012, 44219, {41038, 0, 0, 0}, 139, 139, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x042F, 0x002F, 257, 71, 46333, 46339, 46362, 41093, 41097, 41058, 46406, {41101, 0, 0, 0}, 140, 140, { 1251, 500, 10007, 866, 0, ';' }},
-       {0x0432, 0x0032, 257, 115, 46409, 46415, 41155, 41164, 41168, 41145, 46437, {0, 0, 0, 0}, 141, 141, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0434, 0x0034, 257, 115, 46440, 46446, 41181, 41190, 41194, 41172, 46437, {0, 0, 0, 0}, 142, 142, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0435, 0x0035, 257, 115, 46467, 46473, 46493, 41214, 41218, 41198, 46437, {41222, 0, 0, 0}, 143, 143, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0436, 0x0036, 257, 115, 46518, 46524, 46549, 41256, 41260, 41243, 46437, {41264, 0, 0, 0}, 144, 144, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0437, 0x0037, 257, 37, 46573, 46579, 46598, 41318, 41322, 41284, 46653, {41326, 0, 0, 0}, 145, 145, { 0, 500, 2, 1, 0, ';' }},
-       {0x0438, 0x0038, 257, 34, 46656, 46662, 46686, 41412, 41416, 41391, 46707, {0, 0, 0, 0}, 146, 146, { 1252, 20277, 10079, 850, 0, ';' }},
-       {0x0439, 0x0039, 257, 48, 46710, 46716, 46730, 41445, 41449, 41420, 46761, {41453, 0, 0, 0}, 147, 147, { 0, 500, 2, 1, 0, ',' }},
-       {0x043A, 0x003A, 257, 73, 46764, 46770, 46786, 41523, 41527, 41506, 46800, {41531, 0, 0, 0}, 148, 148, { 0, 500, 2, 1, 0, ',' }},
-       {0x043B, 0x003B, 257, 78, 46803, 46809, 46832, 41586, 41590, 41552, 45006, {41594, 0, 0, 0}, 149, 149, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x0441, 0x0041, 257, 56, 46857, 46863, 46879, 41881, 41885, 41860, 46897, {41889, 0, 0, 0}, 150, 150, { 1252, 500, 10000, 437, 0, ',' }},
-       {0x0443, 0x7C43, 257, 111, 46900, 46911, 46937, 41930, 41934, 41910, 46963, {41938, 0, 0, 0}, 151, 151, { 1254, 500, 10029, 857, 0, ';' }},
-       {0x0445, 0x0045, 257, 48, 46966, 46972, 46988, 41985, 41989, 41958, 46761, {41993, 0, 0, 0}, 152, 152, { 0, 500, 2, 1, 0, ',' }},
-       {0x0447, 0x0047, 257, 48, 47019, 47025, 47042, 42177, 42181, 42143, 46761, {42185, 0, 0, 0}, 153, 153, { 0, 500, 2, 1, 0, ',' }},
-       {0x0448, 0x0048, 257, 48, 47079, 47085, 47099, 42266, 42270, 42241, 46761, {0, 0, 0, 0}, 154, 154, { 0, 500, 2, 1, 0, ',' }},
-       {0x0449, 0x0049, 257, 48, 47130, 47136, 47150, 42299, 42303, 42274, 46761, {42307, 0, 0, 0}, 155, 155, { 0, 500, 2, 1, 0, ',' }},
-       {0x044A, 0x004A, 257, 48, 47190, 47196, 47211, 42401, 42405, 42372, 46761, {42409, 0, 0, 0}, 156, 156, { 0, 500, 2, 1, 0, ',' }},
-       {0x044B, 0x004B, 257, 48, 47258, 47264, 47280, 42498, 42502, 37890, 46761, {42506, 0, 0, 0}, 157, 157, { 0, 500, 2, 1, 0, ',' }},
-       {0x044C, 0x004C, 257, 48, 47311, 47317, 47335, 42603, 42607, 42571, 46761, {42611, 0, 0, 0}, 158, 158, { 0, 500, 2, 1, 0, ',' }},
-       {0x044D, 0x004D, 257, 48, 47375, 47381, 47398, 42689, 42693, 42655, 46761, {42697, 0, 0, 0}, 159, 159, { 0, 500, 2, 1, 0, ',' }},
-       {0x044E, 0x004E, 257, 48, 47435, 47441, 47457, 42777, 2530, 42750, 46761, {42781, 0, 0, 0}, 160, 160, { 0, 500, 2, 1, 0, ',' }},
-       {0x0451, 0x0051, 257, 20, 47488, 47494, 47510, 42945, 42949, 42909, 13857, {0, 0, 0, 0}, 161, 161, { 0, 500, 2, 1, 0, ',' }},
-       {0x0452, 0x0052, 257, 36, 47556, 47562, 47585, 42970, 42974, 42953, 47612, {42978, 0, 0, 0}, 162, 162, { 1252, 20285, 10000, 850, 0, ',' }},
-       {0x0453, 0x0053, 257, 57, 47615, 47621, 47638, 43019, 43023, 42994, 47678, {43027, 0, 0, 0}, 163, 163, { 0, 500, 2, 1, 0, ',' }},
-       {0x0454, 0x0054, 257, 60, 47681, 47687, 47698, 43099, 43103, 43082, 47720, {43107, 0, 0, 0}, 164, 164, { 0, 500, 2, 1, 0, ',' }},
-       {0x0456, 0x0056, 257, 31, 47723, 47729, 47746, 43172, 43176, 43153, 44219, {39518, 0, 0, 0}, 165, 165, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0457, 0x0057, 257, 48, 47763, 47770, 47786, 43211, 43180, 43180, 46761, {0, 0, 0, 0}, 166, 166, { 0, 500, 2, 1, 0, ',' }},
-       {0x045B, 0x005B, 257, 63, 47820, 47826, 47846, 43242, 43246, 43215, 47896, {43250, 0, 0, 0}, 167, 167, { 0, 500, 2, 1, 0, ',' }},
-       {0x045E, 0x005E, 257, 32, 47899, 47905, 47924, 43330, 43334, 8151, 47955, {43338, 0, 0, 0}, 168, 168, { 0, 500, 2, 1, 0, ';' }},
-       {0x0461, 0x0061, 257, 79, 47958, 47964, 47979, 43451, 43455, 1992, 48016, {43459, 0, 0, 0}, 169, 169, { 0, 500, 2, 1, 0, ',' }},
-       {0x0463, 0x0063, 1024, 1, 48019, 48025, 48046, 43528, 43532, 43509, 48076, {0, 0, 0, 0}, 170, 170, { 0, 500, 2, 1, 1, ';' }},
-       {0x0464, 0x0064, 257, 84, 48079, 48086, 48109, 43549, 43536, 43536, 48130, {43553, 0, 0, 0}, 171, 171, { 1252, 500, 10000, 437, 0, ',' }},
-       {0x0468, 0x7C68, 257, 75, 48133, 48144, 48167, 43585, 43589, 43576, 48184, {0, 0, 0, 0}, 172, 172, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x046A, 0x006A, 257, 75, 48187, 48193, 48210, 43618, 43622, 43593, 48184, {0, 0, 0, 0}, 173, 173, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x046C, 0x006C, 257, 115, 48256, 48263, 43645, 43662, 43626, 43626, 46437, {0, 0, 0, 0}, 174, 174, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x046F, 0x006F, 257, 38, 48293, 48299, 48323, 43693, 43697, 43666, 48354, {43701, 0, 0, 0}, 175, 175, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x0470, 0x0070, 257, 75, 48357, 48363, 48363, 43736, 43740, 43728, 48184, {0, 0, 0, 0}, 176, 176, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x0478, 0x0078, 257, 20, 48378, 48384, 48403, 43768, 43772, 43744, 13857, {43776, 0, 0, 0}, 177, 177, { 0, 500, 2, 1, 0, ',' }},
-       {0x047E, 0x007E, 257, 35, 48422, 48428, 48444, 43809, 43813, 43789, 44603, {43817, 0, 0, 0}, 178, 178, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x0485, 0x0085, 257, 93, 48463, 48470, 43912, 43930, 43902, 43902, 45247, {0, 0, 0, 0}, 179, 179, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x0487, 0x0087, 257, 94, 48485, 48491, 48491, 43949, 43953, 43934, 48512, {0, 0, 0, 0}, 180, 180, { 1252, 37, 10000, 437, 0, ';' }},
-       {0x0491, 0x0091, 257, 36, 48515, 48521, 48554, 43986, 43990, 43957, 47612, {43994, 0, 0, 0}, 181, 181, { 1252, 20285, 10000, 850, 0, ',' }},
-       {0x0801, 0x0001, 257, 49, 48590, 48596, 48610, 48640, 38670, 38641, 48644, {48647, 0, 0, 0}, 182, 182, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x0804, 0x0004, 257, 20, 48679, 38899, 48685, 38873, 38877, 38881, 13857, {38884, 0, 0, 0}, 183, 183, { 936, 500, 10008, 936, 0, ',' }},
-       {0x0807, 0x0007, 257, 18, 48701, 48707, 48728, 48746, 39040, 39018, 13778, {39044, 0, 0, 0}, 184, 184, { 1252, 20273, 10000, 850, 0, ';' }},
-       {0x0809, 0x0009, 257, 36, 48750, 48756, 48756, 48781, 39160, 39145, 47612, {39164, 0, 0, 0}, 185, 185, { 1252, 20285, 10000, 850, 0, ',' }},
-       {0x080A, 0x000A, 257, 74, 48785, 48791, 48808, 48827, 39207, 39183, 48831, {39518, 0, 0, 0}, 186, 186, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x080C, 0x000C, 257, 10, 48834, 48840, 48857, 48878, 39307, 39283, 48882, {39311, 0, 0, 0}, 187, 187, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x0810, 0x0010, 257, 18, 48885, 48891, 48913, 48933, 39514, 39490, 13778, {39518, 0, 0, 0}, 188, 188, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0813, 0x0013, 257, 10, 48937, 48943, 48959, 48980, 39659, 39635, 48882, {39663, 0, 0, 0}, 189, 189, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x0814, 0x7814, 257, 78, 48984, 48990, 49017, 49033, 49037, 49041, 45006, {38997, 0, 0, 0}, 190, 190, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x0816, 0x0016, 257, 88, 49044, 49050, 49072, 49094, 39793, 39764, 49098, {39797, 0, 0, 0}, 191, 191, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x081D, 0x001D, 257, 33, 49101, 49107, 49125, 49143, 40169, 40146, 44559, {38997, 0, 0, 0}, 192, 192, { 1252, 20278, 10000, 850, 0, ';' }},
-       {0x082C, 0x742C, 257, 7, 49147, 49158, 46264, 49193, 40989, 40958, 46290, {40993, 0, 0, 0}, 193, 193, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x083C, 0x003C, 257, 46, 49197, 49203, 49219, 41630, 41634, 41613, 49235, {41638, 0, 0, 0}, 194, 194, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0843, 0x7843, 257, 111, 49238, 49249, 46937, 41930, 41934, 41910, 46963, {49278, 0, 0, 0}, 195, 195, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x0845, 0x0045, 257, 9, 49316, 49322, 49343, 49386, 41989, 41958, 49390, {41993, 0, 0, 0}, 196, 196, { 0, 500, 2, 1, 0, ',' }},
-       {0x0C01, 0x0001, 257, 30, 49393, 49399, 49414, 49438, 38670, 38641, 49442, {48647, 0, 0, 0}, 197, 197, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x0C04, 0x7C04, 257, 41, 49445, 49451, 49494, 49531, 38877, 38881, 49535, {44273, 0, 0, 0}, 198, 198, { 950, 500, 10002, 950, 0, ',' }},
-       {0x0C07, 0x0007, 257, 5, 49538, 49544, 49561, 49583, 39040, 39018, 49587, {39044, 0, 0, 0}, 199, 199, { 1252, 20273, 10000, 850, 0, ';' }},
-       {0x0C09, 0x0009, 257, 6, 49590, 49596, 49596, 49616, 39160, 39145, 49620, {39164, 0, 0, 0}, 200, 200, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x0C0A, 0x000A, 257, 31, 49623, 49629, 49645, 49664, 39207, 39183, 44219, {39211, 0, 0, 0}, 201, 201, { 1252, 20284, 10000, 850, 0, ';' }},
-       {0x0C0C, 0x000C, 257, 17, 49668, 49674, 49690, 49709, 39307, 39283, 49713, {49716, 0, 0, 0}, 202, 202, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x0C3B, 0x003B, 257, 33, 49738, 49744, 49768, 49794, 49798, 41552, 44559, {41594, 0, 0, 0}, 203, 203, { 1252, 20278, 10000, 850, 0, ';' }},
-       {0x1001, 0x0001, 257, 67, 49802, 49808, 49823, 49851, 38670, 38641, 49855, {48647, 0, 0, 0}, 204, 204, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x1004, 0x0004, 257, 97, 49858, 49864, 49896, 49915, 38877, 38881, 49919, {38884, 0, 0, 0}, 205, 205, { 936, 500, 10008, 936, 0, ',' }},
-       {0x1007, 0x0007, 257, 65, 49922, 49928, 49948, 49968, 39040, 39018, 49972, {39044, 0, 0, 0}, 206, 206, { 1252, 20273, 10000, 850, 0, ';' }},
-       {0x1009, 0x0009, 257, 17, 49975, 49981, 49981, 49998, 39160, 39145, 49713, {39164, 0, 0, 0}, 207, 207, { 1252, 37, 10000, 850, 0, ',' }},
-       {0x100A, 0x000A, 257, 40, 50002, 50008, 50028, 50049, 39207, 39183, 50053, {39211, 0, 0, 0}, 208, 208, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x100C, 0x000C, 257, 18, 50056, 50062, 50083, 50102, 39307, 39283, 13778, {39311, 0, 0, 0}, 209, 209, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x101A, 0x001A, 257, 8, 50106, 50112, 50146, 50177, 50181, 39997, 50185, {40026, 0, 0, 0}, 210, 210, { 1250, 870, 10082, 852, 0, ';' }},
-       {0x1401, 0x0001, 257, 27, 50188, 50194, 50211, 50243, 38670, 38641, 50247, {48647, 0, 0, 0}, 211, 211, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x1404, 0x7C04, 257, 72, 50250, 50256, 50295, 50332, 38877, 38881, 50336, {44273, 0, 0, 0}, 212, 212, { 950, 500, 10002, 950, 0, ',' }},
-       {0x1407, 0x0007, 257, 62, 50339, 50345, 50368, 50392, 39040, 39018, 50396, {39044, 0, 0, 0}, 213, 213, { 1252, 20273, 10000, 850, 0, ';' }},
-       {0x1409, 0x0009, 257, 80, 50399, 50405, 50405, 50427, 39160, 39145, 50431, {39164, 0, 0, 0}, 214, 214, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x140A, 0x000A, 257, 22, 50434, 50440, 50461, 50483, 39207, 39183, 50487, {39211, 0, 0, 0}, 215, 215, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x140C, 0x000C, 257, 65, 50490, 50496, 50516, 50539, 39307, 39283, 49972, {39311, 0, 0, 0}, 216, 216, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x141A, 0x681A, 257, 8, 50543, 50554, 50594, 50625, 50629, 50633, 50185, {50636, 0, 0, 0}, 217, 217, { 1250, 870, 10082, 852, 0, ';' }},
-       {0x1801, 0x0001, 257, 68, 50659, 50665, 50682, 50712, 38670, 38641, 50716, {48647, 0, 0, 0}, 218, 218, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x1809, 0x0009, 257, 46, 50719, 50725, 50725, 50743, 39160, 39145, 49235, {39164, 0, 0, 0}, 219, 219, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x180A, 0x000A, 257, 82, 50747, 50753, 50770, 50789, 39207, 39183, 50793, {39211, 0, 0, 0}, 220, 220, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x180C, 0x000C, 257, 69, 50796, 50802, 50818, 50837, 39307, 39283, 50841, {39311, 0, 0, 0}, 221, 221, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x181A, 0x701A, 257, 8, 50844, 50855, 50895, 50947, 50951, 50955, 50185, {50636, 0, 0, 0}, 222, 222, { 1250, 870, 10082, 852, 0, ';' }},
-       {0x1C01, 0x0001, 257, 104, 50958, 50964, 50981, 51007, 38670, 38641, 51011, {48647, 0, 0, 0}, 223, 223, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x1C09, 0x0009, 257, 115, 51014, 51020, 51020, 51043, 39160, 39145, 46437, {39164, 0, 0, 0}, 224, 224, { 1252, 500, 10000, 437, 0, ',' }},
-       {0x1C0A, 0x000A, 257, 26, 51047, 51053, 51082, 51115, 39207, 39183, 51119, {39211, 0, 0, 0}, 225, 225, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x1C1A, 0x6C1A, 257, 8, 51122, 51133, 50895, 51176, 51180, 50955, 50185, {41101, 0, 0, 0}, 226, 226, { 1251, 21025, 10007, 855, 0, ';' }},
-       {0x2001, 0x0001, 257, 81, 51184, 51190, 51204, 51232, 38670, 38641, 51236, {48647, 0, 0, 0}, 227, 227, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x2009, 0x0009, 257, 53, 51239, 51245, 51245, 51263, 39160, 39145, 51267, {39164, 0, 0, 0}, 228, 228, { 1252, 500, 10000, 850, 0, ',' }},
-       {0x200A, 0x000A, 257, 112, 51270, 51276, 51296, 51317, 39207, 39183, 51321, {39211, 0, 0, 0}, 229, 229, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x201A, 0x641A, 257, 8, 51324, 51335, 50594, 51378, 51382, 50633, 50185, {41101, 0, 0, 0}, 230, 230, { 1251, 870, 10082, 855, 0, ';' }},
-       {0x2401, 0x0001, 257, 114, 51386, 51392, 51407, 51435, 38670, 38641, 51439, {48647, 0, 0, 0}, 231, 231, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x240A, 0x000A, 257, 21, 51442, 51448, 51467, 51487, 39207, 39183, 51491, {39211, 0, 0, 0}, 232, 232, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x241A, 0x701A, 257, 92, 51494, 51505, 51529, 51557, 2239, 50955, 51561, {50636, 0, 0, 0}, 233, 233, { 1250, 500, 10029, 852, 0, ';' }},
-       {0x2801, 0x0001, 257, 101, 51564, 51570, 51585, 51613, 38670, 38641, 51617, {48647, 0, 0, 0}, 234, 234, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x2809, 0x0009, 257, 16, 51620, 51626, 51626, 51643, 39160, 39145, 51647, {39164, 0, 0, 0}, 235, 235, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x280A, 0x000A, 257, 83, 51650, 51656, 51671, 51688, 39207, 39183, 51692, {39211, 0, 0, 0}, 236, 236, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x281A, 0x6C1A, 257, 92, 51695, 51706, 51529, 51733, 2239, 50955, 51561, {41101, 0, 0, 0}, 237, 237, { 1251, 21025, 10007, 855, 0, ';' }},
-       {0x2C01, 0x0001, 257, 54, 51737, 51743, 51759, 51789, 38670, 38641, 51793, {48647, 0, 0, 0}, 238, 238, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x2C09, 0x0009, 257, 106, 51796, 51802, 51802, 51832, 39160, 39145, 51836, {39164, 0, 0, 0}, 239, 239, { 1252, 500, 10000, 850, 0, ';' }},
-       {0x2C0A, 0x000A, 257, 4, 51839, 51845, 51865, 51886, 39207, 39183, 51890, {39211, 0, 0, 0}, 240, 240, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x2C1A, 0x701A, 257, 70, 51893, 51904, 51932, 51965, 2239, 50955, 51969, {50636, 0, 0, 0}, 241, 241, { 1250, 500, 10029, 852, 0, ';' }},
-       {0x3001, 0x0001, 257, 61, 51972, 51978, 51995, 52023, 38670, 38641, 52027, {48647, 0, 0, 0}, 242, 242, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x3009, 0x0009, 257, 116, 52030, 52036, 52036, 52055, 39160, 39145, 52059, {39164, 0, 0, 0}, 243, 243, { 1252, 500, 10000, 437, 0, ',' }},
-       {0x300A, 0x000A, 257, 28, 52062, 52068, 52086, 52105, 39207, 39183, 52109, {39211, 0, 0, 0}, 244, 244, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x301A, 0x6C1A, 257, 70, 52112, 52123, 51932, 52154, 2239, 50955, 51969, {41101, 0, 0, 0}, 245, 245, { 1251, 21025, 10007, 855, 0, ';' }},
-       {0x3401, 0x0001, 257, 59, 52158, 52164, 52180, 52210, 38670, 38641, 52214, {48647, 0, 0, 0}, 246, 246, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x3409, 0x0009, 257, 84, 52217, 52223, 52223, 52245, 39160, 39145, 48130, {39164, 0, 0, 0}, 247, 247, { 1252, 500, 10000, 437, 0, ',' }},
-       {0x340A, 0x000A, 257, 19, 52249, 52255, 52271, 52288, 39207, 39183, 52292, {39211, 0, 0, 0}, 248, 248, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x3801, 0x0001, 257, 0, 52295, 52301, 52331, 52395, 38670, 38641, 52399, {48647, 0, 0, 0}, 249, 249, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x380A, 0x000A, 257, 110, 52402, 52408, 52426, 52445, 39207, 39183, 52449, {39211, 0, 0, 0}, 250, 250, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x3C01, 0x0001, 257, 12, 52452, 52458, 52475, 52507, 38670, 38641, 52511, {48647, 0, 0, 0}, 251, 251, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x3C0A, 0x000A, 257, 89, 52514, 52520, 52539, 52559, 39207, 39183, 52563, {39211, 0, 0, 0}, 252, 252, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x4001, 0x0001, 257, 90, 52566, 52572, 52587, 52611, 38670, 38641, 52615, {48647, 0, 0, 0}, 253, 253, { 1256, 20420, 10004, 720, 1, ';' }},
-       {0x4009, 0x0009, 257, 48, 52618, 52624, 52624, 52640, 39160, 39145, 46761, {39164, 0, 0, 0}, 254, 254, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x400A, 0x000A, 257, 13, 52644, 52650, 52668, 52687, 39207, 39183, 52691, {39211, 0, 0, 0}, 255, 255, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x440A, 0x000A, 257, 100, 52694, 52700, 52722, 52745, 39207, 39183, 52749, {39211, 0, 0, 0}, 256, 256, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x4809, 0x0009, 257, 97, 52752, 52758, 52758, 52778, 39160, 39145, 49919, {39164, 0, 0, 0}, 257, 257, { 1252, 37, 10000, 437, 0, ',' }},
-       {0x480A, 0x000A, 257, 42, 52782, 52788, 52807, 52827, 39207, 39183, 52831, {39211, 0, 0, 0}, 258, 258, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x4C0A, 0x000A, 257, 76, 52834, 52840, 52860, 52881, 39207, 39183, 52885, {39211, 0, 0, 0}, 259, 259, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x500A, 0x000A, 257, 87, 52888, 52894, 52916, 52939, 39207, 39183, 52943, {39211, 0, 0, 0}, 260, 260, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x540A, 0x000A, 257, 109, 52946, 52952, 52976, 53002, 39207, 39183, 44518, {39211, 0, 0, 0}, 261, 261, { 1252, 20284, 10000, 850, 0, ',' }},
-       {0x641A, 0x781A, 257, -1, 53006, 53014, 53033, 51378, 51382, 50633, 0, {41101, 0, 0, 0}, 262, 262, { 1251, 870, 10082, 855, 0, ';' }},
-       {0x681A, 0x781A, 257, -1, 53042, 53050, 53033, 50625, 50629, 50633, 0, {50636, 0, 0, 0}, 263, 263, { 1250, 870, 10082, 852, 0, ';' }},
-       {0x6C1A, 0x7C1A, 257, -1, 53066, 53074, 53093, 51733, 2239, 50955, 0, {41101, 0, 0, 0}, 264, 264, { 1251, 21025, 10007, 855, 0, ';' }},
-       {0x701A, 0x7C1A, 257, -1, 53106, 53114, 53093, 51557, 2239, 50955, 0, {50636, 0, 0, 0}, 265, 265, { 1250, 500, 10029, 852, 0, ';' }},
-       {0x742C, 0x002C, 257, -1, 53130, 53138, 40973, 49193, 40989, 40958, 0, {40993, 0, 0, 0}, 266, 266, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x7804, 0x007F, 257, -1, 38881, 38899, 38866, 38873, 38877, 38881, 0, {38884, 0, 0, 0}, 267, 267, { 936, 500, 10008, 936, 0, ',' }},
-       {0x7814, 0x0014, 257, -1, 49041, 53161, 53179, 49033, 49037, 49041, 0, {38997, 0, 0, 0}, 268, 268, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x781A, 0x007F, 257, -1, 50633, 53187, 53033, 50625, 50629, 50633, 0, {50636, 0, 0, 0}, 269, 269, { 1250, 870, 10082, 852, 0, ';' }},
-       {0x782C, 0x002C, 257, -1, 53195, 53203, 40973, 40985, 40989, 40958, 0, {40993, 0, 0, 0}, 270, 270, { 1254, 20905, 10081, 857, 0, ';' }},
-       {0x7843, 0x0043, 257, -1, 53223, 53231, 41919, 41930, 41934, 41910, 0, {49278, 0, 0, 0}, 271, 271, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x7850, 0x0050, 257, -1, 53248, 53256, 42856, 53277, 42873, 42843, 0, {42877, 0, 0, 0}, 272, 272, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x7C04, 0x7804, 257, -1, 53281, 44228, 38866, 44266, 38877, 38881, 0, {44273, 0, 0, 0}, 273, 273, { 950, 500, 10002, 950, 0, ',' }},
-       {0x7C04, 0x7C04, 257, -1, 53289, 53296, 38866, 44266, 38877, 38881, 0, {44273, 0, 0, 0}, 274, 274, { 950, 500, 10002, 950, 0, ',' }},
-       {0x7C14, 0x0014, 257, -1, 39712, 53325, 53343, 39704, 39708, 39712, 0, {38997, 0, 0, 0}, 275, 275, { 1252, 20277, 10000, 850, 0, ';' }},
-       {0x7C1A, 0x007F, 257, -1, 50955, 53357, 53093, 53365, 2239, 50955, 0, {41101, 0, 0, 0}, 276, 276, { 1250, 500, 10029, 852, 0, ';' }},
-       {0x7C28, 0x0028, 257, -1, 53369, 53377, 40770, 40783, 40787, 40761, 0, {0, 0, 0, 0}, 277, 277, { 1251, 20880, 10007, 866, 0, ';' }},
-       {0x7C43, 0x0043, 257, -1, 53394, 53402, 41919, 41930, 41934, 41910, 0, {41938, 0, 0, 0}, 278, 278, { 1254, 500, 10029, 857, 0, ';' }},
-       {0x7C5F, 0x005F, 257, -1, 53416, 53425, 43411, 43421, 43383, 43383, 0, {0, 0, 0, 0}, 279, 279, { 1252, 20297, 10000, 850, 0, ';' }},
-       {0x7C68, 0x0068, 257, -1, 53457, 53465, 43579, 43585, 43589, 43576, 0, {0, 0, 0, 0}, 280, 280, { 1252, 37, 10000, 437, 0, ',' }}
+       {0x0001, 0x007F, 768, -1, 38616, 38619, 38626, 38641, 38645, 38616, 0, {0, 0, 38649, 0}, 0, 0, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x0002, 0x007F, 257, -1, 38677, 38680, 38690, 38709, 38713, 38677, 0, {38717, 0, 0, 0}, 1, 1, { 1251, 21025, 10007, 866, 0, ';' }},
+       {0x0003, 0x007F, 257, -1, 38759, 38762, 38770, 38778, 38782, 38759, 0, {38786, 0, 0, 0}, 2, 2, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0004, 0x0004, 257, -1, 38806, 38813, 38841, 38848, 38852, 38856, 0, {38859, 0, 0, 0}, 3, 3, { 936, 500, 10008, 936, 0, ',' }},
+       {0x0004, 0x7804, 257, -1, 38866, 38874, 38841, 38848, 38852, 38856, 0, {38859, 0, 0, 0}, 4, 4, { 936, 500, 10008, 936, 0, ',' }},
+       {0x0005, 0x007F, 257, -1, 38895, 38898, 38904, 38914, 38918, 38895, 0, {38922, 0, 0, 0}, 5, 5, { 1250, 500, 10029, 852, 0, ';' }},
+       {0x0006, 0x007F, 257, -1, 38948, 38951, 38958, 38964, 38968, 38948, 0, {38972, 0, 0, 0}, 6, 6, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x0007, 0x007F, 257, -1, 38993, 38996, 39003, 39011, 39015, 38993, 0, {39019, 0, 0, 0}, 7, 7, { 1252, 20273, 10000, 850, 0, ';' }},
+       {0x0008, 0x007F, 257, -1, 39044, 39047, 39053, 39070, 39074, 39044, 0, {39078, 0, 0, 0}, 8, 8, { 1253, 20273, 10006, 737, 0, ';' }},
+       {0x0009, 0x007F, 257, -1, 39120, 39123, 39123, 39131, 39135, 39120, 0, {39139, 0, 0, 0}, 9, 9, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x000A, 0x007F, 257, -1, 39158, 39161, 39169, 39178, 39182, 39158, 0, {39186, 0, 0, 0}, 10, 10, { 1252, 20284, 10000, 850, 0, ';' }},
+       {0x000B, 0x007F, 257, -1, 39208, 39211, 39219, 39225, 39229, 39208, 0, {39233, 0, 0, 0}, 11, 11, { 1252, 20278, 10000, 850, 0, ';' }},
+       {0x000C, 0x007F, 257, -1, 39258, 39261, 39268, 39278, 39282, 39258, 0, {39286, 0, 0, 0}, 12, 12, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x000D, 0x007F, 257, -1, 39308, 39311, 39318, 39329, 39333, 39308, 0, {39337, 0, 0, 0}, 13, 13, { 1255, 500, 10005, 862, 1, ',' }},
+       {0x000E, 0x007F, 257, -1, 39370, 39373, 39383, 39390, 39394, 39370, 0, {39398, 0, 0, 0}, 14, 14, { 1250, 500, 10029, 852, 0, ';' }},
+       {0x000F, 0x007F, 257, -1, 39414, 39417, 39427, 39437, 39441, 39414, 0, {39445, 0, 0, 0}, 15, 15, { 1252, 20871, 10079, 850, 0, ';' }},
+       {0x0010, 0x007F, 257, -1, 39465, 39468, 39476, 39485, 39489, 39465, 0, {39493, 0, 0, 0}, 16, 16, { 1252, 20280, 10000, 850, 0, ';' }},
+       {0x0011, 0x007F, 257, -1, 39515, 39518, 39527, 39537, 39541, 39515, 0, {39545, 0, 0, 0}, 17, 17, { 932, 20290, 10001, 932, 0, ',' }},
+       {0x0012, 0x007F, 257, -1, 39572, 39575, 39582, 39592, 39596, 39572, 0, {39600, 0, 0, 0}, 18, 18, { 949, 20833, 10003, 949, 0, ',' }},
+       {0x0013, 0x007F, 257, -1, 39610, 39613, 39619, 39630, 39634, 39610, 0, {39638, 0, 0, 0}, 19, 19, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0014, 0x007F, 257, -1, 39660, 39663, 39673, 39679, 39683, 39687, 0, {38972, 0, 0, 0}, 20, 20, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x0015, 0x007F, 257, -1, 39690, 39693, 39700, 39707, 39711, 39690, 0, {39715, 0, 0, 0}, 21, 21, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x0016, 0x007F, 257, -1, 39739, 39742, 39753, 39764, 39768, 39739, 0, {39772, 0, 0, 0}, 22, 22, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0017, 0x007F, 257, -1, 39795, 39798, 39806, 39816, 39820, 39795, 0, {39824, 0, 0, 0}, 23, 23, { 1252, 20273, 10000, 850, 0, ';' }},
+       {0x0018, 0x007F, 257, -1, 39844, 39847, 39856, 39865, 39869, 39844, 0, {39873, 0, 0, 0}, 24, 24, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x0019, 0x007F, 257, -1, 39892, 39895, 39903, 39918, 39922, 39892, 0, {39926, 0, 0, 0}, 25, 25, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x001A, 0x007F, 257, -1, 39972, 39975, 39984, 39993, 39997, 39972, 0, {40001, 0, 0, 0}, 26, 26, { 1250, 500, 10082, 852, 0, ';' }},
+       {0x001B, 0x007F, 257, -1, 12799, 40024, 40031, 40043, 40047, 12799, 0, {40051, 0, 0, 0}, 27, 27, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x001C, 0x007F, 257, -1, 40075, 40078, 40087, 40093, 40097, 40075, 0, {40101, 0, 0, 0}, 28, 28, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x001D, 0x007F, 257, -1, 40121, 40124, 40132, 40140, 40144, 40121, 0, {38972, 0, 0, 0}, 29, 29, { 1252, 20278, 10000, 850, 0, ';' }},
+       {0x001E, 0x007F, 512, -1, 40148, 40151, 40156, 40166, 40170, 40148, 0, {0, 40174, 0, 0}, 30, 30, { 874, 20838, 10021, 874, 0, ',' }},
+       {0x001F, 0x007F, 257, -1, 12808, 40205, 40213, 40222, 40226, 12808, 0, {40230, 0, 0, 0}, 31, 31, { 1254, 20905, 10081, 857, 0, ';' }},
+       {0x0020, 0x007F, 257, -1, 40244, 40247, 40252, 40261, 40265, 40244, 0, {40269, 0, 0, 0}, 32, 32, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x0021, 0x007F, 257, -1, 40299, 40302, 40313, 40330, 40334, 40299, 0, {40338, 0, 0, 0}, 33, 33, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0022, 0x007F, 257, -1, 40357, 40360, 40370, 40391, 40395, 40357, 0, {40399, 0, 0, 0}, 34, 34, { 1251, 500, 10017, 866, 0, ';' }},
+       {0x0023, 0x007F, 257, -1, 40445, 40448, 40459, 40480, 40484, 40445, 0, {40488, 0, 0, 0}, 35, 35, { 1251, 500, 10007, 866, 0, ';' }},
+       {0x0024, 0x007F, 257, -1, 40530, 40533, 40543, 40557, 40561, 40530, 0, {40565, 0, 0, 0}, 36, 36, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x0025, 0x007F, 257, -1, 40587, 40590, 40599, 40605, 40609, 40587, 0, {40613, 0, 0, 0}, 37, 37, { 1257, 500, 10029, 775, 0, ';' }},
+       {0x0026, 0x007F, 257, -1, 40633, 40636, 40644, 40654, 40658, 40633, 0, {40662, 0, 0, 0}, 38, 38, { 1257, 500, 10029, 775, 0, ';' }},
+       {0x0027, 0x007F, 257, -1, 40681, 40684, 40695, 40705, 40709, 40681, 0, {40713, 0, 0, 0}, 39, 39, { 1257, 500, 10029, 775, 0, ';' }},
+       {0x0028, 0x007F, 257, -1, 40736, 40739, 40745, 40758, 40762, 40736, 0, {0, 0, 0, 0}, 40, 40, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x0029, 0x007F, 257, -1, 40766, 40769, 40777, 40788, 40792, 40766, 0, {40796, 0, 0, 0}, 41, 41, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x002A, 0x007F, 257, -1, 40820, 40823, 40834, 40849, 35702, 40820, 0, {40853, 0, 0, 0}, 42, 42, { 1258, 500, 10000, 1258, 0, ',' }},
+       {0x002B, 0x007F, 257, -1, 40868, 40871, 40880, 40895, 40899, 40868, 0, {40903, 0, 0, 0}, 43, 43, { 0, 500, 2, 1, 0, ',' }},
+       {0x002C, 0x007F, 257, -1, 40933, 40936, 40948, 40960, 40964, 40933, 0, {40968, 0, 0, 0}, 44, 44, { 1254, 20905, 10081, 857, 0, ';' }},
+       {0x002D, 0x007F, 257, -1, 40987, 40990, 40997, 41005, 41009, 40987, 0, {41013, 0, 0, 0}, 45, 45, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x002F, 0x007F, 257, -1, 41033, 41036, 41047, 41068, 41072, 41033, 0, {41076, 0, 0, 0}, 46, 46, { 1251, 500, 10007, 866, 0, ';' }},
+       {0x0032, 0x007F, 257, -1, 41120, 41123, 41130, 41139, 41143, 41120, 0, {0, 0, 0, 0}, 47, 47, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0034, 0x007F, 257, -1, 41147, 41150, 41156, 41165, 41169, 41147, 0, {0, 0, 0, 0}, 48, 48, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0035, 0x007F, 257, -1, 41173, 41176, 41181, 41189, 41193, 41173, 0, {41197, 0, 0, 0}, 49, 49, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0036, 0x007F, 257, -1, 41218, 41221, 41221, 41231, 41235, 41218, 0, {41239, 0, 0, 0}, 50, 50, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0037, 0x007F, 257, -1, 41259, 41262, 41271, 41293, 41297, 41259, 0, {41301, 0, 0, 0}, 51, 51, { 0, 500, 2, 1, 0, ';' }},
+       {0x0038, 0x007F, 257, -1, 41366, 41369, 41377, 41387, 41391, 41366, 0, {0, 0, 0, 0}, 52, 52, { 1252, 20277, 10079, 850, 0, ';' }},
+       {0x0039, 0x007F, 257, -1, 41395, 41398, 41404, 41420, 41424, 41395, 0, {41428, 0, 0, 0}, 53, 53, { 0, 500, 2, 1, 0, ',' }},
+       {0x003A, 0x007F, 257, -1, 41481, 41484, 41492, 41498, 41502, 41481, 0, {41506, 0, 0, 0}, 54, 54, { 0, 500, 2, 1, 0, ',' }},
+       {0x003B, 0x007F, 257, -1, 41527, 41530, 41544, 41561, 41565, 41527, 0, {41569, 0, 0, 0}, 55, 55, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x003C, 0x007F, 257, -1, 41588, 41591, 41597, 41605, 41609, 41588, 0, {41613, 0, 0, 0}, 56, 56, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x003E, 0x007F, 257, -1, 41634, 41637, 41643, 41657, 41661, 41634, 0, {41665, 0, 0, 0}, 57, 57, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x003F, 0x007F, 257, -1, 41682, 41685, 41692, 41712, 41716, 41682, 0, {41720, 0, 0, 0}, 58, 58, { 0, 500, 2, 1, 0, ';' }},
+       {0x0040, 0x007F, 257, -1, 41762, 41765, 41772, 41789, 41793, 41762, 0, {41797, 0, 0, 0}, 59, 59, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x0041, 0x007F, 257, -1, 41835, 41838, 41846, 41856, 41860, 41835, 0, {41864, 0, 0, 0}, 60, 60, { 1252, 500, 10000, 437, 0, ',' }},
+       {0x0043, 0x007F, 257, -1, 41885, 41888, 41894, 41905, 41909, 41885, 0, {41913, 0, 0, 0}, 61, 61, { 1254, 500, 10029, 857, 0, ';' }},
+       {0x0045, 0x007F, 257, -1, 41933, 41936, 41944, 41960, 41964, 41933, 0, {41968, 0, 0, 0}, 62, 62, { 0, 500, 2, 1, 0, ',' }},
+       {0x0046, 0x007F, 257, -1, 42033, 42036, 42044, 42063, 42067, 42033, 0, {42071, 0, 0, 0}, 63, 63, { 0, 500, 2, 1, 0, ',' }},
+       {0x0047, 0x007F, 257, -1, 42118, 42121, 42130, 42152, 42156, 42118, 0, {42160, 0, 0, 0}, 64, 64, { 0, 500, 2, 1, 0, ',' }},
+       {0x0048, 0x007F, 257, -1, 42216, 42219, 42225, 42241, 42245, 42216, 0, {0, 0, 0, 0}, 65, 65, { 0, 500, 2, 1, 0, ',' }},
+       {0x0049, 0x007F, 257, -1, 42249, 42252, 42258, 42274, 42278, 42249, 0, {42282, 0, 0, 0}, 66, 66, { 0, 500, 2, 1, 0, ',' }},
+       {0x004A, 0x007F, 257, -1, 42347, 42350, 42357, 42376, 42380, 42347, 0, {42384, 0, 0, 0}, 67, 67, { 0, 500, 2, 1, 0, ',' }},
+       {0x004B, 0x007F, 257, -1, 37865, 42449, 42457, 42473, 42477, 37865, 0, {42481, 0, 0, 0}, 68, 68, { 0, 500, 2, 1, 0, ',' }},
+       {0x004C, 0x007F, 257, -1, 42546, 42549, 42559, 42578, 42582, 42546, 0, {42586, 0, 0, 0}, 69, 69, { 0, 500, 2, 1, 0, ',' }},
+       {0x004D, 0x007F, 257, -1, 42630, 42633, 42642, 42664, 42668, 42630, 0, {42672, 0, 0, 0}, 70, 70, { 0, 500, 2, 1, 0, ',' }},
+       {0x004E, 0x007F, 257, -1, 42725, 42728, 42736, 42752, 2530, 42725, 0, {42756, 0, 0, 0}, 71, 71, { 0, 500, 2, 1, 0, ',' }},
+       {0x0050, 0x007F, 257, -1, 42818, 42821, 42831, 42844, 42848, 42818, 0, {42852, 0, 0, 0}, 72, 72, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x0051, 0x007F, 257, -1, 42884, 42887, 42895, 42920, 42924, 42884, 0, {0, 0, 0, 0}, 73, 73, { 0, 500, 2, 1, 0, ',' }},
+       {0x0052, 0x007F, 257, -1, 42928, 42931, 42937, 42945, 42949, 42928, 0, {42953, 0, 0, 0}, 74, 74, { 1252, 20285, 10000, 850, 0, ',' }},
+       {0x0053, 0x007F, 257, -1, 42969, 42972, 42978, 42994, 42998, 42969, 0, {43002, 0, 0, 0}, 75, 75, { 0, 500, 2, 1, 0, ',' }},
+       {0x0054, 0x007F, 257, -1, 43057, 43060, 43064, 43074, 43078, 43057, 0, {43082, 0, 0, 0}, 76, 76, { 0, 500, 2, 1, 0, ',' }},
+       {0x0056, 0x007F, 257, -1, 43128, 43131, 43140, 43147, 43151, 43128, 0, {39493, 0, 0, 0}, 77, 77, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0057, 0x007F, 257, -1, 43155, 43159, 43167, 43186, 43155, 43155, 0, {0, 0, 0, 0}, 78, 78, { 0, 500, 2, 1, 0, ',' }},
+       {0x005B, 0x007F, 257, -1, 43190, 43193, 43201, 43217, 43221, 43190, 0, {43225, 0, 0, 0}, 79, 79, { 0, 500, 2, 1, 0, ',' }},
+       {0x005E, 0x007F, 257, -1, 8151, 43284, 43292, 43305, 43309, 8151, 0, {43313, 0, 0, 0}, 80, 80, { 0, 500, 2, 1, 0, ';' }},
+       {0x005F, 0x007F, 257, -1, 43358, 43362, 43386, 43396, 43358, 43358, 0, {0, 0, 0, 0}, 81, 81, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x0061, 0x007F, 257, -1, 1992, 43400, 43407, 43426, 43430, 1992, 0, {43434, 0, 0, 0}, 82, 82, { 0, 500, 2, 1, 0, ',' }},
+       {0x0063, 0x007F, 1024, -1, 43484, 43487, 43494, 43503, 43507, 43484, 0, {0, 0, 0, 0}, 83, 83, { 0, 500, 2, 1, 1, ';' }},
+       {0x0064, 0x007F, 257, -1, 43511, 43515, 43515, 43524, 43511, 43511, 0, {43528, 0, 0, 0}, 84, 84, { 1252, 500, 10000, 437, 0, ',' }},
+       {0x0068, 0x007F, 257, -1, 43551, 43554, 43554, 43560, 43564, 43551, 0, {0, 0, 0, 0}, 85, 85, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x006A, 0x007F, 257, -1, 43568, 43571, 43578, 43593, 43597, 43568, 0, {0, 0, 0, 0}, 86, 86, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x006C, 0x007F, 257, -1, 43601, 43605, 43620, 43637, 43601, 43601, 0, {0, 0, 0, 0}, 87, 87, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x006F, 0x007F, 257, -1, 43641, 43644, 43656, 43668, 43672, 43641, 0, {43676, 0, 0, 0}, 88, 88, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x0070, 0x007F, 257, -1, 43703, 43706, 43706, 43711, 43715, 43703, 0, {0, 0, 0, 0}, 89, 89, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x0078, 0x007F, 257, -1, 43719, 43722, 43733, 43743, 43747, 43719, 0, {43751, 0, 0, 0}, 90, 90, { 0, 500, 2, 1, 0, ',' }},
+       {0x007E, 0x007F, 257, -1, 43764, 43767, 43774, 43784, 43788, 43764, 0, {43792, 0, 0, 0}, 91, 91, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x0084, 0x007F, 257, -1, 43812, 43816, 43829, 43848, 43812, 43812, 0, {43852, 0, 0, 0}, 92, 92, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x0085, 0x007F, 257, -1, 43877, 43881, 43887, 43905, 43877, 43877, 0, {0, 0, 0, 0}, 93, 93, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x0087, 0x007F, 257, -1, 43909, 43912, 43912, 43924, 43928, 43909, 0, {0, 0, 0, 0}, 94, 94, { 1252, 37, 10000, 437, 0, ';' }},
+       {0x0091, 0x007F, 257, -1, 43932, 43935, 43951, 43961, 43965, 43932, 0, {43969, 0, 0, 0}, 95, 95, { 1252, 20285, 10000, 850, 0, ',' }},
+       {0x0401, 0x0001, 768, 95, 43994, 44000, 44022, 38641, 38645, 38616, 13750, {0, 0, 38649, 0}, 96, 96, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x0402, 0x0002, 257, 11, 44086, 44092, 44113, 38709, 38713, 38677, 44151, {38717, 0, 0, 0}, 97, 97, { 1251, 21025, 10007, 866, 0, ';' }},
+       {0x0403, 0x0003, 257, 31, 44154, 44160, 44176, 38778, 38782, 38759, 44194, {38786, 0, 0, 0}, 98, 98, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0404, 0x7C04, 257, 107, 44197, 44203, 44225, 44241, 38852, 38856, 44245, {44248, 0, 0, 0}, 99, 99, { 950, 500, 10002, 950, 0, ',' }},
+       {0x0405, 0x0005, 257, 23, 44255, 44261, 44284, 38914, 38918, 38895, 44314, {38922, 0, 0, 0}, 100, 100, { 1250, 500, 10029, 852, 0, ';' }},
+       {0x0406, 0x0006, 257, 25, 44317, 44323, 44340, 38964, 38968, 38948, 44356, {38972, 0, 0, 0}, 101, 101, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x0407, 0x0007, 257, 24, 44359, 44365, 44382, 39011, 39015, 38993, 44404, {39019, 0, 0, 0}, 102, 102, { 1252, 20273, 10000, 850, 0, ';' }},
+       {0x0408, 0x0008, 257, 39, 44407, 44413, 44428, 39070, 39074, 39044, 44460, {39078, 0, 0, 0}, 103, 103, { 1253, 20273, 10006, 737, 0, ';' }},
+       {0x0409, 0x0009, 257, 109, 44463, 44469, 44469, 39131, 39135, 39120, 44493, {39139, 0, 0, 0}, 104, 104, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x040B, 0x000B, 257, 33, 44496, 44502, 44520, 39225, 39229, 39208, 44534, {39233, 0, 0, 0}, 105, 105, { 1252, 20278, 10000, 850, 0, ';' }},
+       {0x040C, 0x000C, 257, 35, 44537, 44543, 44559, 39278, 39282, 39258, 44578, {39286, 0, 0, 0}, 106, 106, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x040D, 0x000D, 257, 47, 44581, 44587, 44603, 39329, 39333, 39308, 44627, {39337, 0, 0, 0}, 107, 107, { 1255, 500, 10005, 862, 1, ',' }},
+       {0x040E, 0x000E, 257, 44, 44630, 44636, 44656, 39390, 39394, 39370, 44679, {39398, 0, 0, 0}, 108, 108, { 1250, 500, 10029, 852, 0, ';' }},
+       {0x040F, 0x000F, 257, 51, 44682, 44688, 44708, 39437, 39441, 39414, 44728, {39445, 0, 0, 0}, 109, 109, { 1252, 20871, 10079, 850, 0, ';' }},
+       {0x0410, 0x0010, 257, 52, 44731, 44737, 44753, 39485, 39489, 39465, 44771, {39493, 0, 0, 0}, 110, 110, { 1252, 20280, 10000, 850, 0, ';' }},
+       {0x0411, 0x0011, 257, 55, 44774, 44780, 44797, 39537, 39541, 39515, 44816, {39545, 0, 0, 0}, 111, 111, { 932, 20290, 10001, 932, 0, ',' }},
+       {0x0412, 0x0012, 257, 58, 44819, 44825, 44846, 39592, 39596, 39572, 44871, {39600, 0, 0, 0}, 112, 112, { 949, 20833, 10003, 949, 0, ',' }},
+       {0x0413, 0x0013, 257, 77, 44874, 44880, 44900, 39630, 39634, 39610, 44923, {39638, 0, 0, 0}, 113, 113, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0414, 0x7C14, 257, 78, 44926, 44932, 44959, 39679, 39683, 39687, 44981, {38972, 0, 0, 0}, 114, 114, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x0415, 0x0015, 257, 86, 44984, 44990, 45006, 39707, 39711, 39690, 45022, {39715, 0, 0, 0}, 115, 115, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x0416, 0x0016, 257, 14, 45025, 45031, 45051, 39764, 39768, 39739, 45071, {39772, 0, 0, 0}, 116, 116, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0417, 0x0017, 257, 18, 45074, 45080, 45102, 39816, 39820, 39795, 13753, {39824, 0, 0, 0}, 117, 117, { 1252, 20273, 10000, 850, 0, ';' }},
+       {0x0418, 0x0018, 257, 91, 45121, 45127, 45146, 39865, 39869, 39844, 45166, {39873, 0, 0, 0}, 118, 118, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x0419, 0x0019, 257, 93, 45169, 45175, 45192, 39918, 39922, 39892, 45222, {39926, 0, 0, 0}, 119, 119, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x041A, 0x001A, 257, 43, 45225, 45231, 45250, 39993, 39997, 39972, 45270, {40001, 0, 0, 0}, 120, 120, { 1250, 500, 10082, 852, 0, ';' }},
+       {0x041B, 0x001B, 257, 99, 45273, 45279, 45297, 40043, 40047, 12799, 45321, {40051, 0, 0, 0}, 121, 121, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x041C, 0x001C, 257, 2, 45324, 45330, 45349, 40093, 40097, 40075, 45367, {40101, 0, 0, 0}, 122, 122, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x041D, 0x001D, 257, 96, 45370, 45376, 45393, 40140, 40144, 40121, 45411, {38972, 0, 0, 0}, 123, 123, { 1252, 20278, 10000, 850, 0, ';' }},
+       {0x041E, 0x001E, 512, 102, 45414, 45420, 45436, 40166, 40170, 40148, 45458, {0, 40174, 0, 0}, 124, 124, { 874, 20838, 10021, 874, 0, ',' }},
+       {0x041F, 0x001F, 257, 105, 45461, 45467, 45484, 40222, 40226, 12808, 45504, {40230, 0, 0, 0}, 125, 125, { 1254, 20905, 10081, 857, 0, ';' }},
+       {0x0420, 0x0020, 257, 85, 45507, 45513, 45529, 40261, 40265, 40244, 45555, {40269, 0, 0, 0}, 126, 126, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x0421, 0x0021, 257, 45, 45558, 45564, 45587, 40330, 40334, 40299, 45616, {40338, 0, 0, 0}, 127, 127, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0422, 0x0022, 257, 108, 45619, 45625, 45645, 40391, 40395, 40357, 45683, {40399, 0, 0, 0}, 128, 128, { 1251, 500, 10017, 866, 0, ';' }},
+       {0x0423, 0x0023, 257, 15, 45686, 45692, 45713, 40480, 40484, 40445, 45753, {40488, 0, 0, 0}, 129, 129, { 1251, 500, 10007, 866, 0, ';' }},
+       {0x0424, 0x0024, 257, 98, 45756, 45762, 45783, 40557, 40561, 40530, 45809, {40565, 0, 0, 0}, 130, 130, { 1250, 20880, 10029, 852, 0, ';' }},
+       {0x0425, 0x0025, 257, 29, 45812, 45818, 45837, 40605, 40609, 40587, 45851, {40613, 0, 0, 0}, 131, 131, { 1257, 500, 10029, 775, 0, ';' }},
+       {0x0426, 0x0026, 257, 66, 45854, 45860, 45877, 40654, 40658, 40633, 45897, {40662, 0, 0, 0}, 132, 132, { 1257, 500, 10029, 775, 0, ';' }},
+       {0x0427, 0x0027, 257, 64, 45900, 45906, 45929, 40705, 40709, 40681, 45949, {40713, 0, 0, 0}, 133, 133, { 1257, 500, 10029, 775, 0, ';' }},
+       {0x0428, 0x7C28, 257, 103, 45952, 45963, 45992, 40758, 40762, 40736, 46028, {0, 0, 0, 0}, 134, 134, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x0429, 0x0029, 257, 50, 46031, 46037, 46052, 40788, 40792, 40766, 46076, {40796, 0, 0, 0}, 135, 135, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x042A, 0x002A, 257, 113, 46079, 46085, 46106, 40849, 35702, 40820, 46134, {40853, 0, 0, 0}, 136, 136, { 1258, 500, 10000, 1258, 0, ',' }},
+       {0x042B, 0x002B, 257, 3, 46137, 46143, 46162, 40895, 40899, 40868, 1929, {40903, 0, 0, 0}, 137, 137, { 0, 500, 2, 1, 0, ',' }},
+       {0x042C, 0x782C, 257, 7, 46196, 46207, 46239, 40960, 40964, 40933, 46265, {40968, 0, 0, 0}, 138, 138, { 1254, 20905, 10081, 857, 0, ';' }},
+       {0x042D, 0x002D, 257, 31, 46268, 46274, 46289, 41005, 41009, 40987, 44194, {41013, 0, 0, 0}, 139, 139, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x042F, 0x002F, 257, 71, 46308, 46314, 46337, 41068, 41072, 41033, 46381, {41076, 0, 0, 0}, 140, 140, { 1251, 500, 10007, 866, 0, ';' }},
+       {0x0432, 0x0032, 257, 115, 46384, 46390, 41130, 41139, 41143, 41120, 46412, {0, 0, 0, 0}, 141, 141, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0434, 0x0034, 257, 115, 46415, 46421, 41156, 41165, 41169, 41147, 46412, {0, 0, 0, 0}, 142, 142, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0435, 0x0035, 257, 115, 46442, 46448, 46468, 41189, 41193, 41173, 46412, {41197, 0, 0, 0}, 143, 143, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0436, 0x0036, 257, 115, 46493, 46499, 46524, 41231, 41235, 41218, 46412, {41239, 0, 0, 0}, 144, 144, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0437, 0x0037, 257, 37, 46548, 46554, 46573, 41293, 41297, 41259, 46628, {41301, 0, 0, 0}, 145, 145, { 0, 500, 2, 1, 0, ';' }},
+       {0x0438, 0x0038, 257, 34, 46631, 46637, 46661, 41387, 41391, 41366, 46682, {0, 0, 0, 0}, 146, 146, { 1252, 20277, 10079, 850, 0, ';' }},
+       {0x0439, 0x0039, 257, 48, 46685, 46691, 46705, 41420, 41424, 41395, 46736, {41428, 0, 0, 0}, 147, 147, { 0, 500, 2, 1, 0, ',' }},
+       {0x043A, 0x003A, 257, 73, 46739, 46745, 46761, 41498, 41502, 41481, 46775, {41506, 0, 0, 0}, 148, 148, { 0, 500, 2, 1, 0, ',' }},
+       {0x043B, 0x003B, 257, 78, 46778, 46784, 46807, 41561, 41565, 41527, 44981, {41569, 0, 0, 0}, 149, 149, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x0441, 0x0041, 257, 56, 46832, 46838, 46854, 41856, 41860, 41835, 46872, {41864, 0, 0, 0}, 150, 150, { 1252, 500, 10000, 437, 0, ',' }},
+       {0x0443, 0x7C43, 257, 111, 46875, 46886, 46912, 41905, 41909, 41885, 46938, {41913, 0, 0, 0}, 151, 151, { 1254, 500, 10029, 857, 0, ';' }},
+       {0x0445, 0x0045, 257, 48, 46941, 46947, 46963, 41960, 41964, 41933, 46736, {41968, 0, 0, 0}, 152, 152, { 0, 500, 2, 1, 0, ',' }},
+       {0x0447, 0x0047, 257, 48, 46994, 47000, 47017, 42152, 42156, 42118, 46736, {42160, 0, 0, 0}, 153, 153, { 0, 500, 2, 1, 0, ',' }},
+       {0x0448, 0x0048, 257, 48, 47054, 47060, 47074, 42241, 42245, 42216, 46736, {0, 0, 0, 0}, 154, 154, { 0, 500, 2, 1, 0, ',' }},
+       {0x0449, 0x0049, 257, 48, 47105, 47111, 47125, 42274, 42278, 42249, 46736, {42282, 0, 0, 0}, 155, 155, { 0, 500, 2, 1, 0, ',' }},
+       {0x044A, 0x004A, 257, 48, 47165, 47171, 47186, 42376, 42380, 42347, 46736, {42384, 0, 0, 0}, 156, 156, { 0, 500, 2, 1, 0, ',' }},
+       {0x044B, 0x004B, 257, 48, 47233, 47239, 47255, 42473, 42477, 37865, 46736, {42481, 0, 0, 0}, 157, 157, { 0, 500, 2, 1, 0, ',' }},
+       {0x044C, 0x004C, 257, 48, 47286, 47292, 47310, 42578, 42582, 42546, 46736, {42586, 0, 0, 0}, 158, 158, { 0, 500, 2, 1, 0, ',' }},
+       {0x044D, 0x004D, 257, 48, 47350, 47356, 47373, 42664, 42668, 42630, 46736, {42672, 0, 0, 0}, 159, 159, { 0, 500, 2, 1, 0, ',' }},
+       {0x044E, 0x004E, 257, 48, 47410, 47416, 47432, 42752, 2530, 42725, 46736, {42756, 0, 0, 0}, 160, 160, { 0, 500, 2, 1, 0, ',' }},
+       {0x0451, 0x0051, 257, 20, 47463, 47469, 47485, 42920, 42924, 42884, 13832, {0, 0, 0, 0}, 161, 161, { 0, 500, 2, 1, 0, ',' }},
+       {0x0452, 0x0052, 257, 36, 47531, 47537, 47560, 42945, 42949, 42928, 47587, {42953, 0, 0, 0}, 162, 162, { 1252, 20285, 10000, 850, 0, ',' }},
+       {0x0453, 0x0053, 257, 57, 47590, 47596, 47613, 42994, 42998, 42969, 47653, {43002, 0, 0, 0}, 163, 163, { 0, 500, 2, 1, 0, ',' }},
+       {0x0454, 0x0054, 257, 60, 47656, 47662, 47673, 43074, 43078, 43057, 47695, {43082, 0, 0, 0}, 164, 164, { 0, 500, 2, 1, 0, ',' }},
+       {0x0456, 0x0056, 257, 31, 47698, 47704, 47721, 43147, 43151, 43128, 44194, {39493, 0, 0, 0}, 165, 165, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0457, 0x0057, 257, 48, 47738, 47745, 47761, 43186, 43155, 43155, 46736, {0, 0, 0, 0}, 166, 166, { 0, 500, 2, 1, 0, ',' }},
+       {0x045B, 0x005B, 257, 63, 47795, 47801, 47821, 43217, 43221, 43190, 47871, {43225, 0, 0, 0}, 167, 167, { 0, 500, 2, 1, 0, ',' }},
+       {0x045E, 0x005E, 257, 32, 47874, 47880, 47899, 43305, 43309, 8151, 47930, {43313, 0, 0, 0}, 168, 168, { 0, 500, 2, 1, 0, ';' }},
+       {0x0461, 0x0061, 257, 79, 47933, 47939, 47954, 43426, 43430, 1992, 47991, {43434, 0, 0, 0}, 169, 169, { 0, 500, 2, 1, 0, ',' }},
+       {0x0463, 0x0063, 1024, 1, 47994, 48000, 48021, 43503, 43507, 43484, 48051, {0, 0, 0, 0}, 170, 170, { 0, 500, 2, 1, 1, ';' }},
+       {0x0464, 0x0064, 257, 84, 48054, 48061, 48084, 43524, 43511, 43511, 48105, {43528, 0, 0, 0}, 171, 171, { 1252, 500, 10000, 437, 0, ',' }},
+       {0x0468, 0x7C68, 257, 75, 48108, 48119, 48142, 43560, 43564, 43551, 48159, {0, 0, 0, 0}, 172, 172, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x046A, 0x006A, 257, 75, 48162, 48168, 48185, 43593, 43597, 43568, 48159, {0, 0, 0, 0}, 173, 173, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x046C, 0x006C, 257, 115, 48231, 48238, 43620, 43637, 43601, 43601, 46412, {0, 0, 0, 0}, 174, 174, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x046F, 0x006F, 257, 38, 48268, 48274, 48298, 43668, 43672, 43641, 48329, {43676, 0, 0, 0}, 175, 175, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x0470, 0x0070, 257, 75, 48332, 48338, 48338, 43711, 43715, 43703, 48159, {0, 0, 0, 0}, 176, 176, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x0478, 0x0078, 257, 20, 48353, 48359, 48378, 43743, 43747, 43719, 13832, {43751, 0, 0, 0}, 177, 177, { 0, 500, 2, 1, 0, ',' }},
+       {0x047E, 0x007E, 257, 35, 48397, 48403, 48419, 43784, 43788, 43764, 44578, {43792, 0, 0, 0}, 178, 178, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x0485, 0x0085, 257, 93, 48438, 48445, 43887, 43905, 43877, 43877, 45222, {0, 0, 0, 0}, 179, 179, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x0487, 0x0087, 257, 94, 48460, 48466, 48466, 43924, 43928, 43909, 48487, {0, 0, 0, 0}, 180, 180, { 1252, 37, 10000, 437, 0, ';' }},
+       {0x0491, 0x0091, 257, 36, 48490, 48496, 48529, 43961, 43965, 43932, 47587, {43969, 0, 0, 0}, 181, 181, { 1252, 20285, 10000, 850, 0, ',' }},
+       {0x0801, 0x0001, 257, 49, 48565, 48571, 48585, 48615, 38645, 38616, 48619, {48622, 0, 0, 0}, 182, 182, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x0804, 0x0004, 257, 20, 48654, 38874, 48660, 38848, 38852, 38856, 13832, {38859, 0, 0, 0}, 183, 183, { 936, 500, 10008, 936, 0, ',' }},
+       {0x0807, 0x0007, 257, 18, 48676, 48682, 48703, 48721, 39015, 38993, 13753, {39019, 0, 0, 0}, 184, 184, { 1252, 20273, 10000, 850, 0, ';' }},
+       {0x0809, 0x0009, 257, 36, 48725, 48731, 48731, 48756, 39135, 39120, 47587, {39139, 0, 0, 0}, 185, 185, { 1252, 20285, 10000, 850, 0, ',' }},
+       {0x080A, 0x000A, 257, 74, 48760, 48766, 48783, 48802, 39182, 39158, 48806, {39493, 0, 0, 0}, 186, 186, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x080C, 0x000C, 257, 10, 48809, 48815, 48832, 48853, 39282, 39258, 48857, {39286, 0, 0, 0}, 187, 187, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x0810, 0x0010, 257, 18, 48860, 48866, 48888, 48908, 39489, 39465, 13753, {39493, 0, 0, 0}, 188, 188, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0813, 0x0013, 257, 10, 48912, 48918, 48934, 48955, 39634, 39610, 48857, {39638, 0, 0, 0}, 189, 189, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x0814, 0x7814, 257, 78, 48959, 48965, 48992, 49008, 49012, 49016, 44981, {38972, 0, 0, 0}, 190, 190, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x0816, 0x0016, 257, 88, 49019, 49025, 49047, 49069, 39768, 39739, 49073, {39772, 0, 0, 0}, 191, 191, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x081D, 0x001D, 257, 33, 49076, 49082, 49100, 49118, 40144, 40121, 44534, {38972, 0, 0, 0}, 192, 192, { 1252, 20278, 10000, 850, 0, ';' }},
+       {0x082C, 0x742C, 257, 7, 49122, 49133, 46239, 49168, 40964, 40933, 46265, {40968, 0, 0, 0}, 193, 193, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x083C, 0x003C, 257, 46, 49172, 49178, 49194, 41605, 41609, 41588, 49210, {41613, 0, 0, 0}, 194, 194, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0843, 0x7843, 257, 111, 49213, 49224, 46912, 41905, 41909, 41885, 46938, {49253, 0, 0, 0}, 195, 195, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x0845, 0x0045, 257, 9, 49291, 49297, 49318, 49361, 41964, 41933, 49365, {41968, 0, 0, 0}, 196, 196, { 0, 500, 2, 1, 0, ',' }},
+       {0x0C01, 0x0001, 257, 30, 49368, 49374, 49389, 49413, 38645, 38616, 49417, {48622, 0, 0, 0}, 197, 197, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x0C04, 0x7C04, 257, 41, 49420, 49426, 49469, 49506, 38852, 38856, 49510, {44248, 0, 0, 0}, 198, 198, { 950, 500, 10002, 950, 0, ',' }},
+       {0x0C07, 0x0007, 257, 5, 49513, 49519, 49536, 49558, 39015, 38993, 49562, {39019, 0, 0, 0}, 199, 199, { 1252, 20273, 10000, 850, 0, ';' }},
+       {0x0C09, 0x0009, 257, 6, 49565, 49571, 49571, 49591, 39135, 39120, 49595, {39139, 0, 0, 0}, 200, 200, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x0C0A, 0x000A, 257, 31, 49598, 49604, 49620, 49639, 39182, 39158, 44194, {39186, 0, 0, 0}, 201, 201, { 1252, 20284, 10000, 850, 0, ';' }},
+       {0x0C0C, 0x000C, 257, 17, 49643, 49649, 49665, 49684, 39282, 39258, 49688, {49691, 0, 0, 0}, 202, 202, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x0C3B, 0x003B, 257, 33, 49713, 49719, 49743, 49769, 49773, 41527, 44534, {41569, 0, 0, 0}, 203, 203, { 1252, 20278, 10000, 850, 0, ';' }},
+       {0x1001, 0x0001, 257, 67, 49777, 49783, 49798, 49826, 38645, 38616, 49830, {48622, 0, 0, 0}, 204, 204, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x1004, 0x0004, 257, 97, 49833, 49839, 49871, 49890, 38852, 38856, 49894, {38859, 0, 0, 0}, 205, 205, { 936, 500, 10008, 936, 0, ',' }},
+       {0x1007, 0x0007, 257, 65, 49897, 49903, 49923, 49943, 39015, 38993, 49947, {39019, 0, 0, 0}, 206, 206, { 1252, 20273, 10000, 850, 0, ';' }},
+       {0x1009, 0x0009, 257, 17, 49950, 49956, 49956, 49973, 39135, 39120, 49688, {39139, 0, 0, 0}, 207, 207, { 1252, 37, 10000, 850, 0, ',' }},
+       {0x100A, 0x000A, 257, 40, 49977, 49983, 50003, 50024, 39182, 39158, 50028, {39186, 0, 0, 0}, 208, 208, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x100C, 0x000C, 257, 18, 50031, 50037, 50058, 50077, 39282, 39258, 13753, {39286, 0, 0, 0}, 209, 209, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x101A, 0x001A, 257, 8, 50081, 50087, 50121, 50152, 50156, 39972, 50160, {40001, 0, 0, 0}, 210, 210, { 1250, 870, 10082, 852, 0, ';' }},
+       {0x1401, 0x0001, 257, 27, 50163, 50169, 50186, 50218, 38645, 38616, 50222, {48622, 0, 0, 0}, 211, 211, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x1404, 0x7C04, 257, 72, 50225, 50231, 50270, 50307, 38852, 38856, 50311, {44248, 0, 0, 0}, 212, 212, { 950, 500, 10002, 950, 0, ',' }},
+       {0x1407, 0x0007, 257, 62, 50314, 50320, 50343, 50367, 39015, 38993, 50371, {39019, 0, 0, 0}, 213, 213, { 1252, 20273, 10000, 850, 0, ';' }},
+       {0x1409, 0x0009, 257, 80, 50374, 50380, 50380, 50402, 39135, 39120, 50406, {39139, 0, 0, 0}, 214, 214, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x140A, 0x000A, 257, 22, 50409, 50415, 50436, 50458, 39182, 39158, 50462, {39186, 0, 0, 0}, 215, 215, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x140C, 0x000C, 257, 65, 50465, 50471, 50491, 50514, 39282, 39258, 49947, {39286, 0, 0, 0}, 216, 216, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x141A, 0x681A, 257, 8, 50518, 50529, 50569, 50600, 50604, 50608, 50160, {50611, 0, 0, 0}, 217, 217, { 1250, 870, 10082, 852, 0, ';' }},
+       {0x1801, 0x0001, 257, 68, 50634, 50640, 50657, 50687, 38645, 38616, 50691, {48622, 0, 0, 0}, 218, 218, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x1809, 0x0009, 257, 46, 50694, 50700, 50700, 50718, 39135, 39120, 49210, {39139, 0, 0, 0}, 219, 219, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x180A, 0x000A, 257, 82, 50722, 50728, 50745, 50764, 39182, 39158, 50768, {39186, 0, 0, 0}, 220, 220, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x180C, 0x000C, 257, 69, 50771, 50777, 50793, 50812, 39282, 39258, 50816, {39286, 0, 0, 0}, 221, 221, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x181A, 0x701A, 257, 8, 50819, 50830, 50870, 50922, 50926, 50930, 50160, {50611, 0, 0, 0}, 222, 222, { 1250, 870, 10082, 852, 0, ';' }},
+       {0x1C01, 0x0001, 257, 104, 50933, 50939, 50956, 50982, 38645, 38616, 50986, {48622, 0, 0, 0}, 223, 223, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x1C09, 0x0009, 257, 115, 50989, 50995, 50995, 51018, 39135, 39120, 46412, {39139, 0, 0, 0}, 224, 224, { 1252, 500, 10000, 437, 0, ',' }},
+       {0x1C0A, 0x000A, 257, 26, 51022, 51028, 51057, 51090, 39182, 39158, 51094, {39186, 0, 0, 0}, 225, 225, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x1C1A, 0x6C1A, 257, 8, 51097, 51108, 50870, 51151, 51155, 50930, 50160, {41076, 0, 0, 0}, 226, 226, { 1251, 21025, 10007, 855, 0, ';' }},
+       {0x2001, 0x0001, 257, 81, 51159, 51165, 51179, 51207, 38645, 38616, 51211, {48622, 0, 0, 0}, 227, 227, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x2009, 0x0009, 257, 53, 51214, 51220, 51220, 51238, 39135, 39120, 51242, {39139, 0, 0, 0}, 228, 228, { 1252, 500, 10000, 850, 0, ',' }},
+       {0x200A, 0x000A, 257, 112, 51245, 51251, 51271, 51292, 39182, 39158, 51296, {39186, 0, 0, 0}, 229, 229, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x201A, 0x641A, 257, 8, 51299, 51310, 50569, 51353, 51357, 50608, 50160, {41076, 0, 0, 0}, 230, 230, { 1251, 870, 10082, 855, 0, ';' }},
+       {0x2401, 0x0001, 257, 114, 51361, 51367, 51382, 51410, 38645, 38616, 51414, {48622, 0, 0, 0}, 231, 231, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x240A, 0x000A, 257, 21, 51417, 51423, 51442, 51462, 39182, 39158, 51466, {39186, 0, 0, 0}, 232, 232, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x241A, 0x701A, 257, 92, 51469, 51480, 51504, 51532, 2239, 50930, 51536, {50611, 0, 0, 0}, 233, 233, { 1250, 500, 10029, 852, 0, ';' }},
+       {0x2801, 0x0001, 257, 101, 51539, 51545, 51560, 51588, 38645, 38616, 51592, {48622, 0, 0, 0}, 234, 234, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x2809, 0x0009, 257, 16, 51595, 51601, 51601, 51618, 39135, 39120, 51622, {39139, 0, 0, 0}, 235, 235, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x280A, 0x000A, 257, 83, 51625, 51631, 51646, 51663, 39182, 39158, 51667, {39186, 0, 0, 0}, 236, 236, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x281A, 0x6C1A, 257, 92, 51670, 51681, 51504, 51708, 2239, 50930, 51536, {41076, 0, 0, 0}, 237, 237, { 1251, 21025, 10007, 855, 0, ';' }},
+       {0x2C01, 0x0001, 257, 54, 51712, 51718, 51734, 51764, 38645, 38616, 51768, {48622, 0, 0, 0}, 238, 238, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x2C09, 0x0009, 257, 106, 51771, 51777, 51777, 51807, 39135, 39120, 51811, {39139, 0, 0, 0}, 239, 239, { 1252, 500, 10000, 850, 0, ';' }},
+       {0x2C0A, 0x000A, 257, 4, 51814, 51820, 51840, 51861, 39182, 39158, 51865, {39186, 0, 0, 0}, 240, 240, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x2C1A, 0x701A, 257, 70, 51868, 51879, 51907, 51940, 2239, 50930, 51944, {50611, 0, 0, 0}, 241, 241, { 1250, 500, 10029, 852, 0, ';' }},
+       {0x3001, 0x0001, 257, 61, 51947, 51953, 51970, 51998, 38645, 38616, 52002, {48622, 0, 0, 0}, 242, 242, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x3009, 0x0009, 257, 116, 52005, 52011, 52011, 52030, 39135, 39120, 52034, {39139, 0, 0, 0}, 243, 243, { 1252, 500, 10000, 437, 0, ',' }},
+       {0x300A, 0x000A, 257, 28, 52037, 52043, 52061, 52080, 39182, 39158, 52084, {39186, 0, 0, 0}, 244, 244, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x301A, 0x6C1A, 257, 70, 52087, 52098, 51907, 52129, 2239, 50930, 51944, {41076, 0, 0, 0}, 245, 245, { 1251, 21025, 10007, 855, 0, ';' }},
+       {0x3401, 0x0001, 257, 59, 52133, 52139, 52155, 52185, 38645, 38616, 52189, {48622, 0, 0, 0}, 246, 246, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x3409, 0x0009, 257, 84, 52192, 52198, 52198, 52220, 39135, 39120, 48105, {39139, 0, 0, 0}, 247, 247, { 1252, 500, 10000, 437, 0, ',' }},
+       {0x340A, 0x000A, 257, 19, 52224, 52230, 52246, 52263, 39182, 39158, 52267, {39186, 0, 0, 0}, 248, 248, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x3801, 0x0001, 257, 0, 52270, 52276, 52306, 52370, 38645, 38616, 52374, {48622, 0, 0, 0}, 249, 249, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x380A, 0x000A, 257, 110, 52377, 52383, 52401, 52420, 39182, 39158, 52424, {39186, 0, 0, 0}, 250, 250, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x3C01, 0x0001, 257, 12, 52427, 52433, 52450, 52482, 38645, 38616, 52486, {48622, 0, 0, 0}, 251, 251, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x3C0A, 0x000A, 257, 89, 52489, 52495, 52514, 52534, 39182, 39158, 52538, {39186, 0, 0, 0}, 252, 252, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x4001, 0x0001, 257, 90, 52541, 52547, 52562, 52586, 38645, 38616, 52590, {48622, 0, 0, 0}, 253, 253, { 1256, 20420, 10004, 720, 1, ';' }},
+       {0x4009, 0x0009, 257, 48, 52593, 52599, 52599, 52615, 39135, 39120, 46736, {39139, 0, 0, 0}, 254, 254, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x400A, 0x000A, 257, 13, 52619, 52625, 52643, 52662, 39182, 39158, 52666, {39186, 0, 0, 0}, 255, 255, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x440A, 0x000A, 257, 100, 52669, 52675, 52697, 52720, 39182, 39158, 52724, {39186, 0, 0, 0}, 256, 256, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x4809, 0x0009, 257, 97, 52727, 52733, 52733, 52753, 39135, 39120, 49894, {39139, 0, 0, 0}, 257, 257, { 1252, 37, 10000, 437, 0, ',' }},
+       {0x480A, 0x000A, 257, 42, 52757, 52763, 52782, 52802, 39182, 39158, 52806, {39186, 0, 0, 0}, 258, 258, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x4C0A, 0x000A, 257, 76, 52809, 52815, 52835, 52856, 39182, 39158, 52860, {39186, 0, 0, 0}, 259, 259, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x500A, 0x000A, 257, 87, 52863, 52869, 52891, 52914, 39182, 39158, 52918, {39186, 0, 0, 0}, 260, 260, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x540A, 0x000A, 257, 109, 52921, 52927, 52951, 52977, 39182, 39158, 44493, {39186, 0, 0, 0}, 261, 261, { 1252, 20284, 10000, 850, 0, ',' }},
+       {0x641A, 0x781A, 257, -1, 52981, 52989, 53008, 51353, 51357, 50608, 0, {41076, 0, 0, 0}, 262, 262, { 1251, 870, 10082, 855, 0, ';' }},
+       {0x681A, 0x781A, 257, -1, 53017, 53025, 53008, 50600, 50604, 50608, 0, {50611, 0, 0, 0}, 263, 263, { 1250, 870, 10082, 852, 0, ';' }},
+       {0x6C1A, 0x7C1A, 257, -1, 53041, 53049, 53068, 51708, 2239, 50930, 0, {41076, 0, 0, 0}, 264, 264, { 1251, 21025, 10007, 855, 0, ';' }},
+       {0x701A, 0x7C1A, 257, -1, 53081, 53089, 53068, 51532, 2239, 50930, 0, {50611, 0, 0, 0}, 265, 265, { 1250, 500, 10029, 852, 0, ';' }},
+       {0x742C, 0x002C, 257, -1, 53105, 53113, 40948, 49168, 40964, 40933, 0, {40968, 0, 0, 0}, 266, 266, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x7804, 0x007F, 257, -1, 38856, 38874, 38841, 38848, 38852, 38856, 0, {38859, 0, 0, 0}, 267, 267, { 936, 500, 10008, 936, 0, ',' }},
+       {0x7814, 0x0014, 257, -1, 49016, 53136, 53154, 49008, 49012, 49016, 0, {38972, 0, 0, 0}, 268, 268, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x781A, 0x007F, 257, -1, 50608, 53162, 53008, 50600, 50604, 50608, 0, {50611, 0, 0, 0}, 269, 269, { 1250, 870, 10082, 852, 0, ';' }},
+       {0x782C, 0x002C, 257, -1, 53170, 53178, 40948, 40960, 40964, 40933, 0, {40968, 0, 0, 0}, 270, 270, { 1254, 20905, 10081, 857, 0, ';' }},
+       {0x7843, 0x0043, 257, -1, 53198, 53206, 41894, 41905, 41909, 41885, 0, {49253, 0, 0, 0}, 271, 271, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x7850, 0x0050, 257, -1, 53223, 53231, 42831, 53252, 42848, 42818, 0, {42852, 0, 0, 0}, 272, 272, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x7C04, 0x7804, 257, -1, 53256, 44203, 38841, 44241, 38852, 38856, 0, {44248, 0, 0, 0}, 273, 273, { 950, 500, 10002, 950, 0, ',' }},
+       {0x7C04, 0x7C04, 257, -1, 53264, 53271, 38841, 44241, 38852, 38856, 0, {44248, 0, 0, 0}, 274, 274, { 950, 500, 10002, 950, 0, ',' }},
+       {0x7C14, 0x0014, 257, -1, 39687, 53300, 53318, 39679, 39683, 39687, 0, {38972, 0, 0, 0}, 275, 275, { 1252, 20277, 10000, 850, 0, ';' }},
+       {0x7C1A, 0x007F, 257, -1, 50930, 53332, 53068, 53340, 2239, 50930, 0, {41076, 0, 0, 0}, 276, 276, { 1250, 500, 10029, 852, 0, ';' }},
+       {0x7C28, 0x0028, 257, -1, 53344, 53352, 40745, 40758, 40762, 40736, 0, {0, 0, 0, 0}, 277, 277, { 1251, 20880, 10007, 866, 0, ';' }},
+       {0x7C43, 0x0043, 257, -1, 53369, 53377, 41894, 41905, 41909, 41885, 0, {41913, 0, 0, 0}, 278, 278, { 1254, 500, 10029, 857, 0, ';' }},
+       {0x7C5F, 0x005F, 257, -1, 53391, 53400, 43386, 43396, 43358, 43358, 0, {0, 0, 0, 0}, 279, 279, { 1252, 20297, 10000, 850, 0, ';' }},
+       {0x7C68, 0x0068, 257, -1, 53432, 53440, 43554, 43560, 43564, 43551, 0, {0, 0, 0, 0}, 280, 280, { 1252, 37, 10000, 437, 0, ',' }}
 };
 
 
 static const CultureInfoNameEntry culture_name_entries [] = {
-       {41243, 50},     /* af */
-       {53479, 144},    /* af-za */
+       {41218, 50},     /* af */
+       {53454, 144},    /* af-za */
        {8151, 80},      /* am */
-       {53485, 168},    /* am-et */
-       {38641, 0},      /* ar */
-       {53491, 249},    /* ar-ae */
-       {53497, 251},    /* ar-bh */
-       {53503, 211},    /* ar-dz */
-       {53509, 197},    /* ar-eg */
-       {53515, 182},    /* ar-iq */
-       {53521, 238},    /* ar-jo */
-       {53527, 246},    /* ar-kw */
-       {53533, 242},    /* ar-lb */
-       {53539, 204},    /* ar-ly */
-       {53545, 218},    /* ar-ma */
-       {53551, 227},    /* ar-om */
-       {53557, 253},    /* ar-qa */
-       {53563, 96},     /* ar-sa */
-       {53569, 234},    /* ar-sy */
-       {53575, 223},    /* ar-tn */
-       {53581, 231},    /* ar-ye */
-       {42655, 70},     /* as */
-       {53587, 159},    /* as-in */
-       {40958, 44},     /* az */
-       {53593, 266},    /* az-cyrl */
-       {53601, 193},    /* az-cyrl-az */
-       {53612, 270},    /* az-latn */
-       {53620, 138},    /* az-latn-az */
-       {40470, 35},     /* be */
-       {53631, 129},    /* be-by */
-       {38702, 1},      /* bg */
-       {53637, 97},     /* bg-bg */
-       {41958, 62},     /* bn */
-       {53643, 196},    /* bn-bd */
-       {53649, 152},    /* bn-in */
-       {42909, 73},     /* bo */
-       {53655, 161},    /* bo-cn */
-       {43789, 91},     /* br */
-       {53661, 178},    /* br-fr */
-       {50633, 269},    /* bs */
-       {53667, 262},    /* bs-cyrl */
-       {53675, 230},    /* bs-cyrl-ba */
-       {53686, 263},    /* bs-latn */
-       {53694, 217},    /* bs-latn-ba */
-       {38784, 2},      /* ca */
-       {53705, 98},     /* ca-es */
-       {38920, 5},      /* cs */
-       {53711, 100},    /* cs-cz */
-       {42953, 74},     /* cy */
-       {53717, 162},    /* cy-gb */
-       {38973, 6},      /* da */
-       {53723, 101},    /* da-dk */
-       {39018, 7},      /* de */
-       {53729, 199},    /* de-at */
-       {53735, 184},    /* de-ch */
-       {53741, 102},    /* de-de */
-       {53747, 213},    /* de-li */
-       {53753, 206},    /* de-lu */
-       {39069, 8},      /* el */
-       {53759, 103},    /* el-gr */
-       {39145, 9},      /* en */
-       {53765, 200},    /* en-au */
-       {53771, 235},    /* en-bz */
-       {53777, 207},    /* en-ca */
-       {53783, 185},    /* en-gb */
-       {53789, 219},    /* en-ie */
-       {53795, 254},    /* en-in */
-       {53801, 228},    /* en-jm */
-       {53807, 214},    /* en-nz */
-       {53813, 247},    /* en-ph */
-       {53819, 257},    /* en-sg */
-       {53825, 239},    /* en-tt */
-       {53831, 104},    /* en-us */
-       {53837, 224},    /* en-za */
-       {53843, 243},    /* en-zw */
-       {39183, 10},     /* es */
-       {53849, 240},    /* es-ar */
-       {53855, 255},    /* es-bo */
-       {53861, 248},    /* es-cl */
-       {53867, 232},    /* es-co */
-       {53873, 215},    /* es-cr */
-       {53879, 225},    /* es-do */
-       {53885, 244},    /* es-ec */
-       {53891, 201},    /* es-es */
-       {53897, 208},    /* es-gt */
-       {53903, 258},    /* es-hn */
-       {53909, 186},    /* es-mx */
-       {53915, 259},    /* es-ni */
-       {53921, 220},    /* es-pa */
-       {53927, 236},    /* es-pe */
-       {53933, 260},    /* es-pr */
-       {53939, 252},    /* es-py */
-       {53945, 256},    /* es-sv */
-       {53951, 261},    /* es-us */
-       {53957, 250},    /* es-uy */
-       {53963, 229},    /* es-ve */
-       {40612, 37},     /* et */
-       {53969, 131},    /* et-ee */
-       {41012, 45},     /* eu */
-       {53975, 139},    /* eu-es */
-       {40791, 41},     /* fa */
-       {53981, 135},    /* fa-ir */
-       {39233, 11},     /* fi */
-       {53987, 105},    /* fi-fi */
-       {43536, 84},     /* fil */
-       {53993, 171},    /* fil-ph */
-       {41391, 52},     /* fo */
-       {54000, 146},    /* fo-fo */
-       {39283, 12},     /* fr */
-       {54006, 187},    /* fr-be */
-       {54012, 202},    /* fr-ca */
-       {54018, 209},    /* fr-ch */
-       {54024, 106},    /* fr-fr */
-       {54030, 216},    /* fr-lu */
-       {54036, 221},    /* fr-mc */
-       {41613, 56},     /* ga */
-       {54042, 194},    /* ga-ie */
-       {43957, 95},     /* gd */
-       {54048, 181},    /* gd-gb */
-       {43153, 77},     /* gl */
-       {54054, 165},    /* gl-es */
-       {43837, 92},     /* gsw */
-       {42143, 64},     /* gu */
-       {54060, 153},    /* gu-in */
-       {43576, 85},     /* ha */
-       {54066, 280},    /* ha-latn */
-       {54074, 172},    /* ha-latn-ng */
-       {39333, 13},     /* he */
-       {54085, 107},    /* he-il */
-       {41420, 53},     /* hi */
-       {54091, 147},    /* hi-in */
-       {39997, 26},     /* hr */
-       {54097, 210},    /* hr-ba */
-       {54103, 120},    /* hr-hr */
-       {39395, 14},     /* hu */
-       {54109, 108},    /* hu-hu */
-       {40893, 43},     /* hy */
-       {54115, 137},    /* hy-am */
-       {40324, 33},     /* id */
-       {54121, 127},    /* id-id */
-       {43728, 89},     /* ig */
-       {54127, 176},    /* ig-ng */
-       {43744, 90},     /* ii */
-       {54133, 177},    /* ii-cn */
-       {39439, 15},     /* is */
-       {54139, 109},    /* is-is */
-       {39490, 16},     /* it */
-       {54145, 188},    /* it-ch */
-       {54151, 110},    /* it-it */
-       {39540, 17},     /* ja */
-       {54157, 111},    /* ja-jp */
-       {41284, 51},     /* ka */
-       {54163, 145},    /* ka-ge */
-       {41707, 58},     /* kk */
-       {43666, 88},     /* kl */
-       {54169, 175},    /* kl-gl */
-       {42994, 75},     /* km */
-       {54175, 163},    /* km-kh */
-       {37890, 68},     /* kn */
-       {54181, 157},    /* kn-in */
-       {39597, 18},     /* ko */
-       {54187, 112},    /* ko-kr */
-       {43180, 78},     /* kok */
-       {54193, 166},    /* kok-in */
-       {41787, 59},     /* ky */
-       {43082, 76},     /* lo */
-       {54200, 164},    /* lo-la */
-       {40706, 39},     /* lt */
-       {54206, 133},    /* lt-lt */
-       {40658, 38},     /* lv */
-       {54212, 132},    /* lv-lv */
-       {41058, 46},     /* mk */
-       {54218, 140},    /* mk-mk */
-       {42571, 69},     /* ml */
-       {54224, 158},    /* ml-in */
-       {42843, 72},     /* mn */
-       {54230, 272},    /* mn-cyrl */
-       {42750, 71},     /* mr */
-       {54238, 160},    /* mr-in */
-       {41659, 57},     /* ms */
-       {41506, 54},     /* mt */
-       {54244, 148},    /* mt-mt */
-       {39712, 275},    /* nb */
-       {54250, 114},    /* nb-no */
+       {53460, 168},    /* am-et */
+       {38616, 0},      /* ar */
+       {53466, 249},    /* ar-ae */
+       {53472, 251},    /* ar-bh */
+       {53478, 211},    /* ar-dz */
+       {53484, 197},    /* ar-eg */
+       {53490, 182},    /* ar-iq */
+       {53496, 238},    /* ar-jo */
+       {53502, 246},    /* ar-kw */
+       {53508, 242},    /* ar-lb */
+       {53514, 204},    /* ar-ly */
+       {53520, 218},    /* ar-ma */
+       {53526, 227},    /* ar-om */
+       {53532, 253},    /* ar-qa */
+       {53538, 96},     /* ar-sa */
+       {53544, 234},    /* ar-sy */
+       {53550, 223},    /* ar-tn */
+       {53556, 231},    /* ar-ye */
+       {42630, 70},     /* as */
+       {53562, 159},    /* as-in */
+       {40933, 44},     /* az */
+       {53568, 266},    /* az-cyrl */
+       {53576, 193},    /* az-cyrl-az */
+       {53587, 270},    /* az-latn */
+       {53595, 138},    /* az-latn-az */
+       {40445, 35},     /* be */
+       {53606, 129},    /* be-by */
+       {38677, 1},      /* bg */
+       {53612, 97},     /* bg-bg */
+       {41933, 62},     /* bn */
+       {53618, 196},    /* bn-bd */
+       {53624, 152},    /* bn-in */
+       {42884, 73},     /* bo */
+       {53630, 161},    /* bo-cn */
+       {43764, 91},     /* br */
+       {53636, 178},    /* br-fr */
+       {50608, 269},    /* bs */
+       {53642, 262},    /* bs-cyrl */
+       {53650, 230},    /* bs-cyrl-ba */
+       {53661, 263},    /* bs-latn */
+       {53669, 217},    /* bs-latn-ba */
+       {38759, 2},      /* ca */
+       {53680, 98},     /* ca-es */
+       {38895, 5},      /* cs */
+       {53686, 100},    /* cs-cz */
+       {42928, 74},     /* cy */
+       {53692, 162},    /* cy-gb */
+       {38948, 6},      /* da */
+       {53698, 101},    /* da-dk */
+       {38993, 7},      /* de */
+       {53704, 199},    /* de-at */
+       {53710, 184},    /* de-ch */
+       {53716, 102},    /* de-de */
+       {53722, 213},    /* de-li */
+       {53728, 206},    /* de-lu */
+       {39044, 8},      /* el */
+       {53734, 103},    /* el-gr */
+       {39120, 9},      /* en */
+       {53740, 200},    /* en-au */
+       {53746, 235},    /* en-bz */
+       {53752, 207},    /* en-ca */
+       {53758, 185},    /* en-gb */
+       {53764, 219},    /* en-ie */
+       {53770, 254},    /* en-in */
+       {53776, 228},    /* en-jm */
+       {53782, 214},    /* en-nz */
+       {53788, 247},    /* en-ph */
+       {53794, 257},    /* en-sg */
+       {53800, 239},    /* en-tt */
+       {53806, 104},    /* en-us */
+       {53812, 224},    /* en-za */
+       {53818, 243},    /* en-zw */
+       {39158, 10},     /* es */
+       {53824, 240},    /* es-ar */
+       {53830, 255},    /* es-bo */
+       {53836, 248},    /* es-cl */
+       {53842, 232},    /* es-co */
+       {53848, 215},    /* es-cr */
+       {53854, 225},    /* es-do */
+       {53860, 244},    /* es-ec */
+       {53866, 201},    /* es-es */
+       {53872, 208},    /* es-gt */
+       {53878, 258},    /* es-hn */
+       {53884, 186},    /* es-mx */
+       {53890, 259},    /* es-ni */
+       {53896, 220},    /* es-pa */
+       {53902, 236},    /* es-pe */
+       {53908, 260},    /* es-pr */
+       {53914, 252},    /* es-py */
+       {53920, 256},    /* es-sv */
+       {53926, 261},    /* es-us */
+       {53932, 250},    /* es-uy */
+       {53938, 229},    /* es-ve */
+       {40587, 37},     /* et */
+       {53944, 131},    /* et-ee */
+       {40987, 45},     /* eu */
+       {53950, 139},    /* eu-es */
+       {40766, 41},     /* fa */
+       {53956, 135},    /* fa-ir */
+       {39208, 11},     /* fi */
+       {53962, 105},    /* fi-fi */
+       {43511, 84},     /* fil */
+       {53968, 171},    /* fil-ph */
+       {41366, 52},     /* fo */
+       {53975, 146},    /* fo-fo */
+       {39258, 12},     /* fr */
+       {53981, 187},    /* fr-be */
+       {53987, 202},    /* fr-ca */
+       {53993, 209},    /* fr-ch */
+       {53999, 106},    /* fr-fr */
+       {54005, 216},    /* fr-lu */
+       {54011, 221},    /* fr-mc */
+       {41588, 56},     /* ga */
+       {54017, 194},    /* ga-ie */
+       {43932, 95},     /* gd */
+       {54023, 181},    /* gd-gb */
+       {43128, 77},     /* gl */
+       {54029, 165},    /* gl-es */
+       {43812, 92},     /* gsw */
+       {42118, 64},     /* gu */
+       {54035, 153},    /* gu-in */
+       {43551, 85},     /* ha */
+       {54041, 280},    /* ha-latn */
+       {54049, 172},    /* ha-latn-ng */
+       {39308, 13},     /* he */
+       {54060, 107},    /* he-il */
+       {41395, 53},     /* hi */
+       {54066, 147},    /* hi-in */
+       {39972, 26},     /* hr */
+       {54072, 210},    /* hr-ba */
+       {54078, 120},    /* hr-hr */
+       {39370, 14},     /* hu */
+       {54084, 108},    /* hu-hu */
+       {40868, 43},     /* hy */
+       {54090, 137},    /* hy-am */
+       {40299, 33},     /* id */
+       {54096, 127},    /* id-id */
+       {43703, 89},     /* ig */
+       {54102, 176},    /* ig-ng */
+       {43719, 90},     /* ii */
+       {54108, 177},    /* ii-cn */
+       {39414, 15},     /* is */
+       {54114, 109},    /* is-is */
+       {39465, 16},     /* it */
+       {54120, 188},    /* it-ch */
+       {54126, 110},    /* it-it */
+       {39515, 17},     /* ja */
+       {54132, 111},    /* ja-jp */
+       {41259, 51},     /* ka */
+       {54138, 145},    /* ka-ge */
+       {41682, 58},     /* kk */
+       {43641, 88},     /* kl */
+       {54144, 175},    /* kl-gl */
+       {42969, 75},     /* km */
+       {54150, 163},    /* km-kh */
+       {37865, 68},     /* kn */
+       {54156, 157},    /* kn-in */
+       {39572, 18},     /* ko */
+       {54162, 112},    /* ko-kr */
+       {43155, 78},     /* kok */
+       {54168, 166},    /* kok-in */
+       {41762, 59},     /* ky */
+       {43057, 76},     /* lo */
+       {54175, 164},    /* lo-la */
+       {40681, 39},     /* lt */
+       {54181, 133},    /* lt-lt */
+       {40633, 38},     /* lv */
+       {54187, 132},    /* lv-lv */
+       {41033, 46},     /* mk */
+       {54193, 140},    /* mk-mk */
+       {42546, 69},     /* ml */
+       {54199, 158},    /* ml-in */
+       {42818, 72},     /* mn */
+       {54205, 272},    /* mn-cyrl */
+       {42725, 71},     /* mr */
+       {54213, 160},    /* mr-in */
+       {41634, 57},     /* ms */
+       {41481, 54},     /* mt */
+       {54219, 148},    /* mt-mt */
+       {39687, 275},    /* nb */
+       {54225, 114},    /* nb-no */
        {1992, 82},      /* ne */
-       {54256, 169},    /* ne-np */
-       {39635, 19},     /* nl */
-       {54262, 189},    /* nl-be */
-       {54268, 113},    /* nl-nl */
-       {49041, 268},    /* nn */
-       {54274, 190},    /* nn-no */
-       {39685, 20},     /* no */
-       {43626, 87},     /* nso */
-       {54280, 174},    /* nso-za */
-       {42241, 65},     /* or */
-       {54287, 154},    /* or-in */
-       {42058, 63},     /* pa */
-       {39715, 21},     /* pl */
-       {54293, 115},    /* pl-pl */
-       {43509, 83},     /* ps */
-       {54299, 170},    /* ps-af */
-       {39764, 22},     /* pt */
-       {54305, 116},    /* pt-br */
-       {54311, 191},    /* pt-pt */
-       {39820, 23},     /* rm */
-       {54317, 117},    /* rm-ch */
-       {39869, 24},     /* ro */
-       {54323, 118},    /* ro-ro */
-       {39917, 25},     /* ru */
-       {54329, 119},    /* ru-ru */
-       {43934, 94},     /* rw */
-       {54335, 180},    /* rw-rw */
-       {43902, 93},     /* sah */
-       {54341, 179},    /* sah-ru */
-       {41552, 55},     /* se */
-       {54348, 203},    /* se-fi */
-       {54354, 149},    /* se-no */
-       {43215, 79},     /* si */
-       {54360, 167},    /* si-lk */
-       {12824, 27},     /* sk */
-       {54366, 121},    /* sk-sk */
-       {40555, 36},     /* sl */
-       {54372, 130},    /* sl-si */
-       {40100, 28},     /* sq */
-       {54378, 122},    /* sq-al */
-       {50955, 276},    /* sr */
-       {54384, 264},    /* sr-cyrl */
-       {54392, 226},    /* sr-cyrl-ba */
-       {54403, 245},    /* sr-cyrl-me */
-       {54414, 237},    /* sr-cyrl-rs */
-       {54425, 265},    /* sr-latn */
-       {54433, 222},    /* sr-latn-ba */
-       {54444, 241},    /* sr-latn-me */
-       {54455, 233},    /* sr-latn-rs */
-       {40146, 29},     /* sv */
-       {54466, 192},    /* sv-fi */
-       {54472, 123},    /* sv-se */
-       {41860, 60},     /* sw */
-       {54478, 150},    /* sw-ke */
-       {42274, 66},     /* ta */
-       {54484, 155},    /* ta-in */
-       {42372, 67},     /* te */
-       {54490, 156},    /* te-in */
-       {40761, 40},     /* tg */
-       {54496, 277},    /* tg-cyrl */
-       {54504, 134},    /* tg-cyrl-tj */
-       {40173, 30},     /* th */
-       {54515, 124},    /* th-th */
-       {41145, 47},     /* tn */
-       {54521, 141},    /* tn-za */
-       {12833, 31},     /* tr */
-       {54527, 125},    /* tr-tr */
-       {43383, 81},     /* tzm */
-       {54533, 279},    /* tzm-latn */
-       {40382, 34},     /* uk */
-       {54542, 128},    /* uk-ua */
-       {40269, 32},     /* ur */
-       {54548, 126},    /* ur-pk */
-       {41910, 61},     /* uz */
-       {54554, 271},    /* uz-cyrl */
-       {54562, 195},    /* uz-cyrl-uz */
-       {54573, 278},    /* uz-latn */
-       {54581, 151},    /* uz-latn-uz */
-       {40845, 42},     /* vi */
-       {54592, 136},    /* vi-vn */
-       {41172, 48},     /* xh */
-       {54598, 142},    /* xh-za */
-       {43593, 86},     /* yo */
-       {54604, 173},    /* yo-ng */
-       {38881, 267},    /* zh */
-       {54610, 3},      /* zh-chs */
-       {54617, 274},    /* zh-cht */
-       {54624, 183},    /* zh-cn */
-       {54630, 4},      /* zh-hans */
-       {54638, 273},    /* zh-hant */
-       {54646, 198},    /* zh-hk */
-       {54652, 212},    /* zh-mo */
-       {54658, 205},    /* zh-sg */
-       {54664, 99},     /* zh-tw */
-       {41198, 49},     /* zu */
-       {54670, 143}     /* zu-za */
+       {54231, 169},    /* ne-np */
+       {39610, 19},     /* nl */
+       {54237, 189},    /* nl-be */
+       {54243, 113},    /* nl-nl */
+       {49016, 268},    /* nn */
+       {54249, 190},    /* nn-no */
+       {39660, 20},     /* no */
+       {43601, 87},     /* nso */
+       {54255, 174},    /* nso-za */
+       {42216, 65},     /* or */
+       {54262, 154},    /* or-in */
+       {42033, 63},     /* pa */
+       {39690, 21},     /* pl */
+       {54268, 115},    /* pl-pl */
+       {43484, 83},     /* ps */
+       {54274, 170},    /* ps-af */
+       {39739, 22},     /* pt */
+       {54280, 116},    /* pt-br */
+       {54286, 191},    /* pt-pt */
+       {39795, 23},     /* rm */
+       {54292, 117},    /* rm-ch */
+       {39844, 24},     /* ro */
+       {54298, 118},    /* ro-ro */
+       {39892, 25},     /* ru */
+       {54304, 119},    /* ru-ru */
+       {43909, 94},     /* rw */
+       {54310, 180},    /* rw-rw */
+       {43877, 93},     /* sah */
+       {54316, 179},    /* sah-ru */
+       {41527, 55},     /* se */
+       {54323, 203},    /* se-fi */
+       {54329, 149},    /* se-no */
+       {43190, 79},     /* si */
+       {54335, 167},    /* si-lk */
+       {12799, 27},     /* sk */
+       {54341, 121},    /* sk-sk */
+       {40530, 36},     /* sl */
+       {54347, 130},    /* sl-si */
+       {40075, 28},     /* sq */
+       {54353, 122},    /* sq-al */
+       {50930, 276},    /* sr */
+       {54359, 264},    /* sr-cyrl */
+       {54367, 226},    /* sr-cyrl-ba */
+       {54378, 245},    /* sr-cyrl-me */
+       {54389, 237},    /* sr-cyrl-rs */
+       {54400, 265},    /* sr-latn */
+       {54408, 222},    /* sr-latn-ba */
+       {54419, 241},    /* sr-latn-me */
+       {54430, 233},    /* sr-latn-rs */
+       {40121, 29},     /* sv */
+       {54441, 192},    /* sv-fi */
+       {54447, 123},    /* sv-se */
+       {41835, 60},     /* sw */
+       {54453, 150},    /* sw-ke */
+       {42249, 66},     /* ta */
+       {54459, 155},    /* ta-in */
+       {42347, 67},     /* te */
+       {54465, 156},    /* te-in */
+       {40736, 40},     /* tg */
+       {54471, 277},    /* tg-cyrl */
+       {54479, 134},    /* tg-cyrl-tj */
+       {40148, 30},     /* th */
+       {54490, 124},    /* th-th */
+       {41120, 47},     /* tn */
+       {54496, 141},    /* tn-za */
+       {12808, 31},     /* tr */
+       {54502, 125},    /* tr-tr */
+       {43358, 81},     /* tzm */
+       {54508, 279},    /* tzm-latn */
+       {40357, 34},     /* uk */
+       {54517, 128},    /* uk-ua */
+       {40244, 32},     /* ur */
+       {54523, 126},    /* ur-pk */
+       {41885, 61},     /* uz */
+       {54529, 271},    /* uz-cyrl */
+       {54537, 195},    /* uz-cyrl-uz */
+       {54548, 278},    /* uz-latn */
+       {54556, 151},    /* uz-latn-uz */
+       {40820, 42},     /* vi */
+       {54567, 136},    /* vi-vn */
+       {41147, 48},     /* xh */
+       {54573, 142},    /* xh-za */
+       {43568, 86},     /* yo */
+       {54579, 173},    /* yo-ng */
+       {38856, 267},    /* zh */
+       {54585, 3},      /* zh-chs */
+       {54592, 274},    /* zh-cht */
+       {54599, 183},    /* zh-cn */
+       {54605, 4},      /* zh-hans */
+       {54613, 273},    /* zh-hant */
+       {54621, 198},    /* zh-hk */
+       {54627, 212},    /* zh-mo */
+       {54633, 205},    /* zh-sg */
+       {54639, 99},     /* zh-tw */
+       {41173, 49},     /* zu */
+       {54645, 143}     /* zu-za */
 };
 
 
 static const RegionInfoEntry region_entries [] = {
-       { 224,52399,49438,49438,54676,54697,38584,54744,54748,54776},
-       { 3,48076,54800,54800,54804,54816,38355,54835,54839,54854},
-       { 6,45392,54867,54867,54871,54879,37893,54889,54893,54906},
-       { 7,1929,50712,50712,54920,54928,38136,54945,54949,54963},
-       { 11,51890,50243,50243,54989,54989,37626,51613,54999,55014},
-       { 14,49587,55029,55029,55033,55041,37522,55053,55057,55057},
-       { 12,49620,55062,55062,55066,55066,37626,55076,55080,55080},
-       { 5,46290,40985,40985,55098,55109,38390,55121,55125,55143},
-       { 25,50185,55163,55163,55167,55190,38452,55210,55214,55250},
-       { 23,49390,55270,55270,55274,55285,38428,55310,55314,55331},
-       { 21,48882,40505,40505,55372,55380,37522,55053,55057,55389},
-       { 35,44176,38734,38734,55394,55403,37504,55420,55424,55438},
-       { 17,52511,55464,55464,55468,55476,38594,55491,55495,55510},
-       { 26,52691,55534,55534,55538,55538,38618,42945,55546,55565},
-       { 32,45096,55575,55575,55579,55586,37781,55593,55597,55612},
-       { 29,45778,55628,55628,55632,55640,37996,55657,55661,55678},
-       { 24,51647,55710,55710,55714,55714,37626,55721,55725,55725},
-       { 39,49713,55739,55739,55743,55743,37626,55750,55754,55770},
-       { 223,13778,55786,55786,55790,55802,37788,37788,55809,55821},
-       { 46,52292,55835,55835,55839,55839,37626,55845,55849,55862},
-       { 45,13857,55875,55875,55879,55885,37543,55904,55908,55921},
-       { 51,51491,55940,55940,55944,55944,37626,55953,55957,55972},
-       { 54,50487,55988,55988,55992,55992,38470,56003,56007,56026},
-       { 75,44339,56047,56047,56051,56066,37546,56084,56088,56110},
-       { 94,44429,39036,39036,56125,56133,37522,55053,55057,55057},
-       { 61,44381,56145,56145,56149,56157,37574,56165,56169,56182},
-       { 65,51119,56194,56194,56198,56217,37626,56239,56243,56258},
-       { 4,50247,56274,56274,56278,56286,38455,56301,56305,56320},
-       { 66,52109,56344,56344,56348,56348,37626,56356,56360,56370},
-       { 70,45876,53002,53002,56392,56400,37522,55053,55057,55389},
-       { 67,49442,56406,56406,56410,56416,38432,56423,56427,56442},
-       { 217,44219,39203,39203,56460,56466,37522,55053,55057,55389},
-       { 73,47955,56474,56474,56478,56487,38335,56503,56507,56522},
-       { 77,44559,39250,39250,56548,56556,37522,55053,55057,55389},
-       { 81,46707,56562,56562,56566,56580,37574,56165,56169,56589},
-       { 84,44603,39303,39303,56602,56602,37522,55053,55057,55389},
-       { 242,47612,56609,56609,56613,56628,38279,56645,56649,56672},
-       { 88,46653,56694,56694,56698,56706,0,56737,56741,56755},
-       { 93,48354,56790,56790,56794,56804,37574,56165,56169,56821},
-       { 98,44485,56841,56841,56845,56852,37522,55053,55057,56865},
-       { 99,50053,56874,56874,56878,56878,8056,56888,56892,56911},
-       { 104,49535,56932,56932,56936,56956,37626,56984,56988,57005},
-       { 106,52831,57012,57012,57016,57016,2436,57025,57029,57046},
-       { 108,45295,40018,40018,57065,57073,37890,57082,57086,57100},
-       { 109,44704,39415,39415,57114,57122,37699,57136,57140,57157},
-       { 111,45641,57171,57171,57175,57175,37972,57185,57189,57207},
-       { 68,49235,57224,57224,57228,57236,37522,55053,55057,55057},
-       { 117,44652,57242,57242,57246,57253,37672,57264,57268,57287},
-       { 113,46761,40355,40355,57294,57300,38215,57313,57317,57330},
-       { 121,48644,57365,57365,57369,57374,38401,57387,57391,57403},
-       { 116,46101,57425,57425,57429,57434,38090,57445,57449,57462},
-       { 110,44753,39462,39462,57482,57490,37574,57498,57502,57519},
-       { 118,44796,39510,39510,57535,57541,37522,55053,55057,55057},
-       { 124,51267,57548,57548,57552,57552,37626,57560,57564,57564},
-       { 126,51793,57580,57580,57584,57591,38554,57604,57608,57624},
-       { 122,44841,39562,39562,57646,57652,37712,57659,57663,57676},
-       { 129,46897,57686,57686,57690,57690,38239,57696,57700,57716},
-       { 40,47678,43019,43019,57734,57743,38282,57765,57769,57784},
-       { 134,44896,39617,39617,57816,57828,37716,57841,57845,57862},
-       { 136,52214,57879,57879,57883,57890,38574,57903,57907,57921},
-       { 138,47720,43099,43099,57943,43089,38286,57948,57952,57964},
-       { 139,52027,57984,57984,57988,57996,38564,58007,58011,58026},
-       { 145,50396,58048,58048,58052,58052,0,37788,55809,58066},
-       { 42,47896,58084,58084,58088,58098,38327,58130,58134,58151},
-       { 141,45974,58199,58199,58203,58213,38066,58221,58225,58242},
-       { 147,49972,58257,58257,58261,58272,37522,55053,55057,55057},
-       { 140,45922,58282,58282,58286,58293,37522,55053,55057,58301},
-       { 148,49855,58306,58306,58310,58316,38442,58327,58331,58344},
-       { 159,50716,42777,42777,58364,58372,38474,58385,58389,58405},
-       { 158,50841,58425,58425,58429,58429,37522,55053,55057,55389},
-       { 270,51969,58436,58436,58440,58451,37522,55053,55057,58469},
-       { 19618,46406,58474,58474,58478,58488,38161,58474,58509,58526},
-       { 151,50336,58558,58558,58562,58578,38465,58606,58610,58626},
-       { 163,46800,41523,41523,58636,58636,37522,55053,55057,58642},
-       { 166,48831,58647,58647,58651,58658,37626,58666,58670,58683},
-       { 175,48184,58697,58697,58701,58709,38362,58718,58722,58737},
-       { 182,52885,58743,58743,58747,58747,38621,58757,58761,58781},
-       { 176,44948,39655,39655,58804,58816,37522,55053,55057,55057},
-       { 177,45006,39704,39704,58826,58833,37574,58839,58843,58859},
-       { 178,48016,58873,58873,58877,58883,38342,58899,58903,58918},
-       { 183,50431,58959,58959,58963,58963,37626,58975,58979,58979},
-       { 164,51236,58998,58998,59002,59007,38503,59018,59022,59033},
-       { 192,50793,42088,42088,59053,59060,38484,59068,59072,59090},
-       { 187,51692,59107,59107,59111,59116,38542,59122,59126,59145},
-       { 201,48130,59163,59163,59167,59179,38358,59189,59193,59193},
-       { 190,45580,59209,59209,59213,59222,37914,59237,59241,59257},
-       { 191,45047,59285,59285,59289,59296,37739,59303,59307,59320},
-       { 202,52943,59334,59334,59338,59338,37626,56356,56360,56370},
-       { 193,49098,59350,59350,59354,59354,37522,55053,55057,55057},
-       { 185,52563,59363,59363,59367,59367,38604,59376,59380,59399},
-       { 197,52615,59418,59418,59422,59428,38608,59435,59439,59451},
-       { 200,45191,59469,59469,59473,59481,0,59490,59494,59507},
-       { 271,51561,53365,53365,59521,59528,38527,59541,59545,59559},
-       { 203,45247,39943,39943,59572,59579,37810,59592,59596,59610},
-       { 204,48512,59642,59642,59646,59646,38366,59653,59657,0},
-       { 205,13775,59671,59671,59675,59688,37446,59735,59739,59751},
-       { 221,45436,59771,59771,59775,59782,37574,59790,59794,59808},
-       { 215,49919,59821,59821,59825,59835,37626,59845,59849,59866},
-       { 212,45834,59879,59879,59883,59892,37522,55053,55057,59902},
-       { 143,45346,59907,59907,59911,59920,37522,55053,55057,55057},
-       { 72,52749,40582,40582,59930,59930,37626,56356,56360,56370},
-       { 222,51617,59942,59942,59946,59952,38532,59963,59967,59980},
-       { 227,45483,40191,40191,60000,40181,37906,60009,60013,60023},
-       { 228,46053,60042,60042,60046,60057,38383,60078,60082,60101},
-       { 234,51011,60114,60114,60118,60126,38488,60135,60139,60154},
-       { 235,45529,60175,60175,60179,60186,37910,60195,60199,60212},
-       { 225,51836,60226,60226,60230,60230,37626,60250,60254,60254},
-       { 237,44270,60281,60281,60285,60292,38369,60299,60303,60321},
-       { 241,45708,40416,40416,60331,60339,37975,60354,60358,60376},
-       { 244,44518,60410,60410,60414,60414,37626,56356,56360,56360},
-       { 246,52449,60428,60428,60432,60432,37626,60440,60444,60459},
-       { 247,46963,41930,41930,60473,60484,38395,60497,60501,60516},
-       { 249,51321,60535,60535,60539,60539,38513,60549,60553,60573},
-       { 251,46159,60593,60593,60597,60605,38132,60616,60620,60636},
-       { 261,51439,60655,60655,60659,60665,38517,60676,60680,60692},
-       { 209,46437,60710,60710,60714,0,10836,60727,60731,0},
-       { 264,52059,60750,60750,60754,60754,37626,56356,56360,56360}
+       { 224,52374,49413,49413,54651,54672,38559,54719,54723,54751},
+       { 3,48051,54775,54775,54779,54791,38330,54810,54814,54829},
+       { 6,45367,54842,54842,54846,54854,37868,54864,54868,54881},
+       { 7,1929,50687,50687,54895,54903,38111,54920,54924,54938},
+       { 11,51865,50218,50218,54964,54964,37601,51588,54974,54989},
+       { 14,49562,55004,55004,55008,55016,37497,55028,55032,55032},
+       { 12,49595,55037,55037,55041,55041,37601,55051,55055,55055},
+       { 5,46265,40960,40960,55073,55084,38365,55096,55100,55118},
+       { 25,50160,55138,55138,55142,55165,38427,55185,55189,55225},
+       { 23,49365,55245,55245,55249,55260,38403,55285,55289,55306},
+       { 21,48857,40480,40480,55347,55355,37497,55028,55032,55364},
+       { 35,44151,38709,38709,55369,55378,37479,55395,55399,55413},
+       { 17,52486,55439,55439,55443,55451,38569,55466,55470,55485},
+       { 26,52666,55509,55509,55513,55513,38593,42920,55521,55540},
+       { 32,45071,55550,55550,55554,55561,37756,55568,55572,55587},
+       { 29,45753,55603,55603,55607,55615,37971,55632,55636,55653},
+       { 24,51622,55685,55685,55689,55689,37601,55696,55700,55700},
+       { 39,49688,55714,55714,55718,55718,37601,55725,55729,55745},
+       { 223,13753,55761,55761,55765,55777,37763,37763,55784,55796},
+       { 46,52267,55810,55810,55814,55814,37601,55820,55824,55837},
+       { 45,13832,55850,55850,55854,55860,37518,55879,55883,55896},
+       { 51,51466,55915,55915,55919,55919,37601,55928,55932,55947},
+       { 54,50462,55963,55963,55967,55967,38445,55978,55982,56001},
+       { 75,44314,56022,56022,56026,56041,37521,56059,56063,56085},
+       { 94,44404,39011,39011,56100,56108,37497,55028,55032,55032},
+       { 61,44356,56120,56120,56124,56132,37549,56140,56144,56157},
+       { 65,51094,56169,56169,56173,56192,37601,56214,56218,56233},
+       { 4,50222,56249,56249,56253,56261,38430,56276,56280,56295},
+       { 66,52084,56319,56319,56323,56323,37601,56331,56335,56345},
+       { 70,45851,52977,52977,56367,56375,37497,55028,55032,55364},
+       { 67,49417,56381,56381,56385,56391,38407,56398,56402,56417},
+       { 217,44194,39178,39178,56435,56441,37497,55028,55032,55364},
+       { 73,47930,56449,56449,56453,56462,38310,56478,56482,56497},
+       { 77,44534,39225,39225,56523,56531,37497,55028,55032,55364},
+       { 81,46682,56537,56537,56541,56555,37549,56140,56144,56564},
+       { 84,44578,39278,39278,56577,56577,37497,55028,55032,55364},
+       { 242,47587,56584,56584,56588,56603,38254,56620,56624,56647},
+       { 88,46628,56669,56669,56673,56681,0,56712,56716,56730},
+       { 93,48329,56765,56765,56769,56779,37549,56140,56144,56796},
+       { 98,44460,56816,56816,56820,56827,37497,55028,55032,56840},
+       { 99,50028,56849,56849,56853,56853,8056,56863,56867,56886},
+       { 104,49510,56907,56907,56911,56931,37601,56959,56963,56980},
+       { 106,52806,56987,56987,56991,56991,2436,57000,57004,57021},
+       { 108,45270,39993,39993,57040,57048,37865,57057,57061,57075},
+       { 109,44679,39390,39390,57089,57097,37674,57111,57115,57132},
+       { 111,45616,57146,57146,57150,57150,37947,57160,57164,57182},
+       { 68,49210,57199,57199,57203,57211,37497,55028,55032,55032},
+       { 117,44627,57217,57217,57221,57228,37647,57239,57243,57262},
+       { 113,46736,40330,40330,57269,57275,38190,57288,57292,57305},
+       { 121,48619,57340,57340,57344,57349,38376,57362,57366,57378},
+       { 116,46076,57400,57400,57404,57409,38065,57420,57424,57437},
+       { 110,44728,39437,39437,57457,57465,37549,57473,57477,57494},
+       { 118,44771,39485,39485,57510,57516,37497,55028,55032,55032},
+       { 124,51242,57523,57523,57527,57527,37601,57535,57539,57539},
+       { 126,51768,57555,57555,57559,57566,38529,57579,57583,57599},
+       { 122,44816,39537,39537,57621,57627,37687,57634,57638,57651},
+       { 129,46872,57661,57661,57665,57665,38214,57671,57675,57691},
+       { 40,47653,42994,42994,57709,57718,38257,57740,57744,57759},
+       { 134,44871,39592,39592,57791,57803,37691,57816,57820,57837},
+       { 136,52189,57854,57854,57858,57865,38549,57878,57882,57896},
+       { 138,47695,43074,43074,57918,43064,38261,57923,57927,57939},
+       { 139,52002,57959,57959,57963,57971,38539,57982,57986,58001},
+       { 145,50371,58023,58023,58027,58027,0,37763,55784,58041},
+       { 42,47871,58059,58059,58063,58073,38302,58105,58109,58126},
+       { 141,45949,58174,58174,58178,58188,38041,58196,58200,58217},
+       { 147,49947,58232,58232,58236,58247,37497,55028,55032,55032},
+       { 140,45897,58257,58257,58261,58268,37497,55028,55032,58276},
+       { 148,49830,58281,58281,58285,58291,38417,58302,58306,58319},
+       { 159,50691,42752,42752,58339,58347,38449,58360,58364,58380},
+       { 158,50816,58400,58400,58404,58404,37497,55028,55032,55364},
+       { 270,51944,58411,58411,58415,58426,37497,55028,55032,58444},
+       { 19618,46381,58449,58449,58453,58463,38136,58449,58484,58501},
+       { 151,50311,58533,58533,58537,58553,38440,58581,58585,58601},
+       { 163,46775,41498,41498,58611,58611,37497,55028,55032,58617},
+       { 166,48806,58622,58622,58626,58633,37601,58641,58645,58658},
+       { 175,48159,58672,58672,58676,58684,38337,58693,58697,58712},
+       { 182,52860,58718,58718,58722,58722,38596,58732,58736,58756},
+       { 176,44923,39630,39630,58779,58791,37497,55028,55032,55032},
+       { 177,44981,39679,39679,58801,58808,37549,58814,58818,58834},
+       { 178,47991,58848,58848,58852,58858,38317,58874,58878,58893},
+       { 183,50406,58934,58934,58938,58938,37601,58950,58954,58954},
+       { 164,51211,58973,58973,58977,58982,38478,58993,58997,59008},
+       { 192,50768,42063,42063,59028,59035,38459,59043,59047,59065},
+       { 187,51667,59082,59082,59086,59091,38517,59097,59101,59120},
+       { 201,48105,59138,59138,59142,59154,38333,59164,59168,59168},
+       { 190,45555,59184,59184,59188,59197,37889,59212,59216,59232},
+       { 191,45022,59260,59260,59264,59271,37714,59278,59282,59295},
+       { 202,52918,59309,59309,59313,59313,37601,56331,56335,56345},
+       { 193,49073,59325,59325,59329,59329,37497,55028,55032,55032},
+       { 185,52538,59338,59338,59342,59342,38579,59351,59355,59374},
+       { 197,52590,59393,59393,59397,59403,38583,59410,59414,59426},
+       { 200,45166,59444,59444,59448,59456,0,59465,59469,59482},
+       { 271,51536,53340,53340,59496,59503,38502,59516,59520,59534},
+       { 203,45222,39918,39918,59547,59554,37785,59567,59571,59585},
+       { 204,48487,59617,59617,59621,59621,38341,59628,59632,0},
+       { 205,13750,59646,59646,59650,59663,37421,59710,59714,59726},
+       { 221,45411,59746,59746,59750,59757,37549,59765,59769,59783},
+       { 215,49894,59796,59796,59800,59810,37601,59820,59824,59841},
+       { 212,45809,59854,59854,59858,59867,37497,55028,55032,59877},
+       { 143,45321,59882,59882,59886,59895,37497,55028,55032,55032},
+       { 72,52724,40557,40557,59905,59905,37601,56331,56335,56345},
+       { 222,51592,59917,59917,59921,59927,38507,59938,59942,59955},
+       { 227,45458,40166,40166,59975,40156,37881,59984,59988,59998},
+       { 228,46028,60017,60017,60021,60032,38358,60053,60057,60076},
+       { 234,50986,60089,60089,60093,60101,38463,60110,60114,60129},
+       { 235,45504,60150,60150,60154,60161,37885,60170,60174,60187},
+       { 225,51811,60201,60201,60205,60205,37601,60225,60229,60229},
+       { 237,44245,60256,60256,60260,60267,38344,60274,60278,60296},
+       { 241,45683,40391,40391,60306,60314,37950,60329,60333,60351},
+       { 244,44493,60385,60385,60389,60389,37601,56331,56335,56335},
+       { 246,52424,60403,60403,60407,60407,37601,60415,60419,60434},
+       { 247,46938,41905,41905,60448,60459,38370,60472,60476,60491},
+       { 249,51296,60510,60510,60514,60514,38488,60524,60528,60548},
+       { 251,46134,60568,60568,60572,60580,38107,60591,60595,60611},
+       { 261,51414,60630,60630,60634,60640,38492,60651,60655,60667},
+       { 209,46412,60685,60685,60689,0,10794,60702,60706,0},
+       { 264,52034,60725,60725,60729,60729,37601,56331,56335,56335}
 };
 
 
 static const RegionInfoNameEntry region_name_entries [] = {
-       {52399, 0},      /* AE */
-       {48076, 1},      /* AF */
-       {45392, 2},      /* AL */
+       {52374, 0},      /* AE */
+       {48051, 1},      /* AF */
+       {45367, 2},      /* AL */
        {1929, 3},       /* AM */
-       {51890, 4},      /* AR */
-       {49587, 5},      /* AT */
-       {49620, 6},      /* AU */
-       {46290, 7},      /* AZ */
-       {50185, 8},      /* BA */
-       {49390, 9},      /* BD */
-       {48882, 10},     /* BE */
-       {44176, 11},     /* BG */
-       {52511, 12},     /* BH */
-       {52691, 13},     /* BO */
-       {45096, 14},     /* BR */
-       {45778, 15},     /* BY */
-       {51647, 16},     /* BZ */
-       {49713, 17},     /* CA */
-       {13778, 18},     /* CH */
-       {52292, 19},     /* CL */
-       {13857, 20},     /* CN */
-       {51491, 21},     /* CO */
-       {50487, 22},     /* CR */
-       {44339, 23},     /* CZ */
-       {44429, 24},     /* DE */
-       {44381, 25},     /* DK */
-       {51119, 26},     /* DO */
-       {50247, 27},     /* DZ */
-       {52109, 28},     /* EC */
-       {45876, 29},     /* EE */
-       {49442, 30},     /* EG */
-       {44219, 31},     /* ES */
-       {47955, 32},     /* ET */
-       {44559, 33},     /* FI */
-       {46707, 34},     /* FO */
-       {44603, 35},     /* FR */
-       {47612, 36},     /* GB */
-       {46653, 37},     /* GE */
-       {48354, 38},     /* GL */
-       {44485, 39},     /* GR */
-       {50053, 40},     /* GT */
-       {49535, 41},     /* HK */
-       {52831, 42},     /* HN */
-       {45295, 43},     /* HR */
-       {44704, 44},     /* HU */
-       {45641, 45},     /* ID */
-       {49235, 46},     /* IE */
-       {44652, 47},     /* IL */
-       {46761, 48},     /* IN */
-       {48644, 49},     /* IQ */
-       {46101, 50},     /* IR */
-       {44753, 51},     /* IS */
-       {44796, 52},     /* IT */
-       {51267, 53},     /* JM */
-       {51793, 54},     /* JO */
-       {44841, 55},     /* JP */
-       {46897, 56},     /* KE */
-       {47678, 57},     /* KH */
-       {44896, 58},     /* KR */
-       {52214, 59},     /* KW */
-       {47720, 60},     /* LA */
-       {52027, 61},     /* LB */
-       {50396, 62},     /* LI */
-       {47896, 63},     /* LK */
-       {45974, 64},     /* LT */
-       {49972, 65},     /* LU */
-       {45922, 66},     /* LV */
-       {49855, 67},     /* LY */
-       {50716, 68},     /* MA */
-       {50841, 69},     /* MC */
-       {51969, 70},     /* ME */
-       {46406, 71},     /* MK */
-       {50336, 72},     /* MO */
-       {46800, 73},     /* MT */
-       {48831, 74},     /* MX */
-       {48184, 75},     /* NG */
-       {52885, 76},     /* NI */
-       {44948, 77},     /* NL */
-       {45006, 78},     /* NO */
-       {48016, 79},     /* NP */
-       {50431, 80},     /* NZ */
-       {51236, 81},     /* OM */
-       {50793, 82},     /* PA */
-       {51692, 83},     /* PE */
-       {48130, 84},     /* PH */
-       {45580, 85},     /* PK */
-       {45047, 86},     /* PL */
-       {52943, 87},     /* PR */
-       {49098, 88},     /* PT */
-       {52563, 89},     /* PY */
-       {52615, 90},     /* QA */
-       {45191, 91},     /* RO */
-       {51561, 92},     /* RS */
-       {45247, 93},     /* RU */
-       {48512, 94},     /* RW */
-       {13775, 95},     /* SA */
-       {45436, 96},     /* SE */
-       {49919, 97},     /* SG */
-       {45834, 98},     /* SI */
-       {45346, 99},     /* SK */
-       {52749, 100},    /* SV */
-       {51617, 101},    /* SY */
-       {45483, 102},    /* TH */
-       {46053, 103},    /* TJ */
-       {51011, 104},    /* TN */
-       {45529, 105},    /* TR */
-       {51836, 106},    /* TT */
-       {44270, 107},    /* TW */
-       {45708, 108},    /* UA */
-       {44518, 109},    /* US */
-       {52449, 110},    /* UY */
-       {46963, 111},    /* UZ */
-       {51321, 112},    /* VE */
-       {46159, 113},    /* VN */
-       {51439, 114},    /* YE */
-       {46437, 115},    /* ZA */
-       {52059, 116}     /* ZW */
+       {51865, 4},      /* AR */
+       {49562, 5},      /* AT */
+       {49595, 6},      /* AU */
+       {46265, 7},      /* AZ */
+       {50160, 8},      /* BA */
+       {49365, 9},      /* BD */
+       {48857, 10},     /* BE */
+       {44151, 11},     /* BG */
+       {52486, 12},     /* BH */
+       {52666, 13},     /* BO */
+       {45071, 14},     /* BR */
+       {45753, 15},     /* BY */
+       {51622, 16},     /* BZ */
+       {49688, 17},     /* CA */
+       {13753, 18},     /* CH */
+       {52267, 19},     /* CL */
+       {13832, 20},     /* CN */
+       {51466, 21},     /* CO */
+       {50462, 22},     /* CR */
+       {44314, 23},     /* CZ */
+       {44404, 24},     /* DE */
+       {44356, 25},     /* DK */
+       {51094, 26},     /* DO */
+       {50222, 27},     /* DZ */
+       {52084, 28},     /* EC */
+       {45851, 29},     /* EE */
+       {49417, 30},     /* EG */
+       {44194, 31},     /* ES */
+       {47930, 32},     /* ET */
+       {44534, 33},     /* FI */
+       {46682, 34},     /* FO */
+       {44578, 35},     /* FR */
+       {47587, 36},     /* GB */
+       {46628, 37},     /* GE */
+       {48329, 38},     /* GL */
+       {44460, 39},     /* GR */
+       {50028, 40},     /* GT */
+       {49510, 41},     /* HK */
+       {52806, 42},     /* HN */
+       {45270, 43},     /* HR */
+       {44679, 44},     /* HU */
+       {45616, 45},     /* ID */
+       {49210, 46},     /* IE */
+       {44627, 47},     /* IL */
+       {46736, 48},     /* IN */
+       {48619, 49},     /* IQ */
+       {46076, 50},     /* IR */
+       {44728, 51},     /* IS */
+       {44771, 52},     /* IT */
+       {51242, 53},     /* JM */
+       {51768, 54},     /* JO */
+       {44816, 55},     /* JP */
+       {46872, 56},     /* KE */
+       {47653, 57},     /* KH */
+       {44871, 58},     /* KR */
+       {52189, 59},     /* KW */
+       {47695, 60},     /* LA */
+       {52002, 61},     /* LB */
+       {50371, 62},     /* LI */
+       {47871, 63},     /* LK */
+       {45949, 64},     /* LT */
+       {49947, 65},     /* LU */
+       {45897, 66},     /* LV */
+       {49830, 67},     /* LY */
+       {50691, 68},     /* MA */
+       {50816, 69},     /* MC */
+       {51944, 70},     /* ME */
+       {46381, 71},     /* MK */
+       {50311, 72},     /* MO */
+       {46775, 73},     /* MT */
+       {48806, 74},     /* MX */
+       {48159, 75},     /* NG */
+       {52860, 76},     /* NI */
+       {44923, 77},     /* NL */
+       {44981, 78},     /* NO */
+       {47991, 79},     /* NP */
+       {50406, 80},     /* NZ */
+       {51211, 81},     /* OM */
+       {50768, 82},     /* PA */
+       {51667, 83},     /* PE */
+       {48105, 84},     /* PH */
+       {45555, 85},     /* PK */
+       {45022, 86},     /* PL */
+       {52918, 87},     /* PR */
+       {49073, 88},     /* PT */
+       {52538, 89},     /* PY */
+       {52590, 90},     /* QA */
+       {45166, 91},     /* RO */
+       {51536, 92},     /* RS */
+       {45222, 93},     /* RU */
+       {48487, 94},     /* RW */
+       {13750, 95},     /* SA */
+       {45411, 96},     /* SE */
+       {49894, 97},     /* SG */
+       {45809, 98},     /* SI */
+       {45321, 99},     /* SK */
+       {52724, 100},    /* SV */
+       {51592, 101},    /* SY */
+       {45458, 102},    /* TH */
+       {46028, 103},    /* TJ */
+       {50986, 104},    /* TN */
+       {45504, 105},    /* TR */
+       {51811, 106},    /* TT */
+       {44245, 107},    /* TW */
+       {45683, 108},    /* UA */
+       {44493, 109},    /* US */
+       {52424, 110},    /* UY */
+       {46938, 111},    /* UZ */
+       {51296, 112},    /* VE */
+       {46134, 113},    /* VN */
+       {51414, 114},    /* YE */
+       {46412, 115},    /* ZA */
+       {52034, 116}     /* ZW */
 };
 
 
@@ -2607,17 +2607,10 @@ static const char locale_strings [] = {
        "m\xc3\xa5ndag\0"
        "tisdag\0"
        "l\xc3\xb6rdag\0"
-       "S\xc3\xb6n\0"
-       "M\xc3\xa5n\0"
-       "Tis\0"
-       "Ons\0"
-       "Tor\0"
-       "Fre\0"
-       "L\xc3\xb6r\0"
-       "Januari\0"
-       "Februari\0"
-       "Mars\0"
-       "Augusti\0"
+       "s\xc3\xb6n\0"
+       "m\xc3\xa5n\0"
+       "tis\0"
+       "l\xc3\xb6r\0"
        "augusti\0"
        "'den 'd MMMM yyyy\0"
        "dddd' den 'd MMMM yyyy\0"
@@ -2702,6 +2695,8 @@ static const char locale_strings [] = {
        "Jum\0"
        "Sab\0"
        "R\0"
+       "Januari\0"
+       "Februari\0"
        "Maret\0"
        "Mei\0"
        "Agustus\0"
@@ -4408,6 +4403,7 @@ static const char locale_strings [] = {
        "As\xe1\xb8\x8d\0"
        "Yennayer\0"
        "Yebrayer\0"
+       "Mars\0"
        "Ibrir\0"
        "Mayyu\0"
        "Yunyu\0"
@@ -4907,7 +4903,6 @@ static const char locale_strings [] = {
        "e.m.\0"
        "tysdag\0"
        "laurdag\0"
-       "m\xc3\xa5n\0"
        "tys\0"
        "lau\0"
        "Janeiro\0"
index db0421ec9ffbab9d2b9a6f2ba9d502672a06268b..8edf619c8d5b80df1c07177f10cfdbf1424d5685 100644 (file)
@@ -100,13 +100,7 @@ typedef struct {
  * Contains information about the type arguments for generic shared methods.
  */
 typedef struct {
-       /*
-        * If not NULL, determines whenever the class type arguments of the gshared method are references or vtypes.
-        * The array length is equal to class_inst->type_argv.
-        */
-       gboolean *var_is_vt;
-       /* Same for method type parameters */
-       gboolean *mvar_is_vt;
+       gboolean is_gsharedvt;
 } MonoGenericSharingContext;
 
 /* Simplified DWARF location list entry */
index cea93e2c28be941244ceeb1987be3cd5afbec682..ee6b984cca079385b0bab9a75100d23c8d3e25fe 100755 (executable)
@@ -343,7 +343,7 @@ domain_id_alloc (MonoDomain *domain)
        int id = -1, i;
        if (!appdomains_list) {
                appdomain_list_size = 2;
-               appdomains_list = mono_gc_alloc_fixed (appdomain_list_size * sizeof (void*), NULL);
+               appdomains_list = mono_gc_alloc_fixed (appdomain_list_size * sizeof (void*), MONO_GC_DESCRIPTOR_NULL);
        }
        for (i = appdomain_next; i < appdomain_list_size; ++i) {
                if (!appdomains_list [i]) {
@@ -365,7 +365,7 @@ domain_id_alloc (MonoDomain *domain)
                if (new_size >= (1 << 16))
                        g_assert_not_reached ();
                id = appdomain_list_size;
-               new_list = mono_gc_alloc_fixed (new_size * sizeof (void*), NULL);
+               new_list = mono_gc_alloc_fixed (new_size * sizeof (void*), MONO_GC_DESCRIPTOR_NULL);
                memcpy (new_list, appdomains_list, appdomain_list_size * sizeof (void*));
                mono_gc_free_fixed (appdomains_list);
                appdomains_list = new_list;
@@ -380,7 +380,7 @@ domain_id_alloc (MonoDomain *domain)
 }
 
 static gsize domain_gc_bitmap [sizeof(MonoDomain)/4/32 + 1];
-static gpointer domain_gc_desc = NULL;
+static MonoGCDescriptor domain_gc_desc = MONO_GC_DESCRIPTOR_NULL;
 static guint32 domain_shadow_serial = 0L;
 
 MonoDomain *
@@ -412,7 +412,7 @@ mono_domain_create (void)
        domain = mono_gc_alloc_fixed (sizeof (MonoDomain), NULL);
 #else
        domain = mono_gc_alloc_fixed (sizeof (MonoDomain), domain_gc_desc);
-       mono_gc_register_root ((char*)&(domain->MONO_DOMAIN_FIRST_GC_TRACKED), G_STRUCT_OFFSET (MonoDomain, MONO_DOMAIN_LAST_GC_TRACKED) - G_STRUCT_OFFSET (MonoDomain, MONO_DOMAIN_FIRST_GC_TRACKED), NULL);
+       mono_gc_register_root ((char*)&(domain->MONO_DOMAIN_FIRST_GC_TRACKED), G_STRUCT_OFFSET (MonoDomain, MONO_DOMAIN_LAST_GC_TRACKED) - G_STRUCT_OFFSET (MonoDomain, MONO_DOMAIN_FIRST_GC_TRACKED), MONO_GC_DESCRIPTOR_NULL);
 #endif
        domain->shadow_serial = shadow_serial;
        domain->domain = NULL;
@@ -1021,7 +1021,7 @@ mono_domain_foreach (MonoDomainFunc func, gpointer user_data)
         */
        mono_appdomains_lock ();
        size = appdomain_list_size;
-       copy = mono_gc_alloc_fixed (appdomain_list_size * sizeof (void*), NULL);
+       copy = mono_gc_alloc_fixed (appdomain_list_size * sizeof (void*), MONO_GC_DESCRIPTOR_NULL);
        memcpy (copy, appdomains_list, appdomain_list_size * sizeof (void*));
        mono_appdomains_unlock ();
 
index 227b3cc96971a800e71c7a85bae27f3c8dcd2859..3de44d7a1db89342a2bd1282f14545a232ac12ed 100644 (file)
@@ -408,22 +408,26 @@ void *
 mono_mmap_open_handle (void *input_fd, MonoString *mapName, gint64 *capacity, int access, int options, int *error)
 {
        MmapHandle *handle;
-       char *c_mapName = mono_string_to_utf8 (mapName);
-
-       named_regions_lock ();
-       handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
-       if (handle) {
-               *error = FILE_ALREADY_EXISTS;
-               handle = NULL;
-       } else {
-               //XXX we're exploiting wapi HANDLE == FD equivalence. THIS IS FRAGILE, create a _wapi_handle_to_fd call
+       if (!mapName) {
                handle = open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, error);
-               handle->name = g_strdup (c_mapName);
-               g_hash_table_insert (named_regions, handle->name, handle);
-       }
-       named_regions_unlock ();
+       } else {
+               char *c_mapName = mono_string_to_utf8 (mapName);
 
-       g_free (c_mapName);
+               named_regions_lock ();
+               handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
+               if (handle) {
+                       *error = FILE_ALREADY_EXISTS;
+                       handle = NULL;
+               } else {
+                       //XXX we're exploiting wapi HANDLE == FD equivalence. THIS IS FRAGILE, create a _wapi_handle_to_fd call
+                       handle = open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, error);
+                       handle->name = g_strdup (c_mapName);
+                       g_hash_table_insert (named_regions, handle->name, handle);
+               }
+               named_regions_unlock ();
+
+               g_free (c_mapName);
+       }
        return handle;
 }
 
index a0890de0715645c15ff7c798fc4cddbb201820cc..d55e56d5d0dd653e5ba9c528c0b9a68c1e4d4fb9 100644 (file)
@@ -20,7 +20,7 @@
 #define mono_domain_finalizers_unlock(domain) mono_mutex_unlock (&(domain)->finalizable_objects_hash_lock);
 
 /* Register a memory area as a conservatively scanned GC root */
-#define MONO_GC_REGISTER_ROOT_PINNING(x) mono_gc_register_root ((char*)&(x), sizeof(x), NULL)
+#define MONO_GC_REGISTER_ROOT_PINNING(x) mono_gc_register_root ((char*)&(x), sizeof(x), MONO_GC_DESCRIPTOR_NULL)
 
 #define MONO_GC_UNREGISTER_ROOT(x) mono_gc_deregister_root ((char*)&(x))
 
@@ -39,7 +39,7 @@
  * by mono_gc_alloc_fixed ().
  */
 /* For SGEN, the result of alloc_fixed () is not GC tracked memory */
-#define MONO_GC_ROOT_DESCR_FOR_FIXED(n) (mono_gc_is_moving () ? mono_gc_make_root_descr_all_refs (0) : NULL)
+#define MONO_GC_ROOT_DESCR_FOR_FIXED(n) (mono_gc_is_moving () ? mono_gc_make_root_descr_all_refs (0) : MONO_GC_DESCRIPTOR_NULL)
 
 /* Register a memory location holding a single object reference as a GC root */
 #define MONO_GC_REGISTER_ROOT_SINGLE(x) do { \
@@ -84,6 +84,7 @@ MonoBoolean ves_icall_Mono_Runtime_SetGCAllowSynchronousMajor (MonoBoolean flag)
 extern void mono_gc_init (void);
 extern void mono_gc_base_init (void);
 extern void mono_gc_cleanup (void);
+extern void mono_gc_mutex_cleanup (void);
 extern void mono_gc_base_cleanup (void);
 
 /*
@@ -124,11 +125,11 @@ mono_gc_GCHandle_CheckCurrentDomain (guint32 gchandle);
  * foreach (ref in GC references in the are structure pointed to by ADDR)
  *    mark_func (ref)
  */
-typedef void (*MonoGCMarkFunc)     (void **addr, void *gc_data);
+typedef void (*MonoGCMarkFunc)     (MonoObject **addr, void *gc_data);
 typedef void (*MonoGCRootMarkFunc) (void *addr, MonoGCMarkFunc mark_func, void *gc_data);
 
 /* Create a descriptor with a user defined marking function */
-void *mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker);
+MonoGCDescriptor mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker);
 
 /* Return whenever user defined marking functions are supported */
 gboolean mono_gc_user_markers_supported (void);
@@ -141,7 +142,7 @@ gboolean mono_gc_user_markers_supported (void);
  * NOTE: Under Boehm, this returns memory allocated using GC_malloc, so the result should
  * be stored into a location registered using MONO_GC_REGISTER_ROOT_FIXED ().
  */
-void* mono_gc_alloc_fixed            (size_t size, void *descr);
+void* mono_gc_alloc_fixed            (size_t size, MonoGCDescriptor descr);
 void  mono_gc_free_fixed             (void* addr);
 
 /* make sure the gchandle was allocated for an object in domain */
@@ -159,11 +160,11 @@ void* mono_gc_alloc_obj (MonoVTable *vtable, size_t size);
 void* mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length);
 void* mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uintptr_t bounds_size);
 void* mono_gc_alloc_string (MonoVTable *vtable, size_t size, gint32 len);
-void* mono_gc_make_descr_for_string (gsize *bitmap, int numbits);
+MonoGCDescriptor mono_gc_make_descr_for_string (gsize *bitmap, int numbits);
 
 void  mono_gc_register_for_finalization (MonoObject *obj, void *user_data);
 void  mono_gc_add_memory_pressure (gint64 value);
-MONO_API int   mono_gc_register_root (char *start, size_t size, void *descr);
+MONO_API int   mono_gc_register_root (char *start, size_t size, MonoGCDescriptor descr);
 void  mono_gc_deregister_root (char* addr);
 int   mono_gc_finalizers_for_domain (MonoDomain *domain, MonoObject **out_array, int out_size);
 void  mono_gc_run_finalize (void *obj, void *data);
@@ -180,7 +181,7 @@ void* mono_gc_alloc_mature (MonoVTable *vtable);
  * FIXME: Add an API for clearing remset entries if a root with a user defined
  * mark routine is deleted.
  */
-int mono_gc_register_root_wbarrier (char *start, size_t size, void *descr);
+int mono_gc_register_root_wbarrier (char *start, size_t size, MonoGCDescriptor descr);
 
 void mono_gc_wbarrier_set_root (gpointer ptr, MonoObject *value);
 
index efd062d4405b07439cce8e2a175bcf36ed5f3c5a..cdc91abedac0a91e9c53bf7cc837fcda806e402f 100644 (file)
@@ -22,9 +22,8 @@
 #include <mono/metadata/class-internals.h>
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/mono-mlist.h>
-#include <mono/metadata/threadpool.h>
-#include <mono/metadata/threadpool-internals.h>
 #include <mono/metadata/threads-types.h>
+#include <mono/metadata/threadpool-ms.h>
 #include <mono/sgen/sgen-conf.h>
 #include <mono/utils/mono-logger-internal.h>
 #include <mono/metadata/gc-internal.h>
@@ -242,7 +241,7 @@ mono_gc_run_finalize (void *obj, void *data)
                g_log ("mono-gc-finalizers", G_LOG_LEVEL_MESSAGE, "<%s at %p> Returned from finalizer.", o->vtable->klass->name, o);
 
        if (exc)
-               mono_internal_thread_unhandled_exception (exc);
+               mono_thread_internal_unhandled_exception (exc);
 
        mono_domain_set_internal (caller_domain);
 }
@@ -421,7 +420,7 @@ mono_domain_finalize (MonoDomain *domain, guint32 timeout)
        CloseHandle (done_event);
 
        if (domain == mono_get_root_domain ()) {
-               mono_thread_pool_cleanup ();
+               mono_threadpool_ms_cleanup ();
                mono_gc_finalize_threadpool_threads ();
        }
 
@@ -638,12 +637,12 @@ find_first_unset (guint32 bitmap)
        return -1;
 }
 
-static void*
+static MonoGCDescriptor
 make_root_descr_all_refs (int numbits, gboolean pinned)
 {
 #ifdef HAVE_SGEN_GC
        if (pinned)
-               return NULL;
+               return MONO_GC_DESCRIPTOR_NULL;
 #endif
        return mono_gc_make_root_descr_all_refs (numbits);
 }
@@ -1275,12 +1274,22 @@ mono_gc_cleanup (void)
 
        mono_reference_queue_cleanup ();
 
-       mono_mutex_destroy (&handle_section);
        mono_mutex_destroy (&allocator_section);
        mono_mutex_destroy (&finalizer_mutex);
        mono_mutex_destroy (&reference_queue_mutex);
 }
 
+/**
+ * mono_gc_mutex_cleanup:
+ *
+ * Destroy the mutexes that may still be used after the main cleanup routine.
+ */
+void
+mono_gc_mutex_cleanup (void)
+{
+       mono_mutex_destroy (&handle_section);
+}
+
 gboolean
 mono_gc_is_finalizer_internal_thread (MonoInternalThread *thread)
 {
index 37b71880d80936898afedcf3efff4441d9ee61ad..fa84d340345cbee4822e2b9f35758e0f39c7b922 100644 (file)
@@ -862,21 +862,6 @@ ICALL(ILOCK_22, "Read(long&)", ves_icall_System_Threading_Interlocked_Read_Long)
 ICALL_TYPE(ITHREAD, "System.Threading.InternalThread", ITHREAD_1)
 ICALL(ITHREAD_1, "Thread_free_internal", ves_icall_System_Threading_InternalThread_Thread_free_internal)
 
-ICALL_TYPE(MTHREADP, "System.Threading.Microsoft.ThreadPool", MTHREADP_1)
-ICALL(MTHREADP_1, "BindIOCompletionCallbackNative", ves_icall_System_Threading_Microsoft_ThreadPool_BindIOCompletionCallbackNative)
-ICALL(MTHREADP_2, "GetAvailableThreadsNative", ves_icall_System_Threading_Microsoft_ThreadPool_GetAvailableThreadsNative)
-ICALL(MTHREADP_3, "GetMaxThreadsNative", ves_icall_System_Threading_Microsoft_ThreadPool_GetMaxThreadsNative)
-ICALL(MTHREADP_4, "GetMinThreadsNative", ves_icall_System_Threading_Microsoft_ThreadPool_GetMinThreadsNative)
-ICALL(MTHREADP_5, "InitializeVMTp", ves_icall_System_Threading_Microsoft_ThreadPool_InitializeVMTp)
-ICALL(MTHREADP_6, "IsThreadPoolHosted", ves_icall_System_Threading_Microsoft_ThreadPool_IsThreadPoolHosted)
-ICALL(MTHREADP_7, "NotifyWorkItemComplete", ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemComplete)
-ICALL(MTHREADP_8, "NotifyWorkItemProgressNative", ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemProgressNative)
-ICALL(MTHREADP_9, "PostQueuedCompletionStatus", ves_icall_System_Threading_Microsoft_ThreadPool_PostQueuedCompletionStatus)
-ICALL(MTHREADP_11, "ReportThreadStatus", ves_icall_System_Threading_Microsoft_ThreadPool_ReportThreadStatus)
-ICALL(MTHREADP_12, "RequestWorkerThread", ves_icall_System_Threading_Microsoft_ThreadPool_RequestWorkerThread)
-ICALL(MTHREADP_13, "SetMaxThreadsNative", ves_icall_System_Threading_Microsoft_ThreadPool_SetMaxThreadsNative)
-ICALL(MTHREADP_14, "SetMinThreadsNative", ves_icall_System_Threading_Microsoft_ThreadPool_SetMinThreadsNative)
-
 ICALL_TYPE(MONIT, "System.Threading.Monitor", MONIT_8)
 ICALL(MONIT_8, "Enter", mono_monitor_enter)
 ICALL(MONIT_1, "Exit", mono_monitor_exit)
@@ -960,12 +945,19 @@ ICALL(THREAD_9, "YieldInternal", ves_icall_System_Threading_Thread_Yield)
 ICALL(THREAD_52, "current_lcid()", ves_icall_System_Threading_Thread_current_lcid)
 
 ICALL_TYPE(THREADP, "System.Threading.ThreadPool", THREADP_1)
-ICALL(THREADP_1, "GetAvailableThreads_internal", ves_icall_System_Threading_ThreadPool_GetAvailableThreads)
-ICALL(THREADP_2, "GetMaxThreads_internal", ves_icall_System_Threading_ThreadPool_GetMaxThreads)
-ICALL(THREADP_3, "GetMinThreads_internal", ves_icall_System_Threading_ThreadPool_GetMinThreads)
-ICALL(THREADP_35, "SetMaxThreads_internal", ves_icall_System_Threading_ThreadPool_SetMaxThreads)
-ICALL(THREADP_4, "SetMinThreads_internal", ves_icall_System_Threading_ThreadPool_SetMinThreads)
-ICALL(THREADP_5, "pool_queue", icall_append_job)
+ICALL(THREADP_1, "BindIOCompletionCallbackNative", ves_icall_System_Threading_ThreadPool_BindIOCompletionCallbackNative)
+ICALL(THREADP_2, "GetAvailableThreadsNative", ves_icall_System_Threading_ThreadPool_GetAvailableThreadsNative)
+ICALL(THREADP_3, "GetMaxThreadsNative", ves_icall_System_Threading_ThreadPool_GetMaxThreadsNative)
+ICALL(THREADP_4, "GetMinThreadsNative", ves_icall_System_Threading_ThreadPool_GetMinThreadsNative)
+ICALL(THREADP_5, "InitializeVMTp", ves_icall_System_Threading_ThreadPool_InitializeVMTp)
+ICALL(THREADP_6, "IsThreadPoolHosted", ves_icall_System_Threading_ThreadPool_IsThreadPoolHosted)
+ICALL(THREADP_7, "NotifyWorkItemComplete", ves_icall_System_Threading_ThreadPool_NotifyWorkItemComplete)
+ICALL(THREADP_8, "NotifyWorkItemProgressNative", ves_icall_System_Threading_ThreadPool_NotifyWorkItemProgressNative)
+ICALL(THREADP_9, "PostQueuedCompletionStatus", ves_icall_System_Threading_ThreadPool_PostQueuedCompletionStatus)
+ICALL(THREADP_11, "ReportThreadStatus", ves_icall_System_Threading_ThreadPool_ReportThreadStatus)
+ICALL(THREADP_12, "RequestWorkerThread", ves_icall_System_Threading_ThreadPool_RequestWorkerThread)
+ICALL(THREADP_13, "SetMaxThreadsNative", ves_icall_System_Threading_ThreadPool_SetMaxThreadsNative)
+ICALL(THREADP_14, "SetMinThreadsNative", ves_icall_System_Threading_ThreadPool_SetMinThreadsNative)
 
 ICALL_TYPE(TTIMER, "System.Threading.Timer", TTIMER_1)
 ICALL(TTIMER_1, "GetTimeMonotonic", mono_100ns_ticks)
index d4f5a2628f0ab8d233d0df1ad12001a5bd64a09a..2aace4cbc4b0ace9ade61f3a74abf0dccb51724b 100644 (file)
@@ -37,7 +37,6 @@
 #include <mono/metadata/object.h>
 #include <mono/metadata/threads.h>
 #include <mono/metadata/threads-types.h>
-#include <mono/metadata/threadpool.h>
 #include <mono/metadata/threadpool-ms.h>
 #include <mono/metadata/threadpool-ms-io.h>
 #include <mono/metadata/monitor.h>
@@ -2026,6 +2025,14 @@ fill_iface_array (gpointer key, gpointer value, gpointer user_data)
                mono_metadata_free_type (inflated);
 }
 
+static guint
+get_interfaces_hash (gconstpointer v1)
+{
+       MonoClass *k = (MonoClass*)v1;
+
+       return k->type_token;
+}
+
 ICALL_EXPORT MonoArray*
 ves_icall_Type_GetInterfaces (MonoReflectionType* type)
 {
@@ -2035,7 +2042,7 @@ ves_icall_Type_GetInterfaces (MonoReflectionType* type)
        FillIfaceArrayData data = { 0 };
        int len;
 
-       GHashTable *iface_hash = g_hash_table_new (NULL, NULL);
+       GHashTable *iface_hash = g_hash_table_new (get_interfaces_hash, NULL);
 
        if (class->generic_class && class->generic_class->context.class_inst->is_open) {
                data.context = mono_class_get_context (class);
@@ -4904,7 +4911,7 @@ mono_module_get_types (MonoDomain *domain, MonoImage *image, MonoArray **excepti
                if (!exportedOnly || mono_module_type_is_visible (tdef, image, i + 1)) {
                        MonoError error;
                        klass = mono_class_get_checked (image, (i + 1) | MONO_TOKEN_TYPE_DEF, &error);
-                       g_assert (!mono_loader_get_last_error ()); /* Plug any leaks */
+                       mono_loader_assert_no_error (); /* Plug any leaks */
                        
                        if (klass) {
                                mono_array_setref (res, count, mono_type_get_object (domain, &klass->byval_arg));
index 05cc3f7f83358d9caa035fb1985d7caf4a648938..d9ae9d6fde02568d9854d795c587b31ca8c8043c 100644 (file)
@@ -287,6 +287,17 @@ mono_loader_get_last_error (void)
        return (MonoLoaderError*)mono_native_tls_get_value (loader_error_thread_id);
 }
 
+void
+mono_loader_assert_no_error (void)
+{
+       MonoLoaderError *error = mono_loader_get_last_error ();
+
+       if (error) {
+               g_print ("Unhandled loader error: %x, %s %s %s\n", error->exception_type, error->msg, error->assembly_name, error->class_name);
+               g_assert_not_reached ();
+       }
+}
+
 /**
  * mono_loader_clear_error:
  *
@@ -511,7 +522,7 @@ field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass,
        field = mono_class_get_field_from_name_full (klass, fname, sig_type);
 
        if (!field) {
-               g_assert (!mono_loader_get_last_error ());
+               mono_loader_assert_no_error ();
                mono_error_set_field_load (error, klass, fname, "Could not find field '%s'", fname);
        }
 
@@ -527,7 +538,7 @@ mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass, Mo
 {
        MonoError error;
        MonoClassField *res = mono_field_from_token_checked (image, token, retklass, context, &error);
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        if (!mono_error_ok (&error)) {
                mono_loader_set_error_from_mono_error (&error);
                mono_error_cleanup (&error);
@@ -566,7 +577,7 @@ mono_field_from_token_checked (MonoImage *image, guint32 token, MonoClass **retk
 
        if (mono_metadata_token_table (token) == MONO_TABLE_MEMBERREF) {
                field = field_from_memberref (image, token, retklass, context, error);
-               g_assert (!mono_loader_get_last_error ());
+               mono_loader_assert_no_error ();
        } else {
                type = mono_metadata_typedef_from_field (image, mono_metadata_token_index (token));
                if (!type) {
@@ -592,7 +603,7 @@ mono_field_from_token_checked (MonoImage *image, guint32 token, MonoClass **retk
        if (field && field->parent && !field->parent->generic_class && !field->parent->generic_container)
                mono_conc_hashtable_insert (image->field_cache, GUINT_TO_POINTER (token), field);
 
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        return field;
 }
 
@@ -890,7 +901,7 @@ mono_method_get_signature_full (MonoMethod *method, MonoImage *image, guint32 to
        MonoError error;
        MonoMethodSignature *res = mono_method_get_signature_checked (method, image, token, context, &error);
 
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
 
        if (!res) {
                g_assert (!mono_error_ok (&error));
@@ -991,7 +1002,7 @@ mono_method_get_signature (MonoMethod *method, MonoImage *image, guint32 token)
        MonoError error;
        MonoMethodSignature *res = mono_method_get_signature_checked (method, image, token, NULL, &error);
 
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
 
        if (!res) {
                g_assert (!mono_error_ok (&error));
@@ -1143,11 +1154,11 @@ method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext *typesp
                g_free (msig);
        }
 
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        return method;
 
 fail:
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        g_assert (!mono_error_ok (error));
        return NULL;
 }
@@ -1183,7 +1194,7 @@ method_from_methodspec (MonoImage *image, MonoGenericContext *context, guint32 i
 
        inst = mono_metadata_parse_generic_inst (image, NULL, param_count, ptr, &ptr);
        if (!inst) {
-               g_assert (!mono_loader_get_last_error ());
+               mono_loader_assert_no_error ();
                mono_error_set_bad_image (error, image, "Cannot parse generic instance for methodspec 0x%08x", idx);
                return NULL;
        }
@@ -1216,7 +1227,7 @@ method_from_methodspec (MonoImage *image, MonoGenericContext *context, guint32 i
        new_context.method_inst = inst;
 
        method = mono_class_inflate_generic_method_full_checked (method, klass, &new_context, error);
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        return method;
 }
 
@@ -1488,7 +1499,7 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
        /*
         * Try loading the module using a variety of names
         */
-       for (i = 0; i < 4; ++i) {
+       for (i = 0; i < 5; ++i) {
                char *base_name = NULL, *dir_name = NULL;
                gboolean is_absolute = is_absolute_path (new_scope);
                
@@ -1522,6 +1533,14 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
                                break;
                        }
                        continue;
+               case 3:
+                       if (!is_absolute && mono_dl_get_system_dir ()) {
+                               dir_name = (char*)mono_dl_get_system_dir ();
+                               file_name = g_path_get_basename (new_scope);
+                               base_name = NULL;
+                       } else
+                               continue;
+                       break;
                default:
 #ifndef TARGET_WIN32
                        if (!g_ascii_strcasecmp ("user32.dll", new_scope) ||
@@ -1784,7 +1803,7 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
                MonoClass *handle_class;
 
                result = mono_lookup_dynamic_token_class (image, token, TRUE, &handle_class, context);
-               g_assert (!mono_loader_get_last_error ());
+               mono_loader_assert_no_error ();
 
                // This checks the memberref type as well
                if (result && handle_class != mono_defaults.methodhandle_class) {
@@ -1855,7 +1874,7 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
         */
        if (*sig & 0x10) {
                generic_container = mono_metadata_load_generic_params (image, token, container);
-               g_assert (!mono_loader_get_last_error ()); /* FIXME don't swallow this error. */
+               mono_loader_assert_no_error (); /* FIXME don't swallow this error. */
        }
        if (generic_container) {
                result->is_generic = TRUE;
@@ -1889,7 +1908,7 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
        if (generic_container)
                mono_method_set_generic_container (result, generic_container);
 
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        return result;
 }
 
@@ -1905,7 +1924,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
 {
        MonoError error;
        MonoMethod *result = mono_get_method_checked (image, token, klass, context, &error);
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        if (!mono_error_ok (&error)) {
                mono_loader_set_error_from_mono_error (&error);
                mono_error_cleanup (&error);
@@ -2053,7 +2072,7 @@ mono_get_method_constrained (MonoImage *image, guint32 token, MonoClass *constra
        MonoError error;
        MonoMethod *result = mono_get_method_constrained_checked (image, token, constrained_class, context, cil_method, &error);
 
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        if (!mono_error_ok (&error)) {
                mono_loader_set_error_from_mono_error (&error);
                mono_error_cleanup (&error);
@@ -2403,7 +2422,7 @@ async_stack_walk_adapter (MonoStackFrameInfo *frame, MonoContext *ctx, gpointer
                if (frame->ji->async)
                        return d->func (NULL, frame->domain, frame->ji->code_start, frame->native_offset, d->user_data);
                else
-                       return d->func (mono_jit_info_get_method (frame->ji), frame->domain, frame->ji->code_start, frame->native_offset, d->user_data);
+                       return d->func (frame->actual_method, frame->domain, frame->ji->code_start, frame->native_offset, d->user_data);
                break;
        default:
                g_assert_not_reached ();
index c56c7b4ea99b70c155060a18efc1a3d4640b661c..249acd881700a280b802995c4cb4f2a4f65d7af4 100644 (file)
@@ -25,7 +25,6 @@
 #include "metadata/appdomain.h"
 #include "mono/metadata/abi-details.h"
 #include "mono/metadata/debug-helpers.h"
-#include "mono/metadata/threadpool.h"
 #include "mono/metadata/threads.h"
 #include "mono/metadata/monitor.h"
 #include "mono/metadata/metadata-internals.h"
@@ -38,6 +37,7 @@
 #include "mono/metadata/cominterop.h"
 #include "mono/metadata/remoting.h"
 #include "mono/metadata/reflection-internals.h"
+#include "mono/metadata/threadpool-ms.h"
 #include "mono/utils/mono-counters.h"
 #include "mono/utils/mono-tls.h"
 #include "mono/utils/mono-memory-model.h"
@@ -2108,7 +2108,7 @@ mono_delegate_begin_invoke (MonoDelegate *delegate, gpointer *params)
                method = mono_get_delegate_invoke (klass);
        g_assert (method);
 
-       return mono_thread_pool_begin_invoke (mono_domain_get (), (MonoObject*) delegate, method, params);
+       return mono_threadpool_ms_begin_invoke (mono_domain_get (), (MonoObject*) delegate, method, params);
 }
 
 #ifndef DISABLE_JIT
@@ -2823,7 +2823,7 @@ mono_delegate_end_invoke (MonoDelegate *delegate, gpointer *params)
        } else
 #endif
        {
-               res = mono_thread_pool_end_invoke (ares, &out_args, &exc);
+               res = mono_threadpool_ms_end_invoke (ares, &out_args, &exc);
        }
 
        if (exc) {
index 5697b59d3380fd4e18ed4fb82b3d808ace99e8c3..6d46ecf25a97325d707e95b3cfbf5345371446af 100644 (file)
@@ -1979,13 +1979,13 @@ mono_metadata_parse_method_signature_full (MonoImage *m, MonoGenericContainer *c
        for (i = 0; i < method->param_count; ++i) {
                if (*ptr == MONO_TYPE_SENTINEL) {
                        if (method->call_convention != MONO_CALL_VARARG || def) {
-                               g_assert (!mono_loader_get_last_error ());
+                               mono_loader_assert_no_error ();
                                mono_error_set_bad_image (error, m, "Found sentinel for methoddef or no vararg");
                                g_free (pattrs);
                                return NULL;
                        }
                        if (method->sentinelpos >= 0) {
-                               g_assert (!mono_loader_get_last_error ());
+                               mono_loader_assert_no_error ();
                                mono_error_set_bad_image (error, m, "Found sentinel twice in the same signature.");
                                g_free (pattrs);
                                return NULL;
@@ -2024,7 +2024,7 @@ mono_metadata_parse_method_signature_full (MonoImage *m, MonoGenericContainer *c
         * Add signature to a cache and increase ref count...
         */
 
-       g_assert (!mono_loader_get_last_error ());
+       mono_loader_assert_no_error ();
        return method;
 }
 
@@ -3218,6 +3218,7 @@ compare_type_literals (int class_type, int type_type)
        case MONO_TYPE_R8:
        case MONO_TYPE_I:
        case MONO_TYPE_U:
+       case MONO_TYPE_CLASS:
                return TRUE;
        default:
                return FALSE;
@@ -6065,7 +6066,7 @@ mono_metadata_load_generic_param_constraints_checked (MonoImage *image, guint32
                return TRUE;
        for (i = 0; i < container->type_argc; i++) {
                if (!get_constraints (image, start_row + i, &mono_generic_container_get_param_info (container, i)->constraints, container, error)) {
-                       g_assert (!mono_loader_get_last_error ());
+                       mono_loader_assert_no_error ();
                        return FALSE;
                }
        }
diff --git a/mono/metadata/mono-cq.c b/mono/metadata/mono-cq.c
deleted file mode 100644 (file)
index 4be4640..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * mono-cq.c: concurrent queue
- *
- * Authors:
- *   Gonzalo Paniagua Javier (gonzalo@novell.com)
- *
- * Copyright (c) 2011 Novell, Inc (http://www.novell.com)
- * Copyright 2011 Xamarin Inc
- */
-
-#include <mono/metadata/object.h>
-#include <mono/metadata/mono-cq.h>
-#include <mono/metadata/mono-mlist.h>
-#include <mono/utils/mono-memory-model.h>
-#include <mono/utils/atomic.h>
-
-#define CQ_DEBUG(...)
-//#define CQ_DEBUG(...) g_message(__VA_ARGS__)
-
-struct _MonoCQ {
-       MonoMList *head;
-       MonoMList *tail;
-       volatile gint32 count;
-};
-
-/* matches the System.MonoListItem object */
-struct _MonoMList {
-       MonoObject object;
-       MonoMList *next;
-       MonoObject *data;
-};
-
-/* matches the System.MonoCQItem object */
-struct _MonoCQItem {
-       MonoObject object;
-       MonoArray *array; // MonoObjects
-       MonoArray *array_state; // byte array
-       volatile gint32 first;
-       volatile gint32 last;
-};
-
-typedef struct _MonoCQItem MonoCQItem;
-#define CQ_ARRAY_SIZE  64
-
-static MonoVTable *monocq_item_vtable = NULL;
-
-static MonoCQItem *
-mono_cqitem_alloc (void)
-{
-       MonoCQItem *queue;
-       MonoDomain *domain = mono_get_root_domain ();
-
-       if (!monocq_item_vtable) {
-               MonoClass *klass = mono_class_from_name (mono_defaults.corlib, "System", "MonoCQItem");
-               monocq_item_vtable = mono_class_vtable (domain, klass);
-               g_assert (monocq_item_vtable);
-       }
-       queue = (MonoCQItem *) mono_object_new_fast (monocq_item_vtable);
-       MONO_OBJECT_SETREF (queue, array, mono_array_new (domain, mono_defaults.object_class, CQ_ARRAY_SIZE));
-       MONO_OBJECT_SETREF (queue, array_state, mono_array_new (domain, mono_defaults.byte_class, CQ_ARRAY_SIZE));
-       return queue;
-}
-
-MonoCQ *
-mono_cq_create ()
-{
-       MonoCQ *cq;
-
-       cq = g_new0 (MonoCQ, 1);
-       MONO_GC_REGISTER_ROOT_SINGLE (cq->head);
-       MONO_GC_REGISTER_ROOT_SINGLE (cq->tail);
-       cq->head = mono_mlist_alloc ((MonoObject *) mono_cqitem_alloc ());
-       cq->tail = cq->head;
-       CQ_DEBUG ("Created %p", cq);
-       return cq;
-}
-
-void
-mono_cq_destroy (MonoCQ *cq)
-{
-       CQ_DEBUG ("Destroy %p", cq);
-       if (!cq)
-               return;
-
-       mono_gc_bzero_aligned (cq, sizeof (MonoCQ));
-       MONO_GC_UNREGISTER_ROOT (cq->tail);
-       MONO_GC_UNREGISTER_ROOT (cq->head);
-       g_free (cq);
-}
-
-gint32
-mono_cq_count (MonoCQ *cq)
-{
-       if (!cq)
-               return 0;
-
-       CQ_DEBUG ("Count %d", cq->count);
-       return cq->count;
-}
-
-static void
-mono_cq_add_node (MonoCQ *cq)
-{
-       MonoMList *n;
-       MonoMList *prev_tail;
-
-       CQ_DEBUG ("Adding node");
-       n = mono_mlist_alloc ((MonoObject *) mono_cqitem_alloc ());
-       prev_tail = cq->tail;
-       MONO_OBJECT_SETREF (prev_tail, next, n);
-
-       /* prev_tail->next must be visible before the new tail is */
-       STORE_STORE_FENCE;
-
-       cq->tail = n;
-}
-
-static gboolean
-mono_cqitem_try_enqueue (MonoCQ *cq, MonoObject *obj)
-{
-       MonoCQItem *queue;
-       MonoMList *tail;
-       gint32 pos;
-
-       tail = cq->tail;
-       queue = (MonoCQItem *) tail->data;
-       do {
-               pos = queue->last;
-               if (pos >= CQ_ARRAY_SIZE) {
-                       CQ_DEBUG ("enqueue(): pos >= CQ_ARRAY_SIZE, %d >= %d", pos, CQ_ARRAY_SIZE);
-                       return FALSE;
-               }
-
-               if (InterlockedCompareExchange (&queue->last, pos + 1, pos) == pos) {
-                       mono_array_setref_fast (queue->array, pos, obj);
-                       STORE_STORE_FENCE;
-                       mono_array_set_fast (queue->array_state, char, pos, TRUE);
-                       if ((pos + 1) == CQ_ARRAY_SIZE) {
-                               CQ_DEBUG ("enqueue(): pos + 1 == CQ_ARRAY_SIZE, %d. Adding node.", CQ_ARRAY_SIZE);
-                               mono_cq_add_node (cq);
-                       }
-                       return TRUE;
-               }
-       } while (TRUE);
-       g_assert_not_reached ();
-}
-
-void
-mono_cq_enqueue (MonoCQ *cq, MonoObject *obj)
-{
-       if (cq == NULL || obj == NULL)
-               return;
-
-       do {
-               if (mono_cqitem_try_enqueue (cq, obj)) {
-                       CQ_DEBUG ("Queued one");
-                       InterlockedIncrement (&cq->count);
-                       break;
-               }
-               SleepEx (0, FALSE);
-       } while (TRUE);
-}
-
-static void
-mono_cq_remove_node (MonoCQ *cq)
-{
-       MonoMList *old_head;
-
-       CQ_DEBUG ("Removing node");
-       old_head = cq->head;
-       /* Not needed now that array_state is GC memory
-       MonoCQItem *queue;
-       int i;
-       gboolean retry;
-       queue = (MonoCQItem *) old_head->data;
-       do {
-               retry = FALSE;
-               for (i = 0; i < CQ_ARRAY_SIZE; i++) {
-                       if (mono_array_get (queue->array_state, char, i) == TRUE) {
-                               retry = TRUE;
-                               break;
-                       }
-               }
-               if (retry)
-                       SleepEx (0, FALSE);
-       } while (retry);
-        */
-       while (old_head->next == NULL)
-               SleepEx (0, FALSE);
-       cq->head = old_head->next;
-       
-       MONO_OBJECT_SETREF (old_head, next, NULL);
-       old_head = NULL;
-}
-
-static gboolean
-mono_cqitem_try_dequeue (MonoCQ *cq, MonoObject **obj)
-{
-       MonoCQItem *queue;
-       MonoMList *head;
-       gint32 pos;
-
-       head = cq->head;
-       queue = (MonoCQItem *) head->data;
-       do {
-               pos = queue->first;
-               if (pos >= queue->last || pos >= CQ_ARRAY_SIZE)
-                       return FALSE;
-
-               if (InterlockedCompareExchange (&queue->first, pos + 1, pos) == pos) {
-                       while (mono_array_get (queue->array_state, char, pos) == FALSE) {
-                               SleepEx (0, FALSE);
-                       }
-                       LOAD_LOAD_FENCE;
-                       *obj = mono_array_get (queue->array, MonoObject *, pos);
-
-                       /*
-                       Here don't need to fence since the only spot that reads it is the one above.
-                       Additionally, the first store is superfluous, so it can happen OOO with the second.
-                       */
-                       mono_array_set (queue->array, MonoObject *, pos, NULL);
-                       mono_array_set (queue->array_state, char, pos, FALSE);
-                       
-                       /*
-                       We should do a STORE_LOAD fence here to make sure subsequent loads see new state instead
-                       of the above stores. We can safely ignore this as the only issue of seeing a stale value
-                       is the thread yielding. Given how unfrequent this will be in practice, we better avoid the
-                       very expensive STORE_LOAD fence.
-                       */
-                       
-                       if ((pos + 1) == CQ_ARRAY_SIZE) {
-                               mono_cq_remove_node (cq);
-                       }
-                       return TRUE;
-               }
-       } while (TRUE);
-       g_assert_not_reached ();
-}
-
-gboolean
-mono_cq_dequeue (MonoCQ *cq, MonoObject **result)
-{
-       while (cq->count > 0) {
-               if (mono_cqitem_try_dequeue (cq, result)) {
-                       CQ_DEBUG ("Dequeued one");
-                       InterlockedDecrement (&cq->count);
-                       return TRUE;
-               }
-               SleepEx (0, FALSE);
-       }
-       return FALSE;
-}
-
diff --git a/mono/metadata/mono-cq.h b/mono/metadata/mono-cq.h
deleted file mode 100644 (file)
index db776c5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _MONO_CQ_H
-#define _MONO_CQ_H
-
-#include <config.h>
-#include <glib.h>
-#include <mono/metadata/object.h>
-#include <mono/metadata/gc-internal.h>
-
-G_BEGIN_DECLS
-
-typedef struct _MonoCQ MonoCQ;
-
-MonoCQ *mono_cq_create (void);
-void mono_cq_destroy (MonoCQ *cq);
-gint mono_cq_count (MonoCQ *cq);
-void mono_cq_enqueue (MonoCQ *cq, MonoObject *obj);
-gboolean mono_cq_dequeue (MonoCQ *cq, MonoObject **result);
-
-G_END_DECLS
-
-#endif
-
index 11fd4641042f7b7063b19063639cd3e4f3799864..c8d7a6a10dbabdff4afc406795de473a1d29cf32 100644 (file)
@@ -45,8 +45,8 @@
 typedef struct _Slot Slot;
 
 struct _Slot {
-       gpointer key;
-       gpointer value;
+       MonoObject *key;
+       MonoObject *value;
        Slot    *next;
 };
 
@@ -66,7 +66,7 @@ struct _MonoGHashTable {
 };
 
 #ifdef HAVE_SGEN_GC
-static void *table_hash_descr = NULL;
+static MonoGCDescriptor table_hash_descr = MONO_GC_DESCRIPTOR_NULL;
 
 static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data);
 
@@ -74,7 +74,7 @@ static Slot*
 new_slot (MonoGHashTable *hash)
 {
        if (hash->gc_type == MONO_HASH_CONSERVATIVE_GC)
-               return mono_gc_alloc_fixed (sizeof (Slot), NULL);
+               return mono_gc_alloc_fixed (sizeof (Slot), MONO_GC_DESCRIPTOR_NULL);
        else
                return mg_new (Slot, 1);
 }
diff --git a/mono/metadata/mono-wsq.c b/mono/metadata/mono-wsq.c
deleted file mode 100644 (file)
index 859fb69..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * mono-wsq.c: work-stealing queue
- *
- * Authors:
- *   Gonzalo Paniagua Javier (gonzalo@novell.com)
- *
- * Copyright (c) 2010 Novell, Inc (http://www.novell.com)
- * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
- */
-
-#include <string.h>
-#include <mono/metadata/object.h>
-#include <mono/metadata/mono-wsq.h>
-#include <mono/utils/mono-semaphore.h>
-#include <mono/utils/mono-tls.h>
-#include <mono/utils/atomic.h>
-
-#define INITIAL_LENGTH 32
-#define WSQ_DEBUG(...)
-//#define WSQ_DEBUG(...) g_message(__VA_ARGS__)
-
-struct _MonoWSQ {
-       volatile gint head;
-       volatile gint tail;
-       MonoArray *queue;
-       gint32 mask;
-       gint32 suspended;
-       MonoSemType lock;
-};
-
-#define NO_KEY ((guint32) -1)
-static MonoNativeTlsKey wsq_tlskey;
-static gboolean wsq_tlskey_inited = FALSE;
-
-void
-mono_wsq_init ()
-{
-       if (wsq_tlskey_inited)
-               return;
-
-       mono_native_tls_alloc (&wsq_tlskey, NULL);
-       wsq_tlskey_inited = TRUE;
-}
-
-void
-mono_wsq_cleanup ()
-{
-       if (!wsq_tlskey_inited)
-               return;
-       mono_native_tls_free (wsq_tlskey);
-       wsq_tlskey_inited = FALSE;
-}
-
-MonoWSQ *
-mono_wsq_create ()
-{
-       MonoWSQ *wsq;
-       MonoDomain *root;
-
-       if (!wsq_tlskey_inited)
-               return NULL;
-
-       wsq = g_new0 (MonoWSQ, 1);
-       wsq->mask = INITIAL_LENGTH - 1;
-       wsq->suspended = 0;
-       MONO_GC_REGISTER_ROOT_SINGLE (wsq->queue);
-       root = mono_get_root_domain ();
-       wsq->queue = mono_array_new_cached (root, mono_defaults.object_class, INITIAL_LENGTH);
-       MONO_SEM_INIT (&wsq->lock, 1);
-       if (!mono_native_tls_set_value (wsq_tlskey, wsq)) {
-               mono_wsq_destroy (wsq);
-               wsq = NULL;
-       }
-       return wsq;
-}
-
-gboolean
-mono_wsq_suspend (MonoWSQ *wsq)
-{
-       return InterlockedCompareExchange (&wsq->suspended, 1, 0) == 0;
-}
-
-void
-mono_wsq_destroy (MonoWSQ *wsq)
-{
-       if (wsq == NULL || wsq->queue == NULL)
-               return;
-
-       g_assert (mono_wsq_count (wsq) == 0);
-       MONO_GC_UNREGISTER_ROOT (wsq->queue);
-       MONO_SEM_DESTROY (&wsq->lock);
-       memset (wsq, 0, sizeof (MonoWSQ));
-       if (wsq_tlskey_inited && mono_native_tls_get_value (wsq_tlskey) == wsq)
-               mono_native_tls_set_value (wsq_tlskey, NULL);
-       g_free (wsq);
-}
-
-gint
-mono_wsq_count (MonoWSQ *wsq)
-{
-       if (!wsq)
-               return 0;
-       return ((wsq->tail - wsq->head) & wsq->mask);
-}
-
-gboolean
-mono_wsq_local_push (void *obj)
-{
-       int tail;
-       int head;
-       int count;
-       MonoWSQ *wsq;
-
-       if (obj == NULL || !wsq_tlskey_inited)
-               return FALSE;
-
-       wsq = (MonoWSQ *) mono_native_tls_get_value (wsq_tlskey);
-       if (wsq == NULL) {
-               WSQ_DEBUG ("local_push: no wsq\n");
-               return FALSE;
-       }
-
-       if (wsq->suspended) {
-               WSQ_DEBUG ("local_push: wsq suspended\n");
-               return FALSE;
-       }
-
-       tail = wsq->tail;
-       if (tail < wsq->head + wsq->mask) {
-               mono_array_setref (wsq->queue, tail & wsq->mask, (MonoObject *) obj);
-               wsq->tail = tail + 1;
-               WSQ_DEBUG ("local_push: OK %p %p\n", wsq, obj);
-               return TRUE;
-       }
-
-       MONO_SEM_WAIT (&wsq->lock);
-       head = wsq->head;
-       count = wsq->tail - wsq->head;
-       if (count >= wsq->mask) {
-               MonoArray *new_array;
-               int length;
-               int i;
-
-               length = mono_array_length (wsq->queue);
-               new_array = mono_array_new_cached (mono_get_root_domain (), mono_defaults.object_class, length * 2);
-               for (i = 0; i < length; i++)
-                       mono_array_setref (new_array, i, mono_array_get (wsq->queue, MonoObject*, (i + head) & wsq->mask));
-
-               mono_gc_bzero_aligned (mono_array_addr (wsq->queue, MonoObject *, 0), sizeof (MonoObject*) * length);
-               wsq->queue = new_array;
-               wsq->head = 0;
-               wsq->tail = tail = count;
-               wsq->mask = (wsq->mask << 1) | 1;
-       }
-       mono_array_setref (wsq->queue, tail & wsq->mask, obj);
-       wsq->tail = tail + 1;
-       MONO_SEM_POST (&wsq->lock);
-       WSQ_DEBUG ("local_push: LOCK %p  %p\n", wsq, obj);
-       return TRUE;
-}
-
-gboolean
-mono_wsq_local_pop (void **ptr)
-{
-       int tail;
-       gboolean res;
-       MonoWSQ *wsq;
-
-       if (ptr == NULL || !wsq_tlskey_inited)
-               return FALSE;
-
-       wsq = (MonoWSQ *) mono_native_tls_get_value (wsq_tlskey);
-       if (wsq == NULL) {
-               WSQ_DEBUG ("local_pop: no wsq\n");
-               return FALSE;
-       }
-
-       tail = wsq->tail;
-       if (wsq->head >= tail) {
-               WSQ_DEBUG ("local_pop: empty\n");
-               return FALSE;
-       }
-       tail--;
-       InterlockedExchange (&wsq->tail, tail);
-       if (wsq->head <= tail) {
-               *ptr = mono_array_get (wsq->queue, void *, tail & wsq->mask);
-               mono_array_set (wsq->queue, void *, tail & wsq->mask, NULL);
-               WSQ_DEBUG ("local_pop: GOT ONE %p %p\n", wsq, *ptr);
-               return TRUE;
-       }
-
-       MONO_SEM_WAIT (&wsq->lock);
-       if (wsq->head <= tail) {
-               *ptr = mono_array_get (wsq->queue, void *, tail & wsq->mask);
-               mono_array_set (wsq->queue, void *, tail & wsq->mask, NULL);
-               res = TRUE;
-       } else {
-               wsq->tail = tail + 1;
-               res = FALSE;
-       }
-       MONO_SEM_POST (&wsq->lock);
-       WSQ_DEBUG ("local_pop: LOCK %d %p %p\n", res, wsq, *ptr);
-       return res;
-}
-
-void
-mono_wsq_try_steal (MonoWSQ *wsq, void **ptr, guint32 ms_timeout)
-{
-       if (wsq == NULL || ptr == NULL || *ptr != NULL || !wsq_tlskey_inited)
-               return;
-
-       if (mono_native_tls_get_value (wsq_tlskey) == wsq)
-               return;
-
-       if (mono_sem_timedwait (&wsq->lock, ms_timeout, FALSE) == 0) {
-               int head;
-
-               head = wsq->head;
-               InterlockedExchange (&wsq->head, head + 1);
-               if (head < wsq->tail) {
-                       *ptr = mono_array_get (wsq->queue, void *, head & wsq->mask);
-                       mono_array_set (wsq->queue, void *, head & wsq->mask, NULL);
-                       WSQ_DEBUG ("STEAL %p %p\n", wsq, *ptr);
-               } else {
-                       wsq->head = head;
-               }
-               MONO_SEM_POST (&wsq->lock);
-       }
-}
-
diff --git a/mono/metadata/mono-wsq.h b/mono/metadata/mono-wsq.h
deleted file mode 100644 (file)
index 3550013..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _MONO_WSQ_H
-#define _MONO_WSQ_H
-
-#include <config.h>
-#include <glib.h>
-#include <mono/metadata/object.h>
-#include <mono/metadata/gc-internal.h>
-#include <mono/io-layer/io-layer.h>
-
-G_BEGIN_DECLS
-
-typedef struct _MonoWSQ MonoWSQ;
-
-void mono_wsq_init (void);
-void mono_wsq_cleanup (void);
-
-MonoWSQ *mono_wsq_create (void);
-void mono_wsq_destroy (MonoWSQ *wsq);
-gboolean mono_wsq_local_push (void *obj);
-gboolean mono_wsq_local_pop (void **ptr);
-void mono_wsq_try_steal (MonoWSQ *wsq, void **ptr, guint32 ms_timeout);
-gint mono_wsq_count (MonoWSQ *wsq);
-gboolean mono_wsq_suspend (MonoWSQ *wsq);
-
-G_END_DECLS
-
-#endif
index cc42ab867a124b20915b2bd4ad431e0571da77a6..2e753bcfe5d4e0ecd7b7c10f0a3bf7c472a63565 100644 (file)
@@ -191,6 +191,7 @@ DECL_OFFSET(MonoLMF, fregs)
 #elif defined(TARGET_ARM64)
 DECL_OFFSET(MonoLMF, pc)
 DECL_OFFSET(MonoLMF, gregs)
+DECL_OFFSET(DynCallArgs, regs)
 DECL_OFFSET(DynCallArgs, fpregs)
 DECL_OFFSET(DynCallArgs, n_fpargs)
 DECL_OFFSET(DynCallArgs, n_fpret)
index b326bd84233b7374aa73b2c3a541a1c591465439..a05a1d51faaa425665dbd581211858e85da4e0cf 100644 (file)
@@ -27,7 +27,6 @@
 #include "mono/metadata/metadata-internals.h"
 #include "mono/metadata/class-internals.h"
 #include <mono/metadata/assembly.h>
-#include <mono/metadata/threadpool.h>
 #include <mono/metadata/marshal.h>
 #include "mono/metadata/debug-helpers.h"
 #include "mono/metadata/marshal.h"
 #include <mono/utils/mono-memory-model.h>
 #include "cominterop.h"
 
-#if defined(HAVE_BOEHM_GC)
-#define GC_NO_DESCRIPTOR ((gpointer)(0 | GC_DS_LENGTH))
-#elif defined(HAVE_SGEN_GC)
-#define GC_NO_DESCRIPTOR (NULL)
-#else
-#define GC_NO_DESCRIPTOR (NULL)
-#endif
-
 static void
 get_default_field_value (MonoDomain* domain, MonoClassField *field, void *value);
 
@@ -950,11 +941,11 @@ mono_class_compute_gc_descriptor (MonoClass *class)
                return;
 
        class->gc_descr_inited = TRUE;
-       class->gc_descr = GC_NO_DESCRIPTOR;
+       class->gc_descr = MONO_GC_DESCRIPTOR_NULL;
 
        bitmap = default_bitmap;
        if (class == mono_defaults.string_class) {
-               class->gc_descr = (gpointer)mono_gc_make_descr_for_string (bitmap, 2);
+               class->gc_descr = mono_gc_make_descr_for_string (bitmap, 2);
        } else if (class->rank) {
                mono_class_compute_gc_descriptor (class->element_class);
                if (MONO_TYPE_IS_REFERENCE (&class->element_class->byval_arg)) {
@@ -976,9 +967,9 @@ mono_class_compute_gc_descriptor (MonoClass *class)
                if (count++ > 58)
                        return;*/
                bitmap = compute_class_bitmap (class, default_bitmap, sizeof (default_bitmap) * 8, 0, &max_set, FALSE);
-               class->gc_descr = (gpointer)mono_gc_make_descr_for_object (bitmap, max_set + 1, class->instance_size);
+               class->gc_descr = mono_gc_make_descr_for_object (bitmap, max_set + 1, class->instance_size);
                /*
-               if (class->gc_descr == GC_NO_DESCRIPTOR)
+               if (class->gc_descr == MONO_GC_DESCRIPTOR_NULL)
                        g_print ("disabling typed alloc (%d) for %s.%s\n", max_set, class->name_space, class->name);
                */
                /*printf ("new descriptor: %p 0x%x for %s.%s\n", class->gc_descr, bitmap [0], class->name_space, class->name);*/
@@ -1960,7 +1951,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *class, gboolean
                 */
 #ifdef HAVE_BOEHM_GC
        if (domain != mono_get_root_domain () && !mono_dont_free_domains)
-               vt->gc_descr = GC_NO_DESCRIPTOR;
+               vt->gc_descr = MONO_GC_DESCRIPTOR_NULL;
        else
 #endif
                vt->gc_descr = class->gc_descr;
@@ -1973,7 +1964,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *class, gboolean
        if (class_size) {
                /* we store the static field pointer at the end of the vtable: vt->vtable [class->vtable_size] */
                if (class->has_static_refs) {
-                       gpointer statics_gc_descr;
+                       MonoGCDescriptor statics_gc_descr;
                        int max_set = 0;
                        gsize default_bitmap [4] = {0};
                        gsize *bitmap;
@@ -4421,7 +4412,7 @@ mono_class_get_allocation_ftn (MonoVTable *vtable, gboolean for_box, gboolean *p
        if (mono_class_has_finalizer (vtable->klass) || mono_class_is_marshalbyref (vtable->klass) || (mono_profiler_get_events () & MONO_PROFILE_ALLOCATIONS))
                return mono_object_new_specific;
 
-       if (vtable->gc_descr != GC_NO_DESCRIPTOR) {
+       if (vtable->gc_descr != MONO_GC_DESCRIPTOR_NULL) {
 
                return mono_object_new_fast;
 
index 121f6ce73619af42b2b54a265fcd25b85b3df531..ad42828aee8ff493b5648ddc1de52d035a0e4eea 100644 (file)
@@ -113,6 +113,20 @@ static void process_set_field_string (MonoObject *obj, const gchar *fieldname,
        mono_gc_wbarrier_generic_store (((char *)obj) + field->offset, (MonoObject*)string);
 }
 
+static void process_set_field_string_char (MonoObject *obj, const gchar *fieldname,
+                                     const gchar *val)
+{
+       MonoClassField *field;
+       MonoString *string;
+
+       LOGDEBUG (g_message ("%s: Setting field %s to [%s]", __func__, fieldname, val));
+
+       string=mono_string_new (mono_object_domain (obj), val);
+       
+       field=mono_class_get_field_from_name (mono_object_class (obj), fieldname);
+       mono_gc_wbarrier_generic_store (((char *)obj) + field->offset, (MonoObject*)string);
+}
+
 static void process_set_field_int (MonoObject *obj, const gchar *fieldname,
                                   guint32 val)
 {
@@ -350,9 +364,49 @@ static void process_get_fileversion (MonoObject *filever, gunichar2 *filename)
        }
 }
 
+static void process_get_assembly_fileversion (MonoObject *filever, MonoAssembly *assembly)
+{
+       process_set_field_int (filever, "filemajorpart", assembly->aname.major);
+       process_set_field_int (filever, "fileminorpart", assembly->aname.minor);
+       process_set_field_int (filever, "filebuildpart", assembly->aname.build);
+}
+
+static MonoObject* get_process_module (MonoAssembly *assembly, MonoClass *proc_class)
+{
+       static MonoClass *filever_class = NULL;
+       MonoObject *item, *filever;
+       MonoDomain *domain = mono_domain_get ();
+       char filename [80] = "[In Memory] ";
+       const char *modulename = assembly->aname.name;
+
+       strncat (filename, modulename, 80);
+
+       /* Build a System.Diagnostics.ProcessModule with the data.
+        */
+       item = mono_object_new (domain, proc_class);
+
+       if (!filever_class)
+               filever_class = mono_class_from_name (system_assembly,
+                                           "System.Diagnostics",
+                                           "FileVersionInfo");
+
+       filever = mono_object_new (domain, filever_class);
+
+       process_get_assembly_fileversion (filever, assembly);
+       process_set_field_string_char (filever, "filename", filename);
+       process_set_field_object (item, "version_info", filever);
+
+       process_set_field_intptr (item, "baseaddr", assembly->image->raw_data);
+       process_set_field_int (item, "memory_size", assembly->image->raw_data_len);
+       process_set_field_string_char (item, "filename", filename);
+       process_set_field_string_char (item, "modulename", modulename);
+
+       return item;
+}
+
 static MonoObject* process_add_module (HANDLE process, HMODULE mod, gunichar2 *filename, gunichar2 *modulename, MonoClass *proc_class)
 {
-       MonoClass *filever_class;
+       static MonoClass *filever_class = NULL;
        MonoObject *item, *filever;
        MonoDomain *domain=mono_domain_get ();
        MODULEINFO modinfo;
@@ -362,9 +416,11 @@ static MonoObject* process_add_module (HANDLE process, HMODULE mod, gunichar2 *f
         */
        item=mono_object_new (domain, proc_class);
 
-       filever_class=mono_class_from_name (system_assembly,
+       if (!filever_class)
+               filever_class=mono_class_from_name (system_assembly,
                                            "System.Diagnostics",
                                            "FileVersionInfo");
+
        filever=mono_object_new (domain, filever_class);
 
        process_get_fileversion (filever, filename);
@@ -390,6 +446,28 @@ static MonoObject* process_add_module (HANDLE process, HMODULE mod, gunichar2 *f
        return item;
 }
 
+static GPtrArray* get_domain_assemblies (MonoDomain *domain)
+{
+       GSList *tmp;
+       GPtrArray *assemblies;
+
+       /* 
+        * Make a copy of the list of assemblies because we can't hold the assemblies
+        * lock while creating objects etc.
+        */
+       assemblies = g_ptr_array_new ();
+       mono_domain_assemblies_lock (domain);
+       for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
+               MonoAssembly *ass = tmp->data;
+               if (ass->image->fileio_used)
+                       continue;
+               g_ptr_array_add (assemblies, ass);
+       }
+       mono_domain_assemblies_unlock (domain);
+
+       return assemblies;
+}
+
 /* Returns an array of System.Diagnostics.ProcessModule */
 MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this, HANDLE process)
 {
@@ -399,24 +477,60 @@ MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject
        gunichar2 filename[MAX_PATH];
        gunichar2 modname[MAX_PATH];
        DWORD needed;
-       guint32 count = 0;
+       guint32 count = 0, module_count = 0, assembly_count = 0;
        guint32 i, num_added = 0;
-       MonoClass *proc_class;
+       static MonoClass *proc_class = NULL;
+       GPtrArray *assemblies = NULL;
+       static HANDLE current_process = 0;
+       
+       if (current_process == 0) {
+               int pid = mono_process_current_pid ();
+               current_process = ves_icall_System_Diagnostics_Process_GetProcess_internal (pid);
+       }
 
        STASH_SYS_ASS (this);
 
+       if (process == current_process) {
+               assemblies = get_domain_assemblies (mono_domain_get ());
+               assembly_count = assemblies->len;
+       }
+
        if (EnumProcessModules (process, mods, sizeof(mods), &needed)) {
-               count = needed / sizeof(HMODULE);
+               module_count += needed / sizeof(HMODULE);
+       }
+
+       count = module_count + assembly_count; 
+       if (!proc_class)
                proc_class = mono_class_from_name (system_assembly, "System.Diagnostics", "ProcessModule");
-               temp_arr = mono_array_new (mono_domain_get (), proc_class, count);
-               for (i = 0; i < count; i++) {
-                       if (GetModuleBaseName (process, mods[i], modname, MAX_PATH) &&
-                                       GetModuleFileNameEx (process, mods[i], filename, MAX_PATH)) {
-                               MonoObject *module = process_add_module (process, mods[i],
-                                               filename, modname, proc_class);
-                               mono_array_setref (temp_arr, num_added++, module);
-                       }
+
+       temp_arr = mono_array_new (mono_domain_get (), proc_class, count);
+
+       for (i = 0; i < module_count; i++) {
+               if (GetModuleBaseName (process, mods[i], modname, MAX_PATH) &&
+                               GetModuleFileNameEx (process, mods[i], filename, MAX_PATH)) {
+                       MonoObject *module = process_add_module (process, mods[i],
+                                       filename, modname, proc_class);
+                       mono_array_setref (temp_arr, num_added++, module);
+               }
+       }
+
+       if (assemblies) {
+               for (i = 0; i < assembly_count; i++) {
+                       MonoAssembly *ass = g_ptr_array_index (assemblies, i);
+                       MonoObject *module = get_process_module (ass, proc_class);
+                       mono_array_setref (temp_arr, num_added++, module);
                }
+               g_ptr_array_free (assemblies, TRUE);
+       }
+
+       if (count == num_added) {
+               arr = temp_arr;
+       } else {
+               /* shorter version of the array */
+               arr = mono_array_new (mono_domain_get (), proc_class, num_added);
+
+               for (i = 0; i < num_added; i++)
+                       mono_array_setref (arr, i, mono_array_get (temp_arr, MonoObject*, i));
        }
 
        if (count == num_added) {
index 16b0752e186959cb79a05982a54298602b7db16f..096db3127ae0586e894e39196b9f2b367716450d 100644 (file)
@@ -8304,7 +8304,7 @@ create_custom_attr (MonoImage *image, MonoMethod *method, const guchar *data, gu
                memset (params, 0, sizeof (void*) * sig->param_count);
        } else {
                /* Allocate using GC so it gets GC tracking */
-               params = mono_gc_alloc_fixed (sig->param_count * sizeof (void*), NULL);
+               params = mono_gc_alloc_fixed (sig->param_count * sizeof (void*), MONO_GC_DESCRIPTOR_NULL);
        }
 
        /* skip prolog */
index 2b8118f693749bca3761ca69a0090fe88ddf18c3..7e001b9984945bc85930752e9e7ba9da436d58c7 100644 (file)
@@ -17,7 +17,7 @@
 #include <mono/metadata/runtime.h>
 #include <mono/metadata/monitor.h>
 #include <mono/metadata/threads-types.h>
-#include <mono/metadata/threadpool.h>
+#include <mono/metadata/threadpool-ms.h>
 #include <mono/metadata/marshal.h>
 #include <mono/utils/atomic.h>
 
@@ -104,7 +104,7 @@ mono_runtime_try_shutdown (void)
        mono_runtime_set_shutting_down ();
 
        /* This will kill the tp threads which cannot be suspended */
-       mono_thread_pool_cleanup ();
+       mono_threadpool_ms_cleanup ();
 
        /*TODO move the follow to here:
        mono_thread_suspend_all_other_threads (); OR  mono_thread_wait_all_other_threads
@@ -132,6 +132,5 @@ void
 mono_runtime_init_tls (void)
 {
        mono_marshal_init_tls ();
-       mono_thread_pool_init_tls ();
        mono_thread_init_tls ();
 }
index eb52ac990f34625a2e2b49552776b62c65363de9..2847011dc22d42f47fb168607d3a12ccb77b946b 100644 (file)
 #include "metadata/object-internals.h"
 
 typedef MonoObject GCObject;
-typedef MonoVTable GCVTable;
+typedef MonoVTable* GCVTable;
 
-/* FIXME: This should return a GCVTable* and be a function. */
-#define SGEN_LOAD_VTABLE_UNCHECKED(obj)        ((void*)(((GCObject*)(obj))->vtable))
-
-static inline mword
-sgen_vtable_get_descriptor (GCVTable *vtable)
+static inline GCVTable
+SGEN_LOAD_VTABLE_UNCHECKED (GCObject *obj)
 {
-       return (mword)vtable->gc_descr;
+       return obj->vtable;
 }
 
-static mword /*__attribute__((noinline)) not sure if this hint is a good idea*/
-sgen_client_slow_object_get_size (GCVTable *vtable, GCObject* o)
+static inline SgenDescriptor
+sgen_vtable_get_descriptor (GCVTable vtable)
 {
-       MonoClass *klass = ((MonoVTable*)vtable)->klass;
-
-       /*
-        * We depend on mono_string_length_fast and
-        * mono_array_length_fast not using the object's vtable.
-        */
-       if (klass == mono_defaults.string_class) {
-               return G_STRUCT_OFFSET (MonoString, chars) + 2 * mono_string_length_fast ((MonoString*) o) + 2;
-       } else if (klass->rank) {
-               MonoArray *array = (MonoArray*)o;
-               size_t size = sizeof (MonoArray) + klass->sizes.element_size * mono_array_length_fast (array);
-               if (G_UNLIKELY (array->bounds)) {
-                       size += sizeof (mono_array_size_t) - 1;
-                       size &= ~(sizeof (mono_array_size_t) - 1);
-                       size += sizeof (MonoArrayBounds) * klass->rank;
-               }
-               return size;
-       } else {
-               /* from a created object: the class must be inited already */
-               return klass->instance_size;
-       }
-}
-
-/*
- * This function can be called on an object whose first word, the
- * vtable field, is not intact.  This is necessary for the parallel
- * collector.
- */
-static MONO_NEVER_INLINE mword
-sgen_client_par_object_get_size (GCVTable *vtable, GCObject* o)
-{
-       mword descr = sgen_vtable_get_descriptor (vtable);
-       mword type = descr & DESC_TYPE_MASK;
-
-       if (type == DESC_TYPE_RUN_LENGTH || type == DESC_TYPE_SMALL_PTRFREE) {
-               mword size = descr & 0xfff8;
-               SGEN_ASSERT (9, size >= sizeof (MonoObject), "Run length object size to small");
-               return size;
-       } else if (descr == SGEN_DESC_STRING) {
-               return G_STRUCT_OFFSET (MonoString, chars) + 2 * mono_string_length_fast ((MonoString*) o) + 2;
-       } else if (type == DESC_TYPE_VECTOR) {
-               int element_size = ((descr) >> VECTOR_ELSIZE_SHIFT) & MAX_ELEMENT_SIZE;
-               MonoArray *array = (MonoArray*)o;
-               size_t size = sizeof (MonoArray) + element_size * mono_array_length_fast (array);
-
-               /*
-                * Non-vector arrays with a single dimension whose lower bound is zero are
-                * allocated without bounds.
-                */
-               if ((descr & VECTOR_KIND_ARRAY) && array->bounds) {
-                       size += sizeof (mono_array_size_t) - 1;
-                       size &= ~(sizeof (mono_array_size_t) - 1);
-                       size += sizeof (MonoArrayBounds) * ((MonoVTable*)vtable)->klass->rank;
-               }
-               return size;
-       }
-
-       return sgen_client_slow_object_get_size (vtable, o);
+       return (SgenDescriptor)vtable->gc_descr;
 }
 
 typedef struct _SgenClientThreadInfo SgenClientThreadInfo;
@@ -166,8 +106,71 @@ enum {
 #define SGEN_CLIENT_OBJECT_HEADER_SIZE         (sizeof (GCObject))
 #define SGEN_CLIENT_MINIMUM_OBJECT_SIZE                SGEN_CLIENT_OBJECT_HEADER_SIZE
 
+static mword /*__attribute__((noinline)) not sure if this hint is a good idea*/
+sgen_client_slow_object_get_size (GCVTable vtable, GCObject* o)
+{
+       MonoClass *klass = ((MonoVTable*)vtable)->klass;
+
+       /*
+        * We depend on mono_string_length_fast and
+        * mono_array_length_fast not using the object's vtable.
+        */
+       if (klass == mono_defaults.string_class) {
+               return G_STRUCT_OFFSET (MonoString, chars) + 2 * mono_string_length_fast ((MonoString*) o) + 2;
+       } else if (klass->rank) {
+               MonoArray *array = (MonoArray*)o;
+               size_t size = sizeof (MonoArray) + klass->sizes.element_size * mono_array_length_fast (array);
+               if (G_UNLIKELY (array->bounds)) {
+                       size += sizeof (mono_array_size_t) - 1;
+                       size &= ~(sizeof (mono_array_size_t) - 1);
+                       size += sizeof (MonoArrayBounds) * klass->rank;
+               }
+               return size;
+       } else {
+               /* from a created object: the class must be inited already */
+               return klass->instance_size;
+       }
+}
+
+/*
+ * This function can be called on an object whose first word, the
+ * vtable field, is not intact.  This is necessary for the parallel
+ * collector.
+ */
+static MONO_NEVER_INLINE mword
+sgen_client_par_object_get_size (GCVTable vtable, GCObject* o)
+{
+       SgenDescriptor descr = sgen_vtable_get_descriptor (vtable);
+       mword type = descr & DESC_TYPE_MASK;
+
+       if (type == DESC_TYPE_RUN_LENGTH || type == DESC_TYPE_SMALL_PTRFREE) {
+               mword size = descr & 0xfff8;
+               SGEN_ASSERT (9, size >= sizeof (MonoObject), "Run length object size to small");
+               return size;
+       } else if (descr == SGEN_DESC_STRING) {
+               return G_STRUCT_OFFSET (MonoString, chars) + 2 * mono_string_length_fast ((MonoString*) o) + 2;
+       } else if (type == DESC_TYPE_VECTOR) {
+               int element_size = ((descr) >> VECTOR_ELSIZE_SHIFT) & MAX_ELEMENT_SIZE;
+               MonoArray *array = (MonoArray*)o;
+               size_t size = sizeof (MonoArray) + element_size * mono_array_length_fast (array);
+
+               /*
+                * Non-vector arrays with a single dimension whose lower bound is zero are
+                * allocated without bounds.
+                */
+               if ((descr & VECTOR_KIND_ARRAY) && array->bounds) {
+                       size += sizeof (mono_array_size_t) - 1;
+                       size &= ~(sizeof (mono_array_size_t) - 1);
+                       size += sizeof (MonoArrayBounds) * ((MonoVTable*)vtable)->klass->rank;
+               }
+               return size;
+       }
+
+       return sgen_client_slow_object_get_size (vtable, o);
+}
+
 static MONO_ALWAYS_INLINE size_t G_GNUC_UNUSED
-sgen_client_array_element_size (GCVTable *gc_vtable)
+sgen_client_array_element_size (GCVTable gc_vtable)
 {
        MonoVTable *vt = (MonoVTable*)gc_vtable;
        return mono_array_element_size (vt->klass);
@@ -192,14 +195,14 @@ sgen_client_object_is_array_fill (GCObject *o)
 }
 
 static MONO_ALWAYS_INLINE void G_GNUC_UNUSED
-sgen_client_pre_copy_checks (char *destination, GCVTable *gc_vtable, void *obj, mword objsize)
+sgen_client_pre_copy_checks (char *destination, GCVTable gc_vtable, void *obj, mword objsize)
 {
        MonoVTable *vt = (MonoVTable*)gc_vtable;
        SGEN_ASSERT (9, vt->klass->inited, "vtable %p for class %s:%s was not initialized", vt, vt->klass->name_space, vt->klass->name);
 }
 
 static MONO_ALWAYS_INLINE void G_GNUC_UNUSED
-sgen_client_update_copied_object (char *destination, GCVTable *gc_vtable, void *obj, mword objsize)
+sgen_client_update_copied_object (char *destination, GCVTable gc_vtable, void *obj, mword objsize)
 {
        MonoVTable *vt = (MonoVTable*)gc_vtable;
        if (G_UNLIKELY (vt->rank && ((MonoArray*)obj)->bounds)) {
@@ -242,13 +245,13 @@ sgen_client_object_has_critical_finalizer (GCObject *obj)
        if (!mono_defaults.critical_finalizer_object)
                return FALSE;
 
-       class = ((MonoVTable*)SGEN_LOAD_VTABLE (obj))->klass;
+       class = SGEN_LOAD_VTABLE (obj)->klass;
 
        return mono_class_has_parent_fast (class, mono_defaults.critical_finalizer_object);
 }
 
-const char* sgen_client_vtable_get_namespace (GCVTable *vtable);
-const char* sgen_client_vtable_get_name (GCVTable *vtable);
+const char* sgen_client_vtable_get_namespace (GCVTable vtable);
+const char* sgen_client_vtable_get_name (GCVTable vtable);
 
 static gboolean G_GNUC_UNUSED
 sgen_client_bridge_need_processing (void)
@@ -568,7 +571,7 @@ sgen_client_binary_protocol_dislink_update (gpointer link, gpointer obj, gboolea
 {
 #ifdef ENABLE_DTRACE
        if (MONO_GC_WEAK_UPDATE_ENABLED ()) {
-               GCVTable *vt = obj ? (GCVTable*)SGEN_LOAD_VTABLE (obj) : NULL;
+               GCVTable vt = obj ? SGEN_LOAD_VTABLE (obj) : NULL;
                MONO_GC_WEAK_UPDATE ((mword)link,
                                (mword)obj,
                                obj ? (mword)sgen_safe_object_get_size (obj) : (mword)0,
index 9050c3b1d2f9d45bfaa907bc35d4c83330e5dc5d..936348752203892fa15151ac0f87acb96e290f86 100644 (file)
@@ -112,7 +112,7 @@ mono_gc_wbarrier_value_copy (gpointer dest, gpointer src, int count, MonoClass *
        HEAVY_STAT (++stat_wbarrier_value_copy);
        g_assert (klass->valuetype);
 
-       SGEN_LOG (8, "Adding value remset at %p, count %d, descr %p for class %s (%p)", dest, count, klass->gc_descr, klass->name, klass);
+       SGEN_LOG (8, "Adding value remset at %p, count %d, descr %p for class %s (%p)", dest, count, (gpointer)klass->gc_descr, klass->name, klass);
 
        if (sgen_ptr_in_nursery (dest) || ptr_on_stack (dest) || !sgen_gc_descr_has_references ((mword)klass->gc_descr)) {
                size_t element_size = mono_class_value_size (klass, NULL);
@@ -354,9 +354,9 @@ mono_gc_get_write_barrier (void)
  */
 
 /* Vtable of the objects used to fill out nursery fragments before a collection */
-static GCVTable *array_fill_vtable;
+static GCVTable array_fill_vtable;
 
-static GCVTable*
+static GCVTable
 get_array_fill_vtable (void)
 {
        if (!array_fill_vtable) {
@@ -379,7 +379,7 @@ get_array_fill_vtable (void)
                vtable->gc_descr = mono_gc_make_descr_for_array (TRUE, &bmap, 0, 1);
                vtable->rank = 1;
 
-               array_fill_vtable = (GCVTable*)vtable;
+               array_fill_vtable = vtable;
        }
        return array_fill_vtable;
 }
@@ -450,7 +450,7 @@ mono_gc_get_vtable_bits (MonoClass *class)
 static gboolean
 is_finalization_aware (MonoObject *obj)
 {
-       MonoVTable *vt = ((MonoVTable*)SGEN_LOAD_VTABLE (obj));
+       MonoVTable *vt = SGEN_LOAD_VTABLE (obj);
        return (vt->gc_bits & SGEN_GC_BIT_FINALIZER_AWARE) == SGEN_GC_BIT_FINALIZER_AWARE;
 }
 
@@ -463,7 +463,7 @@ sgen_client_object_queued_for_finalization (GCObject *obj)
 #ifdef ENABLE_DTRACE
        if (G_UNLIKELY (MONO_GC_FINALIZE_ENQUEUE_ENABLED ())) {
                int gen = sgen_ptr_in_nursery (obj) ? GENERATION_NURSERY : GENERATION_OLD;
-               GCVTable *vt = (GCVTable*)SGEN_LOAD_VTABLE (obj);
+               GCVTable vt = SGEN_LOAD_VTABLE (obj);
                MONO_GC_FINALIZE_ENQUEUE ((mword)obj, sgen_safe_object_get_size (obj),
                                sgen_client_vtable_get_namespace (vt), sgen_client_vtable_get_name (vt), gen,
                                sgen_client_object_has_critical_finalizer (obj));
@@ -548,12 +548,12 @@ typedef struct _EphemeronLinkNode EphemeronLinkNode;
 
 struct _EphemeronLinkNode {
        EphemeronLinkNode *next;
-       char *array;
+       MonoArray *array;
 };
 
 typedef struct {
-       void *key;
-       void *value;
+       GCObject *key;
+       GCObject *value;
 } Ephemeron;
 
 static EphemeronLinkNode *ephemeron_list;
@@ -594,17 +594,16 @@ sgen_client_clear_unreachable_ephemerons (ScanCopyContext ctx)
        CopyOrMarkObjectFunc copy_func = ctx.ops->copy_or_mark_object;
        SgenGrayQueue *queue = ctx.queue;
        EphemeronLinkNode *current = ephemeron_list, *prev = NULL;
-       MonoArray *array;
        Ephemeron *cur, *array_end;
-       char *tombstone;
+       GCObject *tombstone;
 
        while (current) {
-               char *object = current->array;
+               MonoArray *array = current->array;
 
-               if (!sgen_is_object_alive_for_current_gen (object)) {
+               if (!sgen_is_object_alive_for_current_gen ((GCObject*)array)) {
                        EphemeronLinkNode *tmp = current;
 
-                       SGEN_LOG (5, "Dead Ephemeron array at %p", object);
+                       SGEN_LOG (5, "Dead Ephemeron array at %p", array);
 
                        if (prev)
                                prev->next = current->next;
@@ -617,18 +616,17 @@ sgen_client_clear_unreachable_ephemerons (ScanCopyContext ctx)
                        continue;
                }
 
-               copy_func ((void**)&object, queue);
-               current->array = object;
+               copy_func ((GCObject**)&array, queue);
+               current->array = array;
 
-               SGEN_LOG (5, "Clearing unreachable entries for ephemeron array at %p", object);
+               SGEN_LOG (5, "Clearing unreachable entries for ephemeron array at %p", array);
 
-               array = (MonoArray*)object;
                cur = mono_array_addr (array, Ephemeron, 0);
                array_end = cur + mono_array_length_fast (array);
-               tombstone = (char*)((MonoVTable*)SGEN_LOAD_VTABLE (object))->domain->ephemeron_tombstone;
+               tombstone = SGEN_LOAD_VTABLE ((GCObject*)array)->domain->ephemeron_tombstone;
 
                for (; cur < array_end; ++cur) {
-                       char *key = (char*)cur->key;
+                       GCObject *key = cur->key;
 
                        if (!key || key == tombstone)
                                continue;
@@ -660,29 +658,27 @@ sgen_client_mark_ephemerons (ScanCopyContext ctx)
        SgenGrayQueue *queue = ctx.queue;
        gboolean nothing_marked = TRUE;
        EphemeronLinkNode *current = ephemeron_list;
-       MonoArray *array;
        Ephemeron *cur, *array_end;
-       char *tombstone;
+       GCObject *tombstone;
 
        for (current = ephemeron_list; current; current = current->next) {
-               char *object = current->array;
-               SGEN_LOG (5, "Ephemeron array at %p", object);
+               MonoArray *array = current->array;
+               SGEN_LOG (5, "Ephemeron array at %p", array);
 
                /*It has to be alive*/
-               if (!sgen_is_object_alive_for_current_gen (object)) {
+               if (!sgen_is_object_alive_for_current_gen ((GCObject*)array)) {
                        SGEN_LOG (5, "\tnot reachable");
                        continue;
                }
 
-               copy_func ((void**)&object, queue);
+               copy_func ((GCObject**)&array, queue);
 
-               array = (MonoArray*)object;
                cur = mono_array_addr (array, Ephemeron, 0);
                array_end = cur + mono_array_length_fast (array);
-               tombstone = (char*)((MonoVTable*)SGEN_LOAD_VTABLE (object))->domain->ephemeron_tombstone;
+               tombstone = SGEN_LOAD_VTABLE ((GCObject*)array)->domain->ephemeron_tombstone;
 
                for (; cur < array_end; ++cur) {
-                       char *key = cur->key;
+                       GCObject *key = cur->key;
 
                        if (!key || key == tombstone)
                                continue;
@@ -692,13 +688,13 @@ sgen_client_mark_ephemerons (ScanCopyContext ctx)
                                cur->value, cur->value && sgen_is_object_alive_for_current_gen (cur->value) ? "reachable" : "unreachable");
 
                        if (sgen_is_object_alive_for_current_gen (key)) {
-                               char *value = cur->value;
+                               GCObject *value = cur->value;
 
-                               copy_func ((void**)&cur->key, queue);
+                               copy_func (&cur->key, queue);
                                if (value) {
                                        if (!sgen_is_object_alive_for_current_gen (value))
                                                nothing_marked = FALSE;
-                                       copy_func ((void**)&cur->value, queue);
+                                       copy_func (&cur->value, queue);
                                }
                        }
                }
@@ -720,7 +716,7 @@ mono_gc_ephemeron_array_add (MonoObject *obj)
                UNLOCK_GC;
                return FALSE;
        }
-       node->array = (char*)obj;
+       node->array = (MonoArray*)obj;
        node->next = ephemeron_list;
        ephemeron_list = node;
 
@@ -747,7 +743,7 @@ mono_gc_set_current_thread_appdomain (MonoDomain *domain)
 }
 
 static gboolean
-need_remove_object_for_domain (char *start, MonoDomain *domain)
+need_remove_object_for_domain (GCObject *start, MonoDomain *domain)
 {
        if (mono_object_domain (start) == domain) {
                SGEN_LOG (4, "Need to cleanup object %p", start);
@@ -758,9 +754,9 @@ need_remove_object_for_domain (char *start, MonoDomain *domain)
 }
 
 static void
-process_object_for_domain_clearing (char *start, MonoDomain *domain)
+process_object_for_domain_clearing (GCObject *start, MonoDomain *domain)
 {
-       MonoVTable *vt = (MonoVTable*)SGEN_LOAD_VTABLE (start);
+       MonoVTable *vt = SGEN_LOAD_VTABLE (start);
        if (vt->klass == mono_defaults.internal_thread_class)
                g_assert (mono_object_domain (start) == mono_get_root_domain ());
        /* The object could be a proxy for an object in the domain
@@ -780,15 +776,15 @@ process_object_for_domain_clearing (char *start, MonoDomain *domain)
 }
 
 static gboolean
-clear_domain_process_object (char *obj, MonoDomain *domain)
+clear_domain_process_object (GCObject *obj, MonoDomain *domain)
 {
        gboolean remove;
 
        process_object_for_domain_clearing (obj, domain);
        remove = need_remove_object_for_domain (obj, domain);
 
-       if (remove && ((MonoObject*)obj)->synchronisation) {
-               void **dislink = mono_monitor_get_object_monitor_weak_link ((MonoObject*)obj);
+       if (remove && obj->synchronisation) {
+               void **dislink = mono_monitor_get_object_monitor_weak_link (obj);
                if (dislink)
                        sgen_register_disappearing_link (NULL, dislink, FALSE, TRUE);
        }
@@ -797,7 +793,7 @@ clear_domain_process_object (char *obj, MonoDomain *domain)
 }
 
 static void
-clear_domain_process_minor_object_callback (char *obj, size_t size, MonoDomain *domain)
+clear_domain_process_minor_object_callback (GCObject *obj, size_t size, MonoDomain *domain)
 {
        if (clear_domain_process_object (obj, domain)) {
                CANARIFY_SIZE (size);
@@ -806,20 +802,20 @@ clear_domain_process_minor_object_callback (char *obj, size_t size, MonoDomain *
 }
 
 static void
-clear_domain_process_major_object_callback (char *obj, size_t size, MonoDomain *domain)
+clear_domain_process_major_object_callback (GCObject *obj, size_t size, MonoDomain *domain)
 {
        clear_domain_process_object (obj, domain);
 }
 
 static void
-clear_domain_free_major_non_pinned_object_callback (char *obj, size_t size, MonoDomain *domain)
+clear_domain_free_major_non_pinned_object_callback (GCObject *obj, size_t size, MonoDomain *domain)
 {
        if (need_remove_object_for_domain (obj, domain))
                major_collector.free_non_pinned_object (obj, size);
 }
 
 static void
-clear_domain_free_major_pinned_object_callback (char *obj, size_t size, MonoDomain *domain)
+clear_domain_free_major_pinned_object_callback (GCObject *obj, size_t size, MonoDomain *domain)
 {
        if (need_remove_object_for_domain (obj, domain))
                major_collector.free_pinned_object (obj, size);
@@ -885,11 +881,11 @@ mono_gc_clear_domain (MonoDomain * domain)
           the first object is a proxy. */
        major_collector.iterate_objects (ITERATE_OBJECTS_SWEEP_ALL, (IterateObjectCallbackFunc)clear_domain_process_major_object_callback, domain);
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next)
-               clear_domain_process_object (bigobj->data, domain);
+               clear_domain_process_object ((GCObject*)bigobj->data, domain);
 
        prev = NULL;
        for (bigobj = los_object_list; bigobj;) {
-               if (need_remove_object_for_domain (bigobj->data, domain)) {
+               if (need_remove_object_for_domain ((GCObject*)bigobj->data, domain)) {
                        LOSObject *to_free = bigobj;
                        if (prev)
                                prev->next = bigobj->next;
@@ -968,7 +964,7 @@ mono_gc_alloc_mature (MonoVTable *vtable)
 }
 
 void*
-mono_gc_alloc_fixed (size_t size, void *descr)
+mono_gc_alloc_fixed (size_t size, MonoGCDescriptor descr)
 {
        /* FIXME: do a single allocation */
        void *res = calloc (1, size);
@@ -1590,19 +1586,19 @@ find_next_card (guint8 *card_data, guint8 *end)
 #define ARRAY_OBJ_INDEX(ptr,array,elem_size) (((char*)(ptr) - ((char*)(array) + G_STRUCT_OFFSET (MonoArray, vector))) / (elem_size))
 
 gboolean
-sgen_client_cardtable_scan_object (char *obj, mword block_obj_size, guint8 *cards, gboolean mod_union, ScanCopyContext ctx)
+sgen_client_cardtable_scan_object (GCObject *obj, mword block_obj_size, guint8 *cards, gboolean mod_union, ScanCopyContext ctx)
 {
-       MonoVTable *vt = (MonoVTable*)SGEN_LOAD_VTABLE (obj);
+       MonoVTable *vt = SGEN_LOAD_VTABLE (obj);
        MonoClass *klass = vt->klass;
 
-       SGEN_ASSERT (0, SGEN_VTABLE_HAS_REFERENCES ((GCVTable*)vt), "Why would we ever call this on reference-free objects?");
+       SGEN_ASSERT (0, SGEN_VTABLE_HAS_REFERENCES (vt), "Why would we ever call this on reference-free objects?");
 
        if (vt->rank) {
                guint8 *card_data, *card_base;
                guint8 *card_data_end;
                char *obj_start = sgen_card_table_align_pointer (obj);
-               mword obj_size = sgen_client_par_object_get_size (vt, (GCObject*)obj);
-               char *obj_end = obj + obj_size;
+               mword obj_size = sgen_client_par_object_get_size (vt, obj);
+               char *obj_end = (char*)obj + obj_size;
                size_t card_count;
                size_t extra_idx = 0;
 
@@ -1675,7 +1671,7 @@ LOOP_HEAD:
                                        gpointer new, old = *(gpointer*)elem;
                                        if ((mod_union && old) || G_UNLIKELY (sgen_ptr_in_nursery (old))) {
                                                HEAVY_STAT (++los_array_remsets);
-                                               copy_func ((void**)elem, ctx.queue);
+                                               copy_func ((GCObject**)elem, ctx.queue);
                                                new = *(gpointer*)elem;
                                                if (G_UNLIKELY (sgen_ptr_in_nursery (new)))
                                                        sgen_add_to_global_remset (elem, new);
@@ -1716,7 +1712,7 @@ mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length)
 
 #ifndef DISABLE_CRITICAL_REGION
        ENTER_CRITICAL_REGION;
-       arr = sgen_try_alloc_obj_nolock ((GCVTable*)vtable, size);
+       arr = (MonoArray*)sgen_try_alloc_obj_nolock (vtable, size);
        if (arr) {
                /*This doesn't require fencing since EXIT_CRITICAL_REGION already does it for us*/
                arr->max_length = (mono_array_size_t)max_length;
@@ -1728,7 +1724,7 @@ mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length)
 
        LOCK_GC;
 
-       arr = sgen_alloc_obj_nolock ((GCVTable*)vtable, size);
+       arr = (MonoArray*)sgen_alloc_obj_nolock (vtable, size);
        if (G_UNLIKELY (!arr)) {
                UNLOCK_GC;
                return mono_gc_out_of_memory (size);
@@ -1742,7 +1738,7 @@ mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length)
        if (G_UNLIKELY (alloc_events))
                mono_profiler_allocation (&arr->obj);
 
-       SGEN_ASSERT (6, SGEN_ALIGN_UP (size) == SGEN_ALIGN_UP (sgen_client_par_object_get_size ((GCVTable*)vtable, (GCObject*)arr)), "Vector has incorrect size.");
+       SGEN_ASSERT (6, SGEN_ALIGN_UP (size) == SGEN_ALIGN_UP (sgen_client_par_object_get_size (vtable, (GCObject*)arr)), "Vector has incorrect size.");
        return arr;
 }
 
@@ -1758,7 +1754,7 @@ mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uint
 
 #ifndef DISABLE_CRITICAL_REGION
        ENTER_CRITICAL_REGION;
-       arr = sgen_try_alloc_obj_nolock ((GCVTable*)vtable, size);
+       arr = (MonoArray*)sgen_try_alloc_obj_nolock (vtable, size);
        if (arr) {
                /*This doesn't require fencing since EXIT_CRITICAL_REGION already does it for us*/
                arr->max_length = (mono_array_size_t)max_length;
@@ -1773,7 +1769,7 @@ mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uint
 
        LOCK_GC;
 
-       arr = sgen_alloc_obj_nolock ((GCVTable*)vtable, size);
+       arr = (MonoArray*)sgen_alloc_obj_nolock (vtable, size);
        if (G_UNLIKELY (!arr)) {
                UNLOCK_GC;
                return mono_gc_out_of_memory (size);
@@ -1790,7 +1786,7 @@ mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uint
        if (G_UNLIKELY (alloc_events))
                mono_profiler_allocation (&arr->obj);
 
-       SGEN_ASSERT (6, SGEN_ALIGN_UP (size) == SGEN_ALIGN_UP (sgen_client_par_object_get_size ((GCVTable*)vtable, (GCObject*)arr)), "Array has incorrect size.");
+       SGEN_ASSERT (6, SGEN_ALIGN_UP (size) == SGEN_ALIGN_UP (sgen_client_par_object_get_size (vtable, (GCObject*)arr)), "Array has incorrect size.");
        return arr;
 }
 
@@ -1805,7 +1801,7 @@ mono_gc_alloc_string (MonoVTable *vtable, size_t size, gint32 len)
 
 #ifndef DISABLE_CRITICAL_REGION
        ENTER_CRITICAL_REGION;
-       str = sgen_try_alloc_obj_nolock ((GCVTable*)vtable, size);
+       str = (MonoString*)sgen_try_alloc_obj_nolock (vtable, size);
        if (str) {
                /*This doesn't require fencing since EXIT_CRITICAL_REGION already does it for us*/
                str->length = len;
@@ -1817,7 +1813,7 @@ mono_gc_alloc_string (MonoVTable *vtable, size_t size, gint32 len)
 
        LOCK_GC;
 
-       str = sgen_alloc_obj_nolock ((GCVTable*)vtable, size);
+       str = (MonoString*)sgen_alloc_obj_nolock (vtable, size);
        if (G_UNLIKELY (!str)) {
                UNLOCK_GC;
                return mono_gc_out_of_memory (size);
@@ -1847,7 +1843,7 @@ mono_gc_set_string_length (MonoString *str, gint32 new_length)
         * the space to be reclaimed by SGen. */
 
        if (nursery_canaries_enabled () && sgen_ptr_in_nursery (str)) {
-               CHECK_CANARY_FOR_OBJECT (str);
+               CHECK_CANARY_FOR_OBJECT ((GCObject*)str);
                memset (new_end, 0, (str->length - new_length + 1) * sizeof (mono_unichar2) + CANARY_SIZE);
                memcpy (new_end + 1 , CANARY_STRING, CANARY_SIZE);
        } else {
@@ -1885,7 +1881,7 @@ add_profile_gc_root (GCRootReport *report, void *object, int rtype, uintptr_t ex
                notify_gc_roots (report);
        report->objects [report->count] = object;
        report->root_types [report->count] = rtype;
-       report->extra_info [report->count++] = (uintptr_t)((MonoVTable*)SGEN_LOAD_VTABLE (object))->klass;
+       report->extra_info [report->count++] = (uintptr_t)SGEN_LOAD_VTABLE (object)->klass;
 }
 
 void
@@ -1927,7 +1923,7 @@ report_finalizer_roots (SgenPointerQueue *fin_ready_queue, SgenPointerQueue *cri
 static GCRootReport *root_report;
 
 static void
-single_arg_report_root (void **obj, void *gc_data)
+single_arg_report_root (MonoObject **obj, void *gc_data)
 {
        if (*obj)
                add_profile_gc_root (root_report, *obj, MONO_PROFILE_GC_ROOT_OTHER, 0);
@@ -1967,9 +1963,9 @@ precisely_report_roots_from (GCRootReport *report, void** start_root, void** end
                break;
        }
        case ROOT_DESC_USER: {
-               MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc);
+               MonoGCRootMarkFunc marker = (MonoGCRootMarkFunc)sgen_get_user_descriptor_func (desc);
                root_report = report;
-               marker (start_root, single_arg_report_root, NULL);
+               marker ((MonoObject**)start_root, single_arg_report_root, NULL);
                break;
        }
        case ROOT_DESC_RUN_LEN:
@@ -2020,10 +2016,10 @@ sgen_client_collecting_major_1 (void)
 }
 
 void
-sgen_client_pinned_los_object (char *obj)
+sgen_client_pinned_los_object (GCObject *obj)
 {
        if (profile_roots)
-               add_profile_gc_root (&major_root_report, obj, MONO_PROFILE_GC_ROOT_PINNING | MONO_PROFILE_GC_ROOT_MISC, 0);
+               add_profile_gc_root (&major_root_report, (char*)obj, MONO_PROFILE_GC_ROOT_PINNING | MONO_PROFILE_GC_ROOT_MISC, 0);
 }
 
 void
@@ -2098,22 +2094,23 @@ typedef struct {
        } while (0)
 
 static void
-collect_references (HeapWalkInfo *hwi, char *start, size_t size)
+collect_references (HeapWalkInfo *hwi, GCObject *obj, size_t size)
 {
-       mword desc = sgen_obj_get_descriptor (start);
+       char *start = (char*)obj;
+       mword desc = sgen_obj_get_descriptor (obj);
 
 #include "sgen/sgen-scan-object.h"
 }
 
 static void
-walk_references (char *start, size_t size, void *data)
+walk_references (GCObject *start, size_t size, void *data)
 {
        HeapWalkInfo *hwi = data;
        hwi->called = 0;
        hwi->count = 0;
        collect_references (hwi, start, size);
        if (hwi->count || !hwi->called)
-               hwi->callback ((MonoObject*)start, mono_object_class (start), hwi->called? 0: size, hwi->count, hwi->refs, hwi->offsets, hwi->data);
+               hwi->callback (start, mono_object_class (start), hwi->called? 0: size, hwi->count, hwi->refs, hwi->offsets, hwi->data);
 }
 
 /**
@@ -2323,7 +2320,7 @@ void*
 mono_gc_scan_object (void *obj, void *gc_data)
 {
        ScanCopyContext *ctx = gc_data;
-       ctx->ops->copy_or_mark_object (&obj, ctx->queue);
+       ctx->ops->copy_or_mark_object ((GCObject**)&obj, ctx->queue);
        return obj;
 }
 
@@ -2405,13 +2402,13 @@ mono_gc_set_stack_end (void *stack_end)
  */
 
 int
-mono_gc_register_root (char *start, size_t size, void *descr)
+mono_gc_register_root (char *start, size_t size, MonoGCDescriptor descr)
 {
        return sgen_register_root (start, size, descr, descr ? ROOT_TYPE_NORMAL : ROOT_TYPE_PINNED);
 }
 
 int
-mono_gc_register_root_wbarrier (char *start, size_t size, void *descr)
+mono_gc_register_root_wbarrier (char *start, size_t size, MonoGCDescriptor descr)
 {
        return sgen_register_root (start, size, descr, ROOT_TYPE_WBARRIER);
 }
@@ -2541,16 +2538,16 @@ mono_gc_get_heap_size (void)
        return (int64_t)sgen_gc_get_total_heap_allocation ();
 }
 
-void*
+MonoGCDescriptor
 mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker)
 {
        return sgen_make_user_root_descriptor (marker);
 }
 
-void*
+MonoGCDescriptor
 mono_gc_make_descr_for_string (gsize *bitmap, int numbits)
 {
-       return (void*)SGEN_DESC_STRING;
+       return SGEN_DESC_STRING;
 }
 
 void*
@@ -2707,23 +2704,20 @@ sgen_client_pre_collection_checks (void)
 }
 
 gboolean
-sgen_client_vtable_is_inited (GCVTable *gc_vtable)
+sgen_client_vtable_is_inited (MonoVTable *vt)
 {
-       MonoVTable *vt = (MonoVTable*)gc_vtable;
        return vt->klass->inited;
 }
 
 const char*
-sgen_client_vtable_get_namespace (GCVTable *gc_vtable)
+sgen_client_vtable_get_namespace (MonoVTable *vt)
 {
-       MonoVTable *vt = (MonoVTable*)gc_vtable;
        return vt->klass->name_space;
 }
 
 const char*
-sgen_client_vtable_get_name (GCVTable *gc_vtable)
+sgen_client_vtable_get_name (MonoVTable *vt)
 {
-       MonoVTable *vt = (MonoVTable*)gc_vtable;
        return vt->klass->name;
 }
 
index 38997535e5e8190619825563aded2e78580cceda..c894b065bedb7fd513273d40edaf15945774d439 100644 (file)
@@ -664,7 +664,7 @@ dfs1 (HashEntry *obj_entry)
 
                        if (!obj_entry->v.dfs1.is_visited) {
                                int num_links = 0;
-                               mword desc = sgen_obj_get_descriptor_safe (start);
+                               mword desc = sgen_obj_get_descriptor_safe (obj);
 
                                obj_entry->v.dfs1.is_visited = 1;
 
@@ -932,7 +932,7 @@ dump_graph (void)
 
        fprintf (file, "<nodes>\n");
        SGEN_HASH_TABLE_FOREACH (&hash_table, obj, entry) {
-               MonoVTable *vt = (MonoVTable*) SGEN_LOAD_VTABLE (obj);
+               MonoVTable *vt = SGEN_LOAD_VTABLE (obj);
                fprintf (file, "<node id=\"%p\"><attvalues><attvalue for=\"0\" value=\"%s.%s\"/><attvalue for=\"1\" value=\"%s\"/></attvalues></node>\n",
                                obj, vt->klass->name_space, vt->klass->name, entry->is_bridge ? "true" : "false");
        } SGEN_HASH_TABLE_FOREACH_END;
@@ -1201,7 +1201,7 @@ processing_build_callback_data (int generation)
                        HashEntryWithAccounting *entry = (HashEntryWithAccounting*)all_entries [i];
                        if (entry->entry.is_bridge) {
                                MonoObject *obj = sgen_hash_table_key_for_value_pointer (entry);
-                               MonoClass *klass = ((MonoVTable*)SGEN_LOAD_VTABLE (obj))->klass;
+                               MonoClass *klass = SGEN_LOAD_VTABLE (obj)->klass;
                                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "OBJECT %s::%s (%p) weight %f", klass->name_space, klass->name, obj, entry->weight);
                        }
                }
@@ -1325,7 +1325,7 @@ processing_after_callback (int generation)
        if (bridge_accounting_enabled) {
                for (i = 0; i < num_sccs; ++i) {
                        for (j = 0; j < api_sccs [i]->num_objs; ++j) {
-                               GCVTable *vtable = SGEN_LOAD_VTABLE (api_sccs [i]->objs [j]);
+                               GCVTable vtable = SGEN_LOAD_VTABLE (api_sccs [i]->objs [j]);
                                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC,
                                        "OBJECT %s (%p) SCC [%d] %s",
                                                sgen_client_vtable_get_namespace (vtable), sgen_client_vtable_get_name (vtable), api_sccs [i]->objs [j],
index 2cef968485d4b0c88cc3488fab635ff2c9b73e57..581bb67d3a2adc38837c72c001293dfc75a3a321 100644 (file)
@@ -514,17 +514,16 @@ dfs1 (HashEntry *obj_entry)
 
        do {
                GCObject *obj;
-               char *start;
                ++dfs1_passes;
 
                obj_entry = dyn_array_ptr_pop (&dfs_stack);
                if (obj_entry) {
+                       char *start;
                        mword desc;
                        src = dyn_array_ptr_pop (&dfs_stack);
 
                        obj = obj_entry->obj;
-                       start = (char*)obj;
-                       desc = sgen_obj_get_descriptor_safe (start);
+                       desc = sgen_obj_get_descriptor_safe (obj);
 
                        if (src) {
                                //g_print ("link %s -> %s\n", sgen_safe_name (src->obj), sgen_safe_name (obj));
@@ -542,6 +541,7 @@ dfs1 (HashEntry *obj_entry)
                        /* NULL marks that the next entry is to be finished */
                        dyn_array_ptr_push (&dfs_stack, NULL);
 
+                       start = (char*)obj;
 #include "sgen/sgen-scan-object.h"
                } else {
                        obj_entry = dyn_array_ptr_pop (&dfs_stack);
@@ -765,7 +765,7 @@ processing_build_callback_data (int generation)
                for (i = 0; i < hash_table.num_entries; ++i) {
                        HashEntryWithAccounting *entry = (HashEntryWithAccounting*)all_entries [i];
                        if (entry->entry.is_bridge) {
-                               MonoClass *klass = ((MonoVTable*)SGEN_LOAD_VTABLE (entry->entry.obj))->klass;
+                               MonoClass *klass = SGEN_LOAD_VTABLE (entry->entry.obj)->klass;
                                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "OBJECT %s::%s (%p) weight %f", klass->name_space, klass->name, entry->entry.obj, entry->weight);
                        }
                }
@@ -884,7 +884,7 @@ processing_after_callback (int generation)
        if (bridge_accounting_enabled) {
                for (i = 0; i < num_sccs; ++i) {
                        for (j = 0; j < api_sccs [i]->num_objs; ++j) {
-                               GCVTable *vtable = SGEN_LOAD_VTABLE (api_sccs [i]->objs [j]);
+                               GCVTable vtable = SGEN_LOAD_VTABLE (api_sccs [i]->objs [j]);
                                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC,
                                        "OBJECT %s.%s (%p) SCC [%d] %s",
                                                sgen_client_vtable_get_namespace (vtable), sgen_client_vtable_get_name (vtable), api_sccs [i]->objs [j],
index 270b091e0efdca8a45345d0a9d48f738c64647d9..9537c0710bee73f26bb018c8df30d9f349825e4d 100644 (file)
@@ -448,7 +448,7 @@ bridge_object_forward (GCObject *obj)
 static const char*
 safe_name_bridge (GCObject *obj)
 {
-       GCVTable *vt = (GCVTable*)SGEN_LOAD_VTABLE (obj);
+       GCVTable vt = SGEN_LOAD_VTABLE (obj);
        return vt->klass->name;
 }
 
@@ -591,7 +591,7 @@ register_bridge_object (GCObject *obj)
 static gboolean
 is_opaque_object (GCObject *obj)
 {
-       MonoVTable *vt = (MonoVTable*)SGEN_LOAD_VTABLE (obj);
+       MonoVTable *vt = SGEN_LOAD_VTABLE (obj);
        if ((vt->gc_bits & SGEN_GC_BIT_BRIDGE_OPAQUE_OBJECT) == SGEN_GC_BIT_BRIDGE_OPAQUE_OBJECT) {
                SGEN_LOG (6, "ignoring %s\n", vt->klass->name);
                ++ignored_objects;
@@ -658,7 +658,7 @@ push_all (ScanData *data)
 {
        GCObject *obj = data->obj;
        char *start = (char*)obj;
-       mword desc = sgen_obj_get_descriptor_safe (start);
+       mword desc = sgen_obj_get_descriptor_safe (obj);
 
 #if DUMP_GRAPH
        printf ("**scanning %p %s\n", obj, safe_name_bridge (obj));
@@ -710,7 +710,7 @@ compute_low (ScanData *data)
 {
        GCObject *obj = data->obj;
        char *start = (char*)obj;
-       mword desc = sgen_obj_get_descriptor_safe (start);
+       mword desc = sgen_obj_get_descriptor_safe (obj);
 
        #include "sgen/sgen-scan-object.h"
 }
index 94c11ddc0b612a5056ccb7ee5e74067930157885..66c746b0da3e9fb00c81b0949dc3c91f1eb331e8 100644 (file)
@@ -32,8 +32,8 @@
 
 /*only one of the two can be non null at a given time*/
 typedef struct {
-       void *strong_ref;
-       void *weak_ref;
+       GCObject *strong_ref;
+       GCObject *weak_ref;
 } MonoGCToggleRef;
 
 static MonoToggleRefStatus (*toggleref_callback) (MonoObject *obj);
@@ -101,8 +101,8 @@ void sgen_client_mark_togglerefs (char *start, char *end, ScanCopyContext ctx)
 
        for (i = 0; i < toggleref_array_size; ++i) {
                if (toggleref_array [i].strong_ref) {
-                       char *object = toggleref_array [i].strong_ref;
-                       if (object >= start && object < end) {
+                       GCObject *object = toggleref_array [i].strong_ref;
+                       if ((char*)object >= start && (char*)object < end) {
                                SGEN_LOG (6, "\tcopying strong slot %d", i);
                                copy_func (&toggleref_array [i].strong_ref, queue);
                        }
@@ -121,9 +121,9 @@ void sgen_client_clear_togglerefs (char *start, char *end, ScanCopyContext ctx)
 
        for (i = 0; i < toggleref_array_size; ++i) {
                if (toggleref_array [i].weak_ref) {
-                       char *object = toggleref_array [i].weak_ref;
+                       GCObject *object = toggleref_array [i].weak_ref;
 
-                       if (object >= start && object < end) {
+                       if ((char*)object >= start && (char*)object < end) {
                                if (sgen_gc_is_object_ready_for_finalization (object)) {
                                        SGEN_LOG (6, "\tcleaning weak slot %d", i);
                                        toggleref_array [i].weak_ref = NULL; /* We defer compaction to only happen on the callback step. */
index fb9dd8664deaa702a0d7d99064a8d5024679ef46..3ef7a0aa08ef524a5d25fe96a910f506aa6e8c29 100644 (file)
 #include <mono/metadata/file-io.h>
 #include <mono/metadata/threads.h>
 #include <mono/metadata/threads-types.h>
+#include <mono/metadata/threadpool-ms-io.h>
 #include <mono/utils/mono-poll.h>
 /* FIXME change this code to not mess so much with the internals */
 #include <mono/metadata/class-internals.h>
-#include <mono/metadata/threadpool-internals.h>
 #include <mono/metadata/domain-internals.h>
 #include <mono/utils/mono-threads.h>
 #include <mono/utils/mono-memory-model.h>
@@ -718,7 +718,7 @@ void ves_icall_System_Net_Sockets_Socket_Close_internal(SOCKET sock,
 
        /* Clear any pending work item from this socket if the underlying
         * polling system does not notify when the socket is closed */
-       mono_thread_pool_remove_socket (GPOINTER_TO_INT (sock));
+       mono_threadpool_ms_io_remove_socket (GPOINTER_TO_INT (sock));
        closesocket(sock);
 }
 
diff --git a/mono/metadata/threadpool-internals.h b/mono/metadata/threadpool-internals.h
deleted file mode 100644 (file)
index 069157c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _MONO_THREADPOOL_INTERNALS_H_
-#define _MONO_THREADPOOL_INTERNALS_H_
-
-#include <glib.h>
-#include <mono/metadata/object.h>
-#include <mono/metadata/mono-hash.h>
-#include <mono/metadata/mono-mlist.h>
-#include <mono/utils/mono-compiler.h>
-#include <mono/utils/mono-mutex.h>
-
-typedef struct {
-       mono_mutex_t io_lock; /* access to sock_to_state */
-       int inited; // 0 -> not initialized , 1->initializing, 2->initialized, 3->cleaned up
-       MonoGHashTable *sock_to_state;
-
-       gint event_system;
-       gpointer event_data;
-       void (*modify) (gpointer p, int fd, int operation, int events, gboolean is_new);
-       void (*wait) (gpointer sock_data);
-       void (*shutdown) (gpointer event_data);
-} SocketIOData;
-
-void mono_thread_pool_remove_socket (int sock);
-gboolean mono_thread_pool_is_queue_array (MonoArray *o);
-void mono_internal_thread_unhandled_exception (MonoObject* exc);
-
-//TP internals the impls use
-void check_for_interruption_critical (void);
-void socket_io_cleanup (SocketIOData *data);
-MonoObject *get_io_event (MonoMList **list, gint event);
-int get_events_from_list (MonoMList *list);
-void threadpool_append_async_io_jobs (MonoObject **jobs, gint njobs);
-
-#endif
index 8fce1399ad7bb795e277bd7335ca2074ade74c46..eb18b3e98e6ae590da09a16686dde0928516a624 100644 (file)
@@ -55,18 +55,18 @@ epoll_cleanup (void)
 }
 
 static void
-epoll_update_add (ThreadPoolIOUpdate *update)
+epoll_update_add (gint fd, gint events, gboolean is_new)
 {
        struct epoll_event event;
 
-       event.data.fd = update->fd;
-       if ((update->events & MONO_POLLIN) != 0)
+       event.data.fd = fd;
+       if ((events & MONO_POLLIN) != 0)
                event.events |= EPOLLIN;
-       if ((update->events & MONO_POLLOUT) != 0)
+       if ((events & MONO_POLLOUT) != 0)
                event.events |= EPOLLOUT;
 
-       if (epoll_ctl (epoll_fd, update->is_new ? EPOLL_CTL_ADD : EPOLL_CTL_MOD, event.data.fd, &event) == -1)
-               g_warning ("epoll_update_add: epoll_ctl(%s) failed, error (%d) %s", update->is_new ? "EPOLL_CTL_ADD" : "EPOLL_CTL_MOD", errno, g_strerror (errno));
+       if (epoll_ctl (epoll_fd, is_new ? EPOLL_CTL_ADD : EPOLL_CTL_MOD, event.data.fd, &event) == -1)
+               g_warning ("epoll_update_add: epoll_ctl(%s) failed, error (%d) %s", is_new ? "EPOLL_CTL_ADD" : "EPOLL_CTL_MOD", errno, g_strerror (errno));
 }
 
 static gint
@@ -78,7 +78,7 @@ epoll_event_wait (void)
        if (ready == -1) {
                switch (errno) {
                case EINTR:
-                       check_for_interruption_critical ();
+                       mono_thread_internal_check_for_interruption_critical (mono_thread_internal_current ());
                        ready = 0;
                        break;
                default:
@@ -91,53 +91,35 @@ epoll_event_wait (void)
 }
 
 static gint
-epoll_event_max (void)
+epoll_event_get_fd_max (void)
 {
        return EPOLL_NEVENTS;
 }
 
 static gint
-epoll_event_fd_at (guint i)
+epoll_event_get_fd_at (gint i, gint *events)
 {
+       g_assert (events);
+
+       *events = ((epoll_events [i].events & (EPOLLIN | EPOLLERR | EPOLLHUP)) ? MONO_POLLIN : 0)
+                   | ((epoll_events [i].events & (EPOLLOUT | EPOLLERR | EPOLLHUP)) ? MONO_POLLOUT : 0);
+
        return epoll_events [i].data.fd;
 }
 
-static gboolean
-epoll_event_create_sockares_at (guint i, gint fd, MonoMList **list)
+static void
+epoll_event_reset_fd_at (gint i, gint events)
 {
-       struct epoll_event *epoll_event;
-
-       g_assert (list);
-
-       epoll_event = &epoll_events [i];
-       g_assert (epoll_event);
-
-       g_assert (fd == epoll_event->data.fd);
-
-       if (*list && (epoll_event->events & (EPOLLIN | EPOLLERR | EPOLLHUP)) != 0) {
-               MonoSocketAsyncResult *io_event = get_sockares_for_event (list, MONO_POLLIN);
-               if (io_event)
-                       mono_threadpool_ms_enqueue_work_item (((MonoObject*) io_event)->vtable->domain, (MonoObject*) io_event);
-       }
-       if (*list && (epoll_event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)) != 0) {
-               MonoSocketAsyncResult *io_event = get_sockares_for_event (list, MONO_POLLOUT);
-               if (io_event)
-                       mono_threadpool_ms_enqueue_work_item (((MonoObject*) io_event)->vtable->domain, (MonoObject*) io_event);
-       }
-
-       if (*list) {
-               gint events = get_events (*list);
-
-               epoll_event->events = ((events & MONO_POLLOUT) ? EPOLLOUT : 0) | ((events & MONO_POLLIN) ? EPOLLIN : 0);
-               if (epoll_ctl (epoll_fd, EPOLL_CTL_MOD, fd, epoll_event) == -1) {
-                       if (epoll_ctl (epoll_fd, EPOLL_CTL_ADD, fd, epoll_event) == -1)
-                               g_warning ("epoll_event_create_sockares_at: epoll_ctl () failed, error (%d) %s", errno, g_strerror (errno));
-               }
+       if (events == 0) {
+               if (epoll_ctl (epoll_fd, EPOLL_CTL_DEL, epoll_events [i].data.fd, &epoll_events [i]) == -1)
+                       g_warning ("epoll_event_reset_fd_at: epoll_ctl (EPOLL_CTL_DEL) failed, error (%d) %s", errno, g_strerror (errno));
        } else {
-               epoll_ctl (epoll_fd, EPOLL_CTL_DEL, fd, epoll_event);
-       }
+               epoll_events [i].events = ((events & MONO_POLLOUT) ? EPOLLOUT : 0)
+                                           | ((events & MONO_POLLIN) ? EPOLLIN : 0);
 
-       return TRUE;
+               if (epoll_ctl (epoll_fd, EPOLL_CTL_MOD, epoll_events [i].data.fd, &epoll_events [i]) == -1)
+                       g_warning ("epoll_event_get_ioares_at: epoll_ctl (EPOLL_CTL_MOD) failed, error (%d) %s", errno, g_strerror (errno));
+       }
 }
 
 static ThreadPoolIOBackend backend_epoll = {
@@ -145,9 +127,9 @@ static ThreadPoolIOBackend backend_epoll = {
        .cleanup = epoll_cleanup,
        .update_add = epoll_update_add,
        .event_wait = epoll_event_wait,
-       .event_max = epoll_event_max,
-       .event_fd_at = epoll_event_fd_at,
-       .event_create_sockares_at = epoll_event_create_sockares_at,
+       .event_get_fd_max = epoll_event_get_fd_max,
+       .event_get_fd_at = epoll_event_get_fd_at,
+       .event_reset_fd_at = epoll_event_reset_fd_at,
 };
 
 #endif
index f6afe7f71a8d603f67acb767f870331a4ade7375..26113bdd7a6785a74b1fa57457fff22ec308bb3b 100644 (file)
@@ -46,14 +46,14 @@ kqueue_cleanup (void)
 }
 
 static void
-kqueue_update_add (ThreadPoolIOUpdate *update)
+kqueue_update_add (gint fd, gint events, gboolean is_new)
 {
        struct kevent event;
 
-       if ((update->events & MONO_POLLIN) != 0)
-               EV_SET (&event, update->fd, EVFILT_READ, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
-       if ((update->events & MONO_POLLOUT) != 0)
-               EV_SET (&event, update->fd, EVFILT_WRITE, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
+       if ((events & MONO_POLLIN) != 0)
+               EV_SET (&event, fd, EVFILT_READ, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
+       if ((events & MONO_POLLOUT) != 0)
+               EV_SET (&event, fd, EVFILT_WRITE, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
 
        if (kevent (kqueue_fd, &event, 1, NULL, 0, NULL) == -1)
                g_warning ("kqueue_update_add: kevent(update) failed, error (%d) %s", errno, g_strerror (errno));
@@ -68,7 +68,7 @@ kqueue_event_wait (void)
        if (ready == -1) {
                switch (errno) {
                case EINTR:
-                       check_for_interruption_critical ();
+                       mono_thread_internal_check_for_interruption_critical (mono_thread_internal_current ());
                        ready = 0;
                        break;
                default:
@@ -80,56 +80,38 @@ kqueue_event_wait (void)
        return ready;
 }
 
-static inline gint
-kqueue_event_fd_at (guint i)
+static gint
+kqueue_event_get_fd_at (gint i, gint *events)
 {
+       g_assert (events);
+
+       *events = ((kqueue_events [i].filter == EVFILT_READ || (kqueue_events [i].flags & EV_ERROR) != 0) ? MONO_POLLIN : 0)
+                   | ((kqueue_events [i].filter == EVFILT_WRITE || (kqueue_events [i].flags & EV_ERROR) != 0) ? MONO_POLLOUT : 0);
+
        return kqueue_events [i].ident;
 }
 
 static gint
-kqueue_event_max (void)
+kqueue_event_get_fd_max (void)
 {
        return KQUEUE_NEVENTS;
 }
 
-static gboolean
-kqueue_event_create_sockares_at (guint i, gint fd, MonoMList **list)
+static void
+kqueue_event_reset_fd_at (gint i, gint events)
 {
-       struct kevent *kqueue_event;
-
-       g_assert (list);
-
-       kqueue_event = &kqueue_events [i];
-       g_assert (kqueue_event);
-
-       g_assert (fd == kqueue_event->ident);
-
-       if (*list && (kqueue_event->filter == EVFILT_READ || (kqueue_event->flags & EV_ERROR) != 0)) {
-               MonoSocketAsyncResult *io_event = get_sockares_for_event (list, MONO_POLLIN);
-               if (io_event)
-                       mono_threadpool_ms_enqueue_work_item (((MonoObject*) io_event)->vtable->domain, (MonoObject*) io_event);
-       }
-       if (*list && (kqueue_event->filter == EVFILT_WRITE || (kqueue_event->flags & EV_ERROR) != 0)) {
-               MonoSocketAsyncResult *io_event = get_sockares_for_event (list, MONO_POLLOUT);
-               if (io_event)
-                       mono_threadpool_ms_enqueue_work_item (((MonoObject*) io_event)->vtable->domain, (MonoObject*) io_event);
-       }
-
-       if (*list) {
-               gint events = get_events (*list);
-               if (kqueue_event->filter == EVFILT_READ && (events & MONO_POLLIN) != 0) {
-                       EV_SET (kqueue_event, fd, EVFILT_READ, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
-                       if (kevent (kqueue_fd, kqueue_event, 1, NULL, 0, NULL) == -1)
-                               g_warning ("kqueue_event_create_sockares_at: kevent (read) failed, error (%d) %s", errno, g_strerror (errno));
+       if (kqueue_events [i].filter == EVFILT_READ && (events & MONO_POLLIN) != 0) {
+               EV_SET (&kqueue_events [i], kqueue_events [i].ident, EVFILT_READ, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
+               if (kevent (kqueue_fd, &kqueue_events [i], 1, NULL, 0, NULL) == -1) {
+                       g_warning ("kqueue_event_reset_fd_at: kevent (read) failed, error (%d) %s", errno, g_strerror (errno));
                }
-               if (kqueue_event->filter == EVFILT_WRITE && (events & MONO_POLLOUT) != 0) {
-                       EV_SET (kqueue_event, fd, EVFILT_WRITE, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
-                       if (kevent (kqueue_fd, kqueue_event, 1, NULL, 0, NULL) == -1)
-                               g_warning ("kqueue_event_create_sockares_at: kevent (write) failed, error (%d) %s", errno, g_strerror (errno));
+       }
+       if (kqueue_events [i].filter == EVFILT_WRITE && (events & MONO_POLLOUT) != 0) {
+               EV_SET (&kqueue_events [i], kqueue_events [i].ident, EVFILT_WRITE, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
+               if (kevent (kqueue_fd, &kqueue_events [i], 1, NULL, 0, NULL) == -1) {
+                       g_warning ("kqueue_event_reset_fd_at: kevent (write) failed, error (%d) %s", errno, g_strerror (errno));
                }
        }
-
-       return TRUE;
 }
 
 static ThreadPoolIOBackend backend_kqueue = {
@@ -137,9 +119,9 @@ static ThreadPoolIOBackend backend_kqueue = {
        .cleanup = kqueue_cleanup,
        .update_add = kqueue_update_add,
        .event_wait = kqueue_event_wait,
-       .event_max = kqueue_event_max,
-       .event_fd_at = kqueue_event_fd_at,
-       .event_create_sockares_at = kqueue_event_create_sockares_at,
+       .event_get_fd_max = kqueue_event_get_fd_max,
+       .event_get_fd_at = kqueue_event_get_fd_at,
+       .event_reset_fd_at = kqueue_event_reset_fd_at,
 };
 
 #endif
index 7e0e1f42e5a11958598ea887f4fe19acc3e80765..fd423b86c93afa62ca46c8db241c20a5bc1382da 100644 (file)
@@ -68,14 +68,14 @@ poll_mark_bad_fds (mono_pollfd *poll_fds, gint poll_fds_size)
 }
 
 static void
-poll_update_add (ThreadPoolIOUpdate *update)
+poll_update_add (gint fd, gint events, gboolean is_new)
 {
        gboolean found = FALSE;
        gint j, k;
 
        for (j = 1; j < poll_fds_size; ++j) {
                mono_pollfd *poll_fd = poll_fds + j;
-               if (poll_fd->fd == update->fd) {
+               if (poll_fd->fd == fd) {
                        found = TRUE;
                        break;
                }
@@ -96,7 +96,7 @@ poll_update_add (ThreadPoolIOUpdate *update)
                        POLL_INIT_FD (poll_fds + k, -1, 0);
        }
 
-       POLL_INIT_FD (poll_fds + j, update->fd, update->events);
+       POLL_INIT_FD (poll_fds + j, fd, events);
 
        if (j >= poll_fds_size)
                poll_fds_size = j + 1;
@@ -133,7 +133,7 @@ poll_event_wait (void)
 #else
                case WSAEINTR:
 #endif
-                       check_for_interruption_critical ();
+                       mono_thread_internal_check_for_interruption_critical (mono_thread_internal_current ());
                        ready = 0;
                        break;
 #if !defined(HOST_WIN32)
@@ -156,50 +156,32 @@ poll_event_wait (void)
        return ready;
 }
 
-static inline gint
-poll_event_fd_at (guint i)
+static gint
+poll_event_get_fd_at (gint i, gint *events)
 {
-       return poll_fds [i].fd;
+       g_assert (events);
+
+       *events = ((poll_fds [i].revents & (MONO_POLLIN | MONO_POLLERR | MONO_POLLHUP | MONO_POLLNVAL)) ? MONO_POLLIN : 0)
+                   | ((poll_fds [i].revents & (MONO_POLLOUT | MONO_POLLERR | MONO_POLLHUP | MONO_POLLNVAL)) ? MONO_POLLOUT : 0);
+
+       /* if nothing happened on the fd, then just return
+        * an invalid fd number so it is discarded */
+       return poll_fds [i].revents == 0 ? -1 : poll_fds [i].fd;
 }
 
 static gint
-poll_event_max (void)
+poll_event_get_fd_max (void)
 {
        return poll_fds_size;
 }
 
-static gboolean
-poll_event_create_sockares_at (guint i, gint fd, MonoMList **list)
+static void
+poll_event_reset_fd_at (gint i, gint events)
 {
-       mono_pollfd *poll_fd;
-
-       g_assert (list);
+       g_assert (poll_fds [i].fd != -1);
+       g_assert (poll_fds [i].revents != 0);
 
-       poll_fd = &poll_fds [i];
-       g_assert (poll_fd);
-
-       g_assert (fd == poll_fd->fd);
-
-       if (fd == -1 || poll_fd->revents == 0)
-               return FALSE;
-
-       if (*list && (poll_fd->revents & (MONO_POLLIN | MONO_POLLERR | MONO_POLLHUP | MONO_POLLNVAL)) != 0) {
-               MonoSocketAsyncResult *io_event = get_sockares_for_event (list, MONO_POLLIN);
-               if (io_event)
-                       mono_threadpool_ms_enqueue_work_item (((MonoObject*) io_event)->vtable->domain, (MonoObject*) io_event);
-       }
-       if (*list && (poll_fd->revents & (MONO_POLLOUT | MONO_POLLERR | MONO_POLLHUP | MONO_POLLNVAL)) != 0) {
-               MonoSocketAsyncResult *io_event = get_sockares_for_event (list, MONO_POLLOUT);
-               if (io_event)
-                       mono_threadpool_ms_enqueue_work_item (((MonoObject*) io_event)->vtable->domain, (MonoObject*) io_event);
-       }
-
-       if (*list)
-               poll_fd->events = get_events (*list);
-       else
-               POLL_INIT_FD (poll_fd, -1, 0);
-
-       return TRUE;
+       POLL_INIT_FD (&poll_fds [i], events == 0 ? -1 : poll_fds [i].fd, events);
 }
 
 static ThreadPoolIOBackend backend_poll = {
@@ -207,7 +189,7 @@ static ThreadPoolIOBackend backend_poll = {
        .cleanup = poll_cleanup,
        .update_add = poll_update_add,
        .event_wait = poll_event_wait,
-       .event_max = poll_event_max,
-       .event_fd_at = poll_event_fd_at,
-       .event_create_sockares_at = poll_event_create_sockares_at,
+       .event_get_fd_max = poll_event_get_fd_max,
+       .event_get_fd_at = poll_event_get_fd_at,
+       .event_reset_fd_at = poll_event_reset_fd_at,
 };
index 29e86a0debc2c0f45dd556d2d129e730ad40d7e9..71f5bac5f3ef31acf01ed310eba3b0e9dd2c5f7c 100644 (file)
 
 #include <mono/metadata/gc-internal.h>
 #include <mono/metadata/mono-mlist.h>
-#include <mono/metadata/threadpool-internals.h>
 #include <mono/metadata/threadpool-ms.h>
 #include <mono/metadata/threadpool-ms-io.h>
 #include <mono/utils/atomic.h>
 #include <mono/utils/mono-poll.h>
 #include <mono/utils/mono-threads.h>
 
+typedef struct {
+       gboolean (*init) (gint wakeup_pipe_fd);
+       void     (*cleanup) (void);
+       void     (*update_add) (gint fd, gint events, gboolean is_new);
+       gint     (*event_wait) (void);
+       gint     (*event_get_fd_max) (void);
+       gint     (*event_get_fd_at) (gint i, gint *events);
+       void     (*event_reset_fd_at) (gint i, gint events);
+} ThreadPoolIOBackend;
+
+#include "threadpool-ms-io-epoll.c"
+#include "threadpool-ms-io-kqueue.c"
+#include "threadpool-ms-io-poll.c"
+
 /* Keep in sync with System.Net.Sockets.Socket.SocketOperation */
 enum {
        AIO_OP_FIRST,
@@ -50,20 +63,31 @@ enum {
 };
 
 typedef struct {
-       gint fd;
-       gint events;
-       gboolean is_new;
+       MonoSocketAsyncResult *sockares;
 } ThreadPoolIOUpdate;
 
 typedef struct {
-       gboolean (*init) (gint wakeup_pipe_fd);
-       void     (*cleanup) (void);
-       void     (*update_add) (ThreadPoolIOUpdate *update);
-       gint     (*event_wait) (void);
-       gint     (*event_max) (void);
-       gint     (*event_fd_at) (guint i);
-       gboolean (*event_create_sockares_at) (guint i, gint fd, MonoMList **list);
-} ThreadPoolIOBackend;
+       MonoGHashTable *states;
+       mono_mutex_t states_lock;
+
+       ThreadPoolIOBackend backend;
+
+       ThreadPoolIOUpdate *updates;
+       guint updates_size;
+       guint updates_capacity;
+       mono_mutex_t updates_lock;
+
+#if !defined(HOST_WIN32)
+       gint wakeup_pipes [2];
+#else
+       SOCKET wakeup_pipes [2];
+#endif
+} ThreadPoolIO;
+
+static gint32 io_status = STATUS_NOT_INITIALIZED;
+static gint32 io_thread_status = STATUS_NOT_INITIALIZED;
+
+static ThreadPoolIO* threadpool_io;
 
 static int
 get_events_from_sockares (MonoSocketAsyncResult *ares)
@@ -123,32 +147,6 @@ get_events (MonoMList *list)
        return events;
 }
 
-#include "threadpool-ms-io-epoll.c"
-#include "threadpool-ms-io-kqueue.c"
-#include "threadpool-ms-io-poll.c"
-
-typedef struct {
-       MonoGHashTable *states;
-       mono_mutex_t states_lock;
-
-       ThreadPoolIOBackend backend;
-
-       ThreadPoolIOUpdate *updates;
-       guint updates_size;
-       mono_mutex_t updates_lock;
-
-#if !defined(HOST_WIN32)
-       gint wakeup_pipes [2];
-#else
-       SOCKET wakeup_pipes [2];
-#endif
-} ThreadPoolIO;
-
-static gint32 io_status = STATUS_NOT_INITIALIZED;
-static gint32 io_thread_status = STATUS_NOT_INITIALIZED;
-
-static ThreadPoolIO* threadpool_io;
-
 static void
 selector_thread_wakeup (void)
 {
@@ -215,17 +213,41 @@ selector_thread (gpointer data)
                guint max;
                gint ready = 0;
 
-               mono_gc_set_skip_thread (TRUE);
-
+               mono_mutex_lock (&threadpool_io->states_lock);
                mono_mutex_lock (&threadpool_io->updates_lock);
+
                for (i = 0; i < threadpool_io->updates_size; ++i) {
-                       threadpool_io->backend.update_add (&threadpool_io->updates [i]);
+                       ThreadPoolIOUpdate *update;
+                       MonoMList *list;
+
+                       update = &threadpool_io->updates [i];
+
+                       g_assert (update->sockares);
+
+                       list = mono_g_hash_table_lookup (threadpool_io->states, update->sockares->handle);
+                       list = mono_mlist_append (list, (MonoObject*) update->sockares);
+                       mono_g_hash_table_replace (threadpool_io->states, update->sockares->handle, list);
+
+                       threadpool_io->backend.update_add (GPOINTER_TO_INT (update->sockares->handle), get_events (list), mono_mlist_next (list) == NULL);
                }
                if (threadpool_io->updates_size > 0) {
+                       ThreadPoolIOUpdate *updates_old;
+
                        threadpool_io->updates_size = 0;
-                       threadpool_io->updates = g_renew (ThreadPoolIOUpdate, threadpool_io->updates, threadpool_io->updates_size);
+                       threadpool_io->updates_capacity = 128;
+
+                       updates_old = threadpool_io->updates;
+
+                       threadpool_io->updates = mono_gc_alloc_fixed (sizeof (ThreadPoolIOUpdate) * threadpool_io->updates_capacity, MONO_GC_DESCRIPTOR_NULL);
+                       g_assert (threadpool_io->updates);
+
+                       mono_gc_free_fixed (updates_old);
                }
+
                mono_mutex_unlock (&threadpool_io->updates_lock);
+               mono_mutex_unlock (&threadpool_io->states_lock);
+
+               mono_gc_set_skip_thread (TRUE);
 
                ready = threadpool_io->backend.event_wait ();
 
@@ -234,35 +256,44 @@ selector_thread (gpointer data)
                if (ready == -1 || mono_runtime_is_shutting_down ())
                        break;
 
-               max = threadpool_io->backend.event_max ();
+               max = threadpool_io->backend.event_get_fd_max ();
 
                mono_mutex_lock (&threadpool_io->states_lock);
+
                for (i = 0; i < max && ready > 0; ++i) {
-                       MonoMList *list;
-                       gboolean valid_fd;
-                       gint fd;
+                       gint events;
+                       gint fd = threadpool_io->backend.event_get_fd_at (i, &events);
 
-                       fd = threadpool_io->backend.event_fd_at (i);
+                       if (fd == -1)
+                               continue;
 
                        if (fd == threadpool_io->wakeup_pipes [0]) {
                                selector_thread_wakeup_drain_pipes ();
-                               ready -= 1;
-                               continue;
+                       } else {
+                               MonoMList *list = mono_g_hash_table_lookup (threadpool_io->states, GINT_TO_POINTER (fd));
+
+                               if (list && (events & MONO_POLLIN) != 0) {
+                                       MonoSocketAsyncResult *sockares = get_sockares_for_event (&list, MONO_POLLIN);
+                                       if (sockares)
+                                               mono_threadpool_ms_enqueue_work_item (((MonoObject*) sockares)->vtable->domain, (MonoObject*) sockares);
+                               }
+                               if (list && (events & MONO_POLLOUT) != 0) {
+                                       MonoSocketAsyncResult *sockares = get_sockares_for_event (&list, MONO_POLLOUT);
+                                       if (sockares)
+                                               mono_threadpool_ms_enqueue_work_item (((MonoObject*) sockares)->vtable->domain, (MonoObject*) sockares);
+                               }
+
+                               if (!list)
+                                       mono_g_hash_table_remove (threadpool_io->states, GINT_TO_POINTER (fd));
+                               else
+                                       mono_g_hash_table_replace (threadpool_io->states, GINT_TO_POINTER (fd), list);
+
+                               threadpool_io->backend.event_reset_fd_at (i, get_events (list));
                        }
 
-                       list = mono_g_hash_table_lookup (threadpool_io->states, GINT_TO_POINTER (fd));
-
-                       valid_fd = threadpool_io->backend.event_create_sockares_at (i, fd, &list);
-                       if (!valid_fd)
-                               continue;
-
-                       if (list)
-                               mono_g_hash_table_replace (threadpool_io->states, GINT_TO_POINTER (fd), list);
-                       else
-                               mono_g_hash_table_remove (threadpool_io->states, GINT_TO_POINTER (fd));
-
                        ready -= 1;
                }
+
                mono_mutex_unlock (&threadpool_io->states_lock);
        }
 
@@ -348,6 +379,7 @@ ensure_initialized (void)
 
        threadpool_io->updates = NULL;
        threadpool_io->updates_size = 0;
+       threadpool_io->updates_capacity = 0;
        mono_mutex_init (&threadpool_io->updates_lock);
 
 #if defined(HAVE_EPOLL)
@@ -404,7 +436,8 @@ ensure_cleanedup (void)
        mono_g_hash_table_destroy (threadpool_io->states);
        mono_mutex_destroy (&threadpool_io->states_lock);
 
-       g_free (threadpool_io->updates);
+       if (threadpool_io->updates)
+               mono_gc_free_fixed (threadpool_io->updates);
        mono_mutex_destroy (&threadpool_io->updates_lock);
 
        threadpool_io->backend.cleanup ();
@@ -439,12 +472,12 @@ is_socket_async_callback (MonoImage *system_image, MonoClass *class)
 static gboolean
 is_async_read_handler (MonoImage *system_image, MonoClass *class)
 {
-       MonoClass *process_class = NULL;
+       MonoClass *async_read_handler_class = NULL;
 
-       process_class = mono_class_from_name (system_image, "System.Diagnostics", "Process");
-       g_assert (process_class);
+       async_read_handler_class = mono_class_from_name (system_image, "System.Diagnostics", "Process/AsyncReadHandler");
+       g_assert (async_read_handler_class);
 
-       return class->nested_in && class->nested_in == process_class && strcmp (class->name, "AsyncReadHandler") == 0;
+       return class == async_read_handler_class;
 }
 
 gboolean
@@ -477,10 +510,6 @@ MonoAsyncResult *
 mono_threadpool_ms_io_add (MonoAsyncResult *ares, MonoSocketAsyncResult *sockares)
 {
        ThreadPoolIOUpdate *update;
-       MonoMList *list;
-       gboolean is_new;
-       gint events;
-       gint fd;
 
        g_assert (ares);
        g_assert (sockares);
@@ -492,29 +521,34 @@ mono_threadpool_ms_io_add (MonoAsyncResult *ares, MonoSocketAsyncResult *sockare
 
        MONO_OBJECT_SETREF (sockares, ares, ares);
 
-       fd = GPOINTER_TO_INT (sockares->handle);
+       mono_mutex_lock (&threadpool_io->updates_lock);
 
-       mono_mutex_lock (&threadpool_io->states_lock);
-       g_assert (threadpool_io->states);
+       threadpool_io->updates_size += 1;
+       if (threadpool_io->updates_size > threadpool_io->updates_capacity) {
+               ThreadPoolIOUpdate *updates_new, *updates_old;
+               gint updates_new_capacity, updates_old_capacity;
 
-       list = mono_g_hash_table_lookup (threadpool_io->states, GINT_TO_POINTER (fd));
-       is_new = list == NULL;
-       list = mono_mlist_append (list, (MonoObject*) sockares);
-       mono_g_hash_table_replace (threadpool_io->states, sockares->handle, list);
+               updates_old_capacity = threadpool_io->updates_capacity;
+               updates_new_capacity = updates_old_capacity + 128;
 
-       events = get_events (list);
+               updates_old = threadpool_io->updates;
+               updates_new = mono_gc_alloc_fixed (sizeof (ThreadPoolIOUpdate) * updates_new_capacity, MONO_GC_DESCRIPTOR_NULL);
+               g_assert (updates_new);
 
-       mono_mutex_lock (&threadpool_io->updates_lock);
-       threadpool_io->updates_size += 1;
-       threadpool_io->updates = g_renew (ThreadPoolIOUpdate, threadpool_io->updates, threadpool_io->updates_size);
+               if (updates_old)
+                       memcpy (updates_new, updates_old, sizeof (ThreadPoolIOUpdate) * updates_old_capacity);
+
+               threadpool_io->updates = updates_new;
+               threadpool_io->updates_capacity = updates_new_capacity;
+
+               if (updates_old)
+                       mono_gc_free_fixed (updates_old);
+       }
 
        update = &threadpool_io->updates [threadpool_io->updates_size - 1];
-       update->fd = fd;
-       update->events = events;
-       update->is_new = is_new;
-       mono_mutex_unlock (&threadpool_io->updates_lock);
+       update->sockares = sockares;
 
-       mono_mutex_unlock (&threadpool_io->states_lock);
+       mono_mutex_unlock (&threadpool_io->updates_lock);
 
        selector_thread_wakeup ();
 
@@ -525,36 +559,53 @@ void
 mono_threadpool_ms_io_remove_socket (int fd)
 {
        MonoMList *list;
+       gint i;
 
        if (io_status != STATUS_INITIALIZED)
                return;
 
        mono_mutex_lock (&threadpool_io->states_lock);
+       mono_mutex_lock (&threadpool_io->updates_lock);
+
        g_assert (threadpool_io->states);
+
        list = mono_g_hash_table_lookup (threadpool_io->states, GINT_TO_POINTER (fd));
        if (list)
                mono_g_hash_table_remove (threadpool_io->states, GINT_TO_POINTER (fd));
+
+       for (i = 0; i < threadpool_io->updates_size; ++i) {
+               ThreadPoolIOUpdate *update = &threadpool_io->updates [i];
+
+               g_assert (update->sockares);
+
+               if (GPOINTER_TO_INT (update->sockares->handle) == fd) {
+                       if (i < threadpool_io->updates_size - 1)
+                               memmove (threadpool_io->updates + i, threadpool_io->updates + i + 1, sizeof (ThreadPoolIOUpdate) * threadpool_io->updates_size - i - 1);
+                       memset (threadpool_io->updates + threadpool_io->updates_size - 1, 0, sizeof (ThreadPoolIOUpdate));
+
+                       threadpool_io->updates_size -= 1;
+               }
+       }
+
+       mono_mutex_unlock (&threadpool_io->updates_lock);
        mono_mutex_unlock (&threadpool_io->states_lock);
 
-       while (list) {
-               MonoSocketAsyncResult *sockares, *sockares2;
+       for (; list; list = mono_mlist_remove_item (list, list)) {
+               MonoSocketAsyncResult *sockares = (MonoSocketAsyncResult*) mono_mlist_get_data (list);
 
-               sockares = (MonoSocketAsyncResult*) mono_mlist_get_data (list);
-               if (sockares->operation == AIO_OP_RECEIVE)
+               if (!sockares)
+                       continue;
+
+               switch (sockares->operation) {
+               case AIO_OP_RECEIVE:
                        sockares->operation = AIO_OP_RECV_JUST_CALLBACK;
-               else if (sockares->operation == AIO_OP_SEND)
+                       break;
+               case AIO_OP_SEND:
                        sockares->operation = AIO_OP_SEND_JUST_CALLBACK;
-
-               sockares2 = get_sockares_for_event (&list, MONO_POLLIN);
-               if (sockares2)
-                       mono_threadpool_ms_enqueue_work_item (((MonoObject*) sockares2)->vtable->domain, (MonoObject*) sockares2);
-
-               if (!list)
                        break;
+               }
 
-               sockares2 = get_sockares_for_event (&list, MONO_POLLOUT);
-               if (sockares2)
-                       mono_threadpool_ms_enqueue_work_item (((MonoObject*) sockares2)->vtable->domain, (MonoObject*) sockares2);
+               mono_threadpool_ms_enqueue_work_item (((MonoObject*) sockares)->vtable->domain, (MonoObject*) sockares);
        }
 }
 
@@ -579,11 +630,46 @@ remove_sockstate_for_domain (gpointer key, gpointer value, gpointer user_data)
 void
 mono_threadpool_ms_io_remove_domain_jobs (MonoDomain *domain)
 {
-       if (io_status == STATUS_INITIALIZED) {
-               mono_mutex_lock (&threadpool_io->states_lock);
-               mono_g_hash_table_foreach_remove (threadpool_io->states, remove_sockstate_for_domain, domain);
-               mono_mutex_unlock (&threadpool_io->states_lock);
+       gint i;
+
+       if (io_status != STATUS_INITIALIZED)
+               return;
+
+       mono_mutex_lock (&threadpool_io->states_lock);
+       mono_mutex_lock (&threadpool_io->updates_lock);
+
+       mono_g_hash_table_foreach_remove (threadpool_io->states, remove_sockstate_for_domain, domain);
+
+       for (i = 0; i < threadpool_io->updates_size; ++i) {
+               ThreadPoolIOUpdate *update = &threadpool_io->updates [i];
+
+               g_assert (update->sockares);
+
+               if (mono_object_domain (update->sockares) == domain) {
+                       if (i < threadpool_io->updates_size - 1)
+                               memmove (threadpool_io->updates + i, threadpool_io->updates + i + 1, sizeof (ThreadPoolIOUpdate) * threadpool_io->updates_size - i - 1);
+                       memset (threadpool_io->updates + threadpool_io->updates_size - 1, 0, sizeof (ThreadPoolIOUpdate));
+
+                       threadpool_io->updates_size -= 1;
+               }
        }
+
+       mono_mutex_unlock (&threadpool_io->updates_lock);
+       mono_mutex_unlock (&threadpool_io->states_lock);
+}
+
+void
+icall_append_io_job (MonoObject *target, MonoSocketAsyncResult *state)
+{
+       MonoAsyncResult *ares;
+
+       /* Don't call mono_async_result_new() to avoid capturing the context */
+       ares = (MonoAsyncResult *) mono_object_new (mono_domain_get (), mono_defaults.asyncresult_class);
+       MONO_OBJECT_SETREF (ares, async_delegate, target);
+       MONO_OBJECT_SETREF (ares, async_state, state);
+
+       mono_threadpool_ms_io_add (ares, state);
+       return;
 }
 
 #else
@@ -618,4 +704,10 @@ mono_threadpool_ms_io_remove_domain_jobs (MonoDomain *domain)
        g_assert_not_reached ();
 }
 
+void
+icall_append_io_job (MonoObject *target, MonoSocketAsyncResult *state)
+{
+       g_assert_not_reached ();
+}
+
 #endif
\ No newline at end of file
index e8d7f5f2b179db68bbda59077e5958ba00b67525..4a73e0ee6883b43f063b5b8d78cda529d23ed0bd 100644 (file)
@@ -19,4 +19,7 @@ mono_threadpool_ms_io_remove_domain_jobs (MonoDomain *domain);
 void
 mono_threadpool_ms_io_cleanup (void);
 
+void
+icall_append_io_job (MonoObject *target, MonoSocketAsyncResult *state);
+
 #endif /* _MONO_THREADPOOL_MS_IO_H_ */
index 6d8850767ce61548bf9d693dcfb151362080d784..b8ba32c85be9706709af8cead51f93d6ad9ef5a1 100644 (file)
@@ -32,7 +32,6 @@
 #include <mono/metadata/object-internals.h>
 #include <mono/metadata/threadpool-ms.h>
 #include <mono/metadata/threadpool-ms-io.h>
-#include <mono/metadata/threadpool-internals.h>
 #include <mono/utils/atomic.h>
 #include <mono/utils/mono-compiler.h>
 #include <mono/utils/mono-complex.h>
@@ -583,7 +582,7 @@ worker_thread (gpointer data)
        g_assert (status >= STATUS_INITIALIZED);
 
        if (!threadpool_wait_callback_class)
-               threadpool_wait_callback_class = mono_class_from_name (mono_defaults.corlib, "System.Threading.Microsoft", "_ThreadPoolWaitCallback");
+               threadpool_wait_callback_class = mono_class_from_name (mono_defaults.corlib, "System.Threading", "_ThreadPoolWaitCallback");
        g_assert (threadpool_wait_callback_class);
 
        if (!perform_wait_callback_method)
@@ -649,7 +648,7 @@ worker_thread (gpointer data)
                        MonoObject *exc = NULL;
                        MonoObject *res = mono_runtime_invoke (perform_wait_callback_method, NULL, NULL, &exc);
                        if (exc)
-                               mono_internal_thread_unhandled_exception (exc);
+                               mono_thread_internal_unhandled_exception (exc);
                        else if (res && *(MonoBoolean*) mono_object_unbox (res) == FALSE)
                                retire = TRUE;
 
@@ -1369,17 +1368,19 @@ mono_threadpool_ms_remove_domain_jobs (MonoDomain *domain, int timeout)
 void
 mono_threadpool_ms_suspend (void)
 {
-       threadpool->suspended = TRUE;
+       if (threadpool)
+               threadpool->suspended = TRUE;
 }
 
 void
 mono_threadpool_ms_resume (void)
 {
-       threadpool->suspended = FALSE;
+       if (threadpool)
+               threadpool->suspended = FALSE;
 }
 
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_GetAvailableThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads)
+ves_icall_System_Threading_ThreadPool_GetAvailableThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads)
 {
        if (!worker_threads || !completion_port_threads)
                return;
@@ -1391,7 +1392,7 @@ ves_icall_System_Threading_Microsoft_ThreadPool_GetAvailableThreadsNative (gint3
 }
 
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_GetMinThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads)
+ves_icall_System_Threading_ThreadPool_GetMinThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads)
 {
        if (!worker_threads || !completion_port_threads)
                return;
@@ -1403,7 +1404,7 @@ ves_icall_System_Threading_Microsoft_ThreadPool_GetMinThreadsNative (gint32 *wor
 }
 
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_GetMaxThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads)
+ves_icall_System_Threading_ThreadPool_GetMaxThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads)
 {
        if (!worker_threads || !completion_port_threads)
                return;
@@ -1415,7 +1416,7 @@ ves_icall_System_Threading_Microsoft_ThreadPool_GetMaxThreadsNative (gint32 *wor
 }
 
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_SetMinThreadsNative (gint32 worker_threads, gint32 completion_port_threads)
+ves_icall_System_Threading_ThreadPool_SetMinThreadsNative (gint32 worker_threads, gint32 completion_port_threads)
 {
        ensure_initialized (NULL);
 
@@ -1431,7 +1432,7 @@ ves_icall_System_Threading_Microsoft_ThreadPool_SetMinThreadsNative (gint32 work
 }
 
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_SetMaxThreadsNative (gint32 worker_threads, gint32 completion_port_threads)
+ves_icall_System_Threading_ThreadPool_SetMaxThreadsNative (gint32 worker_threads, gint32 completion_port_threads)
 {
        gint cpu_count = mono_cpu_count ();
 
@@ -1449,13 +1450,13 @@ ves_icall_System_Threading_Microsoft_ThreadPool_SetMaxThreadsNative (gint32 work
 }
 
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_InitializeVMTp (MonoBoolean *enable_worker_tracking)
+ves_icall_System_Threading_ThreadPool_InitializeVMTp (MonoBoolean *enable_worker_tracking)
 {
        ensure_initialized (enable_worker_tracking);
 }
 
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemComplete (void)
+ves_icall_System_Threading_ThreadPool_NotifyWorkItemComplete (void)
 {
        ThreadPoolCounter counter;
 
@@ -1472,7 +1473,7 @@ ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemComplete (void)
 }
 
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemProgressNative (void)
+ves_icall_System_Threading_ThreadPool_NotifyWorkItemProgressNative (void)
 {
        heuristic_notify_work_completed ();
 
@@ -1481,20 +1482,20 @@ ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemProgressNative (vo
 }
 
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_ReportThreadStatus (MonoBoolean is_working)
+ves_icall_System_Threading_ThreadPool_ReportThreadStatus (MonoBoolean is_working)
 {
        // TODO
        mono_raise_exception (mono_get_exception_not_implemented (NULL));
 }
 
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_RequestWorkerThread (void)
+ves_icall_System_Threading_ThreadPool_RequestWorkerThread (void)
 {
        return worker_request (mono_domain_get ());
 }
 
 MonoBoolean G_GNUC_UNUSED
-ves_icall_System_Threading_Microsoft_ThreadPool_PostQueuedCompletionStatus (MonoNativeOverlapped *native_overlapped)
+ves_icall_System_Threading_ThreadPool_PostQueuedCompletionStatus (MonoNativeOverlapped *native_overlapped)
 {
        /* This copy the behavior of the current Mono implementation */
        mono_raise_exception (mono_get_exception_not_implemented (NULL));
@@ -1502,14 +1503,14 @@ ves_icall_System_Threading_Microsoft_ThreadPool_PostQueuedCompletionStatus (Mono
 }
 
 MonoBoolean G_GNUC_UNUSED
-ves_icall_System_Threading_Microsoft_ThreadPool_BindIOCompletionCallbackNative (gpointer file_handle)
+ves_icall_System_Threading_ThreadPool_BindIOCompletionCallbackNative (gpointer file_handle)
 {
        /* This copy the behavior of the current Mono implementation */
        return TRUE;
 }
 
 MonoBoolean G_GNUC_UNUSED
-ves_icall_System_Threading_Microsoft_ThreadPool_IsThreadPoolHosted (void)
+ves_icall_System_Threading_ThreadPool_IsThreadPoolHosted (void)
 {
        return FALSE;
 }
index f576293e229d3ca9e2134368d37cf0421cde707b..fa611ee8302deaf40d6e7407ffd79d4612a3b328 100644 (file)
@@ -5,6 +5,7 @@
 #include <glib.h>
 
 #include <mono/metadata/exception.h>
+#include <mono/metadata/object-internals.h>
 
 #define SMALL_STACK (sizeof (gpointer) * 32 * 1024)
 
@@ -18,18 +19,6 @@ enum {
 
 typedef struct _MonoNativeOverlapped MonoNativeOverlapped;
 
-static void G_GNUC_UNUSED
-mono_threadpool_ms_init (void)
-{
-       /* Initialization is done lazily */
-}
-
-static void G_GNUC_UNUSED
-mono_threadpool_ms_init_tls (void)
-{
-       /* The WSQ is now implemented in managed */
-}
-
 void
 mono_threadpool_ms_cleanup (void);
 
@@ -46,42 +35,35 @@ mono_threadpool_ms_suspend (void);
 void
 mono_threadpool_ms_resume (void);
 
-static gboolean G_GNUC_UNUSED
-mono_threadpool_ms_is_queue_array (MonoArray *arr)
-{
-       /* The queue is in managed code */
-       return FALSE;
-}
-
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_GetAvailableThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
+ves_icall_System_Threading_ThreadPool_GetAvailableThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_GetMinThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
+ves_icall_System_Threading_ThreadPool_GetMinThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_GetMaxThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
+ves_icall_System_Threading_ThreadPool_GetMaxThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_SetMinThreadsNative (gint32 worker_threads, gint32 completion_port_threads);
+ves_icall_System_Threading_ThreadPool_SetMinThreadsNative (gint32 worker_threads, gint32 completion_port_threads);
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_SetMaxThreadsNative (gint32 worker_threads, gint32 completion_port_threads);
+ves_icall_System_Threading_ThreadPool_SetMaxThreadsNative (gint32 worker_threads, gint32 completion_port_threads);
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_InitializeVMTp (MonoBoolean *enable_worker_tracking);
+ves_icall_System_Threading_ThreadPool_InitializeVMTp (MonoBoolean *enable_worker_tracking);
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemComplete (void);
+ves_icall_System_Threading_ThreadPool_NotifyWorkItemComplete (void);
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemProgressNative (void);
+ves_icall_System_Threading_ThreadPool_NotifyWorkItemProgressNative (void);
 void
-ves_icall_System_Threading_Microsoft_ThreadPool_ReportThreadStatus (MonoBoolean is_working);
+ves_icall_System_Threading_ThreadPool_ReportThreadStatus (MonoBoolean is_working);
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_RequestWorkerThread (void);
+ves_icall_System_Threading_ThreadPool_RequestWorkerThread (void);
 
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_PostQueuedCompletionStatus (MonoNativeOverlapped *native_overlapped);
+ves_icall_System_Threading_ThreadPool_PostQueuedCompletionStatus (MonoNativeOverlapped *native_overlapped);
 
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_BindIOCompletionCallbackNative (gpointer file_handle);
+ves_icall_System_Threading_ThreadPool_BindIOCompletionCallbackNative (gpointer file_handle);
 
 MonoBoolean
-ves_icall_System_Threading_Microsoft_ThreadPool_IsThreadPoolHosted (void);
+ves_icall_System_Threading_ThreadPool_IsThreadPoolHosted (void);
 
 /* Internals */
 
diff --git a/mono/metadata/threadpool.c b/mono/metadata/threadpool.c
deleted file mode 100644 (file)
index c901d40..0000000
+++ /dev/null
@@ -1,1864 +0,0 @@
-/*
- * threadpool.c: global thread pool
- *
- * Authors:
- *   Dietmar Maurer (dietmar@ximian.com)
- *   Gonzalo Paniagua Javier (gonzalo@ximian.com)
- *
- * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
- * Copyright 2004-2010 Novell, Inc (http://www.novell.com)
- * Copyright 2001 Xamarin Inc (http://www.xamarin.com)
- */
-
-#include <config.h>
-#include <glib.h>
-
-#include <mono/metadata/profiler-private.h>
-#include <mono/metadata/threads.h>
-#include <mono/metadata/threads-types.h>
-#include <mono/metadata/threadpool-internals.h>
-#include <mono/metadata/exception.h>
-#include <mono/metadata/environment.h>
-#include <mono/metadata/mono-config.h>
-#include <mono/metadata/mono-mlist.h>
-#include <mono/metadata/mono-perfcounters.h>
-#include <mono/metadata/socket-io.h>
-#include <mono/metadata/mono-cq.h>
-#include <mono/metadata/mono-wsq.h>
-#include <mono/metadata/mono-ptr-array.h>
-#include <mono/metadata/object-internals.h>
-#include <mono/io-layer/io-layer.h>
-#include <mono/utils/mono-time.h>
-#include <mono/utils/mono-proclib.h>
-#include <mono/utils/mono-semaphore.h>
-#include <mono/utils/atomic.h>
-#include <errno.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <sys/types.h>
-#include <fcntl.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <string.h>
-#include <math.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#include <mono/utils/mono-poll.h>
-#ifdef HAVE_EPOLL
-#include <sys/epoll.h>
-#endif
-#ifdef HAVE_KQUEUE
-#include <sys/event.h>
-#endif
-
-
-#ifndef DISABLE_SOCKETS
-#include "mono/io-layer/socket-wrappers.h"
-#endif
-
-#include "threadpool.h"
-#include "threadpool-ms.h"
-#include "threadpool-ms-io.h"
-
-static gboolean
-use_ms_threadpool (void)
-{
-       static gboolean use_ms_tp = -1;
-       const gchar *mono_threadpool_env;
-       if (use_ms_tp != -1)
-               return use_ms_tp;
-       else if (!(mono_threadpool_env = g_getenv ("MONO_THREADPOOL")))
-               return use_ms_tp = FALSE;
-       else if (strcmp (mono_threadpool_env, "microsoft") == 0)
-               return use_ms_tp = TRUE;
-       else
-               return use_ms_tp = FALSE;
-}
-
-#define THREAD_WANTS_A_BREAK(t) ((t->state & (ThreadState_StopRequested | \
-                                               ThreadState_SuspendRequested)) != 0)
-
-/* DEBUG: prints tp data every 2s */
-#undef DEBUG 
-
-/* mono_thread_pool_init called */
-static volatile int tp_inited;
-
-enum {
-       POLL_BACKEND,
-       EPOLL_BACKEND,
-       KQUEUE_BACKEND
-};
-
-enum {
-       MONITOR_STATE_AWAKE,
-       MONITOR_STATE_FALLING_ASLEEP,
-       MONITOR_STATE_SLEEPING
-};
-
-static SocketIOData socket_io_data;
-
-typedef struct {
-       MonoSemType lock;
-       MonoCQ *queue; /* GC root */
-       MonoSemType new_job;
-       volatile gint waiting; /* threads waiting for a work item */
-
-       /**/
-       volatile gint pool_status; /* 0 -> not initialized, 1 -> initialized, 2 -> cleaning up */
-       /* min, max, n and busy -> Interlocked */
-       volatile gint min_threads;
-       volatile gint max_threads;
-       volatile gint nthreads;
-       volatile gint busy_threads;
-
-       void (*async_invoke) (gpointer data);
-       void *pc_nitems; /* Performance counter for total number of items in added */
-       void *pc_nthreads; /* Performance counter for total number of active threads */
-       /**/
-       volatile gint destroy_thread;
-#if DEBUG
-       volatile gint32 njobs;
-#endif
-       volatile gint32 nexecuted;
-       gboolean is_io;
-} ThreadPool;
-
-static ThreadPool async_tp;
-static ThreadPool async_io_tp;
-
-static void async_invoke_thread (gpointer data);
-static MonoObject *mono_async_invoke (ThreadPool *tp, MonoAsyncResult *ares);
-static void threadpool_free_queue (ThreadPool *tp);
-static void threadpool_append_job (ThreadPool *tp, MonoObject *ar);
-static void threadpool_append_jobs (ThreadPool *tp, MonoObject **jobs, gint njobs);
-static void threadpool_init (ThreadPool *tp, int min_threads, int max_threads, void (*async_invoke) (gpointer));
-static void threadpool_start_idle_threads (ThreadPool *tp);
-static void threadpool_kill_idle_threads (ThreadPool *tp);
-static gboolean threadpool_start_thread (ThreadPool *tp);
-static void threadpool_kill_thread (ThreadPool *tp);
-static void monitor_thread (gpointer data);
-static int get_event_from_state (MonoSocketAsyncResult *state);
-
-static MonoClass *async_call_klass;
-static MonoClass *socket_async_call_klass;
-static MonoClass *process_async_call_klass;
-
-static GPtrArray *threads;
-mono_mutex_t threads_lock;
-static GPtrArray *wsqs;
-mono_mutex_t wsqs_lock;
-static gboolean suspended;
-
-static volatile gint32 monitor_njobs = 0;
-static volatile gint32 monitor_state;
-static MonoSemType monitor_sem;
-static MonoInternalThread *monitor_internal_thread;
-
-/* Hooks */
-static MonoThreadPoolFunc tp_start_func;
-static MonoThreadPoolFunc tp_finish_func;
-static gpointer tp_hooks_user_data;
-static MonoThreadPoolItemFunc tp_item_begin_func;
-static MonoThreadPoolItemFunc tp_item_end_func;
-static gpointer tp_item_user_data;
-
-enum {
-       AIO_OP_FIRST,
-       AIO_OP_ACCEPT = 0,
-       AIO_OP_CONNECT,
-       AIO_OP_RECEIVE,
-       AIO_OP_RECEIVEFROM,
-       AIO_OP_SEND,
-       AIO_OP_SENDTO,
-       AIO_OP_RECV_JUST_CALLBACK,
-       AIO_OP_SEND_JUST_CALLBACK,
-       AIO_OP_READPIPE,
-       AIO_OP_CONSOLE2,
-       AIO_OP_DISCONNECT,
-       AIO_OP_ACCEPTRECEIVE,
-       AIO_OP_RECEIVE_BUFFERS,
-       AIO_OP_SEND_BUFFERS,
-       AIO_OP_LAST
-};
-
-// #include <mono/metadata/tpool-poll.c>
-gpointer tp_poll_init (SocketIOData *data);
-
-#ifdef HAVE_EPOLL
-#include <mono/metadata/tpool-epoll.c>
-#elif defined(USE_KQUEUE_FOR_THREADPOOL)
-#include <mono/metadata/tpool-kqueue.c>
-#endif
-/*
- * Functions to check whenever a class is given system class. We need to cache things in MonoDomain since some of the
- * assemblies can be unloaded.
- */
-
-static gboolean
-is_system_type (MonoDomain *domain, MonoClass *klass)
-{
-       if (domain->system_image == NULL)
-               domain->system_image = mono_image_loaded ("System");
-
-       return klass->image == domain->system_image;
-}
-
-static gboolean
-is_corlib_type (MonoDomain *domain, MonoClass *klass)
-{
-       return klass->image == mono_defaults.corlib;
-}
-
-#define check_type_cached(domain, ASSEMBLY, _class, _namespace, _name, loc) do { \
-       if (*loc) \
-               return *loc == _class; \
-       if (is_##ASSEMBLY##_type (domain, _class) && !strcmp (_name, _class->name) && !strcmp (_namespace, _class->name_space)) { \
-               *loc = _class; \
-               return TRUE; \
-       } \
-       return FALSE; \
-} while (0) \
-
-#define check_corlib_type_cached(domain, _class, _namespace, _name, loc) check_type_cached (domain, corlib, _class, _namespace, _name, loc)
-
-#define check_system_type_cached(domain, _class, _namespace, _name, loc) check_type_cached (domain, system, _class, _namespace, _name, loc)
-
-static gboolean
-is_corlib_asyncresult (MonoDomain *domain, MonoClass *klass)
-{
-       check_corlib_type_cached (domain, klass, "System.Runtime.Remoting.Messaging", "AsyncResult", &domain->corlib_asyncresult_class);
-}
-
-static gboolean
-is_socketasyncresult (MonoDomain *domain, MonoClass *klass)
-{
-       static MonoClass *socket_async_result_klass = NULL;
-       check_system_type_cached (domain, klass, "System.Net.Sockets", "SocketAsyncResult", &socket_async_result_klass);
-}
-
-static gboolean
-is_socketasynccall (MonoDomain *domain, MonoClass *klass)
-{
-       static MonoClass *socket_async_callback_klass = NULL;
-       check_system_type_cached (domain, klass, "System.Net.Sockets", "SocketAsyncCallback", &socket_async_callback_klass);
-}
-
-static gboolean
-is_appdomainunloaded_exception (MonoDomain *domain, MonoClass *klass)
-{
-       check_corlib_type_cached (domain, klass, "System", "AppDomainUnloadedException", &domain->ad_unloaded_ex_class);
-}
-
-static gboolean
-is_sd_process (MonoDomain *domain, MonoClass *klass)
-{
-       check_system_type_cached (domain, klass, "System.Diagnostics", "Process", &domain->process_class);
-}
-
-static gboolean
-is_sdp_asyncreadhandler (MonoDomain *domain, MonoClass *klass)
-{
-
-       return (klass->nested_in &&
-                       is_sd_process (domain, klass->nested_in) &&
-               !strcmp (klass->name, "AsyncReadHandler"));
-}
-
-
-#ifdef DISABLE_SOCKETS
-
-void
-socket_io_cleanup (SocketIOData *data)
-{
-}
-
-static int
-get_event_from_state (MonoSocketAsyncResult *state)
-{
-       g_assert_not_reached ();
-       return -1;
-}
-
-int
-get_events_from_list (MonoMList *list)
-{
-       return 0;
-}
-
-#else
-
-void
-socket_io_cleanup (SocketIOData *data)
-{
-       mono_mutex_lock (&data->io_lock);
-       if (data->inited != 2) {
-               mono_mutex_unlock (&data->io_lock);
-               return;
-       }
-       data->inited = 3;
-       data->shutdown (data->event_data);
-       mono_mutex_unlock (&data->io_lock);
-}
-
-static int
-get_event_from_state (MonoSocketAsyncResult *state)
-{
-       switch (state->operation) {
-       case AIO_OP_ACCEPT:
-       case AIO_OP_RECEIVE:
-       case AIO_OP_RECV_JUST_CALLBACK:
-       case AIO_OP_RECEIVEFROM:
-       case AIO_OP_READPIPE:
-       case AIO_OP_ACCEPTRECEIVE:
-       case AIO_OP_RECEIVE_BUFFERS:
-               return MONO_POLLIN;
-       case AIO_OP_SEND:
-       case AIO_OP_SEND_JUST_CALLBACK:
-       case AIO_OP_SENDTO:
-       case AIO_OP_CONNECT:
-       case AIO_OP_SEND_BUFFERS:
-       case AIO_OP_DISCONNECT:
-               return MONO_POLLOUT;
-       default: /* Should never happen */
-               g_message ("get_event_from_state: unknown value in switch!!!");
-               return 0;
-       }
-}
-
-int
-get_events_from_list (MonoMList *list)
-{
-       MonoSocketAsyncResult *state;
-       int events = 0;
-
-       while (list && (state = (MonoSocketAsyncResult *)mono_mlist_get_data (list))) {
-               events |= get_event_from_state (state);
-               list = mono_mlist_next (list);
-       }
-
-       return events;
-}
-
-#endif /* !DISABLE_SOCKETS */
-
-static void
-threadpool_jobs_inc (MonoObject *obj)
-{
-       if (obj)
-               InterlockedIncrement (&obj->vtable->domain->threadpool_jobs);
-}
-
-static gboolean
-threadpool_jobs_dec (MonoObject *obj)
-{
-       MonoDomain *domain;
-       int remaining_jobs;
-
-       if (obj == NULL)
-               return FALSE;
-
-       domain = obj->vtable->domain;
-       remaining_jobs = InterlockedDecrement (&domain->threadpool_jobs);
-       if (remaining_jobs == 0 && domain->cleanup_semaphore) {
-               ReleaseSemaphore (domain->cleanup_semaphore, 1, NULL);
-               return TRUE;
-       }
-       return FALSE;
-}
-
-MonoObject *
-get_io_event (MonoMList **list, gint event)
-{
-       MonoObject *state;
-       MonoMList *current;
-       MonoMList *prev;
-
-       current = *list;
-       prev = NULL;
-       state = NULL;
-       while (current) {
-               state = mono_mlist_get_data (current);
-               if (get_event_from_state ((MonoSocketAsyncResult *) state) == event)
-                       break;
-
-               state = NULL;
-               prev = current;
-               current = mono_mlist_next (current);
-       }
-
-       if (current) {
-               if (prev) {
-                       mono_mlist_set_next (prev, mono_mlist_next (current));
-               } else {
-                       *list = mono_mlist_next (*list);
-               }
-       }
-
-       return state;
-}
-
-/*
- * select/poll wake up when a socket is closed, but epoll just removes
- * the socket from its internal list without notification.
- */
-void
-mono_thread_pool_remove_socket (int sock)
-{
-       MonoMList *list;
-       MonoSocketAsyncResult *state;
-       MonoObject *ares;
-
-       if (use_ms_threadpool ()) {
-#ifndef DISABLE_SOCKETS
-               mono_threadpool_ms_io_remove_socket (sock);
-#endif
-               return;
-       }
-
-       if (socket_io_data.inited == 0)
-               return;
-
-       mono_mutex_lock (&socket_io_data.io_lock);
-       if (socket_io_data.sock_to_state == NULL) {
-               mono_mutex_unlock (&socket_io_data.io_lock);
-               return;
-       }
-       list = mono_g_hash_table_lookup (socket_io_data.sock_to_state, GINT_TO_POINTER (sock));
-       if (list)
-               mono_g_hash_table_remove (socket_io_data.sock_to_state, GINT_TO_POINTER (sock));
-       mono_mutex_unlock (&socket_io_data.io_lock);
-       
-       while (list) {
-               state = (MonoSocketAsyncResult *) mono_mlist_get_data (list);
-               if (state->operation == AIO_OP_RECEIVE)
-                       state->operation = AIO_OP_RECV_JUST_CALLBACK;
-               else if (state->operation == AIO_OP_SEND)
-                       state->operation = AIO_OP_SEND_JUST_CALLBACK;
-
-               ares = get_io_event (&list, MONO_POLLIN);
-               threadpool_append_job (&async_io_tp, ares);
-               if (list) {
-                       ares = get_io_event (&list, MONO_POLLOUT);
-                       threadpool_append_job (&async_io_tp, ares);
-               }
-       }
-}
-
-static void
-init_event_system (SocketIOData *data)
-{
-#ifdef HAVE_EPOLL
-       if (data->event_system == EPOLL_BACKEND) {
-               data->event_data = tp_epoll_init (data);
-               if (data->event_data == NULL) {
-                       if (g_getenv ("MONO_DEBUG"))
-                               g_message ("Falling back to poll()");
-                       data->event_system = POLL_BACKEND;
-               }
-       }
-#elif defined(USE_KQUEUE_FOR_THREADPOOL)
-       if (data->event_system == KQUEUE_BACKEND)
-               data->event_data = tp_kqueue_init (data);
-#endif
-       if (data->event_system == POLL_BACKEND)
-               data->event_data = tp_poll_init (data);
-}
-
-static void
-socket_io_init (SocketIOData *data)
-{
-       int inited;
-
-       if (data->inited >= 2) // 2 -> initialized, 3-> cleaned up
-               return;
-
-       inited = InterlockedCompareExchange (&data->inited, 1, 0);
-       if (inited >= 1) {
-               while (TRUE) {
-                       if (data->inited >= 2)
-                               return;
-                       SleepEx (1, FALSE);
-               }
-       }
-
-       mono_mutex_lock (&data->io_lock);
-       data->sock_to_state = mono_g_hash_table_new_type (g_direct_hash, g_direct_equal, MONO_HASH_VALUE_GC);
-#ifdef HAVE_EPOLL
-       data->event_system = EPOLL_BACKEND;
-#elif defined(USE_KQUEUE_FOR_THREADPOOL)
-       data->event_system = KQUEUE_BACKEND;
-#else
-       data->event_system = POLL_BACKEND;
-#endif
-       if (g_getenv ("MONO_DISABLE_AIO") != NULL)
-               data->event_system = POLL_BACKEND;
-
-       init_event_system (data);
-       mono_thread_create_internal (mono_get_root_domain (), data->wait, data, TRUE, SMALL_STACK);
-       mono_mutex_unlock (&data->io_lock);
-       data->inited = 2;
-       threadpool_start_thread (&async_io_tp);
-}
-
-static void
-socket_io_add (MonoAsyncResult *ares, MonoSocketAsyncResult *state)
-{
-       MonoMList *list;
-       SocketIOData *data = &socket_io_data;
-       int fd;
-       gboolean is_new;
-       int ievt;
-
-       socket_io_init (&socket_io_data);
-       if (mono_runtime_is_shutting_down () || data->inited == 3 || data->sock_to_state == NULL)
-               return;
-       if (async_tp.pool_status == 2)
-               return;
-
-       MONO_OBJECT_SETREF (state, ares, ares);
-
-       fd = GPOINTER_TO_INT (state->handle);
-       mono_mutex_lock (&data->io_lock);
-       if (data->sock_to_state == NULL) {
-               mono_mutex_unlock (&data->io_lock);
-               return;
-       }
-       list = mono_g_hash_table_lookup (data->sock_to_state, GINT_TO_POINTER (fd));
-       if (list == NULL) {
-               list = mono_mlist_alloc ((MonoObject*)state);
-               is_new = TRUE;
-       } else {
-               list = mono_mlist_append (list, (MonoObject*)state);
-               is_new = FALSE;
-       }
-
-       mono_g_hash_table_replace (data->sock_to_state, state->handle, list);
-       ievt = get_events_from_list (list);
-       /* The modify function leaves the io_lock critical section. */
-       data->modify (data, fd, state->operation, ievt, is_new);
-}
-
-#ifndef DISABLE_SOCKETS
-static gboolean
-socket_io_filter (MonoObject *target, MonoObject *state)
-{
-       gint op;
-       MonoSocketAsyncResult *sock_res;
-       MonoClass *klass;
-       MonoDomain *domain;
-
-       if (target == NULL || state == NULL)
-               return FALSE;
-
-       domain = target->vtable->domain;
-       klass = target->vtable->klass;
-       if (socket_async_call_klass == NULL && is_socketasynccall (domain, klass))
-               socket_async_call_klass = klass;
-
-       if (process_async_call_klass == NULL && is_sdp_asyncreadhandler (domain, klass))
-               process_async_call_klass = klass;
-
-       if (klass != socket_async_call_klass && klass != process_async_call_klass)
-               return FALSE;
-
-       sock_res = (MonoSocketAsyncResult *) state;
-       op = sock_res->operation;
-       if (op < AIO_OP_FIRST || op >= AIO_OP_LAST)
-               return FALSE;
-
-       return TRUE;
-}
-#endif /* !DISABLE_SOCKETS */
-
-/* Returns the exception thrown when invoking, if any */
-static MonoObject *
-mono_async_invoke (ThreadPool *tp, MonoAsyncResult *ares)
-{
-       MonoObject *exc = NULL;
-
-       mono_async_result_invoke (ares, &exc);
-
-#if DEBUG
-       InterlockedDecrement (&tp->njobs);
-#endif
-       if (!tp->is_io)
-               InterlockedIncrement (&tp->nexecuted);
-
-       if (InterlockedDecrement (&monitor_njobs) == 0)
-               monitor_state = MONITOR_STATE_FALLING_ASLEEP;
-
-       return exc;
-}
-
-static void
-threadpool_start_idle_threads (ThreadPool *tp)
-{
-       int n;
-       guint32 stack_size;
-
-       stack_size = (!tp->is_io) ? 0 : SMALL_STACK;
-       do {
-               while (1) {
-                       n = tp->nthreads;
-                       if (n >= tp->min_threads)
-                               return;
-                       if (InterlockedCompareExchange (&tp->nthreads, n + 1, n) == n)
-                               break;
-               }
-#ifndef DISABLE_PERFCOUNTERS
-               mono_perfcounter_update_value (tp->pc_nthreads, TRUE, 1);
-#endif
-               mono_thread_create_internal (mono_get_root_domain (), tp->async_invoke, tp, TRUE, stack_size);
-               SleepEx (100, TRUE);
-       } while (1);
-}
-
-static void
-threadpool_init (ThreadPool *tp, int min_threads, int max_threads, void (*async_invoke) (gpointer))
-{
-       memset (tp, 0, sizeof (ThreadPool));
-       tp->min_threads = min_threads;
-       tp->max_threads = max_threads;
-       tp->async_invoke = async_invoke;
-       tp->queue = mono_cq_create ();
-       MONO_SEM_INIT (&tp->new_job, 0);
-}
-
-#ifndef DISABLE_PERFCOUNTERS
-static void *
-init_perf_counter (const char *category, const char *counter)
-{
-       MonoString *category_str;
-       MonoString *counter_str;
-       MonoString *machine;
-       MonoDomain *root;
-       MonoBoolean custom;
-       int type;
-
-       if (category == NULL || counter == NULL)
-               return NULL;
-       root = mono_get_root_domain ();
-       category_str = mono_string_new (root, category);
-       counter_str = mono_string_new (root, counter);
-       machine = mono_string_new (root, ".");
-       return mono_perfcounter_get_impl (category_str, counter_str, NULL, machine, &type, &custom);
-}
-#endif
-
-#ifdef DEBUG
-static void
-print_pool_info (ThreadPool *tp)
-{
-
-//     if (tp->tail - tp->head == 0)
-//             return;
-
-       g_print ("Pool status? %d\n", InterlockedCompareExchange (&tp->pool_status, 0, 0));
-       g_print ("Min. threads: %d\n", InterlockedCompareExchange (&tp->min_threads, 0, 0));
-       g_print ("Max. threads: %d\n", InterlockedCompareExchange (&tp->max_threads, 0, 0));
-       g_print ("nthreads: %d\n", InterlockedCompareExchange (&tp->nthreads, 0, 0));
-       g_print ("busy threads: %d\n", InterlockedCompareExchange (&tp->busy_threads, 0, 0));
-       g_print ("Waiting: %d\n", InterlockedCompareExchange (&tp->waiting, 0, 0));
-       g_print ("Queued: %d\n", (tp->tail - tp->head));
-       if (tp == &async_tp) {
-               int i;
-               mono_mutex_lock (&wsqs_lock);
-               for (i = 0; i < wsqs->len; i++) {
-                       g_print ("\tWSQ %d: %d\n", i, mono_wsq_count (g_ptr_array_index (wsqs, i)));
-               }
-               mono_mutex_unlock (&wsqs_lock);
-       } else {
-               g_print ("\tSockets: %d\n", mono_g_hash_table_size (socket_io_data.sock_to_state));
-       }
-       g_print ("-------------\n");
-}
-
-static void
-signal_handler (int signo)
-{
-       ThreadPool *tp;
-
-       tp = &async_tp;
-       g_print ("\n-----Non-IO-----\n");
-       print_pool_info (tp);
-       tp = &async_io_tp;
-       g_print ("\n-----IO-----\n");
-       print_pool_info (tp);
-       alarm (2);
-}
-#endif
-
-#define SAMPLES_PERIOD 500
-#define HISTORY_SIZE 10
-/* number of iteration without any jobs
-   in the queue before going to sleep */
-#define NUM_WAITING_ITERATIONS 10
-
-typedef struct {
-       gint32 nexecuted;
-       gint32 nthreads;
-       gint8 nthreads_diff;
-} SamplesHistory;
-
-/*
- * returns :
- *  -  1 if the number of threads should increase
- *  -  0 if it should not change
- *  - -1 if it should decrease
- *  - -2 in case of error
- */
-static gint8
-monitor_heuristic (gint16 *current, gint16 *history_size, SamplesHistory *history, ThreadPool *tp)
-{
-       int i;
-       gint8 decision G_GNUC_UNUSED;
-       gint16 cur, max = 0;
-       gboolean all_waitsleepjoin;
-       MonoInternalThread *thread;
-
-       /*
-        * The following heuristic tries to approach the optimal number of threads to maximize jobs throughput. To
-        * achieve this, it simply stores the number of jobs executed (nexecuted), the number of Threads (nthreads)
-        * and the decision (nthreads_diff) for the past HISTORY_SIZE periods of time, each period being of
-        * duration SAMPLES_PERIOD ms. This history gives us an insight into what happened, and to see if we should
-        * increase or reduce the number of threads by comparing the last period (current) to the best one.
-        *
-        * The algorithm can be describe as following :
-        *  - if we have a better throughput than the best period : we should either increase the number of threads
-        *     in case we already have more threads, either reduce the number of threads if we have less threads; this
-        *     is equivalent to move away from the number of threads of the best period, because we are currently better
-        *  - if we have a worse throughput than the best period : we should either decrease the number of threads if
-        *     we have more threads, either increase the number of threads if we have less threads;  this is equivalent
-        *     to get closer to the number of threads of the best period, because we are currently worse
-        */
-
-       *history_size = MIN (*history_size + 1, HISTORY_SIZE);
-       cur = *current = (*current + 1) % *history_size;
-
-       history [cur].nthreads = tp->nthreads;
-       history [cur].nexecuted = InterlockedExchange (&tp->nexecuted, 0);
-
-       if (tp->waiting) {
-               /* if we have waiting thread in the pool, then do not create a new one */
-               history [cur].nthreads_diff = tp->waiting > 1 ? -1 : 0;
-               decision = 0;
-       } else if (tp->nthreads < tp->min_threads) {
-               history [cur].nthreads_diff = 1;
-               decision = 1;
-       } else if (*history_size <= 1) {
-               /* first iteration, let's add a thread by default */
-               history [cur].nthreads_diff = 1;
-               decision = 2;
-       } else {
-               mono_mutex_lock (&threads_lock);
-               if (threads == NULL) {
-                       mono_mutex_unlock (&threads_lock);
-                       return -2;
-               }
-               all_waitsleepjoin = TRUE;
-               for (i = 0; i < threads->len; ++i) {
-                       thread = g_ptr_array_index (threads, i);
-                       if (!(thread->state & ThreadState_WaitSleepJoin)) {
-                               all_waitsleepjoin = FALSE;
-                               break;
-                       }
-               }
-               mono_mutex_unlock (&threads_lock);
-
-               if (all_waitsleepjoin) {
-                       /* we might be in a condition of starvation/deadlock with tasks waiting for each others */
-                       history [cur].nthreads_diff = 1;
-                       decision = 5;
-               } else {
-                       max = cur == 0 ? 1 : 0;
-                       for (i = 0; i < *history_size; i++) {
-                               if (i == cur)
-                                       continue;
-                               if (history [i].nexecuted > history [max].nexecuted)
-                                       max = i;
-                       }
-
-                       if (history [cur].nexecuted >= history [max].nexecuted) {
-                               /* we improved the situation, let's continue ! */
-                               history [cur].nthreads_diff = history [cur].nthreads >= history [max].nthreads ? 1 : -1;
-                               decision = 3;
-                       } else {
-                               /* we made it worse, let's return to previous situation */
-                               history [cur].nthreads_diff = history [cur].nthreads >= history [max].nthreads ? -1 : 1;
-                               decision = 4;
-                       }
-               }
-       }
-
-#if DEBUG
-       printf ("monitor_thread: decision: %1d, history [current]: {nexecuted: %5d, nthreads: %3d, waiting: %2d, nthreads_diff: %2d}, history [max]: {nexecuted: %5d, nthreads: %3d}\n",
-                       decision, history [cur].nexecuted, history [cur].nthreads, tp->waiting, history [cur].nthreads_diff, history [max].nexecuted, history [max].nthreads);
-#endif
-       
-       return history [cur].nthreads_diff;
-}
-
-static void
-monitor_thread (gpointer unused)
-{
-       ThreadPool *pools [2];
-       MonoInternalThread *thread;
-       int i;
-
-       guint32 ms;
-       gint8 num_waiting_iterations = 0;
-
-       gint16 history_size = 0, current = -1;
-       SamplesHistory *history = malloc (sizeof (SamplesHistory) * HISTORY_SIZE);
-
-       pools [0] = &async_tp;
-       pools [1] = &async_io_tp;
-       thread = mono_thread_internal_current ();
-       ves_icall_System_Threading_Thread_SetName_internal (thread, mono_string_new (mono_domain_get (), "Threadpool monitor"));
-       while (1) {
-               ms = SAMPLES_PERIOD;
-               i = 10; //number of spurious awakes we tolerate before doing a round of rebalancing.
-               mono_gc_set_skip_thread (TRUE);
-               MONO_PREPARE_BLOCKING
-               do {
-                       guint32 ts;
-                       ts = mono_msec_ticks ();
-                       if (SleepEx (ms, TRUE) == 0)
-                               break;
-                       ms -= (mono_msec_ticks () - ts);
-                       if (mono_runtime_is_shutting_down ())
-                               break;
-                       check_for_interruption_critical ();
-               } while (ms > 0 && i--);
-               MONO_FINISH_BLOCKING
-               mono_gc_set_skip_thread (FALSE);
-
-               if (mono_runtime_is_shutting_down ())
-                       break;
-
-               if (suspended)
-                       continue;
-
-               /* threadpool is cleaning up */
-               if (async_tp.pool_status == 2 || async_io_tp.pool_status == 2)
-                       break;
-
-               MONO_PREPARE_BLOCKING
-               switch (monitor_state) {
-               case MONITOR_STATE_AWAKE:
-                       num_waiting_iterations = 0;
-                       break;
-               case MONITOR_STATE_FALLING_ASLEEP:
-                       if (++num_waiting_iterations == NUM_WAITING_ITERATIONS) {
-                               if (monitor_state == MONITOR_STATE_FALLING_ASLEEP && InterlockedCompareExchange (&monitor_state, MONITOR_STATE_SLEEPING, MONITOR_STATE_FALLING_ASLEEP) == MONITOR_STATE_FALLING_ASLEEP) {
-                                       MONO_SEM_WAIT (&monitor_sem);
-
-                                       num_waiting_iterations = 0;
-                                       current = -1;
-                                       history_size = 0;
-                               }
-                       }
-                       break;
-               case MONITOR_STATE_SLEEPING:
-                       g_assert_not_reached ();
-               }
-               MONO_FINISH_BLOCKING
-
-               for (i = 0; i < 2; i++) {
-                       ThreadPool *tp;
-                       tp = pools [i];
-
-                       if (tp->is_io) {
-                               if (!tp->waiting && mono_cq_count (tp->queue) > 0)
-                                       threadpool_start_thread (tp);
-                       } else {
-                               gint8 nthreads_diff = monitor_heuristic (&current, &history_size, history, tp);
-
-                               if (nthreads_diff == 1)
-                                       threadpool_start_thread (tp);
-                               else if (nthreads_diff == -1)
-                                       threadpool_kill_thread (tp);
-                       }
-               }
-       }
-}
-
-void
-mono_thread_pool_init_tls (void)
-{
-       if (use_ms_threadpool ()) {
-               mono_threadpool_ms_init_tls ();
-               return;
-       }
-
-       mono_wsq_init ();
-}
-
-void
-mono_thread_pool_init (void)
-{
-       gint threads_per_cpu = 1;
-       gint thread_count;
-       gint cpu_count;
-       int result;
-       
-       if (use_ms_threadpool ()) {
-               mono_threadpool_ms_init ();
-               return;
-       }
-
-       cpu_count = mono_cpu_count ();
-
-       if (tp_inited == 2)
-               return;
-
-       result = InterlockedCompareExchange (&tp_inited, 1, 0);
-       if (result == 1) {
-               while (1) {
-                       SleepEx (1, FALSE);
-                       if (tp_inited == 2)
-                               return;
-               }
-       }
-
-       MONO_GC_REGISTER_ROOT_FIXED (socket_io_data.sock_to_state);
-       mono_mutex_init_recursive (&socket_io_data.io_lock);
-       if (g_getenv ("MONO_THREADS_PER_CPU") != NULL) {
-               threads_per_cpu = atoi (g_getenv ("MONO_THREADS_PER_CPU"));
-               if (threads_per_cpu < 1)
-                       threads_per_cpu = 1;
-       }
-
-       thread_count = MIN (cpu_count * threads_per_cpu, 100 * cpu_count);
-       threadpool_init (&async_tp, thread_count, MAX (100 * cpu_count, thread_count), async_invoke_thread);
-       threadpool_init (&async_io_tp, cpu_count * 2, cpu_count * 4, async_invoke_thread);
-       async_io_tp.is_io = TRUE;
-
-       async_call_klass = mono_class_from_name (mono_defaults.corlib, "System", "MonoAsyncCall");
-       g_assert (async_call_klass);
-
-       mono_mutex_init (&threads_lock);
-       threads = g_ptr_array_sized_new (thread_count);
-       g_assert (threads);
-
-       mono_mutex_init_recursive (&wsqs_lock);
-       wsqs = g_ptr_array_sized_new (MAX (100 * cpu_count, thread_count));
-
-#ifndef DISABLE_PERFCOUNTERS
-       async_tp.pc_nitems = init_perf_counter ("Mono Threadpool", "Work Items Added");
-       g_assert (async_tp.pc_nitems);
-
-       async_io_tp.pc_nitems = init_perf_counter ("Mono Threadpool", "IO Work Items Added");
-       g_assert (async_io_tp.pc_nitems);
-
-       async_tp.pc_nthreads = init_perf_counter ("Mono Threadpool", "# of Threads");
-       g_assert (async_tp.pc_nthreads);
-
-       async_io_tp.pc_nthreads = init_perf_counter ("Mono Threadpool", "# of IO Threads");
-       g_assert (async_io_tp.pc_nthreads);
-#endif
-       tp_inited = 2;
-#ifdef DEBUG
-       signal (SIGALRM, signal_handler);
-       alarm (2);
-#endif
-
-       MONO_SEM_INIT (&monitor_sem, 0);
-       monitor_state = MONITOR_STATE_AWAKE;
-       monitor_njobs = 0;
-}
-
-static MonoAsyncResult *
-create_simple_asyncresult (MonoObject *target, MonoObject *state)
-{
-       MonoDomain *domain = mono_domain_get ();
-       MonoAsyncResult *ares;
-
-       /* Don't call mono_async_result_new() to avoid capturing the context */
-       ares = (MonoAsyncResult *) mono_object_new (domain, mono_defaults.asyncresult_class);
-       MONO_OBJECT_SETREF (ares, async_delegate, target);
-       MONO_OBJECT_SETREF (ares, async_state, state);
-       return ares;
-}
-
-void
-icall_append_io_job (MonoObject *target, MonoSocketAsyncResult *state)
-{
-       MonoAsyncResult *ares;
-
-       ares = create_simple_asyncresult (target, (MonoObject *) state);
-
-       if (use_ms_threadpool ()) {
-#ifndef DISABLE_SOCKETS
-               mono_threadpool_ms_io_add (ares, state);
-#endif
-               return;
-       }
-
-       socket_io_add (ares, state);
-}
-
-MonoAsyncResult *
-mono_thread_pool_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMethod *method, gpointer *params)
-{
-       MonoMethodMessage *message;
-       MonoAsyncResult *async_result;
-       MonoAsyncCall *async_call;
-       MonoDelegate *async_callback = NULL;
-       MonoObject *state = NULL;
-
-       if (use_ms_threadpool ())
-               return mono_threadpool_ms_begin_invoke (domain, target, method, params);
-
-       message = mono_method_call_message_new (method, params, mono_get_delegate_invoke (method->klass), (params != NULL) ? (&async_callback) : NULL, (params != NULL) ? (&state) : NULL);
-
-       async_call = (MonoAsyncCall*)mono_object_new (domain, async_call_klass);
-       MONO_OBJECT_SETREF (async_call, msg, message);
-       MONO_OBJECT_SETREF (async_call, state, state);
-
-       if (async_callback) {
-               async_call->cb_method = mono_get_delegate_invoke (((MonoObject*) async_callback)->vtable->klass);
-               MONO_OBJECT_SETREF (async_call, cb_target, async_callback);
-       }
-
-       async_result = mono_async_result_new (domain, NULL, async_call->state, NULL, (MonoObject*) async_call);
-       MONO_OBJECT_SETREF (async_result, async_delegate, target);
-
-#ifndef DISABLE_SOCKETS
-       if (socket_io_filter (target, state)) {
-               socket_io_add (async_result, (MonoSocketAsyncResult *) state);
-               return async_result;
-       }
-#endif
-       threadpool_append_job (&async_tp, (MonoObject *) async_result);
-       return async_result;
-}
-
-MonoObject *
-mono_thread_pool_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc)
-{
-       MonoAsyncCall *ac;
-       HANDLE wait_event;
-
-       if (use_ms_threadpool ()) {
-               return mono_threadpool_ms_end_invoke (ares, out_args, exc);
-       }
-
-       *exc = NULL;
-       *out_args = NULL;
-
-       /* check if already finished */
-       mono_monitor_enter ((MonoObject *) ares);
-       
-       if (ares->endinvoke_called) {
-               *exc = (MonoObject *) mono_get_exception_invalid_operation (NULL);
-               mono_monitor_exit ((MonoObject *) ares);
-               return NULL;
-       }
-
-       ares->endinvoke_called = 1;
-       /* wait until we are really finished */
-       if (!ares->completed) {
-               if (ares->handle == NULL) {
-                       wait_event = CreateEvent (NULL, TRUE, FALSE, NULL);
-                       g_assert(wait_event != 0);
-                       MONO_OBJECT_SETREF (ares, handle, (MonoObject *) mono_wait_handle_new (mono_object_domain (ares), wait_event));
-               } else {
-                       wait_event = mono_wait_handle_get_handle ((MonoWaitHandle *) ares->handle);
-               }
-               mono_monitor_exit ((MonoObject *) ares);
-               MONO_PREPARE_BLOCKING
-               WaitForSingleObjectEx (wait_event, INFINITE, TRUE);
-               MONO_FINISH_BLOCKING
-       } else {
-               mono_monitor_exit ((MonoObject *) ares);
-       }
-
-       ac = (MonoAsyncCall *) ares->object_data;
-       g_assert (ac != NULL);
-       *exc = ac->msg->exc; /* FIXME: GC add write barrier */
-       *out_args = ac->out_args;
-
-       return ac->res;
-}
-
-static void
-threadpool_kill_idle_threads (ThreadPool *tp)
-{
-       gint n;
-
-       n = (gint) InterlockedCompareExchange (&tp->max_threads, 0, -1);
-       while (n) {
-               n--;
-               MONO_SEM_POST (&tp->new_job);
-       }
-}
-
-void
-mono_thread_pool_cleanup (void)
-{
-       if (use_ms_threadpool ()) {
-               mono_threadpool_ms_cleanup ();
-               return;
-       }
-
-       if (InterlockedExchange (&async_io_tp.pool_status, 2) == 1) {
-               socket_io_cleanup (&socket_io_data); /* Empty when DISABLE_SOCKETS is defined */
-               threadpool_kill_idle_threads (&async_io_tp);
-       }
-
-       if (async_io_tp.queue != NULL) {
-               MONO_SEM_DESTROY (&async_io_tp.new_job);
-               threadpool_free_queue (&async_io_tp);
-       }
-
-
-       if (InterlockedExchange (&async_tp.pool_status, 2) == 1) {
-               threadpool_kill_idle_threads (&async_tp);
-               threadpool_free_queue (&async_tp);
-       }
-       
-       if (threads) {
-               mono_mutex_lock (&threads_lock);
-               if (threads)
-                       g_ptr_array_free (threads, FALSE);
-               threads = NULL;
-               mono_mutex_unlock (&threads_lock);
-       }
-
-       if (wsqs) {
-               mono_mutex_lock (&wsqs_lock);
-               mono_wsq_cleanup ();
-               if (wsqs)
-                       g_ptr_array_free (wsqs, TRUE);
-               wsqs = NULL;
-               mono_mutex_unlock (&wsqs_lock);
-               MONO_SEM_DESTROY (&async_tp.new_job);
-       }
-
-       MONO_SEM_DESTROY (&monitor_sem);
-}
-
-static gboolean
-threadpool_start_thread (ThreadPool *tp)
-{
-       gint n;
-       guint32 stack_size;
-       MonoInternalThread *thread;
-
-       stack_size = (!tp->is_io) ? 0 : SMALL_STACK;
-       while (!mono_runtime_is_shutting_down () && (n = tp->nthreads) < tp->max_threads) {
-               if (InterlockedCompareExchange (&tp->nthreads, n + 1, n) == n) {
-#ifndef DISABLE_PERFCOUNTERS
-                       mono_perfcounter_update_value (tp->pc_nthreads, TRUE, 1);
-#endif
-                       if (tp->is_io) {
-                               thread = mono_thread_create_internal (mono_get_root_domain (), tp->async_invoke, tp, TRUE, stack_size);
-                       } else {
-                               mono_mutex_lock (&threads_lock);
-                               thread = mono_thread_create_internal (mono_get_root_domain (), tp->async_invoke, tp, TRUE, stack_size);
-                               g_assert (threads != NULL);
-                               g_ptr_array_add (threads, thread);
-                               mono_mutex_unlock (&threads_lock);
-                       }
-                       return TRUE;
-               }
-       }
-
-       return FALSE;
-}
-
-static void
-pulse_on_new_job (ThreadPool *tp)
-{
-       if (tp->waiting)
-               MONO_SEM_POST (&tp->new_job);
-}
-
-static void
-threadpool_kill_thread (ThreadPool *tp)
-{
-       if (tp->destroy_thread == 0 && InterlockedCompareExchange (&tp->destroy_thread, 1, 0) == 0)
-               pulse_on_new_job (tp);
-}
-
-void
-icall_append_job (MonoObject *ar)
-{
-       threadpool_append_jobs (&async_tp, &ar, 1);
-}
-
-static void
-threadpool_append_job (ThreadPool *tp, MonoObject *ar)
-{
-       threadpool_append_jobs (tp, &ar, 1);
-}
-
-void
-threadpool_append_async_io_jobs (MonoObject **jobs, gint njobs)
-{
-       threadpool_append_jobs (&async_io_tp, jobs, njobs);
-}
-
-static void
-threadpool_append_jobs (ThreadPool *tp, MonoObject **jobs, gint njobs)
-{
-       MonoObject *ar;
-       gint i;
-
-       if (mono_runtime_is_shutting_down ())
-               return;
-
-       if (tp->pool_status == 0 && InterlockedCompareExchange (&tp->pool_status, 1, 0) == 0) {
-               if (!tp->is_io) {
-                       monitor_internal_thread = mono_thread_create_internal (mono_get_root_domain (), monitor_thread, NULL, TRUE, SMALL_STACK);
-                       monitor_internal_thread->flags |= MONO_THREAD_FLAG_DONT_MANAGE;
-                       threadpool_start_thread (tp);
-               }
-               /* Create on demand up to min_threads to avoid startup penalty for apps that don't use
-                * the threadpool that much
-                */
-               if (mono_config_is_server_mode ()) {
-                       mono_thread_create_internal (mono_get_root_domain (), threadpool_start_idle_threads, tp, TRUE, SMALL_STACK);
-               }
-       }
-
-       InterlockedAdd (&monitor_njobs, njobs);
-
-       if (monitor_state == MONITOR_STATE_SLEEPING && InterlockedCompareExchange (&monitor_state, MONITOR_STATE_AWAKE, MONITOR_STATE_SLEEPING) == MONITOR_STATE_SLEEPING)
-               MONO_SEM_POST (&monitor_sem);
-
-       if (monitor_state == MONITOR_STATE_FALLING_ASLEEP)
-               InterlockedCompareExchange (&monitor_state, MONITOR_STATE_AWAKE, MONITOR_STATE_FALLING_ASLEEP);
-
-       for (i = 0; i < njobs; i++) {
-               ar = jobs [i];
-               if (ar == NULL || mono_domain_is_unloading (ar->vtable->domain))
-                       continue; /* Might happen when cleaning domain jobs */
-               threadpool_jobs_inc (ar); 
-#ifndef DISABLE_PERFCOUNTERS
-               mono_perfcounter_update_value (tp->pc_nitems, TRUE, 1);
-#endif
-               if (!tp->is_io && mono_wsq_local_push (ar))
-                       continue;
-
-               mono_cq_enqueue (tp->queue, ar);
-       }
-
-#if DEBUG
-       InterlockedAdd (&tp->njobs, njobs);
-#endif
-
-       for (i = 0; tp->waiting > 0 && i < MIN(njobs, tp->max_threads); i++)
-               pulse_on_new_job (tp);
-}
-
-static void
-threadpool_clear_queue (ThreadPool *tp, MonoDomain *domain)
-{
-       MonoObject *obj;
-       MonoMList *other = NULL;
-       MonoCQ *queue = tp->queue;
-
-       if (!queue)
-               return;
-
-       while (mono_cq_dequeue (queue, &obj)) {
-               if (obj == NULL)
-                       continue;
-               if (obj->vtable->domain != domain)
-                       other = mono_mlist_prepend (other, obj);
-               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);
-       }
-}
-
-static gboolean
-remove_sockstate_for_domain (gpointer key, gpointer value, gpointer user_data)
-{
-       MonoMList *list = value;
-       gboolean remove = FALSE;
-       while (list) {
-               MonoObject *data = mono_mlist_get_data (list);
-               if (mono_object_domain (data) == user_data) {
-                       remove = TRUE;
-                       mono_mlist_set_data (list, NULL);
-               }
-               list = mono_mlist_next (list);
-       }
-       //FIXME is there some sort of additional unregistration we need to perform here?
-       return remove;
-}
-
-/*
- * Clean up the threadpool of all domain jobs.
- * Can only be called as part of the domain unloading process as
- * it will wait for all jobs to be visible to the interruption code. 
- */
-gboolean
-mono_thread_pool_remove_domain_jobs (MonoDomain *domain, int timeout)
-{
-       HANDLE sem_handle;
-       int result;
-       guint32 start_time;
-
-       if (use_ms_threadpool ()) {
-               return mono_threadpool_ms_remove_domain_jobs (domain, timeout);
-       }
-
-       result = TRUE;
-       start_time = 0;
-
-       g_assert (domain->state == MONO_APPDOMAIN_UNLOADING);
-
-       threadpool_clear_queue (&async_tp, domain);
-       threadpool_clear_queue (&async_io_tp, domain);
-
-       mono_mutex_lock (&socket_io_data.io_lock);
-       if (socket_io_data.sock_to_state)
-               mono_g_hash_table_foreach_remove (socket_io_data.sock_to_state, remove_sockstate_for_domain, domain);
-
-       mono_mutex_unlock (&socket_io_data.io_lock);
-       
-       /*
-        * There might be some threads out that could be about to execute stuff from the given domain.
-        * We avoid that by setting up a semaphore to be pulsed by the thread that reaches zero.
-        */
-       sem_handle = CreateSemaphore (NULL, 0, 1, NULL);
-
-       domain->cleanup_semaphore = sem_handle;
-       /*
-        * The memory barrier here is required to have global ordering between assigning to cleanup_semaphone
-        * and reading threadpool_jobs.
-        * Otherwise this thread could read a stale version of threadpool_jobs and wait forever.
-        */
-       mono_memory_write_barrier ();
-
-       if (domain->threadpool_jobs && timeout != -1)
-               start_time = mono_msec_ticks ();
-       while (domain->threadpool_jobs) {
-               MONO_PREPARE_BLOCKING
-               WaitForSingleObject (sem_handle, timeout);
-               MONO_FINISH_BLOCKING
-               if (timeout != -1 && (mono_msec_ticks () - start_time) > timeout) {
-                       result = FALSE;
-                       break;
-               }
-       }
-
-       domain->cleanup_semaphore = NULL;
-       CloseHandle (sem_handle);
-       return result;
-}
-
-static void
-threadpool_free_queue (ThreadPool *tp)
-{
-       mono_cq_destroy (tp->queue);
-       tp->queue = NULL;
-}
-
-gboolean
-mono_thread_pool_is_queue_array (MonoArray *o)
-{
-       if (use_ms_threadpool ()) {
-               return mono_threadpool_ms_is_queue_array (o);
-       }
-
-       // gpointer obj = o;
-
-       // FIXME: need some fix in sgen code.
-       return FALSE;
-}
-
-static MonoWSQ *
-add_wsq (void)
-{
-       int i;
-       MonoWSQ *wsq;
-
-       mono_mutex_lock (&wsqs_lock);
-       wsq = mono_wsq_create ();
-       if (wsqs == NULL) {
-               mono_mutex_unlock (&wsqs_lock);
-               return NULL;
-       }
-       for (i = 0; i < wsqs->len; i++) {
-               if (g_ptr_array_index (wsqs, i) == NULL) {
-                       wsqs->pdata [i] = wsq;
-                       mono_mutex_unlock (&wsqs_lock);
-                       return wsq;
-               }
-       }
-       g_ptr_array_add (wsqs, wsq);
-       mono_mutex_unlock (&wsqs_lock);
-       return wsq;
-}
-
-static void
-remove_wsq (MonoWSQ *wsq)
-{
-       gpointer data;
-
-       if (wsq == NULL)
-               return;
-
-       mono_mutex_lock (&wsqs_lock);
-       if (wsqs == NULL) {
-               mono_mutex_unlock (&wsqs_lock);
-               return;
-       }
-       g_ptr_array_remove_fast (wsqs, wsq);
-       data = NULL;
-       /*
-        * Only clean this up when shutting down, any other case will error out
-        * if we're removing a queue that still has work items.
-        */
-       if (mono_runtime_is_shutting_down ()) {
-               while (mono_wsq_local_pop (&data)) {
-                       threadpool_jobs_dec (data);
-                       data = NULL;
-               }
-       }
-       mono_wsq_destroy (wsq);
-       mono_mutex_unlock (&wsqs_lock);
-}
-
-static void
-try_steal (MonoWSQ *local_wsq, gpointer *data, gboolean retry)
-{
-       int i;
-       int ms;
-
-       if (wsqs == NULL || data == NULL || *data != NULL)
-               return;
-
-       ms = 0;
-       do {
-               if (mono_runtime_is_shutting_down ())
-                       return;
-
-               MONO_PREPARE_BLOCKING
-               mono_mutex_lock (&wsqs_lock);
-               MONO_FINISH_BLOCKING
-               for (i = 0; wsqs != NULL && i < wsqs->len; i++) {
-                       MonoWSQ *wsq;
-
-                       wsq = wsqs->pdata [i];
-                       if (wsq == local_wsq || mono_wsq_count (wsq) == 0)
-                               continue;
-                       mono_wsq_try_steal (wsqs->pdata [i], data, ms);
-                       if (*data != NULL) {
-                               mono_mutex_unlock (&wsqs_lock);
-                               return;
-                       }
-               }
-               mono_mutex_unlock (&wsqs_lock);
-               ms += 10;
-       } while (retry && ms < 11);
-}
-
-static gboolean
-dequeue_or_steal (ThreadPool *tp, gpointer *data, MonoWSQ *local_wsq)
-{
-       MonoCQ *queue = tp->queue;
-       if (mono_runtime_is_shutting_down () || !queue)
-               return FALSE;
-       mono_cq_dequeue (queue, (MonoObject **) data);
-       if (!tp->is_io && !*data)
-               try_steal (local_wsq, data, FALSE);
-       return (*data != NULL);
-}
-
-static gboolean
-should_i_die (ThreadPool *tp)
-{
-       gboolean result = FALSE;
-       if (tp->destroy_thread == 1 && InterlockedCompareExchange (&tp->destroy_thread, 0, 1) == 1)
-               result = (tp->nthreads > tp->min_threads);
-       return result;
-}
-
-static void
-set_tp_thread_info (ThreadPool *tp)
-{
-       const gchar *name;
-       MonoInternalThread *thread = mono_thread_internal_current ();
-
-       mono_profiler_thread_start (thread->tid);
-       name = (tp->is_io) ? "IO Threadpool worker" : "Threadpool worker";
-       mono_thread_set_name_internal (thread, mono_string_new (mono_domain_get (), name), FALSE);
-}
-
-static void
-clear_thread_state (void)
-{
-       MonoInternalThread *thread = mono_thread_internal_current ();
-       /* If the callee changes the background status, set it back to TRUE */
-       mono_thread_clr_state (thread , ~ThreadState_Background);
-       if (!mono_thread_test_state (thread , ThreadState_Background))
-               ves_icall_System_Threading_Thread_SetState (thread, ThreadState_Background);
-}
-
-void
-check_for_interruption_critical (void)
-{
-       MonoInternalThread *thread;
-       /*RULE NUMBER ONE OF SKIP_THREAD: NEVER POKE MANAGED STATE.*/
-       mono_gc_set_skip_thread (FALSE);
-
-       thread = mono_thread_internal_current ();
-       if (THREAD_WANTS_A_BREAK (thread))
-               mono_thread_interruption_checkpoint ();
-
-       /*RULE NUMBER TWO OF SKIP_THREAD: READ RULE NUMBER ONE.*/
-       mono_gc_set_skip_thread (TRUE);
-}
-
-static void
-fire_profiler_thread_end (void)
-{
-       MonoInternalThread *thread = mono_thread_internal_current ();
-       mono_profiler_thread_end (thread->tid);
-}
-
-static void
-async_invoke_thread (gpointer data)
-{
-       MonoDomain *domain;
-       MonoWSQ *wsq;
-       ThreadPool *tp;
-       gboolean must_die;
-  
-       tp = data;
-       wsq = NULL;
-       if (!tp->is_io)
-               wsq = add_wsq ();
-
-       set_tp_thread_info (tp);
-
-       if (tp_start_func)
-               tp_start_func (tp_hooks_user_data);
-
-       data = NULL;
-       for (;;) {
-               MonoAsyncResult *ar;
-               MonoClass *klass;
-               gboolean is_io_task;
-               gboolean is_socket;
-               int n_naps = 0;
-
-               is_io_task = FALSE;
-               ar = (MonoAsyncResult *) data;
-               if (ar) {
-                       InterlockedIncrement (&tp->busy_threads);
-                       domain = ((MonoObject *)ar)->vtable->domain;
-#ifndef DISABLE_SOCKETS
-                       klass = ((MonoObject *) data)->vtable->klass;
-                       is_io_task = !is_corlib_asyncresult (domain, klass);
-                       is_socket = FALSE;
-                       if (is_io_task) {
-                               MonoSocketAsyncResult *state = (MonoSocketAsyncResult *) data;
-                               is_socket = is_socketasyncresult (domain, klass);
-                               ar = state->ares;
-                       }
-#endif
-                       /* worker threads invokes methods in different domains,
-                        * so we need to set the right domain here */
-                       g_assert (domain);
-
-                       if (mono_domain_is_unloading (domain) || mono_runtime_is_shutting_down ()) {
-                               threadpool_jobs_dec ((MonoObject *)ar);
-                               data = NULL;
-                               ar = NULL;
-                               InterlockedDecrement (&tp->busy_threads);
-                       } else {
-                               mono_thread_push_appdomain_ref (domain);
-                               if (threadpool_jobs_dec ((MonoObject *)ar)) {
-                                       data = NULL;
-                                       ar = NULL;
-                                       mono_thread_pop_appdomain_ref ();
-                                       InterlockedDecrement (&tp->busy_threads);
-                                       continue;
-                               }
-
-                               if (mono_domain_set (domain, FALSE)) {
-                                       MonoObject *exc;
-
-                                       if (tp_item_begin_func)
-                                               tp_item_begin_func (tp_item_user_data);
-
-                                       exc = mono_async_invoke (tp, ar);
-                                       if (tp_item_end_func)
-                                               tp_item_end_func (tp_item_user_data);
-                                       if (exc)
-                                               mono_internal_thread_unhandled_exception (exc);
-                                       if (is_socket && tp->is_io) {
-                                               MonoSocketAsyncResult *state = (MonoSocketAsyncResult *) data;
-
-                                               if (state->completed && state->callback) {
-                                                       MonoAsyncResult *cb_ares;
-                                                       cb_ares = create_simple_asyncresult ((MonoObject *) state->callback,
-                                                                                               (MonoObject *) state);
-                                                       icall_append_job ((MonoObject *) cb_ares);
-                                               }
-                                       }
-                                       mono_domain_set (mono_get_root_domain (), TRUE);
-                               }
-                               mono_thread_pop_appdomain_ref ();
-                               InterlockedDecrement (&tp->busy_threads);
-                               clear_thread_state ();
-                       }
-               }
-
-               ar = NULL;
-               data = NULL;
-               must_die = should_i_die (tp);
-               if (must_die) {
-                       mono_wsq_suspend (wsq);
-               } else {
-                       if (tp->is_io || !mono_wsq_local_pop (&data))
-                               dequeue_or_steal (tp, &data, wsq);
-               }
-
-               n_naps = 0;
-               while (!must_die && !data && n_naps < 4) {
-                       gboolean res;
-
-                       InterlockedIncrement (&tp->waiting);
-
-                       // Another thread may have added a job into its wsq since the last call to dequeue_or_steal
-                       // Check all the queues again before entering the wait loop
-                       dequeue_or_steal (tp, &data, wsq);
-                       if (data) {
-                               InterlockedDecrement (&tp->waiting);
-                               break;
-                       }
-
-                       mono_gc_set_skip_thread (TRUE);
-                       MONO_PREPARE_BLOCKING
-
-#if defined(__OpenBSD__)
-                       while (mono_cq_count (tp->queue) == 0 && (res = mono_sem_wait (&tp->new_job, TRUE)) == -1) {// && errno == EINTR) {
-#else
-                       while (mono_cq_count (tp->queue) == 0 && (res = mono_sem_timedwait (&tp->new_job, 2000, TRUE)) == -1) {// && errno == EINTR) {
-#endif
-                               if (mono_runtime_is_shutting_down ())
-                                       break;
-                               check_for_interruption_critical ();
-                       }
-                       InterlockedDecrement (&tp->waiting);
-
-                       MONO_FINISH_BLOCKING
-                       mono_gc_set_skip_thread (FALSE);
-
-                       if (mono_runtime_is_shutting_down ())
-                               break;
-                       must_die = should_i_die (tp);
-                       dequeue_or_steal (tp, &data, wsq);
-                       n_naps++;
-               }
-
-               if (!data && !tp->is_io && !mono_runtime_is_shutting_down ()) {
-                       mono_wsq_local_pop (&data);
-                       if (data && must_die) {
-                               InterlockedCompareExchange (&tp->destroy_thread, 1, 0);
-                               pulse_on_new_job (tp);
-                       }
-               }
-
-               if (!data) {
-                       gint nt;
-                       gboolean down;
-                       while (1) {
-                               nt = tp->nthreads;
-                               down = mono_runtime_is_shutting_down ();
-                               if (!down && nt <= tp->min_threads)
-                                       break;
-                               if (down || InterlockedCompareExchange (&tp->nthreads, nt - 1, nt) == nt) {
-#ifndef DISABLE_PERFCOUNTERS
-                                       mono_perfcounter_update_value (tp->pc_nthreads, TRUE, -1);
-#endif
-                                       if (!tp->is_io) {
-                                               remove_wsq (wsq);
-                                       }
-
-                                       fire_profiler_thread_end ();
-
-                                       if (tp_finish_func)
-                                               tp_finish_func (tp_hooks_user_data);
-
-                                       if (!tp->is_io) {
-                                               if (threads) {
-                                                       mono_mutex_lock (&threads_lock);
-                                                       if (threads)
-                                                               g_ptr_array_remove_fast (threads, mono_thread_current ()->internal_thread);
-                                                       mono_mutex_unlock (&threads_lock);
-                                               }
-                                       }
-
-                                       return;
-                               }
-                       }
-               }
-       }
-
-       g_assert_not_reached ();
-}
-
-void
-ves_icall_System_Threading_ThreadPool_GetAvailableThreads (gint *workerThreads, gint *completionPortThreads)
-{
-       *workerThreads = async_tp.max_threads - async_tp.busy_threads;
-       *completionPortThreads = async_io_tp.max_threads - async_io_tp.busy_threads;
-}
-
-void
-ves_icall_System_Threading_ThreadPool_GetMaxThreads (gint *workerThreads, gint *completionPortThreads)
-{
-       *workerThreads = async_tp.max_threads;
-       *completionPortThreads = async_io_tp.max_threads;
-}
-
-void
-ves_icall_System_Threading_ThreadPool_GetMinThreads (gint *workerThreads, gint *completionPortThreads)
-{
-       *workerThreads = async_tp.min_threads;
-       *completionPortThreads = async_io_tp.min_threads;
-}
-
-MonoBoolean
-ves_icall_System_Threading_ThreadPool_SetMinThreads (gint workerThreads, gint completionPortThreads)
-{
-       gint max_threads;
-       gint max_io_threads;
-
-       max_threads = async_tp.max_threads;
-       if (workerThreads <= 0 || workerThreads > max_threads)
-               return FALSE;
-
-       max_io_threads = async_io_tp.max_threads;
-       if (completionPortThreads <= 0 || completionPortThreads > max_io_threads)
-               return FALSE;
-
-       InterlockedExchange (&async_tp.min_threads, workerThreads);
-       InterlockedExchange (&async_io_tp.min_threads, completionPortThreads);
-       if (workerThreads > async_tp.nthreads)
-               mono_thread_create_internal (mono_get_root_domain (), threadpool_start_idle_threads, &async_tp, TRUE, SMALL_STACK);
-       if (completionPortThreads > async_io_tp.nthreads)
-               mono_thread_create_internal (mono_get_root_domain (), threadpool_start_idle_threads, &async_io_tp, TRUE, SMALL_STACK);
-       return TRUE;
-}
-
-MonoBoolean
-ves_icall_System_Threading_ThreadPool_SetMaxThreads (gint workerThreads, gint completionPortThreads)
-{
-       gint min_threads;
-       gint min_io_threads;
-       gint cpu_count;
-
-       cpu_count = mono_cpu_count ();
-       min_threads = async_tp.min_threads;
-       if (workerThreads < min_threads || workerThreads < cpu_count)
-               return FALSE;
-
-       /* We don't really have the concept of completion ports. Do we care here? */
-       min_io_threads = async_io_tp.min_threads;
-       if (completionPortThreads < min_io_threads || completionPortThreads < cpu_count)
-               return FALSE;
-
-       InterlockedExchange (&async_tp.max_threads, workerThreads);
-       InterlockedExchange (&async_io_tp.max_threads, completionPortThreads);
-       return TRUE;
-}
-
-/**
- * mono_install_threadpool_thread_hooks
- * @start_func: the function to be called right after a new threadpool thread is created. Can be NULL.
- * @finish_func: the function to be called right before a thredpool thread is exiting. Can be NULL.
- * @user_data: argument passed to @start_func and @finish_func.
- *
- * @start_fun will be called right after a threadpool thread is created and @finish_func right before a threadpool thread exits.
- * The calls will be made from the thread itself.
- */
-void
-mono_install_threadpool_thread_hooks (MonoThreadPoolFunc start_func, MonoThreadPoolFunc finish_func, gpointer user_data)
-{
-       tp_start_func = start_func;
-       tp_finish_func = finish_func;
-       tp_hooks_user_data = user_data;
-}
-
-/**
- * mono_install_threadpool_item_hooks
- * @begin_func: the function to be called before a threadpool work item processing starts.
- * @end_func: the function to be called after a threadpool work item is finished.
- * @user_data: argument passed to @begin_func and @end_func.
- *
- * The calls will be made from the thread itself and from the same AppDomain
- * where the work item was executed.
- *
- */
-void
-mono_install_threadpool_item_hooks (MonoThreadPoolItemFunc begin_func, MonoThreadPoolItemFunc end_func, gpointer user_data)
-{
-       tp_item_begin_func = begin_func;
-       tp_item_end_func = end_func;
-       tp_item_user_data = user_data;
-}
-
-void
-mono_internal_thread_unhandled_exception (MonoObject* exc)
-{
-       if (mono_runtime_unhandled_exception_policy_get () == MONO_UNHANDLED_POLICY_CURRENT) {
-               gboolean unloaded;
-               MonoClass *klass;
-
-               klass = exc->vtable->klass;
-               unloaded = is_appdomainunloaded_exception (exc->vtable->domain, klass);
-               if (!unloaded && klass != mono_defaults.threadabortexception_class) {
-                       mono_unhandled_exception (exc);
-                       if (mono_environment_exitcode_get () == 1)
-                               exit (255);
-               }
-               if (klass == mono_defaults.threadabortexception_class)
-                mono_thread_internal_reset_abort (mono_thread_internal_current ());
-       }
-}
-
-/*
- * Suspend creation of new threads.
- */
-void
-mono_thread_pool_suspend (void)
-{
-       if (use_ms_threadpool ()) {
-               mono_threadpool_ms_suspend ();
-               return;
-       }
-       suspended = TRUE;
-}
-
-/*
- * Resume creation of new threads.
- */
-void
-mono_thread_pool_resume (void)
-{
-       if (use_ms_threadpool ()) {
-               mono_threadpool_ms_resume ();
-               return;
-       }
-       suspended = FALSE;
-}
diff --git a/mono/metadata/threadpool.h b/mono/metadata/threadpool.h
deleted file mode 100644 (file)
index eab5e1c..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef _MONO_THREADPOOL_H_
-#define _MONO_THREADPOOL_H_
-
-#include <mono/metadata/object-internals.h>
-#include <mono/metadata/reflection.h>
-#include <mono/metadata/socket-io.h>
-
-/* No managed code here */
-void mono_thread_pool_init (void);
-void mono_thread_pool_init_tls (void);
-
-void icall_append_job (MonoObject *ar);
-void icall_append_io_job (MonoObject *target, MonoSocketAsyncResult *state);
-
-MonoAsyncResult *
-mono_thread_pool_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMethod *method, gpointer *params);
-
-MonoObject *
-mono_thread_pool_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc);
-
-void mono_thread_pool_cleanup (void);
-
-gboolean mono_thread_pool_remove_domain_jobs (MonoDomain *domain, int timeout);
-
-void mono_thread_pool_suspend (void);
-void mono_thread_pool_resume (void);
-
-void
-ves_icall_System_Threading_ThreadPool_GetAvailableThreads (int *workerThreads,
-                                                          int *completionPortThreads);
-
-void
-ves_icall_System_Threading_ThreadPool_GetMaxThreads (int *workerThreads,
-                                                    int *completionPortThreads);
-
-void
-ves_icall_System_Threading_ThreadPool_GetMinThreads (gint *workerThreads, 
-                                                               gint *completionPortThreads);
-
-MonoBoolean
-ves_icall_System_Threading_ThreadPool_SetMinThreads (gint workerThreads, 
-                                                               gint completionPortThreads);
-
-MonoBoolean
-ves_icall_System_Threading_ThreadPool_SetMaxThreads (gint workerThreads, 
-                                                               gint completionPortThreads);
-
-typedef void  (*MonoThreadPoolFunc) (gpointer user_data);
-MONO_API void mono_install_threadpool_thread_hooks (MonoThreadPoolFunc start_func, MonoThreadPoolFunc finish_func, gpointer user_data);
-
-typedef void  (*MonoThreadPoolItemFunc) (gpointer user_data);
-MONO_API void mono_install_threadpool_item_hooks (MonoThreadPoolItemFunc begin_func, MonoThreadPoolItemFunc end_func, gpointer user_data);
-
-#endif
-
index ac0f482767db24ad6a820d8e69716f021c97be1e..73fd440651834e769335f4fa82da3c91e0dc3888 100644 (file)
@@ -188,12 +188,16 @@ void ves_icall_System_Runtime_Remoting_Contexts_Context_RegisterContext (MonoApp
 
 MonoInternalThread *mono_thread_internal_current (void);
 
+void mono_thread_internal_check_for_interruption_critical (MonoInternalThread *thread);
+
 void mono_thread_internal_stop (MonoInternalThread *thread);
 
 gboolean mono_thread_internal_has_appdomain_ref (MonoInternalThread *thread, MonoDomain *domain);
 
 void mono_thread_internal_reset_abort (MonoInternalThread *thread);
 
+void mono_thread_internal_unhandled_exception (MonoObject* exc);
+
 void mono_alloc_special_static_data_free (GHashTable *special_static_fields);
 void mono_thread_current_check_pending_interrupt (void);
 
index 5479f53c9ffbd61115a48e46204943fb2e84f71e..b62ca4b31e49a8d1ee2f4edbcfb7d04b48e02592 100644 (file)
@@ -20,7 +20,6 @@
 #include <mono/metadata/domain-internals.h>
 #include <mono/metadata/profiler-private.h>
 #include <mono/metadata/threads.h>
-#include <mono/metadata/threadpool.h>
 #include <mono/metadata/threads-types.h>
 #include <mono/metadata/exception.h>
 #include <mono/metadata/environment.h>
@@ -3564,7 +3563,7 @@ mark_slots (void *addr, MonoBitSet **bitmaps, MonoGCMarkFunc mark_func, void *gc
                        void **p = ptr + idx;
 
                        if (*p)
-                               mark_func (p, gc_data);
+                               mark_func ((MonoObject**)p, gc_data);
                });
        }
 }
@@ -3594,14 +3593,14 @@ mono_alloc_static_data (gpointer **static_data_ptr, guint32 offset, gboolean thr
 
        gpointer* static_data = *static_data_ptr;
        if (!static_data) {
-               static void *tls_desc = NULL;
-               static void *ctx_desc = NULL;
+               static MonoGCDescriptor tls_desc = MONO_GC_DESCRIPTOR_NULL;
+               static MonoGCDescriptor ctx_desc = MONO_GC_DESCRIPTOR_NULL;
 
                if (mono_gc_user_markers_supported ()) {
-                       if (!tls_desc)
+                       if (tls_desc == MONO_GC_DESCRIPTOR_NULL)
                                tls_desc = mono_gc_make_root_descr_user (mark_tls_slots);
 
-                       if (!ctx_desc)
+                       if (ctx_desc == MONO_GC_DESCRIPTOR_NULL)
                                ctx_desc = mono_gc_make_root_descr_user (mark_ctx_slots);
                }
 
@@ -3617,7 +3616,7 @@ mono_alloc_static_data (gpointer **static_data_ptr, guint32 offset, gboolean thr
                if (mono_gc_user_markers_supported ())
                        static_data [i] = g_malloc0 (static_data_size [i]);
                else
-                       static_data [i] = mono_gc_alloc_fixed (static_data_size [i], NULL);
+                       static_data [i] = mono_gc_alloc_fixed (static_data_size [i], MONO_GC_DESCRIPTOR_NULL);
        }
 }
 
@@ -3731,20 +3730,21 @@ alloc_thread_static_data_helper (gpointer key, gpointer value, gpointer user)
 /*
  * LOCKING: requires that threads_mutex is held
  */
-static void
+static gboolean
 alloc_context_static_data_helper (gpointer key, gpointer value, gpointer user)
 {
        uint32_t gch = GPOINTER_TO_INT (key);
        MonoAppContext *ctx = (MonoAppContext *) mono_gchandle_get_target (gch);
 
        if (!ctx) {
-               g_hash_table_remove (contexts, key);
                mono_gchandle_free (gch);
-               return;
+               return TRUE; // Remove this key/value pair
        }
 
        guint32 offset = GPOINTER_TO_UINT (user);
        mono_alloc_static_data (&ctx->static_data, offset, FALSE);
+
+       return FALSE; // Don't remove it
 }
 
 static StaticDataFreeList*
@@ -3836,7 +3836,7 @@ mono_alloc_special_static_data (guint32 static_type, guint32 size, guint32 align
                        mono_g_hash_table_foreach (threads, alloc_thread_static_data_helper, GUINT_TO_POINTER (offset));
        } else {
                if (contexts != NULL)
-                       g_hash_table_foreach (contexts, alloc_context_static_data_helper, GUINT_TO_POINTER (offset));
+                       g_hash_table_foreach_remove (contexts, alloc_context_static_data_helper, GUINT_TO_POINTER (offset));
 
                ACCESS_SPECIAL_STATIC_OFFSET (offset, type) = SPECIAL_STATIC_OFFSET_TYPE_CONTEXT;
        }
@@ -3890,16 +3890,15 @@ free_thread_static_data_helper (gpointer key, gpointer value, gpointer user)
 /*
  * LOCKING: requires that threads_mutex is held
  */
-static void
+static gboolean
 free_context_static_data_helper (gpointer key, gpointer value, gpointer user)
 {
        uint32_t gch = GPOINTER_TO_INT (key);
        MonoAppContext *ctx = (MonoAppContext *) mono_gchandle_get_target (gch);
 
        if (!ctx) {
-               g_hash_table_remove (contexts, key);
                mono_gchandle_free (gch);
-               return;
+               return TRUE; // Remove this key/value pair
        }
 
        OffsetSize *data = user;
@@ -3908,10 +3907,12 @@ free_context_static_data_helper (gpointer key, gpointer value, gpointer user)
        char *ptr;
 
        if (!ctx->static_data || !ctx->static_data [idx])
-               return;
+               return FALSE; // Don't remove this key/value pair
 
        ptr = ((char*) ctx->static_data [idx]) + off;
        mono_gc_bzero_atomic (ptr, data->size);
+
+       return FALSE; // Don't remove this key/value pair
 }
 
 static void
@@ -3940,7 +3941,7 @@ do_free_special_slot (guint32 offset, guint32 size)
                        mono_g_hash_table_foreach (threads, free_thread_static_data_helper, &data);
        } else {
                if (contexts != NULL)
-                       g_hash_table_foreach (contexts, free_context_static_data_helper, &data);
+                       g_hash_table_foreach_remove (contexts, free_context_static_data_helper, &data);
        }
 
        if (!mono_runtime_is_shutting_down ()) {
@@ -4653,3 +4654,43 @@ mono_thread_join (gpointer tid)
        pthread_join (thread, NULL);
 #endif
 }
+
+void
+mono_thread_internal_check_for_interruption_critical (MonoInternalThread *thread)
+{
+       if ((thread->state & (ThreadState_StopRequested | ThreadState_SuspendRequested)) != 0)
+               mono_thread_interruption_checkpoint ();
+}
+
+static inline gboolean
+is_appdomainunloaded_exception (MonoClass *klass)
+{
+       static MonoClass *app_domain_unloaded_exception_klass = NULL;
+
+       if (!app_domain_unloaded_exception_klass)
+               app_domain_unloaded_exception_klass = mono_class_from_name (mono_defaults.corlib, "System", "AppDomainUnloadedException");
+       g_assert (app_domain_unloaded_exception_klass);
+
+       return klass == app_domain_unloaded_exception_klass;
+}
+
+static inline gboolean
+is_threadabort_exception (MonoClass *klass)
+{
+       return klass == mono_defaults.threadabortexception_class;
+}
+
+void
+mono_thread_internal_unhandled_exception (MonoObject* exc)
+{
+       if (mono_runtime_unhandled_exception_policy_get () == MONO_UNHANDLED_POLICY_CURRENT) {
+               MonoClass *klass = exc->vtable->klass;
+               if (is_threadabort_exception (klass)) {
+                       mono_thread_internal_reset_abort (mono_thread_internal_current ());
+               } else if (!is_appdomainunloaded_exception (klass)) {
+                       mono_unhandled_exception (exc);
+                       if (mono_environment_exitcode_get () == 1)
+                               exit (255);
+               }
+       }
+}
diff --git a/mono/metadata/tpool-epoll.c b/mono/metadata/tpool-epoll.c
deleted file mode 100644 (file)
index bab57ab..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * tpool-epoll.c: epoll related stuff
- *
- * Authors:
- *   Dietmar Maurer (dietmar@ximian.com)
- *   Gonzalo Paniagua Javier (gonzalo@ximian.com)
- *
- * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
- * Copyright 2004-2011 Novell, Inc (http://www.novell.com)
- * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
- */
-
-struct _tp_epoll_data {
-       int epollfd;
-};
-
-typedef struct _tp_epoll_data tp_epoll_data;
-static void tp_epoll_modify (gpointer p, int fd, int operation, int events, gboolean is_new);
-static void tp_epoll_shutdown (gpointer event_data);
-static void tp_epoll_wait (gpointer event_data);
-
-static gpointer
-tp_epoll_init (SocketIOData *data)
-{
-       tp_epoll_data *result;
-
-       result = g_new0 (tp_epoll_data, 1);
-#ifdef EPOLL_CLOEXEC
-       result->epollfd = epoll_create1 (EPOLL_CLOEXEC);
-#else
-       result->epollfd = epoll_create (256); /* The number does not really matter */
-       fcntl (result->epollfd, F_SETFD, FD_CLOEXEC);
-#endif
-       if (result->epollfd == -1) {
-               int err = errno;
-               if (g_getenv ("MONO_DEBUG")) {
-#ifdef EPOLL_CLOEXEC
-                       g_message ("epoll_create1(EPOLL_CLOEXEC) failed: %d %s", err, g_strerror (err));
-#else
-                       g_message ("epoll_create(256) failed: %d %s", err, g_strerror (err));
-#endif
-               }
-
-               return NULL;
-       }
-
-       data->shutdown = tp_epoll_shutdown;
-       data->modify = tp_epoll_modify;
-       data->wait = tp_epoll_wait;
-       return result;
-}
-
-static void
-tp_epoll_modify (gpointer p, int fd, int operation, int events, gboolean is_new)
-{
-       SocketIOData *socket_io_data;
-       tp_epoll_data *data;
-       struct epoll_event evt;
-       int epoll_op;
-
-       socket_io_data = p;
-       data = socket_io_data->event_data;
-
-       memset (&evt, 0, sizeof (evt));
-       evt.data.fd = fd;
-       if ((events & MONO_POLLIN) != 0)
-               evt.events |= EPOLLIN;
-       if ((events & MONO_POLLOUT) != 0)
-               evt.events |= EPOLLOUT;
-
-       epoll_op = (is_new) ? EPOLL_CTL_ADD : EPOLL_CTL_MOD;
-       if (epoll_ctl (data->epollfd, epoll_op, fd, &evt) == -1) {
-               int err = errno;
-               if (epoll_op == EPOLL_CTL_ADD && err == EEXIST) {
-                       epoll_op = EPOLL_CTL_MOD;
-                       if (epoll_ctl (data->epollfd, epoll_op, fd, &evt) == -1) {
-                               g_message ("epoll_ctl(MOD): %d %s", err, g_strerror (err));
-                       }
-               }
-       }
-       mono_mutex_unlock (&socket_io_data->io_lock);
-}
-
-static void
-tp_epoll_shutdown (gpointer event_data)
-{
-       tp_epoll_data *data = event_data;
-
-       close (data->epollfd);
-       g_free (data);
-}
-
-#define EPOLL_ERRORS (EPOLLERR | EPOLLHUP)
-#define EPOLL_NEVENTS  128
-static void
-tp_epoll_wait (gpointer p)
-{
-       SocketIOData *socket_io_data;
-       int epollfd;
-       struct epoll_event *events, *evt;
-       int ready = 0, i;
-       gpointer async_results [EPOLL_NEVENTS * 2]; // * 2 because each loop can add up to 2 results here
-       gint nresults;
-       tp_epoll_data *data;
-
-       socket_io_data = p;
-       data = socket_io_data->event_data;
-       epollfd = data->epollfd;
-       events = g_new0 (struct epoll_event, EPOLL_NEVENTS);
-
-       while (1) {
-               mono_gc_set_skip_thread (TRUE);
-
-               do {
-                       if (ready == -1) {
-                               check_for_interruption_critical ();
-                       }
-                       ready = epoll_wait (epollfd, events, EPOLL_NEVENTS, -1);
-               } while (ready == -1 && errno == EINTR);
-
-               mono_gc_set_skip_thread (FALSE);
-
-               if (ready == -1) {
-                       int err = errno;
-                       g_free (events);
-                       if (err != EBADF)
-                               g_warning ("epoll_wait: %d %s", err, g_strerror (err));
-
-                       return;
-               }
-
-               mono_mutex_lock (&socket_io_data->io_lock);
-               if (socket_io_data->inited == 3) {
-                       g_free (events);
-                       mono_mutex_unlock (&socket_io_data->io_lock);
-                       return; /* cleanup called */
-               }
-
-               nresults = 0;
-               for (i = 0; i < ready; i++) {
-                       int fd;
-                       MonoMList *list;
-                       MonoObject *ares;
-
-                       evt = &events [i];
-                       fd = evt->data.fd;
-                       list = mono_g_hash_table_lookup (socket_io_data->sock_to_state, GINT_TO_POINTER (fd));
-                       if (list != NULL && (evt->events & (EPOLLIN | EPOLL_ERRORS)) != 0) {
-                               ares = get_io_event (&list, MONO_POLLIN);
-                               if (ares != NULL)
-                                       async_results [nresults++] = ares;
-                       }
-
-                       if (list != NULL && (evt->events & (EPOLLOUT | EPOLL_ERRORS)) != 0) {
-                               ares = get_io_event (&list, MONO_POLLOUT);
-                               if (ares != NULL)
-                                       async_results [nresults++] = ares;
-                       }
-
-                       if (list != NULL) {
-                               int p;
-
-                               mono_g_hash_table_replace (socket_io_data->sock_to_state, GINT_TO_POINTER (fd), list);
-                               p = get_events_from_list (list);
-                               evt->events = (p & MONO_POLLOUT) ? EPOLLOUT : 0;
-                               evt->events |= (p & MONO_POLLIN) ? EPOLLIN : 0;
-                               if (epoll_ctl (epollfd, EPOLL_CTL_MOD, fd, evt) == -1) {
-                                       if (epoll_ctl (epollfd, EPOLL_CTL_ADD, fd, evt) == -1) {
-                                               int err = errno;
-                                               g_message ("epoll(ADD): %d %s", err, g_strerror (err));
-                                       }
-                               }
-                       } else {
-                               mono_g_hash_table_remove (socket_io_data->sock_to_state, GINT_TO_POINTER (fd));
-                               epoll_ctl (epollfd, EPOLL_CTL_DEL, fd, evt);
-                       }
-               }
-               mono_mutex_unlock (&socket_io_data->io_lock);
-               threadpool_append_jobs (&async_io_tp, (MonoObject **) async_results, nresults);
-               mono_gc_bzero_aligned (async_results, sizeof (gpointer) * nresults);
-       }
-}
-#undef EPOLL_NEVENTS
-#undef EPOLL_ERRORS
diff --git a/mono/metadata/tpool-kqueue.c b/mono/metadata/tpool-kqueue.c
deleted file mode 100644 (file)
index 1cbd26f..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * tpool-kqueue.c: kqueue related stuff
- *
- * Authors:
- *   Gonzalo Paniagua Javier (gonzalo@ximian.com)
- *
- * Copyright 2011 Novell, Inc (http://www.novell.com)
- */
-
-struct _tp_kqueue_data {
-       int fd;
-};
-
-typedef struct _tp_kqueue_data tp_kqueue_data;
-static void tp_kqueue_modify (gpointer p, int fd, int operation, int events, gboolean is_new);
-static void tp_kqueue_shutdown (gpointer event_data);
-static void tp_kqueue_wait (gpointer event_data);
-
-static gpointer
-tp_kqueue_init (SocketIOData *data)
-{
-       tp_kqueue_data *result;
-
-       result = g_new0 (tp_kqueue_data, 1);
-       result->fd = kqueue ();
-       if (result->fd == -1)
-               return NULL;
-
-       data->shutdown = tp_kqueue_shutdown;
-       data->modify = tp_kqueue_modify;
-       data->wait = tp_kqueue_wait;
-       return result;
-}
-
-static void
-kevent_change (int kfd, struct kevent *evt, const char *error_str)
-{
-       if (kevent (kfd, evt, 1, NULL, 0, NULL) == -1) {
-               int err = errno;
-               g_message ("kqueue(%s): %d %s", error_str, err, g_strerror (err));
-       }
-}
-
-static void
-tp_kqueue_modify (gpointer p, int fd, int operation, int events, gboolean is_new)
-{
-       SocketIOData *socket_io_data;
-       socket_io_data = p;
-       tp_kqueue_data *data = socket_io_data->event_data;
-       struct kevent evt;
-
-       memset (&evt, 0, sizeof (evt));
-       if ((events & MONO_POLLIN) != 0) {
-               EV_SET (&evt, fd, EVFILT_READ, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
-               kevent_change (data->fd, &evt, "ADD read");
-       }
-
-       if ((events & MONO_POLLOUT) != 0) {
-               EV_SET (&evt, fd, EVFILT_WRITE, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
-               kevent_change (data->fd, &evt, "ADD write");
-       }
-       mono_mutex_unlock (&socket_io_data->io_lock);
-}
-
-static void
-tp_kqueue_shutdown (gpointer event_data)
-{
-       tp_kqueue_data *data = event_data;
-
-       close (data->fd);
-       g_free (data);
-}
-
-#define KQUEUE_NEVENTS 128
-static void
-tp_kqueue_wait (gpointer p)
-{
-       SocketIOData *socket_io_data;
-       int kfd;
-       struct kevent *events, *evt;
-       int ready = 0, i;
-       gpointer async_results [KQUEUE_NEVENTS * 2]; // * 2 because each loop can add up to 2 results here
-       gint nresults;
-       tp_kqueue_data *data;
-
-       socket_io_data = p;
-       data = socket_io_data->event_data;
-       kfd = data->fd;
-       events = g_new0 (struct kevent, KQUEUE_NEVENTS);
-
-       while (1) {
-       
-               mono_gc_set_skip_thread (TRUE);
-
-               do {
-                       if (ready == -1) {
-                               check_for_interruption_critical ();
-                       }
-                       ready = kevent (kfd, NULL, 0, events, KQUEUE_NEVENTS, NULL);
-               } while (ready == -1 && errno == EINTR);
-
-               mono_gc_set_skip_thread (FALSE);
-
-               if (ready == -1) {
-                       int err = errno;
-                       g_free (events);
-                       if (err != EBADF)
-                               g_warning ("kevent wait: %d %s", err, g_strerror (err));
-
-                       return;
-               }
-
-               mono_mutex_lock (&socket_io_data->io_lock);
-               if (socket_io_data->inited == 3) {
-                       g_free (events);
-                       mono_mutex_unlock (&socket_io_data->io_lock);
-                       return; /* cleanup called */
-               }
-
-               nresults = 0;
-               for (i = 0; i < ready; i++) {
-                       int fd;
-                       MonoMList *list;
-                       MonoObject *ares;
-
-                       evt = &events [i];
-                       fd = evt->ident;
-                       list = mono_g_hash_table_lookup (socket_io_data->sock_to_state, GINT_TO_POINTER (fd));
-                       if (list != NULL && (evt->filter == EVFILT_READ || (evt->flags & EV_ERROR) != 0)) {
-                               ares = get_io_event (&list, MONO_POLLIN);
-                               if (ares != NULL)
-                                       async_results [nresults++] = ares;
-                       }
-                       if (list != NULL && (evt->filter == EVFILT_WRITE || (evt->flags & EV_ERROR) != 0)) {
-                               ares = get_io_event (&list, MONO_POLLOUT);
-                               if (ares != NULL)
-                                       async_results [nresults++] = ares;
-                       }
-
-                       if (list != NULL) {
-                               int p;
-
-                               mono_g_hash_table_replace (socket_io_data->sock_to_state, GINT_TO_POINTER (fd), list);
-                               p = get_events_from_list (list);
-                               if (evt->filter == EVFILT_READ && (p & MONO_POLLIN) != 0) {
-                                       EV_SET (evt, fd, EVFILT_READ, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
-                                       kevent_change (kfd, evt, "READD read");
-                               }
-
-                               if (evt->filter == EVFILT_WRITE && (p & MONO_POLLOUT) != 0) {
-                                       EV_SET (evt, fd, EVFILT_WRITE, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
-                                       kevent_change (kfd, evt, "READD write");
-                               }
-                       } else {
-                               mono_g_hash_table_remove (socket_io_data->sock_to_state, GINT_TO_POINTER (fd));
-                       }
-               }
-               mono_mutex_unlock (&socket_io_data->io_lock);
-               threadpool_append_jobs (&async_io_tp, (MonoObject **) async_results, nresults);
-               mono_gc_bzero_aligned (async_results, sizeof (gpointer) * nresults);
-       }
-}
-#undef KQUEUE_NEVENTS
-
diff --git a/mono/metadata/tpool-poll.c b/mono/metadata/tpool-poll.c
deleted file mode 100644 (file)
index 201385d..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * tpool-poll.c: poll related stuff
- *
- * Authors:
- *   Dietmar Maurer (dietmar@ximian.com)
- *   Gonzalo Paniagua Javier (gonzalo@ximian.com)
- *
- * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
- * Copyright 2004-2011 Novell, Inc (http://www.novell.com)
- */
-#include <config.h>
-#include <glib.h>
-#include <errno.h>
-
-#include <mono/metadata/mono-ptr-array.h>
-#include <mono/metadata/threadpool.h>
-#include <mono/metadata/threadpool-internals.h>
-#include <mono/utils/mono-semaphore.h>
-#include <mono/utils/mono-poll.h>
-
-#define INIT_POLLFD(a, b, c) {(a)->fd = b; (a)->events = c; (a)->revents = 0;}
-struct _tp_poll_data {
-       int pipe [2];
-       MonoSemType new_sem;
-       mono_pollfd newpfd;
-};
-
-typedef struct _tp_poll_data tp_poll_data;
-
-static void tp_poll_shutdown (gpointer event_data);
-static void tp_poll_modify (gpointer p, int fd, int operation, int events, gboolean is_new);
-static void tp_poll_wait (gpointer p);
-
-gpointer tp_poll_init (SocketIOData *data);
-
-gpointer
-tp_poll_init (SocketIOData *data)
-{
-       tp_poll_data *result;
-#ifdef HOST_WIN32
-       struct sockaddr_in client;
-       struct sockaddr_in server;
-       SOCKET srv;
-       int len;
-#endif
-
-       result = g_new0 (tp_poll_data, 1);
-#ifndef HOST_WIN32
-       if (pipe (result->pipe) != 0) {
-               int err = errno;
-               perror ("mono");
-               g_assert (err);
-       }
-#else
-       srv = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
-       g_assert (srv != INVALID_SOCKET);
-       result->pipe [1] = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
-       g_assert (result->pipe [1] != INVALID_SOCKET);
-
-       server.sin_family = AF_INET;
-       server.sin_addr.s_addr = inet_addr ("127.0.0.1");
-       server.sin_port = 0;
-       if (bind (srv, (SOCKADDR *) &server, sizeof (struct sockaddr_in))) {
-               g_print ("%d\n", WSAGetLastError ());
-               g_assert (1 != 0);
-       }
-
-       len = sizeof (server);
-       getsockname (srv, (SOCKADDR *) &server, &len);
-       listen (srv, 1);
-       if (connect ((SOCKET) result->pipe [1], (SOCKADDR *) &server, sizeof (server)) == SOCKET_ERROR) {
-               g_print ("%d\n", WSAGetLastError ());
-               g_assert (1 != 0);
-       }
-       len = sizeof (client);
-       result->pipe [0] = accept (srv, (SOCKADDR *) &client, &len);
-       g_assert (result->pipe [0] != INVALID_SOCKET);
-       closesocket (srv);
-#endif
-       MONO_SEM_INIT (&result->new_sem, 1);
-       data->shutdown = tp_poll_shutdown;
-       data->modify = tp_poll_modify;
-       data->wait = tp_poll_wait;
-       return result;
-}
-
-static void
-tp_poll_modify (gpointer p, int fd, int operation, int events, gboolean is_new)
-{
-       SocketIOData *socket_io_data;
-       tp_poll_data *data;
-       char msg [1];
-       int unused G_GNUC_UNUSED;
-
-       socket_io_data = p;
-       data = socket_io_data->event_data;
-
-       mono_mutex_unlock (&socket_io_data->io_lock);
-       
-       MONO_SEM_WAIT (&data->new_sem);
-       INIT_POLLFD (&data->newpfd, GPOINTER_TO_INT (fd), events);
-       *msg = (char) operation;
-#ifndef HOST_WIN32
-       unused = write (data->pipe [1], msg, 1);
-#else
-       unused = send ((SOCKET) data->pipe [1], msg, 1, 0);
-#endif
-}
-
-static void
-tp_poll_shutdown (gpointer event_data)
-{
-       tp_poll_data *data = event_data;
-
-#ifdef HOST_WIN32
-       closesocket (data->pipe [0]);
-       closesocket (data->pipe [1]);
-#else
-       if (data->pipe [0] > -1)
-               close (data->pipe [0]);
-       if (data->pipe [1] > -1)
-               close (data->pipe [1]);
-#endif
-       data->pipe [0] = -1;
-       data->pipe [1] = -1;
-       MONO_SEM_DESTROY (&data->new_sem);
-}
-
-static int
-mark_bad_fds (mono_pollfd *pfds, int nfds)
-{
-       int i, ret;
-       mono_pollfd *pfd;
-       int count = 0;
-
-       for (i = 0; i < nfds; i++) {
-               pfd = &pfds [i];
-               if (pfd->fd == -1)
-                       continue;
-
-               ret = mono_poll (pfd, 1, 0);
-               if (ret == -1 && errno == EBADF) {
-                       pfd->revents |= MONO_POLLNVAL;
-                       count++;
-               } else if (ret == 1) {
-                       count++;
-               }
-       }
-
-       return count;
-}
-
-static void
-tp_poll_wait (gpointer p)
-{
-#if MONO_SMALL_CONFIG
-#define INITIAL_POLLFD_SIZE    128
-#else
-#define INITIAL_POLLFD_SIZE    1024
-#endif
-#define POLL_ERRORS (MONO_POLLERR | MONO_POLLHUP | MONO_POLLNVAL)
-
-#ifdef DISABLE_SOCKETS
-#define socket_io_cleanup(x)
-#endif
-       mono_pollfd *pfds;
-       gint maxfd = 1;
-       gint allocated;
-       gint i;
-       tp_poll_data *data;
-       SocketIOData *socket_io_data = p;
-       MonoPtrArray async_results;
-       gint nresults;
-
-       data = socket_io_data->event_data;
-       allocated = INITIAL_POLLFD_SIZE;
-       pfds = g_new0 (mono_pollfd, allocated);
-       mono_ptr_array_init (async_results, allocated * 2);
-       INIT_POLLFD (pfds, data->pipe [0], MONO_POLLIN);
-       for (i = 1; i < allocated; i++)
-               INIT_POLLFD (&pfds [i], -1, 0);
-
-       while (1) {
-               int nsock = 0;
-               mono_pollfd *pfd;
-               char one [1];
-               MonoMList *list;
-               MonoObject *ares;
-
-               mono_gc_set_skip_thread (TRUE);
-
-               do {
-                       if (nsock == -1) {
-                               check_for_interruption_critical ();
-                       }
-
-                       nsock = mono_poll (pfds, maxfd, -1);
-               } while (nsock == -1 && errno == EINTR);
-
-               mono_gc_set_skip_thread (FALSE);
-
-               /* 
-                * Apart from EINTR, we only check EBADF, for the rest:
-                *  EINVAL: mono_poll() 'protects' us from descriptor
-                *      numbers above the limit if using select() by marking
-                *      then as MONO_POLLERR.  If a system poll() is being
-                *      used, the number of descriptor we're passing will not
-                *      be over sysconf(_SC_OPEN_MAX), as the error would have
-                *      happened when opening.
-                *
-                *  EFAULT: we own the memory pointed by pfds.
-                *  ENOMEM: we're doomed anyway
-                *
-                */
-
-               if (nsock == -1 && errno == EBADF) {
-                       pfds->revents = 0; /* Just in case... */
-                       nsock = mark_bad_fds (pfds, maxfd);
-               }
-
-               if ((pfds->revents & POLL_ERRORS) != 0) {
-                       /* We're supposed to die now, as the pipe has been closed */
-                       g_free (pfds);
-                       mono_ptr_array_destroy (async_results);
-                       socket_io_cleanup (socket_io_data);
-                       return;
-               }
-
-               /* Got a new socket */
-               if ((pfds->revents & MONO_POLLIN) != 0) {
-                       int nread;
-                       gboolean found = FALSE;
-
-                       for (i = 1; i < allocated; i++) {
-                               pfd = &pfds [i];
-                               if (pfd->fd == data->newpfd.fd) {
-                                       found = TRUE;
-                                       break;
-                               }
-                       }
-
-                       if (!found) {
-                               for (i = 1; i < allocated; i++) {
-                                       pfd = &pfds [i];
-                                       if (pfd->fd == -1)
-                                               break;
-                               }
-                       }
-
-                       if (i == allocated) {
-                               mono_pollfd *oldfd;
-
-                               oldfd = pfds;
-                               i = allocated;
-                               allocated = allocated * 2;
-                               pfds = g_renew (mono_pollfd, oldfd, allocated);
-                               g_free (oldfd);
-                               for (; i < allocated; i++)
-                                       INIT_POLLFD (&pfds [i], -1, 0);
-                               //async_results = g_renew (gpointer, async_results, allocated * 2);
-                       }
-#ifndef HOST_WIN32
-                       nread = read (data->pipe [0], one, 1);
-#else
-                       nread = recv ((SOCKET) data->pipe [0], one, 1, 0);
-#endif
-                       if (nread <= 0) {
-                               g_free (pfds);
-                               mono_ptr_array_destroy (async_results);
-                               return; /* we're closed */
-                       }
-
-                       INIT_POLLFD (&pfds [i], data->newpfd.fd, data->newpfd.events);
-                       memset (&data->newpfd, 0, sizeof (mono_pollfd));
-                       MONO_SEM_POST (&data->new_sem);
-                       if (i >= maxfd)
-                               maxfd = i + 1;
-                       nsock--;
-               }
-
-               if (nsock == 0)
-                       continue;
-
-               mono_mutex_lock (&socket_io_data->io_lock);
-               if (socket_io_data->inited == 3) {
-                       g_free (pfds);
-                       mono_ptr_array_destroy (async_results);
-                       mono_mutex_unlock (&socket_io_data->io_lock);
-                       return; /* cleanup called */
-               }
-
-               nresults = 0;
-               mono_ptr_array_clear (async_results);
-
-               for (i = 1; i < maxfd && nsock > 0; i++) {
-                       pfd = &pfds [i];
-                       if (pfd->fd == -1 || pfd->revents == 0)
-                               continue;
-
-                       nsock--;
-                       list = mono_g_hash_table_lookup (socket_io_data->sock_to_state, GINT_TO_POINTER (pfd->fd));
-                       if (list != NULL && (pfd->revents & (MONO_POLLIN | POLL_ERRORS)) != 0) {
-                               ares = get_io_event (&list, MONO_POLLIN);
-                               if (ares != NULL) {
-                                       mono_ptr_array_append (async_results, ares);
-                                       ++nresults;
-                               }
-                       }
-
-                       if (list != NULL && (pfd->revents & (MONO_POLLOUT | POLL_ERRORS)) != 0) {
-                               ares = get_io_event (&list, MONO_POLLOUT);
-                               if (ares != NULL) {
-                                       mono_ptr_array_append (async_results, ares);
-                                       ++nresults;
-                               }
-                       }
-
-                       if (list != NULL) {
-                               mono_g_hash_table_replace (socket_io_data->sock_to_state, GINT_TO_POINTER (pfd->fd), list);
-                               pfd->events = get_events_from_list (list);
-                       } else {
-                               mono_g_hash_table_remove (socket_io_data->sock_to_state, GINT_TO_POINTER (pfd->fd));
-                               pfd->fd = -1;
-                               if (i == maxfd - 1)
-                                       maxfd--;
-                       }
-               }
-               mono_mutex_unlock (&socket_io_data->io_lock);
-               threadpool_append_async_io_jobs ((MonoObject **) async_results.data, nresults);
-               mono_ptr_array_clear (async_results);
-       }
-}
-
index 64d6543aca9adc31201430081967578eddec89c7..d1ca2c423651574f6c4333d71e74a5490e65eaed 100755 (executable)
@@ -766,7 +766,7 @@ patch-libtool:
        chmod a+x ../../libtool
 
 # Utility target for patching libtool to get rid of the 'ranlib: file <file> has no symbols" warnings
-patch-libtool-osx:
+patch-osx-libtool:
        sed -e 's/old_archive_cmds=.*/old_archive_cmds="libtool -no_warning_for_no_symbols -static -o \\$$oldlib \\$$oldobjs"/g' < ../../libtool > 2; mv 2 ../../libtool
        chmod a+x ../../libtool
 
index c779920808f702cc341dc7231d0c80b6385a8b9f..64372e06c24db1d9043a75eadb017f15150238b6 100644 (file)
@@ -2,6 +2,7 @@ using System;
 using System.Reflection;
 using System.Collections.Generic;
 
+[AttributeUsageAttribute(AttributeTargets.All, Inherited = true, AllowMultiple = true)]
 public class CategoryAttribute : Attribute
 {
        public CategoryAttribute (string category) {
index c8d3372fe70dd577fcb1046dd0b8a4980a59b96e..2d9a03b1bb2f72394c03b84ec92022caab725148 100644 (file)
@@ -213,12 +213,10 @@ typedef struct MonoAotCompile {
        GHashTable *unwind_info_offsets;
        GPtrArray *unwind_ops;
        guint32 unwind_info_offset;
-       char *got_symbol_base;
-       char *llvm_got_symbol_base;
+       char *global_prefix;
        char *got_symbol;
        char *llvm_got_symbol;
        char *plt_symbol;
-       char *methods_symbol;
        char *llvm_eh_frame_symbol;
        GHashTable *method_label_hash;
        const char *temp_prefix;
@@ -228,6 +226,7 @@ typedef struct MonoAotCompile {
        int align_pad_value;
        guint32 label_generator;
        gboolean llvm;
+       gboolean has_jitted_code;
        MonoAotFileFlags flags;
        MonoDynamicStream blob;
        MonoClass **typespec_classes;
@@ -509,9 +508,31 @@ emit_symbol_size (MonoAotCompile *acfg, const char *name, const char *end_label)
        mono_img_writer_emit_symbol_size (acfg->w, name, end_label);
 }
 
+/* Emit a symbol which is referenced by the MonoAotFileInfo structure */
+static void
+emit_info_symbol (MonoAotCompile *acfg, const char *name)
+{
+       char symbol [256];
+
+       if (acfg->llvm) {
+               emit_label (acfg, name);
+               /* LLVM generated code references this */
+               sprintf (symbol, "%s%s", acfg->user_symbol_prefix, name);
+               emit_label (acfg, symbol);
+               emit_global (acfg, symbol, FALSE);
+       } else {
+               emit_label (acfg, name);
+       }
+}
+
 static void
 emit_string_symbol (MonoAotCompile *acfg, const char *name, const char *value)
 {
+       if (acfg->llvm) {
+               mono_llvm_emit_aot_data (name, (guint8*)value, strlen (value) + 1);
+               return;
+       }
+
        mono_img_writer_emit_section_change (acfg->w, RODATA_SECT, 1);
 #ifdef TARGET_MACH
        /* On apple, all symbols need to be aligned to avoid warnings from ld */
@@ -608,6 +629,36 @@ encode_sleb128 (gint32 value, guint8 *buf, guint8 **endbuf)
        *endbuf = p;
 }
 
+static void
+encode_int (gint32 val, guint8 *buf, guint8 **endbuf)
+{
+       // FIXME: Big-endian
+       buf [0] = (val >> 0) & 0xff;
+       buf [1] = (val >> 8) & 0xff;
+       buf [2] = (val >> 16) & 0xff;
+       buf [3] = (val >> 24) & 0xff;
+
+       *endbuf = buf + 4;
+}
+
+static void
+encode_int16 (guint16 val, guint8 *buf, guint8 **endbuf)
+{
+       buf [0] = (val >> 0) & 0xff;
+       buf [1] = (val >> 8) & 0xff;
+
+       *endbuf = buf + 2;
+}
+
+static void
+encode_string (const char *s, guint8 *buf, guint8 **endbuf)
+{
+       int len = strlen (s);
+
+       memcpy (buf, s, len + 1);
+       *endbuf = buf + len + 1;
+}
+
 static void
 emit_unset_mode (MonoAotCompile *acfg)
 {
@@ -1167,24 +1218,25 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg)
        guint8 *code;
        guint8 *loop_start, *loop_branch_back, *loop_end_check, *imt_found_check;
        int i;
+       int pagesize = MONO_AOT_TRAMP_PAGE_SIZE;
 #define COMMON_TRAMP_SIZE 16
-       int count = (mono_pagesize () - COMMON_TRAMP_SIZE) / 8;
+       int count = (pagesize - COMMON_TRAMP_SIZE) / 8;
        int imm8, rot_amount;
        char symbol [128];
 
        if (!acfg->aot_opts.use_trampolines_page)
                return;
 
-       acfg->tramp_page_size = mono_pagesize ();
+       acfg->tramp_page_size = pagesize;
 
        sprintf (symbol, "%sspecific_trampolines_page", acfg->user_symbol_prefix);
-       emit_alignment (acfg, mono_pagesize ());
+       emit_alignment (acfg, pagesize);
        emit_global (acfg, symbol, TRUE);
        emit_label (acfg, symbol);
 
        /* emit the generic code first, the trampoline address + 8 is in the lr register */
        code = buf;
-       imm8 = mono_arm_is_rotated_imm8 (mono_pagesize (), &rot_amount);
+       imm8 = mono_arm_is_rotated_imm8 (pagesize, &rot_amount);
        ARM_SUB_REG_IMM (code, ARMREG_LR, ARMREG_LR, imm8, rot_amount);
        ARM_LDR_IMM (code, ARMREG_R1, ARMREG_LR, -8);
        ARM_LDR_IMM (code, ARMREG_PC, ARMREG_LR, -4);
@@ -1212,7 +1264,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg)
        emit_global (acfg, symbol, TRUE);
        emit_label (acfg, symbol);
        code = buf;
-       imm8 = mono_arm_is_rotated_imm8 (mono_pagesize (), &rot_amount);
+       imm8 = mono_arm_is_rotated_imm8 (pagesize, &rot_amount);
        ARM_SUB_REG_IMM (code, ARMREG_IP, ARMREG_IP, imm8, rot_amount);
        ARM_LDR_IMM (code, MONO_ARCH_RGCTX_REG, ARMREG_IP, -8);
        ARM_LDR_IMM (code, ARMREG_PC, ARMREG_IP, -4);
@@ -1239,7 +1291,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg)
        emit_label (acfg, symbol);
        code = buf;
        ARM_PUSH (code, (1 << ARMREG_R0) | (1 << ARMREG_R1) | (1 << ARMREG_R2) | (1 << ARMREG_R3));
-       imm8 = mono_arm_is_rotated_imm8 (mono_pagesize (), &rot_amount);
+       imm8 = mono_arm_is_rotated_imm8 (pagesize, &rot_amount);
        ARM_SUB_REG_IMM (code, ARMREG_IP, ARMREG_IP, imm8, rot_amount);
        ARM_LDR_IMM (code, ARMREG_R0, ARMREG_IP, -8);
        ARM_LDR_IMM (code, ARMREG_PC, ARMREG_IP, -4);
@@ -1269,7 +1321,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg)
        /* Need at least two free registers, plus a slot for storing the pc */
        ARM_PUSH (code, (1 << ARMREG_R0)|(1 << ARMREG_R1)|(1 << ARMREG_R2));
 
-       imm8 = mono_arm_is_rotated_imm8 (mono_pagesize (), &rot_amount);
+       imm8 = mono_arm_is_rotated_imm8 (pagesize, &rot_amount);
        ARM_SUB_REG_IMM (code, ARMREG_IP, ARMREG_IP, imm8, rot_amount);
        ARM_LDR_IMM (code, ARMREG_R0, ARMREG_IP, -8);
 
@@ -2333,11 +2385,12 @@ add_to_blob_aligned (MonoAotCompile *acfg, const guint8 *data, guint32 data_len,
  * a given entry. Returns the size of the table.
  */
 static guint32
-emit_offset_table (MonoAotCompile *acfg, int noffsets, int group_size, gint32 *offsets)
+emit_offset_table (MonoAotCompile *acfg, const char *symbol, int noffsets, int group_size, gint32 *offsets)
 {
        gint32 current_offset;
        int i, buf_size, ngroups, index_entry_size;
        guint8 *p, *buf;
+       guint8 *data_p, *data_buf;
        guint32 *index_offsets;
 
        ngroups = (noffsets + (group_size - 1)) / group_size;
@@ -2361,30 +2414,49 @@ emit_offset_table (MonoAotCompile *acfg, int noffsets, int group_size, gint32 *o
                }
                current_offset = offsets [i];
        }
+       data_buf = buf;
+       data_p = p;
 
        if (ngroups && index_offsets [ngroups - 1] < 65000)
                index_entry_size = 2;
        else
                index_entry_size = 4;
 
+       buf_size = (data_p - data_buf) + (ngroups * 4) + 16;
+       p = buf = g_malloc0 (buf_size);
+
        /* Emit the header */
-       emit_int32 (acfg, noffsets);
-       emit_int32 (acfg, group_size);
-       emit_int32 (acfg, ngroups);
-       emit_int32 (acfg, index_entry_size);
+       encode_int (noffsets, p, &p);
+       encode_int (group_size, p, &p);
+       encode_int (ngroups, p, &p);
+       encode_int (index_entry_size, p, &p);
 
        /* Emit the index */
        for (i = 0; i < ngroups; ++i) {
                if (index_entry_size == 2)
-                       emit_int16 (acfg, index_offsets [i]);
+                       encode_int16 (index_offsets [i], p, &p);
                else
-                       emit_int32 (acfg, index_offsets [i]);
+                       encode_int (index_offsets [i], p, &p);
        }
-
        /* Emit the data */
-       emit_bytes (acfg, buf, p - buf);
+       memcpy (p, data_buf, data_p - data_buf);
+       p += data_p - data_buf;
+
+       g_assert (p - buf <= buf_size);
+
+       if (acfg->llvm) {
+               mono_llvm_emit_aot_data (symbol, buf, p - buf);
+       } else {
+               emit_section_change (acfg, RODATA_SECT, 1);
+               emit_alignment (acfg, 8);
+               emit_label (acfg, symbol);
+               emit_bytes (acfg, buf, p - buf);
+       }
+
+       g_free (buf);
+       g_free (data_buf);
 
-    return (int)(p - buf) + (ngroups * 4);
+    return (int)(p - buf);
 }
 
 static guint32
@@ -3261,7 +3333,7 @@ add_method (MonoAotCompile *acfg, MonoMethod *method)
 static void
 add_extra_method_with_depth (MonoAotCompile *acfg, MonoMethod *method, int depth)
 {
-       if (mono_method_is_generic_sharable_full (method, FALSE, TRUE, FALSE))
+       if (mono_method_is_generic_sharable_full (method, TRUE, TRUE, FALSE))
                method = mini_get_shared_method (method);
        else if ((acfg->opts & MONO_OPT_GSHAREDVT) && prefer_gsharedvt_method (acfg, method) && mono_method_is_generic_sharable_full (method, FALSE, FALSE, TRUE))
                /* Use the gsharedvt version */
@@ -4249,6 +4321,24 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
                        add_generic_class (acfg, mono_class_inflate_generic_class (enum_comparer, &ctx), FALSE, "EqualityComparer<T>");
                }
        }
+
+       /* Add an instance of ObjectComparer<T> which is created dynamically by Comparer<T> for enums */
+       if (klass->image == mono_defaults.corlib && !strcmp (klass->name_space, "System.Collections.Generic") && !strcmp (klass->name, "Comparer`1")) {
+               MonoClass *comparer;
+               MonoClass *tclass = mono_class_from_mono_type (klass->generic_class->context.class_inst->type_argv [0]);
+               MonoGenericContext ctx;
+               MonoType *args [16];
+
+               if (mono_class_is_enum (tclass)) {
+                       memset (&ctx, 0, sizeof (ctx));
+                       args [0] = &tclass->byval_arg;
+                       ctx.class_inst = mono_metadata_get_generic_inst (1, args);
+
+                       comparer = mono_class_from_name (mono_defaults.corlib, "System.Collections.Generic", "ObjectComparer`1");
+                       g_assert (comparer);
+                       add_generic_class (acfg, mono_class_inflate_generic_class (comparer, &ctx), FALSE, "Comparer<T>");
+               }
+       }
 }
 
 static void
@@ -5377,7 +5467,6 @@ static void
 emit_method_info (MonoAotCompile *acfg, MonoCompile *cfg)
 {
        MonoMethod *method;
-       GList *l;
        int pindex, buf_size, n_patches;
        GPtrArray *patches;
        MonoJumpInfo *patch_info;
@@ -5410,16 +5499,7 @@ emit_method_info (MonoAotCompile *acfg, MonoCompile *cfg)
                /* Not needed when loading the method */
                encode_value (0, p, &p);
 
-       /* String table */
-       if (cfg->opt & MONO_OPT_SHARED) {
-               encode_value (g_list_length (cfg->ldstr_list), p, &p);
-               for (l = cfg->ldstr_list; l; l = l->next) {
-                       encode_value ((long)l->data, p, &p);
-               }
-       }
-       else
-               /* Used only in shared mode */
-               g_assert (!cfg->ldstr_list);
+       g_assert (!(cfg->opt & MONO_OPT_SHARED));
 
        n_patches = 0;
        for (pindex = 0; pindex < patches->len; ++pindex) {
@@ -5704,34 +5784,8 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg, gboolean stor
                p += p2 - buf2;
                g_free (buf2);
 
-               if (gsctx && (gsctx->var_is_vt || gsctx->mvar_is_vt)) {
-                       MonoMethodInflated *inflated;
-                       MonoGenericContext *context;
-                       MonoGenericInst *inst;
-
-                       g_assert (jinfo->d.method->is_inflated);
-                       inflated = (MonoMethodInflated*)jinfo->d.method;
-                       context = &inflated->context;
-
+               if (gsctx && gsctx->is_gsharedvt) {
                        encode_value (1, p, &p);
-                       if (context->class_inst) {
-                               inst = context->class_inst;
-
-                               encode_value (inst->type_argc, p, &p);
-                               for (i = 0; i < inst->type_argc; ++i)
-                                       encode_value (gsctx->var_is_vt [i], p, &p);
-                       } else {
-                               encode_value (0, p, &p);
-                       }
-                       if (context->method_inst) {
-                               inst = context->method_inst;
-
-                               encode_value (inst->type_argc, p, &p);
-                               for (i = 0; i < inst->type_argc; ++i)
-                                       encode_value (gsctx->mvar_is_vt [i], p, &p);
-                       } else {
-                               encode_value (0, p, &p);
-                       }
                } else {
                        encode_value (0, p, &p);
                }
@@ -5924,7 +5978,7 @@ emit_plt (MonoAotCompile *acfg)
 
        emit_section_change (acfg, ".text", 0);
        emit_alignment_code (acfg, NACL_SIZE(16, kNaClAlignment));
-       emit_label (acfg, symbol);
+       emit_info_symbol (acfg, symbol);
        emit_label (acfg, acfg->plt_symbol);
 
        for (i = 0; i < acfg->plt_offset; ++i) {
@@ -6029,7 +6083,7 @@ emit_plt (MonoAotCompile *acfg)
        emit_symbol_size (acfg, acfg->plt_symbol, ".");
 
        sprintf (symbol, "plt_end");
-       emit_label (acfg, symbol);
+       emit_info_symbol (acfg, symbol);
 }
 
 /*
@@ -6193,8 +6247,6 @@ emit_trampolines (MonoAotCompile *acfg)
                        emit_trampoline (acfg, acfg->got_offset, info);
                }
 
-               mono_arch_get_nullified_class_init_trampoline (&info);
-               emit_trampoline (acfg, acfg->got_offset, info);
 #if defined(MONO_ARCH_MONITOR_OBJECT_REG)
                mono_arch_create_monitor_enter_trampoline (&info, FALSE, TRUE);
                emit_trampoline (acfg, acfg->got_offset, info);
@@ -6339,7 +6391,7 @@ emit_trampolines (MonoAotCompile *acfg)
                                emit_local_symbol (acfg, symbol, end_symbol, TRUE);
 
                        emit_alignment_code (acfg, AOT_FUNC_ALIGNMENT);
-                       emit_label (acfg, symbol);
+                       emit_info_symbol (acfg, symbol);
 
                        acfg->trampoline_got_offset_base [ntype] = tramp_got_offset;
 
@@ -6827,7 +6879,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                flags |= JIT_FLAG_LLVM;
        if (acfg->aot_opts.no_direct_calls)
                flags |= JIT_FLAG_NO_DIRECT_ICALLS;
-       cfg = mini_method_compile (method, acfg->opts, mono_get_root_domain (), flags, 0);
+       cfg = mini_method_compile (method, acfg->opts, mono_get_root_domain (), flags, 0, index);
        mono_loader_clear_error ();
 
        if (cfg->exception_type == MONO_EXCEPTION_GENERIC_SHARING_FAILED) {
@@ -6915,6 +6967,9 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                return;
        }
 
+       if (!cfg->compile_llvm)
+               acfg->has_jitted_code = TRUE;
+
        if (method->is_inflated && acfg->aot_opts.log_instances) {
                if (acfg->instances_logfile)
                        fprintf (acfg->instances_logfile, "%s ### %d\n", mono_method_full_name (method, TRUE), cfg->code_size);
@@ -6931,14 +6986,27 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
        if (!acfg->aot_opts.no_instances && depth < 32) {
                for (patch_info = cfg->patch_info; patch_info; patch_info = patch_info->next) {
                        switch (patch_info->type) {
+                       case MONO_PATCH_INFO_RGCTX_FETCH:
                        case MONO_PATCH_INFO_METHOD: {
-                               MonoMethod *m = patch_info->data.method;
+                               MonoMethod *m = NULL;
+
+                               if (patch_info->type == MONO_PATCH_INFO_RGCTX_FETCH) {
+                                       MonoJumpInfoRgctxEntry *e = patch_info->data.rgctx_entry;
+
+                                       if (e->info_type == MONO_RGCTX_INFO_GENERIC_METHOD_CODE)
+                                               m = e->data->data.method;
+                               } else {
+                                       m = patch_info->data.method;
+                               }
+
+                               if (!m)
+                                       break;
                                if (m->is_inflated) {
                                        if (!(mono_class_generic_sharing_enabled (m->klass) &&
                                                  mono_method_is_generic_sharable_full (m, FALSE, FALSE, FALSE)) &&
-                                               !method_has_type_vars (m)) {
+                                               (!method_has_type_vars (m) || mono_method_is_generic_sharable_full (m, TRUE, TRUE, FALSE))) {
                                                if (m->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) {
-                                                       if (mono_aot_mode_is_full (&acfg->aot_opts))
+                                                       if (mono_aot_mode_is_full (&acfg->aot_opts) && !method_has_type_vars (m))
                                                                add_extra_method_with_depth (acfg, mono_marshal_get_native_wrapper (m, TRUE, TRUE), depth + 1);
                                                } else {
                                                        add_extra_method_with_depth (acfg, m, depth + 1);
@@ -7300,8 +7368,10 @@ execute_system (const char * command)
        g_free (wstr);
 
        g_free (command);
-#else
+#elif defined (HAVE_SYSTEM)
        status = system (command);
+#else
+       g_assert_not_reached ();
 #endif
 
        return status;
@@ -7372,7 +7442,7 @@ emit_llvm_file (MonoAotCompile *acfg)
        if (acfg->aot_opts.mtriple)
                g_string_append_printf (acfg->llc_args, " -mtriple=%s", acfg->aot_opts.mtriple);
 
-       g_string_append_printf (acfg->llc_args, " -mono-eh-frame-symbol=%s", acfg->llvm_eh_frame_symbol);
+       g_string_append_printf (acfg->llc_args, " -mono-eh-frame-symbol=%s%s", acfg->user_symbol_prefix, acfg->llvm_eh_frame_symbol);
 
 #if defined(TARGET_MACH) && defined(TARGET_ARM)
        /* ios requires PIC code now */
@@ -7383,7 +7453,6 @@ emit_llvm_file (MonoAotCompile *acfg)
        else
                g_string_append_printf (acfg->llc_args, " -relocation-model=pic");
 #endif
-       unlink (acfg->tmpfname);
 
        if (acfg->llvm_owriter) {
                /* Emit an object file directly */
@@ -7424,20 +7493,7 @@ emit_code (MonoAotCompile *acfg)
         */
        emit_section_change (acfg, ".text", 0);
        emit_alignment_code (acfg, 8);
-       if (acfg->llvm) {
-               for (i = 0; i < acfg->nmethods; ++i) {
-                       if (acfg->cfgs [i] && acfg->cfgs [i]->compile_llvm) {
-                               acfg->methods_symbol = g_strdup (acfg->cfgs [i]->asm_symbol);
-                               break;
-                       }
-               }
-       }
-       if (!acfg->methods_symbol) {
-               sprintf (symbol, "methods");
-               emit_label (acfg, symbol);
-               acfg->methods_symbol = g_strdup (symbol);
-       }
-       emit_label (acfg, "jit_code_start");
+       emit_info_symbol (acfg, "jit_code_start");
 
        /* 
         * Emit some padding so the local symbol for the first method doesn't have the
@@ -7497,7 +7553,7 @@ emit_code (MonoAotCompile *acfg)
 
        emit_section_change (acfg, ".text", 0);
        emit_alignment_code (acfg, 8);
-       emit_label (acfg, "jit_code_end");
+       emit_info_symbol (acfg, "jit_code_end");
 
        /* To distinguish it from the next symbol */
        emit_padding (acfg, 4);
@@ -7524,7 +7580,7 @@ emit_code (MonoAotCompile *acfg)
        sprintf (symbol, "method_addresses");
        emit_section_change (acfg, ".text", 1);
        emit_alignment_code (acfg, 8);
-       emit_label (acfg, symbol);
+       emit_info_symbol (acfg, symbol);
        emit_local_symbol (acfg, symbol, "method_addresses_end", TRUE);
        emit_unset_mode (acfg);
        if (acfg->need_no_dead_strip)
@@ -7549,7 +7605,7 @@ emit_code (MonoAotCompile *acfg)
        sprintf (symbol, "unbox_trampolines");
        emit_section_change (acfg, RODATA_SECT, 0);
        emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
+       emit_info_symbol (acfg, symbol);
 
        prev_index = -1;
        for (i = 0; i < acfg->nmethods; ++i) {
@@ -7573,14 +7629,14 @@ emit_code (MonoAotCompile *acfg)
                }
        }
        sprintf (symbol, "unbox_trampolines_end");
-       emit_label (acfg, symbol);
+       emit_info_symbol (acfg, symbol);
        emit_int32 (acfg, 0);
 
        /* Emit a separate table with the trampoline addresses/offsets */
        sprintf (symbol, "unbox_trampoline_addresses");
        emit_section_change (acfg, ".text", 0);
        emit_alignment_code (acfg, 8);
-       emit_label (acfg, symbol);
+       emit_info_symbol (acfg, symbol);
 
        for (i = 0; i < acfg->nmethods; ++i) {
                MonoCompile *cfg;
@@ -7611,7 +7667,6 @@ static void
 emit_info (MonoAotCompile *acfg)
 {
        int oindex, i;
-       char symbol [256];
        gint32 *offsets;
 
        offsets = g_new0 (gint32, acfg->nmethods);
@@ -7627,12 +7682,7 @@ emit_info (MonoAotCompile *acfg)
                }
        }
 
-       sprintf (symbol, "method_info_offsets");
-       emit_section_change (acfg, RODATA_SECT, 1);
-       emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
-
-       acfg->stats.offsets_size += emit_offset_table (acfg, acfg->nmethods, 10, offsets);
+       acfg->stats.offsets_size += emit_offset_table (acfg, "method_info_offsets", acfg->nmethods, 10, offsets);
 
        g_free (offsets);
 }
@@ -7927,46 +7977,61 @@ emit_extra_methods (MonoAotCompile *acfg)
 
        //printf ("MAX: %d\n", max_chain_length);
 
-       /* Emit the table */
-       sprintf (symbol, "extra_method_table");
-       emit_section_change (acfg, RODATA_SECT, 0);
-       emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
+       buf_size = table->len * 12 + 4;
+       p = buf = g_malloc (buf_size);
+       encode_int (table_size, p, &p);
 
-       emit_int32 (acfg, table_size);
        for (i = 0; i < table->len; ++i) {
                HashEntry *entry = g_ptr_array_index (table, i);
 
                if (entry == NULL) {
-                       emit_int32 (acfg, 0);
-                       emit_int32 (acfg, 0);
-                       emit_int32 (acfg, 0);
+                       encode_int (0, p, &p);
+                       encode_int (0, p, &p);
+                       encode_int (0, p, &p);
                } else {
                        //g_assert (entry->key > 0);
-                       emit_int32 (acfg, entry->key);
-                       emit_int32 (acfg, entry->value);
+                       encode_int (entry->key, p, &p);
+                       encode_int (entry->value, p, &p);
                        if (entry->next)
-                               emit_int32 (acfg, entry->next->index);
+                               encode_int (entry->next->index, p, &p);
                        else
-                               emit_int32 (acfg, 0);
+                               encode_int (0, p, &p);
                }
        }
+       g_assert (p - buf <= buf_size);
+
+       /* Emit the table */
+       if (acfg->llvm) {
+               mono_llvm_emit_aot_data ("extra_method_table", buf, p - buf);
+       } else {
+               sprintf (symbol, "extra_method_table");
+               emit_section_change (acfg, RODATA_SECT, 0);
+               emit_alignment (acfg, 8);
+               emit_label (acfg, symbol);
+               emit_bytes (acfg, buf, p - buf);
+       }
 
        /* 
         * Emit a table reverse mapping method indexes to their index in extra_method_info.
         * This is used by mono_aot_find_jit_info ().
         */
-       sprintf (symbol, "extra_method_info_offsets");
-       emit_section_change (acfg, RODATA_SECT, 0);
-       emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
-
-       emit_int32 (acfg, acfg->extra_methods->len);
+       buf_size = acfg->extra_methods->len * 8 + 4;
+       p = buf = g_malloc (buf_size);
+       encode_int (acfg->extra_methods->len, p, &p);
        for (i = 0; i < acfg->extra_methods->len; ++i) {
                MonoMethod *method = g_ptr_array_index (acfg->extra_methods, i);
 
-               emit_int32 (acfg, get_method_index (acfg, method));
-               emit_int32 (acfg, info_offsets [i]);
+               encode_int (get_method_index (acfg, method), p, &p);
+               encode_int (info_offsets [i], p, &p);
+       }
+       if (acfg->llvm) {
+               mono_llvm_emit_aot_data ("extra_method_info_offsets", buf, p - buf);
+       } else {
+               sprintf (symbol, "extra_method_info_offsets");
+               emit_section_change (acfg, RODATA_SECT, 0);
+               emit_alignment (acfg, 8);
+               emit_label (acfg, symbol);
+               emit_bytes (acfg, buf, p - buf);
        }
 }      
 
@@ -7974,7 +8039,6 @@ static void
 emit_exception_info (MonoAotCompile *acfg)
 {
        int i;
-       char symbol [256];
        gint32 *offsets;
        SeqPointData sp_data;
        gboolean seq_points_to_file = FALSE;
@@ -8013,12 +8077,7 @@ emit_exception_info (MonoAotCompile *acfg)
                g_free (seq_points_aot_file);
        }
 
-       sprintf (symbol, "ex_info_offsets");
-       emit_section_change (acfg, RODATA_SECT, 1);
-       emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
-
-       acfg->stats.offsets_size += emit_offset_table (acfg, acfg->nmethods, 10, offsets);
+       acfg->stats.offsets_size += emit_offset_table (acfg, "ex_info_offsets", acfg->nmethods, 10, offsets);
        g_free (offsets);
 }
 
@@ -8037,7 +8096,7 @@ emit_unwind_info (MonoAotCompile *acfg)
        sprintf (symbol, "unwind_info");
        emit_section_change (acfg, RODATA_SECT, 1);
        emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
+       emit_info_symbol (acfg, symbol);
 
        for (i = 0; i < acfg->unwind_ops->len; ++i) {
                guint32 index = GPOINTER_TO_UINT (g_ptr_array_index (acfg->unwind_ops, i));
@@ -8061,19 +8120,13 @@ static void
 emit_class_info (MonoAotCompile *acfg)
 {
        int i;
-       char symbol [256];
        gint32 *offsets;
 
        offsets = g_new0 (gint32, acfg->image->tables [MONO_TABLE_TYPEDEF].rows);
        for (i = 0; i < acfg->image->tables [MONO_TABLE_TYPEDEF].rows; ++i)
                offsets [i] = emit_klass_info (acfg, MONO_TOKEN_TYPE_DEF | (i + 1));
 
-       sprintf (symbol, "class_info_offsets");
-       emit_section_change (acfg, RODATA_SECT, 1);
-       emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
-
-       acfg->stats.offsets_size += emit_offset_table (acfg, acfg->image->tables [MONO_TABLE_TYPEDEF].rows, 10, offsets);
+       acfg->stats.offsets_size += emit_offset_table (acfg, "class_info_offsets", acfg->image->tables [MONO_TABLE_TYPEDEF].rows, 10, offsets);
        g_free (offsets);
 }
 
@@ -8085,11 +8138,12 @@ typedef struct ClassNameTableEntry {
 static void
 emit_class_name_table (MonoAotCompile *acfg)
 {
-       int i, table_size;
+       int i, table_size, buf_size;
        guint32 token, hash;
        MonoClass *klass;
        GPtrArray *table;
        char *full_name;
+       guint8 *buf, *p;
        char symbol [256];
        ClassNameTableEntry *entry, *new_entry;
 
@@ -8131,48 +8185,61 @@ emit_class_name_table (MonoAotCompile *acfg)
        }
 
        /* Emit the table */
-       sprintf (symbol, "class_name_table");
-       emit_section_change (acfg, RODATA_SECT, 0);
-       emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
+       buf_size = table->len * 4 + 4;
+       p = buf = g_malloc0 (buf_size);
 
        /* FIXME: Optimize memory usage */
        g_assert (table_size < 65000);
-       emit_int16 (acfg, table_size);
+       encode_int16 (table_size, p, &p);
        g_assert (table->len < 65000);
        for (i = 0; i < table->len; ++i) {
                ClassNameTableEntry *entry = g_ptr_array_index (table, i);
 
                if (entry == NULL) {
-                       emit_int16 (acfg, 0);
-                       emit_int16 (acfg, 0);
+                       encode_int16 (0, p, &p);
+                       encode_int16 (0, p, &p);
                } else {
-                       emit_int16 (acfg, mono_metadata_token_index (entry->token));
+                       encode_int16 (mono_metadata_token_index (entry->token), p, &p);
                        if (entry->next)
-                               emit_int16 (acfg, entry->next->index);
+                               encode_int16 (entry->next->index, p, &p);
                        else
-                               emit_int16 (acfg, 0);
+                               encode_int16 (0, p, &p);
                }
        }
+       g_assert (p - buf <= buf_size);
+
+       if (acfg->llvm) {
+               mono_llvm_emit_aot_data ("class_name_table", buf, p - buf);
+       } else {
+               sprintf (symbol, "class_name_table");
+               emit_section_change (acfg, RODATA_SECT, 0);
+               emit_alignment (acfg, 8);
+               emit_label (acfg, symbol);
+               emit_bytes (acfg, buf, p - buf);
+       }
 }
 
 static void
 emit_image_table (MonoAotCompile *acfg)
 {
-       int i;
+       int i, buf_size;
        char symbol [256];
+       guint8 *buf, *p;
 
        /*
         * The image table is small but referenced in a lot of places.
         * So we emit it at once, and reference its elements by an index.
         */
+       buf_size = acfg->image_table->len * 28 + 4;
+       for (i = 0; i < acfg->image_table->len; i++) {
+               MonoImage *image = (MonoImage*)g_ptr_array_index (acfg->image_table, i);
+               MonoAssemblyName *aname = &image->assembly->aname;
 
-       sprintf (symbol, "image_table");
-       emit_section_change (acfg, RODATA_SECT, 1);
-       emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
+               buf_size += strlen (image->assembly_name) + strlen (image->guid) + (aname->culture ? strlen (aname->culture) : 1) + strlen ((char*)aname->public_key_token) + 4;
+       }
 
-       emit_int32 (acfg, acfg->image_table->len);
+       buf = p = g_malloc0 (buf_size);
+       encode_int (acfg->image_table->len, p, &p);
        for (i = 0; i < acfg->image_table->len; i++) {
                MonoImage *image = (MonoImage*)g_ptr_array_index (acfg->image_table, i);
                MonoAssemblyName *aname = &image->assembly->aname;
@@ -8180,24 +8247,38 @@ emit_image_table (MonoAotCompile *acfg)
                /* FIXME: Support multi-module assemblies */
                g_assert (image->assembly->image == image);
 
-               emit_string (acfg, image->assembly_name);
-               emit_string (acfg, image->guid);
-               emit_string (acfg, aname->culture ? aname->culture : "");
-               emit_string (acfg, (const char*)aname->public_key_token);
+               encode_string (image->assembly_name, p, &p);
+               encode_string (image->guid, p, &p);
+               encode_string (aname->culture ? aname->culture : "", p, &p);
+               encode_string ((const char*)aname->public_key_token, p, &p);
+
+               while (GPOINTER_TO_UINT (p) % 8 != 0)
+                       p ++;
+
+               encode_int (aname->flags, p, &p);
+               encode_int (aname->major, p, &p);
+               encode_int (aname->minor, p, &p);
+               encode_int (aname->build, p, &p);
+               encode_int (aname->revision, p, &p);
+       }
+       g_assert (p - buf <= buf_size);
 
+       if (acfg->llvm) {
+               mono_llvm_emit_aot_data ("image_table", buf, p - buf);
+       } else {
+               sprintf (symbol, "image_table");
+               emit_section_change (acfg, RODATA_SECT, 1);
                emit_alignment (acfg, 8);
-               emit_int32 (acfg, aname->flags);
-               emit_int32 (acfg, aname->major);
-               emit_int32 (acfg, aname->minor);
-               emit_int32 (acfg, aname->build);
-               emit_int32 (acfg, aname->revision);
+               emit_label (acfg, symbol);
+               emit_bytes (acfg, buf, p - buf);
        }
+
+       g_free (buf);
 }
 
 static void
 emit_got_info (MonoAotCompile *acfg, gboolean llvm)
 {
-       char symbol [256];
        int i, first_plt_got_patch = 0, buf_size;
        guint8 *p, *buf;
        guint32 *got_info_offsets;
@@ -8258,16 +8339,9 @@ emit_got_info (MonoAotCompile *acfg, gboolean llvm)
        }
 
        /* Emit got_info_offsets table */
-       if (llvm)
-               sprintf (symbol, "llvm_got_info_offsets");
-       else
-               sprintf (symbol, "got_info_offsets");
-       emit_section_change (acfg, RODATA_SECT, 1);
-       emit_alignment (acfg, 8);
-       emit_label (acfg, symbol);
 
        /* No need to emit offsets for the got plt entries, the plt embeds them directly */
-       acfg->stats.offsets_size += emit_offset_table (acfg, llvm ? acfg->llvm_got_offset : first_plt_got_patch, 10, (gint32*)got_info_offsets);
+       acfg->stats.offsets_size += emit_offset_table (acfg, llvm ? "llvm_got_info_offsets" : "got_info_offsets", llvm ? acfg->llvm_got_offset : first_plt_got_patch, 10, (gint32*)got_info_offsets);
 }
 
 static void
@@ -8281,6 +8355,8 @@ emit_got (MonoAotCompile *acfg)
        emit_alignment (acfg, 8);
        emit_local_symbol (acfg, symbol, "got_end", FALSE);
        emit_label (acfg, symbol);
+       if (acfg->llvm)
+               emit_info_symbol (acfg, "jit_got");
        if (acfg->got_offset > 0)
                emit_zero_bytes (acfg, (int)(acfg->got_offset * sizeof (gpointer)));
 
@@ -8432,37 +8508,113 @@ emit_mem_end (MonoAotCompile *acfg)
        emit_label (acfg, symbol);
 }
 
-/*
- * Emit a structure containing all the information not stored elsewhere.
- */
 static void
-emit_file_info (MonoAotCompile *acfg)
+init_aot_file_info (MonoAotCompile *acfg, MonoAotFileInfo *info, int gc_name_offset)
 {
-       char symbol [256];
        int i;
-       int gc_name_offset;
-       const char *gc_name;
-       char *build_info;
 
-       emit_string_symbol (acfg, "assembly_guid" , acfg->image->guid);
+       info->version = MONO_AOT_FILE_VERSION;
+       info->plt_got_offset_base = acfg->plt_got_offset_base;
+       info->got_size = acfg->got_offset * sizeof (gpointer);
+       info->plt_size = acfg->plt_offset;
+       info->nmethods = acfg->nmethods;
+       info->flags = acfg->flags;
+       info->opts = acfg->opts;
+       info->simd_opts = acfg->simd_opts;
+       info->gc_name_index = gc_name_offset;
+       for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
+               info->num_trampolines [i] = acfg->num_trampolines [i];
+       for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
+               info->trampoline_got_offset_base [i] = acfg->trampoline_got_offset_base [i];
+       for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
+               info->trampoline_size [i] = acfg->trampoline_size [i];
+       info->num_rgctx_fetch_trampolines = acfg->aot_opts.nrgctx_fetch_trampolines;
 
-       if (acfg->aot_opts.bind_to_runtime_version) {
-               build_info = mono_get_runtime_build_info ();
-               emit_string_symbol (acfg, "runtime_version", build_info);
-               g_free (build_info);
-       } else {
-               emit_string_symbol (acfg, "runtime_version", "");
+#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);
+               info->double_align = align;
+
+               memset (&t, 0, sizeof (MonoType));
+               t.type = MONO_TYPE_I8;
+               mono_type_size (&t, &align);
+               info->long_align = align;
        }
+#else
+       info->double_align = MONO_ABI_ALIGNOF (double);
+       info->long_align = MONO_ABI_ALIGNOF (gint64);
+#endif
+       info->generic_tramp_num = MONO_TRAMPOLINE_NUM;
+       info->tramp_page_size = acfg->tramp_page_size;
+       for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
+               info->tramp_page_code_offsets [i] = acfg->tramp_page_code_offsets [i];
+}
 
-       /* Emit a string holding the assembly name */
-       emit_string_symbol (acfg, "assembly_name", acfg->image->assembly->aname.name);
+static void
+emit_aot_file_info (MonoAotCompile *acfg, MonoAotFileInfo *info)
+{
+       char symbol [256];
+       int i, sindex;
+       const char **symbols;
 
-       /*
-        * The managed allocators are GC specific, so can't use an AOT image created by one GC
-        * in another.
-        */
-       gc_name = mono_gc_get_gc_name ();
-       gc_name_offset = add_to_blob (acfg, (guint8*)gc_name, strlen (gc_name) + 1);
+       symbols = g_new0 (const char *, MONO_AOT_FILE_INFO_NUM_SYMBOLS);
+       sindex = 0;
+       symbols [sindex ++] = acfg->got_symbol;
+       if (acfg->llvm) {
+               symbols [sindex ++] = g_strdup_printf ("%s%s", acfg->user_symbol_prefix, acfg->llvm_got_symbol);
+               symbols [sindex ++] = acfg->llvm_eh_frame_symbol;
+       } else {
+               symbols [sindex ++] = NULL;
+               symbols [sindex ++] = NULL;
+       }
+       symbols [sindex ++] = "jit_code_start";
+       symbols [sindex ++] = "jit_code_end";
+       symbols [sindex ++] = "method_addresses";
+       symbols [sindex ++] = "blob";
+       symbols [sindex ++] = "class_name_table";
+       symbols [sindex ++] = "class_info_offsets";
+       symbols [sindex ++] = "method_info_offsets";
+       symbols [sindex ++] = "ex_info_offsets";
+       symbols [sindex ++] = "extra_method_info_offsets";
+       symbols [sindex ++] = "extra_method_table";
+       symbols [sindex ++] = "got_info_offsets";
+       if (acfg->llvm)
+               symbols [sindex ++] = "llvm_got_info_offsets";
+       else
+               symbols [sindex ++] = NULL;
+       symbols [sindex ++] = "mem_end";
+       symbols [sindex ++] = "image_table";
+       symbols [sindex ++] = "assembly_guid";
+       symbols [sindex ++] = "runtime_version";
+       if (acfg->num_trampoline_got_entries) {
+               symbols [sindex ++] = "specific_trampolines";
+               symbols [sindex ++] = "static_rgctx_trampolines";
+               symbols [sindex ++] = "imt_thunks";
+               symbols [sindex ++] = "gsharedvt_arg_trampolines";
+       } else {
+               symbols [sindex ++] = NULL;
+               symbols [sindex ++] = NULL;
+               symbols [sindex ++] = NULL;
+               symbols [sindex ++] = NULL;
+       }
+       if (acfg->aot_opts.static_link) {
+               symbols [sindex ++] = "globals";
+       } else {
+               symbols [sindex ++] = NULL;
+       }
+       symbols [sindex ++] = "assembly_name";
+       symbols [sindex ++] = "plt";
+       symbols [sindex ++] = "plt_end";
+       symbols [sindex ++] = "unwind_info";
+       symbols [sindex ++] = "unbox_trampolines";
+       symbols [sindex ++] = "unbox_trampolines_end";
+       symbols [sindex ++] = "unbox_trampoline_addresses";
+       g_assert (sindex == MONO_AOT_FILE_INFO_NUM_SYMBOLS);
 
        sprintf (symbol, "%smono_aot_file_info", acfg->user_symbol_prefix);
        emit_section_change (acfg, ".data", 0);
@@ -8473,112 +8625,39 @@ emit_file_info (MonoAotCompile *acfg)
 
        /* The data emitted here must match MonoAotFileInfo. */
 
-       emit_int32 (acfg, MONO_AOT_FILE_VERSION);
-       emit_int32 (acfg, 0);
+       emit_int32 (acfg, info->version);
+       emit_int32 (acfg, info->dummy);
 
        /* 
         * We emit pointers to our data structures instead of emitting global symbols which
         * point to them, to reduce the number of globals, and because using globals leads to
         * various problems (i.e. arm/thumb).
         */
-       emit_pointer (acfg, acfg->got_symbol);
-       if (acfg->llvm)
-               emit_pointer (acfg, acfg->llvm_got_symbol);
-       else
-               emit_pointer (acfg, NULL);
-       emit_pointer (acfg, acfg->methods_symbol);
-       emit_pointer (acfg, "jit_code_start");
-       emit_pointer (acfg, "jit_code_end");
-       if (acfg->llvm) {
-               /*
-                * Emit a reference to the mono_eh_frame table created by our modified LLVM compiler.
-                */
-               emit_pointer (acfg, acfg->llvm_eh_frame_symbol);
-       } else {
-               emit_pointer (acfg, NULL);
-       }
-       emit_pointer (acfg, "blob");
-       emit_pointer (acfg, "class_name_table");
-       emit_pointer (acfg, "class_info_offsets");
-       emit_pointer (acfg, "method_info_offsets");
-       emit_pointer (acfg, "ex_info_offsets");
-       emit_pointer (acfg, "method_addresses");
-       emit_pointer (acfg, "extra_method_info_offsets");
-       emit_pointer (acfg, "extra_method_table");
-       emit_pointer (acfg, "got_info_offsets");
-       if (acfg->llvm)
-               emit_pointer (acfg, "llvm_got_info_offsets");
-       else
-               emit_pointer (acfg, NULL);
-       emit_pointer (acfg, "unwind_info");
-       emit_pointer (acfg, "mem_end");
-       emit_pointer (acfg, "image_table");
-       emit_pointer (acfg, "plt");
-       emit_pointer (acfg, "plt_end");
-       emit_pointer (acfg, "assembly_guid");
-       emit_pointer (acfg, "runtime_version");
-       if (acfg->num_trampoline_got_entries) {
-               emit_pointer (acfg, "specific_trampolines");
-               emit_pointer (acfg, "static_rgctx_trampolines");
-               emit_pointer (acfg, "imt_thunks");
-               emit_pointer (acfg, "gsharedvt_arg_trampolines");
-       } else {
-               emit_pointer (acfg, NULL);
-               emit_pointer (acfg, NULL);
-               emit_pointer (acfg, NULL);
-               emit_pointer (acfg, NULL);
-       }
-       if (acfg->aot_opts.static_link) {
-               emit_pointer (acfg, "globals");
-       } else {
-               emit_pointer (acfg, NULL);
-       }
-       emit_pointer (acfg, "assembly_name");
-       emit_pointer (acfg, "unbox_trampolines");
-       emit_pointer (acfg, "unbox_trampolines_end");
-       emit_pointer (acfg, "unbox_trampoline_addresses");
-
-       emit_int32 (acfg, acfg->plt_got_offset_base);
-       emit_int32 (acfg, (int)(acfg->got_offset * sizeof (gpointer)));
-       emit_int32 (acfg, acfg->plt_offset);
-       emit_int32 (acfg, acfg->nmethods);
-       emit_int32 (acfg, acfg->flags);
-       emit_int32 (acfg, acfg->opts);
-       emit_int32 (acfg, acfg->simd_opts);
-       emit_int32 (acfg, gc_name_offset);
+       for (i = 0; i < MONO_AOT_FILE_INFO_NUM_SYMBOLS; ++i)
+               emit_pointer (acfg, symbols [i]);
+
+       emit_int32 (acfg, info->plt_got_offset_base);
+       emit_int32 (acfg, info->got_size);
+       emit_int32 (acfg, info->plt_size);
+       emit_int32 (acfg, info->nmethods);
+       emit_int32 (acfg, info->flags);
+       emit_int32 (acfg, info->opts);
+       emit_int32 (acfg, info->simd_opts);
+       emit_int32 (acfg, info->gc_name_index);
+       emit_int32 (acfg, info->num_rgctx_fetch_trampolines);
+       emit_int32 (acfg, info->double_align);
+       emit_int32 (acfg, info->long_align);
+       emit_int32 (acfg, info->generic_tramp_num);
+       emit_int32 (acfg, info->tramp_page_size);
 
        for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
-               emit_int32 (acfg, acfg->num_trampolines [i]);
+               emit_int32 (acfg, info->num_trampolines [i]);
        for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
-               emit_int32 (acfg, acfg->trampoline_got_offset_base [i]);
+               emit_int32 (acfg, info->trampoline_got_offset_base [i]);
        for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
-               emit_int32 (acfg, acfg->trampoline_size [i]);
-       emit_int32 (acfg, acfg->aot_opts.nrgctx_fetch_trampolines);
-
-#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);
-               emit_int32 (acfg, align);
-
-               memset (&t, 0, sizeof (MonoType));
-               t.type = MONO_TYPE_I8;
-               mono_type_size (&t, &align);
-
-               emit_int32 (acfg, align);
-       }
-#else
-       emit_int32 (acfg, MONO_ABI_ALIGNOF (double));
-       emit_int32 (acfg, MONO_ABI_ALIGNOF (gint64));
-#endif
-       emit_int32 (acfg, MONO_TRAMPOLINE_NUM);
-       emit_int32 (acfg, acfg->tramp_page_size);
+               emit_int32 (acfg, info->trampoline_size [i]);
        for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
-               emit_int32 (acfg, acfg->tramp_page_code_offsets [i]);
+               emit_int32 (acfg, info->tramp_page_code_offsets [i]);
 
        if (acfg->aot_opts.static_link) {
                char *p;
@@ -8604,11 +8683,56 @@ emit_file_info (MonoAotCompile *acfg)
        }
 }
 
+/*
+ * Emit a structure containing all the information not stored elsewhere.
+ */
+static void
+emit_file_info (MonoAotCompile *acfg)
+{
+       int gc_name_offset;
+       const char *gc_name;
+       char *build_info;
+       MonoAotFileInfo *info;
+
+       if (acfg->aot_opts.bind_to_runtime_version) {
+               build_info = mono_get_runtime_build_info ();
+               emit_string_symbol (acfg, "runtime_version", build_info);
+               g_free (build_info);
+       } else {
+               emit_string_symbol (acfg, "runtime_version", "");
+       }
+
+       emit_string_symbol (acfg, "assembly_guid" , acfg->image->guid);
+
+       /* Emit a string holding the assembly name */
+       emit_string_symbol (acfg, "assembly_name", acfg->image->assembly->aname.name);
+
+       /*
+        * The managed allocators are GC specific, so can't use an AOT image created by one GC
+        * in another.
+        */
+       gc_name = mono_gc_get_gc_name ();
+       gc_name_offset = add_to_blob (acfg, (guint8*)gc_name, strlen (gc_name) + 1);
+
+       info = g_new0 (MonoAotFileInfo, 1);
+       init_aot_file_info (acfg, info, gc_name_offset);
+
+       if (acfg->llvm)
+               mono_llvm_emit_aot_file_info (info, acfg->has_jitted_code);
+       else
+               emit_aot_file_info (acfg, info);
+}
+
 static void
 emit_blob (MonoAotCompile *acfg)
 {
        char symbol [128];
 
+       if (acfg->llvm) {
+               mono_llvm_emit_aot_data ("blob", (guint8*)acfg->blob.data, acfg->blob.index);
+               return;
+       }
+
        sprintf (symbol, "blob");
        emit_section_change (acfg, RODATA_SECT, 1);
        emit_alignment (acfg, 8);
@@ -8731,6 +8855,10 @@ collect_methods (MonoAotCompile *acfg)
                }
                */
 
+               if (method->is_generic || method->klass->generic_container)
+                       /* Compile the ref shared version instead */
+                       method = mini_get_shared_method (method);
+
                /* Since we add the normal methods first, their index will be equal to their zero based token index */
                add_method_with_index (acfg, method, i, FALSE);
                acfg->method_index ++;
@@ -8748,14 +8876,6 @@ collect_methods (MonoAotCompile *acfg)
                method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
                report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
 
-               /*
-               if (strcmp (method->name, "gshared2"))
-                       continue;
-               */
-               /*
-               if (!strstr (method->klass->image->name, "mini"))
-                       continue;
-               */
                if (method->is_generic || method->klass->generic_container) {
                        MonoMethod *gshared;
 
@@ -9291,6 +9411,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
        acfg->aot_opts.nrgctx_fetch_trampolines = 128;
        acfg->aot_opts.ngsharedvt_arg_trampolines = 128;
        acfg->aot_opts.llvm_path = g_strdup ("");
+       acfg->aot_opts.temp_path = g_strdup ("");
 #ifdef MONOTOUCH
        acfg->aot_opts.use_trampolines_page = TRUE;
 #endif
@@ -9411,14 +9532,12 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
                        *p = '_';
        }
 
-       acfg->got_symbol_base = g_strdup_printf ("mono_aot_%s_got", acfg->assembly_name_sym);
-       acfg->llvm_got_symbol_base = g_strdup_printf ("mono_aot_%s_llvm_got", acfg->assembly_name_sym);
-       acfg->plt_symbol = g_strdup_printf ("%smono_aot_%s_plt", acfg->llvm_label_prefix, acfg->assembly_name_sym);
-
-       acfg->got_symbol = g_strdup_printf ("%s%s", acfg->llvm_label_prefix, acfg->got_symbol_base);
-       if (acfg->llvm) {
-               acfg->llvm_got_symbol = g_strdup_printf ("%s%s", acfg->llvm_label_prefix, acfg->llvm_got_symbol_base);
-               acfg->llvm_eh_frame_symbol = g_strdup_printf ("mono_aot_%s_eh_frame", acfg->assembly_name_sym);
+       acfg->global_prefix = g_strdup_printf ("mono_aot_%s", acfg->assembly_name_sym);
+       acfg->plt_symbol = g_strdup_printf ("%s_plt", acfg->global_prefix);
+       acfg->got_symbol = g_strdup_printf ("%s_got", acfg->global_prefix);
+       if (acfg->llvm) {
+               acfg->llvm_got_symbol = g_strdup_printf ("%s_llvm_got", acfg->global_prefix);
+               acfg->llvm_eh_frame_symbol = g_strdup_printf ("%s_eh_frame", acfg->global_prefix);
        }
 
        acfg->method_index = 1;
@@ -9439,7 +9558,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
 #ifdef ENABLE_LLVM
        if (acfg->llvm) {
                llvm_acfg = acfg;
-               mono_llvm_create_aot_module (acfg->llvm_got_symbol_base, TRUE, TRUE);
+               mono_llvm_create_aot_module (acfg->global_prefix, TRUE);
        }
 #endif
 
@@ -9489,8 +9608,6 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
 
 #ifdef ENABLE_LLVM
        if (acfg->llvm) {
-               gboolean res;
-
                if (acfg->aot_opts.asm_only) {
                        if (acfg->aot_opts.outfile) {
                                acfg->tmpfname = g_strdup_printf ("%s", acfg->aot_opts.outfile);
@@ -9506,15 +9623,14 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
                        else
                                acfg->llvm_sfile = g_strdup (acfg->aot_opts.llvm_outfile);
                } else {
-                       acfg->tmpbasename = g_strdup_printf ("%s", "temp");
+                       acfg->tmpbasename = (strcmp (acfg->aot_opts.temp_path, "") == 0) ?
+                               g_strdup_printf ("%s", "temp") :
+                               g_build_filename (acfg->aot_opts.temp_path, "temp", NULL);
+                               
                        acfg->tmpfname = g_strdup_printf ("%s.s", acfg->tmpbasename);
-                       acfg->llvm_sfile = g_strdup ("temp-llvm.s");
-                       acfg->llvm_ofile = g_strdup ("temp-llvm.o");
+                       acfg->llvm_sfile = g_strdup_printf ("%s-llvm.s", acfg->tmpbasename);
+                       acfg->llvm_ofile = g_strdup_printf ("%s-llvm.o", acfg->tmpbasename);
                }
-
-               res = emit_llvm_file (acfg);
-               if (!res)
-                       return 1;
        }
 #endif
 
@@ -9584,7 +9700,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
                //acfg->gas_line_numbers = TRUE;
        }
 
-       if (!acfg->aot_opts.nodebug || acfg->aot_opts.dwarf_debug) {
+       if ((!acfg->aot_opts.nodebug || acfg->aot_opts.dwarf_debug) && acfg->has_jitted_code) {
                if (acfg->aot_opts.dwarf_debug && !mono_debug_enabled ()) {
                        aot_printerrf (acfg, "The dwarf AOT option requires the --debug option.\n");
                        return 1;
@@ -9647,6 +9763,16 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
                        fprintf (acfg->fp, "\n.section  .note.GNU-stack,\"\",@progbits\n");
        }
 
+#ifdef ENABLE_LLVM
+       if (acfg->llvm) {
+               gboolean res;
+
+               res = emit_llvm_file (acfg);
+               if (!res)
+                       return 1;
+       }
+#endif
+
        TV_GETTIME (btv);
 
        acfg->stats.gen_time = TV_ELAPSED (atv, btv);
index fceb9fb9184ceb3e6ec28f73d00d18c90dd60532..fa5d6ca73253584c8145c7a0d787dcbce9209ce5 100644 (file)
@@ -68,6 +68,9 @@
 #define ENABLE_AOT_CACHE
 #endif
 
+/* Number of got entries shared between the JIT and LLVM GOT */
+#define N_COMMON_GOT_ENTRIES 4
+
 #define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
 #define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (align - 1)) & (~(align - 1)))
 #define ROUND_DOWN(VALUE,SIZE) ((VALUE) & ~((SIZE) - 1))
@@ -82,6 +85,7 @@ typedef struct MonoAotModule {
        /* Pointer to the Global Offset Table */
        gpointer *got;
        gpointer *llvm_got;
+       gpointer shared_got [N_COMMON_GOT_ENTRIES];
        GHashTable *name_cache;
        GHashTable *extra_methods;
        /* Maps methods to their code */
@@ -97,8 +101,6 @@ typedef struct MonoAotModule {
        gboolean plt_inited;
        guint8 *mem_begin;
        guint8 *mem_end;
-       /* Points to either the start of JIT compiler or LLVM compiled code */
-       guint8 *code;
        guint8 *jit_code_start;
        guint8 *jit_code_end;
        guint8 *llvm_code_start;
@@ -106,12 +108,14 @@ typedef struct MonoAotModule {
        guint8 *plt;
        guint8 *plt_end;
        guint8 *blob;
-       gint32 *code_offsets;
-       gpointer *method_addresses;
-       /* This contains <offset, index> pairs sorted by offset */
-       /* This is needed because LLVM emitted methods can be in any order */
-       gint32 *sorted_code_offsets;
-       gint32 sorted_code_offsets_len;
+       /* Maps method indexes to their code */
+       gpointer *methods;
+       /* Sorted array of method addresses */
+       gpointer *sorted_methods;
+       /* Method indexes for each method in sorted_methods */
+       int *sorted_method_indexes;
+       /* The length of the two tables above */
+       int sorted_methods_len;
        guint32 *method_info_offsets;
        guint32 *ex_info_offsets;
        guint32 *class_info_offsets;
@@ -200,12 +204,17 @@ static GHashTable *aot_jit_icall_hash;
 #define mono_aot_page_unlock() mono_mutex_unlock (&aot_page_mutex)
 static mono_mutex_t aot_page_mutex;
 
+static MonoAotModule *mscorlib_aot_module;
+
 static void
 init_plt (MonoAotModule *info);
 
 static void
 compute_llvm_code_range (MonoAotModule *amodule, guint8 **code_start, guint8 **code_end);
 
+static gboolean
+init_method (MonoAotModule *amodule, guint32 method_index, MonoMethod *method, MonoClass **klass);
+
 /*****************************************************/
 /*                 AOT RUNTIME                       */
 /*****************************************************/
@@ -837,7 +846,10 @@ decode_method_ref_with_target (MonoAotModule *module, MethodRef *ref, MonoMethod
                        if (!m)
                                return FALSE;
                        mono_class_init (m->klass);
-                       ref->method = mono_marshal_get_remoting_invoke_with_check (m);
+                       if (mono_aot_only)
+                               ref->method = m;
+                       else
+                               ref->method = mono_marshal_get_remoting_invoke_with_check (m);
                        break;
                }
                case MONO_WRAPPER_PROXY_ISINST: {
@@ -1739,6 +1751,21 @@ get_call_table_entry (void *table, int index)
 #endif
 }
 
+static void
+init_gots (MonoAotModule *amodule)
+{
+       int i;
+
+       if (amodule->got) {
+               for (i = 0; i < N_COMMON_GOT_ENTRIES; ++i)
+                       amodule->got [i] = amodule->shared_got [i];
+       }
+       if (amodule->llvm_got) {
+               for (i = 0; i < N_COMMON_GOT_ENTRIES; ++i)
+                       amodule->llvm_got [i] = amodule->shared_got [i];
+       }
+}
+
 static void
 load_aot_module (MonoAssembly *assembly, gpointer user_data)
 {
@@ -1882,7 +1909,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
 
        memcpy (&amodule->info, info, sizeof (*info));
 
-       amodule->got = amodule->info.got;
+       amodule->got = amodule->info.jit_got;
        amodule->llvm_got = amodule->info.llvm_got;
        amodule->globals = globals;
        amodule->sofile = sofile;
@@ -1932,12 +1959,6 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
                }
        }
 
-       amodule->method_addresses = info->method_addresses;
-       amodule->code = info->methods;
-#ifdef TARGET_ARM
-       /* Mask out thumb interop bit */
-       amodule->code = (void*)((mgreg_t)amodule->code & ~1);
-#endif
        amodule->jit_code_start = info->jit_code_start;
        amodule->jit_code_end = info->jit_code_end;
        amodule->method_info_offsets = info->method_info_offsets;
@@ -1950,8 +1971,8 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
        amodule->unbox_trampolines_end = info->unbox_trampolines_end;
        amodule->unbox_trampoline_addresses = info->unbox_trampoline_addresses;
        amodule->unwind_info = info->unwind_info;
+       amodule->mem_begin = amodule->jit_code_start;
        amodule->mem_end = info->mem_end;
-       amodule->mem_begin = amodule->code;
        amodule->plt = info->plt;
        amodule->plt_end = info->plt_end;
        amodule->mono_eh_frame = info->mono_eh_frame;
@@ -1960,18 +1981,25 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
        amodule->trampolines [MONO_AOT_TRAMP_IMT_THUNK] = info->imt_thunks;
        amodule->trampolines [MONO_AOT_TRAMP_GSHAREDVT_ARG] = info->gsharedvt_arg_trampolines;
 
-       /* Compute code_offsets from the method addresses */
-       amodule->code_offsets = g_malloc0 (amodule->info.nmethods * sizeof (gint32));
+       if (!strcmp (assembly->aname.name, "mscorlib"))
+               mscorlib_aot_module = amodule;
+
+       /* Compute method addresses */
+       amodule->methods = g_malloc0 (amodule->info.nmethods * sizeof (gpointer));
        for (i = 0; i < amodule->info.nmethods; ++i) {
-               /* method_addresses () contains a table of branches, since the ios linker can update those correctly */
-               void *addr;
+               void *addr = NULL;
 
-               addr = get_call_table_entry (amodule->method_addresses, i);
-               g_assert (addr);
-               if (addr == amodule->method_addresses)
-                       amodule->code_offsets [i] = 0xffffffff;
+               /* method_addresses () contains a table of branches, since the ios linker can update those correctly */
+               if (!addr && amodule->info.method_addresses) {
+                       addr = get_call_table_entry (amodule->info.method_addresses, i);
+                       g_assert (addr);
+                       if (addr == amodule->info.method_addresses)
+                               addr = NULL;
+               }
+               if (addr == NULL)
+                       amodule->methods [i] = GINT_TO_POINTER (-1);
                else
-                       amodule->code_offsets [i] = (char*)addr - (char*)amodule->code;
+                       amodule->methods [i] = addr;
        }
 
        if (make_unreadable) {
@@ -1981,6 +2009,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
                int err, len;
 
                addr = amodule->mem_begin;
+               g_assert (addr);
                len = amodule->mem_end - amodule->mem_begin;
 
                /* Round down in both directions to avoid modifying data which is not ours */
@@ -1999,8 +2028,10 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
 
        mono_aot_lock ();
 
-       aot_code_low_addr = MIN (aot_code_low_addr, (gsize)amodule->jit_code_start);
-       aot_code_high_addr = MAX (aot_code_high_addr, (gsize)amodule->jit_code_end);
+       if (amodule->jit_code_start) {
+               aot_code_low_addr = MIN (aot_code_low_addr, (gsize)amodule->jit_code_start);
+               aot_code_high_addr = MAX (aot_code_high_addr, (gsize)amodule->jit_code_end);
+       }
        if (amodule->llvm_code_start) {
                aot_code_low_addr = MIN (aot_code_low_addr, (gsize)amodule->llvm_code_start);
                aot_code_high_addr = MAX (aot_code_high_addr, (gsize)amodule->llvm_code_end);
@@ -2009,13 +2040,14 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
        g_hash_table_insert (aot_modules, assembly, amodule);
        mono_aot_unlock ();
 
-       mono_jit_info_add_aot_module (assembly->image, amodule->jit_code_start, amodule->jit_code_end);
+       if (amodule->jit_code_start)
+               mono_jit_info_add_aot_module (assembly->image, amodule->jit_code_start, amodule->jit_code_end);
        if (amodule->llvm_code_start)
                mono_jit_info_add_aot_module (assembly->image, amodule->llvm_code_start, amodule->llvm_code_end);
 
        assembly->image->aot_module = amodule;
 
-       amodule->got [0] = assembly->image;
+       amodule->shared_got [0] = assembly->image;
 
        if (mono_aot_only) {
                char *code;
@@ -2026,9 +2058,9 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
                        /* The second got slot contains the mscorlib got addr */
                        MonoAotModule *mscorlib_amodule = mono_defaults.corlib->aot_module;
 
-                       amodule->got [1] = mscorlib_amodule->got;
+                       amodule->shared_got [1] = mscorlib_amodule->got;
                } else {
-                       amodule->got [1] = amodule->got;
+                       amodule->shared_got [1] = amodule->got;
                }
        }
 
@@ -2037,19 +2069,14 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
 
                memset (&ji, 0, sizeof (ji));
                ji.type = MONO_PATCH_INFO_GC_CARD_TABLE_ADDR;
-               amodule->got [2] = mono_resolve_patch_target (NULL, mono_get_root_domain (), NULL, &ji, FALSE);
+               amodule->shared_got [2] = mono_resolve_patch_target (NULL, mono_get_root_domain (), NULL, &ji, FALSE);
 
                memset (&ji, 0, sizeof (ji));
                ji.type = MONO_PATCH_INFO_GC_NURSERY_START;
-               amodule->got [3] = mono_resolve_patch_target (NULL, mono_get_root_domain (), NULL, &ji, FALSE);
+               amodule->shared_got [3] = mono_resolve_patch_target (NULL, mono_get_root_domain (), NULL, &ji, FALSE);
        }
 
-       if (amodule->llvm_got) {
-               amodule->llvm_got [0] = amodule->got [0];
-               amodule->llvm_got [1] = amodule->got [1];
-               amodule->llvm_got [2] = amodule->got [2];
-               amodule->llvm_got [3] = amodule->got [3];
-       }
+       init_gots (amodule);
 
        /*
         * Since we store methoddef and classdef tokens when referring to methods/classes in
@@ -2397,25 +2424,34 @@ compute_llvm_code_range (MonoAotModule *amodule, guint8 **code_start, guint8 **c
        if (fde_count > 1) {
                /* mono_aot_personality () */
                g_assert (table [0] == -1);
-               *code_start = amodule->code + amodule->code_offsets [table [2]];
-               *code_end = amodule->code + amodule->code_offsets [table [(fde_count - 1) * 2]] + table [fde_count * 2];
+               *code_start = amodule->methods [table [2]];
+               *code_end = (guint8*)amodule->methods [table [(fde_count - 1) * 2]] + table [fde_count * 2];
        } else {
                *code_start = NULL;
                *code_end = NULL;
        }
 }
 
+static gboolean
+is_llvm_code (MonoAotModule *amodule, guint8 *code)
+{
+       if ((guint8*)code >= amodule->llvm_code_start && (guint8*)code < amodule->llvm_code_end)
+               return TRUE;
+       else
+               return FALSE;
+}
+
 static gboolean
 is_thumb_code (MonoAotModule *amodule, guint8 *code)
 {
-       if ((amodule->info.flags & MONO_AOT_FILE_FLAG_LLVM_THUMB) && (guint8*)code >= amodule->llvm_code_start && (guint8*)code < amodule->llvm_code_end)
+       if (is_llvm_code (amodule, code) && (amodule->info.flags & MONO_AOT_FILE_FLAG_LLVM_THUMB))
                return TRUE;
        else
                return FALSE;
 }
 
 /*
- * decode_mono_eh_frame:
+ * decode_llvm_mono_eh_frame:
  *
  *   Decode the EH information emitted by our modified LLVM compiler and construct a
  * MonoJitInfo structure from it.
@@ -2429,11 +2465,11 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
                                                   GSList **nesting,
                                                   int *this_reg, int *this_offset)
 {
-       guint8 *p;
+       guint8 *p, *code1, *code2;
        guint8 *fde, *cie, *code_start, *code_end;
        int version, fde_count;
        gint32 *table;
-       int i, j, pos, left, right, offset, offset1, offset2, code_len;
+       int i, j, pos, left, right, code_len;
        MonoJitExceptionInfo *ei;
        guint32 fde_len, ei_len, nested_len, nindex;
        gpointer *type_info;
@@ -2462,7 +2498,6 @@ 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 */
-       offset = code - amodule->code;
        left = 0;
        right = fde_count;
        while (TRUE) {
@@ -2470,29 +2505,29 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
 
                /* The table contains method index/fde offset pairs */
                g_assert (table [(pos * 2)] != -1);
-               offset1 = amodule->code_offsets [table [(pos * 2)]];
+               code1 = amodule->methods [table [(pos * 2)]];
                if (pos + 1 == fde_count) {
-                       offset2 = amodule->llvm_code_end - amodule->llvm_code_start;
+                       code2 = amodule->llvm_code_end;
                } else {
                        g_assert (table [(pos + 1) * 2] != -1);
-                       offset2 = amodule->code_offsets [table [(pos + 1) * 2]];
+                       code2 = amodule->methods [table [(pos + 1) * 2]];
                }
 
-               if (offset < offset1)
+               if (code < code1)
                        right = pos;
-               else if (offset >= offset2)
+               else if (code >= code2)
                        left = pos + 1;
                else
                        break;
        }
 
-       code_start = amodule->code + amodule->code_offsets [table [(pos * 2)]];
+       code_start = amodule->methods [table [(pos * 2)]];
        if (pos + 1 == fde_count) {
                /* The +1 entry in the table contains the length of the last method */
                int len = table [(pos + 1) * 2];
                code_end = code_start + len;
        } else {
-               code_end = amodule->code + amodule->code_offsets [table [(pos + 1) * 2]];
+               code_end = amodule->methods [table [(pos + 1) * 2]];
        }
        code_len = code_end - code_start;
 
@@ -2835,21 +2870,9 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
                gi->generic_sharing_context = g_new0 (MonoGenericSharingContext, 1);
                if (decode_value (p, &p)) {
                        /* gsharedvt */
-                       int i, n;
                        MonoGenericSharingContext *gsctx = gi->generic_sharing_context;
 
-                       n = decode_value (p, &p);
-                       if (n) {
-                               gsctx->var_is_vt = alloc0_jit_info_data (domain, sizeof (gboolean) * n, async);
-                               for (i = 0; i < n; ++i)
-                                       gsctx->var_is_vt [i] = decode_value (p, &p);
-                       }
-                       n = decode_value (p, &p);
-                       if (n) {
-                               gsctx->mvar_is_vt = alloc0_jit_info_data (domain, sizeof (gboolean) * n, async);
-                               for (i = 0; i < n; ++i)
-                                       gsctx->mvar_is_vt [i] = decode_value (p, &p);
-                       }
+                       gsctx->is_gsharedvt = TRUE;
                }
        }
 
@@ -2930,14 +2953,8 @@ mono_aot_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len)
        return p;
 }
 
-static G_GNUC_UNUSED int
-compare_ints (const void *a, const void *b)
-{
-       return *(gint32*)a - *(gint32*)b;
-}
-
 static void
-msort_code_offsets_internal (gint32 *array, int lo, int hi, gint32 *scratch)
+msort_method_addresses_internal (gpointer *array, int *indexes, int lo, int hi, gpointer *scratch, int *scratch_indexes)
 {
        int mid = (lo + hi) / 2;
        int i, t_lo, t_hi;
@@ -2947,47 +2964,50 @@ msort_code_offsets_internal (gint32 *array, int lo, int hi, gint32 *scratch)
 
        if (hi - lo < 32) {
                for (i = lo; i < hi; ++i)
-                       if (array [(i * 2)] > array [(i * 2) + 2])
+                       if (array [i] > array [i + 1])
                                break;
                if (i == hi)
                        /* Already sorted */
                        return;
        }
 
-       msort_code_offsets_internal (array, lo, mid, scratch);
-       msort_code_offsets_internal (array, mid + 1, hi, scratch);
+       msort_method_addresses_internal (array, indexes, lo, mid, scratch, scratch_indexes);
+       msort_method_addresses_internal (array, indexes, mid + 1, hi, scratch, scratch_indexes);
 
-       if (array [mid * 2] < array [(mid + 1) * 2])
+       if (array [mid] < array [mid + 1])
                return;
 
        /* Merge */
        t_lo = lo;
        t_hi = mid + 1;
        for (i = lo; i <= hi; i ++) {
-               if (t_lo <= mid && ((t_hi > hi) || array [t_lo * 2] < array [t_hi * 2])) {
-                       scratch [(i * 2)] = array [t_lo * 2];
-                       scratch [(i * 2) + 1] = array [(t_lo *2) + 1];
+               if (t_lo <= mid && ((t_hi > hi) || array [t_lo] < array [t_hi])) {
+                       scratch [i] = array [t_lo];
+                       scratch_indexes [i] = indexes [t_lo];
                        t_lo ++;
                } else {
-                       scratch [(i * 2)] = array [t_hi * 2];
-                       scratch [(i * 2) + 1] = array [(t_hi *2) + 1];
+                       scratch [i] = array [t_hi];
+                       scratch_indexes [i] = indexes [t_hi];
                        t_hi ++;
                }
        }
        for (i = lo; i <= hi; ++i) {
-               array [(i * 2)] = scratch [i * 2];
-               array [(i * 2) + 1] = scratch [(i * 2) + 1];
+               array [i] = scratch [i];
+               indexes [i] = scratch_indexes [i];
        }
 }
 
 static void
-msort_code_offsets (gint32 *array, int len)
+msort_method_addresses (gpointer *array, int *indexes, int len)
 {
-       gint32 *scratch;
+       gpointer *scratch;
+       int *scratch_indexes;
 
-       scratch = g_new (gint32, len * 2);
-       msort_code_offsets_internal (array, 0, len - 1, scratch);
+       scratch = g_new (gpointer, len);
+       scratch_indexes = g_new (int, len);
+       msort_method_addresses_internal (array, indexes, 0, len - 1, scratch, scratch_indexes);
        g_free (scratch);
+       g_free (scratch_indexes);
 }
 
 /*
@@ -3000,7 +3020,7 @@ msort_code_offsets (gint32 *array, int len)
 MonoJitInfo *
 mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
 {
-       int pos, left, right, offset, offset1, offset2, code_len;
+       int pos, left, right, code_len;
        int method_index, table_len;
        guint32 token;
        MonoAotModule *amodule = image->aot_module;
@@ -3009,8 +3029,9 @@ mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
        guint8 *code, *ex_info, *p;
        guint32 *table;
        int nmethods;
-       gint32 *code_offsets;
-       int offsets_len, i;
+       gpointer *methods;
+       guint8 *code1, *code2;
+       int methods_len, i;
        gboolean async;
 
        if (!amodule)
@@ -3027,65 +3048,65 @@ mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
 
        async = mono_thread_info_is_async_context ();
 
-       offset = (guint8*)addr - amodule->code;
-
-       /* Compute a sorted table mapping code offsets to method indexes. */
-       if (!amodule->sorted_code_offsets) {
+       /* Compute a sorted table mapping code to method indexes. */
+       if (!amodule->sorted_methods) {
                // FIXME: async
-               code_offsets = g_new0 (gint32, nmethods * 2);
-               offsets_len = 0;
+               gpointer *methods = g_new0 (gpointer, nmethods);
+               int *method_indexes = g_new0 (int, nmethods);
+               int methods_len = 0;
+
                for (i = 0; i < nmethods; ++i) {
                        /* Skip the -1 entries to speed up sorting */
-                       if (amodule->code_offsets [i] == 0xffffffff)
+                       if (amodule->methods [i] == GINT_TO_POINTER (-1))
                                continue;
-                       code_offsets [(offsets_len * 2)] = amodule->code_offsets [i];
-                       code_offsets [(offsets_len *2) + 1] = i;
-                       offsets_len ++;
+                       methods [methods_len] = amodule->methods [i];
+                       method_indexes [methods_len] = i;
+                       methods_len ++;
                }
                /* Use a merge sort as this is mostly sorted */
-               msort_code_offsets (code_offsets, offsets_len);
-               //qsort (code_offsets, offsets_len, sizeof (gint32) * 2, compare_ints);
-               for (i = 0; i < offsets_len -1; ++i)
-                       g_assert (code_offsets [(i * 2)] <= code_offsets [(i + 1) * 2]);
-
-               amodule->sorted_code_offsets_len = offsets_len;
-               mono_memory_barrier ();
-               if (InterlockedCompareExchangePointer ((gpointer*)&amodule->sorted_code_offsets, code_offsets, NULL) != NULL)
+               msort_method_addresses (methods, method_indexes, methods_len);
+               for (i = 0; i < methods_len -1; ++i)
+                       g_assert (methods [i] <= methods [i + 1]);
+               amodule->sorted_methods_len = methods_len;
+               if (InterlockedCompareExchangePointer ((gpointer*)&amodule->sorted_methods, methods, NULL) != NULL)
+                       /* Somebody got in before us */
+                       g_free (methods);
+               if (InterlockedCompareExchangePointer ((gpointer*)&amodule->sorted_method_indexes, method_indexes, NULL) != NULL)
                        /* Somebody got in before us */
-                       g_free (code_offsets);
+                       g_free (method_indexes);
        }
 
-       code_offsets = amodule->sorted_code_offsets;
-       offsets_len = amodule->sorted_code_offsets_len;
-
-       /* Binary search in the sorted_code_offsets table */
+       /* Binary search in the sorted_methods table */
+       methods = amodule->sorted_methods;
+       methods_len = amodule->sorted_methods_len;
+       code = addr;
        left = 0;
-       right = offsets_len;
+       right = methods_len;
        while (TRUE) {
                pos = (left + right) / 2;
 
-               offset1 = code_offsets [(pos * 2)];
-               if (pos + 1 == offsets_len) {
-                       if (amodule->code + offset1 >= amodule->jit_code_start && amodule->code + offset1 < amodule->jit_code_end)
-                               offset2 = amodule->jit_code_end - amodule->code;
+               code1 = methods [pos];
+               if (pos + 1 == methods_len) {
+                       if (code1 >= amodule->jit_code_start && code1 < amodule->jit_code_end)
+                               code2 = amodule->jit_code_end;
                        else
-                               offset2 = amodule->llvm_code_end - amodule->code;
+                               code2 = amodule->llvm_code_end;
                } else {
-                       offset2 = code_offsets [(pos + 1) * 2];
+                       code2 = methods [pos + 1];
                }
 
-               if (offset < offset1)
+               if (code < code1)
                        right = pos;
-               else if (offset >= offset2)
+               else if (code >= code2)
                        left = pos + 1;
                else
                        break;
        }
 
-       g_assert (offset >= code_offsets [(pos * 2)]);
-       if (pos + 1 < offsets_len)
-               g_assert (offset < code_offsets [((pos + 1) * 2)]);
-       method_index = code_offsets [(pos * 2) + 1];
+       g_assert (addr >= methods [pos]);
+       if (pos + 1 < methods_len)
+               g_assert (addr < methods [pos + 1]);
+       method_index = amodule->sorted_method_indexes [pos];
 
        /* In async mode, jinfo is not added to the normal jit info table, so have to cache it ourselves */
        if (async) {
@@ -3101,16 +3122,16 @@ mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
                }
        }
 
-       code = &amodule->code [amodule->code_offsets [method_index]];
+       code = amodule->methods [method_index];
        ex_info = &amodule->blob [mono_aot_get_offset (amodule->ex_info_offsets, method_index)];
 
-       if (pos == offsets_len - 1) {
+       if (pos == methods_len - 1) {
                if (code >= amodule->jit_code_start && code < amodule->jit_code_end)
                        code_len = amodule->jit_code_end - code;
                else
                        code_len = amodule->llvm_code_end - code;
        } else {
-               code_len = code_offsets [(pos + 1) * 2] - code_offsets [pos * 2];
+               code_len = (guint8*)methods [pos + 1] - (guint8*)methods [pos];
        }
 
        g_assert ((guint8*)code <= (guint8*)addr && (guint8*)addr < (guint8*)code + code_len);
@@ -3573,12 +3594,9 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
 {
        MonoClass *klass;
        gboolean from_plt = method == NULL;
-       MonoMemPool *mp;
-       int i, pindex, n_patches, used_strings;
-       gboolean keep_patches = TRUE;
-       guint8 *p;
        MonoJitInfo *jinfo = NULL;
-       guint8 *code, *info;
+       guint8 *code = NULL, *info;
+       gboolean res;
 
        if (mono_profiler_get_events () & MONO_PROFILE_ENTER_LEAVE) {
                if (mono_aot_only)
@@ -3587,27 +3605,29 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
                return NULL;
        }
 
-       if ((domain != mono_get_root_domain ()) && (!(amodule->info.opts & MONO_OPT_SHARED)))
+       if (domain != mono_get_root_domain ())
                /* Non shared AOT code can't be used in other appdomains */
                return NULL;
 
        if (amodule->out_of_date)
                return NULL;
 
-       if (amodule->code_offsets [method_index] == 0xffffffff) {
-               if (mono_trace_is_traced (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT)) {
-                       char *full_name;
+       if (!code) {
+               if (amodule->methods [method_index] == GINT_TO_POINTER (-1)) {
+                       if (mono_trace_is_traced (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT)) {
+                               char *full_name;
 
-                       if (!method)
-                               method = mono_get_method (image, token, NULL);
-                       full_name = mono_method_full_name (method, TRUE);
-                       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT, "AOT: NOT FOUND: %s.", full_name);
-                       g_free (full_name);
+                               if (!method)
+                                       method = mono_get_method (image, token, NULL);
+                               full_name = mono_method_full_name (method, TRUE);
+                               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT, "AOT: NOT FOUND: %s.", full_name);
+                               g_free (full_name);
+                       }
+                       return NULL;
                }
-               return NULL;
        }
 
-       code = &amodule->code [amodule->code_offsets [method_index]];
+       code = amodule->methods [method_index];
 
        info = &amodule->blob [mono_aot_get_offset (amodule->method_info_offsets, method_index)];
 
@@ -3642,85 +3662,9 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
                }
        }
 
-       p = info;
-
-       if (method) {
-               klass = method->klass;
-               decode_klass_ref (amodule, p, &p);
-       } else {
-               klass = decode_klass_ref (amodule, p, &p);
-       }
-
-       if (amodule->info.opts & MONO_OPT_SHARED)
-               used_strings = decode_value (p, &p);
-       else
-               used_strings = 0;
-
-       for (i = 0; i < used_strings; i++) {
-               guint token = decode_value (p, &p);
-               mono_ldstr (mono_get_root_domain (), image, mono_metadata_token_index (token));
-       }
-
-       if (amodule->info.opts & MONO_OPT_SHARED)       
-               keep_patches = FALSE;
-
-       n_patches = decode_value (p, &p);
-
-       keep_patches = FALSE;
-
-       if (n_patches) {
-               MonoJumpInfo *patches;
-               guint32 *got_slots;
-               gboolean llvm;
-               gpointer *got;
-
-               if (keep_patches)
-                       mp = domain->mp;
-               else
-                       mp = mono_mempool_new ();
-
-               if ((gpointer)code >= amodule->info.jit_code_start && (gpointer)code <= amodule->info.jit_code_end) {
-                       llvm = FALSE;
-                       got = amodule->got;
-               } else {
-                       llvm = TRUE;
-                       got = amodule->llvm_got;
-                       g_assert (got);
-               }
-
-               patches = load_patch_info (amodule, mp, n_patches, llvm, &got_slots, p, &p);
-               if (patches == NULL)
-                       goto cleanup;
-
-               for (pindex = 0; pindex < n_patches; ++pindex) {
-                       MonoJumpInfo *ji = &patches [pindex];
-                       gpointer addr;
-
-                       /*
-                        * For SFLDA, we need to call resolve_patch_target () since the GOT slot could have
-                        * been initialized by load_method () for a static cctor before the cctor has
-                        * finished executing (#23242).
-                        */
-                       if (!got [got_slots [pindex]] || ji->type == MONO_PATCH_INFO_SFLDA) {
-                               addr = mono_resolve_patch_target (method, domain, code, ji, TRUE);
-                               if (ji->type == MONO_PATCH_INFO_METHOD_JUMP)
-                                       addr = mono_create_ftnptr (domain, addr);
-                               mono_memory_barrier ();
-                               got [got_slots [pindex]] = addr;
-                               if (ji->type == MONO_PATCH_INFO_METHOD_JUMP)
-                                       register_jump_target_got_slot (domain, ji->data.method, &(got [got_slots [pindex]]));
-                       }
-                       ji->type = MONO_PATCH_INFO_NONE;
-               }
-
-               g_free (got_slots);
-
-               if (!keep_patches)
-                       mono_mempool_destroy (mp);
-       }
-
-       if (mini_get_debug_options ()->load_aot_jit_info_eagerly)
-               jinfo = mono_aot_find_jit_info (domain, amodule->assembly->image, code);
+       res = init_method (amodule, method_index, method, &klass);
+       if (!res)
+               goto cleanup;
 
        if (mono_trace_is_traced (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT)) {
                char *full_name;
@@ -3754,7 +3698,7 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
                MonoJitInfo *jinfo;
 
                if (!method) {
-                       method = mono_get_method (image, token, NULL);
+                       method = mono_get_method (amodule->assembly->image, token, NULL);
                        g_assert (method);
                }
                mono_profiler_method_jit (method);
@@ -3769,11 +3713,6 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
        return code;
 
  cleanup:
-       /* FIXME: The space in domain->mp is wasted */  
-       if (amodule->info.opts & MONO_OPT_SHARED)
-               /* No need to cache patches */
-               mono_mempool_destroy (mp);
-
        if (jinfo)
                g_free (jinfo);
 
@@ -3921,6 +3860,89 @@ mono_aot_find_method_index (MonoMethod *method)
        return find_aot_method (method, &out_amodule);
 }
 
+static gboolean
+init_method (MonoAotModule *amodule, guint32 method_index, MonoMethod *method, MonoClass **klass)
+{
+       MonoDomain *domain = mono_domain_get ();
+       MonoMemPool *mp;
+       int pindex, n_patches;
+       guint8 *p;
+       MonoJitInfo *jinfo = NULL;
+       guint8 *code, *info;
+
+       code = amodule->methods [method_index];
+       info = &amodule->blob [mono_aot_get_offset (amodule->method_info_offsets, method_index)];
+
+       p = info;
+
+       if (method) {
+               *klass = method->klass;
+               decode_klass_ref (amodule, p, &p);
+       } else {
+               *klass = decode_klass_ref (amodule, p, &p);
+       }
+
+       n_patches = decode_value (p, &p);
+
+       if (n_patches) {
+               MonoJumpInfo *patches;
+               guint32 *got_slots;
+               gboolean llvm;
+               gpointer *got;
+
+               mp = mono_mempool_new ();
+
+               if ((gpointer)code >= amodule->info.jit_code_start && (gpointer)code <= amodule->info.jit_code_end) {
+                       llvm = FALSE;
+                       got = amodule->got;
+               } else {
+                       llvm = TRUE;
+                       got = amodule->llvm_got;
+                       g_assert (got);
+               }
+
+               patches = load_patch_info (amodule, mp, n_patches, llvm, &got_slots, p, &p);
+               if (patches == NULL)
+                       goto cleanup;
+
+               for (pindex = 0; pindex < n_patches; ++pindex) {
+                       MonoJumpInfo *ji = &patches [pindex];
+                       gpointer addr;
+
+                       /*
+                        * For SFLDA, we need to call resolve_patch_target () since the GOT slot could have
+                        * been initialized by load_method () for a static cctor before the cctor has
+                        * finished executing (#23242).
+                        */
+                       if (!got [got_slots [pindex]] || ji->type == MONO_PATCH_INFO_SFLDA) {
+                               addr = mono_resolve_patch_target (method, domain, code, ji, TRUE);
+                               if (ji->type == MONO_PATCH_INFO_METHOD_JUMP)
+                                       addr = mono_create_ftnptr (domain, addr);
+                               mono_memory_barrier ();
+                               got [got_slots [pindex]] = addr;
+                               if (ji->type == MONO_PATCH_INFO_METHOD_JUMP)
+                                       register_jump_target_got_slot (domain, ji->data.method, &(got [got_slots [pindex]]));
+                       }
+                       ji->type = MONO_PATCH_INFO_NONE;
+               }
+
+               g_free (got_slots);
+
+               mono_mempool_destroy (mp);
+       }
+
+       if (mini_get_debug_options ()->load_aot_jit_info_eagerly)
+               jinfo = mono_aot_find_jit_info (domain, amodule->assembly->image, code);
+
+       return TRUE;
+
+ cleanup:
+       if (jinfo)
+               g_free (jinfo);
+
+       return FALSE;
+}
+
 /*
  * mono_aot_get_method:
  *
@@ -3969,7 +3991,7 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method)
 
        /* Find method index */
        method_index = 0xffffff;
-       if (method->is_inflated && !method->wrapper_type && mono_method_is_generic_sharable_full (method, FALSE, FALSE, FALSE)) {
+       if (method->is_inflated && !method->wrapper_type && mono_method_is_generic_sharable_full (method, TRUE, FALSE, FALSE)) {
                /* 
                 * For generic methods, we store the fully shared instance in place of the
                 * original method.
@@ -4592,6 +4614,21 @@ load_function (MonoAotModule *amodule, const char *name)
        return load_function_full (amodule, name, NULL);
 }
 
+static MonoAotModule*
+get_mscorlib_aot_module (void)
+{
+       MonoImage *image;
+       MonoAotModule *amodule;
+
+       image = mono_defaults.corlib;
+       if (image)
+               amodule = image->aot_module;
+       else
+               amodule = mscorlib_aot_module;
+       g_assert (amodule);
+       return amodule;
+}
+
 /*
  * Return the trampoline identified by NAME from the mscorlib AOT file.
  * On ppc64, this returns a function descriptor.
@@ -4599,14 +4636,7 @@ load_function (MonoAotModule *amodule, const char *name)
 gpointer
 mono_aot_get_trampoline_full (const char *name, MonoTrampInfo **out_tinfo)
 {
-       MonoImage *image;
-       MonoAotModule *amodule;
-
-       image = mono_defaults.corlib;
-       g_assert (image);
-
-       amodule = image->aot_module;
-       g_assert (amodule);
+       MonoAotModule *amodule = get_mscorlib_aot_module ();
 
        return mono_create_ftnptr_malloc (load_function_full (amodule, name, out_tinfo));
 }
@@ -4647,16 +4677,15 @@ get_new_trampoline_from_page (int tramp_type)
                return code;
        }
        mono_aot_page_unlock ();
-       psize = mono_pagesize ();
        /* the trampoline template page is in the mscorlib module */
        image = mono_defaults.corlib;
        g_assert (image);
 
+       psize = MONO_AOT_TRAMP_PAGE_SIZE;
+
        amodule = image->aot_module;
        g_assert (amodule);
 
-       g_assert (amodule->info.tramp_page_size == psize);
-
        if (tramp_type == MONO_AOT_TRAMP_SPECIFIC)
                tpage = load_function (amodule, "specific_trampolines_page");
        else if (tramp_type == MONO_AOT_TRAMP_STATIC_RGCTX)
@@ -4738,7 +4767,7 @@ get_new_specific_trampoline_from_page (gpointer tramp, gpointer arg)
 
        code = get_new_trampoline_from_page (MONO_AOT_TRAMP_SPECIFIC);
 
-       data = (gpointer*)((char*)code - mono_pagesize ());
+       data = (gpointer*)((char*)code - MONO_AOT_TRAMP_PAGE_SIZE);
        data [0] = arg;
        data [1] = tramp;
        /*g_warning ("new trampoline at %p for data %p, tramp %p (stored at %p)", code, arg, tramp, data);*/
@@ -4754,7 +4783,7 @@ get_new_rgctx_trampoline_from_page (gpointer tramp, gpointer arg)
 
        code = get_new_trampoline_from_page (MONO_AOT_TRAMP_STATIC_RGCTX);
 
-       data = (gpointer*)((char*)code - mono_pagesize ());
+       data = (gpointer*)((char*)code - MONO_AOT_TRAMP_PAGE_SIZE);
        data [0] = arg;
        data [1] = tramp;
        /*g_warning ("new rgctx trampoline at %p for data %p, tramp %p (stored at %p)", code, arg, tramp, data);*/
@@ -4770,7 +4799,7 @@ get_new_imt_trampoline_from_page (gpointer arg)
 
        code = get_new_trampoline_from_page (MONO_AOT_TRAMP_IMT_THUNK);
 
-       data = (gpointer*)((char*)code - mono_pagesize ());
+       data = (gpointer*)((char*)code - MONO_AOT_TRAMP_PAGE_SIZE);
        data [0] = arg;
        /*g_warning ("new imt trampoline at %p for data %p, (stored at %p)", code, arg, data);*/
        return code;
@@ -4785,7 +4814,7 @@ get_new_gsharedvt_arg_trampoline_from_page (gpointer tramp, gpointer arg)
 
        code = get_new_trampoline_from_page (MONO_AOT_TRAMP_GSHAREDVT_ARG);
 
-       data = (gpointer*)((char*)code - mono_pagesize ());
+       data = (gpointer*)((char*)code - MONO_AOT_TRAMP_PAGE_SIZE);
        data [0] = arg;
        data [1] = tramp;
        /*g_warning ("new rgctx trampoline at %p for data %p, tramp %p (stored at %p)", code, arg, tramp, data);*/
@@ -4796,21 +4825,17 @@ get_new_gsharedvt_arg_trampoline_from_page (gpointer tramp, gpointer arg)
 static gpointer
 get_numerous_trampoline (MonoAotTrampoline tramp_type, int n_got_slots, MonoAotModule **out_amodule, guint32 *got_offset, guint32 *out_tramp_size)
 {
-       MonoAotModule *amodule;
-       int index, tramp_size;
        MonoImage *image;
+       MonoAotModule *amodule = get_mscorlib_aot_module ();
+       int index, tramp_size;
 
        /* Currently, we keep all trampolines in the mscorlib AOT image */
        image = mono_defaults.corlib;
-       g_assert (image);
-
-       mono_aot_lock ();
-
-       amodule = image->aot_module;
-       g_assert (amodule);
 
        *out_amodule = amodule;
 
+       mono_aot_lock ();
+
 #ifdef MONOTOUCH
 #define        MONOTOUCH_TRAMPOLINES_ERROR ". See http://docs.xamarin.com/ios/troubleshooting for instructions on how to fix this condition."
 #else
@@ -4818,7 +4843,7 @@ get_numerous_trampoline (MonoAotTrampoline tramp_type, int n_got_slots, MonoAotM
 #endif
        if (amodule->trampoline_index [tramp_type] == amodule->info.num_trampolines [tramp_type]) {
                g_error ("Ran out of trampolines of type %d in '%s' (%d)%s\n", 
-                                tramp_type, image->name, amodule->info.num_trampolines [tramp_type], MONOTOUCH_TRAMPOLINES_ERROR);
+                                tramp_type, image ? image->name : "mscorlib", amodule->info.num_trampolines [tramp_type], MONOTOUCH_TRAMPOLINES_ERROR);
        }
        index = amodule->trampoline_index [tramp_type] ++;
 
index 7324fe21f370de11f66557651213a618dbf2ff89..17e3cfafee9a6476951c576492969fa282691f5b 100644 (file)
@@ -106,6 +106,7 @@ class Tests
                return 0;
        }
 
+       [Category ("DYNCALL")]
        [Category ("GSHAREDVT")]
        static int test_0_arm64_dyncall_gsharedvt_out_hfa_double () {
                /* gsharedvt out trampoline with double hfa argument */
@@ -124,6 +125,7 @@ class Tests
                return 0;
        }
 
+       [Category ("DYNCALL")]
        [Category ("GSHAREDVT")]
        static int test_0_arm64_dyncall_gsharedvt_out_hfa_float () {
                /* gsharedvt out trampoline with double hfa argument */
@@ -240,4 +242,19 @@ class Tests
                        return 3;
                return 0;
        }
+
+       enum AnEnum {
+               A = 0,
+               B = 1
+       }
+
+       public static int test_0_enum_eq_comparer () {
+               var c = EqualityComparer<AnEnum>.Default;
+               return (!c.Equals (AnEnum.A, AnEnum.B) && c.Equals (AnEnum.A, AnEnum.A)) ? 0 : 1;
+       }
+
+       public static int test_0_enum_comparer () {
+               var c = Comparer<AnEnum>.Default;
+               return c.Compare (AnEnum.A, AnEnum.A);
+       }
 }
index caf10c5552f22b803c64f5bc7df56b7ae61e8a0a..0d63141cf8a39ca3ce675910996a8872575206c4 100644 (file)
@@ -357,7 +357,7 @@ long_conv_to_ovf_i4_2: dest:i src1:i src2:i len:36
 vcall2: len:64 clob:c
 vcall2_reg: src1:i len:64 clob:c
 vcall2_membase: src1:b len:64 clob:c
-dyn_call: src1:i src2:i len:120 clob:c
+dyn_call: src1:i src2:i len:136 clob:c
 
 # This is different from the original JIT opcodes
 float_beq: len:32
index dcecc4dfb05f191a8cd5d187d3d271ff44410c8f..1fd3ff90b475ac5d78f20e846f4639defb069303 100644 (file)
 #include <mono/metadata/gc-internal.h>
 #include <mono/metadata/environment.h>
 #include <mono/metadata/threads-types.h>
+#include <mono/metadata/threadpool-ms.h>
 #include <mono/metadata/socket-io.h>
 #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>
@@ -2764,7 +2764,7 @@ suspend_vm (void)
                /*
                 * Suspend creation of new threadpool threads, since they cannot run
                 */
-               mono_thread_pool_suspend ();
+               mono_threadpool_ms_suspend ();
 
        mono_loader_unlock ();
 }
@@ -2807,7 +2807,7 @@ resume_vm (void)
        //g_assert (err == 0);
 
        if (suspend_count == 0)
-               mono_thread_pool_resume ();
+               mono_threadpool_ms_resume ();
 
        mono_loader_unlock ();
 }
@@ -9192,6 +9192,14 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
        if (err)
                return err;
 
+       MonoClass *obj_type;
+
+       obj_type = obj->vtable->klass;
+       if (mono_class_is_transparent_proxy (obj_type))
+               obj_type = ((MonoTransparentProxy *)obj)->remote_class->proxy_class;
+
+       g_assert (obj_type);
+
        switch (command) {
        case CMD_OBJECT_REF_GET_TYPE:
                /* This handles transparent proxies too */
@@ -9207,7 +9215,7 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
 
                        /* Check that the field belongs to the object */
                        found = FALSE;
-                       for (k = obj->vtable->klass; k; k = k->parent) {
+                       for (k = obj_type; k; k = k->parent) {
                                if (k == f->parent) {
                                        found = TRUE;
                                        break;
@@ -9244,7 +9252,7 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
 
                        /* Check that the field belongs to the object */
                        found = FALSE;
-                       for (k = obj->vtable->klass; k; k = k->parent) {
+                       for (k = obj_type; k; k = k->parent) {
                                if (k == f->parent) {
                                        found = TRUE;
                                        break;
index 25dd97da870ef5c821a31e1b0c15a3c3dc6aa438..5a2fdde7d91e0ebf1740c32a3cb8e5fc5b40a398 100644 (file)
@@ -299,7 +299,7 @@ decompose_long_opcode (MonoCompile *cfg, MonoInst *ins, MonoInst **repl_ins)
  * Sets the cfg exception if an opcode is not supported.
  */
 MonoInst*
-mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins, MonoBasicBlock **out_cbb)
+mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins)
 {
        MonoInst *repl = NULL;
        int type = ins->type;
@@ -556,7 +556,7 @@ mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins, MonoBasicBlock **out_cbb
                                }
                        }
 
-                       call = mono_emit_jit_icall_by_info (cfg, info, args, out_cbb);
+                       call = mono_emit_jit_icall_by_info (cfg, info, args);
                        call->dreg = ins->dreg;
 
                        NULLIFY_INS (ins);
index eed837619ff1c635823d83824687031459c4389c..884d4a82ae9b88e5ab0a4f5fafe79e0f5d58f28b 100644 (file)
@@ -145,10 +145,8 @@ extern char *nacl_mono_path;
 #define EXCLUDED_FROM_ALL (MONO_OPT_SHARED | MONO_OPT_PRECOMP | MONO_OPT_UNSAFE | MONO_OPT_GSHAREDVT | MONO_OPT_FLOAT32)
 
 static guint32
-parse_optimizations (const char* p)
+parse_optimizations (guint32 opt, const char* p)
 {
-       /* the default value */
-       guint32 opt = DEFAULT_OPTIMIZATIONS;
        guint32 exclude = 0;
        const char *n;
        int i, invert, len;
@@ -284,7 +282,7 @@ mono_parse_default_optimizations (const char* p)
 {
        guint32 opt;
 
-       opt = parse_optimizations (p);
+       opt = parse_optimizations (DEFAULT_OPTIMIZATIONS, p);
        return opt;
 }
 
@@ -386,7 +384,7 @@ mini_regression_step (MonoImage *image, int verbose, int *total_run, int *total,
                        run++;
                        start_time = g_timer_elapsed (timer, NULL);
                        comp_time -= start_time;
-                       cfg = mini_method_compile (method, mono_get_optimizations_for_method (method, opt_flags), mono_get_root_domain (), JIT_FLAG_RUN_CCTORS, 0);
+                       cfg = mini_method_compile (method, mono_get_optimizations_for_method (method, opt_flags), mono_get_root_domain (), JIT_FLAG_RUN_CCTORS, 0, -1);
                        comp_time += g_timer_elapsed (timer, NULL);
                        if (cfg->exception_type == MONO_EXCEPTION_NONE) {
                                if (verbose >= 2)
@@ -934,7 +932,7 @@ compile_all_methods_thread_main_inner (CompileAllThreadArgs *args)
                        g_print ("Compiling %d %s\n", count, desc);
                        g_free (desc);
                }
-               cfg = mini_method_compile (method, mono_get_optimizations_for_method (method, args->opts), mono_get_root_domain (), 0, 0);
+               cfg = mini_method_compile (method, mono_get_optimizations_for_method (method, args->opts), mono_get_root_domain (), 0, 0, -1);
                if (cfg->exception_type != MONO_EXCEPTION_NONE) {
                        printf ("Compilation of %s failed with exception '%s':\n", mono_method_full_name (cfg->method, TRUE), cfg->exception_message);
                        fail_count ++;
@@ -1342,12 +1340,15 @@ mono_jit_parse_options (int argc, char * argv[])
        int i;
        char *trace_options = NULL;
        int mini_verbose = 0;
+       guint32 opt;
 
        /* 
         * Some options have no effect here, since they influence the behavior of 
         * mono_main ().
         */
 
+       opt = mono_parse_default_optimizations (NULL);
+
        /* FIXME: Avoid code duplication */
        for (i = 0; i < argc; ++i) {
                if (argv [i] [0] != '-')
@@ -1364,10 +1365,10 @@ mono_jit_parse_options (int argc, char * argv[])
                        opt->soft_breakpoints = TRUE;
                        opt->explicit_null_checks = TRUE;
                } else if (strncmp (argv [i], "--optimize=", 11) == 0) {
-                       guint32 opt = parse_optimizations (argv [i] + 11);
+                       opt = parse_optimizations (opt, argv [i] + 11);
                        mono_set_optimizations (opt);
                } else if (strncmp (argv [i], "-O=", 3) == 0) {
-                       guint32 opt = parse_optimizations (argv [i] + 3);
+                       opt = parse_optimizations (opt, argv [i] + 3);
                        mono_set_optimizations (opt);
                } else if (strcmp (argv [i], "--trace") == 0) {
                        trace_options = (char*)"";
@@ -1519,7 +1520,7 @@ mono_main (int argc, char* argv[])
        g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
        g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR);
 
-       opt = parse_optimizations (NULL);
+       opt = mono_parse_default_optimizations (NULL);
 
        for (i = 1; i < argc; ++i) {
                if (argv [i] [0] != '-')
@@ -1529,7 +1530,7 @@ mono_main (int argc, char* argv[])
                } else if (strncmp (argv [i], "--single-method=", 16) == 0) {
                        char *full_opts = g_strdup_printf ("-all,%s", argv [i] + 16);
                        action = DO_SINGLE_METHOD_REGRESSION;
-                       mono_single_method_regression_opt = parse_optimizations (full_opts);
+                       mono_single_method_regression_opt = parse_optimizations (opt, full_opts);
                        g_free (full_opts);
                } else if (strcmp (argv [i], "--verbose") == 0 || strcmp (argv [i], "-v") == 0) {
                        mini_verbose++;
@@ -1579,9 +1580,9 @@ mono_main (int argc, char* argv[])
                        }
                        mini_stats_fd = fopen (argv [++i], "w+");
                } else if (strncmp (argv [i], "--optimize=", 11) == 0) {
-                       opt = parse_optimizations (argv [i] + 11);
+                       opt = parse_optimizations (opt, argv [i] + 11);
                } else if (strncmp (argv [i], "-O=", 3) == 0) {
-                       opt = parse_optimizations (argv [i] + 3);
+                       opt = parse_optimizations (opt, argv [i] + 3);
                } else if (strcmp (argv [i], "--gc=sgen") == 0) {
                        switch_gc (argv, "sgen");
                } else if (strcmp (argv [i], "--gc=boehm") == 0) {
@@ -2065,10 +2066,10 @@ mono_main (int argc, char* argv[])
                        (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)) {
                        MonoMethod *nm;
                        nm = mono_marshal_get_native_wrapper (method, TRUE, FALSE);
-                       cfg = mini_method_compile (nm, opt, mono_get_root_domain (), 0, part);
+                       cfg = mini_method_compile (nm, opt, mono_get_root_domain (), 0, part, -1);
                }
                else
-                       cfg = mini_method_compile (method, opt, mono_get_root_domain (), 0, part);
+                       cfg = mini_method_compile (method, opt, mono_get_root_domain (), 0, part, -1);
                if ((mono_graph_options & MONO_GRAPH_CFG_SSA) && !(cfg->comp_done & MONO_COMP_SSA)) {
                        g_warning ("no SSA info available (use -O=deadce)");
                        return 1;
@@ -2100,7 +2101,7 @@ mono_main (int argc, char* argv[])
                                opt = opt_sets [i];
                                g_timer_start (timer);
                                for (j = 0; j < count; ++j) {
-                                       cfg = mini_method_compile (method, opt, mono_get_root_domain (), 0, 0);
+                                       cfg = mini_method_compile (method, opt, mono_get_root_domain (), 0, 0, -1);
                                        mono_destroy_compile (cfg);
                                }
                                g_timer_stop (timer);
@@ -2123,12 +2124,12 @@ mono_main (int argc, char* argv[])
                                        (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL))
                                        method = mono_marshal_get_native_wrapper (method, TRUE, FALSE);
 
-                               cfg = mini_method_compile (method, opt, mono_get_root_domain (), 0, 0);
+                               cfg = mini_method_compile (method, opt, mono_get_root_domain (), 0, 0, -1);
                                mono_destroy_compile (cfg);
                        }
                }
        } else {
-               cfg = mini_method_compile (method, opt, mono_get_root_domain (), 0, 0);
+               cfg = mini_method_compile (method, opt, mono_get_root_domain (), 0, 0, -1);
                mono_destroy_compile (cfg);
        }
 #endif
index b2c99a04ad70c087e981883ff9ffaf24f3915cdb..decdd5ec10e092bf8f0eccbdf31d72b5174171d7 100644 (file)
@@ -817,7 +817,9 @@ emit_all_line_number_info (MonoDwarfWriter *w)
                MethodLineNumberInfo *info = l->data;
                MonoDebugMethodJitInfo *dmji;
 
-               dmji = mono_debug_find_method (info->method, mono_domain_get ());;
+               dmji = mono_debug_find_method (info->method, mono_domain_get ());
+               if (!dmji)
+                       continue;
                emit_line_number_info (w, info->method, info->start_symbol, info->end_symbol, info->code, info->code_size, dmji);
                mono_debug_free_method_jit_info (dmji);
        }
@@ -1643,8 +1645,12 @@ emit_line_number_info (MonoDwarfWriter *w, MonoMethod *method,
                prev_il_offset = il_offset;
 
                loc = mono_debug_symfile_lookup_location (minfo, il_offset);
-               if (!(loc && loc->source_file))
+               if (!loc)
+                       continue;
+               if (!loc->source_file) {
+                       mono_debug_symfile_free_location (loc);
                        continue;
+               }
 
                line_diff = (gint32)loc->row - (gint32)prev_line;
                addr_diff = i - prev_native_offset;
@@ -1875,6 +1881,9 @@ mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod
                int file_index = add_line_number_file_name (w, loc->source_file, 0, 0);
                emit_uleb128 (w, file_index + 1);
                emit_uleb128 (w, loc->row);
+
+               mono_debug_symfile_free_location (loc);
+               loc = NULL;
        } else {
                emit_uleb128 (w, 0);
                emit_uleb128 (w, 0);
index e93b9942285c8440a1de49f4b8a40e0137e2a661..e0edb684baa9657568993292f08650423980df00 100644 (file)
@@ -345,7 +345,7 @@ mono_amd64_throw_corlib_exception (guint64 dummy1, guint64 dummy2, guint64 dummy
        mono_amd64_throw_exception (dummy1, dummy2, dummy3, dummy4, dummy5, dummy6, mctx, (MonoObject*)ex, FALSE);
 }
 
-static void
+void
 mono_amd64_resume_unwind (guint64 dummy1, guint64 dummy2, guint64 dummy3, guint64 dummy4,
                                                  guint64 dummy5, guint64 dummy6,
                                                  MonoContext *mctx, guint32 dummy7, gint64 dummy8)
@@ -445,7 +445,15 @@ get_throw_trampoline (MonoTrampInfo **info, gboolean rethrow, gboolean corlib, g
        }
 
        if (aot) {
-               ji = mono_patch_info_list_prepend (ji, code - start, MONO_PATCH_INFO_JIT_ICALL_ADDR, corlib ? "mono_amd64_throw_corlib_exception" : "mono_amd64_throw_exception");
+               const char *icall_name;
+
+               if (resume_unwind)
+                       icall_name = "mono_amd64_resume_unwind";
+               else if (corlib)
+                       icall_name = "mono_amd64_throw_corlib_exception";
+               else
+                       icall_name = "mono_amd64_throw_exception";
+               ji = mono_patch_info_list_prepend (ji, code - start, MONO_PATCH_INFO_JIT_ICALL_ADDR, icall_name);
                amd64_mov_reg_membase (code, AMD64_R11, AMD64_RIP, 0, 8);
        } else {
                amd64_mov_reg_imm (code, AMD64_R11, resume_unwind ? ((gpointer)mono_amd64_resume_unwind) : (corlib ? (gpointer)mono_amd64_throw_corlib_exception : (gpointer)mono_amd64_throw_exception));
@@ -1006,7 +1014,7 @@ mono_amd64_get_exception_trampolines (gboolean aot)
        get_throw_trampoline (&info, FALSE, TRUE, TRUE, FALSE, "llvm_throw_corlib_exception_abs_trampoline", aot);
        tramps = g_slist_prepend (tramps, info);
 
-       get_throw_trampoline (&info, FALSE, TRUE, TRUE, TRUE, "llvm_resume_unwind_trampoline", FALSE);
+       get_throw_trampoline (&info, FALSE, TRUE, TRUE, TRUE, "llvm_resume_unwind_trampoline", aot);
        tramps = g_slist_prepend (tramps, info);
 
        return tramps;
index b9534ae395bc7604c1b9182bb0a32075e2915a6a..2a4aae744e1fce2678c83e74d4c3d1f47d89c76d 100644 (file)
@@ -12,6 +12,9 @@
 #include <glib.h>
 #include <signal.h>
 #include <string.h>
+#ifdef HAVE_UCONTEXT_H
+#include <ucontext.h>
+#endif
 
 #include <mono/metadata/abi-details.h>
 #include <mono/arch/x86/x86-codegen.h>
index c698f47cf9d6d46bf84029ec1c1d27245cd6ca69..9d7517e39e35c0aa05dc796db55cac9a700f5c25 100644 (file)
@@ -711,6 +711,7 @@ class Tests
                return 0;
        }
 
+       [Category ("GSHAREDVT")]
        public static int test_6_partial_sharing_linq () {
                var messages = new List<Message> ();
 
@@ -949,6 +950,7 @@ class Tests
        }
 
        // #2155
+       [Category ("GSHAREDVT")]
        public static int test_0_fullaot_sflda_cctor () {
                List<Doc> documents = new List<Doc>();
                documents.Add(new Doc { Name = "Doc1", Type = DocType.One } );
index d9b0adec2f1341ec9f7a076d8c2231d5bef07b97..fed9002320487da1e5088867e4905881ca99a3f9 100644 (file)
@@ -336,10 +336,14 @@ mono_draw_graph (MonoCompile *cfg, MonoGraphOptions draw_options)
 
        fclose (fp);
 
+#ifdef HAVE_SYSTEM
        //com = g_strdup_printf ("dot %s -Tpng -o %s.png; eog %s.png", fn, fn, fn);
        com = g_strdup_printf ("dot %s -Tps -o %s.ps;gv %s.ps", fn, fn, fn);
        _i = system (com);
        g_free (com);
+#else
+       g_assert_not_reached ();
+#endif
 }
 
 #endif /* DISABLE_JIT */
index b48962fd08dcd0a4dce94a2abd0b1d07f0729d22..65b234486b1dae91a3f3840b17e770fa1961caf3 100644 (file)
@@ -271,6 +271,7 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id)
        close (i);
 #endif
 
+#ifdef HAVE_SYSTEM
        cmd = g_strdup_printf (ARCH_PREFIX AS_CMD " %s -o %s", as_file, o_file);
        unused = system (cmd); 
        g_free (cmd);
@@ -292,6 +293,9 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id)
        cmd = g_strdup_printf (ARCH_PREFIX DIS_CMD " %s %s", objdump_args, o_file);
        unused = system (cmd);
        g_free (cmd);
+#else
+       g_assert_not_reached ();
+#endif /* HAVE_SYSTEM */
 
 #ifndef HOST_WIN32
        unlink (o_file);
index fe05ecca2d36a5569abfd30b622b71bf3868d86b..eeea8d938145942265353fe04d3a117800ff2d37 100644 (file)
@@ -754,8 +754,8 @@ handle_gsharedvt_ldaddr (MonoCompile *cfg)
                (b)->real_offset = cfg->real_offset;    \
        } while (0)
 
-/* Emit a one-way conditional branch */
-/* 
+/*
+ * Emit a one-way conditional branch and start a new bblock.
  * The inst_false_bb field of the cond branch will not be set, the JIT code should be
  * prepared to deal with this.
  */
index 1e94b262df7a9a40b61b8501e7aed244a1bc40b2..e0c9e31a941b18002533adefea0ffbcda6292e19 100644 (file)
@@ -1022,7 +1022,7 @@ mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, gpointe
 
        addr = mono_compile_method (vmethod);
 
-       addr = mini_add_method_trampoline (NULL, vmethod, addr, mono_method_needs_static_rgctx_invoke (vmethod, FALSE), FALSE);
+       addr = mini_add_method_trampoline (vmethod, addr, mono_method_needs_static_rgctx_invoke (vmethod, FALSE), FALSE);
 
        /* Since this is a virtual call, have to unbox vtypes */
        if (obj->vtable->klass->valuetype)
@@ -1285,3 +1285,15 @@ mono_generic_class_init (MonoVTable *vtable)
 {
        mono_runtime_class_init (vtable);
 }
+
+gpointer
+mono_fill_class_rgctx (MonoVTable *vtable, int index)
+{
+       return mono_class_fill_runtime_generic_context (vtable, index);
+}
+
+gpointer
+mono_fill_method_rgctx (MonoMethodRuntimeGenericContext *mrgctx, int index)
+{
+       return mono_method_fill_runtime_generic_context (mrgctx, index);
+}
index 9ec1a4f60e709b203d5d1d8665f93483161afc86..d31e06e63c5f99dd4511a227031563398f31594f 100644 (file)
@@ -189,5 +189,9 @@ mono_gsharedvt_constrained_call (gpointer mp, MonoMethod *cmethod, MonoClass *kl
 
 void mono_gsharedvt_value_copy (gpointer dest, gpointer src, MonoClass *klass);
 
+gpointer mono_fill_class_rgctx (MonoVTable *vtable, int index);
+
+gpointer mono_fill_method_rgctx (MonoMethodRuntimeGenericContext *mrgctx, int index);
+
 #endif /* __MONO_JIT_ICALLS_H__ */
 
index d27e1fda45c473ac244f5078f8090db9d79f94dc..ef3090304837c0dfb8ffd2254ddcd2ee339d35e1 100644 (file)
@@ -144,7 +144,7 @@ int mono_op_to_op_imm_noemul (int opcode);
 MONO_API MonoInst* mono_emit_native_call (MonoCompile *cfg, gconstpointer func, MonoMethodSignature *sig, MonoInst **args);
 
 static int inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **sp,
-                                                 guchar *ip, guint real_offset, gboolean inline_always, MonoBasicBlock **out_cbb);
+                                                 guchar *ip, guint real_offset, gboolean inline_always);
 
 /* helper methods signatures */
 static MonoMethodSignature *helper_sig_class_init_trampoline;
@@ -508,7 +508,7 @@ add_widen_op (MonoCompile *cfg, MonoInst *ins, MonoInst **arg1_ref, MonoInst **a
         add_widen_op (cfg, ins, &sp [0], &sp [1]);              \
         ins->dreg = alloc_dreg ((cfg), (ins)->type); \
         MONO_ADD_INS ((cfg)->cbb, (ins)); \
-        *sp++ = mono_decompose_opcode ((cfg), (ins), &bblock); \
+        *sp++ = mono_decompose_opcode ((cfg), (ins));  \
        } while (0)
 
 #define ADD_UNOP(op) do {      \
@@ -519,7 +519,7 @@ add_widen_op (MonoCompile *cfg, MonoInst *ins, MonoInst **arg1_ref, MonoInst **a
                CHECK_TYPE (ins);       \
         (ins)->dreg = alloc_dreg ((cfg), (ins)->type); \
         MONO_ADD_INS ((cfg)->cbb, (ins)); \
-               *sp++ = mono_decompose_opcode (cfg, ins, &bblock);      \
+               *sp++ = mono_decompose_opcode (cfg, ins);       \
        } while (0)
 
 #define ADD_BINCOND(next_block) do {   \
@@ -534,15 +534,15 @@ add_widen_op (MonoCompile *cfg, MonoInst *ins, MonoInst **arg1_ref, MonoInst **a
                type_from_op (cfg, ins, sp [0], sp [1]);                                                        \
                ins->inst_many_bb = mono_mempool_alloc (cfg->mempool, sizeof(gpointer)*2);      \
                GET_BBLOCK (cfg, tblock, target);               \
-               link_bblock (cfg, bblock, tblock);      \
+               link_bblock (cfg, cfg->cbb, tblock);    \
                ins->inst_true_bb = tblock;     \
                if ((next_block)) {     \
-                       link_bblock (cfg, bblock, (next_block));        \
+                       link_bblock (cfg, cfg->cbb, (next_block));      \
                        ins->inst_false_bb = (next_block);      \
                        start_new_bblock = 1;   \
                } else {        \
                        GET_BBLOCK (cfg, tblock, ip);           \
-                       link_bblock (cfg, bblock, tblock);      \
+                       link_bblock (cfg, cfg->cbb, tblock);    \
                        ins->inst_false_bb = tblock;    \
                        start_new_bblock = 2;   \
                }       \
@@ -550,8 +550,8 @@ add_widen_op (MonoCompile *cfg, MonoInst *ins, MonoInst **arg1_ref, MonoInst **a
                    handle_stack_args (cfg, stack_start, sp - stack_start); \
                        CHECK_UNVERIFIABLE (cfg); \
                } \
-        MONO_ADD_INS (bblock, cmp); \
-               MONO_ADD_INS (bblock, ins);     \
+        MONO_ADD_INS (cfg->cbb, cmp); \
+               MONO_ADD_INS (cfg->cbb, ins);   \
        } while (0)
 
 /* *
@@ -2502,15 +2502,8 @@ check_method_sharing (MonoCompile *cfg, MonoMethod *cmethod, gboolean *out_pass_
                (cmethod->klass->generic_class || cmethod->klass->generic_container)) {
                gboolean sharable = FALSE;
 
-               if (mono_method_is_generic_sharable (cmethod, TRUE)) {
+               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
@@ -2530,12 +2523,6 @@ check_method_sharing (MonoCompile *cfg, MonoMethod *cmethod, gboolean *out_pass_
                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;
                }
@@ -2966,7 +2953,7 @@ direct_icalls_enabled (MonoCompile *cfg)
 }
 
 MonoInst*
-mono_emit_jit_icall_by_info (MonoCompile *cfg, MonoJitICallInfo *info, MonoInst **args, MonoBasicBlock **out_cbb)
+mono_emit_jit_icall_by_info (MonoCompile *cfg, MonoJitICallInfo *info, MonoInst **args)
 {
        /*
         * Call the jit icall without a wrapper if possible.
@@ -2993,7 +2980,7 @@ mono_emit_jit_icall_by_info (MonoCompile *cfg, MonoJitICallInfo *info, MonoInst
                 * an exception check.
                 */
                costs = inline_method (cfg, info->wrapper_method, NULL,
-                                                          args, NULL, cfg->real_offset, TRUE, out_cbb);
+                                                          args, NULL, cfg->real_offset, TRUE);
                g_assert (costs > 0);
                g_assert (!MONO_TYPE_IS_VOID (info->sig->ret));
 
@@ -3368,6 +3355,12 @@ mini_emit_initobj (MonoCompile *cfg, MonoInst *dest, const guchar *ip, MonoClass
        }
 }
 
+/*
+ * emit_get_rgctx:
+ *
+ *   Emit IR to return either the this pointer for instance method,
+ * or the mrgctx for static methods.
+ */
 static MonoInst*
 emit_get_rgctx (MonoCompile *cfg, MonoMethod *method, int context_used)
 {
@@ -3432,10 +3425,106 @@ mono_patch_info_rgctx_entry_new (MonoMemPool *mp, MonoMethod *method, gboolean i
        return res;
 }
 
+/*
+ * emit_rgctx_fetch:
+ *
+ *   Emit IR to load the value of the rgctx entry ENTRY from the rgctx
+ * given by RGCTX.
+ */
 static inline MonoInst*
 emit_rgctx_fetch (MonoCompile *cfg, MonoInst *rgctx, MonoJumpInfoRgctxEntry *entry)
 {
+       /* Inline version, not currently used */
+       // FIXME: This can be called from mono_decompose_vtype_opts (), which can't create new bblocks
+#if 0
+       int i, slot, depth, index, rgctx_reg, val_reg, res_reg;
+       gboolean mrgctx;
+       MonoBasicBlock *is_null_bb, *end_bb;
+       MonoInst *res, *ins, *call;
+       MonoInst *args[16];
+
+       slot = mini_get_rgctx_entry_slot (entry);
+
+       mrgctx = MONO_RGCTX_SLOT_IS_MRGCTX (slot);
+       index = MONO_RGCTX_SLOT_INDEX (slot);
+       if (mrgctx)
+               index += MONO_SIZEOF_METHOD_RUNTIME_GENERIC_CONTEXT / sizeof (gpointer);
+       for (depth = 0; ; ++depth) {
+               int size = mono_class_rgctx_get_array_size (depth, mrgctx);
+
+               if (index < size - 1)
+                       break;
+               index -= size - 1;
+       }
+
+       NEW_BBLOCK (cfg, end_bb);
+       NEW_BBLOCK (cfg, is_null_bb);
+
+       if (mrgctx) {
+               rgctx_reg = rgctx->dreg;
+       } else {
+               rgctx_reg = alloc_preg (cfg);
+
+               MONO_EMIT_NEW_LOAD_MEMBASE (cfg, rgctx_reg, rgctx->dreg, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context));
+               // FIXME: Avoid this check by allocating the table when the vtable is created etc.
+               NEW_BBLOCK (cfg, is_null_bb);
+
+               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rgctx_reg, 0);
+               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, is_null_bb);
+       }
+
+       for (i = 0; i < depth; ++i) {
+               int array_reg = alloc_preg (cfg);
+
+               /* load ptr to next array */
+               if (mrgctx && i == 0)
+                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, array_reg, rgctx_reg, MONO_SIZEOF_METHOD_RUNTIME_GENERIC_CONTEXT);
+               else
+                       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, array_reg, rgctx_reg, 0);
+               rgctx_reg = array_reg;
+               /* is the ptr null? */
+               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rgctx_reg, 0);
+               /* if yes, jump to actual trampoline */
+               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, is_null_bb);
+       }
+
+       /* fetch slot */
+       val_reg = alloc_preg (cfg);
+       MONO_EMIT_NEW_LOAD_MEMBASE (cfg, val_reg, rgctx_reg, (index + 1) * sizeof (gpointer));
+       /* is the slot null? */
+       MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, val_reg, 0);
+       /* if yes, jump to actual trampoline */
+       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, is_null_bb);
+
+       /* Fastpath */
+       res_reg = alloc_preg (cfg);
+       MONO_INST_NEW (cfg, ins, OP_MOVE);
+       ins->dreg = res_reg;
+       ins->sreg1 = val_reg;
+       MONO_ADD_INS (cfg->cbb, ins);
+       res = ins;
+       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
+       /* Slowpath */
+       MONO_START_BB (cfg, is_null_bb);
+       args [0] = rgctx;
+       EMIT_NEW_ICONST (cfg, args [1], index);
+       if (mrgctx)
+               call = mono_emit_jit_icall (cfg, mono_fill_method_rgctx, args);
+       else
+               call = mono_emit_jit_icall (cfg, mono_fill_class_rgctx, args);
+       MONO_INST_NEW (cfg, ins, OP_MOVE);
+       ins->dreg = res_reg;
+       ins->sreg1 = call->dreg;
+       MONO_ADD_INS (cfg->cbb, ins);
+       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
+       MONO_START_BB (cfg, end_bb);
+
+       return res;
+#else
        return mono_emit_abs_call (cfg, MONO_PATCH_INFO_RGCTX_FETCH, entry, helper_sig_rgctx_lazy_fetch_trampoline, &rgctx);
+#endif
 }
 
 static MonoInst*
@@ -3619,14 +3708,12 @@ emit_get_gsharedvt_info_klass (MonoCompile *cfg, MonoClass *klass, MonoRgctxInfo
  * On return the caller must check @klass for load errors.
  */
 static void
-emit_generic_class_init (MonoCompile *cfg, MonoClass *klass, MonoBasicBlock **out_bblock)
+emit_generic_class_init (MonoCompile *cfg, MonoClass *klass)
 {
        MonoInst *vtable_arg;
        int context_used;
        gboolean use_op_generic_class_init = FALSE;
 
-       *out_bblock = cfg->cbb;
-
        context_used = mini_class_check_context_used (cfg, klass);
 
        if (context_used) {
@@ -3680,18 +3767,19 @@ emit_generic_class_init (MonoCompile *cfg, MonoClass *klass, MonoBasicBlock **ou
                mono_emit_jit_icall (cfg, mono_generic_class_init, args);
 
                MONO_START_BB (cfg, inited_bb);
-               *out_bblock = inited_bb;
        }
 }
 
 
 static void
-emit_class_init (MonoCompile *cfg, MonoClass *klass, MonoBasicBlock **out_bblock)
+emit_class_init (MonoCompile *cfg, MonoClass *klass)
 {
        /* This could be used as a fallback if needed */
-       //emit_generic_class_init (cfg, klass, out_bblock);
-
-       *out_bblock = cfg->cbb;
+       if (cfg->compile_aot) {
+               /* With the overhead of plt entries, the inline version is comparable in size/speed */
+               emit_generic_class_init (cfg, klass);
+               return;
+       }
 
        mono_emit_abs_call (cfg, MONO_PATCH_INFO_CLASS_INIT, klass, helper_sig_class_init_trampoline, NULL);
 }
@@ -3710,7 +3798,7 @@ emit_seq_point (MonoCompile *cfg, MonoMethod *method, guint8* ip, gboolean intr_
 }
 
 static void
-save_cast_details (MonoCompile *cfg, MonoClass *klass, int obj_reg, gboolean null_check, MonoBasicBlock **out_bblock)
+save_cast_details (MonoCompile *cfg, MonoClass *klass, int obj_reg, gboolean null_check)
 {
        if (mini_get_debug_options ()->better_cast_details) {
                int vtable_reg = alloc_preg (cfg);
@@ -3750,11 +3838,8 @@ save_cast_details (MonoCompile *cfg, MonoClass *klass, int obj_reg, gboolean nul
                }
                MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, tls_get->dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, class_cast_to), to_klass_reg);
 
-               if (null_check) {
+               if (null_check)
                        MONO_START_BB (cfg, is_null_bb);
-                       if (out_bblock)
-                               *out_bblock = cfg->cbb;
-               }
        }
 }
 
@@ -3782,7 +3867,7 @@ mini_emit_check_array_type (MonoCompile *cfg, MonoInst *obj, MonoClass *array_cl
 
        context_used = mini_class_check_context_used (cfg, array_class);
 
-       save_cast_details (cfg, array_class, obj->dreg, FALSE, NULL);
+       save_cast_details (cfg, array_class, obj->dreg, FALSE);
 
        MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable));
 
@@ -3899,7 +3984,7 @@ handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, int context_use
                MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, eclass_reg, element_class->dreg);
                MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
        } else {
-               save_cast_details (cfg, klass->element_class, obj_reg, FALSE, NULL);
+               save_cast_details (cfg, klass->element_class, obj_reg, FALSE);
                mini_emit_class_check (cfg, eclass_reg, klass->element_class);
                reset_cast_details (cfg);
        }
@@ -3913,7 +3998,7 @@ handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, int context_use
 }
 
 static MonoInst*
-handle_unbox_gsharedvt (MonoCompile *cfg, MonoClass *klass, MonoInst *obj, MonoBasicBlock **out_cbb)
+handle_unbox_gsharedvt (MonoCompile *cfg, MonoClass *klass, MonoInst *obj)
 {
        MonoInst *addr, *klass_inst, *is_ref, *args[16];
        MonoBasicBlock *is_ref_bb, *is_nullable_bb, *end_bb;
@@ -3987,8 +4072,6 @@ handle_unbox_gsharedvt (MonoCompile *cfg, MonoClass *klass, MonoInst *obj, MonoB
        /* LDOBJ */
        EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, addr_reg, 0);
 
-       *out_cbb = cfg->cbb;
-
        return ins;
 }
 
@@ -4091,12 +4174,10 @@ 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, MonoBasicBlock **out_cbb)
+handle_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_used)
 {
        MonoInst *alloc, *ins;
 
-       *out_cbb = cfg->cbb;
-
        if (mono_class_is_nullable (klass)) {
                MonoMethod* method = mono_class_get_method_from_name (klass, "Box", 1);
 
@@ -4193,8 +4274,6 @@ handle_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_used,
 
                MONO_START_BB (cfg, end_bb);
 
-               *out_cbb = cfg->cbb;
-
                return res;
        } else {
                alloc = handle_alloc (cfg, klass, TRUE, context_used);
@@ -4268,17 +4347,16 @@ icall_is_direct_callable (MonoCompile *cfg, MonoMethod *cmethod)
 #define is_complex_isinst(klass) ((klass->flags & TYPE_ATTRIBUTE_INTERFACE) || klass->rank || mono_class_is_nullable (klass) || mono_class_is_marshalbyref (klass) || (klass->flags & TYPE_ATTRIBUTE_SEALED) || klass->byval_arg.type == MONO_TYPE_VAR || klass->byval_arg.type == MONO_TYPE_MVAR)
 
 static MonoInst*
-emit_castclass_with_cache (MonoCompile *cfg, MonoClass *klass, MonoInst **args, MonoBasicBlock **out_bblock)
+emit_castclass_with_cache (MonoCompile *cfg, MonoClass *klass, MonoInst **args)
 {
        MonoMethod *mono_castclass;
        MonoInst *res;
 
        mono_castclass = mono_marshal_get_castclass_with_cache ();
 
-       save_cast_details (cfg, klass, args [0]->dreg, TRUE, out_bblock);
+       save_cast_details (cfg, klass, args [0]->dreg, TRUE);
        res = mono_emit_method_call (cfg, mono_castclass, args, NULL);
        reset_cast_details (cfg);
-       *out_bblock = cfg->cbb;
 
        return res;
 }
@@ -4292,7 +4370,7 @@ get_castclass_cache_idx (MonoCompile *cfg)
 }
 
 static MonoInst*
-emit_castclass_with_cache_nonshared (MonoCompile *cfg, MonoInst *obj, MonoClass *klass, MonoBasicBlock **out_bblock)
+emit_castclass_with_cache_nonshared (MonoCompile *cfg, MonoInst *obj, MonoClass *klass)
 {
        MonoInst *args [3];
        int idx;
@@ -4312,31 +4390,26 @@ emit_castclass_with_cache_nonshared (MonoCompile *cfg, MonoInst *obj, MonoClass
        }
 
        /*The wrapper doesn't inline well so the bloat of inlining doesn't pay off.*/
-
-       return emit_castclass_with_cache (cfg, klass, args, out_bblock);
+       return emit_castclass_with_cache (cfg, klass, args);
 }
 
 /*
  * Returns NULL and set the cfg exception on error.
  */
 static MonoInst*
-handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip, MonoBasicBlock **out_bb, int *inline_costs)
+handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip, int *inline_costs)
 {
        MonoBasicBlock *is_null_bb;
        int obj_reg = src->dreg;
        int vtable_reg = alloc_preg (cfg);
        int context_used;
        MonoInst *klass_inst = NULL, *res;
-       MonoBasicBlock *bblock;
-
-       *out_bb = cfg->cbb;
 
        context_used = mini_class_check_context_used (cfg, klass);
 
        if (!context_used && mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
-               res = emit_castclass_with_cache_nonshared (cfg, src, klass, &bblock);
+               res = emit_castclass_with_cache_nonshared (cfg, src, klass);
                (*inline_costs) += 2;
-               *out_bb = cfg->cbb;
                return res;
        } else if (!context_used && (mono_class_is_marshalbyref (klass) || klass->flags & TYPE_ATTRIBUTE_INTERFACE)) {
                MonoMethod *mono_castclass;
@@ -4346,9 +4419,9 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip,
                mono_castclass = mono_marshal_get_castclass (klass); 
                iargs [0] = src;
                                
-               save_cast_details (cfg, klass, src->dreg, TRUE, &bblock);
+               save_cast_details (cfg, klass, src->dreg, TRUE);
                costs = inline_method (cfg, mono_castclass, mono_method_signature (mono_castclass), 
-                                                          iargs, ip, cfg->real_offset, TRUE, &bblock);
+                                                          iargs, ip, cfg->real_offset, TRUE);
                reset_cast_details (cfg);
                CHECK_CFG_EXCEPTION;
                g_assert (costs > 0);
@@ -4357,7 +4430,6 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip,
 
                (*inline_costs) += costs;
 
-               *out_bb = cfg->cbb;
                return src;
        }
 
@@ -4378,7 +4450,7 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip,
                        /* cache */
                        args [2] = cache_ins;
 
-                       return emit_castclass_with_cache (cfg, klass, args, out_bb);
+                       return emit_castclass_with_cache (cfg, klass, args);
                }
 
                klass_inst = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
@@ -4389,7 +4461,7 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip,
        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, obj_reg, 0);
        MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, is_null_bb);
 
-       save_cast_details (cfg, klass, obj_reg, FALSE, NULL);
+       save_cast_details (cfg, klass, obj_reg, FALSE);
 
        if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
                MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
@@ -4424,8 +4496,6 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip,
 
        reset_cast_details (cfg);
 
-       *out_bb = cfg->cbb;
-
        return src;
 
 exception_exit:
@@ -4704,7 +4774,7 @@ handle_ccastclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, obj_reg, 0);
        MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, ok_result_bb);
 
-       save_cast_details (cfg, klass, obj_reg, FALSE, NULL);
+       save_cast_details (cfg, klass, obj_reg, FALSE);
 
        if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
 #ifndef DISABLE_REMOTING
@@ -4814,10 +4884,10 @@ handle_enum_has_flag (MonoCompile *cfg, MonoClass *klass, MonoInst *enum_this, M
                ceq->type = STACK_I4;
 
                if (!is_i4) {
-                       load = mono_decompose_opcode (cfg, load, NULL);
-                       and = mono_decompose_opcode (cfg, and, NULL);
-                       cmp = mono_decompose_opcode (cfg, cmp, NULL);
-                       ceq = mono_decompose_opcode (cfg, ceq, NULL);
+                       load = mono_decompose_opcode (cfg, load);
+                       and = mono_decompose_opcode (cfg, and);
+                       cmp = mono_decompose_opcode (cfg, cmp);
+                       ceq = mono_decompose_opcode (cfg, ceq);
                }
 
                return ceq;
@@ -4955,10 +5025,9 @@ handle_array_new (MonoCompile *cfg, int rank, MonoInst **sp, unsigned char *ip)
  */
 static MonoInst*
 handle_constrained_gsharedvt_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **sp, MonoClass *constrained_class,
-                                                                  gboolean *ref_emit_widen, MonoBasicBlock **ref_bblock)
+                                                                  gboolean *ref_emit_widen)
 {
        MonoInst *ins = NULL;
-       MonoBasicBlock *bblock = *ref_bblock;
        gboolean emit_widen = *ref_emit_widen;
 
        /*
@@ -5015,7 +5084,7 @@ handle_constrained_gsharedvt_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMe
                emit_widen = FALSE;
 
                if (mini_is_gsharedvt_type (cfg, fsig->ret)) {
-                       ins = handle_unbox_gsharedvt (cfg, mono_class_from_mono_type (fsig->ret), ins, &bblock);
+                       ins = handle_unbox_gsharedvt (cfg, mono_class_from_mono_type (fsig->ret), ins);
                } else if (MONO_TYPE_IS_PRIMITIVE (fsig->ret) || MONO_TYPE_ISSTRUCT (fsig->ret)) {
                        MonoInst *add;
 
@@ -5032,7 +5101,6 @@ handle_constrained_gsharedvt_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMe
        }
 
        *ref_emit_widen = emit_widen;
-       *ref_bblock = bblock;
 
        return ins;
 
@@ -5278,7 +5346,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_gsharedvt_info (cfg, &klass->byval_arg, MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE);
+               rgctx_ins = emit_get_gsharedvt_info_klass (cfg, klass, 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);
@@ -5546,10 +5614,12 @@ emit_array_unsafe_access (MonoCompile *cfg, MonoMethodSignature *fsig, MonoInst
 }
 
 static gboolean
-is_unsafe_mov_compatible (MonoClass *param_klass, MonoClass *return_klass)
+is_unsafe_mov_compatible (MonoCompile *cfg, MonoClass *param_klass, MonoClass *return_klass)
 {
        uint32_t align;
 
+       param_klass = mono_class_from_mono_type (mini_get_underlying_type (cfg, &param_klass->byval_arg));
+
        //Only allow for valuetypes
        if (!param_klass->valuetype || !return_klass->valuetype)
                return FALSE;
@@ -5580,11 +5650,11 @@ emit_array_unsafe_mov (MonoCompile *cfg, MonoMethodSignature *fsig, MonoInst **a
        MonoClass *return_klass = mono_class_from_mono_type (fsig->ret);
 
        //Valuetypes that are semantically equivalent
-       if (is_unsafe_mov_compatible (param_klass, return_klass))
+       if (is_unsafe_mov_compatible (cfg, param_klass, return_klass))
                return args [0];
 
        //Arrays of valuetypes that are semantically equivalent
-       if (param_klass->rank == 1 && return_klass->rank == 1 && is_unsafe_mov_compatible (param_klass->element_class, return_klass->element_class))
+       if (param_klass->rank == 1 && return_klass->rank == 1 && is_unsafe_mov_compatible (cfg, param_klass->element_class, return_klass->element_class))
                return args [0];
 
        return NULL;
@@ -5926,7 +5996,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                                }
 
                                if (opcode == OP_LOADI8_MEMBASE)
-                                       ins = mono_decompose_opcode (cfg, ins, NULL);
+                                       ins = mono_decompose_opcode (cfg, ins);
 
                                emit_memory_barrier (cfg, MONO_MEMORY_BARRIER_ACQ);
 
@@ -5961,7 +6031,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                                MONO_ADD_INS (cfg->cbb, ins);
 
                                if (opcode == OP_STOREI8_MEMBASE_REG)
-                                       ins = mono_decompose_opcode (cfg, ins, NULL);
+                                       ins = mono_decompose_opcode (cfg, ins);
 
                                return ins;
                        }
@@ -6795,7 +6865,7 @@ emit_init_local (MonoCompile *cfg, int local, MonoType *type, gboolean init)
  */
 static int
 inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **sp,
-                          guchar *ip, guint real_offset, gboolean inline_always, MonoBasicBlock **out_cbb)
+                          guchar *ip, guint real_offset, gboolean inline_always)
 {
        MonoInst *ins, *rvar = NULL;
        MonoMethodHeader *cheader;
@@ -6967,9 +7037,6 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
                        cfg->cbb = ebblock;
                }
 
-               if (out_cbb)
-                       *out_cbb = cfg->cbb;
-
                if (rvar) {
                        /*
                         * If the inlined method contains only a throw, then the ret var is not 
@@ -7244,8 +7311,7 @@ get_original_method (MonoMethod *method)
 }
 
 static void
-ensure_method_is_allowed_to_access_field (MonoCompile *cfg, MonoMethod *caller, MonoClassField *field,
-                                         MonoBasicBlock *bblock, unsigned char *ip)
+ensure_method_is_allowed_to_access_field (MonoCompile *cfg, MonoMethod *caller, MonoClassField *field)
 {
        /* we can't get the coreclr security level on wrappers since they don't have the attributes */
        MonoException *ex = mono_security_core_clr_is_field_access_allowed (get_original_method (caller), field);
@@ -7254,8 +7320,7 @@ ensure_method_is_allowed_to_access_field (MonoCompile *cfg, MonoMethod *caller,
 }
 
 static void
-ensure_method_is_allowed_to_call_method (MonoCompile *cfg, MonoMethod *caller, MonoMethod *callee,
-                                        MonoBasicBlock *bblock, unsigned char *ip)
+ensure_method_is_allowed_to_call_method (MonoCompile *cfg, MonoMethod *caller, MonoMethod *callee)
 {
        /* we can't get the coreclr security level on wrappers since they don't have the attributes */
        MonoException *ex = mono_security_core_clr_is_call_allowed (get_original_method (caller), callee);
@@ -7567,15 +7632,12 @@ emit_managed_static_data_access (MonoCompile *cfg, MonoInst *thread_ins, int off
  * handle_ctor_call:
  *
  *   Handle calls made to ctors from NEWOBJ opcodes.
- *
- *   REF_BBLOCK will point to the current bblock after the call.
  */
 static void
 handle_ctor_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, int context_used,
-                                 MonoInst **sp, guint8 *ip, MonoBasicBlock **ref_bblock, int *inline_costs)
+                                 MonoInst **sp, guint8 *ip, int *inline_costs)
 {
        MonoInst *vtable_arg = NULL, *callvirt_this_arg = NULL, *ins;
-       MonoBasicBlock *bblock = *ref_bblock;
 
        if (cmethod->klass->valuetype && mono_class_generic_sharing_enabled (cmethod->klass) &&
                                        mono_method_is_generic_sharable (cmethod, TRUE)) {
@@ -7610,11 +7672,10 @@ handle_ctor_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fs
                           !mono_class_is_subclass_of (cmethod->klass, mono_defaults.exception_class, FALSE)) {
                int costs;
 
-               if ((costs = inline_method (cfg, cmethod, fsig, sp, ip, cfg->real_offset, FALSE, &bblock))) {
+               if ((costs = inline_method (cfg, cmethod, fsig, sp, ip, cfg->real_offset, FALSE))) {
                        cfg->real_offset += 5;
 
                        *inline_costs += costs - 5;
-                       *ref_bblock = bblock;
                } else {
                        INLINE_FAILURE ("inline failure");
                        // FIXME-VT: Clean this up
@@ -7659,7 +7720,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 {
        MonoError error;
        MonoInst *ins, **sp, **stack_start;
-       MonoBasicBlock *bblock, *tblock = NULL, *init_localsbb = NULL;
+       MonoBasicBlock *tblock = NULL, *init_localsbb = NULL;
        MonoSimpleBasicBlock *bb = NULL, *original_bb = NULL;
        MonoMethod *cmethod, *method_definition;
        MonoInst **arg_array;
@@ -7958,18 +8019,18 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
        }
 
        /* FIRST CODE BLOCK */
-       NEW_BBLOCK (cfg, bblock);
-       bblock->cil_code = ip;
-       cfg->cbb = bblock;
+       NEW_BBLOCK (cfg, tblock);
+       tblock->cil_code = ip;
+       cfg->cbb = tblock;
        cfg->ip = ip;
 
-       ADD_BBLOCK (cfg, bblock);
+       ADD_BBLOCK (cfg, tblock);
 
        if (cfg->method == method) {
                breakpoint_id = mono_debugger_method_has_breakpoint (method);
                if (breakpoint_id) {
                        MONO_INST_NEW (cfg, ins, OP_BREAK);
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                }
        }
 
@@ -7978,9 +8039,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
        cfg->bb_init = init_localsbb;
        init_localsbb->real_offset = cfg->real_offset;
        start_bblock->next_bb = init_localsbb;
-       init_localsbb->next_bb = bblock;
+       init_localsbb->next_bb = cfg->cbb;
        link_bblock (cfg, start_bblock, init_localsbb);
-       link_bblock (cfg, init_localsbb, bblock);
+       link_bblock (cfg, init_localsbb, cfg->cbb);
                
        cfg->cbb = init_localsbb;
 
@@ -8056,7 +8117,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
        }
 
        if (cfg->method == method)
-               mono_debug_init_method (cfg, bblock, breakpoint_id);
+               mono_debug_init_method (cfg, cfg->cbb, breakpoint_id);
 
        for (n = 0; n < header->num_locals; ++n) {
                if (header->locals [n]->type == MONO_TYPE_VOID && !header->locals [n]->byref)
@@ -8101,7 +8162,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
        ins_flag = 0;
        start_new_bblock = 0;
-       cfg->cbb = bblock;
        while (ip < end) {
                if (cfg->method == method)
                        cfg->real_offset = ip - header->code;
@@ -8110,42 +8170,40 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                cfg->ip = ip;
 
                context_used = 0;
-               
+
                if (start_new_bblock) {
-                       bblock->cil_length = ip - bblock->cil_code;
+                       cfg->cbb->cil_length = ip - cfg->cbb->cil_code;
                        if (start_new_bblock == 2) {
                                g_assert (ip == tblock->cil_code);
                        } else {
                                GET_BBLOCK (cfg, tblock, ip);
                        }
-                       bblock->next_bb = tblock;
-                       bblock = tblock;
-                       cfg->cbb = bblock;
+                       cfg->cbb->next_bb = tblock;
+                       cfg->cbb = tblock;
                        start_new_bblock = 0;
-                       for (i = 0; i < bblock->in_scount; ++i) {
+                       for (i = 0; i < cfg->cbb->in_scount; ++i) {
                                if (cfg->verbose_level > 3)
-                                       printf ("loading %d from temp %d\n", i, (int)bblock->in_stack [i]->inst_c0);                                            
-                               EMIT_NEW_TEMPLOAD (cfg, ins, bblock->in_stack [i]->inst_c0);
+                                       printf ("loading %d from temp %d\n", i, (int)cfg->cbb->in_stack [i]->inst_c0);
+                               EMIT_NEW_TEMPLOAD (cfg, ins, cfg->cbb->in_stack [i]->inst_c0);
                                *sp++ = ins;
                        }
                        if (class_inits)
                                g_slist_free (class_inits);
                        class_inits = NULL;
                } else {
-                       if ((tblock = cfg->cil_offset_to_bb [ip - cfg->cil_start]) && (tblock != bblock)) {
-                               link_bblock (cfg, bblock, tblock);
+                       if ((tblock = cfg->cil_offset_to_bb [ip - cfg->cil_start]) && (tblock != cfg->cbb)) {
+                               link_bblock (cfg, cfg->cbb, tblock);
                                if (sp != stack_start) {
                                        handle_stack_args (cfg, stack_start, sp - stack_start);
                                        sp = stack_start;
                                        CHECK_UNVERIFIABLE (cfg);
                                }
-                               bblock->next_bb = tblock;
-                               bblock = tblock;
-                               cfg->cbb = bblock;
-                               for (i = 0; i < bblock->in_scount; ++i) {
+                               cfg->cbb->next_bb = tblock;
+                               cfg->cbb = tblock;
+                               for (i = 0; i < cfg->cbb->in_scount; ++i) {
                                        if (cfg->verbose_level > 3)
-                                               printf ("loading %d from temp %d\n", i, (int)bblock->in_stack [i]->inst_c0);                                            
-                                       EMIT_NEW_TEMPLOAD (cfg, ins, bblock->in_stack [i]->inst_c0);
+                                               printf ("loading %d from temp %d\n", i, (int)cfg->cbb->in_stack [i]->inst_c0);
+                                       EMIT_NEW_TEMPLOAD (cfg, ins, cfg->cbb->in_stack [i]->inst_c0);
                                        *sp++ = ins;
                                }
                                g_slist_free (class_inits);
@@ -8167,7 +8225,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                if (ip_offset + op_size == bb->end) {
                                        MONO_INST_NEW (cfg, ins, OP_NOP);
-                                       MONO_ADD_INS (bblock, ins);
+                                       MONO_ADD_INS (cfg->cbb, ins);
                                        start_new_bblock = 1;
                                }
 
@@ -8204,7 +8262,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                mono_bitset_set_fast (seq_point_set_locs, ip - header->code);
                }
 
-               bblock->real_offset = cfg->real_offset;
+               cfg->cbb->real_offset = cfg->real_offset;
 
                if ((cfg->method == method) && cfg->coverage_info) {
                        guint32 cil_offset = ip - header->code;
@@ -8223,7 +8281,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                }
 
                if (cfg->verbose_level > 3)
-                       printf ("converting (in B%d: stack: %d) %s", bblock->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
+                       printf ("converting (in B%d: stack: %d) %s", cfg->cbb->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
 
                switch (*ip) {
                case CEE_NOP:
@@ -8240,7 +8298,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        else
                                MONO_INST_NEW (cfg, ins, OP_NOP);
                        ip++;
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                        break;
                case CEE_BREAK:
                        if (should_insert_brekpoint (cfg->method)) {
@@ -8249,7 +8307,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                MONO_INST_NEW (cfg, ins, OP_NOP);
                        }
                        ip++;
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                        break;
                case CEE_LDARG_0:
                case CEE_LDARG_1:
@@ -8405,7 +8463,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        ins->dreg = alloc_dreg (cfg, STACK_I8);
                        ++ip;
                        ins->inst_l = (gint64)read64 (ip);
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                        ip += 8;
                        *sp++ = ins;
                        break;
@@ -8438,7 +8496,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                ins->type = cfg->r4_stack_type;
                                ins->dreg = alloc_dreg (cfg, STACK_R8);
                                ins->inst_p0 = f;
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
                        }
                        ++ip;
                        readr4 (ip, f);
@@ -8475,7 +8533,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                ins->type = STACK_R8;
                                ins->dreg = alloc_dreg (cfg, STACK_R8);
                                ins->inst_p0 = d;
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
                        }
                        ++ip;
                        readr8 (ip, d);
@@ -8555,7 +8613,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                mono_arch_emit_call (cfg, call);
                                cfg->param_area = MAX(cfg->param_area, call->stack_usage);
-                               MONO_ADD_INS (bblock, (MonoInst*)call);
+                               MONO_ADD_INS (cfg->cbb, (MonoInst*)call);
                        } else {
                                for (i = 0; i < num_args; ++i)
                                        /* Prevent arguments from being optimized away */
@@ -8564,7 +8622,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                MONO_INST_NEW_CALL (cfg, call, OP_JMP);
                                ins = (MonoInst*)call;
                                ins->inst_p0 = cmethod;
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
                        }
 
                        ip += 5;
@@ -8760,7 +8818,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        }
 
                        if (mono_security_core_clr_enabled ())
-                               ensure_method_is_allowed_to_call_method (cfg, method, cil_method, bblock, ip);
+                               ensure_method_is_allowed_to_call_method (cfg, method, cil_method);
 
                        if (!virtual && (cmethod->flags & METHOD_ATTRIBUTE_ABSTRACT))
                                /* MS.NET seems to silently convert this to a callvirt */
@@ -8838,7 +8896,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        } else if (cmethod->klass->image != mono_defaults.corlib && !(cmethod->klass->flags & TYPE_ATTRIBUTE_INTERFACE) && !cmethod->klass->valuetype) {
                                                /* 'The type parameter is instantiated as a reference type' case below. */
                                        } else {
-                                               ins = handle_constrained_gsharedvt_call (cfg, cmethod, fsig, sp, constrained_class, &emit_widen, &bblock);
+                                               ins = handle_constrained_gsharedvt_call (cfg, cmethod, fsig, sp, constrained_class, &emit_widen);
                                                CHECK_CFG_EXCEPTION;
                                                g_assert (ins);
                                                goto call_end;
@@ -8895,13 +8953,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                MONO_START_BB (cfg, is_ref_bb);
                                                EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &constrained_class->byval_arg, sp [0]->dreg, 0);
                                                ins->klass = constrained_class;
-                                               sp [0] = handle_box (cfg, ins, constrained_class, mono_class_check_context_used (constrained_class), &bblock);
+                                               sp [0] = handle_box (cfg, ins, constrained_class, mono_class_check_context_used (constrained_class));
                                                ins = (MonoInst*)mono_emit_calli (cfg, fsig, sp, addr, NULL, NULL);
 
                                                MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
 
                                                MONO_START_BB (cfg, end_bb);
-                                               bblock = end_bb;
+                                               cfg->cbb = end_bb;
 
                                                nonbox_call->dreg = ins->dreg;
                                        } else {
@@ -8918,7 +8976,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                         */
                                        EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &constrained_class->byval_arg, sp [0]->dreg, 0);
                                        ins->klass = constrained_class;
-                                       sp [0] = handle_box (cfg, ins, constrained_class, mono_class_check_context_used (constrained_class), &bblock);
+                                       sp [0] = handle_box (cfg, ins, constrained_class, mono_class_check_context_used (constrained_class));
                                        CHECK_CFG_EXCEPTION;
                                } else if (!constrained_class->valuetype) {
                                        int dreg = alloc_ireg_ref (cfg);
@@ -8952,7 +9010,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_class->byval_arg, sp [0]->dreg, 0);
                                                        ins->klass = constrained_class;
-                                                       sp [0] = handle_box (cfg, ins, constrained_class, mono_class_check_context_used (constrained_class), &bblock);
+                                                       sp [0] = handle_box (cfg, ins, constrained_class, mono_class_check_context_used (constrained_class));
                                                        CHECK_CFG_EXCEPTION;
                                                }
                                        }
@@ -8968,7 +9026,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                delegate_invoke = TRUE;
 
                        if ((cfg->opt & MONO_OPT_INTRINS) && (ins = mini_emit_inst_for_sharable_method (cfg, cmethod, fsig, sp))) {
-                               bblock = cfg->cbb;
                                if (!MONO_TYPE_IS_VOID (fsig->ret)) {
                                        type_to_eval_stack_type ((cfg), fsig->ret, ins);
                                        emit_widen = FALSE;
@@ -8982,7 +9039,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                         * might not get called after the call was patched.
                         */
                        if (cfg->generic_sharing_context && cmethod->klass != method->klass && cmethod->klass->generic_class && mono_method_is_generic_sharable (cmethod, TRUE) && mono_class_needs_cctor_run (cmethod->klass, method)) {
-                               emit_generic_class_init (cfg, cmethod->klass, &bblock);
+                               emit_generic_class_init (cfg, cmethod->klass);
                                CHECK_TYPELOAD (cmethod->klass);
                        }
 
@@ -9096,7 +9153,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                } 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]);
-                                       MONO_ADD_INS (bblock, store);
+                                       MONO_ADD_INS (cfg->cbb, store);
 
                                        /* FIXME: This should be a managed pointer */
                                        this_arg_temp = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
@@ -9145,7 +9202,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                        /* Conversion to a JIT intrinsic */
                        if ((cfg->opt & MONO_OPT_INTRINS) && (ins = mini_emit_inst_for_method (cfg, cmethod, fsig, sp))) {
-                               bblock = cfg->cbb;
                                if (!MONO_TYPE_IS_VOID (fsig->ret)) {
                                        type_to_eval_stack_type ((cfg), fsig->ret, ins);
                                        emit_widen = FALSE;
@@ -9168,7 +9224,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        always = TRUE;
                                }
 
-                               costs = inline_method (cfg, cmethod, fsig, sp, ip, cfg->real_offset, always, &bblock);
+                               costs = inline_method (cfg, cmethod, fsig, sp, ip, cfg->real_offset, always);
                                if (costs) {
                                        cfg->real_offset += 5;
 
@@ -9202,14 +9258,14 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        for (i = 0; i < n; ++i)
                                                EMIT_NEW_ARGSTORE (cfg, ins, i, sp [i]);
                                        MONO_INST_NEW (cfg, ins, OP_BR);
-                                       MONO_ADD_INS (bblock, ins);
+                                       MONO_ADD_INS (cfg->cbb, ins);
                                        tblock = start_bblock->out_bb [0];
-                                       link_bblock (cfg, bblock, tblock);
+                                       link_bblock (cfg, cfg->cbb, tblock);
                                        ins->inst_target_bb = tblock;
                                        start_new_bblock = 1;
 
                                        /* skip the CEE_RET, too */
-                                       if (ip_in_bb (cfg, bblock, ip + 5))
+                                       if (ip_in_bb (cfg, cfg->cbb, ip + 5))
                                                skip_ret = TRUE;
                                        push_res = FALSE;
                                        goto call_end;
@@ -9302,7 +9358,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                /* Inline the wrapper */
                                wrapper = mono_marshal_get_native_wrapper (cmethod, TRUE, cfg->compile_aot);
 
-                               costs = inline_method (cfg, wrapper, fsig, sp, ip, cfg->real_offset, TRUE, &bblock);
+                               costs = inline_method (cfg, wrapper, fsig, sp, ip, cfg->real_offset, TRUE);
                                g_assert (costs > 0);
                                cfg->real_offset += 5;
 
@@ -9403,8 +9459,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        ins = (MonoInst*)call;
                                        ins->inst_p0 = cmethod;
                                        ins->inst_p1 = arg_array [0];
-                                       MONO_ADD_INS (bblock, ins);
-                                       link_bblock (cfg, bblock, end_bblock);                  
+                                       MONO_ADD_INS (cfg->cbb, ins);
+                                       link_bblock (cfg, cfg->cbb, end_bblock);
                                        start_new_bblock = 1;
 
                                        // FIXME: Eliminate unreachable epilogs
@@ -9414,7 +9470,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                         * only reachable from this call.
                                         */
                                        GET_BBLOCK (cfg, tblock, ip + 5);
-                                       if (tblock == bblock || tblock->in_count == 0)
+                                       if (tblock == cfg->cbb || tblock->in_count == 0)
                                                skip_ret = TRUE;
                                        push_res = FALSE;
 
@@ -9442,7 +9498,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                                                          imt_arg, vtable_arg);
 
                        if (tail_call) {
-                               link_bblock (cfg, bblock, end_bblock);                  
+                               link_bblock (cfg, cfg->cbb, end_bblock);
                                start_new_bblock = 1;
 
                                // FIXME: Eliminate unreachable epilogs
@@ -9452,7 +9508,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                 * only reachable from this call.
                                 */
                                GET_BBLOCK (cfg, tblock, ip + 5);
-                               if (tblock == bblock || tblock->in_count == 0)
+                               if (tblock == cfg->cbb || tblock->in_count == 0)
                                        skip_ret = TRUE;
                                push_res = FALSE;
                        }
@@ -9576,8 +9632,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        MONO_INST_NEW (cfg, ins, OP_BR);
                        ip++;
                        ins->inst_target_bb = end_bblock;
-                       MONO_ADD_INS (bblock, ins);
-                       link_bblock (cfg, bblock, end_bblock);
+                       MONO_ADD_INS (cfg->cbb, ins);
+                       link_bblock (cfg, cfg->cbb, end_bblock);
                        start_new_bblock = 1;
                        break;
                case CEE_BR_S:
@@ -9587,14 +9643,14 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        target = ip + 1 + (signed char)(*ip);
                        ++ip;
                        GET_BBLOCK (cfg, tblock, target);
-                       link_bblock (cfg, bblock, tblock);
+                       link_bblock (cfg, cfg->cbb, tblock);
                        ins->inst_target_bb = tblock;
                        if (sp != stack_start) {
                                handle_stack_args (cfg, stack_start, sp - stack_start);
                                sp = stack_start;
                                CHECK_UNVERIFIABLE (cfg);
                        }
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                        start_new_bblock = 1;
                        inline_costs += BRANCH_COST;
                        break;
@@ -9628,7 +9684,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        target = ip + 4 + (gint32)read32(ip);
                        ip += 4;
                        GET_BBLOCK (cfg, tblock, target);
-                       link_bblock (cfg, bblock, tblock);
+                       link_bblock (cfg, cfg->cbb, tblock);
                        ins->inst_target_bb = tblock;
                        if (sp != stack_start) {
                                handle_stack_args (cfg, stack_start, sp - stack_start);
@@ -9636,7 +9692,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                CHECK_UNVERIFIABLE (cfg);
                        }
 
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
 
                        start_new_bblock = 1;
                        inline_costs += BRANCH_COST;
@@ -9661,9 +9717,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        sp--;
 
                        GET_BBLOCK (cfg, tblock, target);
-                       link_bblock (cfg, bblock, tblock);
+                       link_bblock (cfg, cfg->cbb, tblock);
                        GET_BBLOCK (cfg, tblock, ip);
-                       link_bblock (cfg, bblock, tblock);
+                       link_bblock (cfg, cfg->cbb, tblock);
 
                        if (sp != stack_start) {
                                handle_stack_args (cfg, stack_start, sp - stack_start);
@@ -9682,16 +9738,16 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                ins->type = STACK_I8;
                                ins->dreg = alloc_dreg (cfg, STACK_I8);
                                ins->inst_l = 0;
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
                                cmp->opcode = OP_LCOMPARE;
                                cmp->sreg2 = ins->dreg;
                        }
 #endif
-                       MONO_ADD_INS (bblock, cmp);
+                       MONO_ADD_INS (cfg->cbb, cmp);
 
                        MONO_INST_NEW (cfg, ins, is_true ? CEE_BNE_UN : CEE_BEQ);
                        type_from_op (cfg, ins, sp [0], NULL);
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                        ins->inst_many_bb = mono_mempool_alloc (cfg->mempool, sizeof(gpointer)*2);
                        GET_BBLOCK (cfg, tblock, target);
                        ins->inst_true_bb = tblock;
@@ -9764,9 +9820,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                 * Link the current bb with the targets as well, so handle_stack_args
                                 * will set their in_stack correctly.
                                 */
-                               link_bblock (cfg, bblock, default_bblock);
+                               link_bblock (cfg, cfg->cbb, default_bblock);
                                for (i = 0; i < n; ++i)
-                                       link_bblock (cfg, bblock, targets [i]);
+                                       link_bblock (cfg, cfg->cbb, targets [i]);
 
                                handle_stack_args (cfg, stack_start, sp - stack_start);
                                sp = stack_start;
@@ -9775,10 +9831,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ICOMPARE_IMM, -1, src1->dreg, n);
                        MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBGE_UN, default_bblock);
-                       bblock = cfg->cbb;
 
                        for (i = 0; i < n; ++i)
-                               link_bblock (cfg, bblock, targets [i]);
+                               link_bblock (cfg, cfg->cbb, targets [i]);
 
                        table = mono_mempool_alloc (cfg->mempool, sizeof (MonoJumpInfoBBTable));
                        table->table = targets;
@@ -9868,7 +9923,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        if (*ip == CEE_LDIND_R4)
                                ins->type = cfg->r4_stack_type;
                        ins->flags |= ins_flag;
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                        *sp++ = ins;
                        if (ins_flag & MONO_INST_VOLATILE) {
                                /* Volatile loads have acquire semantics, see 12.6.7 in Ecma 335 */
@@ -9897,7 +9952,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        ins->flags |= ins_flag;
                        ins_flag = 0;
 
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
 
                        if (cfg->gen_write_barriers && *ip == CEE_STIND_REF && method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER && !((sp [1]->opcode == OP_PCONST) && (sp [1]->inst_p0 == 0)))
                                emit_write_barrier (cfg, sp [0], sp [1]);
@@ -9931,7 +9986,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                        MONO_ADD_INS ((cfg)->cbb, (ins));
 
-                       *sp++ = mono_decompose_opcode (cfg, ins, &bblock);
+                       *sp++ = mono_decompose_opcode (cfg, ins);
                        ip++;
                        break;
                case CEE_ADD:
@@ -9991,7 +10046,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        }
                        MONO_ADD_INS ((cfg)->cbb, (ins));
 
-                       *sp++ = mono_decompose_opcode (cfg, ins, &bblock);
+                       *sp++ = mono_decompose_opcode (cfg, ins);
                        ip++;
                        break;
                case CEE_NEG:
@@ -10146,7 +10201,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                break;
                        }
 
-                       if ((loc_index != -1) && ip_in_bb (cfg, bblock, ip + 5)) {
+                       if ((loc_index != -1) && ip_in_bb (cfg, cfg->cbb, ip + 5)) {
                                CHECK_LOCAL (loc_index);
 
                                EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, sp [0]->dreg, 0);
@@ -10165,7 +10220,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        /* Optimize the ldobj+stobj combination */
                        /* The reference case ends up being a load+store anyway */
                        /* Skip this if the operation is volatile. */
-                       if (((ip [5] == CEE_STOBJ) && ip_in_bb (cfg, bblock, ip + 5) && read32 (ip + 6) == token) && !generic_class_is_reference_type (cfg, klass) && !(ins_flag & MONO_INST_VOLATILE)) {
+                       if (((ip [5] == CEE_STOBJ) && ip_in_bb (cfg, cfg->cbb, ip + 5) && read32 (ip + 6) == token) && !generic_class_is_reference_type (cfg, klass) && !(ins_flag & MONO_INST_VOLATILE)) {
                                CHECK_STACK (1);
 
                                sp --;
@@ -10223,7 +10278,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        *sp = mono_emit_jit_icall (cfg, mono_ldstr, iargs);
                                        mono_ldstr (cfg->domain, image, mono_metadata_token_index (n));
                                } else {
-                                       if (bblock->out_of_line) {
+                                       if (cfg->cbb->out_of_line) {
                                                MonoInst *iargs [2];
 
                                                if (image == mono_defaults.corlib) {
@@ -10244,7 +10299,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        if (cfg->compile_aot) {
                                                NEW_LDSTRCONST (cfg, ins, image, n);
                                                *sp = ins;
-                                               MONO_ADD_INS (bblock, ins);
+                                               MONO_ADD_INS (cfg->cbb, ins);
                                        } 
                                        else {
                                                NEW_PCONST (cfg, ins, NULL);
@@ -10254,7 +10309,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                        OUT_OF_MEMORY_FAILURE;
 
                                                *sp = ins;
-                                               MONO_ADD_INS (bblock, ins);
+                                               MONO_ADD_INS (cfg->cbb, ins);
                                        }
                                }
                        }
@@ -10285,10 +10340,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        context_used = mini_method_check_context_used (cfg, cmethod);
 
                        if (mono_security_core_clr_enabled ())
-                               ensure_method_is_allowed_to_call_method (cfg, method, cmethod, bblock, ip);
+                               ensure_method_is_allowed_to_call_method (cfg, method, cmethod);
 
                        if (cfg->generic_sharing_context && cmethod && cmethod->klass != method->klass && cmethod->klass->generic_class && mono_method_is_generic_sharable (cmethod, TRUE) && mono_class_needs_cctor_run (cmethod->klass, method)) {
-                               emit_generic_class_init (cfg, cmethod->klass, &bblock);
+                               emit_generic_class_init (cfg, cmethod->klass);
                                CHECK_TYPELOAD (cmethod->klass);
                        }
 
@@ -10306,7 +10361,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                         * Generate smaller code for the common newobj <exception> instruction in
                         * argument checking code.
                         */
-                       if (bblock->out_of_line && cmethod->klass->image == mono_defaults.corlib &&
+                       if (cfg->cbb->out_of_line && cmethod->klass->image == mono_defaults.corlib &&
                                is_exception_class (cmethod->klass) && n <= 2 &&
                                ((n < 1) || (!fsig->params [0]->byref && fsig->params [0]->type == MONO_TYPE_STRING)) && 
                                ((n < 2) || (!fsig->params [1]->byref && fsig->params [1]->type == MONO_TYPE_STRING))) {
@@ -10402,7 +10457,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                         * As a workaround, we call class cctors before allocating objects.
                                         */
                                        if (mini_field_access_needs_cctor_run (cfg, method, cmethod->klass, vtable) && !(g_slist_find (class_inits, cmethod->klass))) {
-                                               emit_class_init (cfg, cmethod->klass, &bblock);
+                                               emit_class_init (cfg, cmethod->klass);
                                                if (cfg->verbose_level > 2)
                                                        printf ("class %s.%s needs init call for ctor\n", cmethod->klass->name_space, cmethod->klass->name);
                                                class_inits = g_slist_prepend (class_inits, cmethod->klass);
@@ -10417,7 +10472,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        MONO_EMIT_NEW_UNALU (cfg, OP_NOT_NULL, -1, alloc->dreg);
 
                                /* Now call the actual ctor */
-                               handle_ctor_call (cfg, cmethod, fsig, context_used, sp, ip, &bblock, &inline_costs);
+                               handle_ctor_call (cfg, cmethod, fsig, context_used, sp, ip, &inline_costs);
                                CHECK_CFG_EXCEPTION;
                        }
 
@@ -10446,7 +10501,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        if (sp [0]->type != STACK_OBJ)
                                UNVERIFIED;
 
-                       ins = handle_castclass (cfg, klass, *sp, ip, &bblock, &inline_costs);
+                       ins = handle_castclass (cfg, klass, *sp, ip, &inline_costs);
                        CHECK_CFG_EXCEPTION;
 
                        *sp ++ = ins;
@@ -10495,7 +10550,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                iargs [0] = sp [0];
 
                                costs = inline_method (cfg, mono_isinst, mono_method_signature (mono_isinst), 
-                                                                          iargs, ip, cfg->real_offset, TRUE, &bblock);
+                                                                          iargs, ip, cfg->real_offset, TRUE);
                                CHECK_CFG_EXCEPTION;
                                g_assert (costs > 0);
                                
@@ -10509,7 +10564,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        else {
                                ins = handle_isinst (cfg, klass, *sp, context_used);
                                CHECK_CFG_EXCEPTION;
-                               bblock = cfg->cbb;
                                *sp ++ = ins;
                                ip += 5;
                        }
@@ -10530,10 +10584,10 @@ 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)) {
-                               res = handle_unbox_gsharedvt (cfg, klass, *sp, &bblock);
+                               res = handle_unbox_gsharedvt (cfg, klass, *sp);
                                inline_costs += 2;
                        } else if (generic_class_is_reference_type (cfg, klass)) {
-                               res = handle_castclass (cfg, klass, *sp, ip, &bblock, &inline_costs);
+                               res = handle_castclass (cfg, klass, *sp, ip, &inline_costs);
                                CHECK_CFG_EXCEPTION;
                        } else if (mono_class_is_nullable (klass)) {
                                res = handle_unbox_nullable (cfg, *sp, klass, context_used);
@@ -10597,7 +10651,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                            ip [5] == CEE_PREFIX1 &&
                            ip [6] == CEE_CONSTRAINED_ &&
                            ip [11] == CEE_CALLVIRT &&
-                           ip_in_bb (cfg, bblock, ip + 5 + 6 + 5) &&
+                           ip_in_bb (cfg, cfg->cbb, ip + 5 + 6 + 5) &&
                            mono_class_is_enum (klass) &&
                            (enum_class = mini_get_class (method, read32 (ip + 7), generic_context)) &&
                            (has_flag = mini_get_method (cfg, method, read32 (ip + 12), NULL, generic_context)) &&
@@ -10623,7 +10677,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                        // FIXME: LLVM can't handle the inconsistent bb linking
                        if (!mono_class_is_nullable (klass) &&
-                               ip + 5 < end && ip_in_bb (cfg, bblock, ip + 5) &&
+                               ip + 5 < end && ip_in_bb (cfg, cfg->cbb, ip + 5) &&
                                (ip [5] == CEE_BRTRUE || 
                                 ip [5] == CEE_BRTRUE_S ||
                                 ip [5] == CEE_BRFALSE ||
@@ -10635,7 +10689,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                ip += 5;
 
                                if (cfg->verbose_level > 3) {
-                                       printf ("converting (in B%d: stack: %d) %s", bblock->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
+                                       printf ("converting (in B%d: stack: %d) %s", cfg->cbb->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
                                        printf ("<box+brtrue opt>\n");
                                }
 
@@ -10693,7 +10747,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                break;
                        }
 
-                       *sp++ = handle_box (cfg, val, klass, context_used, &bblock);
+                       *sp++ = handle_box (cfg, val, klass, context_used);
 
                        CHECK_CFG_EXCEPTION;
                        ip += 5;
@@ -10785,12 +10839,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                        /* if the class is Critical then transparent code cannot access it's fields */
                        if (!is_instance && mono_security_core_clr_enabled ())
-                               ensure_method_is_allowed_to_access_field (cfg, method, field, bblock, ip);
+                               ensure_method_is_allowed_to_access_field (cfg, method, field);
 
                        /* XXX this is technically required but, so far (SL2), no [SecurityCritical] types (not many exists) have
                           any visible *instance* field  (in fact there's a single case for a static field in Marshal) XXX
                        if (mono_security_core_clr_enabled ())
-                               ensure_method_is_allowed_to_access_field (cfg, method, field, bblock, ip);
+                               ensure_method_is_allowed_to_access_field (cfg, method, field);
                        */
 
                        /*
@@ -10838,7 +10892,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                        if (cfg->opt & MONO_OPT_INLINE || cfg->compile_aot) {
                                                costs = inline_method (cfg, stfld_wrapper, mono_method_signature (stfld_wrapper), 
-                                                                                          iargs, ip, cfg->real_offset, TRUE, &bblock);
+                                                                                          iargs, ip, cfg->real_offset, TRUE);
                                                CHECK_CFG_EXCEPTION;
                                                g_assert (costs > 0);
                                                      
@@ -10901,7 +10955,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                EMIT_NEW_ICONST (cfg, iargs [3], klass->valuetype ? field->offset - sizeof (MonoObject) : field->offset);
                                if (cfg->opt & MONO_OPT_INLINE || cfg->compile_aot) {
                                        costs = inline_method (cfg, wrapper, mono_method_signature (wrapper), 
-                                                                                  iargs, ip, cfg->real_offset, TRUE, &bblock);
+                                                                                  iargs, ip, cfg->real_offset, TRUE);
                                        CHECK_CFG_EXCEPTION;
                                        g_assert (costs > 0);
                                                      
@@ -11073,7 +11127,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                */
 
                                if (mono_class_needs_cctor_run (klass, method))
-                                       emit_generic_class_init (cfg, klass, &bblock);
+                                       emit_generic_class_init (cfg, klass);
 
                                /*
                                 * The pointer we're computing here is
@@ -11112,7 +11166,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                if (!addr) {
                                        if (mini_field_access_needs_cctor_run (cfg, method, klass, vtable)) {
                                                if (!(g_slist_find (class_inits, klass))) {
-                                                       emit_class_init (cfg, klass, &bblock);
+                                                       emit_class_init (cfg, klass);
                                                        if (cfg->verbose_level > 2)
                                                                printf ("class %s.%s needs init call for %s\n", klass->name_space, klass->name, mono_field_get_name (field));
                                                        class_inits = g_slist_prepend (class_inits, klass);
@@ -11320,7 +11374,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                ins->type = STACK_I4;
                                ins->dreg = alloc_ireg (cfg);
                                MONO_ADD_INS (cfg->cbb, ins);
-                               *sp = mono_decompose_opcode (cfg, ins, &bblock);
+                               *sp = mono_decompose_opcode (cfg, ins);
                        }
 
                        if (context_used) {
@@ -11382,7 +11436,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                         * for small sizes open code the memcpy
                         * ensure the rva field is big enough
                         */
-                       if ((cfg->opt & MONO_OPT_INTRINS) && ip + 6 < end && ip_in_bb (cfg, bblock, ip + 6) && (len_ins->opcode == OP_ICONST) && (data_ptr = initialize_array_data (method, cfg->compile_aot, ip, klass, len_ins->inst_c0, &data_size, &field_token))) {
+                       if ((cfg->opt & MONO_OPT_INTRINS) && ip + 6 < end && ip_in_bb (cfg, cfg->cbb, ip + 6) && (len_ins->opcode == OP_ICONST) && (data_ptr = initialize_array_data (method, cfg->compile_aot, ip, klass, len_ins->inst_c0, &data_size, &field_token))) {
                                MonoMethod *memcpy_method = get_memcpy_method ();
                                MonoInst *iargs [3];
                                int add_reg = alloc_ireg_mp (cfg);
@@ -11543,9 +11597,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        ins->sreg1 = sp [0]->dreg;
                        ins->dreg = alloc_freg (cfg);
                        ins->type = STACK_R8;
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
 
-                       *sp++ = mono_decompose_opcode (cfg, ins, &bblock);
+                       *sp++ = mono_decompose_opcode (cfg, ins);
 
                        ++ip;
                        break;
@@ -11588,6 +11642,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        }
                        EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, src->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, value));
                        ins->type = STACK_MP;
+                       ins->klass = klass;
                        *sp++ = ins;
                        ip += 5;
                        break;
@@ -11704,7 +11759,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                EMIT_NEW_TEMPLOAD (cfg, ins, vtvar->inst_c0);
                        } else {
-                               if ((ip + 5 < end) && ip_in_bb (cfg, bblock, ip + 5) && 
+                               if ((ip + 5 < end) && ip_in_bb (cfg, cfg->cbb, ip + 5) && 
                                        ((ip [5] == CEE_CALL) || (ip [5] == CEE_CALLVIRT)) && 
                                        (cmethod = mini_get_method (cfg, method, read32 (ip + 6), NULL, generic_context)) &&
                                        (cmethod->klass == mono_defaults.systemtype_class) &&
@@ -11776,13 +11831,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        --sp;
                        ins->sreg1 = sp [0]->dreg;
                        ip++;
-                       bblock->out_of_line = TRUE;
-                       MONO_ADD_INS (bblock, ins);
+                       cfg->cbb->out_of_line = TRUE;
+                       MONO_ADD_INS (cfg->cbb, ins);
                        MONO_INST_NEW (cfg, ins, OP_NOT_REACHED);
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                        sp = stack_start;
                        
-                       link_bblock (cfg, bblock, end_bblock);
+                       link_bblock (cfg, cfg->cbb, end_bblock);
                        start_new_bblock = 1;
                        break;
                case CEE_ENDFINALLY:
@@ -11790,7 +11845,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        if (sp != stack_start)
                                emit_seq_point (cfg, method, ip, FALSE, FALSE);
                        MONO_INST_NEW (cfg, ins, OP_ENDFINALLY);
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                        ip++;
                        start_new_bblock = 1;
 
@@ -11859,7 +11914,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        MONO_EMIT_NEW_UNALU (cfg, OP_THROW, -1, exc_ins->dreg);
 
                                        MONO_START_BB (cfg, dont_throw);
-                                       bblock = cfg->cbb;
                                }
                        }
 
@@ -11871,12 +11925,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        clause = tmp->data;
                                        tblock = cfg->cil_offset_to_bb [clause->handler_offset];
                                        g_assert (tblock);
-                                       link_bblock (cfg, bblock, tblock);
+                                       link_bblock (cfg, cfg->cbb, tblock);
                                        MONO_INST_NEW (cfg, ins, OP_CALL_HANDLER);
                                        ins->inst_target_bb = tblock;
                                        ins->inst_eh_block = clause;
-                                       MONO_ADD_INS (bblock, ins);
-                                       bblock->has_call_handler = 1;
+                                       MONO_ADD_INS (cfg->cbb, ins);
+                                       cfg->cbb->has_call_handler = 1;
                                        if (COMPILE_LLVM (cfg)) {
                                                MonoBasicBlock *target_bb;
 
@@ -11893,9 +11947,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        } 
 
                        MONO_INST_NEW (cfg, ins, OP_BR);
-                       MONO_ADD_INS (bblock, ins);
+                       MONO_ADD_INS (cfg->cbb, ins);
                        GET_BBLOCK (cfg, tblock, target);
-                       link_bblock (cfg, bblock, tblock);
+                       link_bblock (cfg, cfg->cbb, tblock);
                        ins->inst_target_bb = tblock;
                        start_new_bblock = 1;
 
@@ -12135,8 +12189,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                
                                MONO_INST_NEW (cfg, ins, OP_BR);
                                ins->inst_target_bb = end_bblock;
-                               MONO_ADD_INS (bblock, ins);
-                               link_bblock (cfg, bblock, end_bblock);
+                               MONO_ADD_INS (cfg->cbb, ins);
+                               link_bblock (cfg, cfg->cbb, end_bblock);
                                start_new_bblock = 1;
                                ip += 6;
                                break;
@@ -12153,7 +12207,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        ins = handle_cisinst (cfg, klass, sp [0]);
                                else
                                        ins = handle_ccastclass (cfg, klass, sp [0]);
-                               bblock = cfg->cbb;
                                *sp++ = ins;
                                ip += 6;
                                break;
@@ -12162,7 +12215,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        case CEE_MONO_RESTORE_LMF:
 #ifdef MONO_ARCH_HAVE_LMF_OPS
                                MONO_INST_NEW (cfg, ins, (ip [1] == CEE_MONO_SAVE_LMF) ? OP_SAVE_LMF : OP_RESTORE_LMF);
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
                                cfg->need_lmf_area = TRUE;
 #endif
                                ip += 2;
@@ -12177,7 +12230,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                inline_costs += 10 * num_calls++;
                                break;
                        case CEE_MONO_NOT_TAKEN:
-                               bblock->out_of_line = TRUE;
+                               cfg->cbb->out_of_line = TRUE;
                                ip += 2;
                                break;
                        case CEE_MONO_TLS: {
@@ -12200,7 +12253,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        }
                                }
                                ins->type = STACK_PTR;
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
                                *sp++ = ins;
                                ip += 6;
                                break;
@@ -12225,7 +12278,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                sp -= 2;
                                ins->sreg1 = sp [0]->dreg;
                                ins->sreg2 = sp [1]->dreg;
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
 
                                cfg->param_area = MAX (cfg->param_area, MONO_ARCH_DYN_CALL_PARAM_AREA);
 
@@ -12284,10 +12337,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                ins = mono_emit_jit_icall (cfg, mono_jit_thread_attach, args);
                                MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, cfg->orig_domain_var->dreg, ins->dreg);
 
-                               if (next_bb) {
+                               if (next_bb)
                                        MONO_START_BB (cfg, next_bb);
-                                       bblock = cfg->cbb;
-                               }
                                ip += 2;
                                break;
                        }
@@ -12363,7 +12414,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        cmp->opcode = OP_FCOMPARE;
                                else
                                        cmp->opcode = OP_ICOMPARE;
-                               MONO_ADD_INS (bblock, cmp);
+                               MONO_ADD_INS (cfg->cbb, cmp);
                                ins->type = STACK_I4;
                                ins->dreg = alloc_dreg (cfg, ins->type);
                                type_from_op (cfg, ins, arg1, arg2);
@@ -12377,7 +12428,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        ins->sreg2 = cmp->sreg2;
                                        NULLIFY_INS (cmp);
                                }
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
                                *sp++ = ins;
                                ip += 2;
                                break;
@@ -12403,12 +12454,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        METHOD_ACCESS_FAILURE (method, cil_method);
 
                                if (mono_security_core_clr_enabled ())
-                                       ensure_method_is_allowed_to_call_method (cfg, method, cmethod, bblock, ip);
+                                       ensure_method_is_allowed_to_call_method (cfg, method, cmethod);
 
                                /* 
                                 * Optimize the common case of ldftn+delegate creation
                                 */
-                               if ((sp > stack_start) && (ip + 6 + 5 < end) && ip_in_bb (cfg, bblock, ip + 6) && (ip [6] == CEE_NEWOBJ)) {
+                               if ((sp > stack_start) && (ip + 6 + 5 < end) && ip_in_bb (cfg, cfg->cbb, ip + 6) && (ip [6] == CEE_NEWOBJ)) {
                                        MonoMethod *ctor_method = mini_get_method (cfg, method, read32 (ip + 7), NULL, generic_context);
                                        if (ctor_method && (ctor_method->klass->parent == mono_defaults.multicastdelegate_class)) {
                                                MonoInst *target_ins, *handle_ins;
@@ -12424,7 +12475,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                target_ins = sp [-1];
 
                                                if (mono_security_core_clr_enabled ())
-                                                       ensure_method_is_allowed_to_call_method (cfg, method, ctor_method, bblock, ip);
+                                                       ensure_method_is_allowed_to_call_method (cfg, method, ctor_method);
 
                                                if (!(cmethod->flags & METHOD_ATTRIBUTE_STATIC)) {
                                                        /*LAME IMPL: We must not add a null check for virtual invoke delegates.*/
@@ -12438,7 +12489,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                if (invoke_context_used == 0) {
                                                        ip += 6;
                                                        if (cfg->verbose_level > 3)
-                                                               g_print ("converting (in B%d: stack: %d) %s", bblock->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
+                                                               g_print ("converting (in B%d: stack: %d) %s", cfg->cbb->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
                                                        if ((handle_ins = handle_delegate_ctor (cfg, ctor_method->klass, target_ins, cmethod, context_used, FALSE))) {
                                                                sp --;
                                                                *sp = handle_ins;
@@ -12474,12 +12525,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                context_used = mini_method_check_context_used (cfg, cmethod);
 
                                if (mono_security_core_clr_enabled ())
-                                       ensure_method_is_allowed_to_call_method (cfg, method, cmethod, bblock, ip);
+                                       ensure_method_is_allowed_to_call_method (cfg, method, cmethod);
 
                                /*
                                 * Optimize the common case of ldvirtftn+delegate creation
                                 */
-                               if ((sp > stack_start) && (ip + 6 + 5 < end) && ip_in_bb (cfg, bblock, ip + 6) && (ip [6] == CEE_NEWOBJ) && (ip > header->code && ip [-1] == CEE_DUP)) {
+                               if ((sp > stack_start) && (ip + 6 + 5 < end) && ip_in_bb (cfg, cfg->cbb, ip + 6) && (ip [6] == CEE_NEWOBJ) && (ip > header->code && ip [-1] == CEE_DUP)) {
                                        MonoMethod *ctor_method = mini_get_method (cfg, method, read32 (ip + 7), NULL, generic_context);
                                        if (ctor_method && (ctor_method->klass->parent == mono_defaults.multicastdelegate_class)) {
                                                MonoInst *target_ins, *handle_ins;
@@ -12496,13 +12547,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                                target_ins = sp [-1];
 
                                                if (mono_security_core_clr_enabled ())
-                                                       ensure_method_is_allowed_to_call_method (cfg, method, ctor_method, bblock, ip);
+                                                       ensure_method_is_allowed_to_call_method (cfg, method, ctor_method);
 
                                                /* FIXME: SGEN support */
                                                if (invoke_context_used == 0) {
                                                        ip += 6;
                                                        if (cfg->verbose_level > 3)
-                                                               g_print ("converting (in B%d: stack: %d) %s", bblock->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
+                                                               g_print ("converting (in B%d: stack: %d) %s", cfg->cbb->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
                                                        if ((handle_ins = handle_delegate_ctor (cfg, ctor_method->klass, target_ins, cmethod, context_used, is_virtual))) {
                                                                sp -= 2;
                                                                *sp = handle_ins;
@@ -12636,7 +12687,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        UNVERIFIED;
                                MONO_INST_NEW (cfg, ins, OP_ENDFILTER);
                                ins->sreg1 = (*sp)->dreg;
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
                                start_new_bblock = 1;
                                ip += 2;
 
@@ -12766,7 +12817,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        }
                                }
 
-                               bblock->flags |= BB_EXCEPTION_UNSAFE;
+                               cfg->cbb->flags |= BB_EXCEPTION_UNSAFE;
 
                                if (handler_offset == -1)
                                        UNVERIFIED;
@@ -12774,13 +12825,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                EMIT_NEW_TEMPLOAD (cfg, load, mono_find_exvar_for_offset (cfg, handler_offset)->inst_c0);
                                MONO_INST_NEW (cfg, ins, OP_RETHROW);
                                ins->sreg1 = load->dreg;
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
 
                                MONO_INST_NEW (cfg, ins, OP_NOT_REACHED);
-                               MONO_ADD_INS (bblock, ins);
+                               MONO_ADD_INS (cfg->cbb, ins);
 
                                sp = stack_start;
-                               link_bblock (cfg, bblock, end_bblock);
+                               link_bblock (cfg, cfg->cbb, end_bblock);
                                start_new_bblock = 1;
                                ip += 2;
                                break;
@@ -12859,16 +12910,16 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
        if (start_new_bblock != 1)
                UNVERIFIED;
 
-       bblock->cil_length = ip - bblock->cil_code;
-       if (bblock->next_bb) {
+       cfg->cbb->cil_length = ip - cfg->cbb->cil_code;
+       if (cfg->cbb->next_bb) {
                /* This could already be set because of inlining, #693905 */
-               MonoBasicBlock *bb = bblock;
+               MonoBasicBlock *bb = cfg->cbb;
 
                while (bb->next_bb)
                        bb = bb->next_bb;
                bb->next_bb = end_bblock;
        } else {
-               bblock->next_bb = end_bblock;
+               cfg->cbb->next_bb = end_bblock;
        }
 
        if (cfg->method == method && cfg->domainvar) {
index c1332ec3bc0272180edf7a4c8934975d356fcc98..522497fcfe0ed9f63dfbbc54583266b7de29d0c2 100644 (file)
@@ -1316,6 +1316,7 @@ mono_arch_init (void)
 
        mono_aot_register_jit_icall ("mono_amd64_throw_exception", mono_amd64_throw_exception);
        mono_aot_register_jit_icall ("mono_amd64_throw_corlib_exception", mono_amd64_throw_corlib_exception);
+       mono_aot_register_jit_icall ("mono_amd64_resume_unwind", mono_amd64_resume_unwind);
        mono_aot_register_jit_icall ("mono_amd64_get_original_ip", mono_amd64_get_original_ip);
 }
 
@@ -2239,10 +2240,18 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
        }
 
        for (i = n - 1; i >= 0; --i) {
+               MonoType *t;
+
                ainfo = cinfo->args + i;
 
                in = call->args [i];
 
+               if (sig->hasthis && i == 0)
+                       t = &mono_defaults.object_class->byval_arg;
+               else
+                       t = sig->params [i - sig->hasthis];
+               t = mini_get_underlying_type (cfg, t);
+
                switch (ainfo->storage) {
                case ArgInIReg:
                        /* Already done */
@@ -2258,17 +2267,17 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                                MonoInst *call_inst = (MonoInst*)call;
                                cfg->args [i]->flags |= MONO_INST_VOLATILE;
                                EMIT_NEW_ARGSTORE (cfg, call_inst, i, in);
-                       } else if ((i >= sig->hasthis) && (MONO_TYPE_ISSTRUCT(sig->params [i - sig->hasthis]))) {
+                       } else if ((i >= sig->hasthis) && (MONO_TYPE_ISSTRUCT(t))) {
                                guint32 align;
                                guint32 size;
 
-                               if (sig->params [i - sig->hasthis]->type == MONO_TYPE_TYPEDBYREF) {
+                               if (t->type == MONO_TYPE_TYPEDBYREF) {
                                        size = sizeof (MonoTypedRef);
                                        align = sizeof (gpointer);
                                }
                                else {
                                        if (sig->pinvoke)
-                                               size = mono_type_native_stack_size (&in->klass->byval_arg, &align);
+                                               size = mono_type_native_stack_size (t, &align);
                                        else {
                                                /* 
                                                 * Other backends use mono_type_stack_size (), but that
@@ -2276,7 +2285,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                                                 * the source, leading to reads of invalid memory if the
                                                 * source is at the end of address space.
                                                 */
-                                               size = mono_class_value_size (in->klass, &align);
+                                               size = mono_class_value_size (mono_class_from_mono_type (t), &align);
                                        }
                                }
                                g_assert (in->klass);
@@ -2291,7 +2300,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
                                if (size > 0) {
                                        MONO_INST_NEW (cfg, arg, OP_OUTARG_VT);
                                        arg->sreg1 = in->dreg;
-                                       arg->klass = in->klass;
+                                       arg->klass = mono_class_from_mono_type (t);
                                        arg->backend.size = size;
                                        arg->inst_p0 = call;
                                        arg->inst_p1 = mono_mempool_alloc (cfg->mempool, sizeof (ArgInfo));
@@ -7851,6 +7860,39 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
        return start;
 }
 
+#define MAX_VIRTUAL_DELEGATE_OFFSET 32
+
+static gpointer
+get_delegate_virtual_invoke_impl (gboolean load_imt_reg, int offset, guint32 *code_len)
+{
+       guint8 *code, *start;
+       int size = 20;
+
+       if (offset / sizeof (gpointer) > MAX_VIRTUAL_DELEGATE_OFFSET)
+               return NULL;
+
+       start = code = mono_global_codeman_reserve (size);
+
+       /* Replace the this argument with the target */
+       amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
+       amd64_mov_reg_membase (code, AMD64_ARG_REG1, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 8);
+
+       if (load_imt_reg) {
+               /* Load the IMT reg */
+               amd64_mov_reg_membase (code, MONO_ARCH_IMT_REG, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, method), 8);
+       }
+
+       /* Load the vtable */
+       amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoObject, vtable), 8);
+       amd64_jump_membase (code, AMD64_RAX, offset);
+       mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL);
+
+       if (code_len)
+               *code_len = code - start;
+
+       return start;
+}
+
 /*
  * mono_arch_get_delegate_invoke_impls:
  *
@@ -7876,6 +7918,18 @@ mono_arch_get_delegate_invoke_impls (void)
                g_free (tramp_name);
        }
 
+       for (i = 0; i < MAX_VIRTUAL_DELEGATE_OFFSET; ++i) {
+               code = get_delegate_virtual_invoke_impl (TRUE, i * SIZEOF_VOID_P, &code_len);
+               tramp_name = g_strdup_printf ("delegate_virtual_invoke_imt_%d", i);
+               res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+               g_free (tramp_name);
+
+               code = get_delegate_virtual_invoke_impl (FALSE, i * SIZEOF_VOID_P, &code_len);
+               tramp_name = g_strdup_printf ("delegate_virtual_invoke_%d", i);
+               res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+               g_free (tramp_name);
+       }
+
        return res;
 }
 
@@ -7937,26 +7991,7 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
 gpointer
 mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
 {
-       guint8 *code, *start;
-       int size = 20;
-
-       start = code = mono_global_codeman_reserve (size);
-
-       /* Replace the this argument with the target */
-       amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
-       amd64_mov_reg_membase (code, AMD64_ARG_REG1, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 8);
-
-       if (load_imt_reg) {
-               /* Load the IMT reg */
-               amd64_mov_reg_membase (code, MONO_ARCH_IMT_REG, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, method), 8);
-       }
-
-       /* Load the vtable */
-       amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoObject, vtable), 8);
-       amd64_jump_membase (code, AMD64_RAX, offset);
-       mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL);
-
-       return start;
+       return get_delegate_virtual_invoke_impl (load_imt_reg, offset, NULL);
 }
 
 void
index 3588a31e86aa050f20605ebecc15ac256d689b62..c32445361f09c5066f48739fa108aa9203afd22f 100644 (file)
@@ -387,6 +387,11 @@ mono_amd64_throw_corlib_exception (guint64 dummy1, guint64 dummy2, guint64 dummy
                                                                   guint64 dummy5, guint64 dummy6,
                                                                   MonoContext *mctx, guint32 ex_token_index, gint64 pc_offset);
 
+void
+mono_amd64_resume_unwind (guint64 dummy1, guint64 dummy2, guint64 dummy3, guint64 dummy4,
+                                                 guint64 dummy5, guint64 dummy6,
+                                                 MonoContext *mctx, guint32 dummy7, gint64 dummy8);
+
 guint64
 mono_amd64_get_original_ip (void);
 
index 0bdec210868ae04a6913482a461efc4b5ddaa302..09b0f0aad6c13449f05f85ec4c82ba4a58cbedc5 100644 (file)
@@ -4627,6 +4627,13 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                                for (i = 0; i < 4; ++i)
                                        ARM_NOP (code);
                        }
+
+                       /*
+                        * Add an additional nop so skipping the bp doesn't cause the ip to point
+                        * to another IL offset.
+                        */
+
+                       ARM_NOP (code);
                        break;
                }
                case OP_ADDCC:
index eb53c982951c4f75829d3451396b38abdbaa2b7c..baeb61fe85352adcddeb24b95da9c39f5130a031 100644 (file)
@@ -179,7 +179,7 @@ typedef struct {
 
 
 #define PARAM_REGS 4
-#define DYN_CALL_STACK_ARGS 6
+#define DYN_CALL_STACK_ARGS 10
 
 typedef struct {
        mgreg_t regs [PARAM_REGS + DYN_CALL_STACK_ARGS];
@@ -270,7 +270,7 @@ typedef struct MonoCompileArch {
 
 #define MONO_ARCH_GSHARED_SUPPORTED 1
 #define MONO_ARCH_DYN_CALL_SUPPORTED 1
-#define MONO_ARCH_DYN_CALL_PARAM_AREA 24
+#define MONO_ARCH_DYN_CALL_PARAM_AREA (DYN_CALL_STACK_ARGS * sizeof (mgreg_t))
 
 #ifndef MONO_CROSS_COMPILE
 #define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1
index bc7d73d855363553958f1def7046ba0be999a304..c43da613f60e1eba364a30e409baef5541ccdeab 100644 (file)
 #include <sys/syscall.h>
 #endif
 
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
+
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/tabledefs.h>
 #include <mono/metadata/threads.h>
@@ -2214,7 +2218,15 @@ mono_handle_native_sigsegv (int signal, void *ctx, MONO_SIG_HANDLER_INFO_TYPE *i
                 * it will deadlock. Call the syscall directly instead.
                 */
                pid = mono_runtime_syscall_fork ();
-
+#if defined (HAVE_PRCTL) && defined(PR_SET_PTRACER)
+               if (pid > 0) {
+                       // Allow gdb to attach to the process even if ptrace_scope sysctl variable is set to
+                       // a value other than 0 (the most permissive ptrace scope). Most modern Linux
+                       // distributions set the scope to 1 which allows attaching only to direct children of
+                       // the current process
+                       prctl (PR_SET_PTRACER, pid, 0, 0, 0);
+               }
+#endif
                if (pid == 0) {
                        dup2 (STDERR_FILENO, STDOUT_FILENO);
 
index fd7e005a82e5c6937678b93c3fc485c830fd061e..ac9c9a2d83afaa003c22b8ec7a8b5b1c2ad016e8 100644 (file)
@@ -1002,8 +1002,7 @@ class_type_info (MonoDomain *domain, MonoClass *class, MonoRgctxInfoType info_ty
 static gboolean
 ji_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))
+       if (ji && ji->has_generic_jit_info && (mono_jit_info_get_generic_sharing_context (ji)->is_gsharedvt))
                return TRUE;
        else
                return FALSE;
@@ -1018,7 +1017,6 @@ typedef struct {
        gint32 vcall_offset;
        gpointer addr;
        MonoMethodSignature *sig, *gsig;
-       MonoGenericContext gsctx;
 } GSharedVtTrampInfo;
 
 static guint
@@ -1037,8 +1035,7 @@ tramp_info_equal (gconstpointer a, gconstpointer b)
 
        /* The signatures should be internalized */
        return tramp1->is_in == tramp2->is_in && tramp1->calli == tramp2->calli && tramp1->vcall_offset == tramp2->vcall_offset &&
-               tramp1->addr == tramp2->addr && tramp1->sig == tramp2->sig && tramp1->gsig == tramp2->gsig &&
-               tramp1->gsctx.class_inst == tramp2->gsctx.class_inst && tramp1->gsctx.method_inst == tramp2->gsctx.method_inst;
+               tramp1->addr == tramp2->addr && tramp1->sig == tramp2->sig && tramp1->gsig == tramp2->gsig;
 }
 
 /*
@@ -1063,13 +1060,13 @@ mini_get_gsharedvt_wrapper (gboolean gsharedvt_in, gpointer addr, MonoMethodSign
                inited = TRUE;
        }
 
+       memset (&tinfo, 0, sizeof (tinfo));
        tinfo.is_in = gsharedvt_in;
        tinfo.calli = calli;
        tinfo.vcall_offset = vcall_offset;
        tinfo.addr = addr;
        tinfo.sig = normal_sig;
        tinfo.gsig = gsharedvt_sig;
-       memcpy (&tinfo.gsctx, gsctx, sizeof (MonoGenericSharingContext));
 
        domain_info = domain_jit_info (domain);
 
@@ -1131,7 +1128,7 @@ mini_get_gsharedvt_wrapper (gboolean gsharedvt_in, gpointer addr, MonoMethodSign
 
 static gpointer
 instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti,
-                                 MonoGenericContext *context, MonoClass *class, guint8 *caller)
+                                 MonoGenericContext *context, MonoClass *class)
 {
        gpointer data;
        gboolean temporary;
@@ -1189,7 +1186,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), FALSE);
+               return mini_add_method_trampoline (data, addr, mono_method_needs_static_rgctx_invoke (data, FALSE), FALSE);
        }
        case MONO_RGCTX_INFO_VIRT_METHOD_CODE: {
                MonoJumpInfoVirtMethod *info = data;
@@ -1212,7 +1209,7 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
                method = info->klass->vtable [ioffset + slot];
 
                addr = mono_compile_method (method);
-               return mini_add_method_trampoline (NULL, method, addr, mono_method_needs_static_rgctx_invoke (method, FALSE), FALSE);
+               return mini_add_method_trampoline (method, addr, mono_method_needs_static_rgctx_invoke (method, FALSE), FALSE);
        }
        case MONO_RGCTX_INFO_VIRT_METHOD_BOX_TYPE: {
                MonoJumpInfoVirtMethod *info = data;
@@ -1283,22 +1280,11 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
                MonoMethodSignature *gsig = oti->data;
                MonoMethodSignature *sig = data;
                gpointer addr;
-               MonoJitInfo *caller_ji;
-               MonoGenericJitInfo *gji;
 
                /*
                 * This is an indirect call to the address passed by the caller in the rgctx reg.
                 */
-               //printf ("CALLI\n");
-
-               g_assert (caller);
-               caller_ji = mini_jit_info_table_find (mono_domain_get (), mono_get_addr_from_ftnptr (caller), NULL);
-               g_assert (caller_ji);
-               gji = mono_jit_info_get_generic_jit_info (caller_ji);
-               g_assert (gji);
-
-               addr = mini_get_gsharedvt_wrapper (FALSE, NULL, sig, gsig, gji->generic_sharing_context, -1, TRUE);
-
+               addr = mini_get_gsharedvt_wrapper (FALSE, NULL, sig, gsig, NULL, -1, TRUE);
                return addr;
        }
        case MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE:
@@ -1307,10 +1293,9 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
                MonoMethodSignature *call_sig;
                MonoMethod *method;
                gpointer addr;
-               MonoJitInfo *caller_ji, *callee_ji;
+               MonoJitInfo *callee_ji;
                gboolean virtual = oti->info_type == MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT;
                gint32 vcall_offset;
-               MonoGenericJitInfo *gji, *callee_gji = NULL;
                gboolean callee_gsharedvt;
 
                /* This is the original generic signature used by the caller */
@@ -1342,19 +1327,9 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
                        vcall_offset = -1;
                }
 
-               g_assert (caller);
-               caller_ji = mini_jit_info_table_find (mono_domain_get (), mono_get_addr_from_ftnptr (caller), NULL);
-               g_assert (caller_ji);
-               gji = mono_jit_info_get_generic_jit_info (caller_ji);
-               g_assert (gji);
-
                // FIXME: This loads information in the AOT case
                callee_ji = mini_jit_info_table_find (mono_domain_get (), mono_get_addr_from_ftnptr (addr), NULL);
                callee_gsharedvt = ji_is_gsharedvt (callee_ji);
-               if (callee_gsharedvt) {
-                       callee_gji = mono_jit_info_get_generic_jit_info (callee_ji);
-                       g_assert (callee_gji);
-               }
 
                /*
                 * For gsharedvt calls made out of gsharedvt methods, the callee could end up being a gsharedvt method, or a normal
@@ -1375,7 +1350,7 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
                        sig = mono_method_signature (method);
                        gsig = call_sig;
 
-                       addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, gji->generic_sharing_context, vcall_offset, FALSE);
+                       addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, NULL, vcall_offset, FALSE);
 #if 0
                        if (virtual)
                                printf ("OUT-VCALL: %s\n", mono_method_full_name (method, TRUE));
@@ -1407,12 +1382,12 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
                                sig = mono_method_signature (method);
                                gsig = mono_method_signature (jinfo_get_method (callee_ji)); 
 
-                               addr = mini_get_gsharedvt_wrapper (TRUE, callee_ji->code_start, sig, gsig, callee_gji->generic_sharing_context, -1, FALSE);
+                               addr = mini_get_gsharedvt_wrapper (TRUE, callee_ji->code_start, sig, gsig, NULL, -1, FALSE);
 
                                sig = mono_method_signature (method);
                                gsig = call_sig;
 
-                               addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, gji->generic_sharing_context, -1, FALSE);
+                               addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, NULL, -1, FALSE);
 
                                //printf ("OUT-IN-RGCTX: %s\n", mono_method_full_name (method, TRUE));
                        }
@@ -1451,7 +1426,7 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
                                offset += size;
                                break;
                        default:
-                               res->entries [i] = instantiate_info (domain, template, context, class, NULL);
+                               res->entries [i] = instantiate_info (domain, template, context, class);
                                break;
                        }
                }
@@ -1817,7 +1792,7 @@ alloc_rgctx_array (MonoDomain *domain, int n, gboolean is_mrgctx)
 }
 
 static gpointer
-fill_runtime_generic_context (MonoVTable *class_vtable, MonoRuntimeGenericContext *rgctx, guint8 *caller, guint32 slot,
+fill_runtime_generic_context (MonoVTable *class_vtable, MonoRuntimeGenericContext *rgctx, guint32 slot,
                MonoGenericInst *method_inst)
 {
        gpointer info;
@@ -1872,7 +1847,7 @@ fill_runtime_generic_context (MonoVTable *class_vtable, MonoRuntimeGenericContex
        oti = class_get_rgctx_template_oti (get_shared_class (class),
                                                                                method_inst ? method_inst->type_argc : 0, slot, TRUE, TRUE, &do_free);
        /* This might take the loader lock */
-       info = instantiate_info (domain, &oti, &context, class, caller);
+       info = instantiate_info (domain, &oti, &context, class);
 
        /*
        if (method_inst)
@@ -1900,13 +1875,12 @@ fill_runtime_generic_context (MonoVTable *class_vtable, MonoRuntimeGenericContex
 /*
  * mono_class_fill_runtime_generic_context:
  * @class_vtable: a vtable
- * @caller: caller method address
  * @slot: a slot index to be instantiated
  *
  * Instantiates a slot in the RGCTX, returning its value.
  */
 gpointer
-mono_class_fill_runtime_generic_context (MonoVTable *class_vtable, guint8 *caller, guint32 slot)
+mono_class_fill_runtime_generic_context (MonoVTable *class_vtable, guint32 slot)
 {
        static gboolean inited = FALSE;
        static int num_alloced = 0;
@@ -1931,7 +1905,7 @@ mono_class_fill_runtime_generic_context (MonoVTable *class_vtable, guint8 *calle
 
        mono_domain_unlock (domain);
 
-       info = fill_runtime_generic_context (class_vtable, rgctx, caller, slot, 0);
+       info = fill_runtime_generic_context (class_vtable, rgctx, slot, 0);
 
        DEBUG (printf ("get rgctx slot: %s %d -> %p\n", mono_type_full_name (&class_vtable->klass->byval_arg), slot, info));
 
@@ -1941,18 +1915,16 @@ mono_class_fill_runtime_generic_context (MonoVTable *class_vtable, guint8 *calle
 /*
  * mono_method_fill_runtime_generic_context:
  * @mrgctx: an MRGCTX
- * @caller: caller method address
  * @slot: a slot index to be instantiated
  *
  * Instantiates a slot in the MRGCTX.
  */
 gpointer
-mono_method_fill_runtime_generic_context (MonoMethodRuntimeGenericContext *mrgctx, guint8* caller, guint32 slot)
+mono_method_fill_runtime_generic_context (MonoMethodRuntimeGenericContext *mrgctx, guint32 slot)
 {
        gpointer info;
 
-       info = fill_runtime_generic_context (mrgctx->class_vtable, (MonoRuntimeGenericContext*)mrgctx, caller, slot,
-               mrgctx->method_inst);
+       info = fill_runtime_generic_context (mrgctx->class_vtable, (MonoRuntimeGenericContext*)mrgctx, slot, mrgctx->method_inst);
 
        return info;
 }
@@ -2036,7 +2008,14 @@ generic_inst_is_sharable (MonoGenericInst *inst, gboolean allow_type_vars,
 static gboolean
 type_is_sharable (MonoType *type, gboolean allow_type_vars, gboolean allow_partial)
 {
-       if (MONO_TYPE_IS_REFERENCE (type) || (allow_type_vars && (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR)))
+       if (allow_type_vars && (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR)) {
+               MonoType *constraint = type->data.generic_param->gshared_constraint;
+               if (!constraint)
+                       return TRUE;
+               type = constraint;
+       }
+
+       if (MONO_TYPE_IS_REFERENCE (type))
                return TRUE;
 
        /* Allow non ref arguments if they are primitive types or enums (partial sharing). */
@@ -2425,53 +2404,10 @@ mono_set_partial_sharing_supported (gboolean supported)
 gboolean
 mono_class_generic_sharing_enabled (MonoClass *class)
 {
-       static int generic_sharing = MONO_GENERIC_SHARING_NONE;
-       static gboolean inited = FALSE;
-
-       if (!inited) {
-               const char *option;
-
-               if (gshared_supported)
-                       generic_sharing = MONO_GENERIC_SHARING_ALL;
-               else
-                       generic_sharing = MONO_GENERIC_SHARING_NONE;
-
-               if ((option = g_getenv ("MONO_GENERIC_SHARING"))) {
-                       if (strcmp (option, "corlib") == 0)
-                               generic_sharing = MONO_GENERIC_SHARING_CORLIB;
-                       else if (strcmp (option, "collections") == 0)
-                               generic_sharing = MONO_GENERIC_SHARING_COLLECTIONS;
-                       else if (strcmp (option, "all") == 0)
-                               generic_sharing = MONO_GENERIC_SHARING_ALL;
-                       else if (strcmp (option, "none") == 0)
-                               generic_sharing = MONO_GENERIC_SHARING_NONE;
-                       else
-                               g_warning ("Unknown generic sharing option `%s'.", option);
-               }
-
-               if (!gshared_supported)
-                       generic_sharing = MONO_GENERIC_SHARING_NONE;
-
-               inited = TRUE;
-       }
-
-       switch (generic_sharing) {
-       case MONO_GENERIC_SHARING_NONE:
-               return FALSE;
-       case MONO_GENERIC_SHARING_ALL:
+       if (gshared_supported)
                return TRUE;
-       case MONO_GENERIC_SHARING_CORLIB :
-               return class->image == mono_defaults.corlib;
-       case MONO_GENERIC_SHARING_COLLECTIONS:
-               if (class->image != mono_defaults.corlib)
-                       return FALSE;
-               while (class->nested_in)
-                       class = class->nested_in;
-               return g_str_has_prefix (class->name_space, "System.Collections.Generic");
-       default:
-               g_assert_not_reached ();
-       }
-       return FALSE;
+       else
+               return FALSE;
 }
 
 /*
@@ -2734,20 +2670,12 @@ mono_generic_sharing_cleanup (void)
 gboolean
 mini_type_var_is_vt (MonoCompile *cfg, MonoType *type)
 {
-       if (type->type == MONO_TYPE_VAR) {
-               if (cfg->generic_sharing_context->var_is_vt && cfg->generic_sharing_context->var_is_vt [type->data.generic_param->num])
-                       return TRUE;
-               else
-                       return FALSE;
-       } else if (type->type == MONO_TYPE_MVAR) {
-               if (cfg->generic_sharing_context->mvar_is_vt && cfg->generic_sharing_context->mvar_is_vt [type->data.generic_param->num])
-                       return TRUE;
-               else
-                       return FALSE;
+       if (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR) {
+               return type->data.generic_param->gshared_constraint && type->data.generic_param->gshared_constraint->type == MONO_TYPE_VALUETYPE;
        } else {
                g_assert_not_reached ();
+               return FALSE;
        }
-       return FALSE;
 }
 
 gboolean
@@ -2955,14 +2883,21 @@ get_shared_type (MonoType *t, MonoType *type)
                k = mono_class_inflate_generic_class (gclass->container_class, &context);
 
                return get_shared_gparam (t, &k->byval_arg);
+       } else if (MONO_TYPE_ISSTRUCT (type)) {
+               return type;
        }
 
-       g_assert (!type->byref && (((type->type >= MONO_TYPE_BOOLEAN) && (type->type <= MONO_TYPE_R8)) || (type->type == MONO_TYPE_I) || (type->type == MONO_TYPE_U) || (type->type == MONO_TYPE_VALUETYPE && type->data.klass->enumtype)));
-
        /* Create a type variable with a constraint which encodes which types can match it */
        ttype = type->type;
-       if (type->type == MONO_TYPE_VALUETYPE)
+       if (type->type == MONO_TYPE_VALUETYPE) {
                ttype = mono_class_enum_basetype (type->data.klass)->type;
+       } else if (MONO_TYPE_IS_REFERENCE (type)) {
+               ttype = MONO_TYPE_OBJECT;
+       } else if (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR) {
+               if (type->data.generic_param->gshared_constraint)
+                       return get_shared_gparam (t, type->data.generic_param->gshared_constraint);
+               ttype = MONO_TYPE_OBJECT;
+       }
 
        {
                MonoType t2;
@@ -2992,18 +2927,11 @@ get_shared_inst (MonoGenericInst *inst, MonoGenericInst *shared_inst, MonoGeneri
 
        type_argv = g_new0 (MonoType*, inst->type_argc);
        for (i = 0; i < inst->type_argc; ++i) {
-               if (all_vt) {
+               if (all_vt || gsharedvt) {
                        type_argv [i] = get_gsharedvt_type (shared_inst->type_argv [i]);
-               } else if ((MONO_TYPE_IS_REFERENCE (inst->type_argv [i]) || inst->type_argv [i]->type == MONO_TYPE_VAR || inst->type_argv [i]->type == MONO_TYPE_MVAR)) {
-                       g_assert (shared_inst);
-                       type_argv [i] = get_shared_gparam (shared_inst->type_argv [i], &mono_defaults.object_class->byval_arg);
-               } else if (partial) {
+               } else {
                        /* These types match the ones in generic_inst_is_sharable () */
                        type_argv [i] = get_shared_type (shared_inst->type_argv [i], inst->type_argv [i]);
-               } else if (gsharedvt) {
-                       type_argv [i] = get_gsharedvt_type (shared_inst->type_argv [i]);
-               } else {
-                       type_argv [i] = inst->type_argv [i];
                }
        }
 
@@ -3073,6 +3001,8 @@ mini_get_shared_method_full (MonoMethod *method, gboolean all_vt, gboolean is_gs
        res = mono_class_inflate_generic_method_checked (declaring_method, &shared_context, &error);
        g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
 
+       //printf ("%s\n", mono_method_full_name (res, 1));
+
        return res;
 }
 
@@ -3082,6 +3012,68 @@ mini_get_shared_method (MonoMethod *method)
        return mini_get_shared_method_full (method, FALSE, FALSE);
 }
 
+int
+mini_get_rgctx_entry_slot (MonoJumpInfoRgctxEntry *entry)
+{
+       guint32 slot = -1;
+
+       switch (entry->data->type) {
+       case MONO_PATCH_INFO_CLASS:
+               slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, &entry->data->data.klass->byval_arg, entry->info_type, mono_method_get_context (entry->method));
+               break;
+       case MONO_PATCH_INFO_METHOD:
+       case MONO_PATCH_INFO_METHODCONST:
+               slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, entry->data->data.method, entry->info_type, mono_method_get_context (entry->method));
+               break;
+       case MONO_PATCH_INFO_FIELD:
+               slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, entry->data->data.field, entry->info_type, mono_method_get_context (entry->method));
+               break;
+       case MONO_PATCH_INFO_SIGNATURE:
+               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 = 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->num_entries = oinfo->num_entries;
+               info->entries = g_malloc0 (sizeof (MonoRuntimeGenericContextInfoTemplate) * info->num_entries);
+               for (i = 0; i < oinfo->num_entries; ++i) {
+                       MonoRuntimeGenericContextInfoTemplate *otemplate = &oinfo->entries [i];
+                       MonoRuntimeGenericContextInfoTemplate *template = &info->entries [i];
+
+                       memcpy (template, otemplate, sizeof (MonoRuntimeGenericContextInfoTemplate));
+               }
+               slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, info, entry->info_type, mono_method_get_context (entry->method));
+               break;
+       }
+       case MONO_PATCH_INFO_VIRT_METHOD: {
+               MonoJumpInfoVirtMethod *info;
+               MonoJumpInfoVirtMethod *oinfo = entry->data->data.virt_method;
+
+               info = g_malloc0 (sizeof (MonoJumpInfoVirtMethod));
+               memcpy (info, oinfo, sizeof (MonoJumpInfoVirtMethod));
+               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;
+       }
+
+       return slot;
+}
+
 #if defined(ENABLE_GSHAREDVT)
 
 #include "../../../mono-extensions/mono/mini/mini-generic-sharing-gsharedvt.c"
index ad20bbd37f664c94e8b51f3790245cc4dd564e43..5b399ee03b7586a9359283631ecc6d62b46901dc 100644 (file)
@@ -424,6 +424,14 @@ mono_llvm_build_fence (LLVMBuilderRef builder, BarrierKind kind)
        return wrap (ins);
 }
 
+void
+mono_llvm_set_must_tail (LLVMValueRef call_ins)
+{
+       CallInst *ins = (CallInst*)unwrap (call_ins);
+
+       ins->setTailCallKind (CallInst::TailCallKind::TCK_MustTail);
+}
+
 void
 mono_llvm_replace_uses_of (LLVMValueRef var, LLVMValueRef v)
 {
@@ -431,6 +439,12 @@ mono_llvm_replace_uses_of (LLVMValueRef var, LLVMValueRef v)
        unwrap (var)->replaceAllUsesWith (V);
 }
 
+LLVMValueRef
+mono_llvm_create_constant_data_array (const uint8_t *data, int len)
+{
+       return wrap(ConstantDataArray::get (*unwrap(LLVMGetGlobalContext ()), makeArrayRef(data, len)));
+}
+
 static cl::list<const PassInfo*, bool, PassNameParser>
 PassList(cl::desc("Optimizations available:"));
 
index ee502e29d09f31ed11bfdd2d5b910871d471e1f0..a60dcecaae21b4dc86a7ce11f79a1d5b81ee9221 100644 (file)
@@ -84,6 +84,12 @@ mono_llvm_replace_uses_of (LLVMValueRef var, LLVMValueRef v);
 LLVMValueRef
 mono_llvm_build_cmpxchg (LLVMBuilderRef builder, LLVMValueRef addr, LLVMValueRef comparand, LLVMValueRef value);
 
+void
+mono_llvm_set_must_tail (LLVMValueRef call_ins);
+
+LLVMValueRef
+mono_llvm_create_constant_data_array (const uint8_t *data, int len);
+
 G_END_DECLS
 
 #endif /* __MONO_MINI_LLVM_CPP_H__ */  
index aca790dab2e023ec5b74212472d85c49bbba2c43..db1fbe76654b8696bc07d035d2ec899f33b84964 100644 (file)
 typedef void (*MonoLLVMVoidFunc)(void);
 typedef void (*MonoLLVMCFGFunc)(MonoCompile *cfg);
 typedef void (*MonoLLVMEmitCallFunc)(MonoCompile *cfg, MonoCallInst *call);
-typedef void (*MonoLLVMCreateAotFunc)(const char *got_symbol, gboolean external_symbols, gboolean emit_dwarf);
+typedef void (*MonoLLVMCreateAotFunc)(const char *global_prefix, gboolean emit_dwarf);
 typedef void (*MonoLLVMEmitAotFunc)(const char *filename, const char *cu_name);
+typedef void (*MonoLLVMEmitAotInfoFunc)(MonoAotFileInfo *info, gboolean has_jitted_code);
+typedef void (*MonoLLVMEmitAotDataFunc)(const char *symbol, guint8 *data, int data_len);
 typedef void (*MonoLLVMFreeDomainFunc)(MonoDomain *domain);
 
 static MonoLLVMVoidFunc mono_llvm_init_fptr;
@@ -25,6 +27,8 @@ static MonoLLVMEmitCallFunc mono_llvm_emit_call_fptr;
 static MonoLLVMCreateAotFunc mono_llvm_create_aot_module_fptr;
 static MonoLLVMEmitAotFunc mono_llvm_emit_aot_module_fptr;
 static MonoLLVMCFGFunc mono_llvm_check_method_supported_fptr;
+static MonoLLVMEmitAotInfoFunc mono_llvm_emit_aot_file_info_fptr;
+static MonoLLVMEmitAotDataFunc mono_llvm_emit_aot_data_fptr;
 static MonoLLVMFreeDomainFunc mono_llvm_free_domain_info_fptr;
 
 void
@@ -52,10 +56,10 @@ mono_llvm_emit_call (MonoCompile *cfg, MonoCallInst *call)
 }
 
 void
-mono_llvm_create_aot_module (const char *got_symbol, gboolean external_symbols, gboolean emit_dwarf)
+mono_llvm_create_aot_module (const char *global_prefix, gboolean emit_dwarf)
 {
        g_assert (mono_llvm_create_aot_module_fptr);
-       mono_llvm_create_aot_module_fptr (got_symbol, external_symbols, emit_dwarf);
+       mono_llvm_create_aot_module_fptr (global_prefix, emit_dwarf);
 }
 
 void
@@ -78,6 +82,20 @@ mono_llvm_free_domain_info (MonoDomain *domain)
                mono_llvm_free_domain_info_fptr (domain);
 }
 
+void
+mono_llvm_emit_aot_file_info (MonoAotFileInfo *info, gboolean has_jitted_code)
+{
+       if (mono_llvm_emit_aot_file_info_fptr)
+               mono_llvm_emit_aot_file_info_fptr (info, has_jitted_code);
+}
+
+void
+mono_llvm_emit_aot_data (const char *symbol, guint8 *data, int data_len)
+{
+       if (mono_llvm_emit_aot_data_fptr)
+               mono_llvm_emit_aot_data_fptr (symbol, data, data_len);
+}
+
 int
 mono_llvm_load (const char* bpath)
 {
@@ -106,6 +124,10 @@ mono_llvm_load (const char* bpath)
        if (err) goto symbol_error;
        err = mono_dl_symbol (llvm_lib, "mono_llvm_free_domain_info", (void**)&mono_llvm_free_domain_info_fptr);
        if (err) goto symbol_error;
+       err = mono_dl_symbol (llvm_lib, "mono_llvm_emit_aot_file_info", (void**)&mono_llvm_emit_aot_file_info_fptr);
+       if (err) goto symbol_error;
+       err = mono_dl_symbol (llvm_lib, "mono_llvm_emit_aot_data", (void**)&mono_llvm_emit_aot_data_fptr);
+       if (err) goto symbol_error;
        return TRUE;
 symbol_error:
        g_warning ("llvm symbol load failed: %s\n", err);
index 2667eac00f99831b2a9a363474ad847c405da794..7b3b0e57f47b3c64926f10823b4abff8046228b3 100644 (file)
@@ -63,6 +63,13 @@ typedef struct {
        gboolean external_symbols;
        gboolean emit_dwarf;
        int max_got_offset;
+
+       /* For AOT */
+       MonoAotFileInfo aot_info;
+       const char *jit_got_symbol;
+       const char *eh_frame_symbol;
+       LLVMValueRef code_start, code_end;
+       gboolean has_jitted_code;
 } MonoLLVMModule;
 
 /*
@@ -5865,7 +5872,7 @@ mono_llvm_free_domain_info (MonoDomain *domain)
 }
 
 void
-mono_llvm_create_aot_module (const char *got_symbol, gboolean external_symbols, gboolean emit_dwarf)
+mono_llvm_create_aot_module (const char *global_prefix, gboolean emit_dwarf)
 {
        /* Delete previous module */
        if (aot_module.plt_entries)
@@ -5876,8 +5883,9 @@ mono_llvm_create_aot_module (const char *got_symbol, gboolean external_symbols,
        memset (&aot_module, 0, sizeof (aot_module));
 
        aot_module.module = LLVMModuleCreateWithName ("aot");
-       aot_module.got_symbol = got_symbol;
-       aot_module.external_symbols = external_symbols;
+       aot_module.got_symbol = g_strdup_printf ("%s_llvm_got", global_prefix);
+       aot_module.eh_frame_symbol = g_strdup_printf ("%s_eh_frame", global_prefix);
+       aot_module.external_symbols = TRUE;
        aot_module.emit_dwarf = emit_dwarf;
        /* The first few entries are reserved */
        aot_module.max_got_offset = 16;
@@ -5920,6 +5928,175 @@ mono_llvm_create_aot_module (const char *got_symbol, gboolean external_symbols,
        aot_module.method_to_lmethod = g_hash_table_new (NULL, NULL);
 }
 
+static LLVMValueRef
+llvm_array_from_uints (LLVMTypeRef el_type, guint32 *values, int nvalues)
+{
+       int i;
+       LLVMValueRef res, *vals;
+
+       vals = g_new0 (LLVMValueRef, nvalues);
+       for (i = 0; i < nvalues; ++i)
+               vals [i] = LLVMConstInt (LLVMInt32Type (), values [i], FALSE);
+       res = LLVMConstArray (LLVMInt32Type (), vals, nvalues);
+       g_free (vals);
+       return res;
+}
+
+/*
+ * mono_llvm_emit_aot_file_info:
+ *
+ *   Emit the MonoAotFileInfo structure.
+ * Same as emit_aot_file_info () in aot-compiler.c.
+ */
+void
+mono_llvm_emit_aot_file_info (MonoAotFileInfo *info, gboolean has_jitted_code)
+{
+       /* Save these for later */
+       memcpy (&aot_module.aot_info, info, sizeof (MonoAotFileInfo));
+       aot_module.has_jitted_code = has_jitted_code;
+}
+
+/*
+ * mono_llvm_emit_aot_data:
+ *
+ *   Emit the binary data DATA pointed to by symbol SYMBOL.
+ */
+void
+mono_llvm_emit_aot_data (const char *symbol, guint8 *data, int data_len)
+{
+       MonoLLVMModule *lmodule = &aot_module;
+       LLVMTypeRef type;
+       LLVMValueRef d;
+
+       type = LLVMArrayType (LLVMInt8Type (), data_len);
+       d = LLVMAddGlobal (lmodule->module, type, symbol);
+       LLVMSetInitializer (d, mono_llvm_create_constant_data_array (data, data_len));
+}
+
+static void
+emit_aot_file_info (MonoLLVMModule *lmodule)
+{
+       LLVMTypeRef file_info_type;
+       LLVMTypeRef *eltypes, eltype;
+       LLVMValueRef info_var;
+       LLVMValueRef *fields;
+       int i, nfields, tindex;
+       MonoAotFileInfo *info;
+
+       info = &lmodule->aot_info;
+
+       /* Create an LLVM type to represent MonoAotFileInfo */
+       nfields = 50;
+       eltypes = g_new (LLVMTypeRef, nfields);
+       tindex = 0;
+       eltypes [tindex ++] = LLVMInt32Type ();
+       eltypes [tindex ++] = LLVMInt32Type ();
+       /* Symbols */
+       for (i = 0; i < MONO_AOT_FILE_INFO_NUM_SYMBOLS; ++i)
+               eltypes [tindex ++] = LLVMPointerType (LLVMInt8Type (), 0);
+       /* Scalars */
+       for (i = 0; i < 13; ++i)
+               eltypes [tindex ++] = LLVMInt32Type ();
+       /* Arrays */
+       for (i = 0; i < 4; ++i)
+               eltypes [tindex ++] = LLVMArrayType (LLVMInt32Type (), MONO_AOT_TRAMP_NUM);
+       g_assert (tindex == nfields);
+       file_info_type = LLVMStructCreateNamed (LLVMGetGlobalContext (), "MonoAotFileInfo");
+       LLVMStructSetBody (file_info_type, eltypes, nfields, FALSE);
+
+       info_var = LLVMAddGlobal (aot_module.module, file_info_type, "mono_aot_file_info");
+       fields = g_new (LLVMValueRef, nfields);
+       tindex = 0;
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->version, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->dummy, FALSE);
+
+       /* Symbols */
+       /*
+        * We use LLVMGetNamedGlobal () for symbol which are defined in LLVM code, and LLVMAddGlobal ()
+        * for symbols defined in the .s file emitted by the aot compiler.
+        */
+       eltype = eltypes [tindex];
+       fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "jit_got");
+       fields [tindex ++] = aot_module.got_var;
+       /* llc defines this directly */
+       fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, aot_module.eh_frame_symbol);
+       if (TRUE || aot_module.has_jitted_code) {
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "jit_code_start");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "jit_code_end");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "method_addresses");
+       } else {
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+       }
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "blob");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "class_name_table");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "class_info_offsets");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "method_info_offsets");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "ex_info_offsets");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "extra_method_info_offsets");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "extra_method_table");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "got_info_offsets");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "llvm_got_info_offsets");
+       /* Not needed (mem_end) */
+       fields [tindex ++] = LLVMConstNull (eltype);
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "image_table");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "assembly_guid");
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "runtime_version");
+       if (info->trampoline_size [0]) {
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "specific_trampolines");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "static_rgctx_trampolines");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "imt_thunks");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "gsharedvt_arg_trampolines");
+       } else {
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+       }
+       // FIXME:
+       fields [tindex ++] = LLVMConstNull (eltype);
+       fields [tindex ++] = LLVMGetNamedGlobal (aot_module.module, "assembly_name");
+       if (TRUE || aot_module.has_jitted_code) {
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "plt");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "plt_end");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "unwind_info");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "unbox_trampolines");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "unbox_trampolines_end");
+               fields [tindex ++] = LLVMAddGlobal (aot_module.module, eltype, "unbox_trampoline_addresses");
+       } else {
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+       }
+
+       /* Scalars */
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->plt_got_offset_base, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->got_size, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->plt_size, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->nmethods, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->flags, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->opts, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->simd_opts, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->gc_name_index, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->num_rgctx_fetch_trampolines, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->double_align, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->long_align, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->generic_tramp_num, FALSE);
+       fields [tindex ++] = LLVMConstInt (LLVMInt32Type (), info->tramp_page_size, FALSE);
+       /* Arrays */
+       fields [tindex ++] = llvm_array_from_uints (LLVMInt32Type (), info->num_trampolines, MONO_AOT_TRAMP_NUM);
+       fields [tindex ++] = llvm_array_from_uints (LLVMInt32Type (), info->trampoline_got_offset_base, MONO_AOT_TRAMP_NUM);
+       fields [tindex ++] = llvm_array_from_uints (LLVMInt32Type (), info->trampoline_size, MONO_AOT_TRAMP_NUM);
+       fields [tindex ++] = llvm_array_from_uints (LLVMInt32Type (), info->tramp_page_code_offsets, MONO_AOT_TRAMP_NUM);
+       g_assert (tindex == nfields);
+
+       LLVMSetInitializer (info_var, LLVMConstNamedStruct (file_info_type, fields, nfields));
+}
+
 /*
  * Emit the aot module into the LLVM bitcode file FILENAME.
  */
@@ -5949,9 +6126,11 @@ mono_llvm_emit_aot_module (const char *filename, const char *cu_name)
 
        /* Delete the dummy got so it doesn't become a global */
        LLVMDeleteGlobal (aot_module.got_var);
+       aot_module.got_var = real_got;
 
        emit_llvm_used (&aot_module);
        emit_dbg_info (&aot_module, filename, cu_name);
+       emit_aot_file_info (&aot_module);
 
        /* Replace PLT entries for directly callable methods with the methods themselves */
        {
index 0cf56a986d5a435a545d2b028bc0c927c6d35f30..72e64a2c16980c17c26a097b88a177ec39b2aec0 100644 (file)
@@ -2147,11 +2147,8 @@ mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins)
 {
        switch (ins->opcode) {
        case OP_ICONV_TO_R_UN: {
-#if G_BYTE_ORDER == G_BIG_ENDIAN
+               // This value is OK as-is for both big and little endian because of how it is stored
                static const guint64 adjust_val = 0x4330000000000000ULL;
-#else
-               static const guint64 adjust_val = 0x0000000000003043ULL;
-#endif
                int msw_reg = mono_alloc_ireg (cfg);
                int adj_reg = mono_alloc_freg (cfg);
                int tmp_reg = mono_alloc_freg (cfg);
@@ -2162,8 +2159,14 @@ mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins)
                        basereg = mono_alloc_ireg (cfg);
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_IADD_IMM, basereg, cfg->frame_reg, offset);
                }
+#if G_BYTE_ORDER == G_BIG_ENDIAN
                MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI4_MEMBASE_REG, basereg, offset, msw_reg);
                MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI4_MEMBASE_REG, basereg, offset + 4, ins->sreg1);
+#else
+               // For little endian the words are reversed
+               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI4_MEMBASE_REG, basereg, offset + 4, msw_reg);
+               MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI4_MEMBASE_REG, basereg, offset, ins->sreg1);
+#endif
                MONO_EMIT_NEW_LOAD_R8 (cfg, adj_reg, &adjust_val);
                MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADR8_MEMBASE, tmp_reg, basereg, offset);
                MONO_EMIT_NEW_BIALU (cfg, OP_FSUB, ins->dreg, tmp_reg, adj_reg);
@@ -2213,7 +2216,11 @@ mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins)
                        MONO_EMIT_NEW_BIALU_IMM (cfg, OP_IADD_IMM, basereg, cfg->frame_reg, offset);
                }
                MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORER8_MEMBASE_REG, basereg, offset, ins->sreg1);
+#if G_BYTE_ORDER == G_BIG_ENDIAN
                MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, msw_reg, basereg, offset);
+#else
+               MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, msw_reg, basereg, offset+4);
+#endif
                MONO_EMIT_NEW_UNALU (cfg, OP_CHECK_FINITE, -1, msw_reg);
                MONO_EMIT_NEW_UNALU (cfg, OP_FMOVE, ins->dreg, ins->sreg1);
                ins->opcode = OP_NOP;
index dc83f788509399e4f201a71dc391d4aa4f971c59..0c611f251a54f7e70eb00d4d4671301c648dfb55 100644 (file)
@@ -145,6 +145,7 @@ typedef struct MonoCompileArch {
 #define PPC_LAST_FPARG_REG ppc_f13
 #define PPC_PASS_STRUCTS_BY_VALUE 1
 #define PPC_THREAD_PTR_REG ppc_r13
+#define MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX 1
 #else
 #define PPC_RET_ADDR_OFFSET 4
 #define PPC_STACK_PARAM_OFFSET 8
index 615d56bcc33a2fcb356c4fa794a6c23eb4d27966..b597688610482ec362dd8d1ea444b0caed4c75ab 100644 (file)
@@ -260,7 +260,7 @@ mono_print_method_from_ip (void *ip)
        gsctx = mono_jit_info_get_generic_sharing_context (ji);
        shared_type = "";
        if (gsctx) {
-               if (gsctx->var_is_vt || gsctx->mvar_is_vt)
+               if (gsctx->is_gsharedvt)
                        shared_type = "gsharedvt ";
                else
                        shared_type = "gshared ";
@@ -1591,62 +1591,7 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code,
        case MONO_PATCH_INFO_NONE:
                break;
        case MONO_PATCH_INFO_RGCTX_FETCH: {
-               MonoJumpInfoRgctxEntry *entry = patch_info->data.rgctx_entry;
-               guint32 slot = -1;
-
-               switch (entry->data->type) {
-               case MONO_PATCH_INFO_CLASS:
-                       slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, &entry->data->data.klass->byval_arg, entry->info_type, mono_method_get_context (entry->method));
-                       break;
-               case MONO_PATCH_INFO_METHOD:
-               case MONO_PATCH_INFO_METHODCONST:
-                       slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, entry->data->data.method, entry->info_type, mono_method_get_context (entry->method));
-                       break;
-               case MONO_PATCH_INFO_FIELD:
-                       slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, entry->data->data.field, entry->info_type, mono_method_get_context (entry->method));
-                       break;
-               case MONO_PATCH_INFO_SIGNATURE:
-                       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 = 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->num_entries = oinfo->num_entries;
-                       info->entries = g_malloc0 (sizeof (MonoRuntimeGenericContextInfoTemplate) * info->num_entries);
-                       for (i = 0; i < oinfo->num_entries; ++i) {
-                               MonoRuntimeGenericContextInfoTemplate *otemplate = &oinfo->entries [i];
-                               MonoRuntimeGenericContextInfoTemplate *template = &info->entries [i];
-
-                               memcpy (template, otemplate, sizeof (MonoRuntimeGenericContextInfoTemplate));
-                       }
-                       slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, info, entry->info_type, mono_method_get_context (entry->method));
-                       break;
-               }
-               case MONO_PATCH_INFO_VIRT_METHOD: {
-                       MonoJumpInfoVirtMethod *info;
-                       MonoJumpInfoVirtMethod *oinfo = entry->data->data.virt_method;
-
-                       info = g_malloc0 (sizeof (MonoJumpInfoVirtMethod));
-                       memcpy (info, oinfo, sizeof (MonoJumpInfoVirtMethod));
-                       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;
-               }
+               int slot = mini_get_rgctx_entry_slot (patch_info->data.rgctx_entry);
 
                target = mono_create_rgctx_lazy_fetch_trampoline (slot);
                break;
@@ -1741,34 +1686,21 @@ mini_init_gsctx (MonoDomain *domain, MonoMemPool *mp, MonoGenericContext *contex
 
        if (context && context->class_inst) {
                inst = context->class_inst;
-               if (domain)
-                       gsctx->var_is_vt = mono_domain_alloc0 (domain, sizeof (gboolean) * inst->type_argc);
-               else if (mp)
-                       gsctx->var_is_vt = mono_mempool_alloc0 (mp, sizeof (gboolean) * inst->type_argc);
-               else
-                       gsctx->var_is_vt = g_new0 (gboolean, inst->type_argc);
-
                for (i = 0; i < inst->type_argc; ++i) {
                        MonoType *type = inst->type_argv [i];
 
                        if (mini_is_gsharedvt_gparam (type))
-                               gsctx->var_is_vt [i] = TRUE;
+                               gsctx->is_gsharedvt = TRUE;
                }
        }
        if (context && context->method_inst) {
                inst = context->method_inst;
-               if (domain)
-                       gsctx->mvar_is_vt = mono_domain_alloc0 (domain, sizeof (gboolean) * inst->type_argc);
-               else if (mp)
-                       gsctx->mvar_is_vt = mono_mempool_alloc0 (mp, sizeof (gboolean) * inst->type_argc);
-               else
-                       gsctx->mvar_is_vt = g_new0 (gboolean, inst->type_argc);
 
                for (i = 0; i < inst->type_argc; ++i) {
                        MonoType *type = inst->type_argv [i];
 
                        if (mini_is_gsharedvt_gparam (type))
-                               gsctx->mvar_is_vt [i] = TRUE;
+                               gsctx->is_gsharedvt = TRUE;
                }
        }
 }
@@ -2242,10 +2174,11 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
                                        return NULL;
                                } else {
                                        mono_raise_exception (jit_ex);
+                                       /* coverity[unreachable] */
                                }
                        }
 
-                       info->compiled_method = mini_add_method_trampoline (NULL, callee, info->compiled_method, mono_method_needs_static_rgctx_invoke (callee, FALSE), FALSE);
+                       info->compiled_method = mini_add_method_trampoline (callee, info->compiled_method, mono_method_needs_static_rgctx_invoke (callee, TRUE), FALSE);
                } else {
                        info->compiled_method = NULL;
                }
@@ -2633,10 +2566,6 @@ mono_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *met
        if (!method)
                return NULL;
 
-       /* FIXME Support more cases */
-       if (mono_aot_only)
-               return NULL;
-
        if (MONO_TYPE_ISSTRUCT (sig->ret))
                return NULL;
 
@@ -2674,7 +2603,17 @@ mono_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *met
        if (cache [idx])
                return cache [idx];
 
-       return cache [idx] = mono_arch_get_delegate_virtual_invoke_impl (sig, method, offset, load_imt_reg);
+       /* FIXME Support more cases */
+       if (mono_aot_only) {
+               char tramp_name [256];
+
+               sprintf (tramp_name, "delegate_virtual_invoke%s_%d", load_imt_reg ? "_imt" : "", offset / SIZEOF_VOID_P);
+               cache [idx] = mono_aot_get_trampoline (tramp_name);
+               g_assert (cache [idx]);
+       } else {
+               cache [idx] = mono_arch_get_delegate_virtual_invoke_impl (sig, method, offset, load_imt_reg);
+       }
+       return cache [idx];
 }
 
 static gpointer
@@ -3417,6 +3356,8 @@ register_icalls (void)
        register_icall (mono_object_castclass_with_cache, "mono_object_castclass_with_cache", "object object ptr ptr", FALSE);
        register_icall (mono_object_isinst_with_cache, "mono_object_isinst_with_cache", "object object ptr ptr", FALSE);
        register_icall (mono_generic_class_init, "mono_generic_class_init", "void ptr", FALSE);
+       register_icall (mono_fill_class_rgctx, "mono_class_fill_rgctx", "ptr ptr int", FALSE);
+       register_icall (mono_fill_method_rgctx, "mono_method_fill_rgctx", "ptr ptr int", FALSE);
 
        register_icall (mono_debugger_agent_user_break, "mono_debugger_agent_user_break", "void", FALSE);
        register_dyn_icall (mono_create_specific_trampoline (NULL, MONO_TRAMPOLINE_GENERIC_CLASS_INIT, mono_get_root_domain (), NULL),
@@ -3511,6 +3452,7 @@ mini_cleanup (MonoDomain *domain)
 
 #ifndef MONO_CROSS_COMPILE
        mono_domain_free (domain, TRUE);
+       mono_gc_mutex_cleanup ();
 #endif
 
 #ifdef ENABLE_LLVM
index 7e2b103cf4cdce859a8f291a04efef10a5924e81..4173a9d47a3d7a0a660ff3fcc48a3e260c99bd8e 100644 (file)
@@ -1221,6 +1221,26 @@ handle_enum:
                }
        }
                break;
+       case MONO_TYPE_GENERICINST: {
+               printf("[GENERICINST]\n");
+       }
+               break;
+       case MONO_TYPE_MVAR: {
+               printf("[MVAR]\n");
+       }
+               break;
+       case MONO_TYPE_CMOD_REQD: {
+               printf("[CMOD_REQD]\n");
+       }
+               break;
+       case MONO_TYPE_CMOD_OPT: {
+               printf("[CMOD_OPT]\n");
+       }
+               break;
+       case MONO_TYPE_INTERNAL: {
+               printf("[INTERNAL]\n");
+       }
+               break;
        default:
                printf ("(unknown return type %x)", 
                        mono_method_signature (method)->ret->type);
@@ -2838,15 +2858,20 @@ emit_float_to_int (MonoCompile *cfg, guchar *code, int dreg, int sreg, int size,
        if (is_signed) {
                s390_cgdbr (code, dreg, 5, sreg);
                switch (size) {
-                       case 1:
-                               s390_lghi (code, s390_r0, 0);
-                               s390_lghi (code, s390_r13, 0xff);
-                               s390_ltgr (code, dreg, dreg);
-                               s390_jnl  (code, 4);
-                               s390_lghi (code, s390_r0, 0x80);
-                               s390_ngr  (code, dreg, s390_r13);
-                               s390_ogr  (code, dreg, s390_r0);
-                               break;
+               case 1:
+                       s390_ltgr (code, dreg, dreg);
+                       s390_jnl  (code, 4);
+                       s390_oill (code, dreg, 0x80);
+                       s390_lghi (code, s390_r0, 0xff);
+                       s390_ngr  (code, dreg, s390_r0);
+                       break;
+               case 2:
+                       s390_ltgr (code, dreg, dreg);
+                       s390_jnl  (code, 4);
+                       s390_oill (code, dreg, 0x8000);
+                       s390_llill(code, s390_r0, 0xffff);
+                       s390_ngr  (code, dreg, s390_r0);
+                       break;
                }
        } else {
                short *o[1];
@@ -2863,15 +2888,14 @@ emit_float_to_int (MonoCompile *cfg, guchar *code, int dreg, int sreg, int size,
                PTRSLOT (code, o[0]);
                s390_cfdbr  (code, dreg, 5, sreg);
                switch (size) {
-                       case 1: 
-                               s390_lghi (code, s390_r0, 0xff);
-                               s390_ngr  (code, dreg, s390_r0);
-                               break;
-                       case 2:
-                               s390_lghi (code, s390_r0, -1);
-                               s390_srlg (code, s390_r0, s390_r0, 0, 16);
-                               s390_ngr  (code, dreg, s390_r0);
-                               break;
+               case 1: 
+                       s390_lghi (code, s390_r0, 0xff);
+                       s390_ngr  (code, dreg, s390_r0);
+                       break;
+               case 2:
+                       s390_llill(code, s390_r0, 0xffff);
+                       s390_ngr  (code, dreg, s390_r0);
+                       break;
                }
        }
        return code;
@@ -4123,7 +4147,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_GENERIC_CLASS_INIT: {
                        static int byte_offset = -1;
                        static guint8 bitmask;
-                       guint16 *jump;
+                       short int *jump;
 
                        g_assert (ins->sreg1 == S390_FIRST_ARG_REG);
 
@@ -4313,21 +4337,30 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                }
                        break;
                case OP_ICONV_TO_R_UN: {
-                       s390_cdfbr (code, ins->dreg, ins->sreg1);
-                       s390_ltr   (code, ins->sreg1, ins->sreg1);
-                       s390_jnl   (code, 8);
-                       S390_SET   (code, s390_r13, 0x41f0000000000000llu);
-                       s390_ldgr  (code, s390_f15, s390_r13);
-                       s390_adbr  (code, ins->dreg, s390_f15);
+                       if (facs.fpe) {
+                               s390_cdlfbr (code, ins->dreg, 5, ins->sreg1, 0);
+                       } else {
+                               s390_llgfr (code, s390_r0, ins->sreg1);
+                               s390_cdgbr (code, ins->dreg, s390_r0);
+                       }
                }
                        break;
                case OP_LCONV_TO_R_UN: {
-                       s390_cdgbr (code, ins->dreg, ins->sreg1);
-                       s390_ltgr  (code, ins->sreg1, ins->sreg1);
-                       s390_jnl   (code, 8);
-                       S390_SET   (code, s390_r13, 0x41f0000000000000llu);
-                       s390_ldgr  (code, s390_f15, s390_r13);
-                       s390_adbr  (code, ins->dreg, s390_f15);
+                       if (facs.fpe) {
+                               s390_cdlgbr (code, ins->dreg, 5, ins->sreg1, 0);
+                       } else {
+                               short int *jump;
+                               s390_cxgbr (code, s390_f12, ins->sreg1);
+                               s390_ltgr  (code, ins->sreg1, ins->sreg1);
+                               s390_jnl   (code, 0); CODEPTR(code, jump);
+                               S390_SET   (code, s390_r13, 0x403f000000000000llu);
+                               s390_lgdr  (code, s390_f13, s390_r13);
+                               s390_lzdr  (code, s390_f15);
+                               s390_axbr  (code, s390_f12, s390_f13);
+                               PTRSLOT(code, jump);
+                               s390_ldxbr (code, s390_f13, s390_f12);
+                               s390_ldr   (code, ins->dreg, s390_f13);
+                       }
                }
                        break;
                case OP_LCONV_TO_R4:
@@ -4342,28 +4375,61 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                }
                        break;
                case OP_FCONV_TO_I1:
-                       code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 1, TRUE);
+                       s390_cgdbr (code, ins->dreg, 5, ins->sreg1);
+                       s390_ltgr  (code, ins->dreg, ins->dreg);
+                       s390_jnl   (code, 4);
+                       s390_oill  (code, ins->dreg, 0x80);
+                       s390_lghi  (code, s390_r0, 0xff);
+                       s390_ngr   (code, ins->dreg, s390_r0);
                        break;
                case OP_FCONV_TO_U1:
-                       code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 1, FALSE);
+                       if (facs.fpe) {
+                               s390_clgdbr (code, ins->dreg, 5, ins->sreg1, 0);
+                               s390_lghi  (code, s390_r0, 0xff);
+                               s390_ngr   (code, ins->dreg, s390_r0);
+                       } else {
+                               code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 1, FALSE);
+                       }
                        break;
                case OP_FCONV_TO_I2:
-                       code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 2, TRUE);
+                       s390_cgdbr (code, ins->dreg, 5, ins->sreg1);
+                       s390_ltgr  (code, ins->dreg, ins->dreg);
+                       s390_jnl   (code, 4);
+                       s390_oill  (code, ins->dreg, 0x8000);
+                       s390_llill (code, s390_r0, 0xffff);
+                       s390_ngr   (code, ins->dreg, s390_r0);
                        break;
                case OP_FCONV_TO_U2:
-                       code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 2, FALSE);
+                       if (facs.fpe) {
+                               s390_clgdbr (code, ins->dreg, 5, ins->sreg1, 0);
+                               s390_llill  (code, s390_r0, 0xffff);
+                               s390_ngr    (code, ins->dreg, s390_r0);
+                       } else {
+                               code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 2, FALSE);
+                       }
                        break;
                case OP_FCONV_TO_I4:
                case OP_FCONV_TO_I:
-                       code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 4, TRUE);
+                       s390_cfdbr (code, ins->dreg, 5, ins->sreg1);
                        break;
                case OP_FCONV_TO_U4:
                case OP_FCONV_TO_U:
-                       code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 4, FALSE);
+                       if (facs.fpe) {
+                               s390_clfdbr (code, ins->dreg, 5, ins->sreg1, 0);
+                       } else {
+                               code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 4, FALSE);
+                       }
                        break;
                case OP_FCONV_TO_I8:
                        s390_cgdbr (code, ins->dreg, 5, ins->sreg1);
                        break;
+               case OP_FCONV_TO_U8:
+                       if (facs.fpe) {
+                               s390_clgdbr (code, ins->dreg, 5, ins->sreg1, 0);
+                       } else {
+                               code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 8, FALSE);
+                       }
+                       break;
                case OP_LCONV_TO_OVF_I: {
                        /* Valid ints: 0xffffffff:8000000 to 00000000:0x7f000000 */
                        short int *o[5];
index 085f56141f9063ad49d1b5f9acdf379efc724511..838097abb2a54a63f664470145bd970ceb88e338 100644 (file)
@@ -139,106 +139,108 @@ mono_create_static_rgctx_trampoline (MonoMethod *m, gpointer addr)
 }
 #endif
 
+#if 0
+#define DEBUG_IMT(stmt) do { stmt; } while (0)
+#else
+#define DEBUG_IMT(stmt) do { } while (0)
+#endif
+
 /*
- * Either IMPL_METHOD or AOT_ADDR will be set on return.
+ * mini_resolve_imt_method:
  *
- * MONO_NEVER_INLINE :
- * This works against problems when compiling with gcc 4.6 on arm. The 'then' part of
- * this line gets executed, even when the condition is false:
- *             if (impl && mono_method_needs_static_rgctx_invoke (impl, FALSE))
- *                     *need_rgctx_tramp = TRUE;
+ *   Resolve the actual method called when making an IMT call through VTABLE_SLOT with IMT_METHOD as the interface method.
+ *
+ * Either IMPL_METHOD or OUT_AOT_ADDR will be set on return.
  */
-static MONO_NEVER_INLINE gpointer*
-mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *code, MonoMethod *method, gboolean lookup_aot, MonoMethod **impl_method, gboolean *need_rgctx_tramp, gboolean *variance_used, gpointer *aot_addr)
+gpointer*
+mini_resolve_imt_method (MonoVTable *vt, gpointer *vtable_slot, MonoMethod *imt_method, MonoMethod **impl_method, gpointer *out_aot_addr, gboolean *out_need_rgctx_tramp, MonoMethod **variant_iface)
 {
-       MonoObject *this_argument = mono_arch_get_this_arg_from_call (regs, code);
-       MonoVTable *vt = this_argument->vtable;
-       int displacement = slot - ((gpointer*)vt);
-
-       if (displacement > 0) {
-               /* slot is in the vtable, not in the IMT */
-#if DEBUG_IMT
-               printf ("mono_convert_imt_slot_to_vtable_slot: slot %p is in the vtable, not in the IMT\n", slot);
-#endif
-               return slot;
-       } else {
-               MonoMethod *imt_method = mono_arch_find_imt_method (regs, code);
-               MonoMethod *impl;
-               int interface_offset;
-               int imt_slot = MONO_IMT_SIZE + displacement;
-
-               /*This has to be variance aware since imt_method can be from an interface that vt->klass doesn't directly implement*/
-               interface_offset = mono_class_interface_offset_with_variance (vt->klass, imt_method->klass, variance_used);
-
-               if (interface_offset < 0) {
-                       g_error ("%s doesn't implement interface %s\n", mono_type_get_name_full (&vt->klass->byval_arg, 0), mono_type_get_name_full (&imt_method->klass->byval_arg, 0));
-               }
-               mono_vtable_build_imt_slot (vt, mono_method_get_imt_slot (imt_method));
+       MonoMethod *impl = NULL, *generic_virtual = NULL;
+       gboolean lookup_aot, variance_used = FALSE, need_rgctx_tramp = FALSE;
+       gpointer addr;
+       guint8 *aot_addr = NULL;
+       int displacement = vtable_slot - ((gpointer*)vt);
+       int interface_offset;
+       int imt_slot = MONO_IMT_SIZE + displacement;
+
+       g_assert (imt_slot < MONO_IMT_SIZE);
+
+       /* This has to be variance aware since imt_method can be from an interface that vt->klass doesn't directly implement */
+       interface_offset = mono_class_interface_offset_with_variance (vt->klass, imt_method->klass, &variance_used);
+       if (interface_offset < 0)
+               g_error ("%s doesn't implement interface %s\n", mono_type_get_name_full (&vt->klass->byval_arg, 0), mono_type_get_name_full (&imt_method->klass->byval_arg, 0));
+
+       *variant_iface = NULL;
+       if (imt_method->is_inflated && ((MonoMethodInflated*)imt_method)->context.method_inst) {
+               /* Generic virtual method */
+               generic_virtual = imt_method;
+               need_rgctx_tramp = TRUE;
+       } else if (variance_used && mono_class_has_variant_generic_params (imt_method->klass)) {
+               *variant_iface = imt_method;
+       }
 
-               if (imt_method->is_inflated && ((MonoMethodInflated*)imt_method)->context.method_inst) {
-                       MonoError error;
-                       MonoGenericContext context = { NULL, NULL };
+       addr = NULL;
+       /* We can only use the AOT compiled code if we don't require further processing */
+       lookup_aot = !generic_virtual & !variant_iface;
 
-                       /* 
-                        * Generic virtual method, imt_method contains the inflated interface 
-                        * method, need to get the inflated impl method.
-                        */
-                       /* imt_method->slot might not be set */
-                       impl = mono_class_get_vtable_entry (vt->klass, interface_offset + mono_method_get_declaring_generic_method (imt_method)->slot);
+       mono_vtable_build_imt_slot (vt, mono_method_get_imt_slot (imt_method));
 
-                       if (impl->klass->generic_class)
-                               context.class_inst = impl->klass->generic_class->context.class_inst;
-                       context.method_inst = ((MonoMethodInflated*)imt_method)->context.method_inst;
-                       impl = mono_class_inflate_generic_method_checked (impl, &context, &error);
-                       g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
-               } else {
-                       /* Avoid loading metadata or creating a generic vtable if possible */
-                       if (lookup_aot && !vt->klass->valuetype)
-                               *aot_addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, interface_offset + mono_method_get_vtable_slot (imt_method));
-                       else
-                               *aot_addr = NULL;
-                       if (*aot_addr)
-                               impl = NULL;
-                       else
-                               impl = mono_class_get_vtable_entry (vt->klass, interface_offset + mono_method_get_vtable_slot (imt_method));
-               }
+       if (imt_method->is_inflated && ((MonoMethodInflated*)imt_method)->context.method_inst) {
+               MonoError error;
+               MonoGenericContext context = { NULL, NULL };
 
-               if (impl && mono_method_needs_static_rgctx_invoke (impl, FALSE))
-                       *need_rgctx_tramp = TRUE;
-               if (impl && impl->wrapper_type == MONO_WRAPPER_MANAGED_TO_MANAGED) {
-                       WrapperInfo *info = mono_marshal_get_wrapper_info (impl);
+               /*
+                * Generic virtual method, imt_method contains the inflated interface
+                * method, need to get the inflated impl method.
+                */
+               /* imt_method->slot might not be set */
+               impl = mono_class_get_vtable_entry (vt->klass, interface_offset + mono_method_get_declaring_generic_method (imt_method)->slot);
 
-                       if (info && info->subtype == WRAPPER_SUBTYPE_GENERIC_ARRAY_HELPER) {
-                               *need_rgctx_tramp = TRUE;
-                       }
-               }
+               if (impl->klass->generic_class)
+                       context.class_inst = impl->klass->generic_class->context.class_inst;
+               context.method_inst = ((MonoMethodInflated*)imt_method)->context.method_inst;
+               impl = mono_class_inflate_generic_method_checked (impl, &context, &error);
+               g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
+       } else {
+               /* Avoid loading metadata or creating a generic vtable if possible */
+               if (lookup_aot && !vt->klass->valuetype)
+                       aot_addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, interface_offset + mono_method_get_vtable_slot (imt_method));
+               else
+                       aot_addr = NULL;
+               if (aot_addr)
+                       impl = NULL;
+               else
+                       impl = mono_class_get_vtable_entry (vt->klass, interface_offset + mono_method_get_vtable_slot (imt_method));
+       }
 
-               *impl_method = impl;
-#if DEBUG_IMT
-               printf ("mono_convert_imt_slot_to_vtable_slot: method = %s.%s.%s, imt_method = %s.%s.%s\n",
-                               method->klass->name_space, method->klass->name, method->name, 
-                               imt_method->klass->name_space, imt_method->klass->name, imt_method->name);
-#endif
+       if (impl && mono_method_needs_static_rgctx_invoke (impl, FALSE))
+               need_rgctx_tramp = TRUE;
+       if (impl && impl->wrapper_type == MONO_WRAPPER_MANAGED_TO_MANAGED) {
+               WrapperInfo *info = mono_marshal_get_wrapper_info (impl);
 
-               g_assert (imt_slot < MONO_IMT_SIZE);
-               if (vt->imt_collisions_bitmap & (1 << imt_slot)) {
-                       int slot = mono_method_get_vtable_index (imt_method);
-                       int vtable_offset;
-                       gpointer *vtable_slot;
-
-                       g_assert (slot != -1);
-                       vtable_offset = interface_offset + slot;
-                       vtable_slot = & (vt->vtable [vtable_offset]);
-#if DEBUG_IMT
-                       printf ("mono_convert_imt_slot_to_vtable_slot: slot %p[%d] is in the IMT, and colliding becomes %p[%d] (interface_offset = %d, method->slot = %d)\n", slot, imt_slot, vtable_slot, vtable_offset, interface_offset, imt_method->slot);
-#endif
-                       return vtable_slot;
-               } else {
-#if DEBUG_IMT
-                       printf ("mono_convert_imt_slot_to_vtable_slot: slot %p[%d] is in the IMT, but not colliding\n", slot, imt_slot);
-#endif
-                       return slot;
-               }
+               if (info && info->subtype == WRAPPER_SUBTYPE_GENERIC_ARRAY_HELPER)
+                       need_rgctx_tramp = TRUE;
+       }
+       *impl_method = impl;
+       *out_need_rgctx_tramp = need_rgctx_tramp;
+       *out_aot_addr = aot_addr;
+
+       DEBUG_IMT (printf ("mono_convert_imt_slot_to_vtable_slot: method = %s.%s.%s, imt_method = %s.%s.%s\n",
+                                          method->klass->name_space, method->klass->name, method->name,
+                                          imt_method->klass->name_space, imt_method->klass->name, imt_method->name));
+
+       if (vt->imt_collisions_bitmap & (1 << imt_slot)) {
+               int slot = mono_method_get_vtable_index (imt_method);
+               int vtable_offset;
+
+               g_assert (slot != -1);
+               vtable_offset = interface_offset + slot;
+               vtable_slot = & (vt->vtable [vtable_offset]);
+               DEBUG_IMT (printf ("mono_convert_imt_slot_to_vtable_slot: slot %p[%d] is in the IMT, and colliding becomes %p[%d] (interface_offset = %d, method->slot = %d)\n", slot, imt_slot, vtable_slot, vtable_offset, interface_offset, imt_method->slot));
+               return vtable_slot;
+       } else {
+               DEBUG_IMT (printf ("mono_convert_imt_slot_to_vtable_slot: slot %p[%d] is in the IMT, but not colliding\n", slot, imt_slot));
+               return vtable_slot;
        }
 }
 
@@ -269,8 +271,7 @@ is_generic_method_definition (MonoMethod *m)
 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))
+       if (ji && ji->has_generic_jit_info && (mono_jit_info_get_generic_sharing_context (ji)->is_gsharedvt))
                return TRUE;
        else
                return FALSE;
@@ -278,7 +279,6 @@ mini_jit_info_is_gsharedvt (MonoJitInfo *ji)
 
 /**
  * mini_add_method_trampoline:
- * @orig_method: the method the caller originally called i.e. an iface method, or NULL.
  * @m: 
  * @compiled_method:
  * @add_static_rgctx_tramp: adds a static rgctx trampoline
@@ -291,7 +291,7 @@ mini_jit_info_is_gsharedvt (MonoJitInfo *ji)
  * is needed.
  */
 gpointer
-mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp)
+mini_add_method_trampoline (MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp)
 {
        gpointer addr = compiled_method;
        gboolean callee_gsharedvt, callee_array_helper;
@@ -323,9 +323,6 @@ mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer com
                }
        }
 
-       if (!orig_method)
-               orig_method = m;
-
        if (callee_gsharedvt)
                g_assert (m->is_inflated);
 
@@ -386,66 +383,56 @@ mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer com
  * from JITted and LLVM compiled code.
  */
 static gpointer
-common_call_trampoline_inner (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tramp, MonoVTable *vt, gpointer *vtable_slot, gboolean need_rgctx_tramp)
+common_call_trampoline_inner (mgreg_t *regs, guint8 *code, MonoMethod *m, MonoVTable *vt, gpointer *vtable_slot)
 {
        gpointer addr, compiled_method;
        gboolean generic_shared = FALSE;
        gboolean need_unbox_tramp = FALSE;
+       gboolean need_rgctx_tramp = FALSE;
        MonoMethod *declaring = NULL;
-       MonoMethod *generic_virtual = NULL, *variant_iface = NULL, *orig_method = NULL;
+       MonoMethod *generic_virtual = NULL, *variant_iface = NULL;
        int context_used;
-       gboolean virtual, variance_used = FALSE;
+       gboolean imt_call, virtual;
        gpointer *orig_vtable_slot, *vtable_slot_to_patch = NULL;
        MonoJitInfo *ji = NULL;
 
-       virtual = (gpointer)vtable_slot > (gpointer)vt;
+       virtual = vt && (gpointer)vtable_slot > (gpointer)vt;
+       imt_call = vt && (gpointer)vtable_slot < (gpointer)vt;
+
+       /*
+        * rgctx trampolines are needed when the call is indirect so the caller can't pass
+        * the rgctx argument needed by the callee.
+        */
+       if (virtual && m)
+               need_rgctx_tramp = mono_method_needs_static_rgctx_invoke (m, FALSE);
 
        orig_vtable_slot = vtable_slot;
        vtable_slot_to_patch = vtable_slot;
 
        /* IMT call */
-       if (vt && (gpointer)vtable_slot < (gpointer)vt) {
-               MonoMethod *impl_method = NULL;
+       if (imt_call) {
+               MonoMethod *imt_method = NULL, *impl_method = NULL;
                MonoObject *this_arg;
 
-               /* we get the interface method because mono_convert_imt_slot_to_vtable_slot ()
-                * needs the signature to be able to find the this argument
-                */
-               m = mono_arch_find_imt_method (regs, code);
-               vtable_slot = orig_vtable_slot;
                g_assert (vtable_slot);
 
-               orig_method = m;
-
+               imt_method = mono_arch_find_imt_method (regs, code);
                this_arg = mono_arch_get_this_arg_from_call (regs, code);
 
                if (mono_object_is_transparent_proxy (this_arg)) {
                        /* Use the slow path for now */
-                   m = mono_object_get_virtual_method (this_arg, m);
+                   m = mono_object_get_virtual_method (this_arg, imt_method);
                        vtable_slot_to_patch = NULL;
                } else {
-                       gboolean lookup_aot;
-
-                       mono_class_interface_offset_with_variance (vt->klass, m->klass, &variance_used);
-
-                       if (m->is_inflated && ((MonoMethodInflated*)m)->context.method_inst) {
+                       if (imt_method->is_inflated && ((MonoMethodInflated*)imt_method)->context.method_inst) {
                                /* Generic virtual method */
-                               generic_virtual = m;
+                               generic_virtual = imt_method;
                                need_rgctx_tramp = TRUE;
-                       } else if (variance_used && mono_class_has_variant_generic_params (m->klass)) {
-                               variant_iface = m;
                        }
 
-                       addr = NULL;
-                       /* We can only use the AOT compiled code if we don't require further processing */
-                       lookup_aot = !generic_virtual & !variant_iface;
-                       vtable_slot = mono_convert_imt_slot_to_vtable_slot (vtable_slot, regs, code, m, lookup_aot, &impl_method, &need_rgctx_tramp, &variance_used, &addr);
+                       vtable_slot = mini_resolve_imt_method (vt, vtable_slot, imt_method, &impl_method, &addr, &need_rgctx_tramp, &variant_iface);
                        /* This is the vcall slot which gets called through the IMT thunk */
                        vtable_slot_to_patch = vtable_slot;
-                       /* mono_convert_imt_slot_to_vtable_slot () also gives us the method that is supposed
-                        * to be called, so we compile it and go ahead as usual.
-                        */
-                       /*g_print ("imt found method %p (%s) at %p\n", impl_method, impl_method->name, code);*/
 
                        if (addr) {
                                /*
@@ -481,10 +468,9 @@ common_call_trampoline_inner (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8
                        g_assert (!m->klass->generic_container);
 
                generic_virtual = mono_arch_find_imt_method (regs, code);
-               if (generic_virtual) {
-                       g_assert (generic_virtual->is_inflated);
-                       context.method_inst = ((MonoMethodInflated*)generic_virtual)->context.method_inst;
-               }
+               g_assert (generic_virtual);
+               g_assert (generic_virtual->is_inflated);
+               context.method_inst = ((MonoMethodInflated*)generic_virtual)->context.method_inst;
 
                m = mono_class_inflate_generic_method_checked (declaring, &context, &error);
                g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
@@ -501,23 +487,18 @@ common_call_trampoline_inner (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8
 
                g_assert (code);
 
+               /*
+                * The caller is gshared code, compute the actual method to call from M and this/rgctx.
+                */
                if (m->is_inflated && mono_method_get_context (m)->method_inst) {
-#ifdef MONO_ARCH_RGCTX_REG
                        MonoMethodRuntimeGenericContext *mrgctx = (MonoMethodRuntimeGenericContext*)mono_arch_find_static_call_vtable (regs, code);
 
                        klass = mrgctx->class_vtable->klass;
                        method_inst = mrgctx->method_inst;
-#else
-                       g_assert_not_reached ();
-#endif
                } else if ((m->flags & METHOD_ATTRIBUTE_STATIC) || m->klass->valuetype) {
-#ifdef MONO_ARCH_RGCTX_REG
                        MonoVTable *vtable = mono_arch_find_static_call_vtable (regs, code);
 
                        klass = vtable->klass;
-#else
-                       g_assert_not_reached ();
-#endif
                } else {
                        MonoObject *this_argument = mono_arch_get_this_arg_from_call (regs, code);
 
@@ -525,7 +506,6 @@ common_call_trampoline_inner (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8
                        vtable_slot = orig_vtable_slot;
 
                        g_assert (this_argument->vtable->klass->inited);
-                       //mono_class_init (this_argument->vtable->klass);
 
                        if (!vtable_slot) {
                                mono_class_setup_supertypes (this_argument->vtable->klass);
@@ -598,7 +578,7 @@ common_call_trampoline_inner (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8
                        need_unbox_tramp = TRUE;
        }
 
-       addr = mini_add_method_trampoline (orig_method, m, compiled_method, need_rgctx_tramp, need_unbox_tramp);
+       addr = mini_add_method_trampoline (m, compiled_method, need_rgctx_tramp, need_unbox_tramp);
 
        if (generic_virtual || variant_iface) {
                MonoMethod *target = generic_virtual ? generic_virtual : variant_iface;
@@ -648,8 +628,7 @@ common_call_trampoline_inner (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8
                        g_assert (*vtable_slot_to_patch);
                        *vtable_slot_to_patch = mono_get_addr_from_ftnptr (addr);
                }
-       }
-       else {
+       } else {
                guint8 *plt_entry = mono_aot_get_plt_entry (code);
                gboolean no_patch = FALSE;
                MonoJitInfo *target_ji;
@@ -698,12 +677,12 @@ common_call_trampoline_inner (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8
 }
 
 static gpointer
-common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tramp, MonoVTable *vt, gpointer *vtable_slot, gboolean need_rgctx_tramp)
+common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, MonoVTable *vt, gpointer *vtable_slot)
 {
        gpointer res;
-       MONO_PREPARE_RESET_BLOCKING
-       res = common_call_trampoline_inner (regs, code, m, tramp, vt, vtable_slot, need_rgctx_tramp);
-       MONO_FINISH_RESET_BLOCKING
+       MONO_PREPARE_RESET_BLOCKING;
+       res = common_call_trampoline_inner (regs, code, m, vt, vtable_slot);
+       MONO_FINISH_RESET_BLOCKING;
        return res;
 }
 
@@ -717,7 +696,7 @@ mono_magic_trampoline (mgreg_t *regs, guint8 *code, gpointer arg, guint8* tramp)
 {
        trampoline_calls ++;
 
-       return common_call_trampoline (regs, code, arg, tramp, NULL, NULL, FALSE);
+       return common_call_trampoline (regs, code, arg, NULL, NULL);
 }
 
 /**
@@ -732,7 +711,6 @@ mono_vcall_trampoline (mgreg_t *regs, guint8 *code, int slot, guint8 *tramp)
        MonoVTable *vt;
        gpointer *vtable_slot;
        MonoMethod *m;
-       gboolean need_rgctx_tramp = FALSE;
        gpointer addr;
 
        trampoline_calls ++;
@@ -780,17 +758,14 @@ mono_vcall_trampoline (mgreg_t *regs, guint8 *code, int slot, guint8 *tramp)
                 * trustworthy.
                 */
                m = mono_class_get_vtable_entry (vt->klass, slot);
-
-               need_rgctx_tramp = mono_method_needs_static_rgctx_invoke (m, 0);
        } else {
                /* IMT call */
                vtable_slot = &(((gpointer*)vt) [slot]);
 
                m = NULL;
-               need_rgctx_tramp = FALSE;
        }
 
-       return common_call_trampoline (regs, code, m, tramp, vt, vtable_slot, need_rgctx_tramp);
+       return common_call_trampoline (regs, code, m, vt, vtable_slot);
 }
 
 #ifndef DISABLE_REMOTING
@@ -957,9 +932,9 @@ mono_rgctx_lazy_fetch_trampoline (mgreg_t *regs, guint8 *code, gpointer data, gu
        num_lookups++;
 
        if (mrgctx)
-               return mono_method_fill_runtime_generic_context (arg, code, index);
+               return mono_method_fill_runtime_generic_context (arg, index);
        else
-               return mono_class_fill_runtime_generic_context (arg, code, index);
+               return mono_class_fill_runtime_generic_context (arg, index);
 }
 
 void
@@ -1153,7 +1128,7 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr
                        delegate->method_ptr = *delegate->method_code;
                } else {
                        compiled_method = addr = mono_compile_method (method);
-                       addr = mini_add_method_trampoline (NULL, method, compiled_method, need_rgctx_tramp, need_unbox_tramp);
+                       addr = mini_add_method_trampoline (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;
@@ -1179,7 +1154,7 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr
                /* The general, unoptimized case */
                m = mono_marshal_get_delegate_invoke (invoke, delegate);
                code = mono_compile_method (m);
-               code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE);
+               code = mini_add_method_trampoline (m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE);
        }
 
        delegate->invoke_impl = mono_get_addr_from_ftnptr (code);
@@ -1822,7 +1797,9 @@ mini_get_nullified_class_init_trampoline (void)
                MonoTrampInfo *info;
 
                if (mono_aot_only) {
-                       tramp = mono_aot_get_trampoline ("nullified_class_init_trampoline");
+                       /* Not used */
+                       g_assert_not_reached ();
+                       tramp = NULL;
                } else {
                        tramp = mono_arch_get_nullified_class_init_trampoline (&info);
                        mono_tramp_info_register (info);
index 53e5d6fbbd100281e84f66b44ab3ee564b0ac1b2..b53f0a6bccf2d8fe72bc133dcb9ec66e6e163812 100644 (file)
@@ -6161,6 +6161,42 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
        return start;
 }
 
+#define MAX_VIRTUAL_DELEGATE_OFFSET 32
+
+static gpointer
+get_delegate_virtual_invoke_impl (gboolean load_imt_reg, int offset, guint32 *code_size)
+{
+       guint8 *code, *start;
+       int size = 24;
+
+       /*
+        * The stack contains:
+        * <delegate>
+        * <return addr>
+        */
+       start = code = mono_global_codeman_reserve (size);
+
+       /* Replace the this argument with the target */
+       x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
+       x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 4);
+       x86_mov_membase_reg (code, X86_ESP, 4, X86_ECX, 4);
+
+       if (load_imt_reg) {
+               /* Load the IMT reg */
+               x86_mov_reg_membase (code, MONO_ARCH_IMT_REG, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, method), 4);
+       }
+
+       /* Load the vtable */
+       x86_mov_reg_membase (code, X86_EAX, X86_ECX, MONO_STRUCT_OFFSET (MonoObject, vtable), 4);
+       x86_jump_membase (code, X86_EAX, offset);
+       mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL);
+
+       if (code_size)
+               *code_size = code - start;
+
+       return start;
+}
+
 GSList*
 mono_arch_get_delegate_invoke_impls (void)
 {
@@ -6180,6 +6216,18 @@ mono_arch_get_delegate_invoke_impls (void)
                g_free (tramp_name);
        }
 
+       for (i = 0; i < MAX_VIRTUAL_DELEGATE_OFFSET; ++i) {
+               code = get_delegate_virtual_invoke_impl (TRUE, i * SIZEOF_VOID_P, &code_len);
+               tramp_name = g_strdup_printf ("delegate_virtual_invoke_imt_%d", i);
+               res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+               g_free (tramp_name);
+
+               code = get_delegate_virtual_invoke_impl (FALSE, i * SIZEOF_VOID_P, &code_len);
+               tramp_name = g_strdup_printf ("delegate_virtual_invoke_%d", i);
+               res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+               g_free (tramp_name);
+       }
+
        return res;
 }
 
@@ -6245,32 +6293,7 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
 gpointer
 mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
 {
-       guint8 *code, *start;
-       int size = 24;
-
-       /*
-        * The stack contains:
-        * <delegate>
-        * <return addr>
-        */
-       start = code = mono_global_codeman_reserve (size);
-
-       /* Replace the this argument with the target */
-       x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
-       x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 4);
-       x86_mov_membase_reg (code, X86_ESP, 4, X86_ECX, 4);
-
-       if (load_imt_reg) {
-               /* Load the IMT reg */
-               x86_mov_reg_membase (code, MONO_ARCH_IMT_REG, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, method), 4);
-       }
-
-       /* Load the vtable */
-       x86_mov_reg_membase (code, X86_EAX, X86_ECX, MONO_STRUCT_OFFSET (MonoObject, vtable), 4);
-       x86_jump_membase (code, X86_EAX, offset);
-       mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL);
-
-       return start;
+       return get_delegate_virtual_invoke_impl (load_imt_reg, offset, NULL);
 }
 
 mgreg_t
index 98f4a155c77178f01a6645aa82045fa399156247..67aea21fee19ed726b0a15176cc95aba0d7f5aca 100644 (file)
@@ -3135,7 +3135,7 @@ mono_insert_safepoints (MonoCompile *cfg)
  * field in the returned struct to see if compilation succeded.
  */
 MonoCompile*
-mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFlags flags, int parts)
+mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFlags flags, int parts, int aot_method_index)
 {
        MonoMethodHeader *header;
        MonoMethodSignature *sig;
@@ -3162,21 +3162,30 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
        if (MONO_METHOD_COMPILE_BEGIN_ENABLED ())
                MONO_PROBE_METHOD_COMPILE_BEGIN (method);
 
+       gsharedvt_method = is_gsharedvt_method (method);
+
        /*
         * In AOT mode, method can be the following:
-        * - the generic method definition. In this case, we are compiling the fully shared
-        *   version of the method, i.e. the version where all the type parameters are
-        *   reference types.
         * - a gsharedvt method.
-        * - a method inflated with type parameters. This is for partial sharing.
+        * - a method inflated with type parameters. This is for ref/partial sharing.
         * - a method inflated with concrete types.
         */
-       if (compile_aot)
-               try_generic_shared = mono_class_generic_sharing_enabled (method->klass) &&
-                       (opts & MONO_OPT_GSHARED) && ((method->is_generic || method->klass->generic_container) || (!method->klass->generic_class && mono_method_is_generic_sharable_full (method, TRUE, FALSE, FALSE)));
-       else
+       if (compile_aot) {
+               if (is_open_method (method)) {
+                       try_generic_shared = TRUE;
+                       method_is_gshared = TRUE;
+               } else {
+                       try_generic_shared = FALSE;
+               }
+               g_assert (opts & MONO_OPT_GSHARED);
+       } else {
                try_generic_shared = mono_class_generic_sharing_enabled (method->klass) &&
                        (opts & MONO_OPT_GSHARED) && mono_method_is_generic_sharable (method, FALSE);
+               if (mini_is_gsharedvt_sharable_method (method)) {
+                       if (!mono_debug_count ())
+                               try_generic_shared = FALSE;
+               }
+       }
 
        /*
        if (try_generic_shared && !mono_debug_count ())
@@ -3190,21 +3199,6 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
                        mono_stats.generics_unsharable_methods++;
        }
 
-       if (mini_is_gsharedvt_sharable_method (method)) {
-               if (!mono_debug_count ())
-                       try_generic_shared = FALSE;
-               if (compile_aot)
-                       try_generic_shared = FALSE;
-       }
-
-       gsharedvt_method = is_gsharedvt_method (method);
-       if (gsharedvt_method || (compile_aot && is_open_method (method))) {
-               /* We are AOTing a gshared method directly */
-               method_is_gshared = TRUE;
-               g_assert (compile_aot);
-               try_generic_shared = TRUE;
-       }
-
 #ifdef ENABLE_LLVM
        try_llvm = mono_use_llvm || llvm;
 #endif
@@ -3236,6 +3230,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
        cfg->orig_method = method;
        cfg->gen_seq_points = debug_options.gen_seq_points_compact_data || debug_options.gen_sdb_seq_points;
        cfg->gen_sdb_seq_points = debug_options.gen_sdb_seq_points;
+       cfg->flags = flags;
 
 #ifdef PLATFORM_ANDROID
        if (cfg->method->wrapper_type != MONO_WRAPPER_NONE) {
@@ -3257,6 +3252,8 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
                cfg->generic_sharing_context = (MonoGenericSharingContext*)&cfg->gsctx;
        cfg->compile_llvm = try_llvm;
        cfg->token_info_hash = g_hash_table_new (NULL, NULL);
+       if (cfg->compile_aot)
+               cfg->method_index = aot_method_index;
 
        if (!mono_debug_count ())
                cfg->opt &= ~MONO_OPT_FLOAT32;
@@ -3952,7 +3949,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
 #else
 
 MonoCompile*
-mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFlags flags, int parts)
+mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFlags flags, int parts, int aot_method_index)
 {
        g_assert_not_reached ();
        return NULL;
@@ -4082,7 +4079,7 @@ mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, in
 
        jit_timer = g_timer_new ();
 
-       cfg = mini_method_compile (method, opt, target_domain, JIT_FLAG_RUN_CCTORS, 0);
+       cfg = mini_method_compile (method, opt, target_domain, JIT_FLAG_RUN_CCTORS, 0, -1);
        prof_method = cfg->method;
 
        g_timer_stop (jit_timer);
@@ -4356,6 +4353,19 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
 
 #endif
 
+#ifndef ENABLE_LLVM
+void
+mono_llvm_emit_aot_file_info (MonoAotFileInfo *info, gboolean has_jitted_code)
+{
+       g_assert_not_reached ();
+}
+
+void mono_llvm_emit_aot_data (const char *symbol, guint8 *data, int data_len)
+{
+       g_assert_not_reached ();
+}
+#endif
+
 #ifdef USE_JUMP_TABLES
 #define DEFAULT_JUMPTABLE_CHUNK_ELEMENTS 128
 
index a7b0533d7f6a0bec10e923a3e38f10f902dc729a..375e8c79f60d9f6be343f755a4698475aa894717 100644 (file)
 #endif
 
 /* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 117
+#define MONO_AOT_FILE_VERSION 119
 
 //TODO: This is x86/amd64 specific.
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
 
 #define MONO_TYPE_IS_PRIMITIVE(t) ((!(t)->byref && ((((t)->type >= MONO_TYPE_BOOLEAN && (t)->type <= MONO_TYPE_R8) || ((t)->type >= MONO_TYPE_I && (t)->type <= MONO_TYPE_U)))))
 
+#define MONO_AOT_TRAMP_PAGE_SIZE 16384
+
 /* Constants used to encode different types of methods in AOT */
 enum {
        MONO_AOT_METHODREF_MIN = 240,
@@ -186,35 +188,29 @@ typedef struct MonoAotFileInfo
        guint32 dummy;
 
        /* All the pointers should be at the start to avoid alignment problems */
-
-       /* Mono's Global Offset Table */
-       gpointer got;
+       /* Symbols */
+#define MONO_AOT_FILE_INFO_FIRST_SYMBOL jit_got
+       /* Global Offset Table for JITted code */
+       gpointer jit_got;
        /* Global Offset Table for LLVM code */
        gpointer llvm_got;
-       /* Compiled code for methods */
-       gpointer methods;
-       gpointer jit_code_start;
-       gpointer jit_code_end;
        /* Mono EH Frame created by llc when using LLVM */
        gpointer mono_eh_frame;
+       gpointer jit_code_start;
+       gpointer jit_code_end;
+       gpointer method_addresses;
        /* Data blob */
        gpointer blob;
        gpointer class_name_table;
        gpointer class_info_offsets;
        gpointer method_info_offsets;
        gpointer ex_info_offsets;
-       gpointer method_addresses;
        gpointer extra_method_info_offsets;
        gpointer extra_method_table;
        gpointer got_info_offsets;
        gpointer llvm_got_info_offsets;
-       gpointer unwind_info;
        gpointer mem_end;
        gpointer image_table;
-       /* Start of Mono's Program Linkage Table */
-       gpointer plt;
-       /* End of Mono's Program Linkage Table */
-       gpointer plt_end;
        /* The GUID of the assembly which the AOT image was generated from */
        gpointer assembly_guid;
        /*
@@ -231,13 +227,20 @@ typedef struct MonoAotFileInfo
        gpointer globals;
        /* Points to a string containing the assembly name*/
        gpointer assembly_name;
+       /* Start of Mono's Program Linkage Table */
+       gpointer plt;
+       /* End of Mono's Program Linkage Table */
+       gpointer plt_end;
+       gpointer unwind_info;
        /* Points to a table mapping methods to their unbox trampolines */
        gpointer unbox_trampolines;
        /* Points to the end of the previous table */
        gpointer unbox_trampolines_end;
        /* Points to a table of unbox trampoline addresses/offsets */
        gpointer unbox_trampoline_addresses;
+#define        MONO_AOT_FILE_INFO_LAST_SYMBOL unbox_trampoline_addresses
 
+       /* Scalars */
        /* The index of the first GOT slot used by the PLT */
        guint32 plt_got_offset_base;
        /* Number of entries in the GOT */
@@ -254,23 +257,26 @@ typedef struct MonoAotFileInfo
        guint32 simd_opts;
        /* Index of the blob entry holding the GC used by this module */
        gint32 gc_name_index;
+       guint32 num_rgctx_fetch_trampolines;
+       /* These are used for sanity checking object layout problems when cross-compiling */
+       guint32 double_align, long_align, generic_tramp_num;
+       /* The page size used by trampoline pages */
+       guint32 tramp_page_size;
 
+       /* Arrays */
        /* Number of trampolines */
        guint32 num_trampolines [MONO_AOT_TRAMP_NUM];
        /* The indexes of the first GOT slots used by the trampolines */
        guint32 trampoline_got_offset_base [MONO_AOT_TRAMP_NUM];
        /* The size of one trampoline */
        guint32 trampoline_size [MONO_AOT_TRAMP_NUM];
-       guint32 num_rgctx_fetch_trampolines;
-
-       /* These are used for sanity checking object layout problems when cross-compiling */
-       guint32 double_align, long_align, generic_tramp_num;
-       /* The page size used by trampoline pages */
-       guint32 tramp_page_size;
        /* The offset where the trampolines begin on a trampoline page */
        guint32 tramp_page_code_offsets [MONO_AOT_TRAMP_NUM];
 } MonoAotFileInfo;
 
+/* Number of symbols in the MonoAotFileInfo structure */
+#define MONO_AOT_FILE_INFO_NUM_SYMBOLS (((G_STRUCT_OFFSET (MonoAotFileInfo, MONO_AOT_FILE_INFO_LAST_SYMBOL) - G_STRUCT_OFFSET (MonoAotFileInfo, MONO_AOT_FILE_INFO_FIRST_SYMBOL)) / sizeof (gpointer)) + 1)
+
 typedef struct
 {
        MonoClass *klass;
@@ -1090,6 +1096,15 @@ typedef struct {
 } MonoLMFExt;
 
 /* Generic sharing */
+
+/*
+ * Flags for which contexts were used in inflating a generic.
+ */
+enum {
+       MONO_GENERIC_CONTEXT_USED_CLASS = 1,
+       MONO_GENERIC_CONTEXT_USED_METHOD = 2
+};
+
 typedef enum {
        MONO_RGCTX_INFO_STATIC_DATA,
        MONO_RGCTX_INFO_KLASS,
@@ -2193,7 +2208,7 @@ void      mono_linear_scan                  (MonoCompile *cfg, GList *vars, GLis
 void      mono_global_regalloc              (MonoCompile *cfg);
 void      mono_create_jump_table            (MonoCompile *cfg, MonoInst *label, MonoBasicBlock **bbs, int num_blocks);
 int       mono_compile_assembly             (MonoAssembly *ass, guint32 opts, const char *aot_options);
-MonoCompile *mini_method_compile            (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFlags flags, int parts);
+MonoCompile *mini_method_compile            (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFlags flags, int parts, int aot_method_index);
 void      mono_destroy_compile              (MonoCompile *cfg);
 MonoJitICallInfo *mono_find_jit_opcode_emulation (int opcode);
 void     mono_print_ins_index (int i, MonoInst *ins);
@@ -2204,7 +2219,7 @@ MonoInst *mono_get_got_var (MonoCompile *cfg);
 void      mono_add_seq_point (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, int native_offset);
 void      mono_add_var_location (MonoCompile *cfg, MonoInst *var, gboolean is_reg, int reg, int offset, int from, int to);
 MonoInst* mono_emit_jit_icall (MonoCompile *cfg, gconstpointer func, MonoInst **args);
-MonoInst* mono_emit_jit_icall_by_info (MonoCompile *cfg, MonoJitICallInfo *info, MonoInst **args, MonoBasicBlock **out_cbb);
+MonoInst* mono_emit_jit_icall_by_info (MonoCompile *cfg, MonoJitICallInfo *info, MonoInst **args);
 MonoInst* mono_emit_method_call (MonoCompile *cfg, MonoMethod *method, MonoInst **args, MonoInst *this);
 void      mono_create_helper_signatures (void);
 
@@ -2324,8 +2339,10 @@ void     mono_llvm_init                     (void) MONO_LLVM_INTERNAL;
 void     mono_llvm_cleanup                  (void) MONO_LLVM_INTERNAL;
 void     mono_llvm_emit_method              (MonoCompile *cfg) MONO_LLVM_INTERNAL;
 void     mono_llvm_emit_call                (MonoCompile *cfg, MonoCallInst *call) MONO_LLVM_INTERNAL;
-void     mono_llvm_create_aot_module        (const char *got_symbol, gboolean external_symbols, gboolean emit_dwarf) MONO_LLVM_INTERNAL;
+void     mono_llvm_create_aot_module        (const char *global_prefix, gboolean emit_dwarf) MONO_LLVM_INTERNAL;
 void     mono_llvm_emit_aot_module          (const char *filename, const char *cu_name) MONO_LLVM_INTERNAL;
+void     mono_llvm_emit_aot_file_info       (MonoAotFileInfo *info, gboolean has_jitted_code) MONO_LLVM_INTERNAL;
+void     mono_llvm_emit_aot_data            (const char *symbol, guint8 *data, int data_len) MONO_LLVM_INTERNAL;
 void     mono_llvm_check_method_supported   (MonoCompile *cfg) MONO_LLVM_INTERNAL;
 void     mono_llvm_free_domain_info         (MonoDomain *domain) MONO_LLVM_INTERNAL;
 MONO_API void mono_personality              (void);
@@ -2393,8 +2410,10 @@ char*             mono_get_rgctx_fetch_trampoline_name (int slot);
 gpointer          mini_get_nullified_class_init_trampoline (void);
 gpointer          mini_get_single_step_trampoline (void);
 gpointer          mini_get_breakpoint_trampoline (void);
-gpointer          mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp);
+gpointer          mini_add_method_trampoline (MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp);
 gboolean          mini_jit_info_is_gsharedvt (MonoJitInfo *ji);
+gpointer*         mini_resolve_imt_method (MonoVTable *vt, gpointer *vtable_slot, MonoMethod *imt_method, MonoMethod **impl_method, gpointer *out_aot_addr,
+                                                                                  gboolean *out_need_rgctx_tramp, MonoMethod **variant_iface);
 
 gboolean          mono_running_on_valgrind (void);
 void*             mono_global_codeman_reserve (int size);
@@ -2432,7 +2451,7 @@ int               mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoB
                                                                         MonoInst *return_var, MonoInst **inline_args,
                                                                         guint inline_offset, gboolean is_virtual_call);
 
-MonoInst         *mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins, MonoBasicBlock **out_cbb);
+MonoInst         *mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins);
 void              mono_decompose_long_opts (MonoCompile *cfg);
 void              mono_decompose_vtype_opts (MonoCompile *cfg);
 void              mono_decompose_vtype_opts_llvm (MonoCompile *cfg);
@@ -2750,10 +2769,10 @@ gboolean
 mono_class_generic_sharing_enabled (MonoClass *class);
 
 gpointer
-mono_class_fill_runtime_generic_context (MonoVTable *class_vtable, guint8 *caller, guint32 slot);
+mono_class_fill_runtime_generic_context (MonoVTable *class_vtable, guint32 slot);
 
 gpointer
-mono_method_fill_runtime_generic_context (MonoMethodRuntimeGenericContext *mrgctx, guint8 *caller, guint32 slot);
+mono_method_fill_runtime_generic_context (MonoMethodRuntimeGenericContext *mrgctx, guint32 slot);
 
 MonoMethodRuntimeGenericContext*
 mono_method_lookup_rgctx (MonoVTable *class_vtable, MonoGenericInst *method_inst);
@@ -2835,6 +2854,7 @@ MonoType* mini_type_get_underlying_type (MonoGenericSharingContext *gsctx, MonoT
 MonoMethod* mini_get_shared_method (MonoMethod *method);
 MonoMethod* mini_get_shared_method_to_register (MonoMethod *method);
 MonoMethod* mini_get_shared_method_full (MonoMethod *method, gboolean all_vt, gboolean is_gsharedvt);
+int mini_get_rgctx_entry_slot (MonoJumpInfoRgctxEntry *entry);
 
 int mini_type_stack_size (MonoGenericSharingContext *gsctx, MonoType *t, int *align);
 int mini_type_stack_size_full (MonoGenericSharingContext *gsctx, MonoType *t, guint32 *align, gboolean pinvoke);
index 4c4b7d32f7611a86a5f9c0620aa0db039a393671..f93dc88c0c6922e3b097ffd2c0f488df657801d9 100644 (file)
@@ -1,99 +1,6 @@
 #ifndef __MONO_SUPPORT_S390X_H__
 #define __MONO_SUPPORT_S390X_H__
 
-typedef struct __FACLIST__ {
-       uint8_t n3:1;           // 000 - N3 instructions
-       uint8_t zi:1;           // 001 - z/Arch installed
-       uint8_t za:1;           // 002 - z/Arch active
-       uint8_t date:1;         // 003 - DAT-enhancement
-       uint8_t idtes:1;        // 004 - IDTE-segment tables
-       uint8_t idter:1;        // 005 - IDTE-region tables
-       uint8_t asnlx:1;        // 006 - ASN-LX reuse
-       uint8_t stfle:1;        // 007 - STFLE
-       uint8_t edat1:1;        // 008 - EDAT 1
-       uint8_t srs:1;          // 009 - Sense-Running-Status
-       uint8_t csske:1;        // 010 - Conditional SSKE
-       uint8_t ctf:1;          // 011 - Configuration-topology
-       uint8_t ibm01:1;        // 012 - Assigned to IBM
-       uint8_t ipter:1;        // 013 - IPTE-range
-       uint8_t nqks:1;         // 014 - Nonquiescing key-setting
-       uint8_t ibm02:1;        // 015 - Assigned to IBM
-       uint8_t etf2:1;         // 016 - Extended translation 2
-       uint8_t msa:1;          // 017 - Message security assist 1
-       uint8_t ld:1;           // 018 - Long displacement
-       uint8_t ldh:1;          // 019 - Long displacement high perf
-       uint8_t mas:1;          // 020 - HFP multiply-add-subtract
-       uint8_t eif:1;          // 021 - Extended immediate
-       uint8_t etf3:1;         // 022 - Extended translation 3
-       uint8_t hux:1;          // 023 - HFP unnormalized extension
-       uint8_t etf2e:1;        // 024 - Extended translation enhanced 2
-       uint8_t stckf:1;        // 025 - Store clock fast
-       uint8_t pe:1;           // 026 - Parsing enhancement
-       uint8_t mvcos:1;        // 027 - Move with optional specs
-       uint8_t tods:1;         // 028 - TOD steering
-       uint8_t x000:1;         // 029 - Undefined
-       uint8_t etf3e:1;        // 030 - ETF3 enhancement
-       uint8_t ecput:1;        // 031 - Extract CPU time
-       uint8_t csst:1;         // 032 - Compare swap and store
-       uint8_t csst2:1;        // 033 - Compare swap and store 2
-       uint8_t gie:1;          // 034 - General instructions extension
-       uint8_t ee:1;           // 035 - Execute extensions
-       uint8_t em:1;           // 036 - Enhanced monitor
-       uint8_t fpe:1;          // 037 - Floating point extension
-       uint8_t x001:1;         // 038 - Undefined
-       uint8_t ibm03:1;        // 039 - Assigned to IBM
-       uint8_t spp:1;          // 040 - Set program parameters
-       uint8_t fpse:1;         // 041 - FP support enhancement
-       uint8_t dfp:1;          // 042 - DFP
-       uint8_t dfph:1;         // 043 - DFP high performance
-       uint8_t pfpo:1;         // 044 - PFPO instruction
-       uint8_t multi:1;        // 045 - Multiple inc load/store on CC 1
-       uint8_t ibm04:1;        // 046 - Assigned to IBM
-       uint8_t cmpsce:1;       // 047 - CMPSC enhancement
-       uint8_t dfpzc:1;        // 048 - DFP zoned conversion
-       uint8_t misc:1;         // 049 - Multiple inc load and trap
-       uint8_t ctx:1;          // 050 - Constrained transactional-execution
-       uint8_t ltlb:1;         // 051 - Local TLB clearing
-       uint8_t ia:1;           // 052 - Interlocked access
-       uint8_t lsoc2:1;        // 053 - Load/store on CC 2
-       uint8_t x002:1;         // 054 - Undefined
-       uint8_t ibm05:1;        // 055 - Assigned to IBM
-       uint8_t x003:1;         // 056 - Undefined
-       uint8_t msa5:1;         // 057 - Message security assist 5
-       uint8_t x004:1;         // 058 - Undefined
-       uint8_t x005:1;         // 059 - Undefined
-       uint8_t x006:1;         // 060 - Undefined
-       uint8_t x007:1;         // 061 - Undefined
-       uint8_t ibm06:1;        // 062 - Assigned to IBM
-       uint8_t x008:1;         // 063 - Undefined
-       uint8_t x009:1;         // 064 - Undefined
-       uint8_t ibm07:1;        // 065 - Assigned to IBM
-       uint8_t rrbm:1;         // 066 - Reset reference bits multiple
-       uint8_t cmc:1;          // 067 - CPU measurement counter
-       uint8_t cms:1;          // 068 - CPU Measurement sampling
-       uint8_t ibm08:1;        // 069 - Assigned to IBM
-       uint8_t ibm09:1;        // 070 - Assigned to IBM
-       uint8_t ibm10:1;        // 071 - Assigned to IBM
-       uint8_t ibm11:1;        // 072 - Assigned to IBM
-       uint8_t txe:1;          // 073 - Transactional execution
-       uint8_t sthy:1;         // 074 - Store hypervisor information
-       uint8_t aefsi:1;        // 075 - Access exception fetch/store indication
-       uint8_t msa3:1;         // 076 - Message security assist 3
-       uint8_t msa4:1;         // 077 - Message security assist 4
-       uint8_t edat2:1;        // 078 - Enhanced DAT 2
-       uint8_t x010:1;         // 079 - Undefined
-       uint8_t dfppc:1;        // 080 - DFP packed conversion
-       uint8_t x011:7;         // 081-87 - Undefined
-       uint8_t x012[5];        // 088-127 - Undefined
-       uint8_t ibm12:1;        // 128 - Assigned to IBM
-       uint8_t vec:1;          // 129 - Vector facility
-       uint8_t x013:6;         // 130-135 - Undefined
-       uint8_t x014:6;         // 136-141 - Undefined
-       uint8_t sccm:1;         // 142 - Store CPU counter multiple
-       uint8_t ibm13:1;        // 143 - Assigned to IBM
-       uint8_t x015[14];       // 144-256 Undefined
-} __attribute__ ((packed)) __attribute__ ((aligned(8))) facilities_t;
-
 #define S390_SET(loc, dr, v)                                   \
        do {                                                    \
                guint64 val = (guint64) v;                      \
index e0fa41e3be6edcd05e31865b6cc491dfabe902e3..3ed9254036f8aa3bb9bc74f981f827ee22d808f4 100644 (file)
@@ -432,7 +432,7 @@ mono_trace_enter_method (MonoMethod *method, char *ebp)
                MonoJitInfo *ji = mini_jit_info_table_find (mono_domain_get (), RETURN_ADDRESS (), NULL);
                if (ji) {
                        gsctx = mono_jit_info_get_generic_sharing_context (ji);
-                       if (gsctx && (gsctx->var_is_vt || gsctx->mvar_is_vt)) {
+                       if (gsctx && gsctx->is_gsharedvt) {
                                /* Needs a ctx to get precise method */
                                printf (") <gsharedvt>\n");
                                return;
@@ -590,7 +590,7 @@ mono_trace_leave_method (MonoMethod *method, ...)
                MonoJitInfo *ji = mini_jit_info_table_find (mono_domain_get (), RETURN_ADDRESS (), NULL);
                if (ji) {
                        gsctx = mono_jit_info_get_generic_sharing_context (ji);
-                       if (gsctx && (gsctx->var_is_vt || gsctx->mvar_is_vt)) {
+                       if (gsctx && gsctx->is_gsharedvt) {
                                /* Needs a ctx to get precise method */
                                printf (") <gsharedvt>\n");
                                return;
index 72eca3d0dc306ed9ba69faf89163f8f15824ab7d..b7e4b6708c0681b3dcad2d0d611912c9e40d252c 100644 (file)
@@ -27,6 +27,9 @@
 #include "mono/utils/mono-compiler.h"
 #include "mono/utils/parse.h"
 #include "mono/utils/memfuncs.h"
+#ifdef HAVE_SGEN_GC
+#include "mono/sgen/sgen-conf.h"
+#endif
 
 typedef struct {
        guint minor_gc_count;
@@ -38,6 +41,14 @@ typedef struct {
 
 extern GCStats gc_stats;
 
+#ifdef HAVE_SGEN_GC
+typedef SgenDescriptor MonoGCDescriptor;
+#define MONO_GC_DESCRIPTOR_NULL        SGEN_DESCRIPTOR_NULL
+#else
+typedef void* MonoGCDescriptor;
+#define MONO_GC_DESCRIPTOR_NULL NULL
+#endif
+
 /*
  * Try to register a foreign thread with the GC, if we fail or the backend
  * can't cope with this concept - we return FALSE.
@@ -46,17 +57,17 @@ extern gboolean mono_gc_register_thread (void *baseptr);
 
 gboolean mono_gc_parse_environment_string_extract_number (const char *str, size_t *out);
 
-void* mono_gc_make_descr_for_object (gsize *bitmap, int numbits, size_t obj_size);
-void* mono_gc_make_descr_for_array (int vector, gsize *elem_bitmap, int numbits, size_t elem_size);
+MonoGCDescriptor mono_gc_make_descr_for_object (gsize *bitmap, int numbits, size_t obj_size);
+MonoGCDescriptor mono_gc_make_descr_for_array (int vector, gsize *elem_bitmap, int numbits, size_t elem_size);
 
 /* simple interface for data structures needed in the runtime */
-void* mono_gc_make_descr_from_bitmap (gsize *bitmap, int numbits);
+MonoGCDescriptor mono_gc_make_descr_from_bitmap (gsize *bitmap, int numbits);
 
 /* Return a root descriptor for a root with all refs */
-void* mono_gc_make_root_descr_all_refs (int numbits);
+MonoGCDescriptor mono_gc_make_root_descr_all_refs (int numbits);
 
 /* Return the bitmap encoded by a descriptor */
-gsize* mono_gc_get_bitmap_for_descr (void *descr, int *numbits);
+gsize* mono_gc_get_bitmap_for_descr (MonoGCDescriptor descr, int *numbits);
 
 /*
 These functions must be used when it's possible that either destination is not
index ac017ddf3143152ac07bf4b86fbcc17e80e88b69..413388810f8b4ec8053fe82bd6acd65f235a9af1 100644 (file)
@@ -93,10 +93,10 @@ static __thread char **tlab_next_addr MONO_ATTR_USED;
 #define TLAB_REAL_END  (__thread_info__->tlab_real_end)
 #endif
 
-static void*
-alloc_degraded (GCVTable *vtable, size_t size, gboolean for_mature)
+static GCObject*
+alloc_degraded (GCVTable vtable, size_t size, gboolean for_mature)
 {
-       void *p;
+       GCObject *p;
 
        if (!for_mature) {
                sgen_client_degraded_allocation (size);
@@ -145,8 +145,8 @@ zero_tlab_if_necessary (void *p, size_t size)
  * so when we scan the thread stacks for pinned objects, we can start
  * a search for the pinned object in SGEN_SCAN_START_SIZE chunks.
  */
-void*
-sgen_alloc_obj_nolock (GCVTable *vtable, size_t size)
+GCObject*
+sgen_alloc_obj_nolock (GCVTable vtable, size_t size)
 {
        /* FIXME: handle OOM */
        void **p;
@@ -219,7 +219,7 @@ sgen_alloc_obj_nolock (GCVTable *vtable, size_t size)
                        g_assert (*p == NULL);
                        mono_atomic_store_seq (p, vtable);
 
-                       return p;
+                       return (GCObject*)p;
                }
 
                /* Slow path */
@@ -326,11 +326,11 @@ sgen_alloc_obj_nolock (GCVTable *vtable, size_t size)
                mono_atomic_store_seq (p, vtable);
        }
 
-       return p;
+       return (GCObject*)p;
 }
 
-void*
-sgen_try_alloc_obj_nolock (GCVTable *vtable, size_t size)
+GCObject*
+sgen_try_alloc_obj_nolock (GCVTable vtable, size_t size)
 {
        void **p;
        char *new_next;
@@ -414,13 +414,13 @@ sgen_try_alloc_obj_nolock (GCVTable *vtable, size_t size)
 
        mono_atomic_store_seq (p, vtable);
 
-       return p;
+       return (GCObject*)p;
 }
 
-void*
-sgen_alloc_obj (GCVTable *vtable, size_t size)
+GCObject*
+sgen_alloc_obj (GCVTable vtable, size_t size)
 {
-       void *res;
+       GCObject *res;
        TLAB_ACCESS_INIT;
 
        if (!SGEN_CAN_ALIGN_UP (size))
@@ -446,7 +446,7 @@ sgen_alloc_obj (GCVTable *vtable, size_t size)
        }
 
        ENTER_CRITICAL_REGION;
-       res = sgen_try_alloc_obj_nolock ((GCVTable*)vtable, size);
+       res = sgen_try_alloc_obj_nolock (vtable, size);
        if (res) {
                EXIT_CRITICAL_REGION;
                return res;
@@ -454,7 +454,7 @@ sgen_alloc_obj (GCVTable *vtable, size_t size)
        EXIT_CRITICAL_REGION;
 #endif
        LOCK_GC;
-       res = sgen_alloc_obj_nolock ((GCVTable*)vtable, size);
+       res = sgen_alloc_obj_nolock (vtable, size);
        UNLOCK_GC;
        if (G_UNLIKELY (!res))
                sgen_client_out_of_memory (size);
@@ -465,10 +465,10 @@ sgen_alloc_obj (GCVTable *vtable, size_t size)
  * To be used for interned strings and possibly MonoThread, reflection handles.
  * We may want to explicitly free these objects.
  */
-void*
-sgen_alloc_obj_pinned (GCVTable *vtable, size_t size)
+GCObject*
+sgen_alloc_obj_pinned (GCVTable vtable, size_t size)
 {
-       void **p;
+       GCObject *p;
 
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
@@ -478,10 +478,10 @@ sgen_alloc_obj_pinned (GCVTable *vtable, size_t size)
 
        if (size > SGEN_MAX_SMALL_OBJ_SIZE) {
                /* large objects are always pinned anyway */
-               p = sgen_los_alloc_large_inner ((GCVTable*)vtable, size);
+               p = sgen_los_alloc_large_inner (vtable, size);
        } else {
                SGEN_ASSERT (9, sgen_client_vtable_is_inited (vtable), "class %s:%s is not initialized", sgen_client_vtable_get_namespace (vtable), sgen_client_vtable_get_name (vtable));
-               p = major_collector.alloc_small_pinned_obj ((GCVTable*)vtable, size, SGEN_VTABLE_HAS_REFERENCES ((GCVTable*)vtable));
+               p = major_collector.alloc_small_pinned_obj (vtable, size, SGEN_VTABLE_HAS_REFERENCES (vtable));
        }
        if (G_LIKELY (p)) {
                SGEN_LOG (6, "Allocated pinned object %p, vtable: %p (%s), size: %zd", p, vtable, sgen_client_vtable_get_name (vtable), size);
@@ -491,17 +491,17 @@ sgen_alloc_obj_pinned (GCVTable *vtable, size_t size)
        return p;
 }
 
-void*
-sgen_alloc_obj_mature (GCVTable *vtable, size_t size)
+GCObject*
+sgen_alloc_obj_mature (GCVTable vtable, size_t size)
 {
-       void *res;
+       GCObject *res;
 
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
        size = ALIGN_UP (size);
 
        LOCK_GC;
-       res = alloc_degraded ((GCVTable*)vtable, size, TRUE);
+       res = alloc_degraded (vtable, size, TRUE);
        UNLOCK_GC;
 
        return res;
index 6343de1be07cde5dc09a2d115972a173835f13e9..fb18def266d4bd4441db6466c5f782c4bd2b80d9 100644 (file)
@@ -467,7 +467,7 @@ sgen_get_card_table_configuration (int *shift_bits, gpointer *mask)
 
 #if 0
 void
-sgen_card_table_dump_obj_card (char *object, size_t size, void *dummy)
+sgen_card_table_dump_obj_card (GCObject *object, size_t size, void *dummy)
 {
        guint8 *start = sgen_card_table_get_card_scan_address (object);
        guint8 *end = start + sgen_card_table_number_of_cards_in_range (object, size);
@@ -486,7 +486,7 @@ sgen_card_table_dump_obj_card (char *object, size_t size, void *dummy)
 #endif
 
 void
-sgen_cardtable_scan_object (char *obj, mword block_obj_size, guint8 *cards, gboolean mod_union, ScanCopyContext ctx)
+sgen_cardtable_scan_object (GCObject *obj, mword block_obj_size, guint8 *cards, gboolean mod_union, ScanCopyContext ctx)
 {
        HEAVY_STAT (++large_objects);
 
@@ -501,7 +501,7 @@ sgen_cardtable_scan_object (char *obj, mword block_obj_size, guint8 *cards, gboo
                ctx.ops->scan_object (obj, sgen_obj_get_descriptor (obj), ctx.queue);
        }
 
-       binary_protocol_card_scan (obj, sgen_safe_object_get_size ((GCObject*)obj));
+       binary_protocol_card_scan (obj, sgen_safe_object_get_size (obj));
 }
 
 #ifdef CARDTABLE_STATS
index 85a6924650f0fd8cd746d0344ac37b17b736d44e..bda77e4e925fd5149ee09a244322af12c2c9bbaa 100644 (file)
@@ -30,7 +30,7 @@ mword sgen_card_table_number_of_cards_in_range (mword address, mword size);
 void sgen_card_table_reset_region (mword start, mword end);
 void* sgen_card_table_align_pointer (void *ptr);
 void sgen_card_table_mark_range (mword address, mword size);
-void sgen_cardtable_scan_object (char *obj, mword obj_size, guint8 *cards,
+void sgen_cardtable_scan_object (GCObject *obj, mword obj_size, guint8 *cards,
                gboolean mod_union, ScanCopyContext ctx);
 
 gboolean sgen_card_table_get_card_data (guint8 *dest, mword address, mword cards);
index 505edbdc3fb940b9660e905f332f0024d7447382..cb332823789a01da7a3ac9ee0a2ad2b987d82b8a 100644 (file)
@@ -29,7 +29,7 @@ void sgen_client_init (void);
  * The slow path for getting an object's size.  We're passing in the vtable because we've
  * already fetched it.
  */
-mword sgen_client_slow_object_get_size (GCVTable *vtable, GCObject* o);
+mword sgen_client_slow_object_get_size (GCVTable vtable, GCObject* o);
 
 /*
  * Fill the given range with a dummy object.  If the range is too short to be filled with an
@@ -92,7 +92,7 @@ void sgen_client_clear_unreachable_ephemerons (ScanCopyContext ctx);
  * parts of the object based on which cards are marked, do so and return TRUE.  Otherwise,
  * return FALSE.
  */
-gboolean sgen_client_cardtable_scan_object (char *obj, mword block_obj_size, guint8 *cards, gboolean mod_union, ScanCopyContext ctx);
+gboolean sgen_client_cardtable_scan_object (GCObject *obj, mword block_obj_size, guint8 *cards, gboolean mod_union, ScanCopyContext ctx);
 
 /*
  * Called after nursery objects have been pinned.  No action is necessary.
@@ -114,7 +114,7 @@ void sgen_client_collecting_major_3 (SgenPointerQueue *fin_ready_queue, SgenPoin
 /*
  * Called after a LOS object has been pinned.  No action is necessary.
  */
-void sgen_client_pinned_los_object (char *obj);
+void sgen_client_pinned_los_object (GCObject *obj);
 
 /*
  * Called for every degraded allocation.  No action is necessary.
@@ -144,9 +144,9 @@ const char* sgen_client_description_for_internal_mem_type (int type);
 /*
  * Only used for debugging.  `sgen_client_vtable_get_namespace()` may return NULL.
  */
-gboolean sgen_client_vtable_is_inited (GCVTable *vtable);
-const char* sgen_client_vtable_get_namespace (GCVTable *vtable);
-const char* sgen_client_vtable_get_name (GCVTable *vtable);
+gboolean sgen_client_vtable_is_inited (GCVTable vtable);
+const char* sgen_client_vtable_get_namespace (GCVTable vtable);
+const char* sgen_client_vtable_get_name (GCVTable vtable);
 
 /*
  * Called before starting collections.  The world is already stopped.  No action is
index f139a98e41ddb17ccef1d50acff21779a21308d1..368ec5a6d3be6fed582712f113fe1289b69755a6 100644 (file)
@@ -32,6 +32,8 @@ typedef guint32 mword;
 typedef guint64 mword;
 #endif
 
+typedef mword SgenDescriptor;
+#define SGEN_DESCRIPTOR_NULL   0
 
 /*
  * Turning on heavy statistics will turn off the managed allocator and
index 99fd0cc37ca36d3c4325b5925620c3d164e9b6be..847269d5d72b575174d6366fd6236e8652b6dc7b 100644 (file)
@@ -35,13 +35,13 @@ extern guint64 stat_slots_allocated_in_vain;
  * anymore, which is the case in the parallel collector.
  */
 static MONO_ALWAYS_INLINE void
-par_copy_object_no_checks (char *destination, GCVTable *vt, void *obj, mword objsize, SgenGrayQueue *queue)
+par_copy_object_no_checks (char *destination, GCVTable vt, void *obj, mword objsize, SgenGrayQueue *queue)
 {
        sgen_client_pre_copy_checks (destination, vt, obj, objsize);
        binary_protocol_copy (obj, destination, vt, objsize);
 
        /* FIXME: assumes object layout */
-       memcpy (destination + sizeof (mword), (char*)obj + sizeof (mword), objsize - sizeof (mword));
+       memcpy ((char*)destination + sizeof (mword), (char*)obj + sizeof (mword), objsize - sizeof (mword));
 
        /* adjust array->bounds */
        SGEN_ASSERT (9, sgen_vtable_get_descriptor (vt), "vtable %p has no gc descriptor", vt);
@@ -60,11 +60,11 @@ par_copy_object_no_checks (char *destination, GCVTable *vt, void *obj, mword obj
 static MONO_NEVER_INLINE void*
 copy_object_no_checks (void *obj, SgenGrayQueue *queue)
 {
-       GCVTable *vt = SGEN_LOAD_VTABLE_UNCHECKED (obj);
+       GCVTable vt = SGEN_LOAD_VTABLE_UNCHECKED (obj);
        gboolean has_references = SGEN_VTABLE_HAS_REFERENCES (vt);
        mword objsize = SGEN_ALIGN_UP (sgen_client_par_object_get_size (vt, obj));
        /* FIXME: Does this not mark the newly allocated object? */
-       char *destination = COLLECTOR_SERIAL_ALLOC_FOR_PROMOTION (vt, obj, objsize, has_references);
+       void *destination = COLLECTOR_SERIAL_ALLOC_FOR_PROMOTION (vt, obj, objsize, has_references);
 
        if (G_UNLIKELY (!destination)) {
                /* FIXME: Is this path ever tested? */
index be53b493fdd8fa35ae4faaa69e7905f00f1a7559..5b4f7fe3ce4851feb66109b5ff9af19532c51524 100644 (file)
@@ -43,7 +43,7 @@
 #define safe_object_get_size   sgen_safe_object_get_size
 
 void describe_ptr (char *ptr);
-void check_object (char *start);
+void check_object (GCObject *obj);
 
 /*
  * ######################################################################
@@ -67,8 +67,8 @@ static char* describe_nursery_ptr (char *ptr, gboolean need_setup);
 static void
 describe_pointer (char *ptr, gboolean need_setup)
 {
-       GCVTable *vtable;
-       mword desc;
+       GCVTable vtable;
+       SgenDescriptor desc;
        int type;
        char *start;
        char *forwarded;
@@ -80,7 +80,7 @@ describe_pointer (char *ptr, gboolean need_setup)
                if (!start)
                        return;
                ptr = start;
-               vtable = (GCVTable*)LOAD_VTABLE (ptr);
+               vtable = LOAD_VTABLE ((GCObject*)ptr);
        } else {
                if (sgen_ptr_is_in_los (ptr, &start)) {
                        if (ptr == start)
@@ -89,7 +89,7 @@ describe_pointer (char *ptr, gboolean need_setup)
                                printf ("Pointer is at offset 0x%x of object %p in LOS space.\n", (int)(ptr - start), start);
                        ptr = start;
                        mono_sgen_los_describe_pointer (ptr);
-                       vtable = (GCVTable*)LOAD_VTABLE (ptr);
+                       vtable = LOAD_VTABLE ((GCObject*)ptr);
                } else if (major_collector.ptr_is_in_non_pinned_space (ptr, &start)) {
                        if (ptr == start)
                                printf ("Pointer is the start of object %p in oldspace.\n", start);
@@ -99,11 +99,11 @@ describe_pointer (char *ptr, gboolean need_setup)
                                printf ("Pointer inside oldspace.\n");
                        if (start)
                                ptr = start;
-                       vtable = (GCVTable*)major_collector.describe_pointer (ptr);
-               } else if (major_collector.obj_is_from_pinned_alloc (ptr)) {
+                       vtable = (GCVTable)major_collector.describe_pointer (ptr);
+               } else if (major_collector.ptr_is_from_pinned_alloc (ptr)) {
                        // FIXME: Handle pointers to the inside of objects
                        printf ("Pointer is inside a pinned chunk.\n");
-                       vtable = (GCVTable*)LOAD_VTABLE (ptr);
+                       vtable = LOAD_VTABLE ((GCObject*)ptr);
                } else {
                        printf ("Pointer unknown.\n");
                        return;
@@ -130,7 +130,7 @@ describe_pointer (char *ptr, gboolean need_setup)
        }
        printf ("Class: %s.%s\n", sgen_client_vtable_get_namespace (vtable), sgen_client_vtable_get_name (vtable));
 
-       desc = sgen_vtable_get_descriptor ((GCVTable*)vtable);
+       desc = sgen_vtable_get_descriptor (vtable);
        printf ("Descriptor: %lx\n", (long)desc);
 
        type = desc & DESC_TYPE_MASK;
@@ -162,7 +162,7 @@ static gboolean missing_remsets;
 #define HANDLE_PTR(ptr,obj)    do {    \
        if (*(ptr) && sgen_ptr_in_nursery ((char*)*(ptr))) { \
                if (!sgen_get_remset ()->find_address ((char*)(ptr)) && !sgen_cement_lookup (*(ptr))) { \
-                       GCVTable *__vt = SGEN_LOAD_VTABLE ((obj));      \
+                       GCVTable __vt = SGEN_LOAD_VTABLE (obj); \
                        SGEN_LOG (0, "Oldspace->newspace reference %p at offset %zd in object %p (%s.%s) not found in remsets.", *(ptr), (char*)(ptr) - (char*)(obj), (obj), sgen_client_vtable_get_namespace (__vt), sgen_client_vtable_get_name (__vt)); \
                        binary_protocol_missing_remset ((obj), __vt, (int) ((char*)(ptr) - (char*)(obj)), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \
                        if (!object_is_pinned (*(ptr)))                                                         \
@@ -176,10 +176,11 @@ static gboolean missing_remsets;
  * be found in the remembered sets.
  */
 static void
-check_consistency_callback (char *start, size_t size, void *dummy)
+check_consistency_callback (GCObject *obj, size_t size, void *dummy)
 {
-       GCVTable *vt = (GCVTable*)LOAD_VTABLE (start);
-       mword desc = sgen_vtable_get_descriptor ((GCVTable*)vt);
+       char *start = (char*)obj;
+       GCVTable vt = LOAD_VTABLE (obj);
+       SgenDescriptor desc = sgen_vtable_get_descriptor (vt);
        SGEN_LOG (8, "Scanning object %p, vtable: %p (%s)", start, vt, sgen_client_vtable_get_name (vt));
 
 #include "sgen-scan-object.h"
@@ -211,7 +212,7 @@ sgen_check_consistency (void)
 }
 
 static gboolean
-is_major_or_los_object_marked (char *obj)
+is_major_or_los_object_marked (GCObject *obj)
 {
        if (sgen_safe_object_get_size ((GCObject*)obj) > SGEN_MAX_SMALL_OBJ_SIZE) {
                return sgen_los_object_is_pinned (obj);
@@ -222,9 +223,9 @@ is_major_or_los_object_marked (char *obj)
 
 #undef HANDLE_PTR
 #define HANDLE_PTR(ptr,obj)    do {    \
-       if (*(ptr) && !sgen_ptr_in_nursery ((char*)*(ptr)) && !is_major_or_los_object_marked ((char*)*(ptr))) { \
+       if (*(ptr) && !sgen_ptr_in_nursery ((char*)*(ptr)) && !is_major_or_los_object_marked ((GCObject*)*(ptr))) { \
                if (!sgen_get_remset ()->find_address_with_cards (start, cards, (char*)(ptr))) { \
-                       GCVTable *__vt = SGEN_LOAD_VTABLE ((obj));      \
+                       GCVTable __vt = SGEN_LOAD_VTABLE (obj); \
                        SGEN_LOG (0, "major->major reference %p at offset %zd in object %p (%s.%s) not found in remsets.", *(ptr), (char*)(ptr) - (char*)(obj), (obj), sgen_client_vtable_get_namespace (__vt), sgen_client_vtable_get_name (__vt)); \
                        binary_protocol_missing_remset ((obj), __vt, (int) ((char*)(ptr) - (char*)(obj)), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \
                        missing_remsets = TRUE;                         \
@@ -233,21 +234,22 @@ is_major_or_los_object_marked (char *obj)
        } while (0)
 
 static void
-check_mod_union_callback (char *start, size_t size, void *dummy)
+check_mod_union_callback (GCObject *obj, size_t size, void *dummy)
 {
+       char *start = (char*)obj;
        gboolean in_los = (gboolean) (size_t) dummy;
-       GCVTable *vt = (GCVTable*)LOAD_VTABLE (start);
-       mword desc = sgen_vtable_get_descriptor ((GCVTable*)vt);
+       GCVTable vt = LOAD_VTABLE (obj);
+       SgenDescriptor desc = sgen_vtable_get_descriptor (vt);
        guint8 *cards;
-       SGEN_LOG (8, "Scanning object %p, vtable: %p (%s)", start, vt, sgen_client_vtable_get_name (vt));
+       SGEN_LOG (8, "Scanning object %p, vtable: %p (%s)", obj, vt, sgen_client_vtable_get_name (vt));
 
-       if (!is_major_or_los_object_marked (start))
+       if (!is_major_or_los_object_marked (obj))
                return;
 
        if (in_los)
-               cards = sgen_los_header_for_object (start)->cardtable_mod_union;
+               cards = sgen_los_header_for_object (obj)->cardtable_mod_union;
        else
-               cards = sgen_get_major_collector ()->get_cardtable_mod_union_for_object (start);
+               cards = sgen_get_major_collector ()->get_cardtable_mod_union_for_reference (start);
 
        SGEN_ASSERT (0, cards, "we must have mod union for marked major objects");
 
@@ -274,9 +276,10 @@ sgen_check_mod_union_consistency (void)
        } while (0)
 
 static void
-check_major_refs_callback (char *start, size_t size, void *dummy)
+check_major_refs_callback (GCObject *obj, size_t size, void *dummy)
 {
-       mword desc = sgen_obj_get_descriptor (start);
+       char *start = (char*)obj;
+       SgenDescriptor desc = sgen_obj_get_descriptor (obj);
 
 #include "sgen-scan-object.h"
 }
@@ -303,25 +306,26 @@ sgen_check_major_refs (void)
  * reference fields are valid.
  */
 void
-check_object (char *start)
+check_object (GCObject *obj)
 {
-       mword desc;
+       char *start = (char*)obj;
+       SgenDescriptor desc;
 
        if (!start)
                return;
 
-       desc = sgen_obj_get_descriptor (start);
+       desc = sgen_obj_get_descriptor (obj);
 
 #include "sgen-scan-object.h"
 }
 
 
-static char **valid_nursery_objects;
+static GCObject **valid_nursery_objects;
 static int valid_nursery_object_count;
 static gboolean broken_heap;
 
 static void 
-setup_mono_sgen_scan_area_with_callback (char *object, size_t size, void *data)
+setup_mono_sgen_scan_area_with_callback (GCObject *object, size_t size, void *data)
 {
        valid_nursery_objects [valid_nursery_object_count++] = object;
 }
@@ -341,10 +345,10 @@ find_object_in_nursery_dump (char *object)
        int first = 0, last = valid_nursery_object_count;
        while (first < last) {
                int middle = first + ((last - first) >> 1);
-               if (object == valid_nursery_objects [middle])
+               if (object == (char*)valid_nursery_objects [middle])
                        return TRUE;
 
-               if (object < valid_nursery_objects [middle])
+               if (object < (char*)valid_nursery_objects [middle])
                        last = middle;
                else
                        first = middle + 1;
@@ -358,8 +362,8 @@ iterate_valid_nursery_objects (IterateObjectCallbackFunc callback, void *data)
 {
        int i;
        for (i = 0; i < valid_nursery_object_count; ++i) {
-               char *obj = valid_nursery_objects [i];
-               callback (obj, safe_object_get_size ((GCObject*)obj), data);
+               GCObject *obj = valid_nursery_objects [i];
+               callback (obj, safe_object_get_size (obj), data);
        }
 }
 
@@ -372,20 +376,20 @@ describe_nursery_ptr (char *ptr, gboolean need_setup)
                setup_valid_nursery_objects ();
 
        for (i = 0; i < valid_nursery_object_count - 1; ++i) {
-               if (valid_nursery_objects [i + 1] > ptr)
+               if ((char*)valid_nursery_objects [i + 1] > ptr)
                        break;
        }
 
-       if (i >= valid_nursery_object_count || valid_nursery_objects [i] + safe_object_get_size ((GCObject *)valid_nursery_objects [i]) < ptr) {
+       if (i >= valid_nursery_object_count || (char*)valid_nursery_objects [i] + safe_object_get_size (valid_nursery_objects [i]) < ptr) {
                SGEN_LOG (0, "nursery-ptr (unalloc'd-memory)");
                return NULL;
        } else {
-               char *obj = valid_nursery_objects [i];
-               if (obj == ptr)
+               GCObject *obj = valid_nursery_objects [i];
+               if ((char*)obj == ptr)
                        SGEN_LOG (0, "nursery-ptr %p", obj);
                else
-                       SGEN_LOG (0, "nursery-ptr %p (interior-ptr offset %zd)", obj, ptr - obj);
-               return obj;
+                       SGEN_LOG (0, "nursery-ptr %p (interior-ptr offset %zd)", obj, ptr - (char*)obj);
+               return (char*)obj;
        }
 }
 
@@ -407,7 +411,7 @@ static void
 bad_pointer_spew (char *obj, char **slot)
 {
        char *ptr = *slot;
-       GCVTable *vtable = (GCVTable*)LOAD_VTABLE (obj);
+       GCVTable vtable = LOAD_VTABLE ((GCObject*)obj);
 
        SGEN_LOG (0, "Invalid object pointer %p at offset %zd in object %p (%s.%s):", ptr,
                        (char*)slot - obj,
@@ -420,7 +424,7 @@ static void
 missing_remset_spew (char *obj, char **slot)
 {
        char *ptr = *slot;
-       GCVTable *vtable = (GCVTable*)LOAD_VTABLE (obj);
+       GCVTable vtable = LOAD_VTABLE ((GCObject*)obj);
 
        SGEN_LOG (0, "Oldspace->newspace reference %p at offset %zd in object %p (%s.%s) not found in remsets.",
                        ptr, (char*)slot - obj, obj, 
@@ -438,17 +442,18 @@ FIXME Flag missing remsets due to pinning as non fatal
                        if (!is_valid_object_pointer (*(char**)ptr)) {  \
                                bad_pointer_spew ((char*)obj, (char**)ptr);     \
                        } else if (!sgen_ptr_in_nursery (obj) && sgen_ptr_in_nursery ((char*)*ptr)) {   \
-                               if (!sgen_get_remset ()->find_address ((char*)(ptr)) && !sgen_cement_lookup ((char*)*(ptr)) && (!allow_missing_pinned || !SGEN_OBJECT_IS_PINNED ((char*)*(ptr)))) \
+                               if (!sgen_get_remset ()->find_address ((char*)(ptr)) && !sgen_cement_lookup (*(ptr)) && (!allow_missing_pinned || !SGEN_OBJECT_IS_PINNED (*(ptr)))) \
                                missing_remset_spew ((char*)obj, (char**)ptr);  \
                        }       \
         } \
        } while (0)
 
 static void
-verify_object_pointers_callback (char *start, size_t size, void *data)
+verify_object_pointers_callback (GCObject *obj, size_t size, void *data)
 {
+       char *start = (char*)obj;
        gboolean allow_missing_pinned = (gboolean) (size_t) data;
-       mword desc = sgen_obj_get_descriptor (start);
+       SgenDescriptor desc = sgen_obj_get_descriptor (obj);
 
 #include "sgen-scan-object.h"
 }
@@ -561,31 +566,32 @@ find_pinning_reference (char *obj, size_t size)
                        } else {                                        \
                                mword __size = sgen_safe_object_get_size ((GCObject*)__target); \
                                if (__size <= SGEN_MAX_SMALL_OBJ_SIZE)  \
-                                       g_assert (major_collector.is_object_live (__target)); \
+                                       g_assert (major_collector.is_object_live ((GCObject*)__target)); \
                                else                                    \
-                                       g_assert (sgen_los_object_is_pinned (__target)); \
+                                       g_assert (sgen_los_object_is_pinned ((GCObject*)__target)); \
                        }                                               \
                }                                                       \
        } while (0)
 
 static void
-check_marked_callback (char *start, size_t size, void *dummy)
+check_marked_callback (GCObject *obj, size_t size, void *dummy)
 {
+       char *start = (char*)obj;
        gboolean flag = (gboolean) (size_t) dummy;
-       mword desc;
+       SgenDescriptor desc;
 
        if (sgen_ptr_in_nursery (start)) {
                if (flag)
-                       SGEN_ASSERT (0, SGEN_OBJECT_IS_PINNED (start), "All objects remaining in the nursery must be pinned");
+                       SGEN_ASSERT (0, SGEN_OBJECT_IS_PINNED (obj), "All objects remaining in the nursery must be pinned");
        } else if (flag) {
-               if (!sgen_los_object_is_pinned (start))
+               if (!sgen_los_object_is_pinned (obj))
                        return;
        } else {
-               if (!major_collector.is_object_live (start))
+               if (!major_collector.is_object_live (obj))
                        return;
        }
 
-       desc = sgen_obj_get_descriptor_safe (start);
+       desc = sgen_obj_get_descriptor_safe (obj);
 
 #include "sgen-scan-object.h"
 }
@@ -665,7 +671,7 @@ sgen_debug_verify_nursery (gboolean do_dump_nursery_content)
                verify_scan_starts (cur, cur + size);
                is_array_fill = sgen_client_object_is_array_fill ((GCObject*)cur);
                if (do_dump_nursery_content) {
-                       GCVTable *vtable = SGEN_LOAD_VTABLE (cur);
+                       GCVTable vtable = SGEN_LOAD_VTABLE ((GCObject*)cur);
                        if (cur > hole_start)
                                SGEN_LOG (0, "HOLE [%p %p %d]", hole_start, cur, (int)(cur - hole_start));
                        SGEN_LOG (0, "OBJ  [%p %p %d %d %s.%s %d]", cur, cur + size, (int)size, (int)ss,
@@ -673,7 +679,7 @@ sgen_debug_verify_nursery (gboolean do_dump_nursery_content)
                                        is_array_fill);
                }
                if (nursery_canaries_enabled () && !is_array_fill) {
-                       CHECK_CANARY_FOR_OBJECT (cur);
+                       CHECK_CANARY_FOR_OBJECT ((GCObject*)cur);
                        CANARIFY_SIZE (size);
                }
                cur += size;
@@ -718,39 +724,40 @@ static gboolean scan_object_for_specific_ref_precise = TRUE;
 #undef HANDLE_PTR
 #define HANDLE_PTR(ptr,obj) do {                                       \
                if ((GCObject*)*(ptr) == key) {                         \
-                       GCVTable *vtable = SGEN_LOAD_VTABLE (*(ptr));   \
+                       GCVTable vtable = SGEN_LOAD_VTABLE (*(ptr));    \
                        g_print ("found ref to %p in object %p (%s.%s) at offset %zd\n", \
                                        key, (obj), sgen_client_vtable_get_namespace (vtable), sgen_client_vtable_get_name (vtable), ((char*)(ptr) - (char*)(obj))); \
                }                                                       \
        } while (0)
 
 static void
-scan_object_for_specific_ref (char *start, GCObject *key)
+scan_object_for_specific_ref (GCObject *obj, GCObject *key)
 {
-       char *forwarded;
+       GCObject *forwarded;
 
-       if ((forwarded = SGEN_OBJECT_IS_FORWARDED (start)))
-               start = forwarded;
+       if ((forwarded = SGEN_OBJECT_IS_FORWARDED (obj)))
+               obj = forwarded;
 
        if (scan_object_for_specific_ref_precise) {
-               mword desc = sgen_obj_get_descriptor_safe (start);
+               char *start = (char*)obj;
+               SgenDescriptor desc = sgen_obj_get_descriptor_safe (obj);
                #include "sgen-scan-object.h"
        } else {
-               mword *words = (mword*)start;
-               size_t size = safe_object_get_size ((GCObject*)start);
+               mword *words = (mword*)obj;
+               size_t size = safe_object_get_size (obj);
                int i;
                for (i = 0; i < size / sizeof (mword); ++i) {
                        if (words [i] == (mword)key) {
-                               GCVTable *vtable = SGEN_LOAD_VTABLE (start);
+                               GCVTable vtable = SGEN_LOAD_VTABLE (obj);
                                g_print ("found possible ref to %p in object %p (%s.%s) at offset %zd\n",
-                                               key, start, sgen_client_vtable_get_namespace (vtable), sgen_client_vtable_get_name (vtable), i * sizeof (mword));
+                                               key, obj, sgen_client_vtable_get_namespace (vtable), sgen_client_vtable_get_name (vtable), i * sizeof (mword));
                        }
                }
        }
 }
 
 static void
-scan_object_for_specific_ref_callback (char *obj, size_t size, GCObject *key)
+scan_object_for_specific_ref_callback (GCObject *obj, size_t size, GCObject *key)
 {
        scan_object_for_specific_ref (obj, key);
 }
@@ -767,7 +774,7 @@ static GCObject *check_key = NULL;
 static RootRecord *check_root = NULL;
 
 static void
-check_root_obj_specific_ref_from_marker (void **obj, void *gc_data)
+check_root_obj_specific_ref_from_marker (GCObject **obj, void *gc_data)
 {
        check_root_obj_specific_ref (check_root, check_key, *obj);
 }
@@ -780,7 +787,7 @@ scan_roots_for_specific_ref (GCObject *key, int root_type)
        check_key = key;
 
        SGEN_HASH_TABLE_FOREACH (&roots_hash [root_type], start_root, root) {
-               mword desc = root->root_desc;
+               SgenDescriptor desc = root->root_desc;
 
                check_root = root;
 
@@ -869,9 +876,9 @@ check_obj_not_in_domain (MonoObject **o)
 
 
 static void
-check_obj_not_in_domain_callback (void **o, void *gc_data)
+check_obj_not_in_domain_callback (GCObject **o, void *gc_data)
 {
-       g_assert (((MonoObject*)(*o))->vtable->domain != check_domain);
+       g_assert ((*o)->vtable->domain != check_domain);
 }
 
 void
@@ -881,7 +888,7 @@ sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type)
        RootRecord *root;
        check_domain = domain;
        SGEN_HASH_TABLE_FOREACH (&roots_hash [root_type], start_root, root) {
-               mword desc = root->root_desc;
+               SgenDescriptor desc = root->root_desc;
 
                /* The MonoDomain struct is allowed to hold
                   references to objects in its own domain. */
@@ -932,10 +939,10 @@ sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type)
 }
 
 static gboolean
-is_xdomain_ref_allowed (gpointer *ptr, char *obj, MonoDomain *domain)
+is_xdomain_ref_allowed (GCObject **ptr, GCObject *obj, MonoDomain *domain)
 {
        MonoObject *o = (MonoObject*)(obj);
-       MonoObject *ref = (MonoObject*)*(ptr);
+       MonoObject *ref = *ptr;
        size_t offset = (char*)(ptr) - (char*)o;
 
        if (o->vtable->klass == mono_defaults.thread_class && offset == G_STRUCT_OFFSET (MonoThread, internal_thread))
@@ -974,11 +981,10 @@ is_xdomain_ref_allowed (gpointer *ptr, char *obj, MonoDomain *domain)
 }
 
 static void
-check_reference_for_xdomain (gpointer *ptr, char *obj, MonoDomain *domain)
+check_reference_for_xdomain (GCObject **ptr, GCObject *obj, MonoDomain *domain)
 {
-       MonoObject *o = (MonoObject*)(obj);
-       MonoObject *ref = (MonoObject*)*(ptr);
-       size_t offset = (char*)(ptr) - (char*)o;
+       MonoObject *ref = *ptr;
+       size_t offset = (char*)(ptr) - (char*)obj;
        MonoClass *class;
        MonoClassField *field;
        char *str;
@@ -989,7 +995,7 @@ check_reference_for_xdomain (gpointer *ptr, char *obj, MonoDomain *domain)
                return;
 
        field = NULL;
-       for (class = o->vtable->klass; class; class = class->parent) {
+       for (class = obj->vtable->klass; class; class = class->parent) {
                int i;
 
                for (i = 0; i < class->field.count; ++i) {
@@ -1007,10 +1013,10 @@ check_reference_for_xdomain (gpointer *ptr, char *obj, MonoDomain *domain)
        else
                str = NULL;
        g_print ("xdomain reference in %p (%s.%s) at offset %d (%s) to %p (%s.%s) (%s)  -  pointed to by:\n",
-                       o, o->vtable->klass->name_space, o->vtable->klass->name,
+                       obj, obj->vtable->klass->name_space, obj->vtable->klass->name,
                        offset, field ? field->name : "",
                        ref, ref->vtable->klass->name_space, ref->vtable->klass->name, str ? str : "");
-       mono_gc_scan_for_specific_ref (o, TRUE);
+       mono_gc_scan_for_specific_ref (obj, TRUE);
        if (str)
                g_free (str);
 }
@@ -1019,11 +1025,12 @@ check_reference_for_xdomain (gpointer *ptr, char *obj, MonoDomain *domain)
 #define HANDLE_PTR(ptr,obj)    check_reference_for_xdomain ((ptr), (obj), domain)
 
 static void
-scan_object_for_xdomain_refs (char *start, mword size, void *data)
+scan_object_for_xdomain_refs (GCObject *obj, mword size, void *data)
 {
-       MonoVTable *vt = (MonoVTable*)SGEN_LOAD_VTABLE (start);
+       char *start = (char*)obj;
+       MonoVTable *vt = SGEN_LOAD_VTABLE (obj);
        MonoDomain *domain = vt->domain;
-       mword desc = sgen_vtable_get_descriptor ((GCVTable*)vt);
+       SgenDescriptor desc = sgen_vtable_get_descriptor (vt);
 
        #include "sgen-scan-object.h"
 }
@@ -1039,7 +1046,7 @@ sgen_check_for_xdomain_refs (void)
        major_collector.iterate_objects (ITERATE_OBJECTS_SWEEP_ALL, (IterateObjectCallbackFunc)scan_object_for_xdomain_refs, NULL);
 
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next)
-               scan_object_for_xdomain_refs (bigobj->data, sgen_los_object_size (bigobj), NULL);
+               scan_object_for_xdomain_refs ((GCObject*)bigobj->data, sgen_los_object_size (bigobj), NULL);
 }
 
 #endif
@@ -1064,7 +1071,7 @@ sgen_dump_section (GCMemSection *section, const char *type)
 
        while (start < end) {
                guint size;
-               //GCVTable *vt;
+               //GCVTable vt;
                //MonoClass *class;
 
                if (!*(void**)start) {
@@ -1080,7 +1087,7 @@ sgen_dump_section (GCMemSection *section, const char *type)
                if (!occ_start)
                        occ_start = start;
 
-               //vt = (GCVTable*)SGEN_LOAD_VTABLE (start);
+               //vt = SGEN_LOAD_VTABLE (start);
                //class = vt->klass;
 
                size = SGEN_ALIGN_UP (safe_object_get_size ((GCObject*) start));
@@ -1189,21 +1196,21 @@ sgen_debug_dump_heap (const char *type, int num, const char *reason)
        fprintf (heap_dump_file, "</collection>\n");
 }
 
-static char *found_obj;
+static GCObject *found_obj;
 
 static void
-find_object_for_ptr_callback (char *obj, size_t size, void *user_data)
+find_object_for_ptr_callback (GCObject *obj, size_t size, void *user_data)
 {
        char *ptr = user_data;
 
-       if (ptr >= obj && ptr < obj + size) {
+       if (ptr >= (char*)obj && ptr < (char*)obj + size) {
                g_assert (!found_obj);
                found_obj = obj;
        }
 }
 
 /* for use in the debugger */
-char*
+GCObject*
 sgen_find_object_for_ptr (char *ptr)
 {
        if (ptr >= nursery_section->data && ptr < nursery_section->end_data) {
index 4747c7ce29285183df516b3e5e568b516d094e90..1cae87f4bc201ba3fe8ba2810bedc3bf87a94910 100644 (file)
@@ -56,7 +56,7 @@ static int complex_descriptors_size = 0;
 static int complex_descriptors_next = 0;
 static SgenUserRootMarkFunc user_descriptors [MAX_USER_DESCRIPTORS];
 static int user_descriptors_next = 0;
-static void *all_ref_root_descrs [32];
+static SgenDescriptor all_ref_root_descrs [32];
 
 #ifdef HEAVY_STATISTICS
 static guint64 stat_scanned_count_per_descriptor [DESC_TYPE_MAX];
@@ -110,7 +110,7 @@ alloc_complex_descriptor (gsize *bitmap, int numbits)
 }
 
 gsize*
-sgen_get_complex_descriptor (mword desc)
+sgen_get_complex_descriptor (SgenDescriptor desc)
 {
        return complex_descriptors + (desc >> LOW_TYPE_BITS);
 }
@@ -118,11 +118,11 @@ sgen_get_complex_descriptor (mword desc)
 /*
  * Descriptor builders.
  */
-void*
+SgenDescriptor
 mono_gc_make_descr_for_object (gsize *bitmap, int numbits, size_t obj_size)
 {
        int first_set = -1, num_set = 0, last_set = -1, i;
-       mword desc = 0;
+       SgenDescriptor desc = 0;
        size_t stored_size = obj_size;
 
        stored_size += SGEN_ALLOC_ALIGN - 1;
@@ -140,8 +140,8 @@ mono_gc_make_descr_for_object (gsize *bitmap, int numbits, size_t obj_size)
        if (first_set < 0) {
                SGEN_LOG (6, "Ptrfree descriptor %p, size: %zd", (void*)desc, stored_size);
                if (stored_size <= MAX_RUNLEN_OBJECT_SIZE && stored_size <= SGEN_MAX_SMALL_OBJ_SIZE)
-                       return (void*)(DESC_TYPE_SMALL_PTRFREE | stored_size);
-               return (void*)DESC_TYPE_COMPLEX_PTRFREE;
+                       return DESC_TYPE_SMALL_PTRFREE | stored_size;
+               return DESC_TYPE_COMPLEX_PTRFREE;
        }
 
        g_assert (!(stored_size & 0x7));
@@ -152,7 +152,7 @@ mono_gc_make_descr_for_object (gsize *bitmap, int numbits, size_t obj_size)
        if (last_set < BITMAP_NUM_BITS + OBJECT_HEADER_WORDS && stored_size <= SGEN_MAX_SMALL_OBJ_SIZE) {
                desc = DESC_TYPE_BITMAP | ((*bitmap >> OBJECT_HEADER_WORDS) << LOW_TYPE_BITS);
                SGEN_LOG (6, "Largebitmap descriptor %p, size: %zd, last set: %d", (void*)desc, stored_size, last_set);
-               return (void*) desc;
+               return desc;
        }
 
        if (stored_size <= MAX_RUNLEN_OBJECT_SIZE && stored_size <= SGEN_MAX_SMALL_OBJ_SIZE) {
@@ -163,21 +163,21 @@ mono_gc_make_descr_for_object (gsize *bitmap, int numbits, size_t obj_size)
                if (first_set < 256 && num_set < 256 && (first_set + num_set == last_set + 1)) {
                        desc = DESC_TYPE_RUN_LENGTH | stored_size | (first_set << 16) | (num_set << 24);
                        SGEN_LOG (6, "Runlen descriptor %p, size: %zd, first set: %d, num set: %d", (void*)desc, stored_size, first_set, num_set);
-                       return (void*) desc;
+                       return desc;
                }
        }
 
        /* it's a complex object ... */
        desc = DESC_TYPE_COMPLEX | (alloc_complex_descriptor (bitmap, last_set + 1) << LOW_TYPE_BITS);
-       return (void*) desc;
+       return desc;
 }
 
 /* If the array holds references, numbits == 1 and the first bit is set in elem_bitmap */
-void*
+SgenDescriptor
 mono_gc_make_descr_for_array (int vector, gsize *elem_bitmap, int numbits, size_t elem_size)
 {
        int first_set = -1, num_set = 0, last_set = -1, i;
-       mword desc = DESC_TYPE_VECTOR | (vector ? VECTOR_KIND_SZARRAY : VECTOR_KIND_ARRAY);
+       SgenDescriptor desc = DESC_TYPE_VECTOR | (vector ? VECTOR_KIND_SZARRAY : VECTOR_KIND_ARRAY);
        for (i = 0; i < numbits; ++i) {
                if (elem_bitmap [i / GC_BITS_PER_WORD] & ((gsize)1 << (i % GC_BITS_PER_WORD))) {
                        if (first_set < 0)
@@ -189,36 +189,36 @@ mono_gc_make_descr_for_array (int vector, gsize *elem_bitmap, int numbits, size_
 
        if (first_set < 0) {
                if (elem_size <= MAX_ELEMENT_SIZE)
-                       return (void*)(desc | VECTOR_SUBTYPE_PTRFREE | (elem_size << VECTOR_ELSIZE_SHIFT));
-               return (void*)DESC_TYPE_COMPLEX_PTRFREE;
+                       return desc | VECTOR_SUBTYPE_PTRFREE | (elem_size << VECTOR_ELSIZE_SHIFT);
+               return DESC_TYPE_COMPLEX_PTRFREE;
        }
 
        if (elem_size <= MAX_ELEMENT_SIZE) {
                desc |= elem_size << VECTOR_ELSIZE_SHIFT;
                if (!num_set) {
-                       return (void*)(desc | VECTOR_SUBTYPE_PTRFREE);
+                       return desc | VECTOR_SUBTYPE_PTRFREE;
                }
                /* Note: we also handle structs with just ref fields */
                if (num_set * sizeof (gpointer) == elem_size) {
-                       return (void*)(desc | VECTOR_SUBTYPE_REFS | ((gssize)(-1) << 16));
+                       return desc | VECTOR_SUBTYPE_REFS | ((gssize)(-1) << 16);
                }
                /* FIXME: try run-len first */
                /* Note: we can't skip the object header here, because it's not present */
                if (last_set < VECTOR_BITMAP_SIZE) {
-                       return (void*)(desc | VECTOR_SUBTYPE_BITMAP | (*elem_bitmap << 16));
+                       return desc | VECTOR_SUBTYPE_BITMAP | (*elem_bitmap << 16);
                }
        }
        /* it's am array of complex structs ... */
        desc = DESC_TYPE_COMPLEX_ARR;
        desc |= alloc_complex_descriptor (elem_bitmap, last_set + 1) << LOW_TYPE_BITS;
-       return (void*) desc;
+       return desc;
 }
 
 /* Return the bitmap encoded by a descriptor */
 gsize*
-mono_gc_get_bitmap_for_descr (void *descr, int *numbits)
+mono_gc_get_bitmap_for_descr (SgenDescriptor descr, int *numbits)
 {
-       mword d = (mword)descr;
+       SgenDescriptor d = (SgenDescriptor)descr;
        gsize *bitmap;
 
        switch (d & DESC_TYPE_MASK) {
@@ -270,24 +270,24 @@ mono_gc_get_bitmap_for_descr (void *descr, int *numbits)
        }
 }
 
-void*
+SgenDescriptor
 mono_gc_make_descr_from_bitmap (gsize *bitmap, int numbits)
 {
        if (numbits == 0) {
-               return (void*)MAKE_ROOT_DESC (ROOT_DESC_BITMAP, 0);
+               return MAKE_ROOT_DESC (ROOT_DESC_BITMAP, 0);
        } else if (numbits < ((sizeof (*bitmap) * 8) - ROOT_DESC_TYPE_SHIFT)) {
-               return (void*)MAKE_ROOT_DESC (ROOT_DESC_BITMAP, bitmap [0]);
+               return MAKE_ROOT_DESC (ROOT_DESC_BITMAP, bitmap [0]);
        } else {
-               mword complex = alloc_complex_descriptor (bitmap, numbits);
-               return (void*)MAKE_ROOT_DESC (ROOT_DESC_COMPLEX, complex);
+               SgenDescriptor complex = alloc_complex_descriptor (bitmap, numbits);
+               return MAKE_ROOT_DESC (ROOT_DESC_COMPLEX, complex);
        }
 }
 
-void*
+SgenDescriptor
 mono_gc_make_root_descr_all_refs (int numbits)
 {
        gsize *gc_bitmap;
-       void *descr;
+       SgenDescriptor descr;
        int num_bytes = numbits / 8;
 
        if (numbits < 32 && all_ref_root_descrs [numbits])
@@ -310,33 +310,33 @@ mono_gc_make_root_descr_all_refs (int numbits)
        return descr;
 }
 
-void*
+SgenDescriptor
 sgen_make_user_root_descriptor (SgenUserRootMarkFunc marker)
 {
-       void *descr;
+       SgenDescriptor descr;
 
        g_assert (user_descriptors_next < MAX_USER_DESCRIPTORS);
-       descr = (void*)MAKE_ROOT_DESC (ROOT_DESC_USER, (mword)user_descriptors_next);
+       descr = MAKE_ROOT_DESC (ROOT_DESC_USER, (SgenDescriptor)user_descriptors_next);
        user_descriptors [user_descriptors_next ++] = marker;
 
        return descr;
 }
 
 void*
-sgen_get_complex_descriptor_bitmap (mword desc)
+sgen_get_complex_descriptor_bitmap (SgenDescriptor desc)
 {
        return complex_descriptors + (desc >> ROOT_DESC_TYPE_SHIFT);
 }
 
 SgenUserRootMarkFunc
-sgen_get_user_descriptor_func (mword desc)
+sgen_get_user_descriptor_func (SgenDescriptor desc)
 {
        return user_descriptors [desc >> ROOT_DESC_TYPE_SHIFT];
 }
 
 #ifdef HEAVY_STATISTICS
 void
-sgen_descriptor_count_scanned_object (mword desc)
+sgen_descriptor_count_scanned_object (SgenDescriptor desc)
 {
        int type = desc & DESC_TYPE_MASK;
        SGEN_ASSERT (0, type, "Descriptor type can't be zero");
@@ -344,7 +344,7 @@ sgen_descriptor_count_scanned_object (mword desc)
 }
 
 void
-sgen_descriptor_count_copied_object (mword desc)
+sgen_descriptor_count_copied_object (SgenDescriptor desc)
 {
        int type = desc & DESC_TYPE_MASK;
        SGEN_ASSERT (0, type, "Descriptor type can't be zero");
index 1a9d8cc37fe08dab75b868e63d67dd6e19c68486..c61fa5f74d6bda3391e959ce4b0b580a15d0cdf2 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <mono/sgen/sgen-conf.h>
 
-
 /*
  * ######################################################################
  * ########  GC descriptors
@@ -131,24 +130,24 @@ enum {
        ROOT_DESC_TYPE_SHIFT = 3,
 };
 
-typedef void (*SgenUserMarkFunc)     (void **addr, void *gc_data);
+typedef void (*SgenUserMarkFunc)     (GCObject **addr, void *gc_data);
 typedef void (*SgenUserRootMarkFunc) (void *addr, SgenUserMarkFunc mark_func, void *gc_data);
 
-void* sgen_make_user_root_descriptor (SgenUserRootMarkFunc marker);
+SgenDescriptor sgen_make_user_root_descriptor (SgenUserRootMarkFunc marker);
 
-gsize* sgen_get_complex_descriptor (mword desc);
-void* sgen_get_complex_descriptor_bitmap (mword desc);
-SgenUserRootMarkFunc sgen_get_user_descriptor_func (mword desc);
+gsize* sgen_get_complex_descriptor (SgenDescriptor desc);
+void* sgen_get_complex_descriptor_bitmap (SgenDescriptor desc);
+SgenUserRootMarkFunc sgen_get_user_descriptor_func (SgenDescriptor desc);
 
 void sgen_init_descriptors (void);
 
 #ifdef HEAVY_STATISTICS
-void sgen_descriptor_count_scanned_object (mword desc);
-void sgen_descriptor_count_copied_object (mword desc);
+void sgen_descriptor_count_scanned_object (SgenDescriptor desc);
+void sgen_descriptor_count_copied_object (SgenDescriptor desc);
 #endif
 
 static inline gboolean
-sgen_gc_descr_has_references (mword desc)
+sgen_gc_descr_has_references (SgenDescriptor desc)
 {
        /* This covers SMALL_PTRFREE and COMPLEX_PTRFREE */
        if ((desc & DESC_TYPE_PTRFREE_MASK) == DESC_TYPE_PTRFREE_BITS)
@@ -188,7 +187,7 @@ sgen_gc_descr_has_references (mword desc)
                        _objptr += ((desc) >> 16) & 0xff;       \
                        _objptr_end = _objptr + (((desc) >> 24) & 0xff);        \
                        while (_objptr < _objptr_end) { \
-                               HANDLE_PTR (_objptr, (obj));    \
+                               HANDLE_PTR ((GCObject**)_objptr, (obj)); \
                                _objptr++;      \
                        };      \
                }       \
@@ -207,7 +206,7 @@ sgen_gc_descr_has_references (mword desc)
                        int _index = GNUC_BUILTIN_CTZ (_bmap);  \
                        _objptr += _index;                      \
                        _bmap >>= (_index + 1);                 \
-                       HANDLE_PTR (_objptr, (obj));            \
+                       HANDLE_PTR ((GCObject**)_objptr, (obj));        \
                        ++_objptr;                              \
                } while (_bmap);                                \
        } while (0)
@@ -219,7 +218,7 @@ sgen_gc_descr_has_references (mword desc)
                _objptr += OBJECT_HEADER_WORDS; \
                do {    \
                        if ((_bmap & 1)) {      \
-                               HANDLE_PTR (_objptr, (obj));    \
+                               HANDLE_PTR ((GCObject**)_objptr, (obj));        \
                        }       \
                        _bmap >>= 1;    \
                        ++_objptr;      \
@@ -240,7 +239,7 @@ sgen_gc_descr_has_references (mword desc)
                        /*g_print ("bitmap: 0x%x/%d at %p\n", _bmap, bwords, _objptr);*/        \
                        while (_bmap) { \
                                if ((_bmap & 1)) {      \
-                                       HANDLE_PTR (_objptr, (obj));    \
+                                       HANDLE_PTR ((GCObject**)_objptr, (obj));        \
                                }       \
                                _bmap >>= 1;    \
                                ++_objptr;      \
@@ -252,7 +251,7 @@ sgen_gc_descr_has_references (mword desc)
 /* this one is untested */
 #define OBJ_COMPLEX_ARR_FOREACH_PTR(desc,obj)  do {    \
                /* there are pointers */        \
-               GCVTable *vt = (GCVTable*)SGEN_LOAD_VTABLE (obj); \
+               GCVTable vt = SGEN_LOAD_VTABLE (obj); \
                gsize *mbitmap_data = sgen_get_complex_descriptor ((desc)); \
                gsize mbwords = (*mbitmap_data++) - 1;  \
                gsize el_size = sgen_client_array_element_size (vt);    \
@@ -268,7 +267,7 @@ sgen_gc_descr_has_references (mword desc)
                                /*g_print ("bitmap: 0x%x\n", _bmap);*/  \
                                while (_bmap) { \
                                        if ((_bmap & 1)) {      \
-                                               HANDLE_PTR (_objptr, (obj));    \
+                                               HANDLE_PTR ((GCObject**)_objptr, (obj));        \
                                        }       \
                                        _bmap >>= 1;    \
                                        ++_objptr;      \
@@ -290,7 +289,7 @@ sgen_gc_descr_has_references (mword desc)
                                void **end_refs = (void**)((char*)p + el_size * sgen_client_array_length ((GCObject*)(obj)));   \
                                /* Note: this code can handle also arrays of struct with only references in them */     \
                                while (p < end_refs) {  \
-                                       HANDLE_PTR (p, (obj));  \
+                                       HANDLE_PTR ((GCObject**)p, (obj));      \
                                        ++p;    \
                                }       \
                        } else if (etype == DESC_TYPE_V_RUN_LEN << 14) {        \
@@ -303,7 +302,7 @@ sgen_gc_descr_has_references (mword desc)
                                        int i;  \
                                        p += offset;    \
                                        for (i = 0; i < num_refs; ++i) {        \
-                                               HANDLE_PTR (p + i, (obj));      \
+                                               HANDLE_PTR ((GCObject**)p + i, (obj));  \
                                        }       \
                                        e_start += el_size;     \
                                }       \
@@ -316,7 +315,7 @@ sgen_gc_descr_has_references (mword desc)
                                        /* Note: there is no object header here to skip */      \
                                        while (_bmap) { \
                                                if ((_bmap & 1)) {      \
-                                                       HANDLE_PTR (p, (obj));  \
+                                                       HANDLE_PTR ((GCObject**)p, (obj));      \
                                                }       \
                                                _bmap >>= 1;    \
                                                ++p;    \
index 047d9a41169ca2a30675e6e9f947c1498f912daf..a0994b9a1be1c9d03f2fd0285c0713ab514f4e41 100644 (file)
@@ -115,7 +115,7 @@ sgen_collect_bridge_objects (int generation, ScanCopyContext ctx)
        SgenHashTable *hash_table = get_finalize_entry_hash_table (generation);
        GCObject *object;
        gpointer dummy G_GNUC_UNUSED;
-       char *copy;
+       GCObject *copy;
        SgenPointerQueue moved_fin_objects;
 
        sgen_pointer_queue_init (&moved_fin_objects, INTERNAL_MEM_TEMPORARY);
@@ -132,7 +132,7 @@ sgen_collect_bridge_objects (int generation, ScanCopyContext ctx)
                        continue;
 
                /* Object is a bridge object and major heap says it's dead  */
-               if (major_collector.is_object_live ((char*)object))
+               if (major_collector.is_object_live (object))
                        continue;
 
                /* Nursery says the object is dead. */
@@ -142,10 +142,10 @@ sgen_collect_bridge_objects (int generation, ScanCopyContext ctx)
                if (!sgen_client_bridge_is_bridge_object (object))
                        continue;
 
-               copy = (char*)object;
-               copy_func ((void**)&copy, queue);
+               copy = object;
+               copy_func (&copy, queue);
 
-               sgen_client_bridge_register_finalized_object ((GCObject*)copy);
+               sgen_client_bridge_register_finalized_object (copy);
                
                if (hash_table == &minor_finalizable_hash && !ptr_in_nursery (copy)) {
                        /* remove from the list */
@@ -157,7 +157,7 @@ sgen_collect_bridge_objects (int generation, ScanCopyContext ctx)
                        SGEN_LOG (5, "Promoting finalization of object %p (%s) (was at %p) to major table", copy, sgen_client_vtable_get_name (SGEN_LOAD_VTABLE (copy)), object);
 
                        continue;
-               } else if (copy != (char*)object) {
+               } else if (copy != object) {
                        /* update pointer */
                        SGEN_HASH_TABLE_FOREACH_REMOVE (TRUE);
 
@@ -196,10 +196,10 @@ sgen_finalize_in_range (int generation, ScanCopyContext ctx)
        SGEN_HASH_TABLE_FOREACH (hash_table, object, dummy) {
                int tag = tagged_object_get_tag (object);
                object = tagged_object_get_object (object);
-               if (!major_collector.is_object_live ((char*)object)) {
+               if (!major_collector.is_object_live (object)) {
                        gboolean is_fin_ready = sgen_gc_is_object_ready_for_finalization (object);
                        GCObject *copy = object;
-                       copy_func ((void**)&copy, queue);
+                       copy_func (&copy, queue);
                        if (is_fin_ready) {
                                /* remove and put in fin_ready_list */
                                SGEN_HASH_TABLE_FOREACH_REMOVE (TRUE);
@@ -251,12 +251,12 @@ register_for_finalization (GCObject *obj, void *user_data, int generation)
 
        if (user_data) {
                if (sgen_hash_table_replace (hash_table, obj, NULL, NULL)) {
-                       GCVTable *vt = SGEN_LOAD_VTABLE_UNCHECKED (obj);
+                       GCVTable vt = SGEN_LOAD_VTABLE_UNCHECKED (obj);
                        SGEN_LOG (5, "Added finalizer for object: %p (%s) (%d) to %s table", obj, sgen_client_vtable_get_name (vt), hash_table->num_entries, sgen_generation_name (generation));
                }
        } else {
                if (sgen_hash_table_remove (hash_table, obj, NULL)) {
-                       GCVTable *vt = SGEN_LOAD_VTABLE_UNCHECKED (obj);
+                       GCVTable vt = SGEN_LOAD_VTABLE_UNCHECKED (obj);
                        SGEN_LOG (5, "Removed finalizer for object: %p (%s) (%d)", obj, sgen_client_vtable_get_name (vt), hash_table->num_entries);
                }
        }
@@ -672,7 +672,7 @@ sgen_null_link_in_range (int generation, gboolean before_finalization, ScanCopyC
        SgenHashTable *hash = get_dislink_hash_table (generation);
 
        SGEN_HASH_TABLE_FOREACH (hash, link, dummy) {
-               char *object;
+               GCObject *object;
                gboolean track;
 
                /*
@@ -716,8 +716,8 @@ sgen_null_link_in_range (int generation, gboolean before_finalization, ScanCopyC
                                        SGEN_HASH_TABLE_FOREACH_REMOVE (TRUE);
                                        continue;
                                } else {
-                                       char *copy = object;
-                                       copy_func ((void**)&copy, queue);
+                                       GCObject *copy = object;
+                                       copy_func (&copy, queue);
 
                                        /* Update pointer if it's moved.  If the object
                                         * has been moved out of the nursery, we need to
@@ -732,7 +732,7 @@ sgen_null_link_in_range (int generation, gboolean before_finalization, ScanCopyC
 
                                                g_assert (copy);
                                                *link = HIDE_POINTER (copy, track);
-                                               add_or_remove_disappearing_link ((GCObject*)copy, link, GENERATION_OLD);
+                                               add_or_remove_disappearing_link (copy, link, GENERATION_OLD);
                                                binary_protocol_dislink_update (link, copy, track, 0);
 
                                                SGEN_LOG (5, "Upgraded dislink at %p to major because object %p moved to %p", link, object, copy);
index 5d8cb5db3fe62e0a116be9f0b53be5707c67b603..a24badfaf7c185d8a870932a9ed92ad26f23face 100644 (file)
@@ -484,9 +484,9 @@ sgen_scan_area_with_callback (char *start, char *end, IterateObjectCallbackFunc
                }
 
                if (!sgen_client_object_is_array_fill ((GCObject*)obj)) {
-                       CHECK_CANARY_FOR_OBJECT (obj);
+                       CHECK_CANARY_FOR_OBJECT ((GCObject*)obj);
                        size = ALIGN_UP (safe_object_get_size ((GCObject*)obj));
-                       callback (obj, size, data);
+                       callback ((GCObject*)obj, size, data);
                        CANARIFY_SIZE (size);
                } else {
                        size = ALIGN_UP (safe_object_get_size ((GCObject*)obj));
@@ -554,8 +554,8 @@ sgen_drain_gray_stack (int max_objs, ScanCopyContext ctx)
        do {
                int i;
                for (i = 0; i != max_objs; ++i) {
-                       char *obj;
-                       mword desc;
+                       GCObject *obj;
+                       SgenDescriptor desc;
                        GRAY_OBJECT_DEQUEUE (queue, &obj, &desc);
                        if (!obj)
                                return TRUE;
@@ -594,9 +594,9 @@ pin_objects_from_nursery_pin_queue (gboolean do_scan_objects, ScanCopyContext ct
        sgen_nursery_allocator_prepare_for_pinning ();
 
        while (start < end) {
-               void *obj_to_pin = NULL;
+               GCObject *obj_to_pin = NULL;
                size_t obj_to_pin_size = 0;
-               mword desc;
+               SgenDescriptor desc;
 
                addr = *start;
 
@@ -669,7 +669,7 @@ pin_objects_from_nursery_pin_queue (gboolean do_scan_objects, ScanCopyContext ct
 
                                if (addr >= search_start && (char*)addr < (char*)search_start + obj_size) {
                                        /* This is the object we're looking for. */
-                                       obj_to_pin = search_start;
+                                       obj_to_pin = (GCObject*)search_start;
                                        obj_to_pin_size = canarified_obj_size;
                                        break;
                                }
@@ -695,7 +695,7 @@ pin_objects_from_nursery_pin_queue (gboolean do_scan_objects, ScanCopyContext ct
                 * If this is a dummy array marking the beginning of a nursery
                 * fragment, we don't pin it.
                 */
-               if (sgen_client_object_is_array_fill ((GCObject*)obj_to_pin))
+               if (sgen_client_object_is_array_fill (obj_to_pin))
                        goto next_pin_queue_entry;
 
                /*
@@ -744,7 +744,7 @@ pin_objects_in_nursery (gboolean do_scan_objects, ScanCopyContext ctx)
  * when we can't promote an object because we're out of memory.
  */
 void
-sgen_pin_object (void *object, GrayQueue *queue)
+sgen_pin_object (GCObject *object, GrayQueue *queue)
 {
        /*
         * All pinned objects are assumed to have been staged, so we need to stage as well.
@@ -889,8 +889,8 @@ static void
 unpin_objects_from_queue (SgenGrayQueue *queue)
 {
        for (;;) {
-               char *addr;
-               mword desc;
+               GCObject *addr;
+               SgenDescriptor desc;
                GRAY_OBJECT_DEQUEUE (queue, &addr, &desc);
                if (!addr)
                        break;
@@ -900,7 +900,7 @@ unpin_objects_from_queue (SgenGrayQueue *queue)
 }
 
 static void
-single_arg_user_copy_or_mark (void **obj, void *gc_data)
+single_arg_user_copy_or_mark (GCObject **obj, void *gc_data)
 {
        ScanCopyContext *ctx = gc_data;
        ctx->ops->copy_or_mark_object (obj, ctx->queue);
@@ -915,7 +915,7 @@ single_arg_user_copy_or_mark (void **obj, void *gc_data)
  * This function is not thread-safe!
  */
 static void
-precisely_scan_objects_from (void** start_root, void** end_root, char* n_start, char *n_end, mword desc, ScanCopyContext ctx)
+precisely_scan_objects_from (void** start_root, void** end_root, char* n_start, char *n_end, SgenDescriptor desc, ScanCopyContext ctx)
 {
        CopyOrMarkObjectFunc copy_func = ctx.ops->copy_or_mark_object;
        SgenGrayQueue *queue = ctx.queue;
@@ -925,7 +925,7 @@ precisely_scan_objects_from (void** start_root, void** end_root, char* n_start,
                desc >>= ROOT_DESC_TYPE_SHIFT;
                while (desc) {
                        if ((desc & 1) && *start_root) {
-                               copy_func (start_root, queue);
+                               copy_func ((GCObject**)start_root, queue);
                                SGEN_LOG (9, "Overwrote root at %p with %p", start_root, *start_root);
                        }
                        desc >>= 1;
@@ -942,7 +942,7 @@ precisely_scan_objects_from (void** start_root, void** end_root, char* n_start,
                        void **objptr = start_run;
                        while (bmap) {
                                if ((bmap & 1) && *objptr) {
-                                       copy_func (objptr, queue);
+                                       copy_func ((GCObject**)objptr, queue);
                                        SGEN_LOG (9, "Overwrote root at %p with %p", objptr, *objptr);
                                }
                                bmap >>= 1;
@@ -1045,11 +1045,11 @@ scan_finalizer_entries (SgenPointerQueue *fin_queue, ScanCopyContext ctx)
        size_t i;
 
        for (i = 0; i < fin_queue->next_slot; ++i) {
-               void *obj = fin_queue->data [i];
+               GCObject *obj = fin_queue->data [i];
                if (!obj)
                        continue;
                SGEN_LOG (5, "Scan of fin ready object: %p (%s)\n", obj, sgen_client_vtable_get_name (SGEN_LOAD_VTABLE (obj)));
-               copy_func (&fin_queue->data [i], queue);
+               copy_func ((GCObject**)&fin_queue->data [i], queue);
        }
 }
 
@@ -1672,7 +1672,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
 }
 
 static void
-scan_nursery_objects_callback (char *obj, size_t size, ScanCopyContext *ctx)
+scan_nursery_objects_callback (GCObject *obj, size_t size, ScanCopyContext *ctx)
 {
        /*
         * This is called on all objects in the nursery, including pinned ones, so we need
@@ -1796,8 +1796,8 @@ major_copy_or_mark_from_roots (size_t *old_next_pin_slot, CopyOrMarkFromRootsMod
        SGEN_LOG (6, "Pinning from large objects");
        for (bigobj = los_object_list; bigobj; bigobj = bigobj->next) {
                size_t dummy;
-               if (sgen_find_optimized_pin_queue_area (bigobj->data, (char*)bigobj->data + sgen_los_object_size (bigobj), &dummy, &dummy)) {
-                       binary_protocol_pin (bigobj->data, (gpointer)LOAD_VTABLE (bigobj->data), safe_object_get_size (((GCObject*)(bigobj->data))));
+               if (sgen_find_optimized_pin_queue_area ((char*)bigobj->data, (char*)bigobj->data + sgen_los_object_size (bigobj), &dummy, &dummy)) {
+                       binary_protocol_pin (bigobj->data, (gpointer)LOAD_VTABLE (bigobj->data), safe_object_get_size (bigobj->data));
 
                        if (sgen_los_object_is_pinned (bigobj->data)) {
                                SGEN_ASSERT (0, mode == COPY_OR_MARK_FROM_ROOTS_FINISH_CONCURRENT, "LOS objects can only be pinned here after concurrent marking.");
@@ -1805,8 +1805,8 @@ major_copy_or_mark_from_roots (size_t *old_next_pin_slot, CopyOrMarkFromRootsMod
                        }
                        sgen_los_pin_object (bigobj->data);
                        if (SGEN_OBJECT_HAS_REFERENCES (bigobj->data))
-                               GRAY_OBJECT_ENQUEUE (WORKERS_DISTRIBUTE_GRAY_QUEUE, bigobj->data, sgen_obj_get_descriptor (bigobj->data));
-                       sgen_pin_stats_register_object ((char*) bigobj->data, safe_object_get_size ((GCObject*) bigobj->data));
+                               GRAY_OBJECT_ENQUEUE (WORKERS_DISTRIBUTE_GRAY_QUEUE, bigobj->data, sgen_obj_get_descriptor ((GCObject*)bigobj->data));
+                       sgen_pin_stats_register_object (bigobj->data, safe_object_get_size (bigobj->data));
                        SGEN_LOG (6, "Marked large object %p (%s) size: %lu from roots", bigobj->data,
                                        sgen_client_vtable_get_name (SGEN_LOAD_VTABLE (bigobj->data)),
                                        (unsigned long)sgen_los_object_size (bigobj));
@@ -2468,7 +2468,7 @@ report_internal_mem_usage (void)
  * Return TRUE if @obj is ready to be finalized.
  */
 static inline gboolean
-sgen_is_object_alive (void *object)
+sgen_is_object_alive (GCObject *object)
 {
        if (ptr_in_nursery (object))
                return sgen_nursery_is_object_alive (object);
@@ -2482,7 +2482,7 @@ sgen_is_object_alive (void *object)
  * are never alive during a minor collection.
  */
 static inline int
-sgen_is_object_alive_and_on_current_collection (char *object)
+sgen_is_object_alive_and_on_current_collection (GCObject *object)
 {
        if (ptr_in_nursery (object))
                return sgen_nursery_is_object_alive (object);
@@ -2495,7 +2495,7 @@ sgen_is_object_alive_and_on_current_collection (char *object)
 
 
 gboolean
-sgen_gc_is_object_ready_for_finalization (void *object)
+sgen_gc_is_object_ready_for_finalization (GCObject *object)
 {
        return !sgen_is_object_alive (object);
 }
@@ -2511,7 +2511,7 @@ sgen_queue_finalization_entry (GCObject *obj)
 }
 
 gboolean
-sgen_object_is_live (void *obj)
+sgen_object_is_live (GCObject *obj)
 {
        return sgen_is_object_alive_and_on_current_collection (obj);
 }
@@ -2538,7 +2538,7 @@ sgen_gc_invoke_finalizers (void)
 
        /* FIXME: batch to reduce lock contention */
        while (sgen_have_pending_finalizers ()) {
-               void *obj;
+               GCObject *obj;
 
                LOCK_GC;
 
@@ -2596,7 +2596,7 @@ sgen_have_pending_finalizers (void)
  * We do not coalesce roots.
  */
 int
-sgen_register_root (char *start, size_t size, void *descr, int root_type)
+sgen_register_root (char *start, size_t size, SgenDescriptor descr, int root_type)
 {
        RootRecord new_root;
        int i;
@@ -2607,9 +2607,8 @@ sgen_register_root (char *start, size_t size, void *descr, int root_type)
                if (root) {
                        size_t old_size = root->end_root - start;
                        root->end_root = start + size;
-                       g_assert (((root->root_desc != 0) && (descr != NULL)) ||
-                                         ((root->root_desc == 0) && (descr == NULL)));
-                       root->root_desc = (mword)descr;
+                       SGEN_ASSERT (0, !!root->root_desc == !!descr, "Can't change whether a root is precise or conservative.");
+                       root->root_desc = descr;
                        roots_size += size;
                        roots_size -= old_size;
                        UNLOCK_GC;
@@ -2618,12 +2617,12 @@ sgen_register_root (char *start, size_t size, void *descr, int root_type)
        }
 
        new_root.end_root = start + size;
-       new_root.root_desc = (mword)descr;
+       new_root.root_desc = descr;
 
        sgen_hash_table_replace (&roots_hash [root_type], start, &new_root, NULL);
        roots_size += size;
 
-       SGEN_LOG (3, "Added root for range: %p-%p, descr: %p  (%d/%d bytes)", start, new_root.end_root, descr, (int)size, (int)roots_size);
+       SGEN_LOG (3, "Added root for range: %p-%p, descr: %llx  (%d/%d bytes)", start, new_root.end_root, descr, (int)size, (int)roots_size);
 
        UNLOCK_GC;
        return TRUE;
index 0fb1b3a1065f4296227dc0d5e567f65c785135fa..bc1b131f508a1a0adf327a9d07ad26a0f2a5a8e3 100644 (file)
@@ -41,8 +41,6 @@ typedef struct _SgenThreadInfo SgenThreadInfo;
 #include "mono/utils/atomic.h"
 #include "mono/utils/mono-mutex.h"
 #include "mono/sgen/sgen-conf.h"
-#include "mono/sgen/sgen-descriptor.h"
-#include "mono/sgen/sgen-gray.h"
 #include "mono/sgen/sgen-hash-table.h"
 #include "mono/sgen/sgen-protocol.h"
 
@@ -276,7 +274,7 @@ sgen_get_nursery_end (void)
  * Since we set bits in the vtable, use the macro to load it from the pointer to
  * an object that is potentially pinned.
  */
-#define SGEN_LOAD_VTABLE(obj)          SGEN_POINTER_UNTAG_ALL (SGEN_LOAD_VTABLE_UNCHECKED ((obj)))
+#define SGEN_LOAD_VTABLE(obj)          ((GCVTable)(SGEN_POINTER_UNTAG_ALL (SGEN_LOAD_VTABLE_UNCHECKED ((obj)))))
 
 /*
 List of what each bit on of the vtable gc bits means. 
@@ -287,37 +285,12 @@ enum {
        SGEN_GC_BIT_FINALIZER_AWARE = 4,
 };
 
-/* the runtime can register areas of memory as roots: we keep two lists of roots,
- * a pinned root set for conservatively scanned roots and a normal one for
- * precisely scanned roots (currently implemented as a single list).
- */
-typedef struct _RootRecord RootRecord;
-struct _RootRecord {
-       char *end_root;
-       mword root_desc;
-};
-
-enum {
-       ROOT_TYPE_NORMAL = 0, /* "normal" roots */
-       ROOT_TYPE_PINNED = 1, /* roots without a GC descriptor */
-       ROOT_TYPE_WBARRIER = 2, /* roots with a write barrier */
-       ROOT_TYPE_NUM
-};
-
-extern SgenHashTable roots_hash [ROOT_TYPE_NUM];
-
-int sgen_register_root (char *start, size_t size, void *descr, int root_type);
-void sgen_deregister_root (char* addr);
-
-typedef void (*IterateObjectCallbackFunc) (char*, size_t, void*);
-
 void sgen_gc_init (void);
 
 void sgen_os_init (void);
 
 void sgen_update_heap_boundaries (mword low, mword high);
 
-void sgen_scan_area_with_callback (char *start, char *end, IterateObjectCallbackFunc callback, void *data, gboolean allow_flags);
 void sgen_check_section_scan_starts (GCMemSection *section);
 
 void sgen_conservatively_pin_objects_from (void **start, void **end, void *start_nursery, void *end_nursery, int pin_type);
@@ -384,6 +357,35 @@ void sgen_init_internal_allocator (void);
 #endif
 #undef SGEN_DEFINE_OBJECT_VTABLE
 
+#include "mono/sgen/sgen-descriptor.h"
+#include "mono/sgen/sgen-gray.h"
+
+/* the runtime can register areas of memory as roots: we keep two lists of roots,
+ * a pinned root set for conservatively scanned roots and a normal one for
+ * precisely scanned roots (currently implemented as a single list).
+ */
+typedef struct _RootRecord RootRecord;
+struct _RootRecord {
+       char *end_root;
+       SgenDescriptor root_desc;
+};
+
+enum {
+       ROOT_TYPE_NORMAL = 0, /* "normal" roots */
+       ROOT_TYPE_PINNED = 1, /* roots without a GC descriptor */
+       ROOT_TYPE_WBARRIER = 2, /* roots with a write barrier */
+       ROOT_TYPE_NUM
+};
+
+extern SgenHashTable roots_hash [ROOT_TYPE_NUM];
+
+int sgen_register_root (char *start, size_t size, SgenDescriptor descr, int root_type);
+void sgen_deregister_root (char* addr);
+
+typedef void (*IterateObjectCallbackFunc) (GCObject*, size_t, void*);
+
+void sgen_scan_area_with_callback (char *start, char *end, IterateObjectCallbackFunc callback, void *data, gboolean allow_flags);
+
 /* eventually share with MonoThread? */
 /*
  * This structure extends the MonoThreadInfo structure.
@@ -406,9 +408,9 @@ struct _SgenThreadInfo {
 
 gboolean sgen_is_worker_thread (MonoNativeThreadId thread);
 
-typedef void (*CopyOrMarkObjectFunc) (void**, SgenGrayQueue*);
-typedef void (*ScanObjectFunc) (char *obj, mword desc, SgenGrayQueue*);
-typedef void (*ScanVTypeFunc) (char *full_object, char *start, mword desc, SgenGrayQueue* BINARY_PROTOCOL_ARG (size_t size));
+typedef void (*CopyOrMarkObjectFunc) (GCObject**, SgenGrayQueue*);
+typedef void (*ScanObjectFunc) (GCObject *obj, SgenDescriptor desc, SgenGrayQueue*);
+typedef void (*ScanVTypeFunc) (GCObject *full_object, char *start, SgenDescriptor desc, SgenGrayQueue* BINARY_PROTOCOL_ARG (size_t size));
 
 typedef struct {
        CopyOrMarkObjectFunc copy_or_mark_object;
@@ -439,8 +441,8 @@ void* sgen_alloc_internal_dynamic (size_t size, int type, gboolean assert_on_fai
 void sgen_free_internal_dynamic (void *addr, size_t size, int type);
 
 void sgen_pin_stats_enable (void);
-void sgen_pin_stats_register_object (char *obj, size_t size);
-void sgen_pin_stats_register_global_remset (char *obj);
+void sgen_pin_stats_register_object (GCObject *obj, size_t size);
+void sgen_pin_stats_register_global_remset (GCObject *obj);
 void sgen_pin_stats_print_class_stats (void);
 
 void sgen_sort_addresses (void **array, size_t size);
@@ -497,9 +499,9 @@ extern char *sgen_space_bitmap;
 extern size_t sgen_space_bitmap_size;
 
 static inline gboolean
-sgen_nursery_is_to_space (char *object)
+sgen_nursery_is_to_space (void *object)
 {
-       size_t idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
+       size_t idx = ((char*)object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
        size_t byte = idx >> 3;
        size_t bit = idx & 0x7;
 
@@ -510,13 +512,13 @@ sgen_nursery_is_to_space (char *object)
 }
 
 static inline gboolean
-sgen_nursery_is_from_space (char *object)
+sgen_nursery_is_from_space (void *object)
 {
        return !sgen_nursery_is_to_space (object);
 }
 
 static inline gboolean
-sgen_nursery_is_object_alive (char *obj)
+sgen_nursery_is_object_alive (GCObject *obj)
 {
        /* FIXME put this asserts under a non default level */
        g_assert (sgen_ptr_in_nursery (obj));
@@ -533,7 +535,7 @@ sgen_nursery_is_object_alive (char *obj)
 typedef struct {
        gboolean is_split;
 
-       char* (*alloc_for_promotion) (GCVTable *vtable, char *obj, size_t objsize, gboolean has_references);
+       GCObject* (*alloc_for_promotion) (GCVTable vtable, GCObject *obj, size_t objsize, gboolean has_references);
 
        SgenObjectOperations serial_ops;
 
@@ -558,7 +560,7 @@ void sgen_split_nursery_init (SgenMinorCollector *collector);
 #ifdef SGEN_CHECK_UPDATE_REFERENCE
 gboolean sgen_thread_pool_is_thread_pool_thread (MonoNativeThreadId some_thread) MONO_INTERNAL;
 static inline void
-sgen_update_reference (void **p, void *o, gboolean allow_null)
+sgen_update_reference (GCObject **p, GCObject *o, gboolean allow_null)
 {
        if (!allow_null)
                SGEN_ASSERT (0, o, "Cannot update a reference with a NULL pointer");
@@ -566,10 +568,10 @@ sgen_update_reference (void **p, void *o, gboolean allow_null)
        *p = o;
 }
 
-#define SGEN_UPDATE_REFERENCE_ALLOW_NULL(p,o)  sgen_update_reference ((void**)(p), (void*)(o), TRUE)
-#define SGEN_UPDATE_REFERENCE(p,o)             sgen_update_reference ((void**)(p), (void*)(o), FALSE)
+#define SGEN_UPDATE_REFERENCE_ALLOW_NULL(p,o)  sgen_update_reference ((GCObject**)(p), (GCObject*)(o), TRUE)
+#define SGEN_UPDATE_REFERENCE(p,o)             sgen_update_reference ((GCObject**)(p), (GCObject*)(o), FALSE)
 #else
-#define SGEN_UPDATE_REFERENCE_ALLOW_NULL(p,o)  (*(void**)(p) = (void*)(o))
+#define SGEN_UPDATE_REFERENCE_ALLOW_NULL(p,o)  (*(GCObject**)(p) = (GCObject*)(o))
 #define SGEN_UPDATE_REFERENCE(p,o)             SGEN_UPDATE_REFERENCE_ALLOW_NULL ((p), (o))
 #endif
 
@@ -610,17 +612,17 @@ struct _SgenMajorCollector {
        gboolean *want_synchronous_collection;
 
        void* (*alloc_heap) (mword nursery_size, mword nursery_align, int nursery_bits);
-       gboolean (*is_object_live) (char *obj);
-       void* (*alloc_small_pinned_obj) (GCVTable *vtable, size_t size, gboolean has_references);
-       void* (*alloc_degraded) (GCVTable *vtable, size_t size);
+       gboolean (*is_object_live) (GCObject *obj);
+       GCObject* (*alloc_small_pinned_obj) (GCVTable vtable, size_t size, gboolean has_references);
+       GCObject* (*alloc_degraded) (GCVTable vtable, size_t size);
 
        SgenObjectOperations major_ops_serial;
        SgenObjectOperations major_ops_concurrent_start;
        SgenObjectOperations major_ops_concurrent;
        SgenObjectOperations major_ops_concurrent_finish;
 
-       void* (*alloc_object) (GCVTable *vtable, size_t size, gboolean has_references);
-       void (*free_pinned_object) (char *obj, size_t size);
+       GCObject* (*alloc_object) (GCVTable vtable, size_t size, gboolean has_references);
+       void (*free_pinned_object) (GCObject *obj, size_t size);
 
        /*
         * This is used for domain unloading, heap walking from the logging profiler, and
@@ -628,9 +630,9 @@ struct _SgenMajorCollector {
         */
        void (*iterate_objects) (IterateObjectsFlags flags, IterateObjectCallbackFunc callback, void *data);
 
-       void (*free_non_pinned_object) (char *obj, size_t size);
+       void (*free_non_pinned_object) (GCObject *obj, size_t size);
        void (*pin_objects) (SgenGrayQueue *queue);
-       void (*pin_major_object) (char *obj, SgenGrayQueue *queue);
+       void (*pin_major_object) (GCObject *obj, SgenGrayQueue *queue);
        void (*scan_card_table) (gboolean mod_union, ScanCopyContext ctx);
        void (*iterate_live_block_ranges) (sgen_cardtable_block_callback callback);
        void (*update_cardtable_mod_union) (void);
@@ -648,16 +650,16 @@ struct _SgenMajorCollector {
        void (*finish_major_collection) (ScannedObjectCounts *counts);
        gboolean (*drain_gray_stack) (ScanCopyContext ctx);
        gboolean (*ptr_is_in_non_pinned_space) (char *ptr, char **start);
-       gboolean (*obj_is_from_pinned_alloc) (char *obj);
+       gboolean (*ptr_is_from_pinned_alloc) (char *ptr);
        void (*report_pinned_memory_usage) (void);
        size_t (*get_num_major_sections) (void);
        size_t (*get_bytes_survived_last_sweep) (void);
        gboolean (*handle_gc_param) (const char *opt);
        void (*print_gc_param_usage) (void);
        void (*post_param_init) (SgenMajorCollector *collector);
-       gboolean (*is_valid_object) (char *object);
-       GCVTable* (*describe_pointer) (char *pointer);
-       guint8* (*get_cardtable_mod_union_for_object) (char *object);
+       gboolean (*is_valid_object) (char *ptr);
+       GCVTable (*describe_pointer) (char *pointer);
+       guint8* (*get_cardtable_mod_union_for_reference) (char *object);
        long long (*get_and_reset_num_major_objects_marked) (void);
        void (*count_cards) (long long *num_total_cards, long long *num_marked_cards);
 };
@@ -702,30 +704,33 @@ void mono_gc_wbarrier_generic_store_atomic (gpointer ptr, GCObject *value);
 
 void sgen_wbarrier_value_copy_bitmap (gpointer _dest, gpointer _src, int size, unsigned bitmap);
 
-static inline mword
-sgen_obj_get_descriptor (char *obj)
+static inline SgenDescriptor
+sgen_obj_get_descriptor (GCObject *obj)
 {
-       GCVTable *vtable = SGEN_LOAD_VTABLE_UNCHECKED (obj);
+       GCVTable vtable = SGEN_LOAD_VTABLE_UNCHECKED (obj);
        SGEN_ASSERT (9, !SGEN_POINTER_IS_TAGGED_ANY (vtable), "Object can't be tagged");
        return sgen_vtable_get_descriptor (vtable);
 }
 
-static inline mword
-sgen_obj_get_descriptor_safe (char *obj)
+static inline SgenDescriptor
+sgen_obj_get_descriptor_safe (GCObject *obj)
 {
-       GCVTable *vtable = (GCVTable*)SGEN_LOAD_VTABLE (obj);
+       GCVTable vtable = SGEN_LOAD_VTABLE (obj);
        return sgen_vtable_get_descriptor (vtable);
 }
 
+static mword sgen_client_par_object_get_size (GCVTable vtable, GCObject* o);
+static mword sgen_client_slow_object_get_size (GCVTable vtable, GCObject* o);
+
 static inline mword
 sgen_safe_object_get_size (GCObject *obj)
 {
-       char *forwarded;
+       GCObject *forwarded;
 
        if ((forwarded = SGEN_OBJECT_IS_FORWARDED (obj)))
-               obj = (GCObject*)forwarded;
+               obj = forwarded;
 
-       return sgen_client_par_object_get_size ((GCVTable*)SGEN_LOAD_VTABLE (obj), obj);
+       return sgen_client_par_object_get_size (SGEN_LOAD_VTABLE (obj), obj);
 }
 
 static inline gboolean
@@ -743,13 +748,13 @@ sgen_safe_object_is_small (GCObject *obj, int type)
 static inline guint
 sgen_safe_object_get_size_unaligned (GCObject *obj)
 {
-       char *forwarded;
+       GCObject *forwarded;
 
-       if ((forwarded = SGEN_OBJECT_IS_FORWARDED (obj))) {
-               obj = (GCObject*)forwarded;
-       }
+       if ((forwarded = SGEN_OBJECT_IS_FORWARDED (obj))) {
+               obj = (GCObject*)forwarded;
+       }
 
-       return sgen_client_slow_object_get_size ((GCVTable*)SGEN_LOAD_VTABLE (obj), obj);
+       return sgen_client_slow_object_get_size (SGEN_LOAD_VTABLE (obj), obj);
 }
 
 #ifdef SGEN_CLIENT_HEADER
@@ -758,7 +763,7 @@ sgen_safe_object_get_size_unaligned (GCObject *obj)
 #include "metadata/sgen-client-mono.h"
 #endif
 
-gboolean sgen_object_is_live (void *obj);
+gboolean sgen_object_is_live (GCObject *obj);
 
 void  sgen_init_fin_weak_hash (void);
 
@@ -776,7 +781,7 @@ typedef gboolean (*SgenObjectPredicateFunc) (GCObject *obj, void *user_data);
 
 void sgen_null_links_if (SgenObjectPredicateFunc predicate, void *data, int generation);
 
-gboolean sgen_gc_is_object_ready_for_finalization (void *object);
+gboolean sgen_gc_is_object_ready_for_finalization (GCObject *object);
 void sgen_gc_lock (void);
 void sgen_gc_unlock (void);
 
@@ -805,7 +810,7 @@ enum {
        SPACE_LOS
 };
 
-void sgen_pin_object (void *object, SgenGrayQueue *queue);
+void sgen_pin_object (GCObject *object, SgenGrayQueue *queue);
 void sgen_set_pinned_from_failed_allocation (mword objsize);
 
 void sgen_ensure_free_space (size_t size);
@@ -844,14 +849,14 @@ struct _LOSObject {
 #if SIZEOF_VOID_P < 8
        mword dummy;            /* to align object to sizeof (double) */
 #endif
-       char data [MONO_ZERO_LEN_ARRAY];
+       GCObject data [MONO_ZERO_LEN_ARRAY];
 };
 
 extern LOSObject *los_object_list;
 extern mword los_memory_usage;
 
 void sgen_los_free_object (LOSObject *obj);
-void* sgen_los_alloc_large_inner (GCVTable *vtable, size_t size);
+void* sgen_los_alloc_large_inner (GCVTable vtable, size_t size);
 void sgen_los_sweep (void);
 gboolean sgen_ptr_is_in_los (char *ptr, char **start);
 void sgen_los_iterate_objects (IterateObjectCallbackFunc cb, void *user_data);
@@ -861,10 +866,10 @@ void sgen_los_update_cardtable_mod_union (void);
 void sgen_los_count_cards (long long *num_total_cards, long long *num_marked_cards);
 gboolean sgen_los_is_valid_object (char *object);
 gboolean mono_sgen_los_describe_pointer (char *ptr);
-LOSObject* sgen_los_header_for_object (char *data);
+LOSObject* sgen_los_header_for_object (GCObject *data);
 mword sgen_los_object_size (LOSObject *obj);
-void sgen_los_pin_object (char *obj);
-gboolean sgen_los_object_is_pinned (char *obj);
+void sgen_los_pin_object (GCObject *obj);
+gboolean sgen_los_object_is_pinned (GCObject *obj);
 void sgen_los_mark_mod_union_card (GCObject *mono_obj, void **ptr);
 
 
@@ -886,10 +891,10 @@ void sgen_nursery_retire_region (void *address, ptrdiff_t size);
 void sgen_nursery_alloc_prepare_for_minor (void);
 void sgen_nursery_alloc_prepare_for_major (void);
 
-char* sgen_alloc_for_promotion (char *obj, size_t objsize, gboolean has_references);
+GCObject* sgen_alloc_for_promotion (GCObject *obj, size_t objsize, gboolean has_references);
 
-void* sgen_alloc_obj_nolock (GCVTable *vtable, size_t size);
-void* sgen_try_alloc_obj_nolock (GCVTable *vtable, size_t size);
+GCObject* sgen_alloc_obj_nolock (GCVTable vtable, size_t size);
+GCObject* sgen_try_alloc_obj_nolock (GCVTable vtable, size_t size);
 
 /* Threads */
 
@@ -899,7 +904,7 @@ void sgen_thread_unregister (SgenThreadInfo *p);
 /* Finalization/ephemeron support */
 
 static inline gboolean
-sgen_major_is_object_alive (void *object)
+sgen_major_is_object_alive (GCObject *object)
 {
        mword objsize;
 
@@ -911,7 +916,7 @@ sgen_major_is_object_alive (void *object)
         * FIXME: major_collector.is_object_live() also calculates the
         * size.  Avoid the double calculation.
         */
-       objsize = SGEN_ALIGN_UP (sgen_safe_object_get_size ((GCObject*)object));
+       objsize = SGEN_ALIGN_UP (sgen_safe_object_get_size (object));
        if (objsize > SGEN_MAX_SMALL_OBJ_SIZE)
                return sgen_los_object_is_pinned (object);
 
@@ -923,7 +928,7 @@ sgen_major_is_object_alive (void *object)
  * and we're currently doing a minor collection.
  */
 static inline int
-sgen_is_object_alive_for_current_gen (char *object)
+sgen_is_object_alive_for_current_gen (GCObject *object)
 {
        if (sgen_ptr_in_nursery (object))
                return sgen_nursery_is_object_alive (object);
@@ -975,9 +980,9 @@ typedef enum {
 void sgen_init_tlab_info (SgenThreadInfo* info);
 void sgen_clear_tlabs (void);
 
-void* sgen_alloc_obj (GCVTable *vtable, size_t size);
-void* sgen_alloc_obj_pinned (GCVTable *vtable, size_t size);
-void* sgen_alloc_obj_mature (GCVTable *vtable, size_t size);
+GCObject* sgen_alloc_obj (GCVTable vtable, size_t size);
+GCObject* sgen_alloc_obj_pinned (GCVTable vtable, size_t size);
+GCObject* sgen_alloc_obj_mature (GCVTable vtable, size_t size);
 
 /* Debug support */
 
@@ -990,7 +995,7 @@ void sgen_check_objref (char *obj);
 void sgen_check_heap_marked (gboolean nursery_must_be_pinned);
 void sgen_check_nursery_objects_pinned (gboolean pinned);
 void sgen_check_for_xdomain_refs (void);
-char* sgen_find_object_for_ptr (char *ptr);
+GCObject* sgen_find_object_for_ptr (char *ptr);
 
 void mono_gc_scan_for_specific_ref (GCObject *key, gboolean precise);
 
index 331484adf31dd7a993f403cf4d16e22898be63fc..fd561d50ff4319174803a13980ab0c18728609f6 100644 (file)
@@ -96,7 +96,7 @@ sgen_gray_object_free_queue_section (GrayQueueSection *section)
  */
 
 void
-sgen_gray_object_enqueue (SgenGrayQueue *queue, char *obj, mword desc)
+sgen_gray_object_enqueue (SgenGrayQueue *queue, GCObject *obj, SgenDescriptor desc)
 {
        GrayQueueEntry entry = SGEN_GRAY_QUEUE_ENTRY (obj, desc);
 
index 966a37736238811dfabbe7f76c95fc16fdcee82d..79d2c701a0e4938ecd873144e72132546cbcae83 100644 (file)
@@ -70,8 +70,8 @@ typedef enum {
 
 typedef struct _GrayQueueEntry GrayQueueEntry;
 struct _GrayQueueEntry {
-       char *obj;
-       mword desc;
+       GCObject *obj;
+       SgenDescriptor desc;
 };
 
 #define SGEN_GRAY_QUEUE_ENTRY(obj,desc)        { (obj), (desc) }
@@ -98,7 +98,7 @@ struct _GrayQueueSection {
 typedef struct _SgenGrayQueue SgenGrayQueue;
 
 typedef void (*GrayQueueAllocPrepareFunc) (SgenGrayQueue*);
-typedef void (*GrayQueueEnqueueCheckFunc) (char*);
+typedef void (*GrayQueueEnqueueCheckFunc) (GCObject*);
 
 struct _SgenGrayQueue {
        GrayQueueEntry *cursor;
@@ -136,7 +136,7 @@ extern guint64 stat_gray_queue_dequeue_slow_path;
 
 void sgen_init_gray_queues (void);
 
-void sgen_gray_object_enqueue (SgenGrayQueue *queue, char *obj, mword desc);
+void sgen_gray_object_enqueue (SgenGrayQueue *queue, GCObject *obj, SgenDescriptor desc);
 GrayQueueEntry sgen_gray_object_dequeue (SgenGrayQueue *queue);
 GrayQueueSection* sgen_gray_object_dequeue_section (SgenGrayQueue *queue);
 void sgen_gray_object_enqueue_section (SgenGrayQueue *queue, GrayQueueSection *section);
@@ -166,7 +166,7 @@ sgen_gray_object_queue_is_empty (SgenGrayQueue *queue)
 }
 
 static inline MONO_ALWAYS_INLINE void
-GRAY_OBJECT_ENQUEUE (SgenGrayQueue *queue, char* obj, mword desc)
+GRAY_OBJECT_ENQUEUE (SgenGrayQueue *queue, GCObject *obj, SgenDescriptor desc)
 {
 #if SGEN_MAX_DEBUG_LEVEL >= 9
        sgen_gray_object_enqueue (queue, obj, desc);
@@ -187,7 +187,7 @@ GRAY_OBJECT_ENQUEUE (SgenGrayQueue *queue, char* obj, mword desc)
 }
 
 static inline MONO_ALWAYS_INLINE void
-GRAY_OBJECT_DEQUEUE (SgenGrayQueue *queue, char** obj, mword *desc)
+GRAY_OBJECT_DEQUEUE (SgenGrayQueue *queue, GCObject** obj, SgenDescriptor *desc)
 {
        GrayQueueEntry entry;
 #if SGEN_MAX_DEBUG_LEVEL >= 9
index dcc742aceda2bd28c781fc89f89eba809670c801..70cf34fb8a9a6e26828a8453f0af92181c063d5b 100644 (file)
@@ -331,7 +331,7 @@ sgen_los_free_object (LOSObject *obj)
  * and we avoid the memcpy overhead.
  */
 void*
-sgen_los_alloc_large_inner (GCVTable *vtable, size_t size)
+sgen_los_alloc_large_inner (GCVTable vtable, size_t size)
 {
        LOSObject *obj = NULL;
        void **vtslot;
@@ -402,7 +402,7 @@ sgen_los_alloc_large_inner (GCVTable *vtable, size_t size)
        return obj->data;
 }
 
-static void sgen_los_unpin_object (char *data);
+static void sgen_los_unpin_object (GCObject *data);
 
 void
 sgen_los_sweep (void)
@@ -418,7 +418,7 @@ sgen_los_sweep (void)
                SGEN_ASSERT (0, !SGEN_OBJECT_IS_PINNED (bigobj->data), "Who pinned a LOS object?");
 
                if (bigobj->cardtable_mod_union) {
-                       sgen_card_table_free_mod_union (bigobj->cardtable_mod_union, bigobj->data, bigobj->size);
+                       sgen_card_table_free_mod_union (bigobj->cardtable_mod_union, (char*)bigobj->data, bigobj->size);
                        bigobj->cardtable_mod_union = NULL;
                }
 
@@ -502,10 +502,10 @@ sgen_ptr_is_in_los (char *ptr, char **start)
 
        *start = NULL;
        for (obj = los_object_list; obj; obj = obj->next) {
-               char *end = obj->data + obj->size;
+               char *end = (char*)obj->data + obj->size;
 
-               if (ptr >= obj->data && ptr < end) {
-                       *start = obj->data;
+               if (ptr >= (char*)obj->data && ptr < end) {
+                       *start = (char*)obj->data;
                        return TRUE;
                }
        }
@@ -527,7 +527,7 @@ sgen_los_is_valid_object (char *object)
        LOSObject *obj;
 
        for (obj = los_object_list; obj; obj = obj->next) {
-               if (obj->data == object)
+               if ((char*)obj->data == object)
                        return TRUE;
        }
        return FALSE;
@@ -543,7 +543,7 @@ mono_sgen_los_describe_pointer (char *ptr)
                mword size;
                gboolean pinned;
 
-               if (obj->data > ptr || obj->data + obj->size <= ptr)
+               if ((char*)obj->data > ptr || (char*)obj->data + obj->size <= ptr)
                        continue;
 
                size = sgen_los_object_size (obj);
@@ -554,11 +554,11 @@ mono_sgen_los_describe_pointer (char *ptr)
                else
                        los_kind = "los-ptr";
 
-               if (obj->data == ptr) {
+               if ((char*)obj->data == ptr) {
                        SGEN_LOG (0, "%s (size %d pin %d)\n", los_kind, (int)size, pinned ? 1 : 0);
                } else {
                        SGEN_LOG (0, "%s (interior-ptr offset %zd size %d pin %d)",
-                                         los_kind, ptr - obj->data, (int)size, pinned ? 1 : 0);
+                                       los_kind, ptr - (char*)obj->data, (int)size, pinned ? 1 : 0);
                }
 
                return TRUE;
@@ -571,7 +571,7 @@ sgen_los_iterate_live_block_ranges (sgen_cardtable_block_callback callback)
 {
        LOSObject *obj;
        for (obj = los_object_list; obj; obj = obj->next) {
-               GCVTable *vt = (GCVTable*)SGEN_LOAD_VTABLE (obj->data);
+               GCVTable vt = SGEN_LOAD_VTABLE (obj->data);
                if (SGEN_VTABLE_HAS_REFERENCES (vt))
                        callback ((mword)obj->data, (mword)obj->size);
        }
@@ -584,13 +584,13 @@ get_cardtable_mod_union_for_object (LOSObject *obj)
        guint8 *other;
        if (mod_union)
                return mod_union;
-       mod_union = sgen_card_table_alloc_mod_union (obj->data, obj->size);
+       mod_union = sgen_card_table_alloc_mod_union ((char*)obj->data, obj->size);
        other = SGEN_CAS_PTR ((gpointer*)&obj->cardtable_mod_union, mod_union, NULL);
        if (!other) {
                SGEN_ASSERT (0, obj->cardtable_mod_union == mod_union, "Why did CAS not replace?");
                return mod_union;
        }
-       sgen_card_table_free_mod_union (mod_union, obj->data, obj->size);
+       sgen_card_table_free_mod_union (mod_union, (char*)obj->data, obj->size);
        return other;
 }
 
@@ -655,7 +655,7 @@ sgen_los_update_cardtable_mod_union (void)
                if (!SGEN_OBJECT_HAS_REFERENCES (obj->data))
                        continue;
                sgen_card_table_update_mod_union (get_cardtable_mod_union_for_object (obj),
-                               obj->data, obj->size, NULL);
+                               (char*)obj->data, obj->size, NULL);
        }
 }
 
@@ -666,32 +666,32 @@ sgen_los_object_size (LOSObject *obj)
 }
 
 LOSObject*
-sgen_los_header_for_object (char *data)
+sgen_los_header_for_object (GCObject *data)
 {
 #if _MSC_VER
-       return (LOSObject*)(data - (int)(&(((LOSObject*)0)->data)));
+       return (LOSObject*)((char*)data - (int)(&(((LOSObject*)0)->data)));
 #else
-       return (LOSObject*)(data - sizeof (LOSObject));
+       return (LOSObject*)((char*)data - sizeof (LOSObject));
 #endif
 }
 
 void
-sgen_los_pin_object (char *data)
+sgen_los_pin_object (GCObject *data)
 {
        LOSObject *obj = sgen_los_header_for_object (data);
        obj->size = obj->size | 1;
-       binary_protocol_pin (data, (gpointer)SGEN_LOAD_VTABLE (data), sgen_safe_object_get_size ((GCObject*)data));
+       binary_protocol_pin (data, (gpointer)SGEN_LOAD_VTABLE (data), sgen_safe_object_get_size (data));
 }
 
 static void
-sgen_los_unpin_object (char *data)
+sgen_los_unpin_object (GCObject *data)
 {
        LOSObject *obj = sgen_los_header_for_object (data);
        obj->size = sgen_los_object_size (obj);
 }
 
 gboolean
-sgen_los_object_is_pinned (char *data)
+sgen_los_object_is_pinned (GCObject *data)
 {
        LOSObject *obj = sgen_los_header_for_object (data);
        return obj->size & 1;
@@ -700,7 +700,7 @@ sgen_los_object_is_pinned (char *data)
 void
 sgen_los_mark_mod_union_card (GCObject *mono_obj, void **ptr)
 {
-       LOSObject *obj = sgen_los_header_for_object ((char*)mono_obj);
+       LOSObject *obj = sgen_los_header_for_object (mono_obj);
        guint8 *mod_union = get_cardtable_mod_union_for_object (obj);
        size_t offset = sgen_card_table_get_card_offset ((char*)ptr, (char*)sgen_card_table_align_pointer ((char*)obj));
        SGEN_ASSERT (0, mod_union, "FIXME: optionally allocate the mod union if it's not here and CAS it in.");
index ebfb2507cb831d2ea523e1b7a83873791fb11707..01d276ad06df9c15d84703b677bf3974505f655b 100644 (file)
@@ -33,7 +33,7 @@
 
 /* Returns whether the object is still in the nursery. */
 static inline MONO_ALWAYS_INLINE gboolean
-COPY_OR_MARK_FUNCTION_NAME (void **ptr, void *obj, SgenGrayQueue *queue)
+COPY_OR_MARK_FUNCTION_NAME (GCObject **ptr, GCObject *obj, SgenGrayQueue *queue)
 {
        MSBlockInfo *block;
 
@@ -41,7 +41,7 @@ COPY_OR_MARK_FUNCTION_NAME (void **ptr, void *obj, SgenGrayQueue *queue)
        ++stat_optimized_copy;
        {
                char *forwarded;
-               mword desc;
+               SgenDescriptor desc;
                if ((forwarded = SGEN_OBJECT_IS_FORWARDED (obj)))
                        desc = sgen_obj_get_descriptor_safe (forwarded);
                else
@@ -56,7 +56,7 @@ COPY_OR_MARK_FUNCTION_NAME (void **ptr, void *obj, SgenGrayQueue *queue)
 
        if (sgen_ptr_in_nursery (obj)) {
                int word, bit;
-               char *forwarded, *old_obj;
+               GCObject *forwarded, *old_obj;
                mword vtable_word = *(mword*)obj;
 
                HEAVY_STAT (++stat_optimized_copy_nursery);
@@ -125,19 +125,19 @@ COPY_OR_MARK_FUNCTION_NAME (void **ptr, void *obj, SgenGrayQueue *queue)
                MS_CALC_MARK_BIT (word, bit, obj);
                SGEN_ASSERT (9, !MS_MARK_BIT (block, word, bit), "object %p already marked", obj);
                MS_SET_MARK_BIT (block, word, bit);
-               binary_protocol_mark (obj, (gpointer)LOAD_VTABLE (obj), sgen_safe_object_get_size ((GCObject*)obj));
+               binary_protocol_mark (obj, (gpointer)LOAD_VTABLE (obj), sgen_safe_object_get_size (obj));
 
                return FALSE;
        } else {
                mword vtable_word = *(mword*)obj;
-               mword desc;
+               SgenDescriptor desc;
                int type;
 
                HEAVY_STAT (++stat_optimized_copy_major);
 
 #ifdef COPY_OR_MARK_WITH_EVACUATION
                {
-                       char *forwarded;
+                       GCObject *forwarded;
                        if ((forwarded = SGEN_VTABLE_IS_FORWARDED (vtable_word))) {
                                HEAVY_STAT (++stat_optimized_copy_major_forwarded);
                                SGEN_UPDATE_REFERENCE (ptr, forwarded);
@@ -149,10 +149,10 @@ COPY_OR_MARK_FUNCTION_NAME (void **ptr, void *obj, SgenGrayQueue *queue)
 
                SGEN_ASSERT (9, !SGEN_VTABLE_IS_PINNED (vtable_word), "Pinned object in non-pinned block?");
 
-               desc = sgen_vtable_get_descriptor ((GCVTable*)vtable_word);
+               desc = sgen_vtable_get_descriptor ((GCVTable)vtable_word);
                type = desc & DESC_TYPE_MASK;
 
-               if (sgen_safe_object_is_small ((GCObject*)obj, type)) {
+               if (sgen_safe_object_is_small (obj, type)) {
 #ifdef HEAVY_STATISTICS
                        if (type <= DESC_TYPE_MAX_SMALL_OBJ)
                                ++stat_optimized_copy_major_small_fast;
@@ -181,7 +181,7 @@ COPY_OR_MARK_FUNCTION_NAME (void **ptr, void *obj, SgenGrayQueue *queue)
 
                        if (sgen_los_object_is_pinned (obj))
                                return FALSE;
-                       binary_protocol_pin (obj, (gpointer)SGEN_LOAD_VTABLE (obj), sgen_safe_object_get_size ((GCObject*)obj));
+                       binary_protocol_pin (obj, (gpointer)SGEN_LOAD_VTABLE (obj), sgen_safe_object_get_size (obj));
 
                        sgen_los_pin_object (obj);
                        if (SGEN_OBJECT_HAS_REFERENCES (obj))
@@ -194,9 +194,9 @@ COPY_OR_MARK_FUNCTION_NAME (void **ptr, void *obj, SgenGrayQueue *queue)
 }
 
 static void
-SCAN_OBJECT_FUNCTION_NAME (char *obj, mword desc, SgenGrayQueue *queue)
+SCAN_OBJECT_FUNCTION_NAME (GCObject *obj, SgenDescriptor desc, SgenGrayQueue *queue)
 {
-       char *start = obj;
+       char *start = (char*)obj;
 
 #ifdef HEAVY_STATISTICS
        ++stat_optimized_major_scan;
@@ -235,8 +235,8 @@ DRAIN_GRAY_STACK_FUNCTION_NAME (ScanCopyContext ctx)
        SGEN_ASSERT (0, ctx.ops->scan_object == major_scan_object_with_evacuation, "Wrong scan function");
 
        for (;;) {
-               char *obj;
-               mword desc;
+               GCObject *obj;
+               SgenDescriptor desc;
 
                HEAVY_STAT (++stat_drain_loops);
 
index bdad9737591db0f42f7c599064e5af6468370fb9..b2061da8ca18b15dce41354c0c054571493bf156 100644 (file)
@@ -34,7 +34,7 @@ extern guint64 stat_scan_object_called_major;
 
 #undef HANDLE_PTR
 #define HANDLE_PTR(ptr,obj)    do {                                    \
-               void *__old = *(ptr);                                   \
+               GCObject *__old = *(ptr);                                       \
                SGEN_OBJECT_LAYOUT_STATISTICS_MARK_BITMAP ((obj), (ptr)); \
                binary_protocol_scan_process_reference ((obj), (ptr), __old); \
                if (__old && !sgen_ptr_in_nursery (__old)) {            \
@@ -42,19 +42,19 @@ extern guint64 stat_scan_object_called_major;
                        major_copy_or_mark_object_concurrent ((ptr), __old, queue); \
                } else {                                                \
                        if (G_UNLIKELY (sgen_ptr_in_nursery (__old) && !sgen_ptr_in_nursery ((ptr)))) \
-                               ADD_TO_GLOBAL_REMSET ((GCObject*)(full_object), (ptr), __old); \
+                               ADD_TO_GLOBAL_REMSET ((full_object), (ptr), __old); \
                }                                                       \
        } while (0)
 
 /* FIXME: Unify this with optimized code in sgen-marksweep.c. */
 
 #undef ADD_TO_GLOBAL_REMSET
-#define ADD_TO_GLOBAL_REMSET(object,ptr,target)        mark_mod_union_card ((object), (ptr))
+#define ADD_TO_GLOBAL_REMSET(object,ptr,target)        mark_mod_union_card ((object), (void**)(ptr))
 
 static void
-major_scan_object_no_mark_concurrent_anywhere (char *full_object, mword desc, SgenGrayQueue *queue)
+major_scan_object_no_mark_concurrent_anywhere (GCObject *full_object, SgenDescriptor desc, SgenGrayQueue *queue)
 {
-       char *start = full_object;
+       char *start = (char*)full_object;
 
        SGEN_OBJECT_LAYOUT_STATISTICS_DECLARE_BITMAP;
 
@@ -73,13 +73,13 @@ major_scan_object_no_mark_concurrent_anywhere (char *full_object, mword desc, Sg
 }
 
 static void
-major_scan_object_no_mark_concurrent_start (char *start, mword desc, SgenGrayQueue *queue)
+major_scan_object_no_mark_concurrent_start (GCObject *start, SgenDescriptor desc, SgenGrayQueue *queue)
 {
        major_scan_object_no_mark_concurrent_anywhere (start, desc, queue);
 }
 
 static void
-major_scan_object_no_mark_concurrent (char *start, mword desc, SgenGrayQueue *queue)
+major_scan_object_no_mark_concurrent (GCObject *start, SgenDescriptor desc, SgenGrayQueue *queue)
 {
        SGEN_ASSERT (0, !sgen_ptr_in_nursery (start), "Why are we scanning nursery objects in the concurrent collector?");
        major_scan_object_no_mark_concurrent_anywhere (start, desc, queue);
@@ -89,7 +89,7 @@ major_scan_object_no_mark_concurrent (char *start, mword desc, SgenGrayQueue *qu
 #define ADD_TO_GLOBAL_REMSET(object,ptr,target)        sgen_add_to_global_remset ((ptr), (target))
 
 static void
-major_scan_vtype_concurrent_finish (char *full_object, char *start, mword desc, SgenGrayQueue *queue BINARY_PROTOCOL_ARG (size_t size))
+major_scan_vtype_concurrent_finish (GCObject *full_object, char *start, SgenDescriptor desc, SgenGrayQueue *queue BINARY_PROTOCOL_ARG (size_t size))
 {
        SGEN_OBJECT_LAYOUT_STATISTICS_DECLARE_BITMAP;
 
index 8ad7c5a147d6c02448ebfe617ea2a6e98492d999..fe3ab1a1742b5bc311b41e7cb65aca8a7d3ad471 100644 (file)
@@ -121,7 +121,7 @@ struct _MSBlockInfo {
 
 #define MS_BLOCK_FOR_BLOCK_INFO(b)     ((char*)(b))
 
-#define MS_BLOCK_OBJ(b,i)              (MS_BLOCK_FOR_BLOCK_INFO(b) + MS_BLOCK_SKIP + (b)->obj_size * (i))
+#define MS_BLOCK_OBJ(b,i)              ((void*)(MS_BLOCK_FOR_BLOCK_INFO(b) + MS_BLOCK_SKIP + (b)->obj_size * (i)))
 #define MS_BLOCK_OBJ_FOR_SIZE(b,i,obj_size)            (MS_BLOCK_FOR_BLOCK_INFO(b) + MS_BLOCK_SKIP + (obj_size) * (i))
 #define MS_BLOCK_DATA_FOR_OBJ(o)       ((char*)((mword)(o) & ~(mword)(MS_BLOCK_SIZE - 1)))
 
@@ -573,7 +573,7 @@ ms_alloc_block (int size_index, gboolean pinned, gboolean has_references)
 }
 
 static gboolean
-obj_is_from_pinned_alloc (char *ptr)
+ptr_is_from_pinned_alloc (char *ptr)
 {
        MSBlockInfo *block;
 
@@ -642,8 +642,8 @@ unlink_slot_from_free_list_uncontested (MSBlockInfo * volatile *free_blocks, int
        return obj;
 }
 
-static void*
-alloc_obj (GCVTable *vtable, size_t size, gboolean pinned, gboolean has_references)
+static GCObject*
+alloc_obj (GCVTable vtable, size_t size, gboolean pinned, gboolean has_references)
 {
        int size_index = MS_BLOCK_OBJ_SIZE_INDEX (size);
        MSBlockInfo * volatile * free_blocks = FREE_BLOCKS (pinned, has_references);
@@ -656,13 +656,14 @@ alloc_obj (GCVTable *vtable, size_t size, gboolean pinned, gboolean has_referenc
 
        obj = unlink_slot_from_free_list_uncontested (free_blocks, size_index);
 
-       *(GCVTable**)obj = vtable;
+       /* FIXME: assumes object layout */
+       *(GCVTable*)obj = vtable;
 
        return obj;
 }
 
-static void*
-major_alloc_object (GCVTable *vtable, size_t size, gboolean has_references)
+static GCObject*
+major_alloc_object (GCVTable vtable, size_t size, gboolean has_references)
 {
        return alloc_obj (vtable, size, FALSE, has_references);
 }
@@ -675,7 +676,7 @@ major_alloc_object (GCVTable *vtable, size_t size, gboolean has_references)
  * single thread and has the GC lock, so we don't need an extra lock.
  */
 static void
-free_object (char *obj, size_t size, gboolean pinned)
+free_object (GCObject *obj, size_t size, gboolean pinned)
 {
        MSBlockInfo *block = MS_BLOCK_FOR_OBJ (obj);
        int word, bit;
@@ -704,14 +705,14 @@ free_object (char *obj, size_t size, gboolean pinned)
 }
 
 static void
-major_free_non_pinned_object (char *obj, size_t size)
+major_free_non_pinned_object (GCObject *obj, size_t size)
 {
        free_object (obj, size, FALSE);
 }
 
 /* size is a multiple of SGEN_ALLOC_ALIGN */
-static void*
-major_alloc_small_pinned_obj (GCVTable *vtable, size_t size, gboolean has_references)
+static GCObject*
+major_alloc_small_pinned_obj (GCVTable vtable, size_t size, gboolean has_references)
 {
        void *res;
 
@@ -727,7 +728,7 @@ major_alloc_small_pinned_obj (GCVTable *vtable, size_t size, gboolean has_refere
 }
 
 static void
-free_pinned_object (char *obj, size_t size)
+free_pinned_object (GCObject *obj, size_t size)
 {
        free_object (obj, size, TRUE);
 }
@@ -735,10 +736,10 @@ free_pinned_object (char *obj, size_t size)
 /*
  * size is already rounded up and we hold the GC lock.
  */
-static void*
-major_alloc_degraded (GCVTable *vtable, size_t size)
+static GCObject*
+major_alloc_degraded (GCVTable vtable, size_t size)
 {
-       void *obj = alloc_obj (vtable, size, FALSE, SGEN_VTABLE_HAS_REFERENCES (vtable));
+       GCObject *obj = alloc_obj (vtable, size, FALSE, SGEN_VTABLE_HAS_REFERENCES (vtable));
        if (G_LIKELY (obj)) {
                HEAVY_STAT (++stat_objects_alloced_degraded);
                HEAVY_STAT (stat_bytes_alloced_degraded += size);
@@ -752,7 +753,7 @@ major_alloc_degraded (GCVTable *vtable, size_t size)
  * been marked or copied.
  */
 static gboolean
-major_is_object_live (char *obj)
+major_is_object_live (GCObject *obj)
 {
        MSBlockInfo *block;
        int word, bit;
@@ -761,7 +762,7 @@ major_is_object_live (char *obj)
        if (sgen_ptr_in_nursery (obj))
                return FALSE;
 
-       objsize = SGEN_ALIGN_UP (sgen_safe_object_get_size ((GCObject*)obj));
+       objsize = SGEN_ALIGN_UP (sgen_safe_object_get_size (obj));
 
        /* LOS */
        if (objsize > SGEN_MAX_SMALL_OBJ_SIZE)
@@ -786,7 +787,7 @@ major_ptr_is_in_non_pinned_space (char *ptr, char **start)
 
                        *start = NULL;
                        for (i = 0; i <= count; ++i) {
-                               if (ptr >= MS_BLOCK_OBJ (block, i) && ptr < MS_BLOCK_OBJ (block, i + 1)) {
+                               if (ptr >= (char*)MS_BLOCK_OBJ (block, i) && ptr < (char*)MS_BLOCK_OBJ (block, i + 1)) {
                                        *start = MS_BLOCK_OBJ (block, i);
                                        break;
                                }
@@ -896,7 +897,7 @@ major_iterate_objects (IterateObjectsFlags flags, IterateObjectCallbackFunc call
                                        continue;
                        }
                        if (MS_OBJ_ALLOCED (obj, block))
-                               callback ((char*)obj, block->obj_size, data);
+                               callback ((GCObject*)obj, block->obj_size, data);
                }
        } END_FOREACH_BLOCK_NO_LOCK;
 }
@@ -924,7 +925,7 @@ major_is_valid_object (char *object)
 }
 
 
-static GCVTable*
+static GCVTable
 major_describe_pointer (char *ptr)
 {
        MSBlockInfo *block;
@@ -933,7 +934,7 @@ major_describe_pointer (char *ptr)
                int idx;
                char *obj;
                gboolean live;
-               GCVTable *vtable;
+               GCVTable vtable;
                int w, b;
                gboolean marked;
 
@@ -946,7 +947,7 @@ major_describe_pointer (char *ptr)
                idx = MS_BLOCK_OBJ_INDEX (ptr, block);
                obj = (char*)MS_BLOCK_OBJ (block, idx);
                live = MS_OBJ_ALLOCED (obj, block);
-               vtable = live ? (GCVTable*)SGEN_LOAD_VTABLE (obj) : NULL;
+               vtable = live ? SGEN_LOAD_VTABLE ((GCObject*)obj) : NULL;
 
                MS_CALC_MARK_BIT (w, b, obj);
                marked = MS_MARK_BIT (block, w, b);
@@ -1064,7 +1065,7 @@ major_get_cardtable_mod_union_for_reference (char *ptr)
 static void
 mark_mod_union_card (GCObject *obj, void **ptr)
 {
-       int type = sgen_obj_get_descriptor ((char*)obj) & DESC_TYPE_MASK;
+       int type = sgen_obj_get_descriptor (obj) & DESC_TYPE_MASK;
        if (sgen_safe_object_is_small (obj, type)) {
                guint8 *card_byte = major_get_cardtable_mod_union_for_reference ((char*)ptr);
                SGEN_ASSERT (0, MS_BLOCK_FOR_OBJ (obj) == MS_BLOCK_FOR_OBJ (ptr), "How can an object and a reference inside it not be in the same block?");
@@ -1083,7 +1084,7 @@ mark_mod_union_card (GCObject *obj, void **ptr)
                        MS_SET_MARK_BIT ((block), __word, __bit);       \
                        if (sgen_gc_descr_has_references (desc))                        \
                                GRAY_OBJECT_ENQUEUE ((queue), (obj), (desc)); \
-                       binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), sgen_safe_object_get_size ((GCObject*)(obj))); \
+                       binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), sgen_safe_object_get_size ((obj))); \
                        INC_NUM_MAJOR_OBJECTS_MARKED ();                \
                }                                                       \
        } while (0)
@@ -1095,13 +1096,13 @@ mark_mod_union_card (GCObject *obj, void **ptr)
                        MS_SET_MARK_BIT ((block), __word, __bit);       \
                        if (sgen_gc_descr_has_references (desc))                        \
                                GRAY_OBJECT_ENQUEUE ((queue), (obj), (desc)); \
-                       binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), sgen_safe_object_get_size ((GCObject*)(obj))); \
+                       binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), sgen_safe_object_get_size ((obj))); \
                        INC_NUM_MAJOR_OBJECTS_MARKED ();                \
                }                                                       \
        } while (0)
 
 static void
-pin_major_object (char *obj, SgenGrayQueue *queue)
+pin_major_object (GCObject *obj, SgenGrayQueue *queue)
 {
        MSBlockInfo *block;
 
@@ -1116,7 +1117,7 @@ pin_major_object (char *obj, SgenGrayQueue *queue)
 #include "sgen-major-copy-object.h"
 
 static void
-major_copy_or_mark_object_concurrent (void **ptr, void *obj, SgenGrayQueue *queue)
+major_copy_or_mark_object_concurrent (GCObject **ptr, GCObject *obj, SgenGrayQueue *queue)
 {
        SGEN_ASSERT (9, sgen_concurrent_collection_in_progress (), "Why are we scanning concurrently when there's no concurrent collection on?");
        SGEN_ASSERT (9, !sgen_workers_are_working () || sgen_thread_pool_is_thread_pool_thread (mono_native_thread_id_get ()), "We must not scan from two threads at the same time!");
@@ -1126,7 +1127,7 @@ major_copy_or_mark_object_concurrent (void **ptr, void *obj, SgenGrayQueue *queu
        if (!sgen_ptr_in_nursery (obj)) {
                mword objsize;
 
-               objsize = SGEN_ALIGN_UP (sgen_safe_object_get_size ((GCObject*)obj));
+               objsize = SGEN_ALIGN_UP (sgen_safe_object_get_size (obj));
 
                if (objsize <= SGEN_MAX_SMALL_OBJ_SIZE) {
                        MSBlockInfo *block = MS_BLOCK_FOR_OBJ (obj);
@@ -1191,7 +1192,7 @@ static guint64 stat_drain_prefetch_fill_failures;
 static guint64 stat_drain_loops;
 #endif
 
-static void major_scan_object_with_evacuation (char *start, mword desc, SgenGrayQueue *queue);
+static void major_scan_object_with_evacuation (GCObject *start, mword desc, SgenGrayQueue *queue);
 
 #define COPY_OR_MARK_FUNCTION_NAME     major_copy_or_mark_object_no_evacuation
 #define SCAN_OBJECT_FUNCTION_NAME      major_scan_object_no_evacuation
@@ -1225,19 +1226,19 @@ drain_gray_stack (ScanCopyContext ctx)
 #include "sgen-marksweep-scan-object-concurrent.h"
 
 static void
-major_copy_or_mark_object_canonical (void **ptr, SgenGrayQueue *queue)
+major_copy_or_mark_object_canonical (GCObject **ptr, SgenGrayQueue *queue)
 {
        major_copy_or_mark_object_with_evacuation (ptr, *ptr, queue);
 }
 
 static void
-major_copy_or_mark_object_concurrent_canonical (void **ptr, SgenGrayQueue *queue)
+major_copy_or_mark_object_concurrent_canonical (GCObject **ptr, SgenGrayQueue *queue)
 {
        major_copy_or_mark_object_concurrent (ptr, *ptr, queue);
 }
 
 static void
-major_copy_or_mark_object_concurrent_finish_canonical (void **ptr, SgenGrayQueue *queue)
+major_copy_or_mark_object_concurrent_finish_canonical (GCObject **ptr, SgenGrayQueue *queue)
 {
        major_copy_or_mark_object_no_evacuation (ptr, *ptr, queue);
 }
@@ -1258,7 +1259,7 @@ mark_pinned_objects_in_block (MSBlockInfo *block, size_t first_entry, size_t las
 
        for (; entry < end; ++entry) {
                int index = MS_BLOCK_OBJ_INDEX (*entry, block);
-               char *obj;
+               GCObject *obj;
                SGEN_ASSERT (9, index >= 0 && index < MS_BLOCK_FREE / block->obj_size, "invalid object %p index %d max-index %d", *entry, index, (int)(MS_BLOCK_FREE / block->obj_size));
                if (index == last_index)
                        continue;
@@ -1688,9 +1689,9 @@ static int count_nonpinned_ref;
 static int count_nonpinned_nonref;
 
 static void
-count_nonpinned_callback (char *obj, size_t size, void *data)
+count_nonpinned_callback (GCObject *obj, size_t size, void *data)
 {
-       GCVTable *vtable = (GCVTable*)LOAD_VTABLE (obj);
+       GCVTable vtable = LOAD_VTABLE (obj);
 
        if (SGEN_VTABLE_HAS_REFERENCES (vtable))
                ++count_nonpinned_ref;
@@ -1699,9 +1700,9 @@ count_nonpinned_callback (char *obj, size_t size, void *data)
 }
 
 static void
-count_pinned_callback (char *obj, size_t size, void *data)
+count_pinned_callback (GCObject *obj, size_t size, void *data)
 {
-       GCVTable *vtable = (GCVTable*)LOAD_VTABLE (obj);
+       GCVTable vtable = LOAD_VTABLE (obj);
 
        if (SGEN_VTABLE_HAS_REFERENCES (vtable))
                ++count_pinned_ref;
@@ -2282,12 +2283,14 @@ scan_card_table_for_block (MSBlockInfo *block, gboolean mod_union, ScanCopyConte
                                        goto next_object;
                        }
 
+                       GCObject *object = (GCObject*)obj;
+
                        if (small_objects) {
                                HEAVY_STAT (++scanned_objects);
-                               scan_func (obj, sgen_obj_get_descriptor (obj), queue);
+                               scan_func (object, sgen_obj_get_descriptor (object), queue);
                        } else {
                                size_t offset = sgen_card_table_get_card_offset (obj, block_start);
-                               sgen_cardtable_scan_object (obj, block_obj_size, card_base + offset, mod_union, ctx);
+                               sgen_cardtable_scan_object (object, block_obj_size, card_base + offset, mod_union, ctx);
                        }
                next_object:
                        obj += block_obj_size;
@@ -2458,10 +2461,10 @@ sgen_marksweep_init_internal (SgenMajorCollector *collector, gboolean is_concurr
        collector->pin_objects = major_pin_objects;
        collector->pin_major_object = pin_major_object;
        collector->scan_card_table = major_scan_card_table;
-       collector->iterate_live_block_ranges = (void*)(void*) major_iterate_live_block_ranges;
+       collector->iterate_live_block_ranges = major_iterate_live_block_ranges;
        if (is_concurrent) {
                collector->update_cardtable_mod_union = update_cardtable_mod_union;
-               collector->get_cardtable_mod_union_for_object = major_get_cardtable_mod_union_for_reference;
+               collector->get_cardtable_mod_union_for_reference = major_get_cardtable_mod_union_for_reference;
        }
        collector->init_to_space = major_init_to_space;
        collector->sweep = major_sweep;
@@ -2476,7 +2479,7 @@ sgen_marksweep_init_internal (SgenMajorCollector *collector, gboolean is_concurr
        collector->start_major_collection = major_start_major_collection;
        collector->finish_major_collection = major_finish_major_collection;
        collector->ptr_is_in_non_pinned_space = major_ptr_is_in_non_pinned_space;
-       collector->obj_is_from_pinned_alloc = obj_is_from_pinned_alloc;
+       collector->ptr_is_from_pinned_alloc = ptr_is_from_pinned_alloc;
        collector->report_pinned_memory_usage = major_report_pinned_memory_usage;
        collector->get_num_major_sections = get_num_major_sections;
        collector->get_bytes_survived_last_sweep = get_bytes_survived_last_sweep;
index e32321885d5095bdfe47a7967e4ab0aac5199856..49b42265c7a7d4076c214b5c80f55a8634e248af 100644 (file)
@@ -47,11 +47,11 @@ extern guint64 stat_nursery_copy_object_failed_to_space; /* from sgen-gc.c */
  */
 
 static MONO_ALWAYS_INLINE void
-SERIAL_COPY_OBJECT (void **obj_slot, SgenGrayQueue *queue) 
+SERIAL_COPY_OBJECT (GCObject **obj_slot, SgenGrayQueue *queue) 
 {
-       char *forwarded;
-       char *copy;
-       char *obj = *obj_slot;
+       GCObject *forwarded;
+       GCObject *copy;
+       GCObject *obj = *obj_slot;
 
        SGEN_ASSERT (9, current_collection_generation == GENERATION_NURSERY, "calling minor-serial-copy from a %d generation collection", current_collection_generation);
 
@@ -78,7 +78,7 @@ SERIAL_COPY_OBJECT (void **obj_slot, SgenGrayQueue *queue)
                return;
        }
        if (G_UNLIKELY (SGEN_OBJECT_IS_PINNED (obj))) {
-               SGEN_ASSERT (9, sgen_vtable_get_descriptor ((GCVTable*)SGEN_LOAD_VTABLE(obj)), "pinned object %p has no gc descriptor", obj);
+               SGEN_ASSERT (9, sgen_vtable_get_descriptor (SGEN_LOAD_VTABLE(obj)), "pinned object %p has no gc descriptor", obj);
                SGEN_LOG (9, " (pinned, no change)");
                HEAVY_STAT (++stat_nursery_copy_object_failed_pinned);
                return;
@@ -86,7 +86,7 @@ SERIAL_COPY_OBJECT (void **obj_slot, SgenGrayQueue *queue)
 
 #ifndef SGEN_SIMPLE_NURSERY
        if (sgen_nursery_is_to_space (obj)) {
-               SGEN_ASSERT (9, sgen_vtable_get_descriptor ((GCVTable*)SGEN_LOAD_VTABLE(obj)), "to space object %p has no gc descriptor", obj);
+               SGEN_ASSERT (9, sgen_vtable_get_descriptor (SGEN_LOAD_VTABLE(obj)), "to space object %p has no gc descriptor", obj);
                SGEN_LOG (9, " (tospace, no change)");
                HEAVY_STAT (++stat_nursery_copy_object_failed_to_space);                
                return;
@@ -105,11 +105,11 @@ SERIAL_COPY_OBJECT (void **obj_slot, SgenGrayQueue *queue)
  *   Similar to SERIAL_COPY_OBJECT, but assumes that OBJ_SLOT is part of an object, so it handles global remsets as well.
  */
 static MONO_ALWAYS_INLINE void
-SERIAL_COPY_OBJECT_FROM_OBJ (void **obj_slot, SgenGrayQueue *queue) 
+SERIAL_COPY_OBJECT_FROM_OBJ (GCObject **obj_slot, SgenGrayQueue *queue)
 {
-       char *forwarded;
-       char *obj = *obj_slot;
-       void *copy;
+       GCObject *forwarded;
+       GCObject *obj = *obj_slot;
+       GCObject *copy;
 
        SGEN_ASSERT (9, current_collection_generation == GENERATION_NURSERY, "calling minor-serial-copy-from-obj from a %d generation collection", current_collection_generation);
 
@@ -140,7 +140,7 @@ SERIAL_COPY_OBJECT_FROM_OBJ (void **obj_slot, SgenGrayQueue *queue)
                return;
        }
        if (G_UNLIKELY (SGEN_OBJECT_IS_PINNED (obj))) {
-               SGEN_ASSERT (9, sgen_vtable_get_descriptor ((GCVTable*)SGEN_LOAD_VTABLE(obj)), "pinned object %p has no gc descriptor", obj);
+               SGEN_ASSERT (9, sgen_vtable_get_descriptor (SGEN_LOAD_VTABLE(obj)), "pinned object %p has no gc descriptor", obj);
                SGEN_LOG (9, " (pinned, no change)");
                HEAVY_STAT (++stat_nursery_copy_object_failed_pinned);
                if (!sgen_ptr_in_nursery (obj_slot) && !SGEN_OBJECT_IS_CEMENTED (obj))
@@ -151,7 +151,7 @@ SERIAL_COPY_OBJECT_FROM_OBJ (void **obj_slot, SgenGrayQueue *queue)
 #ifndef SGEN_SIMPLE_NURSERY
        if (sgen_nursery_is_to_space (obj)) {
                /* FIXME: all of these could just use `sgen_obj_get_descriptor_safe()` */
-               SGEN_ASSERT (9, sgen_vtable_get_descriptor ((GCVTable*)SGEN_LOAD_VTABLE(obj)), "to space object %p has no gc descriptor", obj);
+               SGEN_ASSERT (9, sgen_vtable_get_descriptor (SGEN_LOAD_VTABLE(obj)), "to space object %p has no gc descriptor", obj);
                SGEN_LOG (9, " (tospace, no change)");
                HEAVY_STAT (++stat_nursery_copy_object_failed_to_space);                
 
index efe782f058adebd085446a35a2c2e94d64cc527a..cda7746a44d8667b4403ae0f59a839b5d24df49c 100644 (file)
@@ -46,8 +46,10 @@ extern guint64 stat_scan_object_called_nursery;
        } while (0)
 
 static void
-SERIAL_SCAN_OBJECT (char *start, mword desc, SgenGrayQueue *queue)
+SERIAL_SCAN_OBJECT (GCObject *object, SgenDescriptor desc, SgenGrayQueue *queue)
 {
+       char *start = (char*)object;
+
        SGEN_OBJECT_LAYOUT_STATISTICS_DECLARE_BITMAP;
 
 #ifdef HEAVY_STATISTICS
@@ -64,7 +66,7 @@ SERIAL_SCAN_OBJECT (char *start, mword desc, SgenGrayQueue *queue)
 }
 
 static void
-SERIAL_SCAN_VTYPE (char *full_object, char *start, mword desc, SgenGrayQueue *queue BINARY_PROTOCOL_ARG (size_t size))
+SERIAL_SCAN_VTYPE (GCObject *full_object, char *start, SgenDescriptor desc, SgenGrayQueue *queue BINARY_PROTOCOL_ARG (size_t size))
 {
        SGEN_OBJECT_LAYOUT_STATISTICS_DECLARE_BITMAP;
 
index e680cefa5a1b12db84925da0290675b817c50e28..dc6152c77e77b854cde2b55053d4edf837c4062d 100644 (file)
@@ -753,7 +753,7 @@ sgen_build_nursery_fragments (GCMemSection *nursery_section, SgenGrayQueue *unpi
 
                if (addr0 < addr1) {
                        if (unpin_queue)
-                               GRAY_OBJECT_ENQUEUE (unpin_queue, addr0, sgen_obj_get_descriptor_safe (addr0));
+                               GRAY_OBJECT_ENQUEUE (unpin_queue, (GCObject*)addr0, sgen_obj_get_descriptor_safe ((GCObject*)addr0));
                        else
                                SGEN_UNPIN_OBJECT (addr0);
                        size = SGEN_ALIGN_UP (sgen_safe_object_get_size ((GCObject*)addr0));
index df25033acb88c785a67d92623bbe709de21093a3..546f895583c44cb8017e67bee75ff895160a19f7 100644 (file)
@@ -116,8 +116,9 @@ sgen_pin_stats_register_address (char *addr, int pin_type)
 }
 
 static void
-pin_stats_count_object_from_tree (char *obj, size_t size, PinStatAddress *node, int *pin_types)
+pin_stats_count_object_from_tree (GCObject *object, size_t size, PinStatAddress *node, int *pin_types)
 {
+       char *obj = (char*)object;
        if (!node)
                return;
        if (node->addr >= obj && node->addr < obj + size) {
@@ -131,13 +132,13 @@ pin_stats_count_object_from_tree (char *obj, size_t size, PinStatAddress *node,
                }
        }
        if (obj < node->addr)
-               pin_stats_count_object_from_tree (obj, size, node->left, pin_types);
+               pin_stats_count_object_from_tree (object, size, node->left, pin_types);
        if (obj + size - 1 > node->addr)
-               pin_stats_count_object_from_tree (obj, size, node->right, pin_types);
+               pin_stats_count_object_from_tree (object, size, node->right, pin_types);
 }
 
 static gpointer
-lookup_vtable_entry (SgenHashTable *hash_table, GCVTable *vtable, gpointer empty_entry)
+lookup_vtable_entry (SgenHashTable *hash_table, GCVTable vtable, gpointer empty_entry)
 {
        char *name = g_strdup_printf ("%s.%s", sgen_client_vtable_get_namespace (vtable), sgen_client_vtable_get_name (vtable));
        gpointer entry = sgen_hash_table_lookup (hash_table, name);
@@ -153,7 +154,7 @@ lookup_vtable_entry (SgenHashTable *hash_table, GCVTable *vtable, gpointer empty
 }
 
 static void
-register_vtable (GCVTable *vtable, int pin_types)
+register_vtable (GCVTable vtable, int pin_types)
 {
        PinnedClassEntry empty_entry;
        PinnedClassEntry *entry;
@@ -169,7 +170,7 @@ register_vtable (GCVTable *vtable, int pin_types)
 }
 
 void
-sgen_pin_stats_register_object (char *obj, size_t size)
+sgen_pin_stats_register_object (GCObject *obj, size_t size)
 {
        int pin_types = 0;
 
@@ -180,11 +181,11 @@ sgen_pin_stats_register_object (char *obj, size_t size)
        sgen_pointer_queue_add (&pinned_objects, obj);
 
        if (pin_types)
-               register_vtable ((GCVTable*)SGEN_LOAD_VTABLE (obj), pin_types);
+               register_vtable (SGEN_LOAD_VTABLE (obj), pin_types);
 }
 
 void
-sgen_pin_stats_register_global_remset (char *obj)
+sgen_pin_stats_register_global_remset (GCObject *obj)
 {
        GlobalRemsetClassEntry empty_entry;
        GlobalRemsetClassEntry *entry;
@@ -193,7 +194,7 @@ sgen_pin_stats_register_global_remset (char *obj)
                return;
 
        memset (&empty_entry, 0, sizeof (GlobalRemsetClassEntry));
-       entry = lookup_vtable_entry (&global_remset_class_hash_table, (GCVTable*)SGEN_LOAD_VTABLE (obj), &empty_entry);
+       entry = lookup_vtable_entry (&global_remset_class_hash_table, SGEN_LOAD_VTABLE (obj), &empty_entry);
 
        ++entry->num_remsets;
 }
index 6d122f8ab395841c8c7050738f293288b6509d41..fc0ba0bbdf6c6e977ed1b5a9c33205d90fcdd615 100644 (file)
@@ -180,7 +180,7 @@ sgen_dump_pin_queue (void)
 
 typedef struct _CementHashEntry CementHashEntry;
 struct _CementHashEntry {
-       char *obj;
+       GCObject *obj;
        unsigned int count;
 };
 
@@ -202,7 +202,7 @@ sgen_cement_reset (void)
 }
 
 gboolean
-sgen_cement_lookup (char *obj)
+sgen_cement_lookup (GCObject *obj)
 {
        guint hv = sgen_aligned_addr_hash (obj);
        int i = SGEN_CEMENT_HASH (hv);
@@ -221,7 +221,7 @@ sgen_cement_lookup (char *obj)
 }
 
 gboolean
-sgen_cement_lookup_or_register (char *obj)
+sgen_cement_lookup_or_register (GCObject *obj)
 {
        guint hv;
        int i;
@@ -252,7 +252,7 @@ sgen_cement_lookup_or_register (char *obj)
                SGEN_CEMENT_OBJECT (obj);
 
                binary_protocol_cement (obj, (gpointer)SGEN_LOAD_VTABLE (obj),
-                               (int)sgen_safe_object_get_size ((GCObject*)obj));
+                               (int)sgen_safe_object_get_size (obj));
        }
 
        return FALSE;
index dd8051fbdef7b35de56c67e1f4fc73ce7d740460..e7f1e288f81c42d41e51a565c19eaa4d80a9e38c 100644 (file)
@@ -56,8 +56,8 @@ void sgen_pin_stats_reset (void);
 
 void sgen_cement_init (gboolean enabled);
 void sgen_cement_reset (void);
-gboolean sgen_cement_lookup (char *obj);
-gboolean sgen_cement_lookup_or_register (char *obj);
+gboolean sgen_cement_lookup (GCObject *obj);
+gboolean sgen_cement_lookup_or_register (GCObject *obj);
 void sgen_pin_cemented_objects (void);
 void sgen_cement_clear_below_threshold (void);
 
index 9d1611c22c36a44b7aeace6bc378dee47f033c07..b7f973646315254877cee62e526435d6f8dcba7b 100644 (file)
@@ -46,7 +46,7 @@
 {
 #ifndef SCAN_OBJECT_NOVTABLE
 #if defined(SGEN_HEAVY_BINARY_PROTOCOL) && defined(SCAN_OBJECT_PROTOCOL)
-       binary_protocol_scan_begin (start, SGEN_LOAD_VTABLE (start), sgen_safe_object_get_size ((GCObject*)start));
+       binary_protocol_scan_begin ((GCObject*)start, SGEN_LOAD_VTABLE ((GCObject*)start), sgen_safe_object_get_size ((GCObject*)start));
 #endif
 #else
 #if defined(SGEN_HEAVY_BINARY_PROTOCOL) && defined(SCAN_OBJECT_PROTOCOL)
 #endif
        switch (desc & DESC_TYPE_MASK) {
        case DESC_TYPE_RUN_LENGTH:
-#define SCAN OBJ_RUN_LEN_FOREACH_PTR (desc, start)
+#define SCAN OBJ_RUN_LEN_FOREACH_PTR (desc, ((GCObject*)start))
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
 #undef SCAN
                break;
        case DESC_TYPE_VECTOR:
-#define SCAN OBJ_VECTOR_FOREACH_PTR (desc, start)
+#define SCAN OBJ_VECTOR_FOREACH_PTR (desc, ((GCObject*)start))
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
 #undef SCAN
                break;
        case DESC_TYPE_BITMAP:
-#define SCAN OBJ_BITMAP_FOREACH_PTR (desc, start)
+#define SCAN OBJ_BITMAP_FOREACH_PTR (desc, ((GCObject*)start))
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
@@ -77,7 +77,7 @@
                break;
        case DESC_TYPE_COMPLEX:
                /* this is a complex object */
-#define SCAN OBJ_COMPLEX_FOREACH_PTR (desc, start)
+#define SCAN OBJ_COMPLEX_FOREACH_PTR (desc, ((GCObject*)start))
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
@@ -86,7 +86,7 @@
 #ifndef SCAN_OBJECT_NOVTABLE
        case DESC_TYPE_COMPLEX_ARR:
                /* this is an array of complex structs */
-#define SCAN OBJ_COMPLEX_ARR_FOREACH_PTR (desc, start)
+#define SCAN OBJ_COMPLEX_ARR_FOREACH_PTR (desc, ((GCObject*)start))
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
index 5488775d4f673b8cdafc252a33d5453a1b61e9ac..40639d7050b1db8d2793aa66cf7156285fe0bb9a 100644 (file)
@@ -30,8 +30,8 @@
 #include "mono/sgen/sgen-layout-stats.h"
 #include "mono/sgen/sgen-client.h"
 
-static inline char*
-alloc_for_promotion (GCVTable *vtable, char *obj, size_t objsize, gboolean has_references)
+static inline GCObject*
+alloc_for_promotion (GCVTable vtable, GCObject *obj, size_t objsize, gboolean has_references)
 {
        return major_collector.alloc_object (vtable, objsize, has_references);
 }
index 96d765fb8555fc910f2bfa51f16b1aeaa0d5a990..ea427f6a21fee793d5738222aa793cdf3ee52bf8 100644 (file)
@@ -148,9 +148,9 @@ static AgeAllocationBuffer age_alloc_buffers [MAX_AGE];
 static SgenFragmentAllocator collector_allocator;
 
 static inline int
-get_object_age (char *object)
+get_object_age (GCObject *object)
 {
-       size_t idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
+       size_t idx = ((char*)object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS;
        return region_age [idx];
 }
 
@@ -258,8 +258,8 @@ alloc_for_promotion_slow_path (int age, size_t objsize)
        return p;
 }
 
-static inline char*
-alloc_for_promotion (GCVTable *vtable, char *obj, size_t objsize, gboolean has_references)
+static inline GCObject*
+alloc_for_promotion (GCVTable vtable, GCObject *obj, size_t objsize, gboolean has_references)
 {
        char *p = NULL;
        int age;
@@ -281,13 +281,13 @@ alloc_for_promotion (GCVTable *vtable, char *obj, size_t objsize, gboolean has_r
        }
 
        /* FIXME: assumes object layout */
-       *(GCVTable**)p = vtable;
+       *(GCVTable*)p = vtable;
 
-       return p;
+       return (GCObject*)p;
 }
 
-static char*
-minor_alloc_for_promotion (GCVTable *vtable, char *obj, size_t objsize, gboolean has_references)
+static GCObject*
+minor_alloc_for_promotion (GCVTable vtable, GCObject *obj, size_t objsize, gboolean has_references)
 {
        /*
        We only need to check for a non-nursery object if we're doing a major collection.
index 613f332cca4398e68c9b3b45b7ae5a4c8da8f14f..b26234298473a093bf81712b97b50e6fa6515506 100644 (file)
@@ -227,7 +227,7 @@ workers_get_work (WorkerData *data)
 }
 
 static void
-concurrent_enqueue_check (char *obj)
+concurrent_enqueue_check (GCObject *obj)
 {
        g_assert (sgen_concurrent_collection_in_progress ());
        g_assert (!sgen_ptr_in_nursery (obj));
index 60fd4038041bcc555156f6faeedf141e47438ec5..d965c177bb3d62a4dd05bdb14334546b08a8c62f 100644 (file)
@@ -458,6 +458,11 @@ if POWERPC
 PLATFORM_DISABLED_TESTS=finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe
 endif
 
+if POWERPC64
+# These tests hang
+PLATFORM_DISABLED_TESTS=monitor.exe finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe
+endif
+
 if ARM
 PLATFORM_DISABLED_TESTS=filter-stack.exe
 endif
@@ -731,7 +736,7 @@ test-messages:
 else
 test-messages: w32message.exe
        > test_messages.zero
-       $(with_mono_path) $(JITTEST_PROG_RUN) w32message.exe >& w32message.allout && cmp test_messages.zero w32message.allout
+       $(with_mono_path) $(JITTEST_PROG_RUN) w32message.exe > w32message.allout 2>&1 && cmp test_messages.zero w32message.allout
 endif
 endif
 
@@ -1280,11 +1285,11 @@ GSHARED_TESTS = \
 test-generic-sharing-normal: $(GSHARED_TESTS)
        @for fn in $+ ; do      \
                echo "Testing $$fn ...";        \
-               MONO_GENERIC_SHARING=all $(RUNTIME) -O=gshared                $$fn > $$fn.stdout || exit 1;     \
-               MONO_GENERIC_SHARING=all $(RUNTIME) -O=gshared,shared         $$fn > $$fn.stdout || exit 1;     \
-               MONO_GENERIC_SHARING=all $(RUNTIME) -O=gshared,-inline        $$fn > $$fn.stdout || exit 1;     \
-               MONO_GENERIC_SHARING=all $(RUNTIME) -O=gshared,-inline,shared $$fn > $fn.stdout || exit 1;      \
-               if [ x$(AOT) = x1 ]; then MONO_GENERIC_SHARING=all $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $$fn > /dev/null || exit 1; MONO_GENERIC_SHARING=all $(RUNTIME) $$fn > $$fn.stdout || exit 1; fi; \
+               $(RUNTIME) -O=gshared                $$fn > $$fn.stdout || exit 1;      \
+               $(RUNTIME) -O=gshared,shared         $$fn > $$fn.stdout || exit 1;      \
+               $(RUNTIME) -O=gshared,-inline        $$fn > $$fn.stdout || exit 1;      \
+               $(RUNTIME) -O=gshared,-inline,shared $$fn > $fn.stdout || exit 1;       \
+               if [ x$(AOT) = x1 ]; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $$fn > /dev/null || exit 1; $(RUNTIME) $$fn > $$fn.stdout || exit 1; fi; \
        done
 
 test-generic-sharing-managed: test-runner.exe $(GSHARED_TESTS)
index 0e48d9081c045dc93a7260d5534bfd6e74ec3e91..71f4b4cc20933647e7fcc1df7d36407ec6261ae7 100644 (file)
@@ -18,7 +18,8 @@ public class FinalizerException {
                int* values = stackalloc int [20];
                aptr = new IntPtr (values);
                if (depth <= 0) {
-                       new FinalizerException ();
+                       for (int i = 0; i < 10; i++)
+                               new FinalizerException ();
                        return;
                }
                MakeException (depth - 1);
index e3b855ea6198eac86e091661cd38230298c1284c..3f2da10c57a8f6d507acc718faf8cfb4cb179605 100644 (file)
@@ -62,7 +62,7 @@
     }\r
 \r
     .method public hidebysig newslot virtual \r
-            instance void  Invoke([t]Missing t) runtime managed\r
+            instance void  Invoke(class [t]Missing t) runtime managed\r
     {\r
     }\r
 \r
   {\r
     .maxstack 8\r
     ldstr "Hello"\r
-    call void class [mscorlib]System.String::Trim([mscorlib]MissingType)\r
+    call void class [mscorlib]System.String::Trim(class [mscorlib]MissingType)\r
     ret\r
   }\r
 \r
     IL_0001:  newobj     instance void LoadMissing::.ctor()\r
     IL_0006:  stloc.0\r
     IL_0007:  ldloc.0\r
-    IL_0008:  ldftn      instance void LoadMissing::delegate_target()\r
+    IL_0008:  ldftn      void LoadMissing::delegate_target()\r
     IL_000e:  newobj     instance void DelegateWithMissingArgument::.ctor(object,\r
                                                                           native int)\r
     IL_0013:  stloc.1\r
 \r
 .class public auto ansi beforefieldinit FieldWithMissingType\r
 {\r
-       .field  public [t]Missing BrokenField\r
+       .field  public class [t]Missing BrokenField\r
     .field  public static int32 WorkingField\r
 }\r
index 8ff5eef6684851b2e7e30b3fac8c652339d87e93..2c2369589e143fde0125a2b1ca09046b99620031 100644 (file)
@@ -1,7 +1,7 @@
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
 
 test_cflags = $(AM_CFLAGS) $(SGEN_DEFINES)
-test_ldadd = ../metadata/libmonoruntimesgen.la ../sgen/libmonosgen.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
+test_ldadd = libtestlib.la \
        $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(LIBICONV)
 if PLATFORM_DARWIN
 test_ldflags = -framework CoreFoundation -framework Foundation
@@ -11,7 +11,10 @@ endif
 if !CROSS_COMPILE
 if !HOST_WIN32
 if SUPPORT_BOEHM
-if !PLATFORM_GNU
+
+noinst_LTLIBRARIES = libtestlib.la
+libtestlib_la_SOURCES =
+libtestlib_la_LIBADD = ../metadata/libmonoruntimesgen.la ../sgen/libmonosgen.la ../utils/libmonoutils.la ../io-layer/libwapi.la 
 
 test_sgen_qsort_SOURCES = test-sgen-qsort.c
 test_sgen_qsort_CFLAGS = $(test_cflags)
@@ -37,7 +40,6 @@ noinst_PROGRAMS = test-sgen-qsort test-memfuncs test-mono-linked-list-set test-c
 
 TESTS = test-sgen-qsort test-memfuncs test-mono-linked-list-set test-conc-hashtable
 
-endif !PLATFORM_GNU
 endif SUPPORT_BOEHM
 endif !HOST_WIN32
 endif !CROSS_COMPILE
index eb1e009bfc20c8648ef993432ee01ef1f7f25cda..f32e14c7cfe0f0b419affe2e45a5c6477459d3ea 100644 (file)
@@ -148,9 +148,9 @@ kern_return_t
 mono_mach_arch_set_thread_state (thread_port_t thread, thread_state_t state, mach_msg_type_number_t count)
 {
 #ifdef TARGET_ARM64
-       return thread_set_state (thread, ARM_UNIFIED_THREAD_STATE_COUNT, state, count);
+       return thread_set_state (thread, ARM_UNIFIED_THREAD_STATE, state, count);
 #else
-       return thread_set_state (thread, ARM_THREAD_STATE_COUNT, state, count);
+       return thread_set_state (thread, ARM_THREAD_STATE, state, count);
 #endif
 }
 
index 322b9124be99e511e7195de1c57083bc0702cb00..d06a2143a02e6394146385c1a9bc377978701a50 100644 (file)
        : "=r" (offset))
 #endif
 #elif defined(__s390x__)
-# if defined(PIC)
+# if defined(__PIC__)
+#  if !defined(__PIE__)
 // This only works if libmono is linked into the application
-#  define MONO_THREAD_VAR_OFFSET(var,offset) do { guint64 foo;                                 \
-                                               __asm__ ("basr  %%r1,0\n\t"                     \
-                                                        "j     0f\n\t"                         \
-                                                        ".quad " #var "@TLSGD\n\t"             \
+#   define MONO_THREAD_VAR_OFFSET(var,offset) do { guint64 foo;                                \
+                                               __asm__ ("basr  %%r1,0\n\t"                     \
+                                                        "j     0f\n\t"                         \
+                                                        ".quad " #var "@TLSGD\n"               \
                                                         "0:\n\t"                               \
-                                                        "lg    %%r2,4(%%r1)\n\t"               \
+                                                        "lg    %%r2,4(%%r1)\n\t"               \
                                                         "brasl %%r14,__tls_get_offset@PLT:tls_gdcall:"#var"\n\t" \
                                                         "lgr   %0,%%r2\n\t"                    \
                                                        : "=r" (foo) :                          \
                                                        : "1", "2", "14", "cc");                \
                                                offset = foo; } while (0)
+#  elif __PIE__ == 1
+#   define MONO_THREAD_VAR_OFFSET(var,offset) do { guint64 foo;                                        \
+                                               __asm__ ("lg    %0," #var "@GOTNTPOFF(%%r12)\n\t"       \
+                                                        : "=r" (foo));                                 \
+                                               offset = foo; } while (0)
+#  elif __PIE__ == 2
+#   define MONO_THREAD_VAR_OFFSET(var,offset) do { guint64 foo;                                \
+                                               __asm__ ("larl  %%r1," #var "@INDNTPOFF\n\t"    \
+                                                        "lg    %0,0(%%r1)\n\t"                 \
+                                                        : "=r" (foo) :                         \
+                                                        : "1", "cc");                          \
+                                               offset = foo; } while (0)
+#  endif
 # else
-#  define MONO_THREAD_VAR_OFFSET(var,offset) do { guint64 foo;                                 \
-                                               __asm__ ("basr  %%r1,0\n\t"                     \
-                                                        "j     0f\n\t"                         \
-                                                        ".quad " #var "@NTPOFF\n"              \
-                                                        "0:\n\t"                               \
-                                                        "lg    %0,4(%%r1)\n\t"                 \
-                                                       : "=r" (foo) : : "1");                  \
+#  define MONO_THREAD_VAR_OFFSET(var,offset) do { guint64 foo;                         \
+                                               __asm__ ("basr  %%r1,0\n\t"             \
+                                                        "j     0f\n\t"                 \
+                                                        ".quad " #var "@NTPOFF\n"      \
+                                                        "0:\n\t"                       \
+                                                        "lg    %0,4(%%r1)\n\t"         \
+                                                       : "=r" (foo) : : "1");          \
                                                offset = foo; } while (0)
 # endif
-
 #else
 #define MONO_THREAD_VAR_OFFSET(var,offset) (offset) = -1
 #endif
index b1cd30f9045380899b30fbaf73bc20b224c24585..ff7028555c18d05f5a310a58a5caa2739e7cd4c0 100644 (file)
@@ -50,4 +50,15 @@ mono_dl_get_executable_path (char *buf, int buflen)
        return -1;
 }
 
+const char*
+mono_dl_get_system_dir (void)
+{
+#ifdef TARGET_IOS
+       /* IOS9 can't load system libraries using relative paths, i.e. 'libc' doesn't work, but '/usr/lib/libc' does. */
+       return "/usr/lib";
+#else
+       return NULL;
+#endif
+}
+
 #endif
index be52a3e6e4cad1fbc7514daf02da7a9b17382c88..09eed6222e2ff55103654335c72eed343cca79a1 100644 (file)
@@ -47,6 +47,13 @@ mono_dl_get_executable_path (char *buf, int buflen)
 {
        return readlink ("/proc/self/exe", buf, buflen - 1);
 }
+
+const char*
+mono_dl_get_system_dir (void)
+{
+       return NULL;
+}
+
 #endif
 
 void *
index 5dabce44835eac318bad847223314e7253ab8708..19ff818f733af5e40e54a74347a51b75a2a92201 100644 (file)
@@ -159,4 +159,10 @@ mono_dl_get_executable_path (char *buf, int buflen)
        return -1; //TODO
 }
 
+const char*
+mono_dl_get_system_dir (void)
+{
+       return NULL;
+}
+
 #endif
index c3c59c160785ee06c898fda10f3cec8f9575eb40..1da98cb8e1d0f812e6a8624ce706b9741a88efeb 100644 (file)
@@ -43,6 +43,7 @@ void* mono_dl_lookup_symbol (MonoDl *module, const char *name);
 int mono_dl_convert_flags (int flags);
 char* mono_dl_current_error_string (void);
 int mono_dl_get_executable_path (char *buf, int buflen);
+const char* mono_dl_get_system_dir (void);
 
 #endif /* __MONO_UTILS_DL_H__ */
 
index 313aca8bcb432fbd174cfd6deaaab76a04ef1514..7a4522f8db9907a0e18a239cf6ef5cffdf86b0f4 100644 (file)
@@ -3,84 +3,99 @@
 
 #include "mono/utils/mono-hwcap.h"
 
-typedef struct
-{
-       char    n3:1;           // N3 instructions present
-       char    zArch:1;        // z/Architecture mode installed
-       char    zAct:1;         // z/Architecture mode active
-       char    date:1;         // DAT enhancement facility
-       char    idte1:1;        // IDTE present (PST)
-       char    idte2:1;        // IDTE present (REG)
-       char    asnlx:1;        // ASN and LX reuse facility
-       char    stfle:1;        // STFLE installed
-       char    zDATe:1;        // Enhanced DAT in z mode
-       char    srstat:1;       // Sense running status facility
-       char    cSSKE:1;        // Conditional SSKE facility
-       char    topo:1;         // Configuration topology facility
-       char    rv1:1;          // Reserved
-       char    xTrans2:1;      // Extended translation facility 2
-       char    msgSec:1;       // Message security facility
-       char    longDsp:1;      // Long displacement facility
-       char    hiPerfLD:1;     // High performance long displacement facility
-       char    hfpMAS:1;       // HFP multiply-and-add/subtrace facility
-       char    xImm:1;         // Extended immediate facility
-       char    xTrans3:1;      // Extended translation facility 3
-       char    hfpUnX:1;       // HFP unnormalized extension facility
-       char    etf2:1;         // ETF2-enhancement facility
-       char    stckf:1;        // Store-clock-fast facility
-       char    parse:1;        // Parsing enhancement facility
-       char    mvcos:1;        // MVCOS facility
-       char    todSteer:1;     // TOD-clock steering facility
-       char    etf3:1;         // ETF3-enhancement facility
-       char    xCPUtm:1;       // Extract CPU time facility
-       char    csst:1;         // Compare-swap-and-store facility
-       char    csst2:1;        // Compare-swap-and-store facility 2
-       char    giX:1;          // General instructions extension facility
-       char    exX:1;          // Execute extensions facility
-       char    em:1;           // Enhanced monitor
-       char    rv2:1;          // Reserved
-       char    spp:1;          // Set program parameters
-       char    fps:1;          // Floating point support enhancement
-       char    dfp:1;          // Decimal floating point facility
-       char    hiDFP:1;        // High Performance DFP facility
-       char    pfpo:1;         // PFPO instruction facility
-       char    doclpkia:1;     // DO/Fast BCR/CL/PK/IA
-       char    rv3:1;          // Reserved
-       char    cmpsce:1;       // CMPSC enhancement
-       char    dfpzc:1;        // DFP zoned-conversion
-       char    eh:1;           // Execution hint
-       char    lt:1;           // Load and trap
-       char    mi:1;           // Miscellaneous instruction enhancements
-       char    pa:1;           // Processor assist
-       char    cx:1;           // Constrained transactional execution
-       char    ltlb:1;         // Local TLB clearing
-       char    ia2:1;          // Interlocked access 2
-       char    rv4:1;          // Reserved;
-       char    rv5:1;          // Reserved;
-       char    rv6:1;          // Reserved;
-       char    rv7:1;          // Reserved;
-       char    rv8:1;          // Reserved;
-       char    rv9:1;          // Reserved;
-       char    rva:1;          // Reserved;
-       char    rvb:1;          // Reserved;
-       char    rvc:1;          // Reserved;
-       char    rvd:1;          // Reserved;
-       char    rve:1;          // Reserved;
-       char    rvf:1;          // Reserved;
-       char    rvg:1;          // Reserved;
-       char    rb:1;           // RRB multiple
-       char    cmc:1;          // CPU measurement counter
-       char    cms:1;          // CPU measurement sampling
-       char    rvh:4;          // Reserved
-       char    tx:1;           // Transactional execution
-       char    rvi:1;          // Reserved
-       char    axsi:1;         // Access exception/store indication
-       char    m3:1;           // Message security extension 3
-       char    m4:1;           // Message security extension 4
-       char    ed2:1;          // Enhanced DAT 2
-       int64_t end[0];         // End on a double word
-} __attribute__((aligned(8))) facilityList_t;
-       
+typedef struct __FACLIST__ {
+       uint8_t n3:1;           // 000 - N3 instructions
+       uint8_t zi:1;           // 001 - z/Arch installed
+       uint8_t za:1;           // 002 - z/Arch active
+       uint8_t date:1;         // 003 - DAT-enhancement
+       uint8_t idtes:1;        // 004 - IDTE-segment tables
+       uint8_t idter:1;        // 005 - IDTE-region tables
+       uint8_t asnlx:1;        // 006 - ASN-LX reuse
+       uint8_t stfle:1;        // 007 - STFLE
+       uint8_t edat1:1;        // 008 - EDAT 1
+       uint8_t srs:1;          // 009 - Sense-Running-Status
+       uint8_t csske:1;        // 010 - Conditional SSKE
+       uint8_t ctf:1;          // 011 - Configuration-topology
+       uint8_t ibm01:1;        // 012 - Assigned to IBM
+       uint8_t ipter:1;        // 013 - IPTE-range
+       uint8_t nqks:1;         // 014 - Nonquiescing key-setting
+       uint8_t ibm02:1;        // 015 - Assigned to IBM
+       uint8_t etf2:1;         // 016 - Extended translation 2
+       uint8_t msa:1;          // 017 - Message security assist 1
+       uint8_t ld:1;           // 018 - Long displacement
+       uint8_t ldh:1;          // 019 - Long displacement high perf
+       uint8_t mas:1;          // 020 - HFP multiply-add-subtract
+       uint8_t eif:1;          // 021 - Extended immediate
+       uint8_t etf3:1;         // 022 - Extended translation 3
+       uint8_t hux:1;          // 023 - HFP unnormalized extension
+       uint8_t etf2e:1;        // 024 - Extended translation enhanced 2
+       uint8_t stckf:1;        // 025 - Store clock fast
+       uint8_t pe:1;           // 026 - Parsing enhancement
+       uint8_t mvcos:1;        // 027 - Move with optional specs
+       uint8_t tods:1;         // 028 - TOD steering
+       uint8_t x000:1;         // 029 - Undefined
+       uint8_t etf3e:1;        // 030 - ETF3 enhancement
+       uint8_t ecput:1;        // 031 - Extract CPU time
+       uint8_t csst:1;         // 032 - Compare swap and store
+       uint8_t csst2:1;        // 033 - Compare swap and store 2
+       uint8_t gie:1;          // 034 - General instructions extension
+       uint8_t ee:1;           // 035 - Execute extensions
+       uint8_t em:1;           // 036 - Enhanced monitor
+       uint8_t fpe:1;          // 037 - Floating point extension
+       uint8_t x001:1;         // 038 - Undefined
+       uint8_t ibm03:1;        // 039 - Assigned to IBM
+       uint8_t spp:1;          // 040 - Set program parameters
+       uint8_t fpse:1;         // 041 - FP support enhancement
+       uint8_t dfp:1;          // 042 - DFP
+       uint8_t dfph:1;         // 043 - DFP high performance
+       uint8_t pfpo:1;         // 044 - PFPO instruction
+       uint8_t multi:1;        // 045 - Multiple inc load/store on CC 1
+       uint8_t ibm04:1;        // 046 - Assigned to IBM
+       uint8_t cmpsce:1;       // 047 - CMPSC enhancement
+       uint8_t dfpzc:1;        // 048 - DFP zoned conversion
+       uint8_t misc:1;         // 049 - Multiple inc load and trap
+       uint8_t ctx:1;          // 050 - Constrained transactional-execution
+       uint8_t ltlb:1;         // 051 - Local TLB clearing
+       uint8_t ia:1;           // 052 - Interlocked access
+       uint8_t lsoc2:1;        // 053 - Load/store on CC 2
+       uint8_t x002:1;         // 054 - Undefined
+       uint8_t ibm05:1;        // 055 - Assigned to IBM
+       uint8_t x003:1;         // 056 - Undefined
+       uint8_t msa5:1;         // 057 - Message security assist 5
+       uint8_t x004:1;         // 058 - Undefined
+       uint8_t x005:1;         // 059 - Undefined
+       uint8_t x006:1;         // 060 - Undefined
+       uint8_t x007:1;         // 061 - Undefined
+       uint8_t ibm06:1;        // 062 - Assigned to IBM
+       uint8_t x008:1;         // 063 - Undefined
+       uint8_t x009:1;         // 064 - Undefined
+       uint8_t ibm07:1;        // 065 - Assigned to IBM
+       uint8_t rrbm:1;         // 066 - Reset reference bits multiple
+       uint8_t cmc:1;          // 067 - CPU measurement counter
+       uint8_t cms:1;          // 068 - CPU Measurement sampling
+       uint8_t ibm08:1;        // 069 - Assigned to IBM
+       uint8_t ibm09:1;        // 070 - Assigned to IBM
+       uint8_t ibm10:1;        // 071 - Assigned to IBM
+       uint8_t ibm11:1;        // 072 - Assigned to IBM
+       uint8_t txe:1;          // 073 - Transactional execution
+       uint8_t sthy:1;         // 074 - Store hypervisor information
+       uint8_t aefsi:1;        // 075 - Access exception fetch/store indication
+       uint8_t msa3:1;         // 076 - Message security assist 3
+       uint8_t msa4:1;         // 077 - Message security assist 4
+       uint8_t edat2:1;        // 078 - Enhanced DAT 2
+       uint8_t x010:1;         // 079 - Undefined
+       uint8_t dfppc:1;        // 080 - DFP packed conversion
+       uint8_t x011:7;         // 081-87 - Undefined
+       uint8_t x012[5];        // 088-127 - Undefined
+       uint8_t ibm12:1;        // 128 - Assigned to IBM
+       uint8_t vec:1;          // 129 - Vector facility
+       uint8_t x013:6;         // 130-135 - Undefined
+       uint8_t x014:6;         // 136-141 - Undefined
+       uint8_t sccm:1;         // 142 - Store CPU counter multiple
+       uint8_t ibm13:1;        // 143 - Assigned to IBM
+       uint8_t x015[14];       // 144-256 Undefined
+} __attribute__ ((packed)) __attribute__ ((aligned(8))) facilityList_t;
+
 extern facilityList_t facs;
 
 #endif /* __MONO_UTILS_HWCAP_S390X_H__ */
index 4f9a97523e2d63e92405466bd814d1f1668a41ba..8e051abcdbf343b65b6dc97804b24ccc336ec520 100644 (file)
 #ifdef HOST_WIN32
 #include <winsock2.h>
 #include <windows.h>
+
+/* Vanilla MinGW is missing some defs, loan them from MinGW-w64. */
+#if defined __MINGW32__ && !defined __MINGW64_VERSION_MAJOR
+
+#if (_WIN32_WINNT >= 0x0600)
+/* Fixme: Opaque structs */
+typedef PVOID RTL_CONDITION_VARIABLE;
+typedef PVOID RTL_SRWLOCK;
+
+#ifndef _RTL_RUN_ONCE_DEF
+#define _RTL_RUN_ONCE_DEF 1
+typedef PVOID RTL_RUN_ONCE, *PRTL_RUN_ONCE;
+typedef DWORD (WINAPI *PRTL_RUN_ONCE_INIT_FN)(PRTL_RUN_ONCE, PVOID, PVOID *);
+#define RTL_RUN_ONCE_INIT 0
+#define RTL_RUN_ONCE_CHECK_ONLY 1UL
+#define RTL_RUN_ONCE_ASYNC 2UL
+#define RTL_RUN_ONCE_INIT_FAILED 4UL
+#define RTL_RUN_ONCE_CTX_RESERVED_BITS 2
+#endif
+#define RTL_SRWLOCK_INIT 0
+#define RTL_CONDITION_VARIABLE_INIT 0
+#define RTL_CONDITION_VARIABLE_LOCKMODE_SHARED 1
+
+#define CONDITION_VARIABLE_INIT RTL_CONDITION_VARIABLE_INIT
+#define CONDITION_VARIABLE_LOCKMODE_SHARED RTL_CONDITION_VARIABLE_LOCKMODE_SHARED
+#define SRWLOCK_INIT RTL_SRWLOCK_INIT
 #endif
 
+#if (_WIN32_WINNT >= 0x0600)
+/*Condition Variables http://msdn.microsoft.com/en-us/library/ms682052%28VS.85%29.aspx*/
+typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
+typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
+
+WINBASEAPI VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable);
+WINBASEAPI WINBOOL WINAPI SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable, PCRITICAL_SECTION CriticalSection, DWORD dwMilliseconds);
+WINBASEAPI WINBOOL WINAPI SleepConditionVariableSRW(PCONDITION_VARIABLE ConditionVariable, PSRWLOCK SRWLock, DWORD dwMilliseconds, ULONG Flags);
+WINBASEAPI VOID WINAPI WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable);
+WINBASEAPI VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable);
+
+/*Slim Reader/Writer (SRW) Locks http://msdn.microsoft.com/en-us/library/aa904937%28VS.85%29.aspx*/
+WINBASEAPI VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK SRWLock);
+WINBASEAPI VOID WINAPI AcquireSRWLockShared(PSRWLOCK SRWLock);
+WINBASEAPI VOID WINAPI InitializeSRWLock(PSRWLOCK SRWLock);
+WINBASEAPI VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK SRWLock);
+WINBASEAPI VOID WINAPI ReleaseSRWLockShared(PSRWLOCK SRWLock);
+
+WINBASEAPI BOOLEAN TryAcquireSRWLockExclusive(PSRWLOCK SRWLock);
+WINBASEAPI BOOLEAN TryAcquireSRWLockShared(PSRWLOCK SRWLock);
+
+/*One-Time Initialization http://msdn.microsoft.com/en-us/library/aa363808(VS.85).aspx*/
+#define INIT_ONCE_ASYNC 0x00000002UL
+#define INIT_ONCE_INIT_FAILED 0x00000004UL
+
+typedef PRTL_RUN_ONCE PINIT_ONCE;
+typedef PRTL_RUN_ONCE LPINIT_ONCE;
+typedef WINBOOL CALLBACK (*PINIT_ONCE_FN) (PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context);
+
+WINBASEAPI WINBOOL WINAPI InitOnceBeginInitialize(LPINIT_ONCE lpInitOnce, DWORD dwFlags, PBOOL fPending, LPVOID *lpContext);
+WINBASEAPI WINBOOL WINAPI InitOnceComplete(LPINIT_ONCE lpInitOnce, DWORD dwFlags, LPVOID lpContext);
+WINBASEAPI WINBOOL WINAPI InitOnceExecuteOnce(PINIT_ONCE InitOnce, PINIT_ONCE_FN InitFn, PVOID Parameter, LPVOID *Context);
+#endif
+
+#endif /* defined __MINGW32__ && !defined __MINGW64_VERSION_MAJOR */
+#endif /* HOST_WIN32 */
+
 G_BEGIN_DECLS
 
 #ifndef HOST_WIN32
index 05ff5b6d5c3c77cba8c6849054884393d1237c4b..0b52af568c009f1caf7e9618e5f88fd24383cab0 100644 (file)
@@ -808,8 +808,10 @@ mono_cpu_usage (MonoCpuUsageState *prev)
        if (cpu_total_time > 0 && cpu_busy_time > 0)
                cpu_usage = (gint32)(cpu_busy_time * 100 / cpu_total_time);
 
-       g_assert (cpu_usage >= 0);
-       g_assert (cpu_usage <= 100);
+       if (cpu_usage < 0 || cpu_usage > 100) {
+               g_error ("incorrect cpu usage %d, cpu_busy_time %lld cpu_total_time %lld\n", cpu_usage, cpu_busy_time, cpu_total_time);
+               return -1;
+       }
 
        return cpu_usage;
 }
index 4ac92196e07c5cdae57975616aa4c7f54c1e2ba0..6c857fe823951c21df058ba1773856689ac2d0cf 100644 (file)
@@ -55,22 +55,27 @@ mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
 #endif
        ts.tv_sec = timeout_ms / 1000 + t.tv_sec;
        ts.tv_nsec = (timeout_ms % 1000) * 1000000 + t.tv_usec * 1000;
-       while (ts.tv_nsec > NSEC_PER_SEC) {
+       while (ts.tv_nsec >= NSEC_PER_SEC) {
                ts.tv_nsec -= NSEC_PER_SEC;
                ts.tv_sec++;
        }
 
        copy = ts;
-       while ((res = WAIT_BLOCK (sem, &ts)) == -1 && errno == EINTR) {
+#ifdef USE_MACH_SEMA
+       gettimeofday (&t, NULL);
+       while ((res = WAIT_BLOCK (sem, &ts)) == KERN_ABORTED)
+#else
+       while ((res = WAIT_BLOCK (sem, &ts)) == -1 && errno == EINTR)
+#endif
+       {
+#ifdef USE_MACH_SEMA
                struct timeval current;
+#endif
                if (alertable)
                        return -1;
+               ts = copy;
 #ifdef USE_MACH_SEMA
-               memset (&current, 0, sizeof (current));
-#else
                gettimeofday (&current, NULL);
-#endif
-               ts = copy;
                ts.tv_sec -= (current.tv_sec - t.tv_sec);
                ts.tv_nsec -= (current.tv_usec - t.tv_usec) * 1000;
                if (ts.tv_nsec < 0) {
@@ -85,6 +90,7 @@ mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
                        ts.tv_sec = 0;
                        ts.tv_nsec = 0;
                }
+#endif
        }
 
        /* OSX might return > 0 for error */
index 781757f3d4edd8912006a2d66094a7c9d55cad61..366f09468e952c5882802b4dd0edf07d8655bd73 100644 (file)
@@ -800,10 +800,6 @@ is_thread_in_critical_region (MonoThreadInfo *info)
        if (info->inside_critical_region)
                return TRUE;
 
-       if (threads_callbacks.mono_thread_in_critical_region && threads_callbacks.mono_thread_in_critical_region (info)) {
-               return TRUE;
-       }
-
        /* Are we inside a GC critical region? */
        if (threads_callbacks.mono_thread_in_critical_region && threads_callbacks.mono_thread_in_critical_region (info)) {
                return TRUE;
index dbf019cffaf6b3679c51f1156349e49ba4a964c1..edbf934ac9bf7321a524a47459231121c00d9f40 100644 (file)
@@ -88,7 +88,7 @@ and reduce the number of casts drastically.
 /* Logging - enable them below if you need specific logging for the category you need */
 #define MOSTLY_ASYNC_SAFE_PRINTF(...) do { \
        char __buff[1024];      __buff [0] = '\0'; \
-       snprintf (__buff, sizeof (__buff), __VA_ARGS__);        \
+       g_snprintf (__buff, sizeof (__buff), __VA_ARGS__);      \
        write (1, __buff, strlen (__buff));     \
 } while (0)
 
index 1f002a420686e30d559cd7231cb6ae5336289c50..ec5a9a9c9fcd130873547197a7d89f09027c385b 100644 (file)
@@ -12,7 +12,7 @@
     </project>
     <project dir="class/corlib" library="corlib-basic">
       <boot>true</boot>
-      <flags>/codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -d:DISABLE_CAS_USE -lib:./../../class/lib/basic -optimize /noconfig -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP -resource:resources/charinfo.nlp -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin --runtime:v4</flags>
+      <flags>/codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -d:DISABLE_CAS_USE -lib:./../../class/lib/basic -optimize /noconfig -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -resource:resources/charinfo.nlp -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin --runtime:v4</flags>
       <output>mscorlib.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/basic/mscorlib.dll</library_output>
@@ -72,7 +72,7 @@
     </project>
     <project dir="class/corlib" library="corlib-build">
       <boot>true</boot>
-      <flags>/codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/build -optimize /noconfig -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP -resource:resources/charinfo.nlp -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin --runtime:v4</flags>
+      <flags>/codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/build -optimize /noconfig -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -resource:resources/charinfo.nlp -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin --runtime:v4</flags>
       <output>mscorlib.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/build/mscorlib.dll</library_output>
     </project>
     <project dir="class/corlib" library="corlib-net_4_5">
       <boot>true</boot>
-      <flags>/codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/net_4_5 -debug -optimize /noconfig -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP -resource:resources/charinfo.nlp -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin --runtime:v4</flags>
+      <flags>/codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/net_4_5 -debug -optimize /noconfig -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -resource:resources/charinfo.nlp -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin --runtime:v4</flags>
       <output>mscorlib.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_5/mscorlib.dll</library_output>
     </project>
     <project dir="class/corlib" library="corlib-tests-net_4_5">
       <boot>false</boot>
-      <flags>/codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/net_4_5 -debug -optimize -r:./../../class/lib/net_4_5/mscorlib.dll -debug -nowarn:168,219,618,672 -unsafe -r:Mono.Posix.dll -r:System.Core.dll -define:MONO_DATACONVERTER_STATIC_METHODS -resource:Test/resources/Resources.resources</flags>
+      <flags>/codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/net_4_5 -debug -optimize -r:./../../class/lib/net_4_5/mscorlib.dll -debug -nowarn:168,219,618,672 -unsafe -r:Mono.Posix.dll -r:System.Core.dll -define:MONO_DATACONVERTER_STATIC_METHODS -resource:Test/resources/Resources.resources</flags>
       <output>corlib_test_net_4_5.dll</output>
       <built_sources></built_sources>
       <library_output>corlib_test_net_4_5.dll</library_output>
     </project>
     <project dir="tools/xbuild" library="xbuild-net_4_5">
       <boot></boot>
-      <flags>/codepage:65001 -r:./../../class/lib/net_4_5/Microsoft.Build.Framework.dll -r:./../../class/lib/net_4_5/Microsoft.Build.Utilities.v4.0.dll -r:./../../class/lib/net_4_5/Microsoft.Build.Engine.dll -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/net_4_5 -r:mscorlib.dll -debug -optimize /noconfig</flags>
+      <flags>/codepage:65001 -r:./../../class/lib/net_4_5/Microsoft.Build.Framework.dll -r:./../../class/lib/net_4_5/Microsoft.Build.Utilities.v4.0.dll -r:./../../class/lib/net_4_5/Microsoft.Build.Engine.dll -r:./../../class/lib/net_4_5/Microsoft.Build.Tasks.v4.0.dll -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/net_4_5 -r:mscorlib.dll -debug -optimize /noconfig</flags>
       <output>xbuild.exe</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_5/xbuild.exe</library_output>
     </project>
     <project dir="tools/xbuild" library="xbuild-xbuild_12">
       <boot></boot>
-      <flags>/codepage:65001 -r:./../../class/lib/xbuild_12/Microsoft.Build.Framework.dll -r:./../../class/lib/xbuild_12/Microsoft.Build.Utilities.v12.0.dll -r:./../../class/lib/xbuild_12/Microsoft.Build.Engine.dll -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/xbuild_12 -r:mscorlib.dll -debug -d:XBUILD_12 -d:MONO -d:DISABLE_CAS_USE -lib:./../../class/lib/net_4_5 -optimize /noconfig</flags>
+      <flags>/codepage:65001 -r:./../../class/lib/xbuild_12/Microsoft.Build.Framework.dll -r:./../../class/lib/xbuild_12/Microsoft.Build.Utilities.v12.0.dll -r:./../../class/lib/xbuild_12/Microsoft.Build.Engine.dll -r:./../../class/lib/xbuild_12/Microsoft.Build.Tasks.v12.0.dll -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/xbuild_12 -r:mscorlib.dll -debug -d:XBUILD_12 -d:MONO -d:DISABLE_CAS_USE -lib:./../../class/lib/net_4_5 -optimize /noconfig</flags>
       <output>xbuild.exe</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/xbuild_12/xbuild.exe</library_output>
     </project>
     <project dir="tools/xbuild" library="xbuild-xbuild_14">
       <boot></boot>
-      <flags>/codepage:65001 -r:./../../class/lib/xbuild_14/Microsoft.Build.Framework.dll -r:./../../class/lib/xbuild_14/Microsoft.Build.Utilities.Core.dll -r:./../../class/lib/xbuild_14/Microsoft.Build.Engine.dll -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/xbuild_14 -r:mscorlib.dll -debug -d:XBUILD_12 -d:XBUILD_14 -d:MONO -d:DISABLE_CAS_USE -lib:./../../class/lib/net_4_5 -optimize /noconfig</flags>
+      <flags>/codepage:65001 -r:./../../class/lib/xbuild_14/Microsoft.Build.Framework.dll -r:./../../class/lib/xbuild_14/Microsoft.Build.Utilities.Core.dll -r:./../../class/lib/xbuild_14/Microsoft.Build.Engine.dll -r:./../../class/lib/xbuild_14/Microsoft.Build.Tasks.Core.dll -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:./../../class/lib/xbuild_14 -r:mscorlib.dll -debug -d:XBUILD_12 -d:XBUILD_14 -d:MONO -d:DISABLE_CAS_USE -lib:./../../class/lib/net_4_5 -optimize /noconfig</flags>
       <output>xbuild.exe</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/xbuild_14/xbuild.exe</library_output>
index 415c21b1cb35101af9673996f481659e99eebdde..8f9d7470e0f8179547dfe942a24f2b1fcd8cc089 100644 (file)
@@ -25,12 +25,6 @@ $(symlinks):
 
 SUPPORT_FILES = $(symlinks) mono-wrapper etc/mono/config
 
-if ONLY_MONOTOUCH
-build_profiles = monotouch
-else
-if ONLY_XAMMAC
-build_profiles = xammac
-else
 build_profiles = 
 
 if INSTALL_4_5
@@ -43,18 +37,15 @@ build_profiles += monodroid
 endif
 
 if INSTALL_MONOTOUCH
-build_profiles += monotouch monotouch_runtime
+build_profiles += monotouch monotouch_runtime monotouch_watch
 endif
 
 if INSTALL_XAMMAC
-build_profiles += xammac
+build_profiles += xammac xammac_net_4_5
 endif
 
 test_profiles = $(build_profiles)
 
-endif
-endif
-
 if BUILD_MCS
 
 MAKE_FLAGS=$(if $(V),,--no-print-directory -s)
index 17d8a32c1625d1578a296638a719fb9002364a18..a8ec6d2f0e7771fcc9cd864db8fc221a66c884ff 100644 (file)
@@ -1000,6 +1000,12 @@ namespace Mono.Tools.LocaleBuilder
                                nodes = node.SelectNodes ("months/monthContext[@type='stand-alone']/monthWidth[@type='wide']/month");
                                ProcessAllNodes (nodes, df.MonthNames, AddOrReplaceValue);
 
+                               if (df.MonthNames != null) {
+                                       if (ci.Name == "sv" || ci.Name == "sv-SE") {
+                                               ToLower (df.MonthNames);
+                                       }
+                               }
+
                                // Apply global rule first <alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
                                if (ci.Name == "ja" || ci.Name == "ja-JP") {
                                        // Use common number style
@@ -1010,6 +1016,12 @@ namespace Mono.Tools.LocaleBuilder
                                        ProcessAllNodes (nodes, df.AbbreviatedMonthNames, AddOrReplaceValue);
                                }
 
+                               if (df.AbbreviatedMonthNames != null) {
+                                       if (ci.Name == "sv" || ci.Name == "sv-SE") {
+                                               ToLower (df.AbbreviatedMonthNames);
+                                       }
+                               }
+
                                nodes = node.SelectNodes ("months/monthContext[@type='format']/monthWidth[@type='wide']/month");
                                if (nodes != null) {
                                        ProcessAllNodes (nodes, df.MonthGenitiveNames, AddOrReplaceValue);
@@ -1027,6 +1039,12 @@ namespace Mono.Tools.LocaleBuilder
                                nodes = node.SelectNodes ("days/dayContext[@type='stand-alone']/dayWidth[@type='abbreviated']/day");
                                ProcessAllNodes (nodes, df.AbbreviatedDayNames, AddOrReplaceDayValue);
 
+                               if (df.AbbreviatedDayNames != null) {
+                                       if (ci.Name == "sv" || ci.Name == "sv-SE") {
+                                               ToLower (df.AbbreviatedDayNames);
+                                       }
+                               }
+
                                // TODO: This is not really ShortestDayNames as .NET uses it
                                // Apply global rules first <alias source="locale" path="../../dayContext[@type='stand-alone']/dayWidth[@type='narrow']"/>
                                nodes = node.SelectNodes ("days/dayContext[@type='format']/dayWidth[@type='narrow']/day");
@@ -1171,6 +1189,19 @@ namespace Mono.Tools.LocaleBuilder
                        }
                }
 
+               static void ToLower (string[] values)
+               {
+                       if (values == null)
+                               return;
+
+                       for (int i = 0; i < values.Length; ++i) {
+                               if (values [i] == null)
+                                       continue;
+
+                               values [i] = values [i].ToLower ();
+                       }
+               }
+
                string GetInfinitySymbol (CultureInfoEntry ci)
                {
                        // TODO: Add more
index cbb134e68bbf453f9512c3056e6c78a864490c88..af1960918fc45fc49caee3b49435361aef9e0a6d 100644 (file)
@@ -97,6 +97,9 @@
 /* Define to 1 if you have the <complex.h> header file. */
 #define HAVE_COMPLEX_H 1
 
+/* Define to 1 if you have the `system' function. */
+#define HAVE_SYSTEM 1
+
 /* Have /dev/random */
 #define HAVE_CRYPT_RNG 1