Merge pull request #4040 from ntherning/disable-symbolicate-tests-on-windows
authorNiklas Therning <niklas@therning.org>
Tue, 29 Nov 2016 14:40:27 +0000 (15:40 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Nov 2016 14:40:27 +0000 (15:40 +0100)
Disable symbolicate tests on Windows

132 files changed:
.gitmodules
acceptance-tests/Makefile.am
acceptance-tests/ms-test-suite.mk
configure.ac
external/cecil
external/roslyn-binaries [new submodule]
mcs/Makefile
mcs/build/common/basic-profile-check.cs
mcs/build/config-default.make
mcs/build/executable.make
mcs/build/library.make
mcs/build/platforms/darwin.make
mcs/build/platforms/linux.make
mcs/build/platforms/win32.make
mcs/build/profiles/aot_hybrid.make
mcs/build/profiles/aot_only.make
mcs/build/profiles/basic.make
mcs/build/profiles/build.make
mcs/build/profiles/monodroid.make
mcs/build/profiles/monotouch_runtime.make
mcs/build/profiles/net_4_x.make
mcs/build/profiles/xammac.make
mcs/build/rules.make
mcs/class/Facades/subdirs.make
mcs/class/Makefile
mcs/class/Microsoft.Build.Engine/Makefile
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
mcs/class/Mono.Debugger.Soft/Test/dtest.cs
mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs
mcs/class/System/System/MonoToolsLocator.cs
mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs
mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs
mcs/class/System/basic_System.dll.sources [deleted file]
mcs/class/aot-compiler/Makefile
mcs/class/corlib/Makefile
mcs/class/monodoc/Assembly/AssemblyInfo.cs
mcs/class/monodoc/Makefile
mcs/errors/CS0029-26-lib.cs
mcs/errors/CSFriendAssembly-lib.cs
mcs/errors/Makefile
mcs/errors/dlls/first/CS1701-lib.cs
mcs/errors/dlls/first/CS1702-lib.cs
mcs/errors/dlls/first/CS1703-lib.cs
mcs/errors/dlls/first/CS1705-lib.cs
mcs/errors/dlls/second/CS1701-lib.cs
mcs/errors/dlls/second/CS1702-lib.cs
mcs/errors/dlls/second/CS1703-lib.cs
mcs/errors/dlls/second/CS1705-lib.cs
mcs/mcs/Makefile
mcs/nunit24/ClientUtilities/util/Makefile
mcs/nunit24/ConsoleRunner/nunit-console/Makefile
mcs/nunit24/NUnitCore/core/Makefile
mcs/nunit24/NUnitCore/interfaces/Makefile
mcs/nunit24/NUnitExtensions/core/Makefile
mcs/nunit24/NUnitExtensions/framework/Makefile
mcs/nunit24/NUnitFramework/framework/Makefile
mcs/nunit24/NUnitMocks/mocks/Makefile
mcs/packages/.gitignore [new file with mode: 0644]
mcs/packages/Makefile [new file with mode: 0644]
mcs/tests/Makefile
mcs/tools/cil-stringreplacer/cil-stringreplacer.cs
mcs/tools/mdoc/Test/en.expected-dropns-classic-v1/index.xml
mcs/tools/mdoc/Test/en.expected-dropns-classic-withsecondary/index.xml
mcs/tools/mdoc/Test/en.expected-dropns-delete/index.xml
mcs/tools/mdoc/Test/en.expected-dropns-multi-withexisting/index.xml
mcs/tools/mdoc/Test/en.expected-dropns-multi/index.xml
mcs/tools/mdoc/Test/en.expected-enumerations/index.xml
mcs/tools/mdoc/Test/en.expected-internal-interface/index.xml
mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest.Generic/Extensions.xml
mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest.Generic/MyList`1+Helper`2.xml
mcs/tools/mdoc/Test/en.expected.delete/index.xml
mcs/tools/mdoc/Test/en.expected.importecmadoc/index.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/Extensions.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest.Generic/MyList`1+Helper`2.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Color.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/DocAttribute.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/System/Environment.xml
mcs/tools/mdoc/Test/en.expected.importslashdoc/index.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/Extensions.xml
mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest.Generic/MyList`1+Helper`2.xml
mcs/tools/mdoc/Test/en.expected.since/index.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/Extensions.xml
mcs/tools/mdoc/Test/en.expected/Mono.DocTest.Generic/MyList`1+Helper`2.xml
mcs/tools/mdoc/Test/en.expected/index.xml
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/Extensions.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/IFoo`1.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/MyList`1+Helper`2.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/MyList`1.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest.Generic/MyList`2.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Color.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/DocAttribute.html
mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget.html
mcs/tools/mdoc/Test/html.expected/System/Environment.html
mcs/tools/mdoc/Test/msxdoc-expected.importslashdoc.xml
mcs/tools/mono-service/Makefile
mcs/tools/mono-symbolicate/Test/symbolicate.expected
mcs/tools/nunit-lite/NUnitLite/Makefile
mono/metadata/class-accessors.c
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/custom-attrs.c
mono/metadata/icall.c
mono/metadata/metadata.c
mono/metadata/object-internals.h
mono/metadata/object.c
mono/metadata/property-bag.c
mono/metadata/reflection.c
mono/metadata/sre-save.c
mono/metadata/sre.c
mono/metadata/threads.c
mono/metadata/w32process-unix.c
mono/mini/Makefile.am.in
mono/mini/TestDriver.cs
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/method-to-ir.c
mono/mini/mini-exceptions.c
mono/mini/mini-llvm.c
mono/mini/mini-runtime.c
mono/mini/mini.h
mono/mini/patch-info.h
mono/profiler/Makefile.am
mono/tests/Makefile.am
mono/tests/assemblyresolve/Makefile.am
mono/tests/sgen-new-threads-collect.cs
mono/tests/thread6.cs
runtime/Makefile.am
scripts/.gitignore
scripts/Makefile.am
scripts/csc.in [new file with mode: 0644]

index 20d831d7e4a2c43ca89426e015f01a2a5b2de344..3dc4e8c19e3f1ec04541c38093be6a231e46bd16 100644 (file)
@@ -52,3 +52,6 @@
 [submodule "external/linker"]
        path = external/linker
        url = git://github.com/mono/linker.git
+[submodule "external/roslyn-binaries"]
+       path = external/roslyn-binaries
+       url = git://github.com/mono/roslyn-binaries.git
index c03adcc0c45f20f7be507986a6ddd4437ccfdb9b..6f4f2080ebffc935ddc04390ed266f5f7529581d 100644 (file)
@@ -11,7 +11,7 @@ CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
 
 with_mono_path = MONO_PATH=$(CLASS)
 RUNTIME = $(with_mono_path) $(abs_top_builddir)/runtime/mono-wrapper --debug
-MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe
+MCS = $(RUNTIME) $(CSC) -nologo
 ILASM = $(RUNTIME) $(CLASS)/ilasm.exe
 
 include versions.mk
index 1516dc61db68079b727791a9af45918375955c7a..7ed072e797d59c86766cf1d57f878e9d851e0926 100644 (file)
@@ -1,8 +1,8 @@
 check-ms-test-suite: $(CLASS)/nunitlite.dll
        @if $(MAKE) validate-ms-test-suite RESET_VERSIONS=1; then \
-               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
+               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug:portable -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
                $(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml" || EXIT_CODE=1; \
-               $(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug -warn:1" && \
+               $(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug:portable -warn:1" && \
                $(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run MONO="$(RUNTIME)" || EXIT_CODE=1; \
                exit $$EXIT_CODE; \
        else \
index 26c1e950d67e765ba6d3116c2d8adbf7899c6c3b..3319ae33b40aeaf38ffca9edfce98e6bc512fd3c 100644 (file)
@@ -4050,10 +4050,13 @@ AC_SUBST(mono_build_root)
 mono_runtime=mono/mini/mono
 AC_SUBST(mono_runtime)
 
+CSC=$mono_build_root/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.1.3.2/tools/csc.exe
+
 mono_cfg_root=$mono_build_root/runtime
 if test x$host_win32 = xyes; then
   if test "x$cross_compiling" = "xno"; then
     mono_cfg_dir=`cygpath -w -a $mono_cfg_root`\\etc
+    CSC="'"`cygpath -w -a $CSC`"'"
   else
     mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\'`\\etc
   fi
@@ -4062,6 +4065,8 @@ else
 fi
 AC_SUBST(mono_cfg_dir)
 
+AC_SUBST(CSC)
+
 AC_CONFIG_FILES([po/mcs/Makefile.in])
 
 AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
@@ -4393,6 +4398,8 @@ fi
       echo "BCL_OPTIMIZE = 1" >> $srcdir/$mcsdir/build/config.make
     fi
 
+    echo "CSC_LOCATION = $CSC" >> $srcdir/$mcsdir/build/config.make
+
     if test "x$AOT_BUILD_FLAGS" != "x" ; then
       echo "AOT_RUN_FLAGS=$AOT_RUN_FLAGS" >> $srcdir/$mcsdir/build/config.make
       echo "AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS" >> $srcdir/$mcsdir/build/config.make
index 74ab08331c603d45932fa825c49329e124c2c77a..8180cef874eb1d631eac3ad186cc28e27165f44f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 74ab08331c603d45932fa825c49329e124c2c77a
+Subproject commit 8180cef874eb1d631eac3ad186cc28e27165f44f
diff --git a/external/roslyn-binaries b/external/roslyn-binaries
new file mode 160000 (submodule)
index 0000000..a1c06d5
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit a1c06d559d6f2cbbaeae86ea87632d409a82ca94
index 6e02ba6c8e82a6606e4f5046176d4f7f4abceec5..c2f9a1a6097ed99e92d93f91a3640de55346161b 100644 (file)
@@ -1,11 +1,11 @@
 thisdir := .
 
-SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs
+SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs packages
 
 # Resgen is corlib specific tool
 
-basic_SUBDIRS := build jay mcs class
-build_SUBDIRS := build class mcs class/aot-compiler tools
+basic_SUBDIRS := build class
+build_SUBDIRS := build jay class class/aot-compiler tools
 monodroid_SUBDIRS := build class
 monotouch_SUBDIRS := build class
 monotouch_watch_SUBDIRS := build class
@@ -17,7 +17,7 @@ xammac_SUBDIRS := build class
 aot_hybrid_SUBDIRS := build class ilasm
 aot_only_SUBDIRS := build class ilasm
 binary_reference_assemblies_SUBDIRS := build class
-net_4_x_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
+net_4_x_SUBDIRS := build class nunit24 ilasm tools tests errors docs mcs class/aot-compiler packages
 xammac_net_4_5_SUBDIRS := build class
 xbuild_12_SUBDIRS := build class tools/xbuild
 xbuild_14_SUBDIRS := build class tools/xbuild
index 631b764bf9dd24608afc325f7d47d345ea34edee..591843dd20eda826eab268f402544cdc2950c2ce 100644 (file)
@@ -40,7 +40,7 @@ class X {
                if (!Version.TryParse (field.GetValue (null) as string, out version))
                        return 4;
 
-               if (version < new Version (4, 0))
+               if (version < new Version (4, 8))
                        return 5;
 
                return 0;
index 9e4fcf64a306bda16b94c324ae81371f7e951156..f0701cfb142227122553ad71401c3013f9fa6c78 100644 (file)
@@ -11,9 +11,10 @@ CODEPAGE = 65001
 
 RUNTIME_FLAGS = 
 TEST_HARNESS = $(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)nunit-lite-console.exe
+PLATFORM_DEBUG_FLAGS = /debug:portable
 MCS_FLAGS = 
-MBAS_FLAGS = $(PLATFORM_DEBUG_FLAGS)
-LIBRARY_FLAGS = /noconfig
+MBAS_FLAGS = -debug
+LIBRARY_FLAGS =
 ifndef CFLAGS
 CFLAGS = -g -O2
 endif
index 8acb0f5df619f789fd717207654d9178d6d9d178..1a9ffab0e7f5d774e95bc328d436941d260fc7c0 100644 (file)
@@ -42,6 +42,9 @@ executable_CLEAN_FILES += $(build_lib) $(build_lib).so $(build_lib).mdb $(build_
 
 makefrag = $(depsdir)/$(PROFILE)_$(base_prog).makefrag
 
+MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(LIB_REFS))
+MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.exe,$(EXE_REFS))
+
 ifndef NO_BUILD
 all-local: $(the_lib) $(PROGRAM_config)
 endif
@@ -63,6 +66,7 @@ install-local:
        $(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
        $(INSTALL_BIN) $(the_lib) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
        test ! -f $(the_lib).mdb || $(INSTALL_BIN) $(the_lib).mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR)
+       test ! -f $(the_lib:.exe=.pdb) || $(INSTALL_BIN) $(the_lib:.exe=.pdb) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
 ifdef PROGRAM_config
        $(INSTALL_DATA) $(PROGRAM_config) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
 endif
@@ -71,7 +75,8 @@ ifdef PLATFORM_AOT_SUFFIX
 endif
 
 uninstall-local:
-       -rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$(base_prog) $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$(base_prog).mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$(base_prog).config
+       -rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$(base_prog) $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$(base_prog).mdb \
+       $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$(base_prog:.exe=.pdb) $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$(base_prog).config
 endif
 
 clean-local:
@@ -151,9 +156,6 @@ endif
 
 -include $(makefrag)
 
-MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(LIB_REFS))
-MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.exe,$(EXE_REFS))
-
 all-local: $(makefrag) $(extra_targets)
 
 ifdef BUILT_SOURCES
index e604beb8f75e5cdcf411a963970d3423f2f377c6..2f5b845ec5dfb3c446bff13433f6956d93dfb2be 100644 (file)
@@ -72,12 +72,10 @@ the_libdir_base = $(topdir)/class/$(lib_dir)/$(PROFILE)/
 endif
 
 ifdef RESOURCE_STRINGS
-ifdef BOOTSTRAP_PROFILE
-ifneq (basic, $(BUILD_TOOLS_PROFILE))
+ifneq (basic, $(PROFILE))
 RESOURCE_STRINGS_FILES += $(RESOURCE_STRINGS:%=--resourcestrings:%)
 endif
 endif
-endif
 
 #
 # The bare directory contains the plain versions of System and System.Xml
@@ -168,12 +166,14 @@ install-local:
        $(MKINSTALLDIRS) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
        $(INSTALL_LIB) $(the_lib) $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME)
        test ! -f $(the_lib).mdb || $(INSTALL_LIB) $(the_lib).mdb $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME).mdb
+       test ! -f $(the_lib:.dll=.pdb) || $(INSTALL_LIB) $(the_lib:.dll=.pdb) $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME:.dll=.pdb)
+
 ifdef PLATFORM_AOT_SUFFIX
        test ! -f $(aot_lib) || $(INSTALL_LIB) $(aot_lib) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
 endif
 
 uninstall-local:
-       -rm -f $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME) $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME).mdb
+       -rm -f $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME) $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME).mdb $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME:.dll=.pdb)
 
 else
 
index 4b7b279f0c701ffc6fa0097267a0111bb2d95590..af397fe1c11e9d9cc569d54449a355adbc7c01e1 100644 (file)
@@ -3,7 +3,6 @@
 # Platform-specific makefile rules. This one's for linux.
 #
 
-PLATFORM_DEBUG_FLAGS = -debug
 PLATFORM_MCS_FLAGS =
 PLATFORM_RUNTIME = $(RUNTIME)
 PLATFORM_CORLIB = mscorlib.dll
index 00504140796593b770c9295ba9c53e04352f171d..02348318afe4210308c32cc513503975c93f1149 100644 (file)
@@ -3,7 +3,6 @@
 # Platform-specific makefile rules. This one's for linux.
 #
 
-PLATFORM_DEBUG_FLAGS = -debug
 PLATFORM_MCS_FLAGS =
 PLATFORM_RUNTIME = $(RUNTIME)
 PLATFORM_CORLIB = mscorlib.dll
index 4f34c924f03258a9d7c7f0618f0b33c317e31826..1e5ea9b803bf03fcd633b124a4d1b1252884f0b1 100644 (file)
@@ -3,8 +3,7 @@
 # Win32 platform-specific makefile rules.
 #
 
-PLATFORM_DEBUG_FLAGS = /debug+ /debug:full
-PLATFORM_MCS_FLAGS = /nologo
+PLATFORM_MCS_FLAGS =
 PLATFORM_RUNTIME = 
 PLATFORM_CORLIB = mscorlib.dll
 PLATFORM_TEST_HARNESS_EXCLUDES = NotOnWindows,
index e531f44a4b55b581ff562313c61af33b8d721a8e..7b1365f9548a48d1cb900ce3fc5611c9123c5360 100644 (file)
@@ -2,8 +2,8 @@
 
 BOOTSTRAP_PROFILE = build
 
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
-MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" CSC_SDK_PATH_DISABLED= $(INTERNAL_CSC)
+MCS = $(BOOTSTRAP_MCS)
 
 # Use system resgen as we don't want local System.Windows.Forms dependency
 RESGEN = resgen2
index 324bdc2a4ba5c0cab6e60aa506d6c3510e1204cf..0ef7cf889b51e18720b7d683ce0722e1d1e2b4f5 100644 (file)
@@ -2,8 +2,8 @@
 
 BOOTSTRAP_PROFILE = build
 
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
-MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" CSC_SDK_PATH_DISABLED= $(INTERNAL_CSC)
+MCS = $(BOOTSTRAP_MCS)
 
 # Use system resgen as we don't want local System.Windows.Forms dependency
 RESGEN = resgen2
index 12b80615bdb7f0283c9127348d78b8e005c4b467..d1e21c29247b1467c70f4d50cb50fc48862be989 100644 (file)
@@ -6,19 +6,24 @@ with_mono_path_monolite = MONO_PATH="$(topdir)/class/lib/monolite$(PLATFORM_PATH
 monolite_flag := $(depsdir)/use-monolite
 use_monolite := $(wildcard $(monolite_flag))
 
-MONOLITE_MCS = $(topdir)/class/lib/monolite/basic.exe
+MONOLITE_MSCORLIB = $(topdir)/class/lib/monolite/mscorlib.dll
+
+# Bootstrap compiler does not have to be same as production compiler
+INTERNAL_GMCS = $(CSC_LOCATION)
 
 ifdef use_monolite
 PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
-BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(MONOLITE_MCS)
 else
 PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
-BOOTSTRAP_MCS = $(EXTERNAL_MCS)
 endif
 
-MCS = $(with_mono_path) $(INTERNAL_GMCS)
+INTERNAL_CSC = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(INTERNAL_GMCS)
+BOOTSTRAP_MCS = CSC_SDK_PATH_DISABLED= $(INTERNAL_CSC)
+MCS = $(BOOTSTRAP_MCS)
+
+DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
 
-PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -lib:$(topdir)/class/lib/$(PROFILE)
+PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
 NO_SIGN_ASSEMBLY = yes
 NO_TEST = yes
 NO_INSTALL = yes
@@ -33,7 +38,7 @@ LIBRARY_COMPILE = $(BOOT_COMPILE)
 #
 # Copy from rules.make because I don't know how to unset MCS_FLAGS
 #
-USE_MCS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS)
+USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS)
 
 .PHONY: profile-check do-profile-check
 profile-check:
@@ -59,20 +64,25 @@ MAKE_Q=$(if $(V),,-s)
 do-profile-check: $(depsdir)/.stamp
        @ok=:; \
        rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
+       if [ -z '$(MAKE_Q)' ] && [ -n '$(PROFILE_RUNTIME)' ]; then $(PROFILE_RUNTIME) --version; fi; \
        $(MAKE) $(MAKE_Q) $(PROFILE_OUT) || ok=false; \
        if $$ok; then rm -f $(PROFILE_EXE) $(PROFILE_OUT); else \
-           if test -f $(MONOLITE_MCS); then \
-               $(MAKE) -s do-profile-check-monolite ; \
+           if test ! -s $(MONOLITE_MSCORLIB); then \
+                       $(MAKE) $(MAKE_Q) do-get-monolite ; \
+               fi; \
+           if test -f $(MONOLITE_MSCORLIB); then \
+               $(MAKE) $(MAKE_Q) do-profile-check-monolite ; \
            else \
-               echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
-                echo "*** You need Mono version 4.0 or better installed to build MCS" 1>&2 ; \
+               echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2; \
+                echo "*** You need Mono version 4.8 or better installed to build MCS" 1>&2 ; \
                 echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \
-               echo "*** The version of '$(BOOTSTRAP_MCS)' is: `$(BOOTSTRAP_MCS) --version`." 1>&2 ; \
                exit 1; fi; fi
 
 
 ifdef use_monolite
 
+do-get-monolite:
+
 do-profile-check-monolite:
        @echo "*** The contents of your 'monolite' directory may be out-of-date" 1>&2
        @echo "*** You may want to try 'make get-monolite-latest'" 1>&2
@@ -81,8 +91,12 @@ do-profile-check-monolite:
 
 else
 
+do-get-monolite:
+       @echo "*** Downloading bootstrap required 'monolite'" 1>&2
+       $(MAKE) $(MAKE_Q) -C $(topdir)/../ get-monolite-latest
+
 do-profile-check-monolite: $(depsdir)/.stamp
-       @echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2
+       @echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2
        @echo "*** Trying the 'monolite' directory." 1>&2
        @echo dummy > $(monolite_flag)
        $(MAKE) do-profile-check
@@ -90,9 +104,8 @@ do-profile-check-monolite: $(depsdir)/.stamp
 endif
 
 $(PROFILE_EXE): $(topdir)/build/common/basic-profile-check.cs
-       $(BOOTSTRAP_MCS) /warn:0 /out:$@ $<
-       echo -n "Bootstrap compiler: " 1>&2
-       $(BOOTSTRAP_MCS) --version 1>&2
+       $(MAKE) $(MAKE_Q) -C $(topdir)/packages
+       $(INTERNAL_CSC) /warn:0 /noconfig /r:System.dll /r:mscorlib.dll /out:$@ $<
 
 $(PROFILE_OUT): $(PROFILE_EXE)
        $(PROFILE_RUNTIME) $< > $@ 2>&1
index 1acf54c1e2e5027f0bc25758b5704ccb74983044..ae5e3d3bbad0963507e2be5b9b10e1af52edf06a 100644 (file)
@@ -3,9 +3,10 @@
 BOOTSTRAP_PROFILE = basic
 BUILD_TOOLS_PROFILE = basic
 
-INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/basic.exe
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
-MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+# Using CSC_SDK_PATH_DISABLED for sanity check that all references have path specified
+
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" CSC_SDK_PATH_DISABLED= $(INTERNAL_CSC)
+MCS = $(BOOTSTRAP_MCS)
 
 # nuttzing!
 
index 65919907c270b35fefe7bcbc6ba24b2212895b57..8938183f50f789e51388b3a7528a77c8ba6e3989 100644 (file)
@@ -2,8 +2,8 @@
 
 BOOTSTRAP_PROFILE = build
 
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
-MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" CSC_SDK_PATH_DISABLED= $(INTERNAL_CSC)
+MCS = $(BOOTSTRAP_MCS)
 
 # Use system resgen as we don't want local System.Windows.Forms dependency
 RESGEN = resgen2
index 9133dc24984f64533040416cf3c6e783aafc54ad..4b50a30eb951544120b7f94ed8ba46b9bcd4f834 100644 (file)
@@ -2,8 +2,8 @@
 
 BOOTSTRAP_PROFILE = build
 
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
-MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" CSC_SDK_PATH_DISABLED= $(INTERNAL_CSC)
+MCS = $(BOOTSTRAP_MCS)
 
 # Use system resgen as we don't want local System.Windows.Forms dependency
 RESGEN := $(dir $(shell which $(EXTERNAL_MCS)))resgen2
index 00d5bc12ee4106f9720266bffa7101b3edf44f76..a0931c7e66e74894aa9ccbf100ff38c95ce0c617 100644 (file)
@@ -2,8 +2,10 @@
 
 BOOTSTRAP_PROFILE = build
 
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
-MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+# Using CSC_SDK_PATH_DISABLED for sanity check that all references have path specified
+
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" CSC_SDK_PATH_DISABLED= $(INTERNAL_CSC)
+MCS = $(BOOTSTRAP_MCS)
 
 # nuttzing!
 
index ab1aa6fa0716e6afd0799f5764958fda7cde1e06..47b8534b5caaabf01f96bb100da265425a24a23a 100644 (file)
@@ -1,7 +1,7 @@
 BOOTSTRAP_PROFILE = build
 
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
-MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" CSC_SDK_PATH_DISABLED= $(INTERNAL_CSC)
+MCS = $(BOOTSTRAP_MCS)
 
 # Use system resgen as we don't want local System.Windows.Forms dependency
 RESGEN := $(dir $(shell which $(EXTERNAL_MCS)))resgen2
index 40b33a7aecc904e3502c3bbf25871c42b5f8fae1..b0d999d7389a7f09171fd82ddc36cf525b7ab95c 100644 (file)
@@ -29,7 +29,7 @@ ifndef BUILD_TOOLS_PROFILE
 BUILD_TOOLS_PROFILE = build
 endif
 
-USE_MCS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
+USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
 USE_MBAS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS)
 USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS)
 CSCOMPILE = $(Q_MCS) $(MCS) $(USE_MCS_FLAGS)
@@ -42,7 +42,6 @@ INSTALL_BIN = $(INSTALL) -c -m 755
 INSTALL_LIB = $(INSTALL_BIN)
 MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
 INTERNAL_MBAS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/mbas/mbas.exe
-INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/mcs.exe
 INTERNAL_ILASM = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/ilasm.exe
 INTERNAL_CSC = $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
 
index 10a0c81d51cc9b07508e4855571104ede11afaca..00fd75718247fa5aa9c4acb40dae1404573652e0 100644 (file)
@@ -43,12 +43,14 @@ aot_only_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 net_4_x_SUBDIRS = $(common_DEPS_SUBDIRS) $(drawing_DEPS_SUBDIRS)
 net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS)
 
-build_PARALLEL_SUBDIRS = System.Runtime System.Reflection System.Collections System.Resources.ResourceManager System.Globalization \
+basic_PARALLEL_SUBDIRS = System.Runtime System.Reflection System.Collections System.Resources.ResourceManager System.Globalization \
 System.Threading.Tasks System.Collections.Concurrent System.Text.Encoding System.IO System.Threading System.Diagnostics.Debug \
 System.Linq.Expressions System.Dynamic.Runtime System.Linq System.Threading.Tasks.Parallel System.Xml.ReaderWriter \
 System.Diagnostics.Tools System.Reflection.Primitives System.Runtime.Extensions System.Runtime.InteropServices System.Text.Encoding.Extensions \
 System.Runtime.Numerics System.Xml.XDocument System.Reflection.Extensions
 
+build_PARALLEL_SUBDIRS = $(basic_PARALLEL_SUBDIRS)
+
 monodroid_SUBDIRS = $(monotouch_SUBDIRS)
 monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
index 6c883f8579685ab24608dcdf287482855722c50b..991e1ea417d517faaaa0800a84533fe910bc4b43 100644 (file)
@@ -1,9 +1,21 @@
 thisdir = class
 
-basic_SUBDIRS := corlib Mono.Security System System.XML System.Core
-
 pcl_facade_dirs := Facades
 
+# The minimal set of csc dependencies
+basic_SUBDIRS := \
+       corlib \
+       Mono.Security \
+       System \
+       System.XML \
+       System.Core \
+       System.ComponentModel.Composition.4.5 \
+       System.Numerics \
+       System.Xml.Linq \
+       Mono.Cecil \
+       $(pcl_facade_dirs) \
+       ../tools/cil-stringreplacer
+
 # resgen is corlib specific so we need to wait until corlib is build
 # and build it just a step before first dll needs it
 resgen_dir = ../tools/resgen
@@ -15,12 +27,12 @@ build_SUBDIRS :=  \
        System.XML \
        Mono.Posix \
        System.Core \
-       Mono.Cecil \
-       Mono.Cecil.Mdb \
        System.ComponentModel.Composition.4.5 \
        System.Numerics \
        System.Xml.Linq \
-       $(pcl_facade_dirs)
+       Mono.Cecil \
+       $(pcl_facade_dirs) \
+       ../tools/cil-stringreplacer
 
 mobile_common_dirs := \
        corlib  \
@@ -319,7 +331,7 @@ xammac_SUBDIRS := $(xammac_dirs)
 xammac_net_4_5_SUBDIRS := $(xammac_4_5_dirs)
 binary_reference_assemblies_SUBDIRS := reference-assemblies
 net_4_x_SUBDIRS := $(net_4_x_dirs) $(xbuild_4_0_dirs)
-net_4_x_PARALLEL_SUBDIRS := $(net_4_x_parallel_dirs) aot-compiler
+net_4_x_PARALLEL_SUBDIRS := $(net_4_x_parallel_dirs)
 xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
 xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
 
@@ -350,7 +362,6 @@ DISTFILES = \
        MicrosoftAjaxLibrary/License.htm        \
        test-helpers/NetworkHelpers.cs  \
        test-helpers/SocketResponder.cs \
-       lib/$(monolite_dir)/basic.exe   \
        $(monolite_files)
 
 .PHONY: all-local $(STD_TARGETS:=-local)
@@ -383,13 +394,10 @@ $(monolite_files): | lib/$(monolite_dir)/Facades
 $(monolite_files): lib/$(monolite_dir)/%: lib/build/%
        cp -p $< $@
 
-lib/$(monolite_dir)/basic.exe:
-       cp -p lib/basic/basic.exe lib/$(monolite_dir)
-
 $(build_files:%=lib/build/%):
        cd $(topdir) && $(MAKE) profile-do--build--all NO_DIR_CHECK=1 SKIP_AOT=1
 
-dist-monolite: $(monolite_files) lib/$(monolite_dir)/basic.exe
+dist-monolite: $(monolite_files)
 
 dist-default: dist-monolite
 
index 9acd2e184d4f86e78a2d743390492616e53a54b8..3c6915a0b75284e8721a6f0a88290392aa80fa27 100644 (file)
@@ -28,8 +28,7 @@ test-local: compile-resources
 
 compile-resources: Test/resources/TestTasks-$(PROFILE).dll
        cp Test/resources/TestTasks-$(PROFILE).dll Test/resources/TestTasks.dll
-       cp Test/resources/TestTasks-$(PROFILE).dll.mdb Test/resources/TestTasks.dll.mdb
-#      cp Test/resources/TestTasks-$(PROFILE).pdb Test/resources/TestTasks.pdb
+       cp Test/resources/TestTasks-$(PROFILE).pdb Test/resources/TestTasks.pdb
 
 include $(XBUILD_DIR)/xbuild_test.make
 include ../../build/library.make
index 0e2c956919b0f7a45b97f1a9610358fae748882c..d6e3ff6a434d50efe5992af8122d2efd3018ddde 100644 (file)
@@ -219,7 +219,7 @@ namespace Microsoft.Build.Tasks {
 
                protected override string ToolName {
                        get {
-                               return MSBuildUtils.RunningOnWindows ? "mcs.bat" : "mcs.exe";
+                               return MSBuildUtils.RunningOnWindows ? "csc.bat" : "csc.exe";
                        }
                }
 
index f40e1aa83de6b7d0c9d25271c811c4b582727c93..05896473e395ffdeead91a2a52ee74b64e90f198 100644 (file)
@@ -608,6 +608,7 @@ public class DebuggerTests
        }
 
        [Test]
+       [Category ("NotWorking")] // https://bugzilla.xamarin.com/show_bug.cgi?id=44974
        public void SingleStepping () {
                Event e = run_until ("single_stepping");
 
@@ -4008,7 +4009,8 @@ public class DebuggerTests
                req.Disable ();
                var frames = e.Thread.GetFrames ();
                var locs = frames [0].Method.Locations;
-               var next_loc = locs.First (l => (l.LineNumber == frames [0].Location.LineNumber + 2));
+
+               var next_loc = locs.First (l => (l.LineNumber == frames [0].Location.LineNumber + 3));
 
                e.Thread.SetIP (next_loc);
 
@@ -4041,7 +4043,7 @@ public class DebuggerTests
                req.Disable ();
                var frames = e.Thread.GetFrames ();
                var locs = frames [0].Method.Locations;
-               var prev_loc = locs.First (l => (l.LineNumber == frames [0].Location.LineNumber - 3));
+               var prev_loc = locs.First (l => (l.LineNumber == frames [0].Location.LineNumber - 1));
                AssertValue (2, frames [0].GetValue (frames [0].Method.GetLocal ("i")));
 
                // Set back the ip to the first i ++; line
index c41240fab9e280d5ace8c1e9527f4a5ab080254b..af3c1d69773fcd86a68126cf4b34c0f0f3a35813 100644 (file)
@@ -169,7 +169,7 @@ namespace Mono.CSharp
                        mcs.StartInfo.UseShellExecute=false;
                        mcs.StartInfo.RedirectStandardOutput=true;
                        mcs.StartInfo.RedirectStandardError=true;
-                       mcs.ErrorDataReceived += new DataReceivedEventHandler (McsStderrDataReceived);
+                       mcs.OutputDataReceived += new DataReceivedEventHandler (McsStderrDataReceived);
 
                        // Use same text decoder as mcs and not user set values in Console
                        mcs.StartInfo.StandardOutputEncoding =
@@ -268,7 +268,7 @@ namespace Mono.CSharp
                                        options.Win32Resource);
 
                        if (options.IncludeDebugInformation)
-                               args.Append("/debug+ /optimize- ");
+                               args.Append("/debug:portable /optimize- ");
                        else
                                args.Append("/debug- /optimize+ ");
 
@@ -327,7 +327,9 @@ namespace Mono.CSharp
 
                        args.Append ("/noconfig ");
 
-                       args.Append (" -- ");
+                       args.Append ("/nologo ");
+
+                       // args.Append (" -- ");
                        foreach (string source in fileNames)
                                args.AppendFormat("\"{0}\" ",source);
                        return args.ToString();
index 9cdee64a0ccc8a2abcd6b22dab0b3b1dae68c5eb..87f5e3aab3ed390bea59585f89103b17ea725c81 100644 (file)
@@ -127,9 +127,12 @@ namespace System.Net.Sockets {
                {
                        //If this NRE, we're in deep problems because Register Must have
                        lock (blocking_threads) {
-                               blocking_threads.Remove (Thread.CurrentThread);
-                               if (THROW_ON_ABORT_RETRIES)
-                                       threads_stacktraces.Remove (Thread.CurrentThread);
+                               var current = Thread.CurrentThread;
+                               blocking_threads.Remove (current);
+                               if (THROW_ON_ABORT_RETRIES) {
+                                       if (blocking_threads.IndexOf (current) == -1)
+                                               threads_stacktraces.Remove (current);
+                               }
 
                                if (in_cleanup && blocking_threads.Count == 0)
                                        Monitor.Pulse (blocking_threads);
index 54433950e7fdc3d58b1ce1ec0aae44a7014ada8a..8ac5c54b8a0974c16f82dc588a8da8ab8152f3e0 100755 (executable)
@@ -46,9 +46,12 @@ namespace System {
                                //if (!File.Exists (Mono))
                                //      throw new FileNotFoundException ("Windows mono path not found: " + Mono);
 
-                               CSharpCompiler = Path.Combine (GacPath, "4.5\\mcs.exe");
-                               if (!File.Exists (CSharpCompiler))
-                                       CSharpCompiler = Path.Combine (Path.GetDirectoryName (GacPath), "lib\\build\\mcs.exe");
+                               CSharpCompiler = Path.Combine (GacPath, "4.5", "csc.exe");
+                               if (!File.Exists (CSharpCompiler)) {
+                                       // Starting from mono\mcs\class
+                                       CSharpCompiler = Path.Combine (Path.GetDirectoryName (GacPath), "..", "..", "external", "roslyn-binaries",
+                                               "Microsoft.Net.Compilers", "Microsoft.Net.Compilers.1.3.2", "tools", "csc.exe");
+                               }
 
                                //if (!File.Exists (CSharpCompiler))
                                //      throw new FileNotFoundException ("C# compiler not found at " + CSharpCompiler);
@@ -67,9 +70,9 @@ namespace System {
                                        Mono = "mono";
 
                                var mscorlibPath = new Uri (typeof (object).Assembly.CodeBase).LocalPath;
-                               CSharpCompiler = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "mcs"));
+                               CSharpCompiler = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "csc"));
                                if (!File.Exists (CSharpCompiler))
-                                       CSharpCompiler = "mcs";
+                                       CSharpCompiler = "csc";
 
                                VBCompiler = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "vbnc"));
                                if (!File.Exists (VBCompiler))
index 2e9ef60993db000f2d431ec64db0d2c088b73bb0..212ab339e466f14da197dd2e28e05a1daac95358 100644 (file)
@@ -639,7 +639,7 @@ namespace MonoTests.Microsoft.CSharp
                                        continue;
                                }
 
-                               throw new Exception (compilerError.ToString ());
+                               Assert.Fail (compilerError.ToString ());
                        }
                }
 
index e3dd58188c17358fe03c97bac68aaed04f105ef7..1e0e703aa162f7be0dace4ecc8d23723c9f3919c 100644 (file)
@@ -17,21 +17,30 @@ namespace MonoTests.System.Net.WebSockets
        public class ClientWebSocketTest
        {
                const string EchoServerUrl = "ws://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx";
-               int Port = NetworkHelpers.FindFreePort ();
+
+               ClientWebSocket socket;
+               MethodInfo headerSetMethod;
+               int Port;
+
+               [SetUp]
+               public void Setup ()
+               {
+                       socket = new ClientWebSocket ();
+                       Port = NetworkHelpers.FindFreePort ();
+               }
+
                HttpListener _listener;
                HttpListener listener {
                        get {
                                if (_listener != null)
                                        return _listener;
+
                                var tmp = new HttpListener ();
                                tmp.Prefixes.Add ("http://localhost:" + Port + "/");
                                tmp.Start ();
                                return _listener = tmp;
                        }
                }
-               ClientWebSocket _socket;
-               ClientWebSocket socket { get { return _socket ?? (_socket = new ClientWebSocket ()); } }
-               MethodInfo headerSetMethod;
 
                [TearDown]
                public void Teardown ()
@@ -40,11 +49,10 @@ namespace MonoTests.System.Net.WebSockets
                                _listener.Stop ();
                                _listener = null;
                        }
-                       if (_socket != null) {
-                               if (_socket.State == WebSocketState.Open)
-                                       _socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait (2000);
-                               _socket.Dispose ();
-                               _socket = null;
+                       if (socket != null) {
+                               if (socket.State == WebSocketState.Open)
+                                       socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait (2000);
+                               socket.Dispose ();
                        }
                }
 
diff --git a/mcs/class/System/basic_System.dll.sources b/mcs/class/System/basic_System.dll.sources
deleted file mode 100644 (file)
index 8601a93..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include System.dll.sources
-../corlib/System.Security.Permissions/HostProtectionAttribute.cs
index f01e0b18164ae532270648e0c0d9ca2a3144a347..17501424811aaf03f7f1c9c85ee6eef884338d7a 100644 (file)
@@ -9,11 +9,22 @@ thisdir = class/aot-compiler
 include ../../build/rules.make
 
 the_libdir = $(topdir)/class/lib/$(PROFILE)/
+CSC_DIR = $(dir $(CSC_LOCATION))
 
 # mcs.exe is only in the build profile, but the aot image should be compiled against the current
 # profile
-mcs_exe = $(topdir)/class/lib/build/mcs.exe
+mcs_exe = $(the_libdir)/mcs.exe
 mcs_aot_image = $(the_libdir)/mcs.exe$(PLATFORM_AOT_SUFFIX)
+csc_exe = $(CSC_LOCATION)
+csc_aot_image = $(csc_exe)$(PLATFORM_AOT_SUFFIX)
+csc_MCS_dll = $(CSC_DIR)/Microsoft.CodeAnalysis.CSharp.dll
+csc_MCS_image = $(csc_MCS_dll)$(PLATFORM_AOT_SUFFIX)
+csc_MC_dll = $(CSC_DIR)/Microsoft.CodeAnalysis.dll
+csc_MC_image = $(csc_MC_dll)$(PLATFORM_AOT_SUFFIX)
+csc_SRM_dll = $(CSC_DIR)/System.Reflection.Metadata.dll
+csc_SRM_image = $(csc_SRM_dll)$(PLATFORM_AOT_SUFFIX)
+csc_SCI_dll = $(CSC_DIR)/System.Collections.Immutable.dll
+csc_SCI_image = $(csc_SCI_dll)$(PLATFORM_AOT_SUFFIX)
 
 mscorlib_dll = $(the_libdir)/mscorlib.dll
 mscorlib_aot_image = $(mscorlib_dll)$(PLATFORM_AOT_SUFFIX)
@@ -31,17 +42,32 @@ ifdef PLATFORM_AOT_SUFFIX
 $(mcs_aot_image): $(mcs_exe) $(mscorlib_dll) $(runtime_dep)
        $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(mcs_aot_image) --debug $(mcs_exe) || cat $(PROFILE)_aot.log || (cat $(PROFILE)_aot.log; exit 1)
 
+$(csc_aot_image): $(csc_exe) $(mscorlib_dll) $(runtime_dep)
+       $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_aot_image) --debug $(csc_exe) || cat $(PROFILE)_aot.log || (cat $(PROFILE)_aot.log; exit 1)
+
 $(mscorlib_aot_image): $(mscorlib_dll) $(runtime_dep)
        $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(mscorlib_dll) || (cat $(PROFILE)_aot.log; exit 1)
 
+$(csc_MC_image): $(csc_MC_dll) $(runtime_dep)
+       $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_MC_image) --debug $(csc_MC_dll) || (cat $(PROFILE)_aot.log; exit 1)
+
+$(csc_MCS_image): $(csc_MCS_dll) $(runtime_dep)
+       $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_MCS_image) --debug $(csc_MCS_dll) || (cat $(PROFILE)_aot.log; exit 1)
+
+$(csc_SRM_image): $(csc_SRM_dll) $(runtime_dep)
+       $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_SRM_image) --debug $(csc_SRM_dll) || (cat $(PROFILE)_aot.log; exit 1)
+
+$(csc_SCI_image): $(csc_SCI_dll) $(runtime_dep)
+       $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(csc_SCI_image) --debug $(csc_SCI_dll) || (cat $(PROFILE)_aot.log; exit 1)
+
 ifdef ENABLE_AOT
 
 clean-local:
-       -rm -f $(mscorlib_aot_image) $(mcs_aot_image) $(PROFILE)_aot.log
+       -rm -f $(mscorlib_aot_image) $(mcs_aot_image) $(csc_aot_image) $(csc_SRM_image) $(csc_SCI_image) $(PROFILE)_aot.log
 
 # AOT build profile mcs to speed up build
 ifeq ($(PROFILE),build)
-all-local: $(mscorlib_aot_image) $(mcs_aot_image)
+all-local: $(mscorlib_aot_image) $(csc_aot_image) $(csc_SRM_image) $(csc_SCI_image) $(csc_MC_image) $(csc_MCS_image)
 install-local:
 endif
 
index 8f7127307dc96489b5ddb879240c3aec7f7258b6..ab29d69da51911154168d6ebb1cf713030d67485 100644 (file)
@@ -11,10 +11,10 @@ LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) $(RESOURCE_FILES:%=-resource:%)
 #LIBRARY_USE_INTERMEDIATE_FILE = yes
 
 ifeq (2, $(FRAMEWORK_VERSION_MAJOR))
-LIB_MCS_FLAGS += --runtime:v4
+LIB_MCS_FLAGS += -runtimemetadataversion:v4.0.30319
 else
 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
-LIB_MCS_FLAGS += --runtime:v4
+LIB_MCS_FLAGS += -runtimemetadataversion:v4.0.30319
 else
 $(error Unknown framework version)
 endif
index 61c5fdcb700684364ed537f9afe6f5a45f3d7871..4b39ca9bc2811006f8f11ed79735af39bf068bd6 100644 (file)
@@ -2,5 +2,5 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 
 [assembly:AssemblyVersion("1.0.0.0")]
-[assembly:AssemblyDelaySign(false)]
+[assembly:AssemblyDelaySign(true)]
 [assembly:AssemblyKeyFile("../../class/mono.snk")]
index 50f84cfd617c820f399f74f922a2aec939654b99..a74c9550b55e9d5f79da7c5bc845dfbb866edbec 100644 (file)
@@ -110,8 +110,7 @@ LIB_MCS_FLAGS = \
        /resource:Resources/mono-ecma.css,mono-ecma.css                   \
        /resource:Resources/mono-ecma.xsl,mono-ecma.xsl                   \
        /resource:Resources/toc-html.xsl,toc-html.xsl                     \
-       $(IMAGE_RESOURCE_COMMAND)                                                             \
-       /publicsign
+       $(IMAGE_RESOURCE_COMMAND)
 
 CLEAN_FILES += $(the_lib).config
 
index ea06316444a5dce90557013784e90886726a77b2..8bba78517de7ac5074c90e3d2444a9b79ca95f49 100644 (file)
@@ -1,5 +1,4 @@
 [assembly:System.Reflection.AssemblyVersionAttribute ("1.0.0.0")]
-[assembly:System.Reflection.AssemblyKeyFile("key.snk")]
 
 public class B
 {
index ccad9514aa97940d4b8029c7a668e6e923df110b..d32f2d4eeb05d7b0a3d84a74f883996aba960dca 100644 (file)
@@ -2,7 +2,6 @@ using System;
 using System.Reflection;
 using System.Runtime.CompilerServices;
 
-[assembly: AssemblyKeyFile ("key.snk")]
 [assembly: InternalsVisibleTo ("cs0281, PublicKey=0024000004800000940000000602000000240000525341310004000011000000e39d99616f48cf7d6d59f345e485e713e89b8b1265a31b1a393e9894ee3fbddaf382dcaf4083dc31ee7a40a2a25c69c6d019fba9f37ec17fd680e4f6fe3b5305f71ae9e494e3501d92508c2e98ca1e22991a217aa8ce259c9882ffdfff4fbc6fa5e6660a8ff951cd94ed011e5633651b64e8f4522519b6ec84921ee22e4840e8")]
 
 public class FriendClass
index 2c37329cd15342b852201f9c230bd5f42a01b3b6..de5b54e81e0e4c8fca57be7b244ee367e1443871 100644 (file)
@@ -68,7 +68,7 @@ check: run-test-local
 TEST_PATTERN = 'v4'
 TESTER_OPTIONS = -compiler-options:"-v --break-on-ice -d:NET_4_0;NET_4_5"
 
-COMPILER = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/mcs.exe
+COMPILER = $(topdir)/class/lib/$(PROFILE)/mcs.exe
 TESTER = MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(LOCAL_RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe
 
 run-mcs-tests: $(TEST_SUPPORT_FILES)
@@ -84,34 +84,34 @@ dist-local: dist-default
 csproj-local install-local uninstall-local:
 
 CS0029-26-lib.dll : CS0029-26-lib.cs
-       $(CSCOMPILE) /target:library /publicsign /out:$@ $<
+       $(CSCOMPILE) /target:library /publicsign /keyfile:key.snk /out:$@ $<
 
 CS0266-25-lib.dll: CS0266-25-lib.cs
        $(CSCOMPILE) /target:library /r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll /out:$@ $<
 
 dlls/first/CS1701-lib.dll: dlls/first/CS1701-lib.cs
-       $(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
+       $(CSCOMPILE) /target:library /warn:0 /publicsign /keyfile:key.snk /out:$@ $<
 
 dlls/first/CS1702-lib.dll: dlls/first/CS1702-lib.cs
-       $(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
+       $(CSCOMPILE) /target:library /warn:0 /publicsign /keyfile:key.snk /out:$@ $<
 
 dlls/first/CS1703-lib.dll: dlls/first/CS1703-lib.cs
-       $(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
+       $(CSCOMPILE) /target:library /warn:0 /publicsign /keyfile:key.snk /out:$@ $<
 
 dlls/first/CS1705-lib.dll: dlls/first/CS1705-lib.cs
-       $(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
+       $(CSCOMPILE) /target:library /warn:0 /publicsign /keyfile:key.snk /out:$@ $<
 
 dlls/second/CS1701-lib.dll: dlls/second/CS1701-lib.cs
-       $(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
+       $(CSCOMPILE) /target:library /warn:0 /publicsign /keyfile:key.snk /out:$@ $<
 
 dlls/second/CS1702-lib.dll: dlls/second/CS1702-lib.cs
-       $(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
+       $(CSCOMPILE) /target:library /warn:0 /publicsign /keyfile:key.snk /out:$@ $<
 
 dlls/second/CS1703-lib.dll: dlls/second/CS1703-lib.cs
-       $(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
+       $(CSCOMPILE) /target:library /warn:0 /publicsign /keyfile:key.snk /out:$@ $<
 
 dlls/second/CS1705-lib.dll: dlls/second/CS1705-lib.cs
-       $(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
+       $(CSCOMPILE) /target:library /warn:0 /publicsign /keyfile:key.snk /out:$@ $<
 
 CS1701-lib.dll : CS1701-lib.cs
        $(CSCOMPILE) /target:library /warn:0 /r:dlls/first/CS1701-lib.dll /out:$@ $<
@@ -122,6 +122,9 @@ CS1702-lib.dll : CS1702-lib.cs
 CS1705-lib.dll : CS1705-lib.cs
        $(CSCOMPILE) /target:library /warn:0 /r:dlls/first/CS1705-lib.dll /out:$@ $<
 
+CSFriendAssembly-lib.dll : CSFriendAssembly-lib.cs
+       $(CSCOMPILE) /target:library /publicsign /keyfile:key.snk /warn:0 /out:$@ $<
+
 %-lib.dll: %-lib.cs
        $(CSCOMPILE) /target:library /warn:0 /out:$@ $<
 
index ea06316444a5dce90557013784e90886726a77b2..8bba78517de7ac5074c90e3d2444a9b79ca95f49 100644 (file)
@@ -1,5 +1,4 @@
 [assembly:System.Reflection.AssemblyVersionAttribute ("1.0.0.0")]
-[assembly:System.Reflection.AssemblyKeyFile("key.snk")]
 
 public class B
 {
index ea06316444a5dce90557013784e90886726a77b2..8bba78517de7ac5074c90e3d2444a9b79ca95f49 100644 (file)
@@ -1,5 +1,4 @@
 [assembly:System.Reflection.AssemblyVersionAttribute ("1.0.0.0")]
-[assembly:System.Reflection.AssemblyKeyFile("key.snk")]
 
 public class B
 {
index 24862062a10960f0fb0f36aecaf0daf4164c3ae5..bb266630fc2bcbf0b688c971b84b41ce987ea502 100644 (file)
@@ -1,5 +1,4 @@
 [assembly:System.Reflection.AssemblyVersionAttribute ("1.1.1.0")]
-[assembly:System.Reflection.AssemblyKeyFile("key.snk")]
 
 public class A
 {
index 7207e973d3fbf4ad2b099634d89b319205044fb7..967dc7f12e4c5104b53c7ba7e63b720dc3d29164 100644 (file)
@@ -1,5 +1,4 @@
 [assembly:System.Reflection.AssemblyVersionAttribute ("2.0.0.0")]
-[assembly:System.Reflection.AssemblyKeyFile("key.snk")]
 
 public class B
 {
index d877923feb3e1e5f97dcfae0c2122f6f90d8e9a2..9fe1b1f00628793be7351af44530f0f9022f1978 100644 (file)
@@ -1,5 +1,4 @@
 [assembly:System.Reflection.AssemblyVersionAttribute ("2.0.1.0")]
-[assembly:System.Reflection.AssemblyKeyFile("key.snk")]
 
 public class B
 {
index 56196aee3a9fa0ddb56dd35cf961c56b6030978e..5e3513f120716a595b00759654e0d62d4dd35573 100644 (file)
@@ -1,5 +1,4 @@
 [assembly:System.Reflection.AssemblyVersionAttribute ("1.0.1.0")]
-[assembly:System.Reflection.AssemblyKeyFile("key.snk")]
 
 public class B
 {
index 474172b3865fdb18f17e5c78735b5b342a7a5c6d..62675d98e9f9cf449d97727393cdc455f3eb2239 100644 (file)
@@ -1,5 +1,4 @@
 [assembly:System.Reflection.AssemblyVersionAttribute ("1.2.1.0")]
-[assembly:System.Reflection.AssemblyKeyFile("key.snk")]
 
 public class A
 {
index ea06316444a5dce90557013784e90886726a77b2..8bba78517de7ac5074c90e3d2444a9b79ca95f49 100644 (file)
@@ -1,5 +1,4 @@
 [assembly:System.Reflection.AssemblyVersionAttribute ("1.0.0.0")]
-[assembly:System.Reflection.AssemblyKeyFile("key.snk")]
 
 public class B
 {
index 9c4b6a172a0175c6521e885fff4f1dc42dca5d1f..dbd71a3d58173b25b18e3293f8d3a654ff0e60a0 100644 (file)
@@ -6,26 +6,15 @@ thisdir := mcs
 SUBDIRS := 
 include ../build/rules.make
 
+PROGRAM = mcs.exe
+
 EXTRA_DISTFILES = \
        mcs.csproj              \
        mcs.sln         \
        cs-parser.jay           \
        mcs.exe.sources
 
-ifeq (basic, $(PROFILE))
-LOCAL_MCS_FLAGS += -r:System.dll -r:System.Core.dll -r:System.Xml.dll -debug
-
-PROGRAM = basic.exe
-sourcefile = mcs.exe.sources
-else
-LIB_REFS = System System.Core System.Xml
-
-PROGRAM_USE_INTERMEDIATE_FILE = true
-PROGRAM = mcs.exe
-the_libdir = $(topdir)/class/lib/build/
-LOCAL_MCS_FLAGS += -debug
-endif
-
+LIB_REFS = System.Core System.Xml System
 LOCAL_MCS_FLAGS += -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE
 
 ifndef NO_THREAD_ABORT
@@ -38,10 +27,6 @@ endif
 
 LOCAL_MCS_FLAGS += $(REFERENCE_SOURCES_FLAGS)
 
-PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/4.5
-
-PROGRAM_COMPILE = $(BOOT_COMPILE)
-
 BUILT_SOURCES = cs-parser.cs
 
 CLEAN_FILES += y.output
index 7a291b287a7c04caaf70e006548829969cec067b..ae488f6c4f3b0d230b58379bec3976db2b53a6ac 100644 (file)
@@ -5,7 +5,7 @@ include ../../../build/rules.make
 LIBRARY = nunit.util.dll
 LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
 
-LOCAL_MCS_FLAGS= /resource:Transform.resources,NUnit.Util.Transform.resources /d:MONO /d:StronglyNamedAssembly /publicsign -warn:1
+LOCAL_MCS_FLAGS= /resource:Transform.resources,NUnit.Util.Transform.resources /d:MONO /d:StronglyNamedAssembly /publicsign -warn:1 /keyfile:../../nunit.snk
 LIB_REFS = nunit.core nunit.core.interfaces System System.Xml System.Runtime.Remoting
 NO_TEST = yo
 
index b72165aba26d29183205711c97bd0578739e191b..7dc5339e98773c8547b0385ab2b3fca409396a3f 100644 (file)
@@ -5,7 +5,7 @@ include ../../../build/rules.make
 LIBRARY = nunit-console-runner.dll
 LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
 
-LOCAL_MCS_FLAGS= /d:MONO /d:StronglyNamedAssembly /publicsign
+LOCAL_MCS_FLAGS= /d:MONO /d:StronglyNamedAssembly /publicsign /keyfile:../../nunit.snk
 LIB_REFS = nunit.core nunit.core.interfaces nunit.util System System.Xml
 NO_TEST = yo
 
index 9c7c76c56f3d8034c14226181419c4e983f03a74..13001289031b7a3746a39ce99a65c0f06f13c2a9 100644 (file)
@@ -5,7 +5,7 @@ include ../../../build/rules.make
 LIBRARY = nunit.core.dll
 LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
 
-LOCAL_MCS_FLAGS = /d:StronglyNamedAssembly -warn:1 /publicsign
+LOCAL_MCS_FLAGS = /d:StronglyNamedAssembly -warn:1 /publicsign /keyfile:../../nunit.snk
 LIB_REFS = nunit.framework nunit.core.interfaces System
 NO_TEST = yo
 
index 592ce5bc160609434cccbf45e3a41e9473fbefe8..858f051d3cd1be641be9b0862b8398b61a78b0e9 100644 (file)
@@ -5,7 +5,7 @@ include ../../../build/rules.make
 LIBRARY = nunit.core.interfaces.dll
 LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
 
-LOCAL_MCS_FLAGS= /d:StronglyNamedAssembly /publicsign
+LOCAL_MCS_FLAGS= /d:StronglyNamedAssembly /publicsign /keyfile:../../nunit.snk
 LIB_REFS = nunit.framework System
 NO_TEST = yo
 
index 9e3ba945a67a7904b0ea369ab0a7509b581c9471..11b5e6ba331c2815918a733369357a6696a94047 100644 (file)
@@ -5,7 +5,7 @@ include ../../../build/rules.make
 LIBRARY = nunit.core.extensions.dll
 LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
 
-LIB_MCS_FLAGS =  /d:StronglyNamedAssembly /publicsign
+LIB_MCS_FLAGS =  /d:StronglyNamedAssembly /publicsign /keyfile:../../nunit.snk
 LIB_REFS = nunit.core nunit.core.interfaces System.Xml System
 NO_TEST = yo
 
index 7cd03514e37831f9193f83dbffccd4de19cf5434..16d57681ccde7046f19a817a5c26011bf3d7ed1c 100644 (file)
@@ -5,7 +5,7 @@ include ../../../build/rules.make
 LIBRARY = nunit.framework.extensions.dll
 LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
 
-LIB_MCS_FLAGS = /d:StronglyNamedAssembly /publicsign
+LIB_MCS_FLAGS = /d:StronglyNamedAssembly /publicsign /keyfile:../../nunit.snk
 LIB_REFS = System.Xml System
 NO_TEST = yo
 
index a8c8440f46581782164f887171fa3958dae94df5..e302eb23657550625c6786fc1f91b371c171701b 100644 (file)
@@ -6,7 +6,7 @@ LIBRARY = NUnit.Framework.dll
 LIBRARY_NAME = nunit.framework.dll
 LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
 
-LIB_MCS_FLAGS = /d:StronglyNamedAssembly -warn:1 /publicsign
+LIB_MCS_FLAGS = /d:StronglyNamedAssembly -warn:1 /publicsign /keyfile:../../nunit.snk
 LIB_REFS = System.Xml System
 NO_TEST = yo
 
index 0c6ab3ca272cd9f41a757fe80c2b2a22149c51da..d411647b4e555c07d84874542a9899a3606b232f 100644 (file)
@@ -5,7 +5,7 @@ include ../../../build/rules.make
 LIBRARY = nunit.mocks.dll
 LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
 
-LOCAL_MCS_FLAGS= /d:StronglyNamedAssembly /publicsign
+LOCAL_MCS_FLAGS= /d:StronglyNamedAssembly /publicsign /keyfile:../../nunit.snk
 LIB_REFS = nunit.framework System
 NO_TEST = yo
 
diff --git a/mcs/packages/.gitignore b/mcs/packages/.gitignore
new file mode 100644 (file)
index 0000000..5264e07
--- /dev/null
@@ -0,0 +1 @@
+Microsoft.Net.Compilers*
\ No newline at end of file
diff --git a/mcs/packages/Makefile b/mcs/packages/Makefile
new file mode 100644 (file)
index 0000000..5b3cc08
--- /dev/null
@@ -0,0 +1,25 @@
+thisdir = packages
+include ../build/rules.make
+
+ROSLYN_CSC_DIR = $(dir $(CSC_LOCATION))
+
+ifeq ($(PROFILE), $(DEFAULT_PROFILE))
+
+TARGET_DIR = $(DESTDIR)$(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+
+install-local:
+       $(INSTALL_LIB) $(ROSLYN_CSC_DIR)/csc.exe $(TARGET_DIR)
+       $(INSTALL_LIB) $(ROSLYN_CSC_DIR)/csc.rsp $(TARGET_DIR)
+       $(INSTALL_LIB) $(ROSLYN_CSC_DIR)/csc.exe.config $(TARGET_DIR)
+       $(INSTALL_LIB) $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.CSharp.dll $(TARGET_DIR)
+       $(INSTALL_LIB) $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.dll $(TARGET_DIR)
+       $(INSTALL_LIB) $(ROSLYN_CSC_DIR)/System.Collections.Immutable.dll $(TARGET_DIR)
+       $(INSTALL_LIB) $(ROSLYN_CSC_DIR)/System.Reflection.Metadata.dll $(TARGET_DIR)
+
+       $(INSTALL_LIB) $(ROSLYN_CSC_DIR)/csc.exe$(PLATFORM_AOT_SUFFIX) $(TARGET_DIR)
+       $(INSTALL_LIB) $(ROSLYN_CSC_DIR)/System.Reflection.Metadata.dll$(PLATFORM_AOT_SUFFIX) $(TARGET_DIR)
+endif
+
+
+dist-local: dist-default
+
index a149e2eb536cb3f61714de3073ead029a3aa9405..1fabf7cf8cc8198aa2200e5b993e284bed2d32c5 100644 (file)
@@ -54,7 +54,7 @@ DEFINES = -compiler-options:"-d:NET_4_0;NET_4_5 -debug"
 endif
 
 LOCAL_RUNTIME_FLAGS = --verify-all
-COMPILER = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/mcs.exe
+COMPILER = $(topdir)/class/lib/$(PROFILE)/mcs.exe
 TESTER = MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(LOCAL_RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe
 
 TEST_ILS := $(wildcard *-lib.il)
@@ -95,11 +95,13 @@ csproj-local:
 %-lib.dll: %-lib.il
        $(ILASM) /dll /out:$@ $<
 
+CSCOMPILE_UTIL = $(CSCOMPILE) -noconfig -nologo -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
+
 setup:
-       $(CSCOMPILE) -t:library dlls/test-679-2/test-679-lib-2.cs
-       $(CSCOMPILE) -t:library dlls/test-679-1/test-679-lib.cs -r:dlls/test-679-2/test-679-lib-2.dll
-       $(CSCOMPILE) -t:library dlls/test-939-common.cs -keyfile:key.snk -publicsign
-       $(CSCOMPILE) -t:library dlls/test-939-1/test-939-lib.cs -keyfile:key.snk -publicsign
-       $(CSCOMPILE) -t:library dlls/test-939-1/test-939-ref.cs -r:dlls/test-939-1/test-939-lib.dll -keyfile:key.snk -publicsign
-       $(CSCOMPILE) -t:library dlls/test-939-2/test-939-lib.cs -r:dlls/test-939-common.dll -keyfile:key.snk -publicsign
+       $(CSCOMPILE_UTIL) -t:library dlls/test-679-2/test-679-lib-2.cs -out:dlls/test-679-2/test-679-lib-2.dll
+       $(CSCOMPILE_UTIL) -t:library dlls/test-679-1/test-679-lib.cs -r:dlls/test-679-2/test-679-lib-2.dll -out:dlls/test-679-1/test-679-lib.dll
+       $(CSCOMPILE_UTIL) -t:library dlls/test-939-common.cs -keyfile:key.snk -publicsign -out:dlls/test-939-common.dll
+       $(CSCOMPILE_UTIL) -t:library dlls/test-939-1/test-939-lib.cs -keyfile:key.snk -publicsign -out:dlls/test-939-1/test-939-lib.dll
+       $(CSCOMPILE_UTIL) -t:library dlls/test-939-1/test-939-ref.cs -r:dlls/test-939-1/test-939-lib.dll -keyfile:key.snk -publicsign -out:dlls/test-939-1/test-939-ref.dll
+       $(CSCOMPILE_UTIL) -t:library dlls/test-939-2/test-939-lib.cs -r:dlls/test-939-common.dll -keyfile:key.snk -publicsign -out:dlls/test-939-2/test-939-lib.dll
        $(ILASM) -dll dlls/test-883.il
index a7803c0ea133898e278daf84efc83216b61dd253..20dc653526af2f7b7ee9e48a77a608b9d09d7f27 100644 (file)
@@ -100,14 +100,29 @@ public class Program
 
        static void RewriteAssembly (string assemblyLocation, Dictionary<string, string> resourcesStrings, CmdOptions options)
        {
-               var readerParameters = new ReaderParameters { ReadSymbols = true, ReadWrite = true };
+               Stream pdbSymbols = null;
+
+               var debugSymbols = Path.ChangeExtension (assemblyLocation, "pdb");
+               if (File.Exists (debugSymbols))
+                       pdbSymbols = File.Open (debugSymbols, FileMode.Open, FileAccess.ReadWrite);
+
+               var readerParameters = new ReaderParameters {
+                       ReadWrite = true,
+               };
+
+               if (pdbSymbols != null) {
+                       readerParameters.ReadSymbols = true;
+                       readerParameters.SymbolReaderProvider = new PortablePdbReaderProvider ();
+                       readerParameters.SymbolStream = pdbSymbols;
+               }
+
                using (var assembly = AssemblyDefinition.ReadAssembly (assemblyLocation, readerParameters)) {
                        foreach (var module in assembly.Modules) {
                                foreach (var type in module.GetTypes ()) {
                                        foreach (var method in type.Methods) {
                                                if (!method.HasBody)
                                                        continue;
-                                               
+
                                                foreach (var instr in method.Body.Instructions) {
                                                        if (instr.OpCode != OpCodes.Ldstr)
                                                                continue;
@@ -125,9 +140,19 @@ public class Program
                                }
                        }
 
-                       var writerParameters = new WriterParameters { WriteSymbols = true };
+                       var writerParameters = new WriterParameters ();
+
+                       if (pdbSymbols != null) {
+                               writerParameters.WriteSymbols = true;
+                               writerParameters.SymbolStream = pdbSymbols;
+                               writerParameters.SymbolWriterProvider = new PortablePdbWriterProvider ();
+                               pdbSymbols.Seek (0, SeekOrigin.Begin);
+                       }
+
                        assembly.Write (writerParameters);
                }
+
+               pdbSymbols?.Dispose ();
        }
 
        static bool LoadGetResourceStrings (Dictionary<string, string> resourcesStrings, CmdOptions options)
index 330a3895e2d6f820093a061b0a24f8bf32323fb5..6ace9bba70accf76f15dc936fd77abf4d5885285 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -15,6 +18,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index 3620aa8d0aa62ee29fff4c171fa457b5bdd67289..8d2d0a252529d21e820382e550e8eb0066783958 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -15,6 +18,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -25,6 +31,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index 02836fe971389cfac70a04298c3a339d704f6d1b..01c1203dbc7f00320047d5c6556543802cfae98e 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -15,6 +18,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index 734bd3da1a49741887d2e6155e3fe8926033e35b..e934f2391b933fc9ee7d5f71ae3c715c74f40a56 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -15,6 +18,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -25,6 +31,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -35,6 +44,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index b8345d02166fae8199680b18a2cd85dcf9b4f4c4..bb608441b24ad1fad5a650ac376a55a10e38a325 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -15,6 +18,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -25,6 +31,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
@@ -35,6 +44,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index d46426cc737204913b82433238d00dc662bf3d45..0d96961ff0f25efdfb1a5eed37846bf54e86dda3 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index 5b49f3c71d2f3fff575e4d824eb0cb8182dce67d..64281836158d746012ab3f50097d5e8bb442e312 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index 8f7e6658f1f83a23da369e09429d6f4c24181c15..c773879f2d220ca684ab341c502ac48341fbfc54 100644 (file)
       <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;T&gt; ToEnumerable&lt;T&gt; (this T self);" />
       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;!!T&gt; ToEnumerable&lt;T&gt;(!!T self) cil managed" />
       <MemberType>Method</MemberType>
+      <Attributes>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.IteratorStateMachine(typeof(Mono.DocTest.Generic.Extensions/&lt;ToEnumerable&gt;d__0`1))</AttributeName>
+        </Attribute>
+      </Attributes>
       <ReturnValue>
         <ReturnType>System.Collections.Generic.IEnumerable&lt;T&gt;</ReturnType>
       </ReturnValue>
index 41b89f34f99d2f42575e48471c647fd22f8ffc81..8dc4b7a4efbc5edf032608d42d70af4f757f34c6 100644 (file)
@@ -5,7 +5,13 @@
     <AssemblyName>DocTest</AssemblyName>
   </AssemblyInfo>
   <TypeParameters>
-    <TypeParameter Name="T" />
+    <TypeParameter Name="T">
+      <Attributes>
+        <Attribute>
+          <AttributeName>Mono.DocTest.Doc("Type Parameter!")</AttributeName>
+        </Attribute>
+      </Attributes>
+    </TypeParameter>
     <TypeParameter Name="U" />
     <TypeParameter Name="V" />
   </TypeParameters>
index 3bf5e2463bbbb4d63119192232235aed33ed1daa..dff3909ac39c21ce39a65be1b04cfa74f82b2ec8 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index 13ad1ddd850a3748071b16bdea2f889fe5845be6..089b973a19afcbfeaf747414b91c3e434f12a691 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index a6e2b67d05681087c47dd0fd7ef794716ca51993..f2381d666015761e8a030c337bdf6d18060a41b9 100644 (file)
@@ -89,8 +89,8 @@
         <param name="list">To be added.</param>
         <summary>
           <see cref="T:System.Collections.Generic.IEnumerable{System.Int32}" /> 
-               extension method.
-             </summary>
+              extension method.
+            </summary>
         <returns>To be added.</returns>
         <remarks>
           <c>M:Mono.DocTest.Generic.Extensions.ToDouble</c>
         <param name="val">To be added.</param>
         <summary>
           <see cref="T:Mono.DocTest.Generic.IFoo`1" /> extension method.
-             </summary>
+            </summary>
         <returns>To be added.</returns>
         <remarks>
           <c>M:Mono.DocTest.Generic.Extensions.ToDouble</c>
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
       </AssemblyInfo>
+      <Attributes>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.IteratorStateMachine(typeof(Mono.DocTest.Generic.Extensions/&lt;ToEnumerable&gt;d__0`1))</AttributeName>
+        </Attribute>
+      </Attributes>
       <ReturnValue>
         <ReturnType>System.Collections.Generic.IEnumerable&lt;T&gt;</ReturnType>
       </ReturnValue>
index bd6290207430910e2cdd3e2111a709f49798b7e4..84396c3da6f281ba1d402daddfd4422f41fb5e34 100644 (file)
@@ -6,7 +6,13 @@
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
   </AssemblyInfo>
   <TypeParameters>
-    <TypeParameter Name="T" />
+    <TypeParameter Name="T">
+      <Attributes>
+        <Attribute>
+          <AttributeName>Mono.DocTest.Doc("Type Parameter!")</AttributeName>
+        </Attribute>
+      </Attributes>
+    </TypeParameter>
     <TypeParameter Name="U" />
     <TypeParameter Name="V" />
   </TypeParameters>
index 690987bc0a83fb35bc8f8fe528f1ea170ab0ba09..32e810431313b5c9917299f0e1f4265b25e7f9df 100644 (file)
@@ -12,8 +12,8 @@
     <summary>Possible colors</summary>
     <remarks>
       <see cref="T:Mono.DocTest.Color" />.
-               Namespace Test: [<see cref="N:Mono.DocTest" />]
-             </remarks>
+              Namespace Test: [<see cref="N:Mono.DocTest" />]
+            </remarks>
   </Docs>
   <Members>
     <Member MemberName="AnotherGreen">
index 01a74c3c6c0709b1856eb39796bc371a82fdcd87..71d0ed8a7e8773dfa04d3c0a6b211e7626b8cb83 100644 (file)
@@ -18,8 +18,8 @@
     <summary>To be added.</summary>
     <remarks>
       <para>
-               cref=<c>T:Mono.DocTest.DocAttribute</c>.
-              </para>
+              cref=<c>T:Mono.DocTest.DocAttribute</c>.
+             </para>
       <format type="text/html">
         <table width="100%">
           <tr>
index b465e35003ec30678f9918e3374b741ce7329e0f..b663e801aa15fb90bd7faa18f5f074fc9da1a057 100644 (file)
         <param name="b">To be added.</param>
         <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <c>M:Mono.DocTest.Widget.Dynamic0(System.Object,System.Object)</c>
+        </remarks>
         <exception cref="T:System.ArgumentException">To be added; from:
           <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
       </Docs>
         <param name="value">To be added.</param>
         <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <c>M:Mono.DocTest.Widget.Dynamic1(System.Collections.Generic.Dictionary{System.Object,System.Object})</c>
+        </remarks>
       </Docs>
     </Member>
     <Member MemberName="Dynamic2">
         <param name="value">To be added.</param>
         <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <c>M:Mono.DocTest.Widget.Dynamic2(System.Func{System.String,System.Object})</c>
+        </remarks>
       </Docs>
     </Member>
     <Member MemberName="Dynamic3">
         <param name="value">To be added.</param>
         <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <c>M:Mono.DocTest.Widget.Dynamic3(System.Func{System.Func{System.String,System.Object},System.Func{System.Object,System.String}})</c>
+        </remarks>
       </Docs>
     </Member>
     <Member MemberName="DynamicE1">
index b1dd1908c0a0ca860991bc4121fa3f6029536cbc..6c991f5db8e4abb14dcb6ffb144dbb8c26a116bf 100644 (file)
@@ -31,8 +31,8 @@
       </Parameters>
       <Docs>
         <param name="folder">
-               A <see cref="T:System.Environment+SpecialFolder" /> instance.
-             </param>
+              A <see cref="T:System.Environment+SpecialFolder" /> instance.
+            </param>
         <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>
index 1ce623fffb22bbed40b1e608c0aade3b0d6bd1fb..054ff209c8dd97511523bfd57a8b11225afa9c0a 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
           <param name="list">To be added.</param>
           <summary>
             <see cref="T:System.Collections.Generic.IEnumerable{System.Int32}" /> 
-               extension method.
-             </summary>
+              extension method.
+            </summary>
         </Docs>
         <Link Type="Mono.DocTest.Generic.Extensions" Member="M:Mono.DocTest.Generic.Extensions.ToDouble(System.Collections.Generic.IEnumerable{System.Int32})" />
       </Member>
           <param name="val">To be added.</param>
           <summary>
             <see cref="T:Mono.DocTest.Generic.IFoo`1" /> extension method.
-             </summary>
+            </summary>
         </Docs>
         <Link Type="Mono.DocTest.Generic.Extensions" Member="M:Mono.DocTest.Generic.Extensions.ToDouble``1(``0)" />
       </Member>
index 90164c97b0f876298ac6627e44b2301e6a11164e..3a838fb2cdcd4369d131d45b21385778ffba0a9b 100644 (file)
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
         <AssemblyVersion>2.0.0.0</AssemblyVersion>
       </AssemblyInfo>
+      <Attributes>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.IteratorStateMachine(typeof(Mono.DocTest.Generic.Extensions/&lt;ToEnumerable&gt;d__0`1))</AttributeName>
+        </Attribute>
+      </Attributes>
       <ReturnValue>
         <ReturnType>System.Collections.Generic.IEnumerable&lt;T&gt;</ReturnType>
       </ReturnValue>
index dcb2a37522316571ec34b2f94298744972f7a49a..a8c683f778bf7daa857a03517e79f473f3f3e03d 100644 (file)
@@ -7,7 +7,13 @@
     <AssemblyVersion>2.0.0.0</AssemblyVersion>
   </AssemblyInfo>
   <TypeParameters>
-    <TypeParameter Name="T" />
+    <TypeParameter Name="T">
+      <Attributes>
+        <Attribute>
+          <AttributeName>Mono.DocTest.Doc("Type Parameter!")</AttributeName>
+        </Attribute>
+      </Attributes>
+    </TypeParameter>
     <TypeParameter Name="U" />
     <TypeParameter Name="V" />
   </TypeParameters>
index 45914b3273ce4594a915a8309a110d9125e7db1f..31a91e00d700ab46e9829b08f5ab29f5eb50f456 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index 7766049ec2829669ac1aeca7c6954dbbe67a05a1..397b3d42720d24aee30158dc9d1aca927c5f00d4 100644 (file)
       <AssemblyInfo>
         <AssemblyVersion>0.0.0.0</AssemblyVersion>
       </AssemblyInfo>
+      <Attributes>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.IteratorStateMachine(typeof(Mono.DocTest.Generic.Extensions/&lt;ToEnumerable&gt;d__0`1))</AttributeName>
+        </Attribute>
+      </Attributes>
       <ReturnValue>
         <ReturnType>System.Collections.Generic.IEnumerable&lt;T&gt;</ReturnType>
       </ReturnValue>
index 2f389db3b8712fd5e14a2e746bc1d0966bdb8025..c86584a7a44d83d503810b38b1ce205dad802c50 100644 (file)
@@ -6,7 +6,13 @@
     <AssemblyVersion>0.0.0.0</AssemblyVersion>
   </AssemblyInfo>
   <TypeParameters>
-    <TypeParameter Name="T" />
+    <TypeParameter Name="T">
+      <Attributes>
+        <Attribute>
+          <AttributeName>Mono.DocTest.Doc("Type Parameter!")</AttributeName>
+        </Attribute>
+      </Attributes>
+    </TypeParameter>
     <TypeParameter Name="U" />
     <TypeParameter Name="V" />
   </TypeParameters>
index 3bf5e2463bbbb4d63119192232235aed33ed1daa..dff3909ac39c21ce39a65be1b04cfa74f82b2ec8 100644 (file)
@@ -5,6 +5,9 @@
         <Attribute>
           <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
         </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.CompilationRelaxations(8)</AttributeName>
+        </Attribute>
         <Attribute>
           <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
         </Attribute>
index 11b496fe6305ac4c815154ef93d4300665e73255..4c1aa60ff7fbabc0a4da252b626367df48a883e2 100644 (file)
                   <b>
                     <a href="#M:Mono.DocTest.Generic.Extensions.ToDouble(System.Collections.Generic.IEnumerable{System.Int32})">ToDouble</a>
                   </b>(<i>this</i> <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;int&gt;</a>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;double&gt;</a></nobr><blockquote><a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;int&gt;</a> 
-               extension method.
-             </blockquote></td>
+              extension method.
+            </blockquote></td>
               </tr>
               <tr valign="top">
                 <td>
                   <b>
                     <a href="#M:Mono.DocTest.Generic.Extensions.ToDouble``1(``0)">ToDouble&lt;T&gt;</a>
                   </b>(<i>this</i> <i title="To be added.">T</i>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Double">double</a></nobr><blockquote><a href="../Mono.DocTest.Generic/IFoo`1.html">Mono.DocTest.Generic.IFoo`1</a> extension method.
-             </blockquote></td>
+            </blockquote></td>
               </tr>
               <tr valign="top">
                 <td>
         <blockquote id="M:Mono.DocTest.Generic.Extensions.ToDouble(System.Collections.Generic.IEnumerable{System.Int32}):member">
           <div class="msummary">
             <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;int&gt;</a> 
-               extension method.
-             </div>
+              extension method.
+            </div>
           <h2>Syntax</h2>
           <div class="Signature">public static <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;double&gt;</a> <b>ToDouble</b> (<i>this</i> <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;int&gt;</a> list)</div>
           <h4 class="Subsection">Parameters</h4>
         <blockquote id="M:Mono.DocTest.Generic.Extensions.ToDouble``1(``0):member">
           <div class="msummary">
             <a href="../Mono.DocTest.Generic/IFoo`1.html">Mono.DocTest.Generic.IFoo`1</a> extension method.
-             </div>
+            </div>
           <h2>Syntax</h2>
           <div class="Signature">public static <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Double">double</a> <b>ToDouble&lt;T&gt;</b> (<i>this</i> <i title="To be added.">T</i> val)<br /> where T : <a href="../Mono.DocTest.Generic/IFoo`1.html">Mono.DocTest.Generic.IFoo&lt;T&gt;</a></div>
           <h4 class="Subsection">Type Parameters</h4>
           <div class="msummary">
             <tt>System.Object</tt> extension method</div>
           <h2>Syntax</h2>
-          <div class="Signature">public static <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;T&gt;</a> <b>ToEnumerable&lt;T&gt;</b> (<i>this</i> <i title="To be added.">T</i> self)</div>
+          <div class="Signature">[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Mono.DocTest.Generic.Extensions/&lt;ToEnumerable&gt;d__0`1))]<br />public static <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;T&gt;</a> <b>ToEnumerable&lt;T&gt;</b> (<i>this</i> <i title="To be added.">T</i> self)</div>
           <h4 class="Subsection">Type Parameters</h4>
           <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.Extensions.ToEnumerable``1(``0):Type Parameters">
             <dl>
index a6515dded5b27c0e5c36c0cbd6a49b25ada0191e..8ecbbc337080224a56e298e0ff6e8bcd8007e35f 100644 (file)
                   <b>
                     <a href="../Mono.DocTest.Generic/Extensions.html#M:Mono.DocTest.Generic.Extensions.ToDouble``1(``0)">ToDouble&lt;T&gt;</a>
                   </b>(<i>this</i> <a href="javascript:alert(&quot;Documentation not found.&quot;)">T</a>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Double">double</a></nobr><blockquote><a href="../Mono.DocTest.Generic/IFoo`1.html">Mono.DocTest.Generic.IFoo`1</a> extension method.
-             </blockquote></td>
+            </blockquote></td>
               </tr>
               <tr valign="top">
                 <td>
index 730b8239d42dda16c2b32b74845884dd0aaa0374..0c63c3143d98367fe9bd8a349de8628abe8f3239 100644 (file)
     </p>
     <div>
       <h2>Syntax</h2>
-      <div class="Signature" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Signature">public class  <b>MyList&lt;T, U, V&gt;</b></div>
+      <div class="Signature" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Signature">public class  <b>MyList&lt;[Mono.DocTest.Doc("Type Parameter!")] T, U, V&gt;</b></div>
     </div>
     <div class="Remarks" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Docs">
       <h4 class="Subsection">Type Parameters</h4>
index 8ec7050a3505ee0c3dc4374b7c513a98d6a9c291..a7b880582b27961fe96a26859b21ca3dd531e139 100644 (file)
                   <b>
                     <a href="../Mono.DocTest.Generic/Extensions.html#M:Mono.DocTest.Generic.Extensions.ToDouble(System.Collections.Generic.IEnumerable{System.Int32})">ToDouble</a>
                   </b>(<i>this</i> <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;int&gt;</a>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;double&gt;</a></nobr><blockquote><a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;int&gt;</a> 
-               extension method.
-             </blockquote></td>
+              extension method.
+            </blockquote></td>
               </tr>
               <tr valign="top">
                 <td>
index 453b4d5d93585f29f66a0d8b4020f97c652e5558..3cb50923fddcaaf94dfb452447bcbc0e26981521 100644 (file)
                   <b>
                     <a href="../Mono.DocTest.Generic/Extensions.html#M:Mono.DocTest.Generic.Extensions.ToDouble(System.Collections.Generic.IEnumerable{System.Int32})">ToDouble</a>
                   </b>(<i>this</i> <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;int&gt;</a>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;double&gt;</a></nobr><blockquote><a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable&lt;int&gt;</a> 
-               extension method.
-             </blockquote></td>
+              extension method.
+            </blockquote></td>
               </tr>
               <tr valign="top">
                 <td>
                   <b>
                     <a href="../Mono.DocTest.Generic/Extensions.html#M:Mono.DocTest.Generic.Extensions.ToDouble``1(``0)">ToDouble&lt;T&gt;</a>
                   </b>(<i>this</i> <i title="To be added.">T</i>)<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Double">double</a></nobr><blockquote><a href="../Mono.DocTest.Generic/IFoo`1.html">Mono.DocTest.Generic.IFoo`1</a> extension method.
-             </blockquote></td>
+            </blockquote></td>
               </tr>
               <tr valign="top">
                 <td>
index 5d9b1497690228946c4d568485d60d2d445a5842..f0653684ae42dfd8dc139f13a9ada327c6a49337 100644 (file)
       <h2 class="Section">Remarks</h2>
       <div class="SectionBox" id="T:Mono.DocTest.Color:Docs:Remarks">
         <a href="../Mono.DocTest/Color.html">Mono.DocTest.Color</a>.
-               Namespace Test: [<a href="../Mono.DocTest/index.html">Mono.DocTest</a>]
-             </div>
+              Namespace Test: [<a href="../Mono.DocTest/index.html">Mono.DocTest</a>]
+            </div>
       <h2 class="Section">Members</h2>
       <div class="SectionBox" id="T:Mono.DocTest.Color:Docs:Members">
         <table class="Enumeration">
index 1c14d779287ba89e6b6ecad836810f23736024ba..b4d091ec407bc7eb6db310cd6abb53ff35f4ebe8 100644 (file)
       <h2 class="Section">Remarks</h2>
       <div class="SectionBox" id="T:Mono.DocTest.DocAttribute:Docs:Remarks">
         <p>
-               cref=<tt>T:Mono.DocTest.DocAttribute</tt>.
-              </p>
+              cref=<tt>T:Mono.DocTest.DocAttribute</tt>.
+             </p>
         <table width="100%">
           <tr>
             <td style="color:red">red</td>
index f35ef5ff5f3d71708ceb4a9f59ab225305ece0e8..adcabd8a828e9424ff6bc8af63693a4c696426db 100644 (file)
           </blockquote>
           <h2 class="Section">Remarks</h2>
           <div class="SectionBox" id="M:Mono.DocTest.Widget.Dynamic0(System.Object,System.Object):Remarks">
-            <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+            <tt>M:Mono.DocTest.Widget.Dynamic0(System.Object,System.Object)</tt>
           </div>
           <h2 class="Section">Requirements</h2>
           <div class="SectionBox" id="M:Mono.DocTest.Widget.Dynamic0(System.Object,System.Object):Version Information">
           </blockquote>
           <h2 class="Section">Remarks</h2>
           <div class="SectionBox" id="M:Mono.DocTest.Widget.Dynamic1(System.Collections.Generic.Dictionary{System.Object,System.String}):Remarks">
-            <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+            <tt>M:Mono.DocTest.Widget.Dynamic1(System.Collections.Generic.Dictionary{System.Object,System.Object})</tt>
           </div>
           <h2 class="Section">Requirements</h2>
           <div class="SectionBox" id="M:Mono.DocTest.Widget.Dynamic1(System.Collections.Generic.Dictionary{System.Object,System.String}):Version Information">
           </blockquote>
           <h2 class="Section">Remarks</h2>
           <div class="SectionBox" id="M:Mono.DocTest.Widget.Dynamic2(System.Func{System.String,System.Object}):Remarks">
-            <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+            <tt>M:Mono.DocTest.Widget.Dynamic2(System.Func{System.String,System.Object})</tt>
           </div>
           <h2 class="Section">Requirements</h2>
           <div class="SectionBox" id="M:Mono.DocTest.Widget.Dynamic2(System.Func{System.String,System.Object}):Version Information">
           </blockquote>
           <h2 class="Section">Remarks</h2>
           <div class="SectionBox" id="M:Mono.DocTest.Widget.Dynamic3(System.Func{System.Func{System.String,System.Object},System.Func{System.Object,System.String}}):Remarks">
-            <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+            <tt>M:Mono.DocTest.Widget.Dynamic3(System.Func{System.Func{System.String,System.Object},System.Func{System.Object,System.String}})</tt>
           </div>
           <h2 class="Section">Requirements</h2>
           <div class="SectionBox" id="M:Mono.DocTest.Widget.Dynamic3(System.Func{System.Func{System.String,System.Object},System.Func{System.Object,System.String}}):Version Information">
index b69e603915bf4929c3061086255ae914b36da866..55e31fff76ec2650804c2c8240117a5b570b0717 100644 (file)
                 <i>folder</i>
               </dt>
               <dd>
-               A <a href="../System/Environment+SpecialFolder.html">Environment.SpecialFolder</a> instance.
-             </dd>
+              A <a href="../System/Environment+SpecialFolder.html">Environment.SpecialFolder</a> instance.
+            </dd>
             </dl>
           </blockquote>
           <h4 class="Subsection">Returns</h4>
index d40b962b4d0ba0f2a21284a57b0b0a7ec4ad4a69..5743e52613d5072e11d15ab0b7e0b56af95473ad 100644 (file)
@@ -17,8 +17,8 @@
             <summary>Possible colors</summary>
             <remarks>
                 <see cref="T:Mono.DocTest.Color" />.
-               Namespace Test: [<see cref="N:Mono.DocTest" />]
-             </remarks>
+              Namespace Test: [<see cref="N:Mono.DocTest" />]
+            </remarks>
         </member>
         <member name="F:Mono.DocTest.Color.AnotherGreen">
             <summary>To be added.</summary>
@@ -50,8 +50,8 @@
             <summary>To be added.</summary>
             <remarks>
                 <para>
-               cref=<c>T:Mono.DocTest.DocAttribute</c>.
-              </para>
+              cref=<c>T:Mono.DocTest.DocAttribute</c>.
+             </para>
                 <format type="text/html">
                     <table width="100%">
                         <tr>
@@ -473,7 +473,9 @@ class Example {
             <param name="b">To be added.</param>
             <summary>To be added.</summary>
             <returns>To be added.</returns>
-            <remarks>To be added.</remarks>
+            <remarks>
+                <c>M:Mono.DocTest.Widget.Dynamic0(System.Object,System.Object)</c>
+            </remarks>
             <exception cref="T:System.ArgumentException">To be added; from:
           <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
         </member>
@@ -481,19 +483,25 @@ class Example {
             <param name="value">To be added.</param>
             <summary>To be added.</summary>
             <returns>To be added.</returns>
-            <remarks>To be added.</remarks>
+            <remarks>
+                <c>M:Mono.DocTest.Widget.Dynamic1(System.Collections.Generic.Dictionary{System.Object,System.Object})</c>
+            </remarks>
         </member>
         <member name="M:Mono.DocTest.Widget.Dynamic2(System.Func{System.String,System.Object})">
             <param name="value">To be added.</param>
             <summary>To be added.</summary>
             <returns>To be added.</returns>
-            <remarks>To be added.</remarks>
+            <remarks>
+                <c>M:Mono.DocTest.Widget.Dynamic2(System.Func{System.String,System.Object})</c>
+            </remarks>
         </member>
         <member name="M:Mono.DocTest.Widget.Dynamic3(System.Func{System.Func{System.String,System.Object},System.Func{System.Object,System.String}})">
             <param name="value">To be added.</param>
             <summary>To be added.</summary>
             <returns>To be added.</returns>
-            <remarks>To be added.</remarks>
+            <remarks>
+                <c>M:Mono.DocTest.Widget.Dynamic3(System.Func{System.Func{System.String,System.Object},System.Func{System.Object,System.String}})</c>
+            </remarks>
         </member>
         <member name="E:Mono.DocTest.Widget.DynamicE1">
             <summary>To be added.</summary>
@@ -1000,8 +1008,8 @@ class Example {
             <param name="list">To be added.</param>
             <summary>
                 <see cref="T:System.Collections.Generic.IEnumerable{System.Int32}" /> 
-               extension method.
-             </summary>
+              extension method.
+            </summary>
             <returns>To be added.</returns>
             <remarks>
                 <c>M:Mono.DocTest.Generic.Extensions.ToDouble</c>
@@ -1012,7 +1020,7 @@ class Example {
             <param name="val">To be added.</param>
             <summary>
                 <see cref="T:Mono.DocTest.Generic.IFoo`1" /> extension method.
-             </summary>
+            </summary>
             <returns>To be added.</returns>
             <remarks>
                 <c>M:Mono.DocTest.Generic.Extensions.ToDouble</c>
@@ -1547,7 +1555,7 @@ class Example {
             <summary>To be added.</summary>
             <remarks>To be added.</remarks>
         </member>
-        <member name="M:Mono.DocTest.Generic.MyList`1.Helper`2.UseT(```210T`2``21`2```210`2``21`2,```210U`2``21`2```210`2``21`2,```210V`2``21`2```210`2``21`2)">
+        <member name="M:Mono.DocTest.Generic.MyList`1.Helper`2.UseT(``21T`2``21`2,``21U`2``21`2,``21V`2``21`2)">
             <param name="a">Ako</param>
             <param name="b">bko</param>
             <param name="c">cko</param>
@@ -1735,8 +1743,8 @@ class Example {
         </member>
         <member name="M:System.Environment.GetFolderPath(System.Environment+SpecialFolder)">
             <param name="folder">
-               A <see cref="T:System.Environment+SpecialFolder" /> instance.
-             </param>
+              A <see cref="T:System.Environment+SpecialFolder" /> instance.
+            </param>
             <summary>To be added.</summary>
             <returns>To be added.</returns>
             <remarks>
index 84286e7f95fffbf75b4559235ea776e10005d7c5..cdca30fb3fbe5489a9eb10852ebb1d49e7a3b639 100644 (file)
@@ -8,7 +8,7 @@ PROGRAM_SNK = ../../class/mono.snk
 
 include ../../build/executable.make
 
-LOCAL_MCS_FLAGS = -unsafe -publicsign
+LOCAL_MCS_FLAGS = -unsafe -publicsign -keyfile:../../class/mono.snk
 LIB_REFS = System.ServiceProcess Mono.Posix System
 
 # Copied from library.make
index b93d05c7a1392a55cac1e4a1e60a5e18bc364326..63da2bd7c90553e777af9d8d04c49459c73368d0 100644 (file)
@@ -4,130 +4,130 @@ Stacktrace:
   at StackTraceDumper.Main () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:9 
 
 System.Exception: Stacktrace with 2 frames
-  at StackTraceDumper.<Main>m__0 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:16 
+  at StackTraceDumper+<>c.<Main>b__0_0 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:16 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
-  at StackTraceDumper.<Main>m__0 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:16 
+  at StackTraceDumper+<>c.<Main>b__0_0 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:16 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stacktrace with 3 frames
   at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:83 
-  at StackTraceDumper.<Main>m__1 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:18 
+  at StackTraceDumper+<>c.<Main>b__0_1 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:18 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:83 
-  at StackTraceDumper.<Main>m__1 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:18 
+  at StackTraceDumper+<>c.<Main>b__0_1 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:18 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stacktrace with 4 frames
   at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:83 
   at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:81 
-  at StackTraceDumper.<Main>m__2 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:20 
+  at StackTraceDumper+<>c.<Main>b__0_2 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:20 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:83 
   at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:81 
-  at StackTraceDumper.<Main>m__2 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:20 
+  at StackTraceDumper+<>c.<Main>b__0_2 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:20 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack frame with method overload using ref parameter
   at StackTraceDumper.ThrowException (System.String& message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:75 
-  at StackTraceDumper.<Main>m__3 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:24 
+  at StackTraceDumper+<>c.<Main>b__0_3 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:24 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper.ThrowException (System.String& message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:75 
-  at StackTraceDumper.<Main>m__3 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:24 
+  at StackTraceDumper+<>c.<Main>b__0_3 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:24 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack frame with method overload using out parameter
   at StackTraceDumper.ThrowException (System.String message, System.Int32& o) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:88 
-  at StackTraceDumper.<Main>m__4 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:29 
+  at StackTraceDumper+<>c.<Main>b__0_4 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:29 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper.ThrowException (System.String message, System.Int32& o) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:88 
-  at StackTraceDumper.<Main>m__4 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:29 
+  at StackTraceDumper+<>c.<Main>b__0_4 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:29 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack frame with 1 generic parameter
   at StackTraceDumper.ThrowExceptionGeneric[T] (System.String message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:93 
-  at StackTraceDumper.<Main>m__5 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:32 
+  at StackTraceDumper+<>c.<Main>b__0_5 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:32 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper.ThrowExceptionGeneric[T] (System.String message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:93 
-  at StackTraceDumper.<Main>m__5 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:32 
+  at StackTraceDumper+<>c.<Main>b__0_5 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:32 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack frame with 2 generic parameters
   at StackTraceDumper.ThrowExceptionGeneric[T1,T2] (System.String message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:113 
-  at StackTraceDumper.<Main>m__6 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:34 
+  at StackTraceDumper+<>c.<Main>b__0_6 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:34 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper.ThrowExceptionGeneric[T1,T2] (System.String message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:113 
-  at StackTraceDumper.<Main>m__6 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:34 
+  at StackTraceDumper+<>c.<Main>b__0_6 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:34 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack frame with generic method overload
   at StackTraceDumper.ThrowExceptionGeneric[T] (T a1) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:98 
-  at StackTraceDumper.<Main>m__7 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:36 
+  at StackTraceDumper+<>c.<Main>b__0_7 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:36 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper.ThrowExceptionGeneric[T] (T a1) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:98 
-  at StackTraceDumper.<Main>m__7 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:36 
+  at StackTraceDumper+<>c.<Main>b__0_7 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:36 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack trace with inner class
   at StackTraceDumper+InnerClass.ThrowException (System.String message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:119 
-  at StackTraceDumper.<Main>m__8 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:38 
+  at StackTraceDumper+<>c.<Main>b__0_8 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:38 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper+InnerClass.ThrowException (System.String message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:119 
-  at StackTraceDumper.<Main>m__8 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:38 
+  at StackTraceDumper+<>c.<Main>b__0_8 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:38 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack trace with inner generic class
   at StackTraceDumper+InnerGenericClass`1[T].ThrowException (System.String message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:126 
-  at StackTraceDumper.<Main>m__9 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:40 
+  at StackTraceDumper+<>c.<Main>b__0_9 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:40 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper+InnerGenericClass`1[T].ThrowException (System.String message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:126 
-  at StackTraceDumper.<Main>m__9 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:40 
+  at StackTraceDumper+<>c.<Main>b__0_9 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:40 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Generic to string:string
 
 System.Exception: Stack trace with inner generic class and method generic parameter
   at StackTraceDumper+InnerGenericClass`1[T].ThrowException (System.String message, T arg) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:132 
-  at StackTraceDumper.<Main>m__A () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:42 
+  at StackTraceDumper+<>c.<Main>b__0_10 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:42 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper+InnerGenericClass`1[T].ThrowException (System.String message, T arg) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:132 
-  at StackTraceDumper.<Main>m__A () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:42 
+  at StackTraceDumper+<>c.<Main>b__0_10 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:42 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack trace with inner generic class and generic overload
   at StackTraceDumper+InnerGenericClass`1[T].ThrowException[T1] (System.String message, T1 arg) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:137 
-  at StackTraceDumper.<Main>m__B () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:44 
+  at StackTraceDumper+<>c.<Main>b__0_11 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:44 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper+InnerGenericClass`1[T].ThrowException[T1] (System.String message, T1 arg) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:137 
-  at StackTraceDumper.<Main>m__B () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:44 
+  at StackTraceDumper+<>c.<Main>b__0_11 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:44 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack trace with 2 inner generic class and generic overload
   at StackTraceDumper+InnerGenericClass`1+InnerInnerGenericClass`1[T,T2].ThrowException (T message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:143 
-  at StackTraceDumper.<Main>m__C () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:46 
+  at StackTraceDumper+<>c.<Main>b__0_12 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:46 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper+InnerGenericClass`1+InnerInnerGenericClass`1[T,T2].ThrowException (T message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:143 
-  at StackTraceDumper.<Main>m__C () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:46 
+  at StackTraceDumper+<>c.<Main>b__0_12 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:46 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.Exception: Stack trace with 2 inner generic class and generic overload
   at StackTraceDumper+InnerGenericClass`1+InnerInnerGenericClass`1[T,T2].ThrowException (T2 message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:148 
-  at StackTraceDumper.<Main>m__D () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:48 
+  at StackTraceDumper+<>c.<Main>b__0_13 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:48 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at StackTraceDumper+InnerGenericClass`1+InnerInnerGenericClass`1[T,T2].ThrowException (T2 message) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:148 
-  at StackTraceDumper.<Main>m__D () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:48 
+  at StackTraceDumper+<>c.<Main>b__0_13 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:48 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 
 System.ArgumentNullException: Value cannot be null.
@@ -135,11 +135,11 @@ Parameter name: key
   at System.ThrowHelper.ThrowArgumentNullException (System.ExceptionArgument argument) in mcs/class/referencesource/mscorlib/system/throwhelper.cs:80 
   at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in mcs/class/referencesource/mscorlib/system/collections/generic/dictionary.cs:299 
   at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in mcs/class/referencesource/mscorlib/system/collections/generic/dictionary.cs:228 
-  at StackTraceDumper.<Main>m__E () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:52 
+  at StackTraceDumper+<>c.<Main>b__0_14 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:52 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
 Stacktrace:
   at System.ThrowHelper.ThrowArgumentNullException (System.ExceptionArgument argument) in mcs/class/referencesource/mscorlib/system/throwhelper.cs:80 
   at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in mcs/class/referencesource/mscorlib/system/collections/generic/dictionary.cs:299 
   at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in mcs/class/referencesource/mscorlib/system/collections/generic/dictionary.cs:228 
-  at StackTraceDumper.<Main>m__E () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:52 
+  at StackTraceDumper+<>c.<Main>b__0_14 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:52 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:59 
index 1d448c2915a429c91b9c5e1ee0fff76424ec6f93..d7dede3c72cd1129df8afe37a82654652b31b0a4 100644 (file)
@@ -5,7 +5,7 @@ include ../../../build/rules.make
 LIBRARY = nunitlite.dll
 LIBRARY_SNK = ../../../../external/nunit-lite/NUnitLite-1.0.0/src/framework/nunit.snk
 
-LOCAL_MCS_FLAGS= /target:library /define:"__MOBILE__;TRACE;DEBUG;NET_4_0;CLR_4_0,NUNITLITE" /warn:4 /keyfile:$(LIBRARY_SNK)
+LOCAL_MCS_FLAGS= /target:library /define:"__MOBILE__;TRACE;DEBUG;NET_4_0;CLR_4_0,NUNITLITE" /warn:4 /keyfile:$(LIBRARY_SNK) /publicsign
 LIB_REFS = System System.Xml System.Core
 
 NO_TEST = yes
index 1ea2597599fba3ee870715c18c4dfadc4a086d20..90ab1a35cf9dca8a1a725b91c732b94dd563f295 100644 (file)
@@ -6,11 +6,16 @@
 #include <mono/metadata/tabledefs.h>
 
 
-enum InfrequentDataKind {
+typedef enum {
        PROP_MARSHAL_INFO = 1, /* MonoMarshalType */
-       PROP_EXT = 2, /* MonoClassExt */
-       PROP_REF_INFO_HANDLE = 3, /* gchandle */
-};
+       PROP_REF_INFO_HANDLE = 2, /* gchandle */
+       PROP_EXCEPTION_DATA = 3, /* MonoErrorBoxed* */
+       PROP_NESTED_CLASSES = 4, /* GList* */
+       PROP_PROPERTY_INFO = 5, /* MonoClassPropertyInfo* */
+       PROP_EVENT_INFO = 6, /* MonoClassEventInfo* */
+       PROP_FIELD_DEF_VALUES = 7, /* MonoFieldDefaultValue* */
+       PROP_DECLSEC_FLAGS = 8 /* guint32 */
+}  InfrequentDataKind;
 
 /* Accessors based on class kind*/
 
@@ -242,19 +247,6 @@ mono_class_set_marshal_info (MonoClass *class, MonoMarshalType *marshal_info)
        mono_property_bag_add (&class->infrequent_data, marshal_info);
 }
 
-MonoClassExt*
-mono_class_get_ext (MonoClass *class)
-{
-       return mono_property_bag_get (&class->infrequent_data, PROP_EXT);
-}
-
-void
-mono_class_set_ext (MonoClass *class, MonoClassExt *ext)
-{
-       ext->head.tag = PROP_EXT;
-       mono_property_bag_add (&class->infrequent_data, ext);
-}
-
 typedef struct {
        MonoPropertyBagItem head;
        guint32 value;
@@ -283,3 +275,102 @@ mono_class_set_ref_info_handle (MonoClass *class, guint32 value)
        prop = mono_property_bag_add (&class->infrequent_data, prop);
        return prop->value;
 }
+
+typedef struct {
+       MonoPropertyBagItem head;
+       gpointer value;
+} PointerProperty;
+
+static void
+set_pointer_property (MonoClass *klass, InfrequentDataKind property, gpointer value)
+{
+       PointerProperty *prop = mono_class_alloc (klass, sizeof (PointerProperty));
+       prop->head.tag = property;
+       prop->value = value;
+       mono_property_bag_add (&klass->infrequent_data, prop);
+}
+
+static gpointer
+get_pointer_property (MonoClass *klass, InfrequentDataKind property)
+{
+       PointerProperty *prop = (PointerProperty*)mono_property_bag_get (&klass->infrequent_data, property);
+       return prop ? prop->value : NULL;
+}
+
+MonoErrorBoxed*
+mono_class_get_exception_data (MonoClass *klass)
+{
+       return (MonoErrorBoxed*)get_pointer_property (klass, PROP_EXCEPTION_DATA);
+}
+
+void
+mono_class_set_exception_data (MonoClass *klass, MonoErrorBoxed *value)
+{
+       set_pointer_property (klass, PROP_EXCEPTION_DATA, value);
+}
+
+GList*
+mono_class_get_nested_classes_property (MonoClass *klass)
+{
+       return (GList*)get_pointer_property (klass, PROP_NESTED_CLASSES);
+}
+
+void
+mono_class_set_nested_classes_property (MonoClass *klass, GList *value)
+{
+       set_pointer_property (klass, PROP_NESTED_CLASSES, value);
+}
+
+MonoClassPropertyInfo*
+mono_class_get_property_info (MonoClass *klass)
+{
+       return mono_property_bag_get (&klass->infrequent_data, PROP_PROPERTY_INFO);
+}
+
+void
+mono_class_set_property_info (MonoClass *klass, MonoClassPropertyInfo *info)
+{
+       info->head.tag = PROP_PROPERTY_INFO;
+       mono_property_bag_add (&klass->infrequent_data, info);
+}
+
+MonoClassEventInfo*
+mono_class_get_event_info (MonoClass *klass)
+{
+       return mono_property_bag_get (&klass->infrequent_data, PROP_EVENT_INFO);
+}
+
+void
+mono_class_set_event_info (MonoClass *klass, MonoClassEventInfo *info)
+{
+       info->head.tag = PROP_EVENT_INFO;
+       mono_property_bag_add (&klass->infrequent_data, info);
+}
+
+MonoFieldDefaultValue*
+mono_class_get_field_def_values (MonoClass *klass)
+{
+       return (MonoFieldDefaultValue*)get_pointer_property (klass, PROP_FIELD_DEF_VALUES);
+}
+
+void
+mono_class_set_field_def_values (MonoClass *klass, MonoFieldDefaultValue *values)
+{
+       set_pointer_property (klass, PROP_FIELD_DEF_VALUES, values);
+}
+
+guint32
+mono_class_get_declsec_flags (MonoClass *class)
+{
+       Uint32Property *prop = mono_property_bag_get (&class->infrequent_data, PROP_DECLSEC_FLAGS);
+       return prop ? prop->value : 0;
+}
+
+void
+mono_class_set_declsec_flags (MonoClass *class, guint32 value)
+{
+       Uint32Property *prop = mono_class_alloc (class, sizeof (Uint32Property));
+       prop->head.tag = PROP_DECLSEC_FLAGS;
+       prop->value = value;
+       mono_property_bag_add (&class->infrequent_data, prop);
+}
index 9e7729f52b9229d63898af4c4a301ff0bb1e2ee0..5ff799cc626c810b7ccb58c4a6c4f8da2c4170c4 100644 (file)
@@ -227,39 +227,21 @@ typedef struct {
 
 #define MONO_SIZEOF_CLASS_RUNTIME_INFO (sizeof (MonoClassRuntimeInfo) - MONO_ZERO_LEN_ARRAY * SIZEOF_VOID_P)
 
-#define MONO_CLASS_PROP_EXCEPTION_DATA 0
-
-/* 
- * This structure contains the rarely used fields of MonoClass
- * Since using just one field causes the whole structure to be allocated, it should
- * be used for fields which are only used in like 5% of all classes.
- */
 typedef struct {
        MonoPropertyBagItem head;
 
-       struct {
-#if MONO_SMALL_CONFIG
-               guint16 first, count;
-#else
-               guint32 first, count;
-#endif
-       } property, event;
-
-       /* Initialized by a call to mono_class_setup_properties () */
        MonoProperty *properties;
+       guint32 first, count;
+       MonoFieldDefaultValue *def_values;
+} MonoClassPropertyInfo;
+
+typedef struct {
+       MonoPropertyBagItem head;
 
        /* Initialized by a call to mono_class_setup_events () */
        MonoEvent *events;
-
-       guint32    declsec_flags;       /* declarative security attributes flags */
-
-       /* Default values/RVA for fields and properties */
-       /* Accessed using mono_class_get_field_default_value () / mono_field_get_data () */
-       MonoFieldDefaultValue *field_def_values;
-       MonoFieldDefaultValue *prop_def_values;
-
-       GList      *nested_classes;
-} MonoClassExt;
+       guint32 first, count;
+} MonoClassEventInfo;
 
 typedef enum {
        MONO_CLASS_DEF = 1, /* non-generic type */
@@ -302,6 +284,8 @@ struct _MonoClass {
        guint blittable       : 1; /* class is blittable */
        guint unicode         : 1; /* class uses unicode char when marshalled */
        guint wastypebuilder  : 1; /* class was created at runtime from a TypeBuilder */
+       guint is_array_special_interface : 1; /* gtd or ginst of once of the magic interfaces that arrays implement */
+
        /* next byte */
        guint8 min_align;
 
@@ -334,7 +318,7 @@ struct _MonoClass {
        guint simd_type : 1; /* class is a simd intrinsic type */
        guint has_finalize_inited    : 1; /* has_finalize is initialized */
        guint fields_inited : 1; /* setup_fields () has finished */
-       guint has_failure : 1; /* See MONO_CLASS_PROP_EXCEPTION_DATA for a MonoErrorBoxed with the details */
+       guint has_failure : 1; /* See mono_class_get_exception_data () for a MonoErrorBoxed with the details */
 
        MonoClass  *parent;
        MonoClass  *nested_in;
@@ -1361,9 +1345,6 @@ mono_class_alloc (MonoClass *klass, int size);
 gpointer
 mono_class_alloc0 (MonoClass *klass, int size);
 
-void
-mono_class_alloc_ext (MonoClass *klass);
-
 void
 mono_class_setup_interfaces (MonoClass *klass, MonoError *error);
 
@@ -1493,18 +1474,48 @@ mono_class_get_marshal_info (MonoClass *class);
 void
 mono_class_set_marshal_info (MonoClass *class, MonoMarshalType *marshal_info);
 
-MonoClassExt*
-mono_class_get_ext (MonoClass *class);
-
-void
-mono_class_set_ext (MonoClass *class, MonoClassExt *ext);
-
 guint32
 mono_class_get_ref_info_handle (MonoClass *class);
 
 guint32
 mono_class_set_ref_info_handle (MonoClass *class, guint32 value);
 
+MonoErrorBoxed*
+mono_class_get_exception_data (MonoClass *klass);
+
+void
+mono_class_set_exception_data (MonoClass *klass, MonoErrorBoxed *value);
+
+GList*
+mono_class_get_nested_classes_property (MonoClass *klass);
+
+void
+mono_class_set_nested_classes_property (MonoClass *klass, GList *value);
+
+MonoClassPropertyInfo*
+mono_class_get_property_info (MonoClass *klass);
+
+void
+mono_class_set_property_info (MonoClass *klass, MonoClassPropertyInfo *info);
+
+MonoClassEventInfo*
+mono_class_get_event_info (MonoClass *klass);
+
+void
+mono_class_set_event_info (MonoClass *klass, MonoClassEventInfo *info);
+
+MonoFieldDefaultValue*
+mono_class_get_field_def_values (MonoClass *klass);
+
+void
+mono_class_set_field_def_values (MonoClass *klass, MonoFieldDefaultValue *values);
+
+guint32
+mono_class_get_declsec_flags (MonoClass *class);
+
+void
+mono_class_set_declsec_flags (MonoClass *class, guint32 value);
+
 /*Now that everything has been defined, let's include the inline functions */
 #include <mono/metadata/class-inlines.h>
 
index 1dbb0c5a72eafdbf2028b5c18170fc45d8b1859a..cbb9ed9ce6524ba4b3e20f3cf10830f139aa909f 100644 (file)
@@ -79,7 +79,6 @@ static void mono_class_setup_vtable_full (MonoClass *klass, GList *in_setup);
 static void mono_generic_class_setup_parent (MonoClass *klass, MonoClass *gklass);
 
 static gboolean mono_class_set_failure (MonoClass *klass, MonoErrorBoxed *boxed_error);
-static gpointer mono_class_get_exception_data (const MonoClass *klass);
 
 
 /*
@@ -245,10 +244,10 @@ mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError
                enclosing = mono_class_from_typeref_checked (image, MONO_TOKEN_TYPE_REF | idx, error); 
                return_val_if_nok (error, NULL);
 
-               MonoClassExt *ext = mono_class_get_ext (enclosing);
-               if (enclosing->nested_classes_inited && ext) {
+               GList *nested_classes = mono_class_get_nested_classes_property (enclosing);
+               if (enclosing->nested_classes_inited && nested_classes) {
                        /* Micro-optimization: don't scan the metadata tables if enclosing is already inited */
-                       for (tmp = ext->nested_classes; tmp; tmp = tmp->next) {
+                       for (tmp = nested_classes; tmp; tmp = tmp->next) {
                                res = (MonoClass *)tmp->data;
                                if (strcmp (res->name, name) == 0)
                                        return res;
@@ -1369,11 +1368,10 @@ void
 mono_error_set_for_class_failure (MonoError *oerror, const MonoClass *klass)
 {
        g_assert (mono_class_has_failure (klass));
-       MonoErrorBoxed *box = (MonoErrorBoxed*)mono_class_get_exception_data (klass);
+       MonoErrorBoxed *box = mono_class_get_exception_data ((MonoClass*)klass);
        mono_error_set_from_boxed (oerror, box);
 }
 
-
 /*
  * mono_class_alloc:
  *
@@ -2548,9 +2546,10 @@ mono_class_setup_properties (MonoClass *klass)
        MonoProperty *properties;
        guint32 last;
        int first, count;
+       MonoClassPropertyInfo *info;
 
-       MonoClassExt *ext = mono_class_get_ext (klass);
-       if (ext && ext->properties)
+       info = mono_class_get_property_info (klass);
+       if (info)
                return;
 
        if (mono_class_is_ginst (klass)) {
@@ -2561,14 +2560,14 @@ mono_class_setup_properties (MonoClass *klass)
                if (mono_class_set_type_load_failure_causedby_class (klass, gklass, "Generic type definition failed to load"))
                        return;
 
-               MonoClassExt *gext = mono_class_get_ext (gklass);
-               properties = mono_class_new0 (klass, MonoProperty, gext->property.count + 1);
+               MonoClassPropertyInfo *ginfo = mono_class_get_property_info (gklass);
+               properties = mono_class_new0 (klass, MonoProperty, ginfo->count + 1);
 
-               for (i = 0; i < gext->property.count; i++) {
+               for (i = 0; i < ginfo->count; i++) {
                        MonoError error;
                        MonoProperty *prop = &properties [i];
 
-                       *prop = gext->properties [i];
+                       *prop = ginfo->properties [i];
 
                        if (prop->get)
                                prop->get = mono_class_inflate_generic_method_full_checked (
@@ -2581,8 +2580,8 @@ mono_class_setup_properties (MonoClass *klass)
                        prop->parent = klass;
                }
 
-               first = gext->property.first;
-               count = gext->property.count;
+               first = ginfo->first;
+               count = ginfo->count;
        } else {
                first = mono_metadata_properties_from_typedef (klass->image, mono_metadata_token_index (klass->type_token) - 1, &last);
                count = last - first;
@@ -2630,27 +2629,14 @@ mono_class_setup_properties (MonoClass *klass)
                }
        }
 
-       mono_class_alloc_ext (klass);
-       ext = mono_class_get_ext (klass);
-
-       mono_image_lock (klass->image);
-
-       if (ext->properties) {
-               /* We leak 'properties' which was allocated from the image mempool */
-               mono_image_unlock (klass->image);
-               return;
-       }
-
-       ext->property.first = first;
-       ext->property.count = count;
-
-       /* Flush any pending writes as we do double checked locking on klass->ext->properties */
+       info = mono_class_alloc0 (klass, sizeof (MonoClassPropertyInfo));
+       info->first = first;
+       info->count = count;
+       info->properties = properties;
        mono_memory_barrier ();
 
-       /* Leave this assignment as the last op in the function */
-       ext->properties = properties;
-
-       mono_image_unlock (klass->image);
+       /* This might leak 'info' which was allocated from the image mempool */
+       mono_class_set_property_info (klass, info);
 }
 
 static MonoMethod**
@@ -2684,8 +2670,8 @@ mono_class_setup_events (MonoClass *klass)
        guint32 last;
        MonoEvent *events;
 
-       MonoClassExt *ext = mono_class_get_ext (klass);
-       if (ext && ext->events)
+       MonoClassEventInfo *info = mono_class_get_event_info (klass);
+       if (info)
                return;
 
        if (mono_class_is_ginst (klass)) {
@@ -2696,9 +2682,9 @@ mono_class_setup_events (MonoClass *klass)
                if (mono_class_set_type_load_failure_causedby_class (klass, gklass, "Generic type definition failed to load"))
                        return;
 
-               MonoClassExt *gext = mono_class_get_ext (gklass);
-               first = gext->event.first;
-               count = gext->event.count;
+               MonoClassEventInfo *ginfo = mono_class_get_event_info (gklass);
+               first = ginfo->first;
+               count = ginfo->count;
 
                events = mono_class_new0 (klass, MonoEvent, count);
 
@@ -2708,7 +2694,7 @@ mono_class_setup_events (MonoClass *klass)
                for (i = 0; i < count; i++) {
                        MonoError error;
                        MonoEvent *event = &events [i];
-                       MonoEvent *gevent = &gext->events [i];
+                       MonoEvent *gevent = &ginfo->events [i];
 
                        mono_error_init (&error); //since we do conditional calls, we must ensure the default value is ok
 
@@ -2796,26 +2782,14 @@ mono_class_setup_events (MonoClass *klass)
                }
        }
 
-       mono_class_alloc_ext (klass);
-       ext = mono_class_get_ext (klass);
+       info = mono_class_alloc0 (klass, sizeof (MonoClassEventInfo));
+       info->events = events;
+       info->first = first;
+       info->count = count;
 
-       mono_image_lock (klass->image);
-
-       if (ext->events) {
-               mono_image_unlock (klass->image);
-               return;
-       }
-
-       ext->event.first = first;
-       ext->event.count = count;
-
-       /* Flush any pending writes as we do double checked locking on klass->ext.events */
        mono_memory_barrier ();
 
-       /* Leave this assignment as the last op in the function */
-       ext->events = events;
-
-       mono_image_unlock (klass->image);
+       mono_class_set_event_info (klass, info);
 }
 
 /*
@@ -3011,6 +2985,18 @@ mono_class_interface_offset_with_variance (MonoClass *klass, MonoClass *itf, gbo
        if (i >= 0)
                return i;
        
+       if (itf->is_array_special_interface && klass->rank < 2) {
+               MonoClass *gtd = mono_class_get_generic_type_definition (itf);
+
+               for (i = 0; i < klass->interface_offsets_count; i++) {
+                       // printf ("\t%s\n", mono_type_get_full_name (klass->interfaces_packed [i]));
+                       if (mono_class_get_generic_type_definition (klass->interfaces_packed [i]) == gtd) {
+                               *non_exact_match = TRUE;
+                               return klass->interface_offsets_packed [i];
+                       }
+               }
+       }
+
        if (!mono_class_has_variant_generic_params (itf))
                return -1;
 
@@ -3136,226 +3122,6 @@ static GENERATE_GET_CLASS_WITH_CACHE (generic_ienumerator, System.Collections.Ge
 static GENERATE_GET_CLASS_WITH_CACHE (generic_ireadonlylist, System.Collections.Generic, IReadOnlyList`1)
 static GENERATE_GET_CLASS_WITH_CACHE (generic_ireadonlycollection, System.Collections.Generic, IReadOnlyCollection`1)
 
-/* this won't be needed once bug #325495 is completely fixed
- * though we'll need something similar to know which interfaces to allow
- * in arrays when they'll be lazyly created
- * 
- * FIXME: System.Array/InternalEnumerator don't need all this interface fabrication machinery.
- * MS returns diferrent types based on which instance is called. For example:
- *     object obj = new byte[10][];
- *     Type a = ((IEnumerable<byte[]>)obj).GetEnumerator ().GetType ();
- *     Type b = ((IEnumerable<IList<byte>>)obj).GetEnumerator ().GetType ();
- *     a != b ==> true
- * 
- * Fixing this should kill quite some code, save some bits and improve compatibility.
- */
-static MonoClass**
-get_implicit_generic_array_interfaces (MonoClass *klass, int *num, int *is_enumerator)
-{
-       MonoClass *eclass = klass->element_class;
-       MonoClass* generic_icollection_class;
-       MonoClass* generic_ienumerable_class;
-       MonoClass* generic_ienumerator_class;
-       MonoClass* generic_ireadonlylist_class;
-       MonoClass* generic_ireadonlycollection_class;
-       MonoClass *valuetype_types[2] = { NULL, NULL };
-       MonoClass **interfaces = NULL;
-       int i, nifaces, interface_count, real_count, original_rank;
-       int all_interfaces;
-       gboolean internal_enumerator;
-       gboolean eclass_is_valuetype;
-
-       if (!mono_defaults.generic_ilist_class) {
-               *num = 0;
-               return NULL;
-       }
-       internal_enumerator = FALSE;
-       eclass_is_valuetype = FALSE;
-       original_rank = eclass->rank;
-       if (klass->byval_arg.type != MONO_TYPE_SZARRAY) {
-               MonoGenericClass *gklass = mono_class_try_get_generic_class (klass);
-               if (gklass && klass->nested_in == mono_defaults.array_class && strcmp (klass->name, "InternalEnumerator`1") == 0)        {
-                       /*
-                        * For a Enumerator<T[]> we need to get the list of interfaces for T.
-                        */
-                       eclass = mono_class_from_mono_type (gklass->context.class_inst->type_argv [0]);
-                       original_rank = eclass->rank;
-                       if (!eclass->rank)
-                               eclass = eclass->element_class;
-                       internal_enumerator = TRUE;
-                       *is_enumerator = TRUE;
-               } else {
-                       *num = 0;
-                       return NULL;
-               }
-       }
-
-       /* 
-        * with this non-lazy impl we can't implement all the interfaces so we do just the minimal stuff
-        * for deep levels of arrays of arrays (string[][] has all the interfaces, string[][][] doesn't)
-        */
-       all_interfaces = eclass->rank && eclass->element_class->rank? FALSE: TRUE;
-
-       generic_icollection_class = mono_class_get_generic_icollection_class ();
-       generic_ienumerable_class = mono_class_get_generic_ienumerable_class ();
-       generic_ienumerator_class = mono_class_get_generic_ienumerator_class ();
-       generic_ireadonlylist_class = mono_class_get_generic_ireadonlylist_class ();
-       generic_ireadonlycollection_class = mono_class_get_generic_ireadonlycollection_class ();
-
-       mono_class_init (eclass);
-
-       /*
-        * Arrays in 2.0 need to implement a number of generic interfaces
-        * (IList`1, ICollection`1, IEnumerable`1 for a number of types depending
-        * on the element class). For net 4.5, we also need to implement IReadOnlyList`1/IReadOnlyCollection`1.
-        * We collect the types needed to build the
-        * instantiations in interfaces at intervals of 3/5, because 3/5 are
-        * the generic interfaces needed to implement.
-        *
-        * On 4.5, as an optimization, we don't expand ref classes for the variant generic interfaces
-        * (IEnumerator, IReadOnlyList and IReadOnlyColleciton). The regular dispatch code can handle those cases.
-        */
-       if (eclass->valuetype) {
-               nifaces = generic_ireadonlylist_class ? 5 : 3;
-               fill_valuetype_array_derived_types (valuetype_types, eclass, original_rank);
-
-               /* IList, ICollection, IEnumerable, IReadOnlyList`1 */
-               real_count = interface_count = valuetype_types [1] ? (nifaces * 2) : nifaces;
-               if (internal_enumerator) {
-                       ++real_count;
-                       if (valuetype_types [1])
-                               ++real_count;
-               }
-
-               interfaces = (MonoClass **)g_malloc0 (sizeof (MonoClass*) * real_count);
-               interfaces [0] = valuetype_types [0];
-               if (valuetype_types [1])
-                       interfaces [nifaces] = valuetype_types [1];
-
-               eclass_is_valuetype = TRUE;
-       } else {
-               int j;
-               int idepth = eclass->idepth;
-               if (!internal_enumerator)
-                       idepth--;
-               nifaces = generic_ireadonlylist_class ? 2 : 3;
-
-               // FIXME: This doesn't seem to work/required for generic params
-               if (!(eclass->this_arg.type == MONO_TYPE_VAR || eclass->this_arg.type == MONO_TYPE_MVAR || (image_is_dynamic (eclass->image) && !eclass->wastypebuilder)))
-                       mono_class_setup_interface_offsets (eclass);
-
-               interface_count = all_interfaces? eclass->interface_offsets_count: eclass->interface_count;
-               /* we add object for interfaces and the supertypes for the other
-                * types. The last of the supertypes is the element class itself which we
-                * already created the explicit interfaces for (so we include it for IEnumerator
-                * and exclude it for arrays).
-                */
-               if (MONO_CLASS_IS_INTERFACE (eclass))
-                       interface_count++;
-               else
-                       interface_count += idepth;
-               if (eclass->rank && eclass->element_class->valuetype) {
-                       fill_valuetype_array_derived_types (valuetype_types, eclass->element_class, original_rank);
-                       if (valuetype_types [1])
-                               ++interface_count;
-               }
-               /* IList, ICollection, IEnumerable, IReadOnlyList */
-               interface_count *= nifaces;
-               real_count = interface_count;
-               if (internal_enumerator) {
-                       real_count += (MONO_CLASS_IS_INTERFACE (eclass) ? 1 : idepth) + eclass->interface_offsets_count;
-                       if (valuetype_types [1])
-                               ++real_count;
-               }
-               interfaces = (MonoClass **)g_malloc0 (sizeof (MonoClass*) * real_count);
-               if (MONO_CLASS_IS_INTERFACE (eclass)) {
-                       interfaces [0] = mono_defaults.object_class;
-                       j = nifaces;
-               } else {
-                       j = 0;
-                       for (i = 0; i < idepth; i++) {
-                               mono_class_init (eclass->supertypes [i]);
-                               interfaces [j] = eclass->supertypes [i];
-                               j += nifaces;
-                       }
-               }
-               if (all_interfaces) {
-                       for (i = 0; i < eclass->interface_offsets_count; i++) {
-                               interfaces [j] = eclass->interfaces_packed [i];
-                               j += nifaces;
-                       }
-               } else {
-                       for (i = 0; i < eclass->interface_count; i++) {
-                               interfaces [j] = eclass->interfaces [i];
-                               j += nifaces;
-                       }
-               }
-               if (valuetype_types [1]) {
-                       interfaces [j] = array_class_get_if_rank (valuetype_types [1], original_rank);
-                       j += nifaces;
-               }
-       }
-
-       /* instantiate the generic interfaces */
-       for (i = 0; i < interface_count; i += nifaces) {
-               MonoClass *iface = interfaces [i];
-
-               interfaces [i + 0] = inflate_class_one_arg (mono_defaults.generic_ilist_class, iface);
-               interfaces [i + 1] = inflate_class_one_arg (generic_icollection_class, iface);
-
-               if (eclass->valuetype) {
-                       interfaces [i + 2] = inflate_class_one_arg (generic_ienumerable_class, iface);
-                       if (generic_ireadonlylist_class) {
-                               interfaces [i + 3] = inflate_class_one_arg (generic_ireadonlylist_class, iface);
-                               interfaces [i + 4] = inflate_class_one_arg (generic_ireadonlycollection_class, iface);
-                       }
-               } else {
-                       if (!generic_ireadonlylist_class)
-                               interfaces [i + 2] = inflate_class_one_arg (generic_ienumerable_class, iface);
-               }
-       }
-       if (internal_enumerator) {
-               int j;
-               /* instantiate IEnumerator<iface> */
-               for (i = 0; i < interface_count; i++) {
-                       interfaces [i] = inflate_class_one_arg (generic_ienumerator_class, interfaces [i]);
-               }
-               j = interface_count;
-               if (!eclass_is_valuetype) {
-                       if (MONO_CLASS_IS_INTERFACE (eclass)) {
-                               interfaces [j] = inflate_class_one_arg (generic_ienumerator_class, mono_defaults.object_class);
-                               j ++;
-                       } else {
-                               for (i = 0; i < eclass->idepth; i++) {
-                                       interfaces [j] = inflate_class_one_arg (generic_ienumerator_class, eclass->supertypes [i]);
-                                       j ++;
-                               }
-                       }
-                       for (i = 0; i < eclass->interface_offsets_count; i++) {
-                               interfaces [j] = inflate_class_one_arg (generic_ienumerator_class, eclass->interfaces_packed [i]);
-                               j ++;
-                       }
-               } else {
-                       interfaces [j++] = inflate_class_one_arg (generic_ienumerator_class, array_class_get_if_rank (valuetype_types [0], original_rank));
-               }
-               if (valuetype_types [1])
-                       interfaces [j] = inflate_class_one_arg (generic_ienumerator_class, array_class_get_if_rank (valuetype_types [1], original_rank));
-       }
-#if 0
-       {
-       char *type_name = mono_type_get_name_full (&klass->byval_arg, 0);
-       for (i = 0; i  < real_count; ++i) {
-               char *name = mono_type_get_name_full (&interfaces [i]->byval_arg, 0);
-               g_print ("%s implements %s\n", type_name, name);
-               g_free (name);
-       }
-       g_free (type_name);
-       }
-#endif
-       *num = real_count;
-       return interfaces;
-}
-
 static int
 find_array_interface (MonoClass *klass, const char *name)
 {
@@ -3584,23 +3350,14 @@ setup_interface_offsets (MonoClass *klass, int cur_slot, gboolean overwrite)
        GPtrArray *ifaces;
        GPtrArray **ifaces_array = NULL;
        int interface_offsets_count;
-       MonoClass **array_interfaces = NULL;
-       int num_array_interfaces;
-       int is_enumerator = FALSE;
 
        mono_loader_lock ();
 
        mono_class_setup_supertypes (klass);
-       /* 
-        * get the implicit generic interfaces for either the arrays or for System.Array/InternalEnumerator<T>
-        * implicit interfaces have the property that they are assigned the same slot in the
-        * vtables for compatible interfaces
-        */
-       array_interfaces = get_implicit_generic_array_interfaces (klass, &num_array_interfaces, &is_enumerator);
 
        /* compute maximum number of slots and maximum interface id */
        max_iid = 0;
-       num_ifaces = num_array_interfaces; /* this can include duplicated ones */
+       num_ifaces = 0; /* this can include duplicated ones */
        ifaces_array = g_new0 (GPtrArray *, klass->idepth);
        for (j = 0; j < klass->idepth; j++) {
                k = klass->supertypes [j];
@@ -3634,13 +3391,6 @@ setup_interface_offsets (MonoClass *klass, int cur_slot, gboolean overwrite)
                }
        }
 
-       for (i = 0; i < num_array_interfaces; ++i) {
-               ic = array_interfaces [i];
-               mono_class_init (ic);
-               if (max_iid < ic->interface_id)
-                       max_iid = ic->interface_id;
-       }
-
        if (MONO_CLASS_IS_INTERFACE (klass)) {
                num_ifaces++;
                if (max_iid < klass->interface_id)
@@ -3695,55 +3445,6 @@ setup_interface_offsets (MonoClass *klass, int cur_slot, gboolean overwrite)
        if (MONO_CLASS_IS_INTERFACE (klass))
                set_interface_and_offset (num_ifaces, interfaces_full, interface_offsets_full, klass, cur_slot, TRUE);
 
-       if (num_array_interfaces) {
-               if (is_enumerator) {
-                       int ienumerator_idx = find_array_interface (klass, "IEnumerator`1");
-                       int ienumerator_offset = find_interface_offset (num_ifaces, interfaces_full, interface_offsets_full, klass->interfaces [ienumerator_idx]);
-                       g_assert (ienumerator_offset >= 0);
-                       for (i = 0; i < num_array_interfaces; ++i) {
-                               ic = array_interfaces [i];
-                               if (strcmp (ic->name, "IEnumerator`1") == 0)
-                                       set_interface_and_offset (num_ifaces, interfaces_full, interface_offsets_full, ic, ienumerator_offset, TRUE);
-                               else
-                                       g_assert_not_reached ();
-                               /*g_print ("type %s has %s offset at %d (%s)\n", klass->name, ic->name, interface_offsets_full [ic->interface_id], klass->interfaces [0]->name);*/
-                       }
-               } else {
-                       int ilist_offset, icollection_offset, ienumerable_offset, ireadonlylist_offset, ireadonlycollection_offset;
-                       int ilist_iface_idx = find_array_interface (klass, "IList`1");
-                       MonoClass* ilist_class = klass->interfaces [ilist_iface_idx];
-                       int ireadonlylist_iface_idx = find_array_interface (klass, "IReadOnlyList`1");
-                       MonoClass* ireadonlylist_class = ireadonlylist_iface_idx != -1 ? klass->interfaces [ireadonlylist_iface_idx] : NULL;
-                       int icollection_iface_idx = find_array_interface (ilist_class, "ICollection`1");
-                       int ienumerable_iface_idx = find_array_interface (ilist_class, "IEnumerable`1");
-                       int ireadonlycollection_iface_idx = ireadonlylist_iface_idx != -1 ? find_array_interface (ireadonlylist_class, "IReadOnlyCollection`1") : -1;
-                       ilist_offset = find_interface_offset (num_ifaces, interfaces_full, interface_offsets_full, klass->interfaces [ilist_iface_idx]);
-                       icollection_offset = find_interface_offset (num_ifaces, interfaces_full, interface_offsets_full, ilist_class->interfaces [icollection_iface_idx]);
-                       ienumerable_offset = find_interface_offset (num_ifaces, interfaces_full, interface_offsets_full, ilist_class->interfaces [ienumerable_iface_idx]);
-                       ireadonlylist_offset = ireadonlylist_iface_idx != -1 ? find_interface_offset (num_ifaces, interfaces_full, interface_offsets_full, klass->interfaces [ireadonlylist_iface_idx]) : -1;
-                       ireadonlycollection_offset = ireadonlycollection_iface_idx != -1 ? find_interface_offset (num_ifaces, interfaces_full, interface_offsets_full, ireadonlylist_class->interfaces [ireadonlycollection_iface_idx]) : -1;
-                       g_assert (ilist_offset >= 0 && icollection_offset >= 0 && ienumerable_offset >= 0);
-                       for (i = 0; i < num_array_interfaces; ++i) {
-                               int offset;
-                               ic = array_interfaces [i];
-                               if (mono_class_get_generic_class (ic)->container_class == mono_defaults.generic_ilist_class)
-                                       offset = ilist_offset;
-                               else if (strcmp (ic->name, "ICollection`1") == 0)
-                                       offset = icollection_offset;
-                               else if (strcmp (ic->name, "IEnumerable`1") == 0)
-                                       offset = ienumerable_offset;
-                               else if (strcmp (ic->name, "IReadOnlyList`1") == 0)
-                                       offset = ireadonlylist_offset;
-                               else if (strcmp (ic->name, "IReadOnlyCollection`1") == 0)
-                                       offset = ireadonlycollection_offset;
-                               else
-                                       g_assert_not_reached ();
-                               set_interface_and_offset (num_ifaces, interfaces_full, interface_offsets_full, ic, offset, TRUE);
-                               /*g_print ("type %s has %s offset at %d (%s)\n", klass->name, ic->name, offset, klass->interfaces [0]->name);*/
-                       }
-               }
-       }
-
        for (interface_offsets_count = 0, i = 0; i < num_ifaces; i++) {
                if (interface_offsets_full [i] != -1)
                        interface_offsets_count ++;
@@ -3779,8 +3480,6 @@ setup_interface_offsets (MonoClass *klass, int cur_slot, gboolean overwrite)
                        bitmap [id >> 3] |= (1 << (id & 7));
                        klass->interfaces_packed [i] = interfaces_full [i];
                        klass->interface_offsets_packed [i] = interface_offsets_full [i];
-                       /*if (num_array_interfaces)
-                         g_print ("type %s has %s offset at %d\n", mono_type_get_name_full (&klass->byval_arg, 0), mono_type_get_name_full (&interfaces_full [i]->byval_arg, 0), interface_offsets_full [i]);*/
                }
 #ifdef COMPRESSED_INTERFACE_BITMAP
                i = mono_compress_bitmap (NULL, bitmap, bsize);
@@ -3796,7 +3495,6 @@ end:
 
        g_free (interfaces_full);
        g_free (interface_offsets_full);
-       g_free (array_interfaces);
        for (i = 0; i < klass->idepth; i++) {
                ifaces = ifaces_array [i];
                if (ifaces)
@@ -5588,8 +5286,22 @@ mono_class_setup_mono_type (MonoClass *klass)
                klass->this_arg.type = (MonoTypeEnum)t;
        }
 
-       if (MONO_CLASS_IS_INTERFACE (klass))
+       if (MONO_CLASS_IS_INTERFACE (klass)) {
                klass->interface_id = mono_get_unique_iid (klass);
+
+               if (is_corlib && !strcmp (nspace, "System.Collections.Generic")) {
+                       //FIXME IEnumerator needs to be special because GetEnumerator uses magic under the hood
+                   /* FIXME: System.Array/InternalEnumerator don't need all this interface fabrication machinery.
+                   * MS returns diferrent types based on which instance is called. For example:
+                   *   object obj = new byte[10][];
+                   *   Type a = ((IEnumerable<byte[]>)obj).GetEnumerator ().GetType ();
+                   *   Type b = ((IEnumerable<IList<byte>>)obj).GetEnumerator ().GetType ();
+                   *   a != b ==> true
+                       */
+                       if (!strcmp (name, "IList`1") || !strcmp (name, "ICollection`1") || !strcmp (name, "IEnumerable`1") || !strcmp (name, "IEnumerator`1"))
+                               klass->is_array_special_interface = 1;
+               }
+       }
 }
 
 #ifndef DISABLE_COM
@@ -5928,6 +5640,42 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
 #endif
 
        klass->cast_class = klass->element_class = klass;
+       if (mono_is_corlib_image (klass->image)) {
+               switch (klass->byval_arg.type) {
+                       case MONO_TYPE_I1:
+                               if (mono_defaults.byte_class)
+                                       klass->cast_class = mono_defaults.byte_class;
+                               break;
+                       case MONO_TYPE_U1:
+                               if (mono_defaults.sbyte_class)
+                                       mono_defaults.sbyte_class = klass;
+                               break;
+                       case MONO_TYPE_I2:
+                               if (mono_defaults.uint16_class)
+                                       mono_defaults.uint16_class = klass;
+                               break;
+                       case MONO_TYPE_U2:
+                               if (mono_defaults.int16_class)
+                                       klass->cast_class = mono_defaults.int16_class;
+                               break;
+                       case MONO_TYPE_I4:
+                               if (mono_defaults.uint32_class)
+                                       mono_defaults.uint32_class = klass;
+                               break;
+                       case MONO_TYPE_U4:
+                               if (mono_defaults.int32_class)
+                                       klass->cast_class = mono_defaults.int32_class;
+                               break;
+                       case MONO_TYPE_I8:
+                               if (mono_defaults.uint64_class)
+                                       mono_defaults.uint64_class = klass;
+                               break;
+                       case MONO_TYPE_U8:
+                               if (mono_defaults.int64_class)
+                                       klass->cast_class = mono_defaults.int64_class;
+                               break;
+               }
+       }
 
        if (!klass->enumtype) {
                if (!mono_metadata_interfaces_from_typedef_full (
@@ -6110,12 +5858,14 @@ mono_generic_class_get_class (MonoGenericClass *gclass)
        klass->enumtype = gklass->enumtype;
        klass->valuetype = gklass->valuetype;
 
+
        if (gklass->image->assembly_name && !strcmp (gklass->image->assembly_name, "System.Numerics.Vectors") && !strcmp (gklass->name_space, "System.Numerics") && !strcmp (gklass->name, "Vector`1")) {
                g_assert (gclass->context.class_inst);
                g_assert (gclass->context.class_inst->type_argc > 0);
                if (mono_type_is_primitive (gclass->context.class_inst->type_argv [0]))
                        klass->simd_type = 1;
        }
+       klass->is_array_special_interface = gklass->is_array_special_interface;
 
        klass->cast_class = klass->element_class = klass;
 
@@ -7208,28 +6958,20 @@ mono_class_get_field_default_value (MonoClassField *field, MonoTypeEnum *def_typ
        guint32 constant_cols [MONO_CONSTANT_SIZE];
        int field_index;
        MonoClass *klass = field->parent;
+       MonoFieldDefaultValue *def_values;
 
        g_assert (field->type->attrs & FIELD_ATTRIBUTE_HAS_DEFAULT);
 
-       MonoClassExt *ext = mono_class_get_ext (klass);
-       if (!ext || !ext->field_def_values) {
-               MonoFieldDefaultValue *def_values;
-
-               mono_class_alloc_ext (klass);
-               ext = mono_class_get_ext (klass);
-
+       def_values = mono_class_get_field_def_values (klass);
+       if (!def_values) {
                def_values = (MonoFieldDefaultValue *)mono_class_alloc0 (klass, sizeof (MonoFieldDefaultValue) * mono_class_get_field_count (klass));
 
-               mono_image_lock (klass->image);
-               mono_memory_barrier ();
-               if (!ext->field_def_values)
-                       ext->field_def_values = def_values;
-               mono_image_unlock (klass->image);
+               mono_class_set_field_def_values (klass, def_values);
        }
 
        field_index = mono_field_get_index (field);
                
-       if (!ext->field_def_values [field_index].data) {
+       if (!def_values [field_index].data) {
                cindex = mono_metadata_get_constant_index (field->parent->image, mono_class_get_field_token (field), 0);
                if (!cindex)
                        return NULL;
@@ -7237,21 +6979,22 @@ mono_class_get_field_default_value (MonoClassField *field, MonoTypeEnum *def_typ
                g_assert (!(field->type->attrs & FIELD_ATTRIBUTE_HAS_FIELD_RVA));
 
                mono_metadata_decode_row (&field->parent->image->tables [MONO_TABLE_CONSTANT], cindex - 1, constant_cols, MONO_CONSTANT_SIZE);
-               ext->field_def_values [field_index].def_type = (MonoTypeEnum)constant_cols [MONO_CONSTANT_TYPE];
-               ext->field_def_values [field_index].data = (const char *)mono_metadata_blob_heap (field->parent->image, constant_cols [MONO_CONSTANT_VALUE]);
+               def_values [field_index].def_type = (MonoTypeEnum)constant_cols [MONO_CONSTANT_TYPE];
+               mono_memory_barrier ();
+               def_values [field_index].data = (const char *)mono_metadata_blob_heap (field->parent->image, constant_cols [MONO_CONSTANT_VALUE]);
        }
 
-       *def_type = ext->field_def_values [field_index].def_type;
-       return ext->field_def_values [field_index].data;
+       *def_type = def_values [field_index].def_type;
+       return def_values [field_index].data;
 }
 
 static int
 mono_property_get_index (MonoProperty *prop)
 {
-       MonoClassExt *ext = mono_class_get_ext (prop->parent);
-       int index = prop - ext->properties;
+       MonoClassPropertyInfo *info = mono_class_get_property_info (prop->parent);
+       int index = prop - info->properties;
 
-       g_assert (index >= 0 && index < ext->property.count);
+       g_assert (index >= 0 && index < info->count);
 
        return index;
 }
@@ -7276,11 +7019,11 @@ mono_class_get_property_default_value (MonoProperty *property, MonoTypeEnum *def
         */
 
        if (image_is_dynamic (klass->image)) {
-               MonoClassExt *ext = mono_class_get_ext (klass);
+               MonoClassPropertyInfo *info = mono_class_get_property_info (klass);
                int prop_index = mono_property_get_index (property);
-               if (ext->prop_def_values && ext->prop_def_values [prop_index].data) {
-                       *def_type = ext->prop_def_values [prop_index].def_type;
-                       return ext->prop_def_values [prop_index].data;
+               if (info->def_values && info->def_values [prop_index].data) {
+                       *def_type = info->def_values [prop_index].def_type;
+                       return info->def_values [prop_index].data;
                }
                return NULL;
        }
@@ -7300,11 +7043,11 @@ mono_class_get_event_token (MonoEvent *event)
        int i;
 
        while (klass) {
-               MonoClassExt *ext = mono_class_get_ext (klass);
-               if (ext) {
-                       for (i = 0; i < ext->event.count; ++i) {
-                               if (&ext->events [i] == event)
-                                       return mono_metadata_make_token (MONO_TABLE_EVENT, ext->event.first + i + 1);
+               MonoClassEventInfo *info = mono_class_get_event_info (klass);
+               if (info) {
+                       for (i = 0; i < info->count; ++i) {
+                               if (&info->events [i] == event)
+                                       return mono_metadata_make_token (MONO_TABLE_EVENT, info->first + i + 1);
                        }
                }
                klass = klass->parent;
@@ -7352,10 +7095,10 @@ mono_class_get_property_token (MonoProperty *prop)
                MonoProperty* p;
                int i = 0;
                gpointer iter = NULL;
-               MonoClassExt *ext = mono_class_get_ext (klass);
+               MonoClassPropertyInfo *info = mono_class_get_property_info (klass);
                while ((p = mono_class_get_properties (klass, &iter))) {
-                       if (&ext->properties [i] == prop)
-                               return mono_metadata_make_token (MONO_TABLE_PROPERTY, ext->property.first + i + 1);
+                       if (&info->properties [i] == prop)
+                               return mono_metadata_make_token (MONO_TABLE_PROPERTY, info->first + i + 1);
                        
                        i ++;
                }
@@ -8470,6 +8213,23 @@ mono_class_is_assignable_from (MonoClass *klass, MonoClass *oklass)
                if (MONO_CLASS_IMPLEMENTS_INTERFACE (oklass, klass->interface_id))
                        return TRUE;
 
+               if (klass->is_array_special_interface && oklass->rank == 1) {
+                       //XXX we could offset this by having the cast target computed at JIT time
+                       //XXX we could go even further and emit a wrapper that would do the extra type check
+                       MonoClass *iface_klass = mono_class_from_mono_type (mono_class_get_generic_class (klass)->context.class_inst->type_argv [0]);
+                       MonoClass *obj_klass = oklass->cast_class; //This gets us the cast class of element type of the array
+
+                       // If the target we're trying to cast to is a valuetype, we must account of weird valuetype equivalences such as IntEnum <> int or uint <> int
+                       // We can't apply it for ref types as this would go wrong with arrays - IList<byte[]> would have byte tested
+                       if (iface_klass->valuetype)
+                               iface_klass = iface_klass->cast_class;
+
+                       //array covariant casts only operates on scalar to scalar
+                       //This is so int[] can't be casted to IComparable<int>[]
+                       if (!(obj_klass->valuetype && !iface_klass->valuetype) && mono_class_is_assignable_from (iface_klass, obj_klass))
+                               return TRUE;
+               }
+
                if (mono_class_has_variant_generic_params (klass)) {
                        int i;
                        mono_class_setup_interfaces (oklass, &error);
@@ -9199,7 +8959,7 @@ mono_class_num_properties (MonoClass *klass)
 {
        mono_class_setup_properties (klass);
 
-       return mono_class_get_ext (klass)->property.count;
+       return mono_class_get_property_info (klass)->count;
 }
 
 /**
@@ -9213,7 +8973,7 @@ mono_class_num_events (MonoClass *klass)
 {
        mono_class_setup_events (klass);
 
-       return mono_class_get_ext (klass)->event.count;
+       return mono_class_get_event_info (klass)->count;
 }
 
 /**
@@ -9398,10 +9158,10 @@ mono_class_get_properties (MonoClass* klass, gpointer *iter)
                return NULL;
        if (!*iter) {
                mono_class_setup_properties (klass);
-               MonoClassExt *ext = mono_class_get_ext (klass);
+               MonoClassPropertyInfo *info = mono_class_get_property_info (klass);
                /* start from the first */
-               if (ext->property.count) {
-                       *iter = &ext->properties [0];
+               if (info->count) {
+                       *iter = &info->properties [0];
                        return (MonoProperty *)*iter;
                } else {
                        /* no fields */
@@ -9410,8 +9170,8 @@ mono_class_get_properties (MonoClass* klass, gpointer *iter)
        }
        property = (MonoProperty *)*iter;
        property++;
-       MonoClassExt *ext = mono_class_get_ext (klass);
-       if (property < &ext->properties [ext->property.count]) {
+       MonoClassPropertyInfo *info = mono_class_get_property_info (klass);
+       if (property < &info->properties [info->count]) {
                *iter = property;
                return (MonoProperty *)*iter;
        }
@@ -9438,10 +9198,10 @@ mono_class_get_events (MonoClass* klass, gpointer *iter)
                return NULL;
        if (!*iter) {
                mono_class_setup_events (klass);
-               MonoClassExt *ext = mono_class_get_ext (klass);
+               MonoClassEventInfo *info = mono_class_get_event_info (klass);
                /* start from the first */
-               if (ext->event.count) {
-                       *iter = &ext->events [0];
+               if (info->count) {
+                       *iter = &info->events [0];
                        return (MonoEvent *)*iter;
                } else {
                        /* no fields */
@@ -9450,8 +9210,8 @@ mono_class_get_events (MonoClass* klass, gpointer *iter)
        }
        event = (MonoEvent *)*iter;
        event++;
-       MonoClassExt *ext = mono_class_get_ext (klass);
-       if (event < &ext->events [ext->event.count]) {
+       MonoClassEventInfo *info = mono_class_get_event_info (klass);
+       if (event < &info->events [info->count]) {
                *iter = event;
                return (MonoEvent *)*iter;
        }
@@ -9538,23 +9298,18 @@ setup_nested_types (MonoClass *klass)
                i = mono_metadata_nesting_typedef (klass->image, klass->type_token, i + 1);
        }
 
-       mono_class_alloc_ext (klass);
-
        nested_classes = NULL;
        for (l = classes; l; l = l->next)
                nested_classes = g_list_prepend_image (klass->image, nested_classes, l->data);
        g_list_free (classes);
 
-       mono_image_lock (klass->image);
-
-       mono_memory_barrier ();
+       mono_loader_lock ();
        if (!klass->nested_classes_inited) {
-               mono_class_get_ext (klass)->nested_classes = nested_classes;
+               mono_class_set_nested_classes_property (klass, nested_classes);
                mono_memory_barrier ();
                klass->nested_classes_inited = TRUE;
        }
-
-       mono_image_unlock (klass->image);
+       mono_loader_unlock ();
 }
 
 /**
@@ -9581,11 +9336,11 @@ mono_class_get_nested_types (MonoClass* klass, gpointer *iter)
                setup_nested_types (klass);
 
        if (!*iter) {
-               MonoClassExt *ext = mono_class_get_ext (klass);
+               GList *nested_classes = mono_class_get_nested_classes_property (klass);
                /* start from the first */
-               if (ext && ext->nested_classes) {
-                       *iter = ext->nested_classes;
-                       return (MonoClass *)ext->nested_classes->data;
+               if (nested_classes) {
+                       *iter = nested_classes;
+                       return (MonoClass *)nested_classes->data;
                } else {
                        /* no nested types */
                        return NULL;
@@ -9720,34 +9475,28 @@ mono_field_get_rva (MonoClassField *field)
        guint32 rva;
        int field_index;
        MonoClass *klass = field->parent;
-       MonoFieldDefaultValue *field_def_values;
+       MonoFieldDefaultValue *def_values;
 
        g_assert (field->type->attrs & FIELD_ATTRIBUTE_HAS_FIELD_RVA);
 
-       MonoClassExt *ext = mono_class_get_ext (klass);
-       if (!ext || !ext->field_def_values) {
-               mono_class_alloc_ext (klass);
-               ext = mono_class_get_ext (klass);
-
-               field_def_values = (MonoFieldDefaultValue *)mono_class_alloc0 (klass, sizeof (MonoFieldDefaultValue) * mono_class_get_field_count (klass));
+       def_values = mono_class_get_field_def_values (klass);
+       if (!def_values) {
+               def_values = (MonoFieldDefaultValue *)mono_class_alloc0 (klass, sizeof (MonoFieldDefaultValue) * mono_class_get_field_count (klass));
 
-               mono_image_lock (klass->image);
-               if (!ext->field_def_values)
-                       ext->field_def_values = field_def_values;
-               mono_image_unlock (klass->image);
+               mono_class_set_field_def_values (klass, def_values);
        }
 
        field_index = mono_field_get_index (field);
                
-       if (!ext->field_def_values [field_index].data && !image_is_dynamic (klass->image)) {
+       if (!def_values [field_index].data && !image_is_dynamic (klass->image)) {
                int first_field_idx = mono_class_get_first_field_idx (klass);
                mono_metadata_field_info (field->parent->image, first_field_idx + field_index, NULL, &rva, NULL);
                if (!rva)
                        g_warning ("field %s in %s should have RVA data, but hasn't", mono_field_get_name (field), field->parent->name);
-               ext->field_def_values [field_index].data = mono_image_rva_map (field->parent->image, rva);
+               def_values [field_index].data = mono_image_rva_map (field->parent->image, rva);
        }
 
-       return ext->field_def_values [field_index].data;
+       return def_values [field_index].data;
 }
 
 /**
@@ -10046,7 +9795,7 @@ mono_class_set_failure (MonoClass *klass, MonoErrorBoxed *boxed_error)
 
        mono_loader_lock ();
        klass->has_failure = 1;
-       mono_image_property_insert (klass->image, klass, MONO_CLASS_PROP_EXCEPTION_DATA, boxed_error);
+       mono_class_set_exception_data (klass, boxed_error);
        mono_loader_unlock ();
 
        return TRUE;
@@ -10093,19 +9842,6 @@ mono_class_set_type_load_failure (MonoClass *klass, const char * fmt, ...)
        return mono_class_set_failure (klass, box);
 }
 
-/*
- * mono_class_get_exception_data:
- *
- *   Return the exception_data property of KLASS.
- *
- * LOCKING: Acquires the loader lock.
- */
-static gpointer
-mono_class_get_exception_data (const MonoClass *klass)
-{
-       return mono_image_property_lookup (klass->image, (MonoClass*)klass, MONO_CLASS_PROP_EXCEPTION_DATA);
-}
-
 /**
  * mono_classes_init:
  *
@@ -10137,11 +9873,6 @@ mono_classes_init (void)
                                                        MONO_COUNTER_GENERICS | MONO_COUNTER_INT, &inflated_classes_size);
        mono_counters_register ("MonoClass size",
                                                        MONO_COUNTER_METADATA | MONO_COUNTER_INT, &classes_size);
-       mono_counters_register ("MonoClassExt size",
-                                                       MONO_COUNTER_METADATA | MONO_COUNTER_INT, &class_ext_size);
-
-       mono_counters_register ("MonoClassExt count",
-                                                       MONO_COUNTER_METADATA | MONO_COUNTER_INT, &class_ext_count);
 }
 
 /**
@@ -10710,29 +10441,6 @@ mono_class_setup_interface_id (MonoClass *klass)
        mono_loader_unlock ();
 }
 
-/*
- * mono_class_alloc_ext:
- *
- *   Allocate klass->ext if not already done.
- */
-void
-mono_class_alloc_ext (MonoClass *klass)
-{
-       MonoClassExt *ext;
-
-       if (mono_class_get_ext (klass))
-               return;
-
-       ext = (MonoClassExt *)mono_class_alloc0 (klass, sizeof (MonoClassExt));
-       mono_image_lock (klass->image);
-       mono_memory_barrier ();
-       if (!mono_class_get_ext (klass))
-               mono_class_set_ext (klass, ext);
-       class_ext_size += sizeof (MonoClassExt);
-       ++class_ext_count;
-       mono_image_unlock (klass->image);
-}
-
 /*
  * mono_class_setup_interfaces:
  *
index 8e56148ab1cb8fd8994f2233b11deb542b1df47d..a290bce42da2c6f9fb0761633426b6fd997cfe7c 100644 (file)
@@ -132,13 +132,14 @@ find_field_index (MonoClass *klass, MonoClassField *field) {
  * Find the property index in the metadata Property table.
  */
 static guint32
-find_property_index (MonoClass *klass, MonoProperty *property) {
+find_property_index (MonoClass *klass, MonoProperty *property)
+{
        int i;
-       MonoClassExt *ext = mono_class_get_ext (klass);
+       MonoClassPropertyInfo *info = mono_class_get_property_info (klass);
 
-       for (i = 0; i < ext->property.count; ++i) {
-               if (property == &ext->properties [i])
-                       return ext->property.first + 1 + i;
+       for (i = 0; i < info->count; ++i) {
+               if (property == &info->properties [i])
+                       return info->first + 1 + i;
        }
        return 0;
 }
@@ -147,13 +148,14 @@ find_property_index (MonoClass *klass, MonoProperty *property) {
  * Find the event index in the metadata Event table.
  */
 static guint32
-find_event_index (MonoClass *klass, MonoEvent *event) {
+find_event_index (MonoClass *klass, MonoEvent *event)
+{
        int i;
-       MonoClassExt *ext = mono_class_get_ext (klass);
+       MonoClassEventInfo *info = mono_class_get_event_info (klass);
 
-       for (i = 0; i < ext->event.count; ++i) {
-               if (event == &ext->events [i])
-                       return ext->event.first + 1 + i;
+       for (i = 0; i < info->count; ++i) {
+               if (event == &info->events [i])
+                       return info->first + 1 + i;
        }
        return 0;
 }
index 831ea1dd40d67960c9e1fbd3115c395ccf1c7207..8ad0c616b962a609932579699f018406426b7dff 100644 (file)
@@ -998,6 +998,10 @@ ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_SufficientExecutionStac
        // .net seems to check that at least 50% of stack is available
        min_size = thread->stack_size / 2;
 
+       // TODO: It's not always set
+       if (!min_size)
+               return TRUE;
+
        current = (guint8 *)&stack_addr;
        if (current > stack_addr) {
                if ((current - stack_addr) < min_size)
@@ -2087,12 +2091,11 @@ ves_icall_MonoField_GetRawConstantValue (MonoReflectionField *rfield)
        if (image_is_dynamic (field->parent->image)) {
                MonoClass *klass = field->parent;
                int fidx = field - klass->fields;
-               MonoClassExt *ext = mono_class_get_ext (klass);
+               MonoFieldDefaultValue *def_values = mono_class_get_field_def_values (klass);
 
-               g_assert (ext);
-               g_assert (ext->field_def_values);
-               def_type = ext->field_def_values [fidx].def_type;
-               def_value = ext->field_def_values [fidx].data;
+               g_assert (def_values);
+               def_type = def_values [fidx].def_type;
+               def_value = def_values [fidx].data;
 
                if (def_type == MONO_TYPE_END) {
                        mono_set_pending_exception (mono_get_exception_invalid_operation (NULL));
index 973c4ca8bf3fd71660817db7391b2c5c30fa107f..86fea9155ce42b9337bff38ad9c0a12823d1043e 100644 (file)
@@ -6634,8 +6634,8 @@ mono_metadata_get_corresponding_event_from_generic_type_definition (MonoEvent *e
                return event;
 
        gtd = mono_class_get_generic_class (event->parent)->container_class;
-       offset = event - mono_class_get_ext (event->parent)->events;
-       return mono_class_get_ext (gtd)->events + offset;
+       offset = event - mono_class_get_event_info (event->parent)->events;
+       return mono_class_get_event_info (gtd)->events + offset;
 }
 
 /*
@@ -6645,15 +6645,17 @@ mono_metadata_get_corresponding_event_from_generic_type_definition (MonoEvent *e
 MonoProperty*
 mono_metadata_get_corresponding_property_from_generic_type_definition (MonoProperty *property)
 {
+       MonoClassPropertyInfo *info;
        MonoClass *gtd;
        int offset;
 
        if (!mono_class_is_ginst (property->parent))
                return property;
 
+       info = mono_class_get_property_info (property->parent);
        gtd = mono_class_get_generic_class (property->parent)->container_class;
-       offset = property - mono_class_get_ext (property->parent)->properties;
-       return mono_class_get_ext (gtd)->properties + offset;
+       offset = property - info->properties;
+       return mono_class_get_property_info (gtd)->properties + offset;
 }
 
 MonoWrapperCaches*
index 04f167987a03f1451cbd212a34d74a49cd72828d..581ceeb2eca916502828e914fe12d10f33a51643 100644 (file)
@@ -603,6 +603,8 @@ typedef struct {
        gboolean (*mono_exception_walk_trace) (MonoException *ex, MonoInternalExceptionFrameWalk func, gpointer user_data);
        gboolean (*mono_install_handler_block_guard) (MonoThreadUnwindState *unwind_state);
        gboolean (*mono_current_thread_has_handle_block_guard) (void);
+       gboolean (*mono_above_abort_threshold) (void);
+       void (*mono_clear_abort_threshold) (void);
 } MonoRuntimeExceptionHandlingCallbacks;
 
 MONO_COLD void mono_set_pending_exception (MonoException *exc);
index c0a600ef960f43d4e4e189fa67a62c96aa490f6d..a2b28ad4f0d6ba4fcbc9850f02323f13b7c7930e 100644 (file)
@@ -75,6 +75,7 @@ static GENERATE_GET_CLASS_WITH_CACHE (activation_services, System.Runtime.Remoti
 #define ldstr_unlock() mono_os_mutex_unlock (&ldstr_section)
 static mono_mutex_t ldstr_section;
 
+
 /**
  * mono_runtime_object_init:
  * @this_obj: the object to initialize
@@ -6489,8 +6490,14 @@ mono_object_isinst_mbyref_checked (MonoObject *obj, MonoClass *klass, MonoError
                        return obj;
                }
 
+               /* casting an array one of the invariant interfaces that must act as such */
+               if (klass->is_array_special_interface) {
+                       if (mono_class_is_assignable_from (klass, vt->klass))
+                               return obj;
+               }
+
                /*If the above check fails we are in the slow path of possibly raising an exception. So it's ok to it this way.*/
-               if (mono_class_has_variant_generic_params (klass) && mono_class_is_assignable_from (klass, obj->vtable->klass))
+               else if (mono_class_has_variant_generic_params (klass) && mono_class_is_assignable_from (klass, obj->vtable->klass))
                        return obj;
        } else {
                MonoClass *oklass = vt->klass;
index 28e81138065cf0cb3273ee14b4740dbb32455e20..c542daf2890eb1c9e5aa510942426a7f72ff6092 100644 (file)
 #include <mono/utils/atomic.h>
 #include <mono/utils/mono-membar.h>
 
+/*
+ * mono_property_bag_get:
+ *
+ *   Return the value of the property with TAG or NULL.
+ * This doesn't take any locks.
+ */
 void*
 mono_property_bag_get (MonoPropertyBag *bag, int tag)
 {
@@ -23,6 +29,15 @@ mono_property_bag_get (MonoPropertyBag *bag, int tag)
        return NULL;
 }
 
+/*
+ * mono_property_bag_add:
+ *
+ *   Store VALUE in the property bag. Return the previous value
+ * with the same tag, or NULL. VALUE should point to a structure
+ * extending the MonoPropertyBagItem structure with the 'tag'
+ * field set.
+ * This doesn't take any locks.
+ */
 void*
 mono_property_bag_add (MonoPropertyBag *bag, void *value)
 {
index 2309d0447405dfd438216955bc3e22529c768cd6..3e42a8e4a6720cb305c4fa19295f137e3c2328fd 100644 (file)
@@ -768,10 +768,29 @@ mono_get_reflection_missing_object (MonoDomain *domain)
 }
 
 static MonoObject*
-get_dbnull (MonoDomain *domain, MonoObject **dbnull)
+get_dbnull_object (MonoDomain *domain, MonoError *error)
 {
+       MonoObject *obj;
+       static MonoClassField *dbnull_value_field = NULL;
+
+       mono_error_init (error);
+
+       if (!dbnull_value_field) {
+               MonoClass *dbnull_klass;
+               dbnull_klass = mono_class_get_dbnull_class ();
+               dbnull_value_field = mono_class_get_field_from_name (dbnull_klass, "Value");
+               g_assert (dbnull_value_field);
+       }
+       obj = mono_field_get_value_object_checked (domain, dbnull_value_field, NULL, error);
+       return obj;
+}
+
+static MonoObject*
+get_dbnull (MonoDomain *domain, MonoObject **dbnull, MonoError *error)
+{
+       mono_error_init (error);
        if (!*dbnull)
-               *dbnull = mono_get_dbnull_object (domain);
+               *dbnull = get_dbnull_object (domain, error);
        return *dbnull;
 }
 
@@ -879,7 +898,9 @@ mono_param_get_objects_internal (MonoDomain *domain, MonoMethod *method, MonoCla
                        if (param->AttrsImpl & PARAM_ATTRIBUTE_OPTIONAL)
                                MONO_OBJECT_SETREF (param, DefaultValueImpl, get_reflection_missing (domain, &missing));
                        else
-                               MONO_OBJECT_SETREF (param, DefaultValueImpl, get_dbnull (domain, &dbnull));
+                               MONO_OBJECT_SETREF (param, DefaultValueImpl, get_dbnull (domain, &dbnull, error));
+                       if (!is_ok (error))
+                               goto leave;
                } else {
 
                        if (!blobs) {
@@ -913,9 +934,10 @@ mono_param_get_objects_internal (MonoDomain *domain, MonoMethod *method, MonoCla
                                if (param->AttrsImpl & PARAM_ATTRIBUTE_OPTIONAL)
                                        MONO_OBJECT_SETREF (param, DefaultValueImpl, get_reflection_missing (domain, &missing));
                                else
-                                       MONO_OBJECT_SETREF (param, DefaultValueImpl, get_dbnull (domain, &dbnull));
+                                       MONO_OBJECT_SETREF (param, DefaultValueImpl, get_dbnull (domain, &dbnull, error));
+                               if (!is_ok (error))
+                                       goto leave;
                        }
-                       
                }
 
                if (mspecs [i + 1]) {
@@ -1123,15 +1145,8 @@ mono_get_dbnull_object (MonoDomain *domain)
 {
        MonoError error;
        MonoObject *obj;
-       static MonoClassField *dbnull_value_field = NULL;
-       
-       if (!dbnull_value_field) {
-               MonoClass *dbnull_klass;
-               dbnull_klass = mono_class_get_dbnull_class ();
-               dbnull_value_field = mono_class_get_field_from_name (dbnull_klass, "Value");
-               g_assert (dbnull_value_field);
-       }
-       obj = mono_field_get_value_object_checked (domain, dbnull_value_field, NULL, &error);
+
+       obj = get_dbnull_object (domain, &error);
        mono_error_assert_ok (&error);
        return obj;
 }
@@ -2379,21 +2394,19 @@ guint32
 mono_declsec_flags_from_class (MonoClass *klass)
 {
        if (mono_class_get_flags (klass) & TYPE_ATTRIBUTE_HAS_SECURITY) {
-               MonoClassExt *ext = mono_class_get_ext (klass);
-               if (!ext || !ext->declsec_flags) {
+               guint32 flags = mono_class_get_declsec_flags (klass);
+
+               if (!flags) {
                        guint32 idx;
 
                        idx = mono_metadata_token_index (klass->type_token);
                        idx <<= MONO_HAS_DECL_SECURITY_BITS;
                        idx |= MONO_HAS_DECL_SECURITY_TYPEDEF;
-                       mono_loader_lock ();
-                       mono_class_alloc_ext (klass);
-                       ext = mono_class_get_ext (klass);
-                       mono_loader_unlock ();
+                       flags = mono_declsec_get_flags (klass->image, idx);
                        /* we cache the flags on classes */
-                       ext->declsec_flags = mono_declsec_get_flags (klass->image, idx);
+                       mono_class_set_declsec_flags (klass, flags);
                }
-               return ext->declsec_flags;
+               return flags;
        }
        return 0;
 }
index b52ff6c6df9543e60c7386f0af3b70cc829f9840..0c898b2ec94905f4441723e36f6311151551c489 100644 (file)
@@ -1217,13 +1217,10 @@ mono_image_fill_export_table_from_class (MonoDomain *domain, MonoClass *klass,
        table->next_idx ++;
 
        /* Emit nested types */
-       MonoClassExt *ext = mono_class_get_ext (klass);
-       if (ext && ext->nested_classes) {
-               GList *tmp;
-
-               for (tmp = ext->nested_classes; tmp; tmp = tmp->next)
-                       mono_image_fill_export_table_from_class (domain, (MonoClass *)tmp->data, module_index, table->next_idx - 1, assembly);
-       }
+       GList *nested_classes = mono_class_get_nested_classes_property (klass);
+       GList *tmp;
+       for (tmp = nested_classes; tmp; tmp = tmp->next)
+               mono_image_fill_export_table_from_class (domain, (MonoClass *)tmp->data, module_index, table->next_idx - 1, assembly);
 
        return res;
 }
index 3d73c7561332b5efbf78b0ed01f3c6b7f1240560..7c2117a7a3eb1a13b097b658a3aa9cb48ccf6a43 100644 (file)
@@ -3190,7 +3190,7 @@ typebuilder_setup_fields (MonoClass *klass, MonoError *error)
        MonoReflectionTypeBuilder *tb = (MonoReflectionTypeBuilder *)mono_class_get_ref_info (klass);
        MonoReflectionFieldBuilder *fb;
        MonoClassField *field;
-       MonoClassExt *ext;
+       MonoFieldDefaultValue *def_values;
        MonoImage *image = klass->image;
        const char *p, *p2;
        int i, instance_size, packing_size = 0;
@@ -3215,9 +3215,8 @@ typebuilder_setup_fields (MonoClass *klass, MonoError *error)
        }
        
        klass->fields = image_g_new0 (image, MonoClassField, fcount);
-       mono_class_alloc_ext (klass);
-       ext = mono_class_get_ext (klass);
-       ext->field_def_values = image_g_new0 (image, MonoFieldDefaultValue, fcount);
+       def_values = image_g_new0 (image, MonoFieldDefaultValue, fcount);
+       mono_class_set_field_def_values (klass, def_values);
        /*
        This is, guess what, a hack.
        The issue is that the runtime doesn't know how to setup the fields of a typebuider and crash.
@@ -3250,7 +3249,7 @@ typebuilder_setup_fields (MonoClass *klass, MonoError *error)
                        size_t size = mono_array_length (rva_data);
                        char *data = (char *)mono_image_alloc (klass->image, size);
                        memcpy (data, base, size);
-                       ext->field_def_values [i].data = data;
+                       def_values [i].data = data;
                }
                if (fb->offset != -1)
                        field->offset = fb->offset;
@@ -3260,13 +3259,13 @@ typebuilder_setup_fields (MonoClass *klass, MonoError *error)
                if (fb->def_value) {
                        MonoDynamicImage *assembly = (MonoDynamicImage*)klass->image;
                        field->type->attrs |= FIELD_ATTRIBUTE_HAS_DEFAULT;
-                       idx = mono_dynimage_encode_constant (assembly, fb->def_value, &ext->field_def_values [i].def_type);
+                       idx = mono_dynimage_encode_constant (assembly, fb->def_value, &def_values [i].def_type);
                        /* Copy the data from the blob since it might get realloc-ed */
                        p = assembly->blob.data + idx;
                        len = mono_metadata_decode_blob_size (p, &p2);
                        len += p2 - p;
-                       ext->field_def_values [i].data = (const char *)mono_image_alloc (image, len);
-                       memcpy ((gpointer)ext->field_def_values [i].data, p, len);
+                       def_values [i].data = (const char *)mono_image_alloc (image, len);
+                       memcpy ((gpointer)def_values [i].data, p, len);
                }
        }
 
@@ -3280,21 +3279,23 @@ typebuilder_setup_properties (MonoClass *klass, MonoError *error)
        MonoReflectionPropertyBuilder *pb;
        MonoImage *image = klass->image;
        MonoProperty *properties;
-       MonoClassExt *ext;
+       MonoClassPropertyInfo *info;
        int i;
 
        mono_error_init (error);
 
-       ext = mono_class_get_ext (klass);
-       if (!ext)
-               mono_class_set_ext (klass, ext = image_g_new0 (image, MonoClassExt, 1));
+       info = mono_class_get_property_info (klass);
+       if (!info) {
+               info = mono_class_alloc0 (klass, sizeof (MonoClassPropertyInfo));
+               mono_class_set_property_info (klass, info);
+       }
 
-       ext->property.count = tb->properties ? mono_array_length (tb->properties) : 0;
-       ext->property.first = 0;
+       info->count = tb->properties ? mono_array_length (tb->properties) : 0;
+       info->first = 0;
 
-       properties = image_g_new0 (image, MonoProperty, ext->property.count);
-       ext->properties = properties;
-       for (i = 0; i < ext->property.count; ++i) {
+       properties = image_g_new0 (image, MonoProperty, info->count);
+       info->properties = properties;
+       for (i = 0; i < info->count; ++i) {
                pb = mono_array_get (tb->properties, MonoReflectionPropertyBuilder*, i);
                properties [i].parent = klass;
                properties [i].attrs = pb->attrs;
@@ -3311,16 +3312,16 @@ typebuilder_setup_properties (MonoClass *klass, MonoError *error)
                        guint32 len, idx;
                        const char *p, *p2;
                        MonoDynamicImage *assembly = (MonoDynamicImage*)klass->image;
-                       if (!ext->prop_def_values)
-                               ext->prop_def_values = image_g_new0 (image, MonoFieldDefaultValue, ext->property.count);
+                       if (!info->def_values)
+                               info->def_values = image_g_new0 (image, MonoFieldDefaultValue, info->count);
                        properties [i].attrs |= PROPERTY_ATTRIBUTE_HAS_DEFAULT;
-                       idx = mono_dynimage_encode_constant (assembly, pb->def_value, &ext->prop_def_values [i].def_type);
+                       idx = mono_dynimage_encode_constant (assembly, pb->def_value, &info->def_values [i].def_type);
                        /* Copy the data from the blob since it might get realloc-ed */
                        p = assembly->blob.data + idx;
                        len = mono_metadata_decode_blob_size (p, &p2);
                        len += p2 - p;
-                       ext->prop_def_values [i].data = (const char *)mono_image_alloc (image, len);
-                       memcpy ((gpointer)ext->prop_def_values [i].data, p, len);
+                       info->def_values [i].data = (const char *)mono_image_alloc (image, len);
+                       memcpy ((gpointer)info->def_values [i].data, p, len);
                }
        }
 }
@@ -3332,21 +3333,20 @@ typebuilder_setup_events (MonoClass *klass, MonoError *error)
        MonoReflectionEventBuilder *eb;
        MonoImage *image = klass->image;
        MonoEvent *events;
-       MonoClassExt *ext;
+       MonoClassEventInfo *info;
        int i;
 
        mono_error_init (error);
 
-       ext = mono_class_get_ext (klass);
-       if (!ext)
-               mono_class_set_ext (klass, ext = image_g_new0 (image, MonoClassExt, 1));
+       info = mono_class_alloc0 (klass, sizeof (MonoClassEventInfo));
+       mono_class_set_event_info (klass, info);
 
-       ext->event.count = tb->events ? mono_array_length (tb->events) : 0;
-       ext->event.first = 0;
+       info->count = tb->events ? mono_array_length (tb->events) : 0;
+       info->first = 0;
 
-       events = image_g_new0 (image, MonoEvent, ext->event.count);
-       ext->events = events;
-       for (i = 0; i < ext->event.count; ++i) {
+       events = image_g_new0 (image, MonoEvent, info->count);
+       info->events = events;
+       for (i = 0; i < info->count; ++i) {
                eb = mono_array_get (tb->events, MonoReflectionEventBuilder*, i);
                events [i].parent = klass;
                events [i].attrs = eb->attrs;
@@ -3462,9 +3462,9 @@ ves_icall_TypeBuilder_create_runtime_class (MonoReflectionTypeBuilder *tb)
                        goto failure;
 
        if (tb->subtypes) {
+               GList *nested = NULL;
                for (i = 0; i < mono_array_length (tb->subtypes); ++i) {
                        MonoReflectionTypeBuilder *subtb = mono_array_get (tb->subtypes, MonoReflectionTypeBuilder*, i);
-                       mono_class_alloc_ext (klass);
 
                        if (!subtb->type.type) {
                                reflection_setup_internal_class (subtb, &error);
@@ -3473,8 +3473,9 @@ ves_icall_TypeBuilder_create_runtime_class (MonoReflectionTypeBuilder *tb)
 
                        MonoType *subtype = mono_reflection_type_get_handle ((MonoReflectionType*)subtb, &error);
                        if (!is_ok (&error)) goto failure;
-                       mono_class_get_ext (klass)->nested_classes = g_list_prepend_image (klass->image, mono_class_get_ext (klass)->nested_classes, mono_class_from_mono_type (subtype));
+                       nested = g_list_prepend_image (klass->image, nested, mono_class_from_mono_type (subtype));
                }
+               mono_class_set_nested_classes_property (klass, nested);
        }
 
        klass->nested_classes_inited = TRUE;
index de2d69a375a8c160ef1f69f1a8b271bb4a9527f9..b0aad20a5c914e923ef9f208a00c1212332af85b 100644 (file)
@@ -2256,6 +2256,8 @@ ves_icall_System_Threading_Thread_ResetAbort (MonoThread *this_obj)
                mono_set_pending_exception (mono_get_exception_thread_state (msg));
                return;
        }
+
+       mono_get_eh_callbacks ()->mono_clear_abort_threshold ();
        thread->abort_exc = NULL;
        if (thread->abort_state_handle) {
                mono_gchandle_free (thread->abort_state_handle);
@@ -2273,6 +2275,7 @@ mono_thread_internal_reset_abort (MonoInternalThread *thread)
        thread->state &= ~ThreadState_AbortRequested;
 
        if (thread->abort_exc) {
+               mono_get_eh_callbacks ()->mono_clear_abort_threshold ();
                thread->abort_exc = NULL;
                if (thread->abort_state_handle) {
                        mono_gchandle_free (thread->abort_state_handle);
@@ -3833,17 +3836,22 @@ mono_thread_get_undeniable_exception (void)
 {
        MonoInternalThread *thread = mono_thread_internal_current ();
 
-       if (thread && thread->abort_exc && !is_running_protected_wrapper ()) {
-               /*
-                * FIXME: Clear the abort exception and return an AppDomainUnloaded 
-                * exception if the thread no longer references a dying appdomain.
-                */
-               thread->abort_exc->trace_ips = NULL;
-               thread->abort_exc->stack_trace = NULL;
-               return thread->abort_exc;
-       }
+       if (!(thread && thread->abort_exc && !is_running_protected_wrapper ()))
+               return NULL;
 
-       return NULL;
+       // We don't want to have our exception effect calls made by
+       // the catching block
+
+       if (!mono_get_eh_callbacks ()->mono_above_abort_threshold ())
+               return NULL;
+
+       /*
+        * FIXME: Clear the abort exception and return an AppDomainUnloaded 
+        * exception if the thread no longer references a dying appdomain.
+        */ 
+       thread->abort_exc->trace_ips = NULL;
+       thread->abort_exc->stack_trace = NULL;
+       return thread->abort_exc;
 }
 
 #if MONO_SMALL_CONFIG
index 46d7c4c2addd4bd6b0133276da3b5c07b8ce9c5a..0b387e6d2a48a617e3376fc15bc8acc38f7bd7a1 100644 (file)
@@ -710,7 +710,7 @@ gboolean
 mono_w32process_try_get_modules (gpointer process, gpointer *modules, guint32 size, guint32 *needed)
 {
        MonoW32HandleProcess *process_handle;
-       GSList *mods = NULL;
+       GSList *mods = NULL, *mods_iter;
        MonoW32ProcessModule *module;
        guint32 count, avail = size / sizeof(gpointer);
        int i;
@@ -758,10 +758,7 @@ mono_w32process_try_get_modules (gpointer process, gpointer *modules, guint32 si
                return TRUE;
        }
 
-       count = g_slist_length (mods);
-
-       /* count + 1 to leave slot 0 for the main module */
-       *needed = sizeof(gpointer) * (count + 1);
+       count = 0;
 
        /*
         * Use the NULL shortcut, as the first line in
@@ -772,19 +769,25 @@ mono_w32process_try_get_modules (gpointer process, gpointer *modules, guint32 si
         * be a problem.
         */
        modules[0] = NULL;
-       for (i = 0; i < (avail - 1) && i < count; i++) {
-               module = (MonoW32ProcessModule *)g_slist_nth_data (mods, i);
-               if (modules[0] != NULL)
-                       modules[i] = module->address_start;
-               else if (match_procname_to_modulename (proc_name, module->filename))
-                       modules[0] = module->address_start;
-               else
-                       modules[i + 1] = module->address_start;
+       mods_iter = mods;
+       for (i = 0; mods_iter; i++) {
+               if (i < avail - 1) {
+                       module = (MonoW32ProcessModule *)mods_iter->data;
+                       if (modules[0] != NULL)
+                               modules[i] = module->address_start;
+                       else if (match_procname_to_modulename (proc_name, module->filename))
+                               modules[0] = module->address_start;
+                       else
+                               modules[i + 1] = module->address_start;
+               }
+               mono_w32process_module_free ((MonoW32ProcessModule *)mods_iter->data);
+               mods_iter = g_slist_next (mods_iter);
+               count++;
        }
 
-       for (i = 0; i < count; i++) {
-               mono_w32process_module_free ((MonoW32ProcessModule *)g_slist_nth_data (mods, i));
-       }
+       /* count + 1 to leave slot 0 for the main module */
+       *needed = sizeof(gpointer) * (count + 1);
+
        g_slist_free (mods);
        g_free (proc_name);
 
@@ -843,10 +846,8 @@ mono_w32process_module_get_name (gpointer process, gpointer module, gunichar2 *b
        char *procname_ext = NULL;
        glong len;
        gsize bytes;
-       GSList *mods = NULL;
+       GSList *mods = NULL, *mods_iter;
        MonoW32ProcessModule *found_module;
-       guint32 count;
-       int i;
        char *proc_name = NULL;
        gboolean res;
 
@@ -879,14 +880,12 @@ mono_w32process_module_get_name (gpointer process, gpointer module, gunichar2 *b
                return 0;
        }
 
-       count = g_slist_length (mods);
-
        /* If module != NULL compare the address.
         * If module == NULL we are looking for the main module.
         * The best we can do for now check it the module name end with the process name.
         */
-       for (i = 0; i < count; i++) {
-               found_module = (MonoW32ProcessModule *)g_slist_nth_data (mods, i);
+       for (mods_iter = mods; mods_iter; mods_iter = g_slist_next (mods_iter)) {
+               found_module = (MonoW32ProcessModule *)mods_iter->data;
                if (procname_ext == NULL &&
                        ((module == NULL && match_procname_to_modulename (proc_name, found_module->filename)) ||
                         (module != NULL && found_module->address_start == module))) {
@@ -948,10 +947,8 @@ mono_w32process_module_get_information (gpointer process, gpointer module, WapiM
 {
        MonoW32HandleProcess *process_handle;
        pid_t pid;
-       GSList *mods = NULL;
+       GSList *mods = NULL, *mods_iter;
        MonoW32ProcessModule *found_module;
-       guint32 count;
-       int i;
        gboolean ret = FALSE;
        char *proc_name = NULL;
        gboolean res;
@@ -982,14 +979,12 @@ mono_w32process_module_get_information (gpointer process, gpointer module, WapiM
                return FALSE;
        }
 
-       count = g_slist_length (mods);
-
        /* If module != NULL compare the address.
         * If module == NULL we are looking for the main module.
         * The best we can do for now check it the module name end with the process name.
         */
-       for (i = 0; i < count; i++) {
-                       found_module = (MonoW32ProcessModule *)g_slist_nth_data (mods, i);
+       for (mods_iter = mods; mods_iter; mods_iter = g_slist_next (mods_iter)) {
+                       found_module = (MonoW32ProcessModule *)mods_iter->data;
                        if (ret == FALSE &&
                                ((module == NULL && match_procname_to_modulename (proc_name, found_module->filename)) ||
                                 (module != NULL && found_module->address_start == module))) {
index 8ca5c5c750ed640e8a3964c28a2889dc04a2e9a2..675e73ad650d5e3facc58a3c88be077f9094f4ce 100755 (executable)
@@ -48,7 +48,6 @@ RUNTIME_EXECUTABLE = $(if $(BOEHM),$(top_builddir)/mono/mini/mono-boehm,$(top_bu
 MINI_RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME_EXECUTABLE)
 RUNTIME_AOTCHECK = MONO_PATH="$(CLASS)$(PLATFORM_PATH_SEPARATOR)." $(RUNTIME_EXECUTABLE)
 
-CSC = $(mcs_topdir)/class/lib/build/mcs.exe
 MCS = CSC_SDK_PATH_DISABLED= $(MINI_RUNTIME) $(CSC) -unsafe -nowarn:0162 -nologo -noconfig -r:$(CLASS)/mscorlib.dll -r:$(CLASS)/System.dll -r:$(CLASS)/System.Core.dll
 ILASM = $(MINI_RUNTIME) $(CLASS)/ilasm.exe
 
index fdd7a10466f2b5f4cbd410f1723cfe5fba5b0dc0..639c52539709b1d228f866f5d7b5caae0a24cc8b 100644 (file)
@@ -13,10 +13,22 @@ public class CategoryAttribute : Attribute
                get; set;
        }
 }
+public class TestDriverReporter
+{
+       public int FailedTests { get; private set; }
+       public int SkippedTests { get; private set; }
+       public int ExecutedTests { get; private set; }
+
+       public void ReportResults (int executed, int skipped, int failed) {
+               ExecutedTests = executed;
+               SkippedTests = skipped;
+               FailedTests = failed;
+       }
+};
 
 public class TestDriver {
 
-       static public int RunTests (Type type, string[] args) {
+       static public int RunTests(Type type, string[] args, TestDriverReporter reporter) {
                int failed = 0, ran = 0;
                int result, expected;
                int i, j, iterations;
@@ -135,11 +147,20 @@ public class TestDriver {
                        }
                }
 
+               if (reporter != null) {
+                       reporter.ReportResults (ran, nskipped, failed);
+               }
+
                //Console.WriteLine ("Regression tests: {0} ran, {1} failed in [{2}]{3}", ran, failed, type.Assembly.GetName().Name, type);
                return failed;
        }
+
+       static public int RunTests (Type type, string[] args) {
+               return RunTests (type, args, null);
+       }
+
        static public int RunTests (Type type) {
-               return RunTests (type, null);
+               return RunTests (type, null, null);
        }
 }
 
index 944a57b104f2e7fce7e9f9ef02e7befcc457d52f..3c626c2de1c5d646567312e91394ea6735afa21e 100644 (file)
@@ -5847,6 +5847,7 @@ encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info, guint8 *buf, guint
                break;
        case MONO_PATCH_INFO_GC_SAFE_POINT_FLAG:
        case MONO_PATCH_INFO_GET_TLS_TRAMP:
+       case MONO_PATCH_INFO_JIT_THREAD_ATTACH:
                break;
        default:
                g_warning ("unable to handle jump info %d", patch_info->type);
@@ -6315,8 +6316,9 @@ emit_klass_info (MonoAotCompile *acfg, guint32 token)
        if (mono_class_is_gtd (klass) || cant_encode) {
                encode_value (-1, p, &p);
        } else {
+               gboolean has_nested = mono_class_get_nested_classes_property (klass) != NULL;
                encode_value (klass->vtable_size, p, &p);
-               encode_value ((mono_class_is_gtd (klass) ? (1 << 8) : 0) | (no_special_static << 7) | (klass->has_static_refs << 6) | (klass->has_references << 5) | ((klass->blittable << 4) | ((mono_class_get_ext (klass) && mono_class_get_ext (klass)->nested_classes) ? 1 : 0) << 3) | (klass->has_cctor << 2) | (klass->has_finalize << 1) | klass->ghcimpl, p, &p);
+               encode_value ((mono_class_is_gtd (klass) ? (1 << 8) : 0) | (no_special_static << 7) | (klass->has_static_refs << 6) | (klass->has_references << 5) | ((klass->blittable << 4) | (has_nested ? 1 : 0) << 3) | (klass->has_cctor << 2) | (klass->has_finalize << 1) | klass->ghcimpl, p, &p);
                if (klass->has_cctor)
                        encode_method_ref (acfg, mono_class_get_cctor (klass), p, &p);
                if (klass->has_finalize)
@@ -7643,7 +7645,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
         * encountered.
         */
        depth = GPOINTER_TO_UINT (g_hash_table_lookup (acfg->method_depth, method));
-       if (!acfg->aot_opts.no_instances && depth < 32) {
+       if (!acfg->aot_opts.no_instances && depth < 32 && mono_aot_mode_is_full (&acfg->aot_opts)) {
                for (patch_info = cfg->patch_info; patch_info; patch_info = patch_info->next) {
                        switch (patch_info->type) {
                        case MONO_PATCH_INFO_RGCTX_FETCH:
@@ -7662,7 +7664,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
 
                                if (!m)
                                        break;
-                               if (m->is_inflated) {
+                               if (m->is_inflated && mono_aot_mode_is_full (&acfg->aot_opts)) {
                                        if (!(mono_class_generic_sharing_enabled (m->klass) &&
                                                  mono_method_is_generic_sharable_full (m, FALSE, FALSE, FALSE)) &&
                                                (!method_has_type_vars (m) || mono_method_is_generic_sharable_full (m, TRUE, TRUE, FALSE))) {
@@ -9867,7 +9869,8 @@ collect_methods (MonoAotCompile *acfg)
                }
        }
 
-       add_generic_instances (acfg);
+       if (mono_aot_mode_is_full (&acfg->aot_opts))
+               add_generic_instances (acfg);
 
        if (mono_aot_mode_is_full (&acfg->aot_opts))
                add_wrappers (acfg);
@@ -10496,6 +10499,11 @@ add_preinit_got_slots (MonoAotCompile *acfg)
        get_got_offset (acfg, FALSE, ji);
        get_got_offset (acfg, TRUE, ji);
 
+       ji = (MonoJumpInfo *)mono_mempool_alloc0 (acfg->mempool, sizeof (MonoJumpInfo));
+       ji->type = MONO_PATCH_INFO_JIT_THREAD_ATTACH;
+       get_got_offset (acfg, FALSE, ji);
+       get_got_offset (acfg, TRUE, ji);
+
        for (i = 0; i < sizeof (preinited_jit_icalls) / sizeof (char*); ++i) {
                ji = (MonoJumpInfo *)mono_mempool_alloc0 (acfg->mempool, sizeof (MonoAotCompile));
                ji->type = MONO_PATCH_INFO_INTERNAL_METHOD;
index 1c282726d02bff000884f74f214e0e8bc7f9d518..7d9a9114dbb2014c993cf961c7aa23a784b227fc 100644 (file)
@@ -3703,6 +3703,7 @@ decode_patch (MonoAotModule *aot_module, MonoMemPool *mp, MonoJumpInfo *ji, guin
        }
        case MONO_PATCH_INFO_GC_SAFE_POINT_FLAG:
        case MONO_PATCH_INFO_GET_TLS_TRAMP:
+       case MONO_PATCH_INFO_JIT_THREAD_ATTACH:
                break;
        case MONO_PATCH_INFO_AOT_JIT_INFO:
                ji->data.index = decode_value (p, &p);
index 81f1e9678541914d572b67b4808ebce6f598975a..fc8f816db0a09d0c3bb97b1d487379881c7edbfc 100644 (file)
@@ -156,6 +156,7 @@ emit_llvmonly_virtual_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig
 static MonoMethodSignature *helper_sig_domain_get;
 static MonoMethodSignature *helper_sig_rgctx_lazy_fetch_trampoline;
 static MonoMethodSignature *helper_sig_llvmonly_imt_trampoline;
+static MonoMethodSignature *helper_sig_jit_thread_attach;
 
 /* type loading helpers */
 static GENERATE_GET_CLASS_WITH_CACHE (runtime_helpers, System.Runtime.CompilerServices, RuntimeHelpers)
@@ -367,6 +368,7 @@ mono_create_helper_signatures (void)
        helper_sig_domain_get = mono_create_icall_signature ("ptr");
        helper_sig_rgctx_lazy_fetch_trampoline = mono_create_icall_signature ("ptr ptr");
        helper_sig_llvmonly_imt_trampoline = mono_create_icall_signature ("ptr ptr ptr");
+       helper_sig_jit_thread_attach = mono_create_icall_signature ("ptr ptr");
 }
 
 static MONO_NEVER_INLINE void
@@ -12872,13 +12874,24 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                /* AOT code is only used in the root domain */
                                EMIT_NEW_PCONST (cfg, args [0], cfg->compile_aot ? NULL : cfg->domain);
-                               ins = mono_emit_jit_icall (cfg, mono_jit_thread_attach, args);
+                               if (cfg->compile_aot) {
+                                       MonoInst *addr;
+
+                                       /*
+                                        * This is called on unattached threads, so it cannot go through the trampoline
+                                        * infrastructure. Use an indirect call through a got slot initialized at load time
+                                        * instead.
+                                        */
+                                       EMIT_NEW_AOTCONST (cfg, addr, MONO_PATCH_INFO_JIT_THREAD_ATTACH, NULL);
+                                       ins = mono_emit_calli (cfg, helper_sig_jit_thread_attach, args, addr, NULL, NULL);
+                               } else {
+                                       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)
                                        MONO_START_BB (cfg, next_bb);
 
-
                                ip += 2;
                                break;
                        }
@@ -15152,7 +15165,7 @@ mono_decompose_typecheck (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins)
        NEW_BBLOCK (cfg, first_bb);
        cfg->cbb = first_bb;
 
-       if (!context_used && mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
+       if (!context_used && (mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || klass->is_array_special_interface)) {
                if (is_isinst)
                        ret = emit_isinst_with_cache_nonshared (cfg, source, klass);
                else
index 400940957fbd2e3c498784f371aaf5597e2de013..857bbefef3690bbb093ce76f4aace5cc6f4f0678 100644 (file)
 #define MONO_ARCH_CONTEXT_DEF
 #endif
 
+#ifndef MONO_ARCH_STACK_GROWS_UP
+#define MONO_ARCH_STACK_GROWS_UP 0
+#endif
+
 static gpointer restore_context_func, call_filter_func;
 static gpointer throw_exception_func, rethrow_exception_func;
 static gpointer throw_corlib_exception_func;
@@ -96,6 +100,77 @@ static void mono_raise_exception_with_ctx (MonoException *exc, MonoContext *ctx)
 static void mono_runtime_walk_stack_with_ctx (MonoJitStackWalk func, MonoContext *start_ctx, MonoUnwindOptions unwind_options, void *user_data);
 static gboolean mono_current_thread_has_handle_block_guard (void);
 
+static gboolean
+first_managed (MonoStackFrameInfo *frame, MonoContext *ctx, gpointer addr)
+{
+       gpointer **data = (gpointer **)addr;
+
+       if (!frame->managed)
+               return FALSE;
+
+       *data = MONO_CONTEXT_GET_SP(ctx);
+       g_assert (*data);
+       return TRUE;
+}
+
+static gpointer
+mono_thread_get_managed_sp (void)
+{
+       gpointer addr = NULL;
+       mono_walk_stack (first_managed, MONO_UNWIND_SIGNAL_SAFE, &addr);
+       return addr;
+}
+
+static inline int
+mini_abort_threshold_offset (gpointer threshold, gpointer sp)
+{
+       intptr_t stack_threshold = (intptr_t) threshold;
+       intptr_t stack_pointer = (intptr_t) sp;
+
+       const int direction = MONO_ARCH_STACK_GROWS_UP ? -1 : 1;
+       intptr_t magnitude = stack_pointer - stack_threshold;
+
+       return direction * magnitude;
+}
+
+static inline void
+mini_clear_abort_threshold (void)
+{
+       MonoJitTlsData *jit_tls = mono_get_jit_tls ();
+       jit_tls->abort_exc_stack_threshold = NULL;
+}
+
+static inline void
+mini_set_abort_threshold (MonoContext *ctx)
+{
+       gpointer sp = MONO_CONTEXT_GET_SP (ctx);
+       MonoJitTlsData *jit_tls = mono_get_jit_tls ();
+       // Only move it up, to avoid thrown/caught
+       // exceptions lower in the stack from triggering
+       // a rethrow
+       gboolean above_threshold = mini_abort_threshold_offset (jit_tls->abort_exc_stack_threshold, sp) >= 0;
+       if (!jit_tls->abort_exc_stack_threshold || above_threshold) {
+               jit_tls->abort_exc_stack_threshold = sp;
+       }
+}
+
+// Note: In the case that the frame is above where the thread abort
+// was set we bump the threshold so that functions called from the new,
+// higher threshold don't trigger the thread abort exception
+static inline gboolean
+mini_above_abort_threshold (void)
+{
+       gpointer sp = mono_thread_get_managed_sp ();
+       MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+
+       gboolean above_threshold = mini_abort_threshold_offset (jit_tls->abort_exc_stack_threshold, sp) >= 0;
+
+       if (above_threshold)
+               jit_tls->abort_exc_stack_threshold = sp;
+
+       return above_threshold;
+}
+
 void
 mono_exceptions_init (void)
 {
@@ -138,6 +213,8 @@ mono_exceptions_init (void)
        cbs.mono_exception_walk_trace = mono_exception_walk_trace;
        cbs.mono_install_handler_block_guard = mono_install_handler_block_guard;
        cbs.mono_current_thread_has_handle_block_guard = mono_current_thread_has_handle_block_guard;
+       cbs.mono_clear_abort_threshold = mini_clear_abort_threshold;
+       cbs.mono_above_abort_threshold = mini_above_abort_threshold;
        mono_install_eh_callbacks (&cbs);
 }
 
@@ -1275,12 +1352,6 @@ wrap_non_exception_throws (MonoMethod *m)
        return val;
 }
 
-#ifndef MONO_ARCH_STACK_GROWS_UP
-#define DOES_STACK_GROWS_UP 1
-#else
-#define DOES_STACK_GROWS_UP 0
-#endif
-
 #define MAX_UNMANAGED_BACKTRACE 128
 static MonoArray*
 build_native_trace (MonoError *error)
@@ -1465,10 +1536,10 @@ mono_handle_exception_internal_first_pass (MonoContext *ctx, MonoObject *obj, gi
                        dynamic_methods = g_slist_prepend (dynamic_methods, method);
 
                if (stack_overflow) {
-                       if (DOES_STACK_GROWS_UP)
-                               free_stack = (guint8*)(MONO_CONTEXT_GET_SP (ctx)) - (guint8*)(MONO_CONTEXT_GET_SP (&initial_ctx));
-                       else
+                       if (MONO_ARCH_STACK_GROWS_UP)
                                free_stack = (guint8*)(MONO_CONTEXT_GET_SP (&initial_ctx)) - (guint8*)(MONO_CONTEXT_GET_SP (ctx));
+                       else
+                               free_stack = (guint8*)(MONO_CONTEXT_GET_SP (ctx)) - (guint8*)(MONO_CONTEXT_GET_SP (&initial_ctx));
                } else {
                        free_stack = 0xffffff;
                }
@@ -1550,6 +1621,7 @@ mono_handle_exception_internal_first_pass (MonoContext *ctx, MonoObject *obj, gi
                                                        setup_stack_trace (mono_ex, dynamic_methods, initial_trace_ips, &trace_ips);
                                                g_slist_free (dynamic_methods);
                                                /* mono_debugger_agent_handle_exception () needs this */
+                                               mini_set_abort_threshold (ctx);
                                                MONO_CONTEXT_SET_IP (ctx, ei->handler_start);
                                                return TRUE;
                                        }
@@ -1735,6 +1807,7 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
 
                        // FIXME: This runs managed code so it might cause another stack overflow when
                        // we are handling a stack overflow
+                       mini_set_abort_threshold (ctx);
                        mono_unhandled_exception (obj);
                } else {
                        gboolean unhandled = FALSE;
@@ -1805,10 +1878,10 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
                //printf ("M: %s %d.\n", mono_method_full_name (method, TRUE), frame_count);
 
                if (stack_overflow) {
-                       if (DOES_STACK_GROWS_UP)
-                               free_stack = (guint8*)(MONO_CONTEXT_GET_SP (ctx)) - (guint8*)(MONO_CONTEXT_GET_SP (&initial_ctx));
-                       else
+                       if (MONO_ARCH_STACK_GROWS_UP)
                                free_stack = (guint8*)(MONO_CONTEXT_GET_SP (&initial_ctx)) - (guint8*)(MONO_CONTEXT_GET_SP (ctx));
+                       else
+                               free_stack = (guint8*)(MONO_CONTEXT_GET_SP (ctx)) - (guint8*)(MONO_CONTEXT_GET_SP (&initial_ctx));
                } else {
                        free_stack = 0xffffff;
                }
@@ -1906,6 +1979,7 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
                                        jit_tls->orig_ex_ctx_set = TRUE;
                                        mono_profiler_exception_clause_handler (method, ei->flags, i);
                                        jit_tls->orig_ex_ctx_set = FALSE;
+                                       mini_set_abort_threshold (ctx);
                                        MONO_CONTEXT_SET_IP (ctx, ei->handler_start);
                                        mono_set_lmf (lmf);
 #ifndef DISABLE_PERFCOUNTERS
@@ -1923,6 +1997,7 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
                                        jit_tls->orig_ex_ctx_set = TRUE;
                                        mono_profiler_exception_clause_handler (method, ei->flags, i);
                                        jit_tls->orig_ex_ctx_set = FALSE;
+                                       mini_set_abort_threshold (ctx);
                                        call_filter (ctx, ei->handler_start);
                                }
                                if (ei->flags == MONO_EXCEPTION_CLAUSE_FINALLY) {
@@ -1952,9 +2027,11 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
                                                jit_tls->resume_state.lmf = lmf;
                                                jit_tls->resume_state.first_filter_idx = first_filter_idx;
                                                jit_tls->resume_state.filter_idx = filter_idx;
+                                               mini_set_abort_threshold (ctx);
                                                MONO_CONTEXT_SET_IP (ctx, ei->handler_start);
                                                return 0;
                                        } else {
+                                               mini_set_abort_threshold (ctx);
                                                call_filter (ctx, ei->handler_start);
                                        }
                                }
index c403278c753feadc52a526f997f447468b8f2e97..ab6d21f92c5b40f7a7a84ea82daeed2c35051926 100644 (file)
@@ -3929,7 +3929,7 @@ emit_landing_pad (EmitContext *ctx, int group_index, int group_size)
                LLVMValueRef switch_ins = LLVMBuildSwitch (lpadBuilder, match, resume_bb, group_size);
 
                // else move to that target bb
-               for (int i=0; i < group_size; i++) {
+               for (int i = 0; i < group_size; i++) {
                        MonoExceptionClause *clause = group_start + i;
                        int clause_index = clause - cfg->header->clauses;
                        MonoBasicBlock *handler_bb = (MonoBasicBlock*)g_hash_table_lookup (ctx->clause_to_handler, GINT_TO_POINTER (clause_index));
@@ -7330,8 +7330,12 @@ emit_method_inner (EmitContext *ctx)
                        LLVMValueRef switch_ins = (LLVMValueRef)l->data;
                        GSList *bb_list = info->call_handler_return_bbs;
 
-                       for (i = 0; i < g_slist_length (bb_list); ++i)
-                               LLVMAddCase (switch_ins, LLVMConstInt (LLVMInt32Type (), i + 1, FALSE), (LLVMBasicBlockRef)(g_slist_nth (bb_list, i)->data));
+                       GSList *bb_list_iter;
+                       i = 0;
+                       for (bb_list_iter = bb_list; bb_list_iter; bb_list_iter = g_slist_next (bb_list_iter)) {
+                               LLVMAddCase (switch_ins, LLVMConstInt (LLVMInt32Type (), i + 1, FALSE), (LLVMBasicBlockRef)bb_list_iter->data);
+                               i ++;
+                       }
                }
        }
 
index 45f39de76a31bd978fef1432a6e87754ef255e1a..57c66e9afdf0b6ef9b1545791935b51a955fe74a 100644 (file)
@@ -1282,6 +1282,7 @@ mono_patch_info_hash (gconstpointer data)
        case MONO_PATCH_INFO_GC_SAFE_POINT_FLAG:
        case MONO_PATCH_INFO_AOT_MODULE:
        case MONO_PATCH_INFO_GET_TLS_TRAMP:
+       case MONO_PATCH_INFO_JIT_THREAD_ATTACH:
                return (ji->type << 8);
        case MONO_PATCH_INFO_CASTCLASS_CACHE:
                return (ji->type << 8) | (ji->data.index);
@@ -1728,6 +1729,12 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code,
                target = NULL;
 #endif
                break;
+       case MONO_PATCH_INFO_JIT_THREAD_ATTACH: {
+               MonoJitICallInfo *mi = mono_find_jit_icall_by_name ("mono_jit_thread_attach");
+               g_assert (mi);
+               target = mi->func;
+               break;
+       }
        default:
                g_assert_not_reached ();
        }
index 239cdd38ebd3f904286268f91c53b52627de0e87..e0388c536677f7ec992132995cc6d9b7d3036487 100644 (file)
 #endif
 
 /* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 137
+#define MONO_AOT_FILE_VERSION 138
 
 //TODO: This is x86/amd64 specific.
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
@@ -1193,6 +1193,14 @@ typedef struct {
         * The calling assembly in llvmonly mode.
         */
        MonoImage *calling_image;
+
+       /*
+        * The stack frame "high water mark" for ThreadAbortExceptions.
+        * We will rethrow the exception upon exiting a catch clause that's
+        * in a function stack frame above the water mark(isn't being called by
+        * the catch block that caught the ThreadAbortException).
+        */
+       gpointer abort_exc_stack_threshold;
 } MonoJitTlsData;
 
 /*
index a55700355721adf50355dbc89013664042f1d700..d6e12f614201226ca4c6ce17e4bd389031f76b3b 100644 (file)
@@ -58,3 +58,4 @@ PATCH_INFO(GC_NURSERY_BITS, "gc_nursery_bits")
 PATCH_INFO(GSHAREDVT_IN_WRAPPER, "gsharedvt_in_wrapper")
 PATCH_INFO(ICALL_ADDR_CALL, "icall_addr_call")
 PATCH_INFO(GET_TLS_TRAMP, "get_tls_tramp")
+PATCH_INFO(JIT_THREAD_ATTACH, "jit_thread_attach")
index 4f6c4acb204fc26e059d4c7c08d3e4c6315c8938..73b11497d169f295c44cacba0b18dad37665ee72 100644 (file)
@@ -100,7 +100,7 @@ CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
 with_mono_path = MONO_PATH=$(CLASS)
 
 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
-MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
+MCS = $(RUNTIME) $(CSC) -lib:$(CLASS) -unsafe -nologo -noconfig -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug:portable
 
 %.exe: %.cs
        $(MCS) -out:$@ $<
index 4c0ff0e63a5fbb3a5972487b584897699885ce2c..b79bd1b2f15511329226bdc6db42ba2f8a461665 100644 (file)
@@ -54,7 +54,7 @@ if INSTALL_AOT_HYBRID
 PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY 
 endif
 
-MCS_NO_LIB = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -debug \
+MCS_NO_LIB = $(RUNTIME) $(CSC) -unsafe -debug:portable \
        -noconfig -nologo \
        -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \
        -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \
index b7c7f47295959395c277e4af4a97f3f7de191da7..1d3942ffa4fef881c4f2b0d35d8e92fc3c68c84e 100644 (file)
@@ -3,7 +3,7 @@ CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
 with_mono_path = MONO_PATH=$(CLASS)
 
 RUNTIME = $(top_builddir)/runtime/mono-wrapper --debug
-MCS = $(with_mono_path) $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -debug:full -target:library
+MCS = $(with_mono_path) $(RUNTIME) $(CSC) -noconfig -nologo -debug:portable -target:library
 
 if INSTALL_AOT_ONLY
 prereq: aot
index 5deee6bc2c36115d2191904ece8388e67ca4fb9c..c5d5e4aa26adab5eb928aa7a58f1bdfb5a015c89 100644 (file)
@@ -5,47 +5,60 @@ using System.Threading;
 
 class Driver
 {
+       static DateTime targetTime;
+       static bool finished() {
+               DateTime now = DateTime.UtcNow;
+               return now > targetTime;
+       }
+
        public static void Main ()
        {
-               BlockingCollection<Thread> threads = new BlockingCollection<Thread> (new ConcurrentQueue<Thread> (), 128);
-
-               bool finished = false;
+               int gcCount = 0;
+               int joinCount = 0;
+               targetTime = DateTime.UtcNow.AddSeconds(30);
 
                Thread gcThread = new Thread (() => {
-                       while (!finished) {
+                       while (!finished()) {
                                GC.Collect ();
-                               Thread.Yield ();
-                       }
-               });
-
-               Thread joinThread = new Thread (() => {
-                       for (int i = 0; ; ++i) {
-                               Thread t = threads.Take ();
-                               if (t == null)
-                                       break;
-                               t.Join ();
-                               if ((i + 1) % (50) == 0)
-                                       Console.Write (".");
-                               if ((i + 1) % (50 * 50) == 0)
-                                       Console.WriteLine ();
+                               gcCount++;
+                               Thread.Sleep (1);
                        }
                });
 
                gcThread.Start ();
-               joinThread.Start ();
 
-               for (int i = 0; i < 10 * 1000; ++i) {
-                       Thread t = new Thread (() => { Thread.Yield (); });
-                       t.Start ();
+               // Create threads then join them for 30 seconds nonstop while GCs occur once per ms
+               while (!finished()) {
+                       BlockingCollection<Thread> threads = new BlockingCollection<Thread> (new ConcurrentQueue<Thread> (), 128);
 
-                       threads.Add (t);
-               }
+                       Thread joinThread = new Thread (() => {
+                               for (int i = 0; ; ++i) {
+                                       Thread t = threads.Take ();
+                                       if (t == null)
+                                               break;
+                                       t.Join ();
 
-               threads.Add (null);
+                                       // Uncomment this and run with MONO_LOG_LEVEL=info MONO_LOG_MASK=gc
+                                       // to see GC/join balance in real time
+                                       //Console.Write ("*");
+                               }
+                       });
+                       joinThread.Start ();
+                       
+                       const int makeThreads = 10*1000;
+                       for (int i = 0; i < makeThreads; ++i) {
+                               Thread t = new Thread (() => { Thread.Yield (); });
+                               t.Start ();
 
-               joinThread.Join ();
+                               threads.Add (t);
+                       }
 
-               finished = true;
+                       threads.Add (null);
+                       joinThread.Join ();
+
+                       joinCount += makeThreads;
+                       Console.WriteLine("Performed {0} GCs, created {1} threads. Finished? {2}", gcCount, joinCount, finished());
+               }
                gcThread.Join ();
        }
-}
\ No newline at end of file
+}
index 9b0c5cf3f9952f92b51e3cb8ce9db61af7d0a8de..02f1093cd8e83d07bece152b9532b5b8faf2852e 100644 (file)
@@ -170,6 +170,64 @@ public class Tests {
                return 0;
        }
 
+       public static void HasTry ()
+       {
+               try {
+                       throw new Exception ("boop");
+               } catch (Exception e) {
+                       // See if we re-throw the thread abort exception here
+               }
+       }
+
+       public static int test_0_thread_abort_water_mark () 
+       {
+               Boolean failed = true;
+
+               try {
+                       Thread.CurrentThread.Abort ("test_0_thread_abort_water_mark");
+               } catch (ThreadAbortException e) {
+                       HasTry ();
+                       Thread.ResetAbort ();
+                       failed = false;
+               } finally {
+                       if (failed) {
+                               Thread.ResetAbort ();
+                               throw new Exception ("Threw pending ThreadAbort exception under stack threshold");
+                       }
+                       Console.WriteLine ("Working thread abort");
+               }
+
+               return 0;
+       }
+
+       public static int test_0_thread_abort_water_mark_other_exc () 
+       {
+               Boolean failed = true;
+
+               try {
+                       try {
+                               try {
+                                       Thread.CurrentThread.Abort ("TestKeepAbort");
+                               } catch (ThreadAbortException ta_ex) {
+                                       throw new ArgumentNullException("SpecificDummyException");
+                               }
+                       } catch (ArgumentNullException ex){
+                               // Throw ThreadAbortException here
+                       }
+               } catch (ThreadAbortException ex) {
+                       Console.WriteLine ("Retained thread abort exception");
+                       failed = false;
+                       Thread.ResetAbort ();
+               } catch (Exception e) {
+                       failed = true;
+               } finally {
+                       if (failed)
+                               throw new Exception ("Lost the thread abort due to another exception running.");
+               }
+
+               return 0;
+       }
+
        public class CBO : ContextBoundObject {
                public void Run () {
                        Thread.CurrentThread.Abort ("FOO");
index 1fe237bc3456544b87023c11ac9e85c99c5fef9e..7af06ebeee507c8dbd07d0b1d21d414bd3175374 100644 (file)
@@ -92,7 +92,7 @@ clean-local:
 
 endif BUILD_MCS
 
-TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/mcs $(tmpinst)/bin/al
+TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/csc $(tmpinst)/bin/al
 
 mcs-do-test-profiles:
        cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
@@ -181,10 +181,10 @@ $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
        $(mkinstalldirs) $(tmpinst)/bin
        cp mono-wrapper $@
 
-$(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
+$(tmpinst)/bin/csc: $(tmpinst)/bin/mono Makefile
        echo '#! /bin/sh' > $@ ; \
        r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
-       echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/build/mcs.exe"'" "$$@"' >> $@ ; \
+       echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$(CSC)"'" "$$@"' >> $@ ; \
        chmod +x $@
 
 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
index a22d2a91ff418265354bc59c8043ba1a16403891..6b79de7dc529bc62358c670a28c8b3ac1d32736b 100644 (file)
@@ -86,7 +86,7 @@
 /sgen
 /sgen1
 /signcode
-/smcs
+/csc
 /sn
 /soapsuds
 /sqlmetal
index 39595455dadf28dc64a1a5e957b13143d0b365b0..6c2a338bc4adc481b3492127653b2d69b47e2a8e 100644 (file)
@@ -36,6 +36,7 @@ bin_SCRIPTS = \
        mono-test-install       \
        peverify                \
        mcs                     \
+       csc                                     \
        mono-package-runtime    \
        mono-heapviz            \
        $(scripts_mono_configuration_crypto)
@@ -157,6 +158,7 @@ EXTRA_DIST =                        \
        xbuild.in                       \
        update_submodules               \
        mcs.in                          \
+       csc.in                          \
        dmcs.in                         \
        mono-package-runtime    \
        mono-test-install       \
@@ -203,6 +205,10 @@ mcs: mcs.in Makefile
        $(REWRITE_COMMON) $(srcdir)/mcs.in > $@.tmp
        mv -f $@.tmp $@
 
+csc: csc.in Makefile
+       $(REWRITE_COMMON) $(srcdir)/csc.in > $@.tmp
+       mv -f $@.tmp $@
+
 dmcs: dmcs.in Makefile
        $(REWRITE_COMMON) $(srcdir)/dmcs.in > $@.tmp
        mv -f $@.tmp $@
diff --git a/scripts/csc.in b/scripts/csc.in
new file mode 100644 (file)
index 0000000..c32be36
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec @bindir@/mono $MONO_OPTIONS @mono_instdir@/4.5/csc.exe "$@"